diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index c2658d7d1..000000000 --- a/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/.drone.yml.back b/.drone.yml.back deleted file mode 100644 index 23e4f461b..000000000 --- a/.drone.yml.back +++ /dev/null @@ -1,63 +0,0 @@ -pipeline: - - test: - image: node:16 - pull: true - commands: - - npm ci --production=false - - npm run autotest fast - - KYC=1 npm run autotest fast - - docker_token_nethermind: - image: plugins/docker - repo: iexechub/poco-chaintest - secrets: [docker_username, docker_password] - dockerfile: testchains/nethermind.dockerfile - build_args: - - MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final - - CHAIN_TYPE=token - - CHAIN_BLOCK_TIME=1 - - CHAIN_FORCE_SEALING=false - auto_tag: true - auto_tag_suffix: token-nethermind - when: - ref: [refs/tags/v*] - - docker_native_nethermind: - image: plugins/docker - repo: iexechub/poco-chaintest - secrets: [docker_username, docker_password] - dockerfile: testchains/nethermind.dockerfile - build_args: - - MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final - - CHAIN_TYPE=native - - CHAIN_BLOCK_TIME=1 - - CHAIN_FORCE_SEALING=false - auto_tag: true - auto_tag_suffix: native-nethermind - when: - ref: [refs/tags/v*] - - docker_token_ganache: - image: plugins/docker - repo: iexechub/poco-chaintest - secrets: [docker_username, docker_password] - dockerfile: testchains/Dockerfile_token_ganache - build_args: - - MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final - auto_tag: true - auto_tag_suffix: token - when: - ref: [refs/tags/v*] - - docker_native_ganache: - image: plugins/docker - repo: iexechub/poco-chaintest - secrets: [docker_username, docker_password] - dockerfile: testchains/Dockerfile_native_ganache - build_args: - - MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final - auto_tag: true - auto_tag_suffix: native - when: - ref: [refs/tags/v*] diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..811ca1b1c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +on: + push: + branches: + - feature/* + - bugfix/* + - develop + - release/* + - hotfix/* + - main + - v5 + +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Init + run: npm ci + - name: Run coverage + run: npm run coverage + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: iExecBlockchainComputing/PoCo + - name: Run static analysis with slither + uses: crytic/slither-action@v0.4.0 + id: slither + with: + target: "contracts/tools/testing/slither/" + solc-version: '0.8.21' + slither-args: --checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/ + node-version: "20" + fail-on: none # TODO set this to high or other + sarif: results.sarif + - name: Upload SARIF file + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: ${{ steps.slither.outputs.sarif }} diff --git a/.gitignore b/.gitignore index 650f61fc6..02064e365 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,18 @@ node_modules coverage coverage.json logs + +.env +typechain +typechain-types + +# Hardhat files +cache +artifacts + +# Deployed addresses saved with deploy/ scripts +build/*.json + +contracts/hardhat-dependency-compiler/ +deployments/*hardhat* +deployments/dev-* diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..95f1873d0 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +npx lint-staged +npm run doc diff --git a/.mocharc.json b/.mocharc.json new file mode 100644 index 000000000..294f84941 --- /dev/null +++ b/.mocharc.json @@ -0,0 +1,5 @@ +{ + "require": "hardhat/register", + "timeout": 40000, + "_": ["test/**/*.test.ts"] +} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..be23fac3c --- /dev/null +++ b/.prettierrc @@ -0,0 +1,23 @@ +{ + "printWidth": 100, + "singleQuote": true, + "tabWidth": 4, + "trailingComma": "all", + "endOfLine": "auto", + "plugins": [ + "prettier-plugin-organize-imports", + "prettier-plugin-solidity" + ], + "pluginsComments": { + "prettier-plugin-organize-import": "Supports .ts files (not .sol)", + "prettier-plugin-solidity": "Does not support imports sorting yet. See prettier-solidity/prettier-plugin-solidity#918" + }, + "overrides": [ + { + "files": "*.sol", + "options": { + "singleQuote": false + } + } + ] +} diff --git a/.solcover.js b/.solcover.js index f727ff03a..87ac66cb0 100644 --- a/.solcover.js +++ b/.solcover.js @@ -1,39 +1,26 @@ -const fs = require("fs"); +const BASE_FOLDER = './coverage'; module.exports = { - client: require('ganache'), - /* - * providerOptions: { - * hardfork: "istanbul", - * mnemonic: "actual surround disorder swim upgrade devote digital misery truly verb slide final", - * network_id: 65535 - * }, - */ - mocha: { - timeout: 600000, // double timeout - }, - port: 8555, - skipFiles: [ - 'tools/Migrations.sol', - 'tools/testing/TestClient.sol', - 'tools/testing/TestReceiver.sol', - ], - onCompileComplete: () => { - files = [ - { repo: 'rlc-faucet-contract', name: 'RLC' }, - { repo: '@ensdomains/ens', name: 'ENSRegistry' }, - { repo: '@ensdomains/ens', name: 'FIFSRegistrar' }, - { repo: '@ensdomains/ens', name: 'ReverseRegistrar' }, - { repo: '@ensdomains/resolver', name: 'PublicResolver' }, - { repo: '@iexec/erlc', name: 'ERLCTokenSwap' }, - { repo: '@iexec/solidity', name: 'ERC1538Proxy' }, - { repo: '@iexec/solidity', name: 'ERC1538UpdateDelegate' }, - { repo: '@iexec/solidity', name: 'ERC1538QueryDelegate' }, - { repo: '@iexec/solidity', name: 'GenericFactory' }, - ]; - for (file of files) - { - fs.copyFileSync(`node_modules/${file.repo}/build/contracts/${file.name}.json`, `.coverage_artifacts/contracts/${file.name}.json`); - } - } + /** + * See https://github.com/sc-forks/solidity-coverage/issues/715 issue if + * coverage is 0% when IR enabled. + */ + configureYulOptimizer: true, + solcOptimizerDetails: { + yul: true, + yulDetails: { + optimizerSteps: '', + }, + }, + mocha: { + timeout: 600000, // double timeout + }, + skipFiles: [ + 'tools/Migrations.sol', + 'tools/testing/ERC1271Mock.sol', + 'tools/testing/TestClient.sol', + 'tools/testing/TestReceiver.sol', + 'modules/delegates/SignatureVerifier.sol', + ], + istanbulFolder: BASE_FOLDER, }; diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ed112083..910f4a6ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,174 @@ # Changelog +## v5.5.0 + +### What's new? +- Added the ability to sponsor a deal for a requester via the new `sponsorMatchOrders(..)` function. + - contracts implementation โœ๏ธ + - deployment on iExec Bellecour network ๐Ÿš€ +- Initialized ยซ boost ยป mode to improve deal throughput + - contracts implementation โœ๏ธ + +### More details +- Include `IexecOrderManagement` module in Poco sponsoring upgrade. (#132) +- Update function visibilities to `external` in `IexecPoco` and `IexecOrderManagement` modules. (#131) +- Fix configs native and token. (#129) +- Bump dependencies: (#127) + - `@openzeppelin/hardhat-upgrades`, `hardhat-dependency-compiler`, `web3`, + `prettier`, `zx`, and others [minor/patch version bump] + - `prettier-plugin-organize-imports@4` +- Clean some TODOs and harmonize unit tests. (#123) +- Add `set-callback-gas.ts` script. (#121) +- Accept any signature format in `SignatureVerifier.v8` when the account is a smart contract. (#120) +- Update UML class diagrams. (#112) +- Generate Solidity documentation. (#111) +- Migrate unit test files to Typescript & Hardhat: + - Resources (#125, #126) + - Registries (#122, #124) + - IexecPoco2 + - reopen (#133) + - finalize (#79, #117, #119) + - reveal (#114, #118) + - contribute (#108, #109, #110) + - IexecPoco1 (#107, #113, #115, #116) + - Add `.test` suffix to unit test files (#106) + - ENSIntegration (#105) + - IexecOrderManagement (#101, #102, #103, #104) + - IexecMaintenance (#100) + - IexecEscrowNative (#99) + - IexecERC20 (#98) + - IexecCategoryManager (#97) + - IexecAccessors (#96) +- Wait for transactions occurring during deployment. (#95) +- Deploy and configure ENS with hardhat. (#93) +- Fix contribute & finalize with callbacks. (#92) +- [Deploy Poco sponsoring on local fork of Bellecour](./scripts/sponsoring/README.md). (#91) +- Create slither smart contract entry point and run slither analysis on new contracts. (#87) +- Upgrade to `@openzeppelin/contracts@5.0.2` and upgrade other dependencies. (#86) +- Deploy IexecPocoAccessorsDelegate module. (#85) +- Create `_computeDealVolume` and expose `ComputeDealVolume` functions (#82) +- Upgrade Order Management to solidity `^0.8.0`. (#84) +- Resolve naming conflict in accessors. (#81) +- Refund sponsor on `claimBoost`. (#80) +- Seize sponsor on success task. (#79) +- Refund sponsor on `claim`. (#77) +- Sponsor match orders boost. (#67, #78) +- Migrate to hardhat tests related to: + - `initialize` (#74, #75) + - `claim` (#65, #66, #72, #76) +- Upgrade Poco2 to solidity v0.8 . (#63) +- Use common helpers in Poco Boost integration tests. (#62) +- Upload coverage reports to Codecov. (#61) +- Deploy contracts in tests explicitly with hardhat or truffle fixture. (#59) +- Add the ability to deploy without truffle fixture. (#58) +- Sponsor match orders. (#57, #60) +- Upgrade Poco1 to solidity `^0.8.0` (#55): + - Migrate to `openzeppelin@v5` + - Migrate to `SignatureVerifier.v8` +- Change MNEMONIC var name for production & clean Hardhat file. (#53) +- Format files & update copyright notices: + - DelegateBase, IexecERC20Core (#64) + - PoCo2 contracts (#54) + - PoCo1 contracts (#52) + - Order Management contract (#83) +- Remove enterprise mode. (#51, #56) +- Add PoCo Boost modules to a timelock controlled proxy. +- Add IexecEscrow.v8 tests and developer notices. +- Add tests around callback feature verifying interests of actors are guaranteed. +- Reformat JS files. +- Create a hardhat network close to the iExec Bellecour blockchain. +- Merge settings and v8Settings using object spread. +- Remove useless files. +- Add Slither config. Run single contract Slither analysis on CI. +- Make Poco Boost ITs runnable with "native" mode. +- Migrate puml2links.sh to zx. +- Update copyright and license notices. +- Introduce zx for task scripting. +- Compile latest contracts with 0.8.21. +- Use a single 0.8.19 solidity version to compile latest contracts. +- Fix prettier solidity plugin resolution. +- Remove patched test helpers. +- Clean poco-chain files. +- Bump dependencies. +- Check balance in transfer operation. +- Reformat tests. +- Reformat contracts. +- Add mocha to use test explorer. +- Refactor tests. +- Add dedicated Poco Boost accessors. +- Implement `claimBoost`: + - Refund requester. + - Seize workerpool and reward kitty. +- Implement `pushResultBoost`: + - Verify task exists. + - Push result before deadline. + - Require enclave challenge when TEE bit of tag set. + - Verify signatures + - scheduler + - enclave + - tee broker + - Reward worker. + - Reward app provider. + - Reward dataset provider. + - Unlock scheduler stake. + - Reward scheduler. + - Handle callback. +- Implement `matchOrdersBoost`: + - Verify compatibility of orders + - trust + - category + - price + - tag + - restrictions + - Assets or requester belong to groups in ERC734 identity contract. + - Verify entries are registered & category exists. + - Verify signatures or presignatures of orders. + - ERC1271 contracts can be signers of orders. + - Compute volume & consume orders. + - Lock requester deal value. + - Store deal. + - Emit events. + - Lock scheduler stake. + - Return `dealId`. + - Reduce gas footprint: + - Remove beneficiary from deal storage. + - Reduce Boost deal storage from 6 to 5 slots. + - Reduce gas consumption on `lock()` calls. + - Cache addresses of assets and requester from arguments. + - Init local vars and cache order category. + - Optimize deal storing by slot. + - Change local structure for local variables. + - Store in variable if read multiple times. + - Group `hasDataset` block. + - Remove useless variable. +- Update prettier rules and reformat. +- Migrate `IexecPocoBoost` linking to hardhat deploy script. +- Clean files related to docker build of a test blockchain. +- Run automatically before commit a prettier on `.ts` and `.sol` staged files. +- Upgrade `eth_signTypedData` function to use `ethers`. Remove now useless `eth-sig-util`. +- Init Boost deal structure. +- Publish coverage report on CI/CD. Refactor Jenkinsfile. +- Deploy Nominal and Boost modules with Hardhat. +- Upgrade `hashStruct` function to use `ethers`. +- Add Boost module. + - Add interfaces. +- Add `Store` contract compatible with solidity `^0.8.0`. +- Update documentation: + - Generate class diagrams from solidity contracts. + - Add task and contribution state diagrams. + - Add boost workflow sequence diagram. Update nominal workflow sequence diagram. + - Update TEE workflow sequence diagram. + - Update actors diagram. + - Rename UMLs.md file to standard README.md. + - Add inline solidity documentation. + - Update class diagrams. + - Create folder docs that contains all documentation material. +- Migrate to Hardhat: + - Init Hardhat project. + - Migrate unit tests with `@nomiclabs/hardhat-truffle5`. + - Fetch `@iexec/solidity@0.1.1` from default public registry. + - Migrate tests coverage with [solidity-coverage](https://github.com/sc-forks/solidity-coverage) of `@nomicfoundation/hardhat-toolbox`. + ## v5.4.2 - Use latest Nethermind base image `nethermindeth/nethermind:iexec` (saved internally at `nexus.intra.iex.ec/nethermind:1.18.x-0`) diff --git a/COPYRIGHT b/COPYRIGHT deleted file mode 100644 index 3f8650fc7..000000000 --- a/COPYRIGHT +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2020 IEXEC BLOCKCHAIN TECH - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Jenkinsfile b/Jenkinsfile index 3e6a8515f..8b14c86d8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,169 +1,89 @@ -node("master") { - stage("Choose Label") { - LABEL = "jenkins-agent-machine-1" - } -} - +// TODO[optionnal]: Use scripted pipeline pipeline { + environment { + nodeJsImage = 'node:18' + } + agent any + stages { + stage('Init') { + agent { + docker { + reuseNode true + image nodeJsImage + } + } + steps { + script { + sh 'npm ci --production=false --no-progress' + sh 'npm run build' + sh 'npm run test-storage-layout' + // Verify basic deployment. Might be removed at some point. + sh 'npm run deploy' + } + } + } + stage('Hardhat tests') { + agent { + docker { + reuseNode true + image nodeJsImage + } + } + steps { + script { + test() + } + } + } - environment { - registry = "nexus.intra.iex.ec" - tokenDockerImage = "" - nativeDockerImage = "" - buildWhenTagContains = "v" - } - - agent { - node { - label "${LABEL}" - } - } - - stages { - - stage("Truffle tests - Public") { - agent { - docker { - image "node:14" - label "${LABEL}" - } - } - steps { - script { - try { - sh "npm ci --production=false --no-progress" - sh "npm run autotest fast" - } finally { - archiveArtifacts artifacts: "logs/**" - } - } - } - } - - stage("Truffle tests - KYC") { - agent { - docker { - image "node:14" - label "${LABEL}" - } - } - environment { - KYC = 'true' - } - steps { - script { - try { - sh "npm ci --production=false --no-progress" - sh "npm run autotest fast" - } finally { - archiveArtifacts artifacts: "logs/**" - } - } - } - } - - /* - Disable coverage - - stage("Solidity coverage - Public") { - agent { - docker { - image "node:14" - label "${LABEL}" - } - } - steps { - script { - try { - sh "npm ci --production=false --no-progress" - sh "npm run coverage" - } finally { - archiveArtifacts artifacts: "coverage/**" - } - } - } - } - - stage("Solidity coverage - KYC") { - agent { - docker { - image "node:14" - label "${LABEL}" - } - } - environment { - KYC = 'true' - } - steps { - script { - try { - sh "npm ci --production=false --no-progress" - sh "npm run coverage" - } finally { - archiveArtifacts artifacts: "coverage/**" - } - } - } - } - - */ - - stage("Log tag") { - when { expression { env.TAG_NAME != null && env.TAG_NAME.toString().contains(buildWhenTagContains) } } - steps{ - sh "echo ${BRANCH_NAME}" - sh "echo ${TAG_NAME}" - } - } + /** + * Usage example: + * docker run --rm --entrypoint /bin/bash -v $(pwd):/share \ + * -e SOLC='' trailofbits/eth-security-toolbox -c \ + * 'cd /share && solc-select install $SOLC && \ + * slither --solc-solcs-select $SOLC ' + */ + stage('Slither') { + agent { + docker { + reuseNode true + // At this time, trailofbits/eth-security-toolbox packages + // an old slither version, hence we use another Docker image + // (which is less user-friendly. Example: node not included) + // See https://github.com/crytic/slither/issues/2207#issuecomment-1787222979 + // As discribed in the issue, version 0.8.3 is not compatible + image 'ghcr.io/crytic/slither:0.10.0' + args "-e SOLC='0.8.21' --entrypoint=" + } + } + steps { + script { + try { + sh 'solc-select install $SOLC && slither --solc-solcs-select $SOLC contracts/tools/testing/slither/' + } catch (err) { + sh "echo ${STAGE_NAME} stage is unstable" + } + } + } + } + } +} - stage("Native 5s image ") { - when { - expression { - env.TAG_NAME != null && env.TAG_NAME.toString().contains(buildWhenTagContains) - } - } - steps { - script { - nethermindNative5secImage = docker.build( - registry + "/poco-chain:native-${TAG_NAME}-5s", - "--file testchains/nethermind.dockerfile" \ - + " --build-arg \"MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final\"" \ - + " --build-arg CHAIN_TYPE=native" \ - + " --build-arg CHAIN_BLOCK_TIME=5" \ - + " --build-arg CHAIN_FORCE_SEALING=true" \ - + " --no-cache .") - } - script { - docker.withRegistry("https://" + registry, "nexus") { - nethermindNative5secImage.push() - } - } - } - } +def test() { + try { + sh 'npm run coverage' + } catch (Exception e) { + echo 'Exception occurred: ' + e.toString() + runEachTestWithDedicatedLogFile() + } finally { + archiveArtifacts artifacts: 'coverage/**' + } +} - stage("Token 5s image") { - when { - expression { - env.TAG_NAME != null && env.TAG_NAME.toString().contains(buildWhenTagContains) - } - } - steps { - script { - nethermindNative5secImage = docker.build( - registry + "/poco-chain:token-${TAG_NAME}-5s", - "--file testchains/nethermind.dockerfile" \ - + " --build-arg \"MNEMONIC=actual surround disorder swim upgrade devote digital misery truly verb slide final\"" \ - + " --build-arg CHAIN_TYPE=token" \ - + " --build-arg CHAIN_BLOCK_TIME=5" \ - + " --build-arg CHAIN_FORCE_SEALING=true" \ - + " --no-cache .") - } - script { - docker.withRegistry("https://" + registry, "nexus") { - nethermindNative5secImage.push() - } - } - } - } - } -} \ No newline at end of file +def runEachTestWithDedicatedLogFile() { + try { + sh './test.sh' + } finally { + archiveArtifacts artifacts: 'logs/**' + } +} diff --git a/LICENSE b/LICENSE index 29219216d..6881caa4c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,17 @@ + Copyright 2020-2023 IEXEC BLOCKCHAIN TECH + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -174,28 +188,3 @@ of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2020 IEXEC BLOCKCHAIN TECH - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md index f1063a713..dfb957bd5 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,39 @@ - -[![Build Status](https://drone.iex.ec/api/badges/iExecBlockchainComputing/PoCo-dev/status.svg)](https://drone.iex.ec/iExecBlockchainComputing/PoCo-dev) - +[![codecov](https://codecov.io/github/iExecBlockchainComputing/PoCo/graph/badge.svg)](https://codecov.io/github/iExecBlockchainComputing/PoCo) # Introduction -This repository contains the smart contract implementation of iExec's PoCo protocole. +This repository contains the smart contract implementation of iExec's PoCo protocol. ## Related articles on medium - [PoCo Series #1 โ€” About Trust and Agents Incentives](https://medium.com/iex-ec/about-trust-and-agents-incentives-4651c138974c) - [PoCo Series #2 โ€” On the use of staking to prevent attacks](https://medium.com/iex-ec/poco-series-2-on-the-use-of-staking-to-prevent-attacks-2a5c700558bd) -- [PoCo Series #3 โ€” PoCo protocole update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126) +- [PoCo Series #3 โ€” PoCo protocol update](https://medium.com/iex-ec/poco-series-3-poco-protocole-update-a2c8f8f30126) - [PoCo Series #4 โ€” Enclaves and Trusted Executions](https://medium.com/iex-ec/poco-series-4-sgx-enclaves-and-trusted-executions-6f2ebed8d4fa) - [PoCo Series #5 โ€” Open decentralized brokering on the iExec platform](https://medium.com/iex-ec/poco-series-5-open-decentralized-brokering-on-the-iexec-platform-67b266e330d8) - [PoCo Series #6 โ€” Smart Contract Upgradeability and Governance](https://medium.com/iex-ec/poco-series-6-smart-contract-upgradeability-and-governance-68d2cdecd120) - [PoCo Series #8 โ€” Future-proofing iExec - Smart Contract Interoperability and Modularity](https://medium.com/iex-ec/poco-series-8-future-proofing-iexec-smart-contract-interoperability-and-modularity-37a3d3613f11) -## PoCo UML - -- [Contracts and Actors Architecture](./uml/architecture-ODB.png) -- [Nominal workflow sequence](./uml/nominalworkflow-ODB.png) -- [Nominal workflow sequence w/ TEE](./uml/nominalworkflow-ODB+TEE.png) +## PoCo UMLs + +- [Contracts and Actors Architecture](./docs/README.md#contracts-and-actors-architecture) +- [State diagrams](./docs/Statuses.md) +- [Storage diagram (Boost)](./docs/uml/storage-IexecPocoBoostDelegate.svg) +- [Nominal workflow sequence](./docs/README.md#nominal) +- [Nominal workflow sequence w/ TEE](./docs/README.md#nominaltee) +- [Boost workflow sequence](./docs/README.md#boost) +- UML classes related to: + - [IexecPocoDelegates](./docs/uml/class-uml-IexecPocoDelegates.svg) + - [IexecPocoBoostDelegate](./docs/uml/class-uml-IexecPocoBoostDelegate.svg) + - [IexecEscrows](./docs/uml/class-uml-IexecEscrows.svg) + - [iExec PoCo registries](./docs/uml/class-uml-dir-registries.svg) + - [iExec PoCo libraries](./docs/uml/class-uml-dir-libs.svg) + - [iExec PoCo modules](./docs/uml/class-uml-dir-modules.svg) ## Documentation -- [Full PoCo documentaion](https://docs.iex.ec/key-concepts/proof-of-contribution) +- [Solidity API documentation](./docs/solidity/index.md) +- [Full PoCo documentation](https://protocol.docs.iex.ec/key-concepts/proof-of-contribution) # How to? @@ -36,33 +45,33 @@ The configuration file is located in `./config/config.json`. It contains: - A list of categories created during the deployment process. Additional categories can be created by the contract administrator using the `createCategory` function. -- For each chainid, a quick configuration: +- For each chain id, a quick configuration: - **"asset":** can be "Token" or "Native", select which escrow to use. - **"token":** the address of the token to use. If asset is set to token, and no token address is provided, a mock will be deployed on the fly. - - **"etoken:"** the address of the enterprise token (with KYC) to use in the case of an enterprise deployment. If asset is set to token, and no etoken address is provider, an instance of the eRLC token (backed by the token described earlier) will automatically be deployed. - - **"v3":** a list of ressources from a previous (v3) deployment. This allows previous ressources to be automatically available. It also enables score transfer from v3 to v5. [optional] + - **"v3":** a list of resources from a previous (v3) deployment. This allows previous resources to be automatically available. It also enables score transfer from v3 to v5. [optional] - **"v5":** deployment parameters for the new version. If usefactory is set to true, and no salt is provided, `bytes32(0)` will be used by default. -If you want to deploy the iExec PoCo V5 smart contracts on a new blockchain, the recommanded process is to: +If you want to deploy the iExec PoCo V5 smart contracts on a new blockchain, the recommended process is to: 0. Edit the `./config/config.json` file as follows: -1. Create a new entry under "chains" with your chainid; +1. Create a new entry under "chains" with your chain id; 2. Set the asset type depending on your blockchain; 3. If you are using `"asset": "Token"`, provide the address of the token you want to use; -4. Unless you know what you are doing, leave all `"v3"` ressources to `Null`; +4. Unless you know what you are doing, leave all `"v3"` resources to `Null`; 5. Use the factory with the same salt as the other blockchains, and use the same wallet as previous deployments to have the same deployment address on this new blockchain. ## Additional configuration & environment variables -Environement variable can be used to alter the configuration of a deployment: -- **KYC**: if set, the `KYC` envvar will enable the kyc mechanism of the enterprise marketplace during migration and testing. This is only compatible with `asset="Token"`. -- **SALT**: if set, the `SALT` envvar will overwrite the salt parameter from the config. This can be usefull to distinguish public and enterprise deployment without modifying the config. +Environment variable can be used to alter the configuration of a deployment: +- **SALT**: if set, the `SALT` envvar will overwrite the salt parameter from the config. This can be useful to distinguish different deployments without modifying the config. + +Additionally, the migration process will look for some smart contracts before deploying new instances. This is true of the application, dataset and workerpool registries. Thus, if different marketplaces are deployed to the same network, they will share these registries. -Additionnaly, the migration process will look for some smartcontracts before deploying new instances. This is true of the application, dataset and workerpool registries. Thus, if both an enterprise and a public marketplace are deployed to the same network, they will share these registries. +# Development ## Build -The PoCo smart contracts are in the `./contracts` folder. Json artefacts, containing the contracts bytecode and ABI can be found in the `./build` folder. In case you need to regenerate them, you can use the following command: +The PoCo smart contracts are in the `./contracts` folder. Json artifacts, containing the contracts bytecode and ABI can be found in the `./build` folder. In case you need to regenerate them, you can use the following command: ``` npm install npm run build @@ -72,52 +81,83 @@ npm run build ### Automatic testing -The PoCo smart contracts come with a test suite in the `./test` folder. You can startup a sandbox blockchain and run the tests using the following command: +PoCo smart contracts come with a test suite in the `./test` folder. You can startup a sandbox blockchain and run the tests using the following command: ``` npm install -npm run autotest fast +npm run autotest ``` -Additionnaly, you can produce a coverage report using the following command: +Additionally, you can produce a coverage report using the following command: ``` npm run coverage ``` -The automatic testing command uses a `ganache-cli` blockchain instance to run the tests. You can also use your own blockchain endpoint to run these tests. +The automatic testing command uses the Hardhat network by default to run the tests. ### Testing on a custom blockchain -1. Start your blockchain. You can either use ganache with the following command: -``` -npx ganache -``` -or run any other blockchain client. -2. **[Optional]** If your blockchain listen to a port that is not 8545, or if the blockchain is on a different node, update the `./truffle.js` configuration accordingly (see the documentation [here](https://www.trufflesuite.com/docs/truffle/reference/configuration)). -3. Run the tests using: +1. Start a blockchain + - You can either use the Hardhat CLI with the following command: + ``` + npx hardhat node [] + ``` + - Or run any other blockchain client. +2. **[Optional]** Update the configuration + + If your blockchain listen to a port that is not 8545, or if the blockchain is on a different node, update the `hardhat.config.ts` configuration (network ports, accounts with mnemonic, ..) accordingly to the [Hardhat Configuration](https://hardhat.org/hardhat-runner/docs/config) documentation. +3. Run tests ``` npm run test ``` -or -``` -truffle test -``` ## Deploy -You can deploy the smart contracts according to the [3_deploy_contracts.js](./migrations/3_deploy_contracts.js) content. This will automatically save the addresses of the deployed artefacts to the `./build` folder. +You can deploy the smart contracts according to the [deploy/0_deploy.ts](./deploy/0_deploy.ts) content. This will automatically save some addresses of the deployed artifacts to the `./build` folder. To do so: 1. Make sure you followed the "Configure a deployment" section; -2. Enter your targeted blockchain parameters in `truffle.js` configuration file; +2. Enter your targeted blockchain parameters in `hardhat.config.ts` configuration file; 3. Run the deployment using: ``` -npm run migrate -- --network +npx hardhat deploy --network +``` + +Example of "complex" deployment: + +``` +SALT=0x0000000000000000000000000000000000000000000000000000000000000001 npx hardhat deploy --network hardhat +``` + +## Formatting + +Format a specific file or files in a directory: +``` +npm run format +``` + +## Render UML diagrams + +To render all UML diagrams: +``` +npm run uml +``` + +### Render only class diagrams + +``` +npm run sol-to-uml +``` + +### Render only .puml files + +``` +npm run puml-to-links ``` -Example of "complexe" deployment: +### Render only storage diagrams ``` -SALT=0x0000000000000000000000000000000000000000000000000000000000000001 KYC=1 npm run migrate -- --network goerli ---skip-dry-run +npm run storage-to-diagrams ``` diff --git a/autotest.sh b/autotest.sh deleted file mode 100755 index 74119c8f0..000000000 --- a/autotest.sh +++ /dev/null @@ -1,155 +0,0 @@ -#!/bin/bash - -trap catch INT - -GANACHE="./node_modules/.bin/ganache-cli" -TRUFFLE="./node_modules/.bin/truffle" - -function print_style -{ - if [ "$1" == "info" ]; then COLOR="96m"; - elif [ "$1" == "success" ]; then COLOR="92m"; - elif [ "$1" == "warning" ]; then COLOR="93m"; - elif [ "$1" == "danger" ]; then COLOR="91m"; - else COLOR="0m"; - fi - STARTCOLOR="\e[$COLOR"; - ENDCOLOR="\e[0m"; - printf "$STARTCOLOR%b$ENDCOLOR" "$2"; -} - -function initialize -{ - mkdir -p logs - # starting ganache - nohup $GANACHE >> logs/ganache.$date.log 2>&1& - GANACHE_PID=$! - print_style 'info' "Started ganache daemon (pid=$GANACHE_PID)\n" -} - -function finalize -{ - # stopping ganache - rm -f logs/ganache.$date.log - kill -9 $GANACHE_PID - print_style 'info' "Killed ganache daemon (pid=$GANACHE_PID)\n" -} - -function catch -{ - print_style 'warning' "\n*** Killing test suite ***\n" - if [[ $LAUNCH -ne 0 ]]; then finalize; fi - exit 1 -} - -function runCompile -{ - # compile contracts - logfile="logs/compile.$date.log" - printf "Compiling ... " - $TRUFFLE compile > $logfile 2>&1 - if [[ $? -ne 0 ]]; - then - print_style 'danger' "failure\n" - print_style 'danger' "Full report is available at $logfile\n" - catch - else - print_style 'success' "success\n" - rm -f $logfile - fi -} - -function runMigrate -{ - # try migrating contracts - logfile="logs/migrate.$date.log" - printf "Migrating ... " - $TRUFFLE migrate $PARAMS > $logfile 2>&1 - if [[ $? -ne 0 ]]; - then - print_style 'danger' "failure\n" - print_style 'danger' "Full report is available at $logfile\n" - catch - else - print_style 'success' "success\n" - rm -f $logfile - fi -} - -function runTests -{ - # running tests - if [[ $FAST -ne 0 ]]; - then - logfile="logs/fast.$date.log" - printf "Running tests ... " - $TRUFFLE test $PARAMS 2>&1 | tee $logfile - if [[ ${PIPESTATUS[0]} -ne 0 ]]; # use PIPESTATUS instead of $? which will contain tee exit code - then - print_style 'danger' "failure\n" - catch - else - print_style 'success' "success\n" - # rm -f $logfile - fi - else - for filepath in `find test/ -type f -name "*.js" -print | sort` - do - filename=$(basename $filepath) - logfile="logs/${filename%.*}.$date.log" - if [ "$CHECKPOINT" \> "$filename" ]; then continue; fi - printf "Starting test ${filepath%.*} ... " - $TRUFFLE test $filepath $PARAMS > $logfile 2>&1 - if [[ $? -ne 0 ]]; - then - print_style 'danger' "failure\n" - print_style 'danger' "Full report is available at $logfile\n" - catch - else - print_style 'success' "success\n" - # rm -f $logfile - fi - done - fi -} - -date=$(date --utc +"%Y-%m-%dT%H:%M:%S") - -FAST=0 -LAUNCH=1 -COMPILE=1 -DEPLOY=1 -CHECKPOINT="" -PARAMS="" - -while test $# -gt 0; do - case $1 in - fast) - FAST=1 - ;; - skip-launch) - LAUNCH=0 - ;; - skip-compile) - COMPILE=0 - ;; - skip-deploy) - DEPLOY=0 - ;; - checkpoint) - CHECKPOINT=$2 - shift - ;; - *) - PARAMS="$PARAMS $1" - ;; - esac - shift -done - -# MAIN -if [[ $LAUNCH -ne 0 ]]; then initialize; fi -if [[ $COMPILE -ne 0 ]]; then runCompile; fi -if [[ $DEPLOY -ne 0 ]]; then runMigrate; fi -runTests -if [[ $LAUNCH -ne 0 ]]; then finalize; fi diff --git a/build/contracts-min/ERLCSwap.json b/build/contracts-min/ERLCSwap.json deleted file mode 100644 index c2371c6dc..000000000 --- a/build/contracts-min/ERLCSwap.json +++ /dev/null @@ -1,1117 +0,0 @@ -{ - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlyingtoken", - "type": "address" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint256", - "name": "softcap", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "admins", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "kycadmins", - "type": "address[]" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "KYC_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "KYC_MEMBER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "approveAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "balanceOfAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "detectTransferRestriction", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - } - ], - "name": "grantKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isKYC", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "restrictionCode", - "type": "uint8" - } - ], - "name": "messageForTransferRestriction", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onTokenTransfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "receiveApproval", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "recover", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - } - ], - "name": "revokeKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "snapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "softCap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "softCapReached", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "totalSupplyAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "transferAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "underlyingToken", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "networks": { - "5": { - "events": { - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - "0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - "0x629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d34": { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } - }, - "links": {}, - "address": "0x381790F5602401F46C2a447355d84715d744f273", - "transactionHash": "0x34d51bd46d12e2c1af134347883b05724b8be455cf02977383ef02b2f2c8b4ba" - } - } -} diff --git a/build/contracts-min/ERLCTokenSwap.json b/build/contracts-min/ERLCTokenSwap.json deleted file mode 100644 index 42c61a992..000000000 --- a/build/contracts-min/ERLCTokenSwap.json +++ /dev/null @@ -1,1419 +0,0 @@ -{ - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlyingtoken", - "type": "address" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint256", - "name": "softcap", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "admins", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "kycadmins", - "type": "address[]" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "KYC_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "KYC_MEMBER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "approveAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "balanceOfAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "detectTransferRestriction", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - } - ], - "name": "grantKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isKYC", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "restrictionCode", - "type": "uint8" - } - ], - "name": "messageForTransferRestriction", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - } - ], - "name": "revokeKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "snapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "softCap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "softCapReached", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "totalSupplyAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "transferAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "underlyingToken", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "recover", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "receiveApproval", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onTokenTransfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "networks": { - "1": { - "events": { - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - "0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - "0x629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d34": { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } - }, - "links": {}, - "address": "0xA3B26327482312f70E077aAba62336f7643e41E1", - "transactionHash": "0x978c7b48dbf5830976c095929e8cfd65e9d657d46f526aea580981bf0de20a17" - }, - "5": { - "events": { - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - "0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - "0x629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d34": { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } - }, - "links": {}, - "address": "0xe8D9DB06F99536612c6B193E4C7347866B84C9d5", - "transactionHash": "0x2dc477812cbeed9ed49b1943952492d4c3684f699e81d4ddc5b43e677c103274" - }, - "1607418933360": { - "events": { - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - "0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - "0x629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d34": { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } - }, - "links": {}, - "address": "0x63e0E0F3e1628318572ECD2f5d5B91FDfdf10bd2", - "transactionHash": "0xa74d2f6b211c9cedc38a2b4501dcd5081852bf39f83a26f7b1205c060e313353" - } - } -} diff --git a/build/contracts-min/IERC20KYC.json b/build/contracts-min/IERC20KYC.json deleted file mode 100644 index d866defea..000000000 --- a/build/contracts-min/IERC20KYC.json +++ /dev/null @@ -1,473 +0,0 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldMinDeposit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMinDeposit", - "type": "uint256" - } - ], - "name": "MinDepositChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "approveAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "detectTransferRestriction", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "restrictionCode", - "type": "uint8" - } - ], - "name": "messageForTransferRestriction", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onTokenTransfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "receiveApproval", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "transferAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "setMinDeposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isKYC", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "name": "grantKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "name": "revokeKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "recover", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "networks": {} -} diff --git a/build/contracts-min/IKYC.json b/build/contracts-min/IKYC.json deleted file mode 100644 index 7c24fa611..000000000 --- a/build/contracts-min/IKYC.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "abi": [ - { - "inputs": [], - "name": "KYC_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "KYC_MEMBER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isKYC", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "name": "grantKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "name": "revokeKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "networks": {} -} diff --git a/build/contracts-min/IexecERC20CoreKYC.json b/build/contracts-min/IexecERC20CoreKYC.json deleted file mode 100644 index cbbc84369..000000000 --- a/build/contracts-min/IexecERC20CoreKYC.json +++ /dev/null @@ -1,195 +0,0 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "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": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "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" - } - ], - "networks": {} -} diff --git a/build/contracts-min/IexecERC20DelegateKYC.json b/build/contracts-min/IexecERC20DelegateKYC.json deleted file mode 100644 index 44d0a0236..000000000 --- a/build/contracts-min/IexecERC20DelegateKYC.json +++ /dev/null @@ -1,349 +0,0 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "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": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "approveAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "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": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "networks": {} -} diff --git a/build/contracts-min/IexecEscrowTokenDelegateKYC.json b/build/contracts-min/IexecEscrowTokenDelegateKYC.json deleted file mode 100644 index 1ad640680..000000000 --- a/build/contracts-min/IexecEscrowTokenDelegateKYC.json +++ /dev/null @@ -1,360 +0,0 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "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": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "depositFor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - } - ], - "name": "depositForArray", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "receiveApproval", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "recover", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "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": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "withdrawTo", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "networks": {} -} diff --git a/build/contracts-min/IexecPoco1DelegateKYC.json b/build/contracts-min/IexecPoco1DelegateKYC.json deleted file mode 100644 index f95e50b08..000000000 --- a/build/contracts-min/IexecPoco1DelegateKYC.json +++ /dev/null @@ -1,606 +0,0 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "dealid", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "appHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "datasetHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "workerpoolHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "requestHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "volume", - "type": "uint256" - } - ], - "name": "OrdersMatched", - "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": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "workerpool", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "dealid", - "type": "bytes32" - } - ], - "name": "SchedulerNotice", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "type": "event" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "app", - "type": "address" - }, - { - "internalType": "uint256", - "name": "appprice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "volume", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tag", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "datasetrestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "workerpoolrestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "requesterrestrict", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "sign", - "type": "bytes" - } - ], - "internalType": "struct IexecLibOrders_v5.AppOrder", - "name": "_apporder", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "dataset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "datasetprice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "volume", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tag", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "apprestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "workerpoolrestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "requesterrestrict", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "sign", - "type": "bytes" - } - ], - "internalType": "struct IexecLibOrders_v5.DatasetOrder", - "name": "_datasetorder", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "workerpool", - "type": "address" - }, - { - "internalType": "uint256", - "name": "workerpoolprice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "volume", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tag", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "category", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "trust", - "type": "uint256" - }, - { - "internalType": "address", - "name": "apprestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "datasetrestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "requesterrestrict", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "sign", - "type": "bytes" - } - ], - "internalType": "struct IexecLibOrders_v5.WorkerpoolOrder", - "name": "_workerpoolorder", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "app", - "type": "address" - }, - { - "internalType": "uint256", - "name": "appmaxprice", - "type": "uint256" - }, - { - "internalType": "address", - "name": "dataset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "datasetmaxprice", - "type": "uint256" - }, - { - "internalType": "address", - "name": "workerpool", - "type": "address" - }, - { - "internalType": "uint256", - "name": "workerpoolmaxprice", - "type": "uint256" - }, - { - "internalType": "address", - "name": "requester", - "type": "address" - }, - { - "internalType": "uint256", - "name": "volume", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tag", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "category", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "trust", - "type": "uint256" - }, - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { - "internalType": "address", - "name": "callback", - "type": "address" - }, - { - "internalType": "string", - "name": "params", - "type": "string" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "sign", - "type": "bytes" - } - ], - "internalType": "struct IexecLibOrders_v5.RequestOrder", - "name": "_requestorder", - "type": "tuple" - } - ], - "name": "matchOrders", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "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": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_identity", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_hash", - "type": "bytes32" - } - ], - "name": "verifyPresignature", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_identity", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_hash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_signature", - "type": "bytes" - } - ], - "name": "verifyPresignatureOrSignature", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_identity", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_hash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_signature", - "type": "bytes" - } - ], - "name": "verifySignature", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "networks": {} -} diff --git a/build/contracts-min/IexecPoco2DelegateKYC.json b/build/contracts-min/IexecPoco2DelegateKYC.json deleted file mode 100644 index 74dd5378c..000000000 --- a/build/contracts-min/IexecPoco2DelegateKYC.json +++ /dev/null @@ -1,605 +0,0 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "worker", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - } - ], - "name": "AccurateContribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "worker", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - } - ], - "name": "FaultyContribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "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": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - } - ], - "name": "TaskClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "consensus", - "type": "bytes32" - } - ], - "name": "TaskConsensus", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "worker", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "name": "TaskContribute", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "results", - "type": "bytes" - } - ], - "name": "TaskFinalize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "workerpool", - "type": "address" - } - ], - "name": "TaskInitialize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - } - ], - "name": "TaskReopen", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "worker", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "digest", - "type": "bytes32" - } - ], - "name": "TaskReveal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_taskid", - "type": "bytes32" - } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "_taskid", - "type": "bytes32[]" - } - ], - "name": "claimArray", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_taskid", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_resultHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_resultSeal", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "_enclaveChallenge", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_enclaveSign", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "_authorizationSign", - "type": "bytes" - } - ], - "name": "contribute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_taskid", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_resultDigest", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_results", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "_resultsCallback", - "type": "bytes" - }, - { - "internalType": "address", - "name": "_enclaveChallenge", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_enclaveSign", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "_authorizationSign", - "type": "bytes" - } - ], - "name": "contributeAndFinalize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_taskid", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_results", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "_resultsCallback", - "type": "bytes" - } - ], - "name": "finalize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_dealid", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "idx", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "_dealid", - "type": "bytes32[]" - }, - { - "internalType": "uint256[]", - "name": "_idx", - "type": "uint256[]" - } - ], - "name": "initializeAndClaimArray", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "_dealid", - "type": "bytes32[]" - }, - { - "internalType": "uint256[]", - "name": "_idx", - "type": "uint256[]" - } - ], - "name": "initializeArray", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "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": "_taskid", - "type": "bytes32" - } - ], - "name": "reopen", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_taskid", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_resultDigest", - "type": "bytes32" - } - ], - "name": "reveal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "networks": {} -} diff --git a/build/contracts/ERLCSwap.json b/build/contracts/ERLCSwap.json deleted file mode 100644 index c11519575..000000000 --- a/build/contracts/ERLCSwap.json +++ /dev/null @@ -1,7988 +0,0 @@ -{ - "contractName": "ERLCSwap", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlyingtoken", - "type": "address" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint256", - "name": "softcap", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "admins", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "kycadmins", - "type": "address[]" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "KYC_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "KYC_MEMBER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "approveAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "balanceOfAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "detectTransferRestriction", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - } - ], - "name": "grantKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isKYC", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "restrictionCode", - "type": "uint8" - } - ], - "name": "messageForTransferRestriction", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onTokenTransfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "receiveApproval", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "recover", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - } - ], - "name": "revokeKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "snapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "softCap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "softCapReached", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "totalSupplyAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "transferAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "underlyingToken", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x60c06040523480156200001157600080fd5b506040516200312538038062003125833981810160405260c08110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011157600080fd5b9083019060208201858111156200012757600080fd5b82516401000000008111828201881017156200014257600080fd5b82525081516020918201929091019080838360005b838110156200017157818101518382015260200162000157565b50505050905090810190601f1680156200019f5780820380516001836020036101000a031916815260200191505b50604081815260208301519201805192949193919284640100000000821115620001c857600080fd5b908301906020820185811115620001de57600080fd5b8251866020820283011164010000000082111715620001fc57600080fd5b82525081516020918201928201910280838360005b838110156200022b57818101518382015260200162000211565b50505050905001604052602001805160405193929190846401000000008211156200025557600080fd5b9083019060208201858111156200026b57600080fd5b82518660208202830111640100000000821117156200028957600080fd5b82525081516020918201928201910280838360005b83811015620002b85781810151838201526020016200029e565b50505050905001604052505050848484848482828287878160039080519060200190620002e792919062000604565b508051620002fd90600490602084019062000604565b50506005805460ff1916601217905550620003487fce55f595624c86c7e93aa4cf15cb4a958406550ae728a9b7ffda71a7d62eca736000805160206200310583398151915262000486565b60005b825181101562000387576200037e6000801b8483815181106200036a57fe5b6020026020010151620004d860201b60201c565b6001016200034b565b5060005b8151811015620003bf57620003b6600080516020620031058339815191528383815181106200036a57fe5b6001016200038b565b50505060805250506007805460ff191690555050506001600160601b0319606087901b1660a052604080517f313ce56700000000000000000000000000000000000000000000000000000000815290516200047a916001600160a01b0389169163313ce56791600480820192602092909190829003018186803b1580156200044657600080fd5b505afa1580156200045b573d6000803e3d6000fd5b505050506040513d60208110156200047257600080fd5b5051620004e8565b505050505050620006a0565b600082815260066020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526006602052604090912060020155565b620004e48282620004fe565b5050565b6005805460ff191660ff92909216919091179055565b6000828152600660209081526040909120620005259183906200176c62000579821b17901c565b15620004e4576200053562000599565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000590836001600160a01b0384166200059d565b90505b92915050565b3390565b6000620005ab8383620005ec565b620005e35750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000593565b50600062000593565b60009081526001919091016020526040902054151590565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200064757805160ff191683800117855562000677565b8280016001018555821562000677579182015b82811115620006775782518255916020019190600101906200065a565b506200068592915062000689565b5090565b5b808211156200068557600081556001016200068a565b60805160a05160601c612a1b620006ea60003980610b0d5280610c42528061106c528061134a52806115dd5280611bc35280611ed252508061111852806123835250612a1b6000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c80637f4ab1dd1161013b578063a457c2d7116100b8578063cae9ca511161007c578063cae9ca51146108c7578063ce7460241461094a578063d4ce141514610952578063d547741f14610988578063dd62ed3e146109b457610248565b8063a457c2d7146107b2578063a4c0ed36146107de578063a9059cbb14610861578063b6b55f251461088d578063ca15c873146108aa57610248565b806395d89b41116100ff57806395d89b41146107575780639711715a1461075f578063981b24d0146107675780639944f51814610784578063a217fddf146107aa57610248565b80637f4ab1dd146106535780638f4ffcb1146106735780639010d07c14610700578063906a26e01461072357806391d148541461072b57610248565b80632b9edee9116101c9578063395093511161018d57806339509351146104e45780634000aea0146105105780634a4e629c146105935780634ee2cd7e1461060157806370a082311461062d57610248565b80632b9edee9146104495780632e1a7d4d146104515780632f2ff15d1461046e578063313ce5671461049a57806336568abe146104b857610248565b806321c0b3421161021057806321c0b3421461039c57806323b872dd146103ca578063248a9ca3146104005780632495a5991461041d57806327e9083b1461044157610248565b806302d7fd921461024d57806306fdde0314610267578063095ea7b3146102e457806318160ddd1461032457806318f33caf1461032c575b600080fd5b6102556109e2565b60408051918252519081900360200190f35b61026f610a06565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102a9578181015183820152602001610291565b50505050905090810190601f1680156102d65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610310600480360360408110156102fa57600080fd5b506001600160a01b038135169060200135610a9c565b604080519115158252519081900360200190f35b610255610aba565b61039a6004803603602081101561034257600080fd5b810190602081018135600160201b81111561035c57600080fd5b82018360208201111561036e57600080fd5b803590602001918460208302840111600160201b8311171561038f57600080fd5b509092509050610ac0565b005b61039a600480360360408110156103b257600080fd5b506001600160a01b0381358116916020013516610b0b565b610310600480360360608110156103e057600080fd5b506001600160a01b03813581169160208101359091169060400135610ba0565b6102556004803603602081101561041657600080fd5b5035610c28565b610425610c40565b604080516001600160a01b039092168252519081900360200190f35b610255610c64565b610310610c76565b61039a6004803603602081101561046757600080fd5b5035610c7f565b61039a6004803603604081101561048457600080fd5b50803590602001356001600160a01b0316610ca4565b6104a2610d0c565b6040805160ff9092168252519081900360200190f35b61039a600480360360408110156104ce57600080fd5b50803590602001356001600160a01b0316610d15565b610310600480360360408110156104fa57600080fd5b506001600160a01b038135169060200135610d76565b6103106004803603606081101561052657600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561055557600080fd5b82018360208201111561056757600080fd5b803590602001918460018302840111600160201b8311171561058857600080fd5b509092509050610dc4565b61039a600480360360208110156105a957600080fd5b810190602081018135600160201b8111156105c357600080fd5b8201836020820111156105d557600080fd5b803590602001918460208302840111600160201b831117156105f657600080fd5b509092509050610eeb565b6102556004803603604081101561061757600080fd5b506001600160a01b038135169060200135610f31565b6102556004803603602081101561064357600080fd5b50356001600160a01b0316610f7a565b61026f6004803603602081101561066957600080fd5b503560ff16610f95565b6103106004803603608081101561068957600080fd5b6001600160a01b038235811692602081013592604082013590921691810190608081016060820135600160201b8111156106c257600080fd5b8201836020820111156106d457600080fd5b803590602001918460018302840111600160201b831117156106f557600080fd5b509092509050611068565b6104256004803603604081101561071657600080fd5b50803590602001356110fe565b610255611116565b6103106004803603604081101561074157600080fd5b50803590602001356001600160a01b031661113a565b61026f611152565b6102556111b3565b6102556004803603602081101561077d57600080fd5b503561128f565b6103106004803603602081101561079a57600080fd5b50356001600160a01b03166112bf565b6102556112d9565b610310600480360360408110156107c857600080fd5b506001600160a01b0381351690602001356112de565b610310600480360360608110156107f457600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561082357600080fd5b82018360208201111561083557600080fd5b803590602001918460018302840111600160201b8311171561085657600080fd5b509092509050611346565b6103106004803603604081101561087757600080fd5b506001600160a01b0381351690602001356113ce565b61039a600480360360208110156108a357600080fd5b50356113e2565b610255600480360360208110156108c057600080fd5b5035611404565b610310600480360360608110156108dd57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561090c57600080fd5b82018360208201111561091e57600080fd5b803590602001918460018302840111600160201b8311171561093f57600080fd5b50909250905061141b565b61039a611548565b6104a26004803603606081101561096857600080fd5b506001600160a01b03813581169160208101359091169060400135611686565b61039a6004803603604081101561099e57600080fd5b50803590602001356001600160a01b03166116e8565b610255600480360360408110156109ca57600080fd5b506001600160a01b0381358116916020013516611741565b7f811427a0fa4932aef534bba16bc34e9b7b2d7d2a79c475fca1765f6cc1faebea81565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a925780601f10610a6757610100808354040283529160200191610a92565b820191906000526020600020905b815481529060010190602001808311610a7557829003601f168201915b5050505050905090565b6000610ab0610aa9611781565b8484611785565b5060015b92915050565b60025490565b60005b81811015610b0657610afe6000805160206128e0833981519152848484818110610ae957fe5b905060200201356001600160a01b0316610ca4565b600101610ac3565b505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415610b92576040805162461bcd60e51b815260206004820152601d60248201527f63616e6e6f742d636c61696d2d756e6465726c79696e672d746f6b656e000000604482015290519081900360640190fd5b610b9c8282611871565b5050565b6000610bad848484611910565b610c1d84610bb9611781565b610c1885604051806060016040528060288152602001612900602891396001600160a01b038a16600090815260016020526040812090610bf7611781565b6001600160a01b031681526020810191909152604001600020549190611a6b565b611785565b5060015b9392505050565b6000818152600660205260409020600201545b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000805160206128e083398151915281565b60075460ff1681565b610c90610c8a611781565b82611ac5565b610ca1610c9b611781565b82611bc1565b50565b600082815260066020526040902060020154610cc790610cc2611781565b61113a565b610d025760405162461bcd60e51b815260040180806020018281038252602f815260200180612817602f913960400191505060405180910390fd5b610b9c8282611ca7565b60055460ff1690565b610d1d611781565b6001600160a01b0316816001600160a01b031614610d6c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806129b7602f913960400191505060405180910390fd5b610b9c8282611d10565b6000610ab0610d83611781565b84610c188560016000610d94611781565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611d79565b6000610dd085856113ce565b50846001600160a01b031663a4c0ed36610de8611781565b8686866040518563ffffffff1660e01b815260040180856001600160a01b03168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050602060405180830381600087803b158015610e6357600080fd5b505af1158015610e77573d6000803e3d6000fd5b505050506040513d6020811015610e8d57600080fd5b5051610ee0576040805162461bcd60e51b815260206004820152601c60248201527f7472616e736665722d726566757365642d62792d726563656976657200000000604482015290519081900360640190fd5b506001949350505050565b60005b81811015610b0657610f296000805160206128e0833981519152848484818110610f1457fe5b905060200201356001600160a01b03166116e8565b600101610eee565b6001600160a01b038216600090815260086020526040812081908190610f58908590611dd3565b9150915081610f6f57610f6a85610f7a565b610f71565b805b95945050505050565b6001600160a01b031660009081526020819052604090205490565b606060ff821660011415610fd5575060408051808201909152601581527453656e646572206973206d697373696e67204b594360581b6020820152610c3b565b60ff82166002141561101b575060408051808201909152601781527f5265636569766572206973206d697373696e67204b59430000000000000000006020820152610c3b565b6040805162461bcd60e51b815260206004820152601860248201527f696e76616c69642d7265737472696374696f6e2d636f64650000000000000000604482015290519081900360640190fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316146110de576040805162461bcd60e51b815260206004820152600b60248201526a3bb937b73396ba37b5b2b760a91b604482015290519081900360640190fd5b6110e88686611ed0565b6110f28686611fcb565b50600195945050505050565b6000828152600660205260408120610c219083611fd5565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000828152600660205260408120610c219083611fe1565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a925780601f10610a6757610100808354040283529160200191610a92565b6000806111be611781565b604051806040016040528060138152602001723932b9ba3934b1ba32b216ba3796b0b236b4b760691b8152506111f4838361113a565b819061127e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561124357818101518382015260200161122b565b50505050905090810190601f1680156112705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50611287611ff6565b935050505090565b600080600061129f846009611dd3565b91509150816112b5576112b0610aba565b6112b7565b805b949350505050565b6000610ab46000805160206128e08339815191528361113a565b600081565b6000610ab06112eb611781565b84610c18856040518060600160405280602581526020016129926025913960016000611315611781565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611a6b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661137a611781565b6001600160a01b0316146113c4576040805162461bcd60e51b815260206004820152600c60248201526b3bb937b73396b9b2b73232b960a11b604482015290519081900360640190fd5b610ee08585611fcb565b6000610ab06113db611781565b8484611910565b6113f36113ed611781565b82611ed0565b610ca16113fe611781565b82611fcb565b6000818152600660205260408120610ab49061204a565b60006114278585610a9c565b50846001600160a01b0316638f4ffcb161143f611781565b863087876040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001846001600160a01b03168152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050602060405180830381600087803b1580156114cb57600080fd5b505af11580156114df573d6000803e3d6000fd5b505050506040513d60208110156114f557600080fd5b5051610ee0576040805162461bcd60e51b815260206004820152601c60248201527f617070726f76616c2d726566757365642d62792d726563656976657200000000604482015290519081900360640190fd5b6000611552611781565b6040518060400160405280600a81526020016937b7363c96b0b236b4b760b11b81525061157f838361113a565b81906115cc5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561124357818101518382015260200161122b565b50610b066115d8611781565b6116817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561164857600080fd5b505afa15801561165c573d6000803e3d6000fd5b505050506040513d602081101561167257600080fd5b505161167c610aba565b612055565b611fcb565b60006001600160a01b038416158015906116a657506116a4846112bf565b155b156116b357506001610c21565b6001600160a01b038316158015906116d157506116cf836112bf565b155b156116de57506002610c21565b5060009392505050565b60008281526006602052604090206002015461170690610cc2611781565b610d6c5760405162461bcd60e51b81526004018080602001828103825260308152602001806128b06030913960400191505060405180910390fd5b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6000610c21836001600160a01b038416612097565b3390565b6001600160a01b0383166117ca5760405162461bcd60e51b815260040180806020018281038252602481526020018061296e6024913960400191505060405180910390fd5b6001600160a01b03821661180f5760405162461bcd60e51b81526004018080602001828103825260228152602001806128686022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600061187b611781565b604051806040016040528060138152602001723932b9ba3934b1ba32b216ba3796b0b236b4b760691b8152506118b1838361113a565b81906118fe5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561124357818101518382015260200161122b565b5061190985856120e1565b5050505050565b6001600160a01b0383166119555760405162461bcd60e51b81526004018080602001828103825260258152602001806129496025913960400191505060405180910390fd5b6001600160a01b03821661199a5760405162461bcd60e51b81526004018080602001828103825260238152602001806127f46023913960400191505060405180910390fd5b6119a5838383612299565b6119e28160405180606001604052806026815260200161288a602691396001600160a01b0386166000908152602081905260409020549190611a6b565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611a119082611d79565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611abd5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561124357818101518382015260200161122b565b505050900390565b6001600160a01b038216611b0a5760405162461bcd60e51b81526004018080602001828103825260218152602001806129286021913960400191505060405180910390fd5b611b1682600083612299565b611b5381604051806060016040528060228152602001612846602291396001600160a01b0385166000908152602081905260409020549190611a6b565b6001600160a01b038316600090815260208190526040902055600254611b799082612055565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611c3857600080fd5b505af1158015611c4c573d6000803e3d6000fd5b505050506040513d6020811015611c6257600080fd5b5051610b9c576040805162461bcd60e51b815260206004820152600f60248201526e3330b4b632b216ba3930b739b332b960891b604482015290519081900360640190fd5b6000828152600660205260409020611cbf908261176c565b15610b9c57611ccc611781565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152600660205260409020611d2890826122af565b15610b9c57611d35611781565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600082820183811015610c21576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008060008411611e24576040805162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b604482015290519081900360640190fd5b611e2e600b6122c4565b841115611e82576040805162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e74206964000000604482015290519081900360640190fd5b6000611e8e84866122c8565b8454909150811415611ea7576000809250925050611ec9565b6001846001018281548110611eb857fe5b906000526020600020015492509250505b9250929050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd8330846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b158015611f5857600080fd5b505af1158015611f6c573d6000803e3d6000fd5b505050506040513d6020811015611f8257600080fd5b5051610b9c576040805162461bcd60e51b81526020600482015260136024820152726661696c65642d7472616e7366657246726f6d60681b604482015290519081900360640190fd5b610b9c8282612369565b6000610c2183836123ec565b6000610c21836001600160a01b038416612450565b6000612002600b612468565b600061200e600b6122c4565b6040805182815290519192507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67919081900360200190a1905090565b6000610ab4826122c4565b6000610c2183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611a6b565b60006120a38383612450565b6120d957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ab4565b506000610ab4565b6001600160a01b038216612191576040516000906001600160a01b038316903031908381818185875af1925050503d806000811461213b576040519150601f19603f3d011682016040523d82523d6000602084013e612140565b606091505b505090508061218b576040805162461bcd60e51b81526020600482015260126024820152710cae4e4dee45ac6d8c2d2dad2dcce5acae8d60731b604482015290519081900360640190fd5b50610b9c565b816001600160a01b031663a9059cbb82846001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156121ee57600080fd5b505afa158015612202573d6000803e3d6000fd5b505050506040513d602081101561221857600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561226957600080fd5b505af115801561227d573d6000803e3d6000fd5b505050506040513d602081101561229357600080fd5b50505050565b6122a4838383612471565b610b068383836124c9565b6000610c21836001600160a01b03841661253c565b5490565b81546000906122d957506000610ab4565b82546000905b808210156123285760006122f38383612602565b90508486828154811061230257fe5b9060005260206000200154111561231b57809150612322565b8060010192505b506122df565b60008211801561235057508385600184038154811061234357fe5b9060005260206000200154145b156123615750600019019050610ab4565b509050610ab4565b6123738282612627565b60075460ff161580156123ad57507f00000000000000000000000000000000000000000000000000000000000000006123aa610aba565b10155b15610b9c576007805460ff191660011790556040517f629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d3490600090a15050565b8154600090821061242e5760405162461bcd60e51b81526004018080602001828103825260228152602001806127d26022913960400191505060405180910390fd5b82600001828154811061243d57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b80546001019055565b61247c8383836124c9565b6001600160a01b0383166124a05761249382612717565b61249b612741565b610b06565b6001600160a01b0382166124b75761249383612717565b6124c083612717565b610b0682612717565b60006124d6848484611686565b905060ff811615612531576124ea81610f95565b60405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561124357818101518382015260200161122b565b612293848484610b06565b600081815260018301602052604081205480156125f8578354600019808301919081019060009087908390811061256f57fe5b906000526020600020015490508087600001848154811061258c57fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806125bc57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610ab4565b6000915050610ab4565b6000600280830660028506018161261557fe5b04600283046002850401019392505050565b6001600160a01b038216612682576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61268e60008383612299565b60025461269b9082611d79565b6002556001600160a01b0382166000908152602081905260409020546126c19082611d79565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0381166000908152600860205260409020610ca19061273c83610f7a565b612750565b61274e600961273c610aba565b565b600061275c600b6122c4565b9050806127688461279c565b1015610b06578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b80546000906127ad57506000610c3b565b8154829060001981019081106127bf57fe5b90600052602060002001549050610c3b56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65ce55f595624c86c7e93aa4cf15cb4a958406550ae728a9b7ffda71a7d62eca7345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212201d430a1157cb975989dd0987283c3759e6da6b2efb3c9d7a10e0911bc337c71164736f6c634300060c0033811427a0fa4932aef534bba16bc34e9b7b2d7d2a79c475fca1765f6cc1faebea", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102485760003560e01c80637f4ab1dd1161013b578063a457c2d7116100b8578063cae9ca511161007c578063cae9ca51146108c7578063ce7460241461094a578063d4ce141514610952578063d547741f14610988578063dd62ed3e146109b457610248565b8063a457c2d7146107b2578063a4c0ed36146107de578063a9059cbb14610861578063b6b55f251461088d578063ca15c873146108aa57610248565b806395d89b41116100ff57806395d89b41146107575780639711715a1461075f578063981b24d0146107675780639944f51814610784578063a217fddf146107aa57610248565b80637f4ab1dd146106535780638f4ffcb1146106735780639010d07c14610700578063906a26e01461072357806391d148541461072b57610248565b80632b9edee9116101c9578063395093511161018d57806339509351146104e45780634000aea0146105105780634a4e629c146105935780634ee2cd7e1461060157806370a082311461062d57610248565b80632b9edee9146104495780632e1a7d4d146104515780632f2ff15d1461046e578063313ce5671461049a57806336568abe146104b857610248565b806321c0b3421161021057806321c0b3421461039c57806323b872dd146103ca578063248a9ca3146104005780632495a5991461041d57806327e9083b1461044157610248565b806302d7fd921461024d57806306fdde0314610267578063095ea7b3146102e457806318160ddd1461032457806318f33caf1461032c575b600080fd5b6102556109e2565b60408051918252519081900360200190f35b61026f610a06565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102a9578181015183820152602001610291565b50505050905090810190601f1680156102d65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610310600480360360408110156102fa57600080fd5b506001600160a01b038135169060200135610a9c565b604080519115158252519081900360200190f35b610255610aba565b61039a6004803603602081101561034257600080fd5b810190602081018135600160201b81111561035c57600080fd5b82018360208201111561036e57600080fd5b803590602001918460208302840111600160201b8311171561038f57600080fd5b509092509050610ac0565b005b61039a600480360360408110156103b257600080fd5b506001600160a01b0381358116916020013516610b0b565b610310600480360360608110156103e057600080fd5b506001600160a01b03813581169160208101359091169060400135610ba0565b6102556004803603602081101561041657600080fd5b5035610c28565b610425610c40565b604080516001600160a01b039092168252519081900360200190f35b610255610c64565b610310610c76565b61039a6004803603602081101561046757600080fd5b5035610c7f565b61039a6004803603604081101561048457600080fd5b50803590602001356001600160a01b0316610ca4565b6104a2610d0c565b6040805160ff9092168252519081900360200190f35b61039a600480360360408110156104ce57600080fd5b50803590602001356001600160a01b0316610d15565b610310600480360360408110156104fa57600080fd5b506001600160a01b038135169060200135610d76565b6103106004803603606081101561052657600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561055557600080fd5b82018360208201111561056757600080fd5b803590602001918460018302840111600160201b8311171561058857600080fd5b509092509050610dc4565b61039a600480360360208110156105a957600080fd5b810190602081018135600160201b8111156105c357600080fd5b8201836020820111156105d557600080fd5b803590602001918460208302840111600160201b831117156105f657600080fd5b509092509050610eeb565b6102556004803603604081101561061757600080fd5b506001600160a01b038135169060200135610f31565b6102556004803603602081101561064357600080fd5b50356001600160a01b0316610f7a565b61026f6004803603602081101561066957600080fd5b503560ff16610f95565b6103106004803603608081101561068957600080fd5b6001600160a01b038235811692602081013592604082013590921691810190608081016060820135600160201b8111156106c257600080fd5b8201836020820111156106d457600080fd5b803590602001918460018302840111600160201b831117156106f557600080fd5b509092509050611068565b6104256004803603604081101561071657600080fd5b50803590602001356110fe565b610255611116565b6103106004803603604081101561074157600080fd5b50803590602001356001600160a01b031661113a565b61026f611152565b6102556111b3565b6102556004803603602081101561077d57600080fd5b503561128f565b6103106004803603602081101561079a57600080fd5b50356001600160a01b03166112bf565b6102556112d9565b610310600480360360408110156107c857600080fd5b506001600160a01b0381351690602001356112de565b610310600480360360608110156107f457600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561082357600080fd5b82018360208201111561083557600080fd5b803590602001918460018302840111600160201b8311171561085657600080fd5b509092509050611346565b6103106004803603604081101561087757600080fd5b506001600160a01b0381351690602001356113ce565b61039a600480360360208110156108a357600080fd5b50356113e2565b610255600480360360208110156108c057600080fd5b5035611404565b610310600480360360608110156108dd57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561090c57600080fd5b82018360208201111561091e57600080fd5b803590602001918460018302840111600160201b8311171561093f57600080fd5b50909250905061141b565b61039a611548565b6104a26004803603606081101561096857600080fd5b506001600160a01b03813581169160208101359091169060400135611686565b61039a6004803603604081101561099e57600080fd5b50803590602001356001600160a01b03166116e8565b610255600480360360408110156109ca57600080fd5b506001600160a01b0381358116916020013516611741565b7f811427a0fa4932aef534bba16bc34e9b7b2d7d2a79c475fca1765f6cc1faebea81565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a925780601f10610a6757610100808354040283529160200191610a92565b820191906000526020600020905b815481529060010190602001808311610a7557829003601f168201915b5050505050905090565b6000610ab0610aa9611781565b8484611785565b5060015b92915050565b60025490565b60005b81811015610b0657610afe6000805160206128e0833981519152848484818110610ae957fe5b905060200201356001600160a01b0316610ca4565b600101610ac3565b505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161415610b92576040805162461bcd60e51b815260206004820152601d60248201527f63616e6e6f742d636c61696d2d756e6465726c79696e672d746f6b656e000000604482015290519081900360640190fd5b610b9c8282611871565b5050565b6000610bad848484611910565b610c1d84610bb9611781565b610c1885604051806060016040528060288152602001612900602891396001600160a01b038a16600090815260016020526040812090610bf7611781565b6001600160a01b031681526020810191909152604001600020549190611a6b565b611785565b5060015b9392505050565b6000818152600660205260409020600201545b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000805160206128e083398151915281565b60075460ff1681565b610c90610c8a611781565b82611ac5565b610ca1610c9b611781565b82611bc1565b50565b600082815260066020526040902060020154610cc790610cc2611781565b61113a565b610d025760405162461bcd60e51b815260040180806020018281038252602f815260200180612817602f913960400191505060405180910390fd5b610b9c8282611ca7565b60055460ff1690565b610d1d611781565b6001600160a01b0316816001600160a01b031614610d6c5760405162461bcd60e51b815260040180806020018281038252602f8152602001806129b7602f913960400191505060405180910390fd5b610b9c8282611d10565b6000610ab0610d83611781565b84610c188560016000610d94611781565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611d79565b6000610dd085856113ce565b50846001600160a01b031663a4c0ed36610de8611781565b8686866040518563ffffffff1660e01b815260040180856001600160a01b03168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050602060405180830381600087803b158015610e6357600080fd5b505af1158015610e77573d6000803e3d6000fd5b505050506040513d6020811015610e8d57600080fd5b5051610ee0576040805162461bcd60e51b815260206004820152601c60248201527f7472616e736665722d726566757365642d62792d726563656976657200000000604482015290519081900360640190fd5b506001949350505050565b60005b81811015610b0657610f296000805160206128e0833981519152848484818110610f1457fe5b905060200201356001600160a01b03166116e8565b600101610eee565b6001600160a01b038216600090815260086020526040812081908190610f58908590611dd3565b9150915081610f6f57610f6a85610f7a565b610f71565b805b95945050505050565b6001600160a01b031660009081526020819052604090205490565b606060ff821660011415610fd5575060408051808201909152601581527453656e646572206973206d697373696e67204b594360581b6020820152610c3b565b60ff82166002141561101b575060408051808201909152601781527f5265636569766572206973206d697373696e67204b59430000000000000000006020820152610c3b565b6040805162461bcd60e51b815260206004820152601860248201527f696e76616c69642d7265737472696374696f6e2d636f64650000000000000000604482015290519081900360640190fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316146110de576040805162461bcd60e51b815260206004820152600b60248201526a3bb937b73396ba37b5b2b760a91b604482015290519081900360640190fd5b6110e88686611ed0565b6110f28686611fcb565b50600195945050505050565b6000828152600660205260408120610c219083611fd5565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000828152600660205260408120610c219083611fe1565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a925780601f10610a6757610100808354040283529160200191610a92565b6000806111be611781565b604051806040016040528060138152602001723932b9ba3934b1ba32b216ba3796b0b236b4b760691b8152506111f4838361113a565b819061127e5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561124357818101518382015260200161122b565b50505050905090810190601f1680156112705780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50611287611ff6565b935050505090565b600080600061129f846009611dd3565b91509150816112b5576112b0610aba565b6112b7565b805b949350505050565b6000610ab46000805160206128e08339815191528361113a565b600081565b6000610ab06112eb611781565b84610c18856040518060600160405280602581526020016129926025913960016000611315611781565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611a6b565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661137a611781565b6001600160a01b0316146113c4576040805162461bcd60e51b815260206004820152600c60248201526b3bb937b73396b9b2b73232b960a11b604482015290519081900360640190fd5b610ee08585611fcb565b6000610ab06113db611781565b8484611910565b6113f36113ed611781565b82611ed0565b610ca16113fe611781565b82611fcb565b6000818152600660205260408120610ab49061204a565b60006114278585610a9c565b50846001600160a01b0316638f4ffcb161143f611781565b863087876040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001846001600160a01b03168152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050602060405180830381600087803b1580156114cb57600080fd5b505af11580156114df573d6000803e3d6000fd5b505050506040513d60208110156114f557600080fd5b5051610ee0576040805162461bcd60e51b815260206004820152601c60248201527f617070726f76616c2d726566757365642d62792d726563656976657200000000604482015290519081900360640190fd5b6000611552611781565b6040518060400160405280600a81526020016937b7363c96b0b236b4b760b11b81525061157f838361113a565b81906115cc5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561124357818101518382015260200161122b565b50610b066115d8611781565b6116817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561164857600080fd5b505afa15801561165c573d6000803e3d6000fd5b505050506040513d602081101561167257600080fd5b505161167c610aba565b612055565b611fcb565b60006001600160a01b038416158015906116a657506116a4846112bf565b155b156116b357506001610c21565b6001600160a01b038316158015906116d157506116cf836112bf565b155b156116de57506002610c21565b5060009392505050565b60008281526006602052604090206002015461170690610cc2611781565b610d6c5760405162461bcd60e51b81526004018080602001828103825260308152602001806128b06030913960400191505060405180910390fd5b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6000610c21836001600160a01b038416612097565b3390565b6001600160a01b0383166117ca5760405162461bcd60e51b815260040180806020018281038252602481526020018061296e6024913960400191505060405180910390fd5b6001600160a01b03821661180f5760405162461bcd60e51b81526004018080602001828103825260228152602001806128686022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600061187b611781565b604051806040016040528060138152602001723932b9ba3934b1ba32b216ba3796b0b236b4b760691b8152506118b1838361113a565b81906118fe5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561124357818101518382015260200161122b565b5061190985856120e1565b5050505050565b6001600160a01b0383166119555760405162461bcd60e51b81526004018080602001828103825260258152602001806129496025913960400191505060405180910390fd5b6001600160a01b03821661199a5760405162461bcd60e51b81526004018080602001828103825260238152602001806127f46023913960400191505060405180910390fd5b6119a5838383612299565b6119e28160405180606001604052806026815260200161288a602691396001600160a01b0386166000908152602081905260409020549190611a6b565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611a119082611d79565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611abd5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561124357818101518382015260200161122b565b505050900390565b6001600160a01b038216611b0a5760405162461bcd60e51b81526004018080602001828103825260218152602001806129286021913960400191505060405180910390fd5b611b1682600083612299565b611b5381604051806060016040528060228152602001612846602291396001600160a01b0385166000908152602081905260409020549190611a6b565b6001600160a01b038316600090815260208190526040902055600254611b799082612055565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611c3857600080fd5b505af1158015611c4c573d6000803e3d6000fd5b505050506040513d6020811015611c6257600080fd5b5051610b9c576040805162461bcd60e51b815260206004820152600f60248201526e3330b4b632b216ba3930b739b332b960891b604482015290519081900360640190fd5b6000828152600660205260409020611cbf908261176c565b15610b9c57611ccc611781565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152600660205260409020611d2890826122af565b15610b9c57611d35611781565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600082820183811015610c21576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008060008411611e24576040805162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b604482015290519081900360640190fd5b611e2e600b6122c4565b841115611e82576040805162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e74206964000000604482015290519081900360640190fd5b6000611e8e84866122c8565b8454909150811415611ea7576000809250925050611ec9565b6001846001018281548110611eb857fe5b906000526020600020015492509250505b9250929050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd8330846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b158015611f5857600080fd5b505af1158015611f6c573d6000803e3d6000fd5b505050506040513d6020811015611f8257600080fd5b5051610b9c576040805162461bcd60e51b81526020600482015260136024820152726661696c65642d7472616e7366657246726f6d60681b604482015290519081900360640190fd5b610b9c8282612369565b6000610c2183836123ec565b6000610c21836001600160a01b038416612450565b6000612002600b612468565b600061200e600b6122c4565b6040805182815290519192507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67919081900360200190a1905090565b6000610ab4826122c4565b6000610c2183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611a6b565b60006120a38383612450565b6120d957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ab4565b506000610ab4565b6001600160a01b038216612191576040516000906001600160a01b038316903031908381818185875af1925050503d806000811461213b576040519150601f19603f3d011682016040523d82523d6000602084013e612140565b606091505b505090508061218b576040805162461bcd60e51b81526020600482015260126024820152710cae4e4dee45ac6d8c2d2dad2dcce5acae8d60731b604482015290519081900360640190fd5b50610b9c565b816001600160a01b031663a9059cbb82846001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156121ee57600080fd5b505afa158015612202573d6000803e3d6000fd5b505050506040513d602081101561221857600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b15801561226957600080fd5b505af115801561227d573d6000803e3d6000fd5b505050506040513d602081101561229357600080fd5b50505050565b6122a4838383612471565b610b068383836124c9565b6000610c21836001600160a01b03841661253c565b5490565b81546000906122d957506000610ab4565b82546000905b808210156123285760006122f38383612602565b90508486828154811061230257fe5b9060005260206000200154111561231b57809150612322565b8060010192505b506122df565b60008211801561235057508385600184038154811061234357fe5b9060005260206000200154145b156123615750600019019050610ab4565b509050610ab4565b6123738282612627565b60075460ff161580156123ad57507f00000000000000000000000000000000000000000000000000000000000000006123aa610aba565b10155b15610b9c576007805460ff191660011790556040517f629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d3490600090a15050565b8154600090821061242e5760405162461bcd60e51b81526004018080602001828103825260228152602001806127d26022913960400191505060405180910390fd5b82600001828154811061243d57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b80546001019055565b61247c8383836124c9565b6001600160a01b0383166124a05761249382612717565b61249b612741565b610b06565b6001600160a01b0382166124b75761249383612717565b6124c083612717565b610b0682612717565b60006124d6848484611686565b905060ff811615612531576124ea81610f95565b60405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561124357818101518382015260200161122b565b612293848484610b06565b600081815260018301602052604081205480156125f8578354600019808301919081019060009087908390811061256f57fe5b906000526020600020015490508087600001848154811061258c57fe5b6000918252602080832090910192909255828152600189810190925260409020908401905586548790806125bc57fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610ab4565b6000915050610ab4565b6000600280830660028506018161261557fe5b04600283046002850401019392505050565b6001600160a01b038216612682576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61268e60008383612299565b60025461269b9082611d79565b6002556001600160a01b0382166000908152602081905260409020546126c19082611d79565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0381166000908152600860205260409020610ca19061273c83610f7a565b612750565b61274e600961273c610aba565b565b600061275c600b6122c4565b9050806127688461279c565b1015610b06578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b80546000906127ad57506000610c3b565b8154829060001981019081106127bf57fe5b90600052602060002001549050610c3b56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65ce55f595624c86c7e93aa4cf15cb4a958406550ae728a9b7ffda71a7d62eca7345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212201d430a1157cb975989dd0987283c3759e6da6b2efb3c9d7a10e0911bc337c71164736f6c634300060c0033", - "sourceMap": "1325:2779:17:-:0;;;1420:405;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1420:405:17;;;;;;;;;;-1:-1:-1;1420:405:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1420:405:17;;;;;;;;;;-1:-1:-1;1420:405:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1420:405:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1420:405:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1420:405:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1662:4;1668:6;1676:7;1685:6;1693:9;1703:7:15;1720:6;1728:9;1672:4;1678:6;2093:4:4;2085:5;:12;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2107:16:4;;;;:7;;:16;;;;;:::i;:::-;-1:-1:-1;;2133:9:4;:14;;-1:-1:-1;;2133:14:4;2145:2;2133:14;;;-1:-1:-1;1821:46:18;1546:28;-1:-1:-1;;;;;;;;;;;1821:13:18;:46::i;:::-;1882:9;1877:118;1901:6;:13;1897:1;:17;1877:118;;;1943:41;1762:4:1;1954:18:18;;1974:6;1981:1;1974:9;;;;;;;;;;;;;;1943:10;;;:41;;:::i;:::-;1916:3;;1877:118;;;;2009:9;2004:120;2028:9;:16;2024:1;:20;2004:120;;;2073:40;-1:-1:-1;;;;;;;;;;;2100:9:18;2110:1;2100:12;;;;;;;2073:40;2046:3;;2004:120;;;-1:-1:-1;;;1530:24:13;;-1:-1:-1;;1564:14:13;:22;;-1:-1:-1;;1564:22:13;;;-1:-1:-1;;;;;;;;;1718:41:17::1;::::0;;;;::::1;::::0;1784:33:::1;::::0;;;;;;;1769:49:::1;::::0;-1:-1:-1;;;;;1718:41:17;::::1;::::0;1784:31:::1;::::0;:33:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;1718:41;1784:33;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;1784:33:17;1769:14:::1;:49::i;:::-;1420:405:::0;;;;;;1325:2779;;6813:196:1;6924:12;;;;:6;:12;;;;;;:22;;;6901:57;;6948:9;;6931:4;;6901:57;;6924:12;6901:57;6968:12;;;;:6;:12;;;;;;:22;;:34;6813:196::o;6578:110::-;6656:25;6667:4;6673:7;6656:10;:25::i;:::-;6578:110;;:::o;10020:88:4:-;10080:9;:21;;-1:-1:-1;;10080:21:4;;;;;;;;;;;;10020:88::o;7015:184:1:-;7088:12;;;;:6;:12;;;;;;;;:33;;7113:7;;7088:24;;;;;:33;;:::i;:::-;7084:109;;;7169:12;:10;:12::i;:::-;-1:-1:-1;;;;;7142:40:1;7160:7;-1:-1:-1;;;;;7142:40:1;7154:4;7142:40;;;;;;;;;;7015:184;;:::o;4864:141:10:-;4934:4;4957:41;4962:3;-1:-1:-1;;;;;4982:14:10;;4957:4;:41::i;:::-;4950:48;;4864:141;;;;;:::o;590:104:0:-;677:10;590:104;:::o;1611:404:10:-;1674:4;1695:21;1705:3;1710:5;1695:9;:21::i;:::-;1690:319;;-1:-1:-1;1732:23:10;;;;;;;;:11;:23;;;;;;;;;;;;;1912:18;;1890:19;;;:12;;;:19;;;;;;:40;;;;1944:11;;1690:319;-1:-1:-1;1993:5:10;1986:12;;3776:127;3849:4;3872:19;;;:12;;;;;:19;;;;;;:24;;;3776:127::o;1325:2779:17:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1325:2779:17;;;-1:-1:-1;1325:2779:17;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "1325:2779:17:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1411:78:18;;;:::i;:::-;;;;;;;;;;;;;;;;2219:81:4;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4255:166;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4255:166:4;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;3262:98;;;:::i;2275:215:18:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2275:215:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2275:215:18;;;;;;;;;;-1:-1:-1;2275:215:18;;-1:-1:-1;2275:215:18;-1:-1:-1;2275:215:18;:::i;:::-;;2555:198:17;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2555:198:17;;;;;;;;;;:::i;4881:317:4:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4881:317:4;;;;;;;;;;;;;;;;;:::i;4272:112:1:-;;;;;;;;;;;;;;;;-1:-1:-1;4272:112:1;;:::i;1374:39:17:-;;;:::i;:::-;;;;-1:-1:-1;;;;;1374:39:17;;;;;;;;;;;;;;1495:79:18;;;:::i;1409:29:13:-;;;:::i;2207:134:17:-;;;;;;;;;;;;;;;;-1:-1:-1;2207:134:17;;:::i;4634:223:1:-;;;;;;;;;;;;;;;;-1:-1:-1;4634:223:1;;;;;;-1:-1:-1;;;;;4634:223:1;;:::i;3121:81:4:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5808:205:1;;;;;;;;;;;;;;;;-1:-1:-1;5808:205:1;;;;;;-1:-1:-1;;;;;5808:205:1;;:::i;5593:215:4:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5593:215:4;;;;;;;;:::i;1748:313:14:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1748:313:14;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1748:313:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1748:313:14;;;;;;;;;;-1:-1:-1;1748:313:14;;-1:-1:-1;1748:313:14;-1:-1:-1;1748:313:14;:::i;2496:217:18:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2496:217:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2496:217:18;;;;;;;;;;-1:-1:-1;2496:217:18;;-1:-1:-1;2496:217:18;-1:-1:-1;2496:217:18;:::i;4277:254:5:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4277:254:5;;;;;;;;:::i;3418:117:4:-;;;;;;;;;;;;;;;;-1:-1:-1;3418:117:4;-1:-1:-1;;;;;3418:117:4;;:::i;2236:418:12:-;;;;;;;;;;;;;;;;-1:-1:-1;2236:418:12;;;;:::i;2997:287:17:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2997:287:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2997:287:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2997:287:17;;;;;;;;;;-1:-1:-1;2997:287:17;;-1:-1:-1;2997:287:17;-1:-1:-1;2997:287:17;:::i;3955:136:1:-;;;;;;;;;;;;;;;;-1:-1:-1;3955:136:1;;;;;;;:::i;1371:32:13:-;;;:::i;2940:137:1:-;;;;;;;;;;;;;;;;-1:-1:-1;2940:137:1;;;;;;-1:-1:-1;;;;;2940:137:1;;:::i;2413:85:4:-;;;:::i;2164:170:15:-;;;:::i;4630:221:5:-;;;;;;;;;;;;;;;;-1:-1:-1;4630:221:5;;:::i;2136:133:18:-;;;;;;;;;;;;;;;;-1:-1:-1;2136:133:18;-1:-1:-1;;;;;2136:133:18;;:::i;1717:49:1:-;;;:::i;6295:266:4:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6295:266:4;;;;;;;;:::i;3290:246:17:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3290:246:17;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3290:246:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3290:246:17;;;;;;;;;;-1:-1:-1;3290:246:17;;-1:-1:-1;3290:246:17;-1:-1:-1;3290:246:17;:::i;3738:172:4:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3738:172:4;;;;;;;;:::i;2069:132:17:-;;;;;;;;;;;;;;;;-1:-1:-1;2069:132:17;;:::i;3245:125:1:-;;;;;;;;;;;;;;;;-1:-1:-1;3245:125:1;;:::i;1409:333:14:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1409:333:14;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1409:333:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1409:333:14;;;;;;;;;;-1:-1:-1;1409:333:14;;-1:-1:-1;1409:333:14;-1:-1:-1;1409:333:14;:::i;2347:202:17:-;;;:::i;1657:573:12:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1657:573:12;;;;;;;;;;;;;;;;;:::i;5091:226:1:-;;;;;;;;;;;;;;;;-1:-1:-1;5091:226:1;;;;;;-1:-1:-1;;;;;5091:226:1;;:::i;3968:149:4:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3968:149:4;;;;;;;;;;:::i;1411:78:18:-;1462:27;1411:78;:::o;2219:81:4:-;2288:5;2281:12;;;;;;;;-1:-1:-1;;2281:12:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2256:13;;2281:12;;2288:5;;2281:12;;2288:5;2281:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2219:81;:::o;4255:166::-;4338:4;4354:39;4363:12;:10;:12::i;:::-;4377:7;4386:6;4354:8;:39::i;:::-;-1:-1:-1;4410:4:4;4255:166;;;;;:::o;3262:98::-;3341:12;;3262:98;:::o;2275:215:18:-;2371:9;2366:118;2386:19;;;2366:118;;;2434:39;-1:-1:-1;;;;;;;;;;;2461:8:18;;2470:1;2461:11;;;;;;;;;;;;;-1:-1:-1;;;;;2461:11:18;2434:9;:39::i;:::-;2407:3;;2366:118;;;;2275:215;;:::o;2555:198:17:-;2664:15;-1:-1:-1;;;;;2647:33:17;:5;-1:-1:-1;;;;;2647:33:17;;;2639:75;;;;;-1:-1:-1;;;2639:75:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;2724:22;2736:5;2743:2;2724:11;:22::i;:::-;2555:198;;:::o;4881:317:4:-;4987:4;5003:36;5013:6;5021:9;5032:6;5003:9;:36::i;:::-;5049:121;5058:6;5066:12;:10;:12::i;:::-;5080:89;5118:6;5080:89;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5080:19:4;;;;;;:11;:19;;;;;;5100:12;:10;:12::i;:::-;-1:-1:-1;;;;;5080:33:4;;;;;;;;;;;;-1:-1:-1;5080:33:4;;;:89;:37;:89::i;:::-;5049:8;:121::i;:::-;-1:-1:-1;5187:4:4;4881:317;;;;;;:::o;4272:112:1:-;4329:7;4355:12;;;:6;:12;;;;;:22;;;4272:112;;;;:::o;1374:39:17:-;;;:::o;1495:79:18:-;-1:-1:-1;;;;;;;;;;;1495:79:18;:::o;1409:29:13:-;;;;;;:::o;2207:134:17:-;2266:27;2272:12;:10;:12::i;:::-;2286:6;2266:5;:27::i;:::-;2303:31;2313:12;:10;:12::i;:::-;2327:6;2303:9;:31::i;:::-;2207:134;:::o;4634:223:1:-;4725:12;;;;:6;:12;;;;;:22;;;4717:45;;4749:12;:10;:12::i;:::-;4717:7;:45::i;:::-;4709:105;;;;-1:-1:-1;;;4709:105:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4825:25;4836:4;4842:7;4825:10;:25::i;3121:81:4:-;3186:9;;;;3121:81;:::o;5808:205:1:-;5905:12;:10;:12::i;:::-;-1:-1:-1;;;;;5894:23:1;:7;-1:-1:-1;;;;;5894:23:1;;5886:83;;;;-1:-1:-1;;;5886:83:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5980:26;5992:4;5998:7;5980:11;:26::i;5593:215:4:-;5681:4;5697:83;5706:12;:10;:12::i;:::-;5720:7;5729:50;5768:10;5729:11;:25;5741:12;:10;:12::i;:::-;-1:-1:-1;;;;;5729:25:4;;;;;;;;;;;;;;;;;-1:-1:-1;5729:25:4;;;:34;;;;;;;;;;;:38;:50::i;1748:313:14:-;1867:4;1887:26;1896:8;1906:6;1887:8;:26::i;:::-;;1947:8;-1:-1:-1;;;;;1931:41:14;;1973:12;:10;:12::i;:::-;1987:6;1995:4;;1931:69;;;;;;;;;;;;;-1:-1:-1;;;;;1931:69:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1931:69:14;1923:110;;;;;-1:-1:-1;;;1923:110:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2050:4:14;1748:313;;;;;;:::o;2496:217:18:-;2593:9;2588:119;2608:19;;;2588:119;;;2656:40;-1:-1:-1;;;;;;;;;;;2684:8:18;;2693:1;2684:11;;;;;;;;;;;;;-1:-1:-1;;;;;2684:11:18;2656:10;:40::i;:::-;2629:3;;2588:119;;4277:254:5;-1:-1:-1;;;;;4432:33:5;;4356:7;4432:33;;;:24;:33;;;;;4356:7;;;;4411:55;;4420:10;;4411:8;:55::i;:::-;4375:91;;;;4484:11;:40;;4506:18;4516:7;4506:9;:18::i;:::-;4484:40;;;4498:5;4484:40;4477:47;4277:254;-1:-1:-1;;;;;4277:254:5:o;3418:117:4:-;-1:-1:-1;;;;;3510:18:4;3484:7;3510:18;;;;;;;;;;;;3418:117::o;2236:418:12:-;2332:13;2365:48;;;1572:4;2365:48;2361:117;;;-1:-1:-1;2437:30:12;;;;;;;;;;;;-1:-1:-1;;;2437:30:12;;;;;;2361:117;2491:46;;;1645:4;2491:46;2487:117;;;-1:-1:-1;2561:32:12;;;;;;;;;;;;;;;;;;;2487:117;2613:34;;;-1:-1:-1;;;2613:34:12;;;;;;;;;;;;;;;;;;;;;;;;;;;2997:287:17;3114:4;3159:15;-1:-1:-1;;;;;3142:33:17;:5;-1:-1:-1;;;;;3142:33:17;;3134:57;;;;;-1:-1:-1;;;3134:57:17;;;;;;;;;;;;-1:-1:-1;;;3134:57:17;;;;;;;;;;;;;;;3201:24;3210:6;3218;3201:8;:24::i;:::-;3235:21;3241:6;3249;3235:5;:21::i;:::-;-1:-1:-1;3273:4:17;2997:287;;;;;;;:::o;3955:136:1:-;4028:7;4054:12;;;:6;:12;;;;;:30;;4078:5;4054:23;:30::i;1371:32:13:-;;;:::o;2940:137:1:-;3009:4;3032:12;;;:6;:12;;;;;:38;;3062:7;3032:29;:38::i;2413:85:4:-;2484:7;2477:14;;;;;;;;-1:-1:-1;;2477:14:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2452:13;;2477:14;;2484:7;;2477:14;;2484:7;2477:14;;;;;;;;;;;;;;;;;;;;;;;;2164:170:15;2286:7;;2236:12;:10;:12::i;:::-;1581:142:18;;;;;;;;;;;;;-1:-1:-1;;;1581:142:18;;;1674:21;1682:4;1688:6;1674:7;:21::i;:::-;1697:7;1666:39;;;;;-1:-1:-1;;;1666:39:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2316:11:15::1;:9;:11::i;:::-;2309:18;;2164:170:::0;;;;:::o;4630:221:5:-;4693:7;4713:16;4731:13;4748:43;4757:10;4769:21;4748:8;:43::i;:::-;4712:79;;;;4809:11;:35;;4831:13;:11;:13::i;:::-;4809:35;;;4823:5;4809:35;4802:42;4630:221;-1:-1:-1;;;;4630:221:5:o;2136:133:18:-;2202:4;2229:33;-1:-1:-1;;;;;;;;;;;2254:7:18;2229;:33::i;1717:49:1:-;1762:4;1717:49;:::o;6295:266:4:-;6388:4;6404:129;6413:12;:10;:12::i;:::-;6427:7;6436:96;6475:15;6436:96;;;;;;;;;;;;;;;;;:11;:25;6448:12;:10;:12::i;:::-;-1:-1:-1;;;;;6436:25:4;;;;;;;;;;;;;;;;;-1:-1:-1;6436:25:4;;;:34;;;;;;;;;;;:96;:38;:96::i;3290:246:17:-;3392:4;3444:15;-1:-1:-1;;;;;3420:40:17;:12;:10;:12::i;:::-;-1:-1:-1;;;;;3420:40:17;;3412:65;;;;;-1:-1:-1;;;3412:65:17;;;;;;;;;;;;-1:-1:-1;;;3412:65:17;;;;;;;;;;;;;;;3487:21;3493:6;3501;3487:5;:21::i;3738:172:4:-;3824:4;3840:42;3850:12;:10;:12::i;:::-;3864:9;3875:6;3840:9;:42::i;2069:132:17:-;2127:30;2136:12;:10;:12::i;:::-;2150:6;2127:8;:30::i;:::-;2167:27;2173:12;:10;:12::i;:::-;2187:6;2167:5;:27::i;3245:125:1:-;3308:7;3334:12;;;:6;:12;;;;;:29;;:27;:29::i;1409:333:14:-;1531:4;1551:24;1559:7;1568:6;1551:7;:24::i;:::-;;1609:7;-1:-1:-1;;;;;1593:40:14;;1634:12;:10;:12::i;:::-;1648:6;1664:4;1671:9;;1593:88;;;;;;;;;;;;;-1:-1:-1;;;;;1593:88:14;;;;;;;;;;;-1:-1:-1;;;;;1593:88:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1593:88:14;1585:129;;;;;-1:-1:-1;;;1585:129:14;;;;;;;;;;;;;;;;;;;;;;;;;;;2347:202:17;1762:4:1;2410:12:17;:10;:12::i;:::-;1581:142:18;;;;;;;;;;;;;-1:-1:-1;;;1581:142:18;;;1674:21;1682:4;1688:6;1674:7;:21::i;:::-;1697:7;1666:39;;;;;-1:-1:-1;;;1666:39:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2452:90:17::1;2458:12;:10;:12::i;:::-;2472:69;2485:15;-1:-1:-1::0;;;;;2485:25:17::1;;2519:4;2485:40;;;;;;;;;;;;;-1:-1:-1::0;;;;;2485:40:17::1;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;2485:40:17;2527:13:::1;:11;:13::i;:::-;2472:12;:69::i;:::-;2452:5;:90::i;1657:573:12:-:0;1761:5;-1:-1:-1;;;;;1927:18:12;;;;;;:34;;;1950:11;1956:4;1950:5;:11::i;:::-;1949:12;1927:34;1923:109;;;-1:-1:-1;1572:4:12;1985:36;;1923:109;-1:-1:-1;;;;;2093:16:12;;;;;;:30;;;2114:9;2120:2;2114:5;:9::i;:::-;2113:10;2093:30;2089:103;;;-1:-1:-1;1645:4:12;2147:34;;2089:103;-1:-1:-1;1502:1:12;1657:573;;;;;:::o;5091:226:1:-;5183:12;;;;:6;:12;;;;;:22;;;5175:45;;5207:12;:10;:12::i;5175:45::-;5167:106;;;;-1:-1:-1;;;5167:106:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3968:149:4;-1:-1:-1;;;;;4083:18:4;;;4057:7;4083:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3968:149::o;4864:141:10:-;4934:4;4957:41;4962:3;-1:-1:-1;;;;;4982:14:10;;4957:4;:41::i;590:104:0:-;677:10;590:104;:::o;9357:340:4:-;-1:-1:-1;;;;;9458:19:4;;9450:68;;;;-1:-1:-1;;;9450:68:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9536:21:4;;9528:68;;;;-1:-1:-1;;;9528:68:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9607:18:4;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;9658:32;;;;;;;;;;;;;;;;;9357:340;;;:::o;1989:169:15:-;1762:4:1;2083:12:15;:10;:12::i;:::-;1581:142:18;;;;;;;;;;;;;-1:-1:-1;;;1581:142:18;;;1674:21;1682:4;1688:6;1674:7;:21::i;:::-;1697:7;1666:39;;;;;-1:-1:-1;;;1666:39:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2134:17:15::1;2141:5;2148:2;2134:6;:17::i;:::-;1989:169:::0;;;;;:::o;7035:530:4:-;-1:-1:-1;;;;;7140:20:4;;7132:70;;;;-1:-1:-1;;;7132:70:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7220:23:4;;7212:71;;;;-1:-1:-1;;;7212:71:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7294:47;7315:6;7323:9;7334:6;7294:20;:47::i;:::-;7372:71;7394:6;7372:71;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7372:17:4;;:9;:17;;;;;;;;;;;;:71;:21;:71::i;:::-;-1:-1:-1;;;;;7352:17:4;;;:9;:17;;;;;;;;;;;:91;;;;7476:20;;;;;;;:32;;7501:6;7476:24;:32::i;:::-;-1:-1:-1;;;;;7453:20:4;;;:9;:20;;;;;;;;;;;;:55;;;;7523:35;;;;;;;7453:20;;7523:35;;;;;;;;;;;;;7035:530;;;:::o;1746:187:3:-;1832:7;1867:12;1859:6;;;;1851:29;;;;-1:-1:-1;;;1851:29:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1902:5:3;;;1746:187::o;8524:410:4:-;-1:-1:-1;;;;;8607:21:4;;8599:67;;;;-1:-1:-1;;;8599:67:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8677:49;8698:7;8715:1;8719:6;8677:20;:49::i;:::-;8758:68;8781:6;8758:68;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8758:18:4;;:9;:18;;;;;;;;;;;;:68;:22;:68::i;:::-;-1:-1:-1;;;;;8737:18:4;;:9;:18;;;;;;;;;;:89;8851:12;;:24;;8868:6;8851:16;:24::i;:::-;8836:12;:39;8890:37;;;;;;;;8916:1;;-1:-1:-1;;;;;8890:37:4;;;;;;;;;;;;8524:410;;:::o;3957:145:17:-;4039:15;-1:-1:-1;;;;;4039:24:17;;4064:2;4068:6;4039:36;;;;;;;;;;;;;-1:-1:-1;;;;;4039:36:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4039:36:17;4031:64;;;;;-1:-1:-1;;;4031:64:17;;;;;;;;;;;;-1:-1:-1;;;4031:64:17;;;;;;;;;;;;;;7015:184:1;7088:12;;;;:6;:12;;;;;:33;;7113:7;7088:24;:33::i;:::-;7084:109;;;7169:12;:10;:12::i;:::-;-1:-1:-1;;;;;7142:40:1;7160:7;-1:-1:-1;;;;;7142:40:1;7154:4;7142:40;;;;;;;;;;7015:184;;:::o;7205:188::-;7279:12;;;;:6;:12;;;;;:36;;7307:7;7279:27;:36::i;:::-;7275:112;;;7363:12;:10;:12::i;:::-;-1:-1:-1;;;;;7336:40:1;7354:7;-1:-1:-1;;;;;7336:40:1;7348:4;7336:40;;;;;;;;;;7205:188;;:::o;874:176:3:-;932:7;963:5;;;986:6;;;;978:46;;;;;-1:-1:-1;;;978:46:3;;;;;;;;;;;;;;;;;;;;;;;;;;;5597:1664:5;5694:4;5700:7;5744:1;5731:10;:14;5723:49;;;;;-1:-1:-1;;;5723:49:5;;;;;;;;;;;;-1:-1:-1;;;5723:49:5;;;;;;;;;;;;;;;5857:28;:18;:26;:28::i;:::-;5843:10;:42;;5835:84;;;;;-1:-1:-1;;;5835:84:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;7042:13;7058:40;:9;7087:10;7058:28;:40::i;:::-;7122:20;;7042:56;;-1:-1:-1;7113:29:5;;7109:146;;;7166:5;7173:1;7158:17;;;;;;;7109:146;7214:4;7220:9;:16;;7237:5;7220:23;;;;;;;;;;;;;;;;7206:38;;;;;5597:1664;;;;;;:::o;3780:171:17:-;3863:15;-1:-1:-1;;;;;3863:28:17;;3892:4;3906;3913:6;3863:57;;;;;;;;;;;;;-1:-1:-1;;;;;3863:57:17;;;;;;-1:-1:-1;;;;;3863:57:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3863:57:17;3855:89;;;;;-1:-1:-1;;;3855:89:17;;;;;;;;;;;;-1:-1:-1;;;3855:89:17;;;;;;;;;;;;;;2848:155:15;2961:35;2980:7;2989:6;2961:18;:35::i;6085:147:10:-;6159:7;6201:22;6205:3;6217:5;6201:3;:22::i;5401:156::-;5481:4;5504:46;5514:3;-1:-1:-1;;;;;5534:14:10;;5504:9;:46::i;3948:222:5:-;3995:7;4014:30;:18;:28;:30::i;:::-;4055:17;4075:28;:18;:26;:28::i;:::-;4118:19;;;;;;;;4055:48;;-1:-1:-1;4118:19:5;;;;;;;;;;4154:9;-1:-1:-1;3948:222:5;:::o;5638:115:10:-;5701:7;5727:19;5735:3;5727:7;:19::i;1321:134:3:-;1379:7;1405:43;1409:1;1412;1405:43;;;;;;;;;;;;;;;;;:3;:43::i;1611:404:10:-;1674:4;1695:21;1705:3;1710:5;1695:9;:21::i;:::-;1690:319;;-1:-1:-1;1732:23:10;;;;;;;;:11;:23;;;;;;;;;;;;;1912:18;;1890:19;;;:12;;;:19;;;;;;:40;;;;1944:11;;1690:319;-1:-1:-1;1993:5:10;1986:12;;1360:423:11;-1:-1:-1;;;;;1434:19:11;;1430:347;;1558:43;;1541:12;;-1:-1:-1;;;;;1558:7:11;;;1582:4;1574:21;;1541:12;1558:43;1541:12;1558:43;1574:21;1558:7;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1540:61;;;1623:7;1615:38;;;;;-1:-1:-1;;;1615:38:11;;;;;;;;;;;;-1:-1:-1;;;1615:38:11;;;;;;;;;;;;;;;1430:347;;;;1707:5;-1:-1:-1;;;;;1700:22:11;;1723:2;1734:5;-1:-1:-1;;;;;1727:23:11;;1759:4;1727:38;;;;;;;;;;;;;-1:-1:-1;;;;;1727:38:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1727:38:11;1700:66;;;-1:-1:-1;;;;;;1700:66:11;;;;;;;-1:-1:-1;;;;;1700:66:11;;;;;;;;;;;;;;;;;;;;1727:38;;1700:66;;;;;;;-1:-1:-1;1700:66:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1360:423:11;;:::o;2578:264:15:-;2726:52;2761:4;2767:2;2771:6;2726:34;:52::i;:::-;2788:47;2818:4;2824:2;2828:6;2788:29;:47::i;5173:147:10:-;5246:4;5269:44;5277:3;-1:-1:-1;;;;;5297:14:10;;5269:7;:44::i;1098:112:9:-;1189:14;;1098:112::o;582:892:8:-;694:12;;671:7;;690:56;;-1:-1:-1;734:1:8;727:8;;690:56;796:12;;756:11;;819:414;832:4;826:3;:10;819:414;;;852:11;866:23;879:3;884:4;866:12;:23::i;:::-;852:37;;1119:7;1106:5;1112:3;1106:10;;;;;;;;;;;;;;;;:20;1102:121;;;1153:3;1146:10;;1102:121;;;1201:3;1207:1;1201:7;1195:13;;1102:121;819:414;;;;1356:1;1350:3;:7;:36;;;;;1379:7;1361:5;1373:1;1367:3;:7;1361:14;;;;;;;;;;;;;;;;:25;1350:36;1346:122;;;-1:-1:-1;;;1409:7:8;;-1:-1:-1;1402:14:8;;1346:122;-1:-1:-1;1454:3:8;-1:-1:-1;1447:10:8;;1599:274:13;1691:28;1703:7;1712:6;1691:11;:28::i;:::-;1734:14;;;;1733:15;:43;;;;;1769:7;1752:13;:11;:13::i;:::-;:24;;1733:43;1729:138;;;1800:14;:21;;-1:-1:-1;;1800:21:13;1817:4;1800:21;;;1840:16;;;;1800:14;;1840:16;1599:274;;:::o;4423:201:10:-;4517:18;;4490:7;;4517:26;-1:-1:-1;4509:73:10;;;;-1:-1:-1;;;4509:73:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4599:3;:11;;4611:5;4599:18;;;;;;;;;;;;;;;;4592:25;;4423:201;;;;:::o;3776:127::-;3849:4;3872:19;;;:12;;;;;:19;;;;;;:24;;;3776:127::o;1216:178:9:-;1368:19;;1386:1;1368:19;;;1216:178::o;5065:526:5:-;5171:44;5198:4;5204:2;5208:6;5171:26;:44::i;:::-;-1:-1:-1;;;;;5228:18:5;;5224:361;;5274:26;5297:2;5274:22;:26::i;:::-;5310:28;:26;:28::i;:::-;5224:361;;;-1:-1:-1;;;;;5357:16:5;;5353:232;;5401:28;5424:4;5401:22;:28::i;5353:232::-;5512:28;5535:4;5512:22;:28::i;:::-;5550:26;5573:2;5550:22;:26::i;2660:380:12:-;2776:21;2800:43;2826:4;2832:2;2836:6;2800:25;:43::i;:::-;2776:67;-1:-1:-1;2857:34:12;;;;2853:127;;2922:46;2952:15;2922:29;:46::i;:::-;2915:54;;-1:-1:-1;;;2915:54:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2853:127;2989:44;3016:4;3022:2;3026:6;2989:26;:44::i;2183:1512:10:-;2249:4;2386:19;;;:12;;;:19;;;;;;2420:15;;2416:1273;;2849:18;;-1:-1:-1;;2801:14:10;;;;2849:22;;;;2777:21;;2849:3;;:22;;3131;;;;;;;;;;;;;;3111:42;;3274:9;3245:3;:11;;3257:13;3245:26;;;;;;;;;;;;;;;;;;;:38;;;;3349:23;;;3391:1;3349:12;;;:23;;;;;;3375:17;;;3349:43;;3498:17;;3349:3;;3498:17;;;;;;;;;;;;;;;;;;;;;;3590:3;:12;;:19;3603:5;3590:19;;;;;;;;;;;3583:26;;;3631:4;3624:11;;;;;;;;2416:1273;3673:5;3666:12;;;;;608:190:2;670:7;789:1;;780;:5;776:1;772;:5;:13;771:19;;;;;;765:1;761;:5;755:1;751;:5;750:17;:41;;608:190;-1:-1:-1;;;608:190:2:o;7835:370:4:-;-1:-1:-1;;;;;7918:21:4;;7910:65;;;;;-1:-1:-1;;;7910:65:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;7986:49;8015:1;8019:7;8028:6;7986:20;:49::i;:::-;8061:12;;:24;;8078:6;8061:16;:24::i;:::-;8046:12;:39;-1:-1:-1;;;;;8116:18:4;;:9;:18;;;;;;;;;;;:30;;8139:6;8116:22;:30::i;:::-;-1:-1:-1;;;;;8095:18:4;;:9;:18;;;;;;;;;;;:51;;;;8161:37;;;;;;;8095:18;;:9;;8161:37;;;;;;;;;;7835:370;;:::o;7267:144:5:-;-1:-1:-1;;;;;7350:33:5;;;;;;:24;:33;;;;;7334:70;;7385:18;7375:7;7385:9;:18::i;:::-;7334:15;:70::i;7417:116::-;7473:53;7489:21;7512:13;:11;:13::i;7473:53::-;7417:116::o;7539:309::-;7633:17;7653:28;:18;:26;:28::i;:::-;7633:48;-1:-1:-1;7633:48:5;7695:30;7711:9;7695:15;:30::i;:::-;:42;7691:151;;;7753:29;;;;;;;;-1:-1:-1;7753:29:5;;;;;;;;;;;;;;7796:16;;;:35;;;;;;;;;;;;;;;7539:309::o;7854:206::-;7947:10;;7924:7;;7943:111;;-1:-1:-1;7985:1:5;7978:8;;7943:111;8028:10;;8024:3;;-1:-1:-1;;8028:14:5;;;8024:19;;;;;;;;;;;;;;8017:26;;;", - "source": "// SPDX-License-Identifier: Apache-2.0\n\n/******************************************************************************\n * Copyright 2020 IEXEC BLOCKCHAIN TECH *\n * *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); *\n * you may not use this file except in compliance with the License. *\n * You may obtain a copy of the License at *\n * *\n * http://www.apache.org/licenses/LICENSE-2.0 *\n * *\n * Unless required by applicable law or agreed to in writing, software *\n * distributed under the License is distributed on an \"AS IS\" BASIS, *\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *\n * See the License for the specific language governing permissions and *\n * limitations under the License. *\n ******************************************************************************/\n\npragma solidity ^0.6.0;\n\nimport \"./interfaces/IERC677.sol\";\nimport \"./ERLC.sol\";\n\n\ncontract ERLCSwap is ERLC, IERC677Receiver\n{\n IERC20 public immutable underlyingToken;\n\n constructor(\n address underlyingtoken,\n string memory name,\n string memory symbol,\n uint256 softcap,\n address[] memory admins,\n address[] memory kycadmins)\n public\n ERLC(name, symbol, softcap, admins, kycadmins)\n {\n underlyingToken = IERC20(underlyingtoken);\n _setupDecimals(ERC20(underlyingtoken).decimals());\n }\n\n /*************************************************************************\n * Escrow - public interface *\n *************************************************************************/\n function deposit(uint256 amount)\n public\n {\n _deposit(_msgSender(), amount);\n _mint(_msgSender(), amount);\n }\n\n function withdraw(uint256 amount)\n public\n {\n _burn(_msgSender(), amount);\n _withdraw(_msgSender(), amount);\n }\n\n function recover()\n public\n onlyRole(DEFAULT_ADMIN_ROLE, _msgSender(), \"only-admin\")\n {\n _mint(_msgSender(), SafeMath.sub(underlyingToken.balanceOf(address(this)), totalSupply()));\n }\n\n function claim(address token, address to)\n public virtual override\n {\n require(token != address(underlyingToken), \"cannot-claim-underlying-token\");\n super.claim(token, to);\n }\n\n /*************************************************************************\n * ERC677Receiver - One-transaction ERC20 deposits *\n *************************************************************************/\n function receiveApproval(address sender, uint256 amount, address token, bytes calldata)\n public override returns (bool)\n {\n require(token == address(underlyingToken), \"wrong-token\");\n _deposit(sender, amount);\n _mint(sender, amount);\n return true;\n }\n\n function onTokenTransfer(address sender, uint256 amount, bytes calldata)\n public override returns (bool)\n {\n require(_msgSender() == address(underlyingToken), \"wrong-sender\");\n _mint(sender, amount);\n return true;\n }\n\n /*************************************************************************\n * Escrow - internal functions *\n *************************************************************************/\n function _deposit(address from, uint256 amount)\n internal\n {\n require(underlyingToken.transferFrom(from, address(this), amount), \"failed-transferFrom\");\n }\n\n function _withdraw(address to, uint256 amount)\n internal\n {\n require(underlyingToken.transfer(to, amount), \"failed-transfer\");\n }\n}\n", - "sourcePath": "contracts/ERLCSwap.sol", - "ast": { - "absolutePath": "contracts/ERLCSwap.sol", - "exportedSymbols": { - "ERLCSwap": [ - 3046 - ] - }, - "id": 3047, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2803, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:17" - }, - { - "absolutePath": "contracts/interfaces/IERC677.sol", - "file": "./interfaces/IERC677.sol", - "id": 2804, - "nodeType": "ImportDirective", - "scope": 3047, - "sourceUnit": 3294, - "src": "1267:34:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "contracts/ERLC.sol", - "file": "./ERLC.sol", - "id": 2805, - "nodeType": "ImportDirective", - "scope": 3047, - "sourceUnit": 2662, - "src": "1302:20:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2806, - "name": "ERLC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2661, - "src": "1346:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLC_$2661", - "typeString": "contract ERLC" - } - }, - "id": 2807, - "nodeType": "InheritanceSpecifier", - "src": "1346:4:17" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2808, - "name": "IERC677Receiver", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3293, - "src": "1352:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC677Receiver_$3293", - "typeString": "contract IERC677Receiver" - } - }, - "id": 2809, - "nodeType": "InheritanceSpecifier", - "src": "1352:15:17" - } - ], - "contractDependencies": [ - 22, - 305, - 1081, - 1399, - 1477, - 2257, - 2397, - 2455, - 2534, - 2661, - 3210, - 3231, - 3243, - 3268, - 3293, - 3325 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 3046, - "linearizedBaseContracts": [ - 3046, - 3293, - 2661, - 2257, - 2534, - 1399, - 2455, - 2397, - 3210, - 305, - 1081, - 3243, - 1477, - 22, - 3268, - 3325, - 3231 - ], - "name": "ERLCSwap", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "functionSelector": "2495a599", - "id": 2811, - "mutability": "immutable", - "name": "underlyingToken", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3046, - "src": "1374:39:17", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 2810, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1477, - "src": "1374:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 2849, - "nodeType": "Block", - "src": "1708:117:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2835, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "1718:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2837, - "name": "underlyingtoken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2813, - "src": "1743:15:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2836, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1477, - "src": "1736:6:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$1477_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 2838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1736:23:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "src": "1718:41:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "id": 2840, - "nodeType": "ExpressionStatement", - "src": "1718:41:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2843, - "name": "underlyingtoken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2813, - "src": "1790:15:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2842, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1081, - "src": "1784:5:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$1081_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 2844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1784:22:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$1081", - "typeString": "contract ERC20" - } - }, - "id": 2845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decimals", - "nodeType": "MemberAccess", - "referencedDeclaration": 657, - "src": "1784:31:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 2846, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1784:33:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 2841, - "name": "_setupDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1069, - "src": "1769:14:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint8_$returns$__$", - "typeString": "function (uint8)" - } - }, - "id": 2847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1769:49:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2848, - "nodeType": "ExpressionStatement", - "src": "1769:49:17" - } - ] - }, - "documentation": null, - "id": 2850, - "implemented": true, - "kind": "constructor", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 2828, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2815, - "src": "1662:4:17", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 2829, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2817, - "src": "1668:6:17", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 2830, - "name": "softcap", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2819, - "src": "1676:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2831, - "name": "admins", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2822, - "src": "1685:6:17", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 2832, - "name": "kycadmins", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2825, - "src": "1693:9:17", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - } - ], - "id": 2833, - "modifierName": { - "argumentTypes": null, - "id": 2827, - "name": "ERLC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2661, - "src": "1657:4:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERLC_$2661_$", - "typeString": "type(contract ERLC)" - } - }, - "nodeType": "ModifierInvocation", - "src": "1657:46:17" - } - ], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2826, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2813, - "mutability": "mutable", - "name": "underlyingtoken", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1441:32:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2812, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1441:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2815, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1483:21:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2814, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1483:6:17", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2817, - "mutability": "mutable", - "name": "symbol", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1514:23:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2816, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1514:6:17", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2819, - "mutability": "mutable", - "name": "softcap", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1547:24:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2818, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1547:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2822, - "mutability": "mutable", - "name": "admins", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1581:23:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2820, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1581:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2821, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1581:9:17", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2825, - "mutability": "mutable", - "name": "kycadmins", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1614:26:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2823, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1614:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2824, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1614:9:17", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1431:210:17" - }, - "returnParameters": { - "id": 2834, - "nodeType": "ParameterList", - "parameters": [], - "src": "1708:0:17" - }, - "scope": 3046, - "src": "1420:405:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 2867, - "nodeType": "Block", - "src": "2117:84:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2856, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2136:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2857, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2136:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2858, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2852, - "src": "2150:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2855, - "name": "_deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "2127:8:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2127:30:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2860, - "nodeType": "ExpressionStatement", - "src": "2127:30:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2862, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2173:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2173:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2864, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2852, - "src": "2187:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2861, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2660 - ], - "referencedDeclaration": 2660, - "src": "2167:5:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2167:27:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2866, - "nodeType": "ExpressionStatement", - "src": "2167:27:17" - } - ] - }, - "documentation": null, - "functionSelector": "b6b55f25", - "id": 2868, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2853, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2852, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2868, - "src": "2086:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2851, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2086:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2085:16:17" - }, - "returnParameters": { - "id": 2854, - "nodeType": "ParameterList", - "parameters": [], - "src": "2117:0:17" - }, - "scope": 3046, - "src": "2069:132:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 2885, - "nodeType": "Block", - "src": "2256:85:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2874, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2272:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2272:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2876, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2870, - "src": "2286:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2873, - "name": "_burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1013, - "src": "2266:5:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2266:27:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2878, - "nodeType": "ExpressionStatement", - "src": "2266:27:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2880, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2313:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2313:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2882, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2870, - "src": "2327:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2879, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3045, - "src": "2303:9:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2303:31:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2884, - "nodeType": "ExpressionStatement", - "src": "2303:31:17" - } - ] - }, - "documentation": null, - "functionSelector": "2e1a7d4d", - "id": 2886, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2871, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2870, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2886, - "src": "2225:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2869, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2225:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2224:16:17" - }, - "returnParameters": { - "id": 2872, - "nodeType": "ParameterList", - "parameters": [], - "src": "2256:0:17" - }, - "scope": 3046, - "src": "2207:134:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 2912, - "nodeType": "Block", - "src": "2442:107:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2896, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2458:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2458:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2904, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "2519:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLCSwap_$3046", - "typeString": "contract ERLCSwap" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERLCSwap_$3046", - "typeString": "contract ERLCSwap" - } - ], - "id": 2903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2511:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2902, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2511:7:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2511:13:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2900, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "2485:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "id": 2901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 1416, - "src": "2485:25:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 2906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2485:40:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2907, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "2527:11:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2527:13:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2898, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 574, - "src": "2472:8:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$574_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 2899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 424, - "src": "2472:12:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2472:69:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2895, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2660 - ], - "referencedDeclaration": 2660, - "src": "2452:5:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2452:90:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2911, - "nodeType": "ExpressionStatement", - "src": "2452:90:17" - } - ] - }, - "documentation": null, - "functionSelector": "ce746024", - "id": 2913, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 2889, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "2390:18:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2890, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2410:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2410:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792d61646d696e", - "id": 2892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2424:12:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c7df34e6fbdd8fe937d348fad38c372bc44ed4bcbc38cb371f47165a35e8b951", - "typeString": "literal_string \"only-admin\"" - }, - "value": "only-admin" - } - ], - "id": 2893, - "modifierName": { - "argumentTypes": null, - "id": 2888, - "name": "onlyRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3084, - "src": "2381:8:17", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_bytes32_$_t_address_$_t_string_memory_ptr_$", - "typeString": "modifier (bytes32,address,string memory)" - } - }, - "nodeType": "ModifierInvocation", - "src": "2381:56:17" - } - ], - "name": "recover", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2887, - "nodeType": "ParameterList", - "parameters": [], - "src": "2363:2:17" - }, - "returnParameters": { - "id": 2894, - "nodeType": "ParameterList", - "parameters": [], - "src": "2442:0:17" - }, - "scope": 3046, - "src": "2347:202:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 2597 - ], - "body": { - "id": 2938, - "nodeType": "Block", - "src": "2629:124:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2922, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2915, - "src": "2647:5:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2925, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "2664:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - ], - "id": 2924, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2656:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2923, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2656:7:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2656:24:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2647:33:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "63616e6e6f742d636c61696d2d756e6465726c79696e672d746f6b656e", - "id": 2928, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2682:31:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e4d5ba616fad114363ebb203e1192e855c2a78fd7804e1d7605556cec789b516", - "typeString": "literal_string \"cannot-claim-underlying-token\"" - }, - "value": "cannot-claim-underlying-token" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e4d5ba616fad114363ebb203e1192e855c2a78fd7804e1d7605556cec789b516", - "typeString": "literal_string \"cannot-claim-underlying-token\"" - } - ], - "id": 2921, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2639:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2639:75:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2930, - "nodeType": "ExpressionStatement", - "src": "2639:75:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2934, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2915, - "src": "2736:5:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2935, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2917, - "src": "2743:2:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2931, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "2724:5:17", - "typeDescriptions": { - "typeIdentifier": "t_super$_ERLCSwap_$3046", - "typeString": "contract super ERLCSwap" - } - }, - "id": 2933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "claim", - "nodeType": "MemberAccess", - "referencedDeclaration": 2597, - "src": "2724:11:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 2936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2724:22:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2937, - "nodeType": "ExpressionStatement", - "src": "2724:22:17" - } - ] - }, - "documentation": null, - "functionSelector": "21c0b342", - "id": 2939, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "claim", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2919, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "2616:8:17" - }, - "parameters": { - "id": 2918, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2915, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2939, - "src": "2570:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2914, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2570:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2917, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2939, - "src": "2585:10:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2916, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2585:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2569:27:17" - }, - "returnParameters": { - "id": 2920, - "nodeType": "ParameterList", - "parameters": [], - "src": "2629:0:17" - }, - "scope": 3046, - "src": "2555:198:17", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [ - 3281 - ], - "body": { - "id": 2975, - "nodeType": "Block", - "src": "3124:160:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2954, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2945, - "src": "3142:5:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2957, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "3159:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - ], - "id": 2956, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3151:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2955, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3151:7:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3151:24:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3142:33:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "77726f6e672d746f6b656e", - "id": 2960, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3177:13:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c850bd0defd9074593777b4fbc4abf7d5f6f32ff09f90f9c726524f96d40c30b", - "typeString": "literal_string \"wrong-token\"" - }, - "value": "wrong-token" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c850bd0defd9074593777b4fbc4abf7d5f6f32ff09f90f9c726524f96d40c30b", - "typeString": "literal_string \"wrong-token\"" - } - ], - "id": 2953, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3134:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3134:57:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2962, - "nodeType": "ExpressionStatement", - "src": "3134:57:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2964, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2941, - "src": "3210:6:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2965, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2943, - "src": "3218:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2963, - "name": "_deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "3201:8:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3201:24:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2967, - "nodeType": "ExpressionStatement", - "src": "3201:24:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2969, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2941, - "src": "3241:6:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2970, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2943, - "src": "3249:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2968, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2660 - ], - "referencedDeclaration": 2660, - "src": "3235:5:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2971, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3235:21:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2972, - "nodeType": "ExpressionStatement", - "src": "3235:21:17" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3273:4:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2952, - "id": 2974, - "nodeType": "Return", - "src": "3266:11:17" - } - ] - }, - "documentation": null, - "functionSelector": "8f4ffcb1", - "id": 2976, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "receiveApproval", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2949, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3096:8:17" - }, - "parameters": { - "id": 2948, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2941, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2976, - "src": "3022:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2940, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3022:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2943, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2976, - "src": "3038:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2942, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3038:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2945, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2976, - "src": "3054:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2944, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3054:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2947, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2976, - "src": "3069:14:17", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2946, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3069:5:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3021:63:17" - }, - "returnParameters": { - "id": 2952, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2951, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2976, - "src": "3114:4:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2950, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3114:4:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3113:6:17" - }, - "scope": 3046, - "src": "2997:287:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 3292 - ], - "body": { - "id": 3006, - "nodeType": "Block", - "src": "3402:134:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2989, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "3420:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3420:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2993, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "3444:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - ], - "id": 2992, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3436:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2991, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3436:7:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3436:24:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3420:40:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "77726f6e672d73656e646572", - "id": 2996, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3462:14:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_dc74c88d9455fd7e407983997f9656cee8d85c9cadd8acda8396a36f1cb0bd4a", - "typeString": "literal_string \"wrong-sender\"" - }, - "value": "wrong-sender" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_dc74c88d9455fd7e407983997f9656cee8d85c9cadd8acda8396a36f1cb0bd4a", - "typeString": "literal_string \"wrong-sender\"" - } - ], - "id": 2988, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3412:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3412:65:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2998, - "nodeType": "ExpressionStatement", - "src": "3412:65:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3000, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2978, - "src": "3493:6:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3001, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2980, - "src": "3501:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2999, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2660 - ], - "referencedDeclaration": 2660, - "src": "3487:5:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 3002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3487:21:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3003, - "nodeType": "ExpressionStatement", - "src": "3487:21:17" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3525:4:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2987, - "id": 3005, - "nodeType": "Return", - "src": "3518:11:17" - } - ] - }, - "documentation": null, - "functionSelector": "a4c0ed36", - "id": 3007, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "onTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2984, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3374:8:17" - }, - "parameters": { - "id": 2983, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2978, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3007, - "src": "3315:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2977, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3315:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2980, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3007, - "src": "3331:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2979, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3331:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2982, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3007, - "src": "3347:14:17", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2981, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3347:5:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3314:48:17" - }, - "returnParameters": { - "id": 2987, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2986, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3007, - "src": "3392:4:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2985, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3392:4:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3391:6:17" - }, - "scope": 3046, - "src": "3290:246:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 3027, - "nodeType": "Block", - "src": "3845:106:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3017, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3009, - "src": "3892:4:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3020, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "3906:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLCSwap_$3046", - "typeString": "contract ERLCSwap" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERLCSwap_$3046", - "typeString": "contract ERLCSwap" - } - ], - "id": 3019, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3898:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 3018, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3898:7:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 3021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3898:13:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3022, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3011, - "src": "3913:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3015, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "3863:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "id": 3016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 1458, - "src": "3863:28:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 3023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3863:57:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6661696c65642d7472616e7366657246726f6d", - "id": 3024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3922:21:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f574db8a79d1556499f642cf39c52648970977877bdffe1234a32044752b8fe9", - "typeString": "literal_string \"failed-transferFrom\"" - }, - "value": "failed-transferFrom" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f574db8a79d1556499f642cf39c52648970977877bdffe1234a32044752b8fe9", - "typeString": "literal_string \"failed-transferFrom\"" - } - ], - "id": 3014, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3855:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3855:89:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3026, - "nodeType": "ExpressionStatement", - "src": "3855:89:17" - } - ] - }, - "documentation": null, - "id": 3028, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3012, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3009, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3028, - "src": "3798:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3008, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3798:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3011, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3028, - "src": "3812:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3010, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3812:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3797:30:17" - }, - "returnParameters": { - "id": 3013, - "nodeType": "ParameterList", - "parameters": [], - "src": "3845:0:17" - }, - "scope": 3046, - "src": "3780:171:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3044, - "nodeType": "Block", - "src": "4021:81:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3038, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3030, - "src": "4064:2:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3039, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3032, - "src": "4068:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3036, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "4039:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "id": 3037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1426, - "src": "4039:24:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4039:36:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6661696c65642d7472616e73666572", - "id": 3041, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4077:17:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e7ec5fb7877eeda04e9c305afe2ef377c223d93963bda0cefaf723fa9d3ff5d", - "typeString": "literal_string \"failed-transfer\"" - }, - "value": "failed-transfer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e7ec5fb7877eeda04e9c305afe2ef377c223d93963bda0cefaf723fa9d3ff5d", - "typeString": "literal_string \"failed-transfer\"" - } - ], - "id": 3035, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4031:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4031:64:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3043, - "nodeType": "ExpressionStatement", - "src": "4031:64:17" - } - ] - }, - "documentation": null, - "id": 3045, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3033, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3030, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3045, - "src": "3976:10:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3029, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3976:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3032, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3045, - "src": "3988:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3031, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3988:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3975:28:17" - }, - "returnParameters": { - "id": 3034, - "nodeType": "ParameterList", - "parameters": [], - "src": "4021:0:17" - }, - "scope": 3046, - "src": "3957:145:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 3047, - "src": "1325:2779:17" - } - ], - "src": "1242:2863:17" - }, - "legacyAST": { - "absolutePath": "contracts/ERLCSwap.sol", - "exportedSymbols": { - "ERLCSwap": [ - 3046 - ] - }, - "id": 3047, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2803, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:17" - }, - { - "absolutePath": "contracts/interfaces/IERC677.sol", - "file": "./interfaces/IERC677.sol", - "id": 2804, - "nodeType": "ImportDirective", - "scope": 3047, - "sourceUnit": 3294, - "src": "1267:34:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "contracts/ERLC.sol", - "file": "./ERLC.sol", - "id": 2805, - "nodeType": "ImportDirective", - "scope": 3047, - "sourceUnit": 2662, - "src": "1302:20:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2806, - "name": "ERLC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2661, - "src": "1346:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLC_$2661", - "typeString": "contract ERLC" - } - }, - "id": 2807, - "nodeType": "InheritanceSpecifier", - "src": "1346:4:17" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2808, - "name": "IERC677Receiver", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3293, - "src": "1352:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC677Receiver_$3293", - "typeString": "contract IERC677Receiver" - } - }, - "id": 2809, - "nodeType": "InheritanceSpecifier", - "src": "1352:15:17" - } - ], - "contractDependencies": [ - 22, - 305, - 1081, - 1399, - 1477, - 2257, - 2397, - 2455, - 2534, - 2661, - 3210, - 3231, - 3243, - 3268, - 3293, - 3325 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 3046, - "linearizedBaseContracts": [ - 3046, - 3293, - 2661, - 2257, - 2534, - 1399, - 2455, - 2397, - 3210, - 305, - 1081, - 3243, - 1477, - 22, - 3268, - 3325, - 3231 - ], - "name": "ERLCSwap", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "functionSelector": "2495a599", - "id": 2811, - "mutability": "immutable", - "name": "underlyingToken", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3046, - "src": "1374:39:17", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 2810, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1477, - "src": "1374:6:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 2849, - "nodeType": "Block", - "src": "1708:117:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 2839, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 2835, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "1718:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2837, - "name": "underlyingtoken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2813, - "src": "1743:15:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2836, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1477, - "src": "1736:6:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$1477_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 2838, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1736:23:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "src": "1718:41:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "id": 2840, - "nodeType": "ExpressionStatement", - "src": "1718:41:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2843, - "name": "underlyingtoken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2813, - "src": "1790:15:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 2842, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1081, - "src": "1784:5:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$1081_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 2844, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1784:22:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$1081", - "typeString": "contract ERC20" - } - }, - "id": 2845, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decimals", - "nodeType": "MemberAccess", - "referencedDeclaration": 657, - "src": "1784:31:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 2846, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1784:33:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 2841, - "name": "_setupDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1069, - "src": "1769:14:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint8_$returns$__$", - "typeString": "function (uint8)" - } - }, - "id": 2847, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1769:49:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2848, - "nodeType": "ExpressionStatement", - "src": "1769:49:17" - } - ] - }, - "documentation": null, - "id": 2850, - "implemented": true, - "kind": "constructor", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 2828, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2815, - "src": "1662:4:17", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 2829, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2817, - "src": "1668:6:17", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 2830, - "name": "softcap", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2819, - "src": "1676:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 2831, - "name": "admins", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2822, - "src": "1685:6:17", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 2832, - "name": "kycadmins", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2825, - "src": "1693:9:17", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - } - ], - "id": 2833, - "modifierName": { - "argumentTypes": null, - "id": 2827, - "name": "ERLC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2661, - "src": "1657:4:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERLC_$2661_$", - "typeString": "type(contract ERLC)" - } - }, - "nodeType": "ModifierInvocation", - "src": "1657:46:17" - } - ], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2826, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2813, - "mutability": "mutable", - "name": "underlyingtoken", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1441:32:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2812, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1441:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2815, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1483:21:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2814, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1483:6:17", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2817, - "mutability": "mutable", - "name": "symbol", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1514:23:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 2816, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1514:6:17", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2819, - "mutability": "mutable", - "name": "softcap", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1547:24:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2818, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1547:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2822, - "mutability": "mutable", - "name": "admins", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1581:23:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2820, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1581:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2821, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1581:9:17", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2825, - "mutability": "mutable", - "name": "kycadmins", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2850, - "src": "1614:26:17", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 2823, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1614:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 2824, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1614:9:17", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1431:210:17" - }, - "returnParameters": { - "id": 2834, - "nodeType": "ParameterList", - "parameters": [], - "src": "1708:0:17" - }, - "scope": 3046, - "src": "1420:405:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 2867, - "nodeType": "Block", - "src": "2117:84:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2856, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2136:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2857, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2136:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2858, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2852, - "src": "2150:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2855, - "name": "_deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "2127:8:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2859, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2127:30:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2860, - "nodeType": "ExpressionStatement", - "src": "2127:30:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2862, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2173:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2863, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2173:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2864, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2852, - "src": "2187:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2861, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2660 - ], - "referencedDeclaration": 2660, - "src": "2167:5:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2865, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2167:27:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2866, - "nodeType": "ExpressionStatement", - "src": "2167:27:17" - } - ] - }, - "documentation": null, - "functionSelector": "b6b55f25", - "id": 2868, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2853, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2852, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2868, - "src": "2086:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2851, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2086:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2085:16:17" - }, - "returnParameters": { - "id": 2854, - "nodeType": "ParameterList", - "parameters": [], - "src": "2117:0:17" - }, - "scope": 3046, - "src": "2069:132:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 2885, - "nodeType": "Block", - "src": "2256:85:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2874, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2272:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2875, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2272:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2876, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2870, - "src": "2286:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2873, - "name": "_burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1013, - "src": "2266:5:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2877, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2266:27:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2878, - "nodeType": "ExpressionStatement", - "src": "2266:27:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2880, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2313:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2881, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2313:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 2882, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2870, - "src": "2327:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2879, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3045, - "src": "2303:9:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2883, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2303:31:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2884, - "nodeType": "ExpressionStatement", - "src": "2303:31:17" - } - ] - }, - "documentation": null, - "functionSelector": "2e1a7d4d", - "id": 2886, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2871, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2870, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2886, - "src": "2225:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2869, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2225:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2224:16:17" - }, - "returnParameters": { - "id": 2872, - "nodeType": "ParameterList", - "parameters": [], - "src": "2256:0:17" - }, - "scope": 3046, - "src": "2207:134:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 2912, - "nodeType": "Block", - "src": "2442:107:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2896, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2458:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2897, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2458:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2904, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "2519:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLCSwap_$3046", - "typeString": "contract ERLCSwap" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERLCSwap_$3046", - "typeString": "contract ERLCSwap" - } - ], - "id": 2903, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2511:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2902, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2511:7:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2905, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2511:13:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2900, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "2485:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "id": 2901, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 1416, - "src": "2485:25:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 2906, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2485:40:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2907, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 667, - "src": "2527:11:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 2908, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2527:13:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2898, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 574, - "src": "2472:8:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$574_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 2899, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 424, - "src": "2472:12:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 2909, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2472:69:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2895, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2660 - ], - "referencedDeclaration": 2660, - "src": "2452:5:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2910, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2452:90:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2911, - "nodeType": "ExpressionStatement", - "src": "2452:90:17" - } - ] - }, - "documentation": null, - "functionSelector": "ce746024", - "id": 2913, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 2889, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "2390:18:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2890, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "2410:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2891, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2410:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792d61646d696e", - "id": 2892, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2424:12:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c7df34e6fbdd8fe937d348fad38c372bc44ed4bcbc38cb371f47165a35e8b951", - "typeString": "literal_string \"only-admin\"" - }, - "value": "only-admin" - } - ], - "id": 2893, - "modifierName": { - "argumentTypes": null, - "id": 2888, - "name": "onlyRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3084, - "src": "2381:8:17", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_bytes32_$_t_address_$_t_string_memory_ptr_$", - "typeString": "modifier (bytes32,address,string memory)" - } - }, - "nodeType": "ModifierInvocation", - "src": "2381:56:17" - } - ], - "name": "recover", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 2887, - "nodeType": "ParameterList", - "parameters": [], - "src": "2363:2:17" - }, - "returnParameters": { - "id": 2894, - "nodeType": "ParameterList", - "parameters": [], - "src": "2442:0:17" - }, - "scope": 3046, - "src": "2347:202:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 2597 - ], - "body": { - "id": 2938, - "nodeType": "Block", - "src": "2629:124:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2927, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2922, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2915, - "src": "2647:5:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2925, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "2664:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - ], - "id": 2924, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2656:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2923, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2656:7:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2926, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2656:24:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2647:33:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "63616e6e6f742d636c61696d2d756e6465726c79696e672d746f6b656e", - "id": 2928, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2682:31:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e4d5ba616fad114363ebb203e1192e855c2a78fd7804e1d7605556cec789b516", - "typeString": "literal_string \"cannot-claim-underlying-token\"" - }, - "value": "cannot-claim-underlying-token" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e4d5ba616fad114363ebb203e1192e855c2a78fd7804e1d7605556cec789b516", - "typeString": "literal_string \"cannot-claim-underlying-token\"" - } - ], - "id": 2921, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2639:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2929, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2639:75:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2930, - "nodeType": "ExpressionStatement", - "src": "2639:75:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2934, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2915, - "src": "2736:5:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2935, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2917, - "src": "2743:2:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2931, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "2724:5:17", - "typeDescriptions": { - "typeIdentifier": "t_super$_ERLCSwap_$3046", - "typeString": "contract super ERLCSwap" - } - }, - "id": 2933, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "claim", - "nodeType": "MemberAccess", - "referencedDeclaration": 2597, - "src": "2724:11:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 2936, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2724:22:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2937, - "nodeType": "ExpressionStatement", - "src": "2724:22:17" - } - ] - }, - "documentation": null, - "functionSelector": "21c0b342", - "id": 2939, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "claim", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2919, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "2616:8:17" - }, - "parameters": { - "id": 2918, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2915, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2939, - "src": "2570:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2914, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2570:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2917, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2939, - "src": "2585:10:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2916, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2585:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2569:27:17" - }, - "returnParameters": { - "id": 2920, - "nodeType": "ParameterList", - "parameters": [], - "src": "2629:0:17" - }, - "scope": 3046, - "src": "2555:198:17", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [ - 3281 - ], - "body": { - "id": 2975, - "nodeType": "Block", - "src": "3124:160:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2959, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2954, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2945, - "src": "3142:5:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2957, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "3159:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - ], - "id": 2956, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3151:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2955, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3151:7:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2958, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3151:24:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3142:33:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "77726f6e672d746f6b656e", - "id": 2960, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3177:13:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c850bd0defd9074593777b4fbc4abf7d5f6f32ff09f90f9c726524f96d40c30b", - "typeString": "literal_string \"wrong-token\"" - }, - "value": "wrong-token" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c850bd0defd9074593777b4fbc4abf7d5f6f32ff09f90f9c726524f96d40c30b", - "typeString": "literal_string \"wrong-token\"" - } - ], - "id": 2953, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3134:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2961, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3134:57:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2962, - "nodeType": "ExpressionStatement", - "src": "3134:57:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2964, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2941, - "src": "3210:6:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2965, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2943, - "src": "3218:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2963, - "name": "_deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3028, - "src": "3201:8:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2966, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3201:24:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2967, - "nodeType": "ExpressionStatement", - "src": "3201:24:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2969, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2941, - "src": "3241:6:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2970, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2943, - "src": "3249:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2968, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2660 - ], - "referencedDeclaration": 2660, - "src": "3235:5:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 2971, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3235:21:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2972, - "nodeType": "ExpressionStatement", - "src": "3235:21:17" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 2973, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3273:4:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2952, - "id": 2974, - "nodeType": "Return", - "src": "3266:11:17" - } - ] - }, - "documentation": null, - "functionSelector": "8f4ffcb1", - "id": 2976, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "receiveApproval", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2949, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3096:8:17" - }, - "parameters": { - "id": 2948, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2941, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2976, - "src": "3022:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2940, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3022:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2943, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2976, - "src": "3038:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2942, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3038:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2945, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2976, - "src": "3054:13:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2944, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3054:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2947, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2976, - "src": "3069:14:17", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2946, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3069:5:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3021:63:17" - }, - "returnParameters": { - "id": 2952, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2951, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2976, - "src": "3114:4:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2950, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3114:4:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3113:6:17" - }, - "scope": 3046, - "src": "2997:287:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 3292 - ], - "body": { - "id": 3006, - "nodeType": "Block", - "src": "3402:134:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 2995, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 2989, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "3420:10:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 2990, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3420:12:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2993, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "3444:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - ], - "id": 2992, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3436:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 2991, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3436:7:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2994, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3436:24:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3420:40:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "77726f6e672d73656e646572", - "id": 2996, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3462:14:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_dc74c88d9455fd7e407983997f9656cee8d85c9cadd8acda8396a36f1cb0bd4a", - "typeString": "literal_string \"wrong-sender\"" - }, - "value": "wrong-sender" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_dc74c88d9455fd7e407983997f9656cee8d85c9cadd8acda8396a36f1cb0bd4a", - "typeString": "literal_string \"wrong-sender\"" - } - ], - "id": 2988, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3412:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 2997, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3412:65:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2998, - "nodeType": "ExpressionStatement", - "src": "3412:65:17" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3000, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2978, - "src": "3493:6:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3001, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2980, - "src": "3501:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 2999, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 2660 - ], - "referencedDeclaration": 2660, - "src": "3487:5:17", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 3002, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3487:21:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3003, - "nodeType": "ExpressionStatement", - "src": "3487:21:17" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 3004, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3525:4:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 2987, - "id": 3005, - "nodeType": "Return", - "src": "3518:11:17" - } - ] - }, - "documentation": null, - "functionSelector": "a4c0ed36", - "id": 3007, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "onTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2984, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3374:8:17" - }, - "parameters": { - "id": 2983, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2978, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3007, - "src": "3315:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2977, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3315:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2980, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3007, - "src": "3331:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2979, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3331:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2982, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3007, - "src": "3347:14:17", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 2981, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3347:5:17", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3314:48:17" - }, - "returnParameters": { - "id": 2987, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2986, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3007, - "src": "3392:4:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2985, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3392:4:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3391:6:17" - }, - "scope": 3046, - "src": "3290:246:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 3027, - "nodeType": "Block", - "src": "3845:106:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3017, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3009, - "src": "3892:4:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3020, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "3906:4:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLCSwap_$3046", - "typeString": "contract ERLCSwap" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERLCSwap_$3046", - "typeString": "contract ERLCSwap" - } - ], - "id": 3019, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3898:7:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 3018, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3898:7:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 3021, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3898:13:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3022, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3011, - "src": "3913:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3015, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "3863:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "id": 3016, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 1458, - "src": "3863:28:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 3023, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3863:57:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6661696c65642d7472616e7366657246726f6d", - "id": 3024, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3922:21:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f574db8a79d1556499f642cf39c52648970977877bdffe1234a32044752b8fe9", - "typeString": "literal_string \"failed-transferFrom\"" - }, - "value": "failed-transferFrom" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f574db8a79d1556499f642cf39c52648970977877bdffe1234a32044752b8fe9", - "typeString": "literal_string \"failed-transferFrom\"" - } - ], - "id": 3014, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3855:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3025, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3855:89:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3026, - "nodeType": "ExpressionStatement", - "src": "3855:89:17" - } - ] - }, - "documentation": null, - "id": 3028, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3012, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3009, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3028, - "src": "3798:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3008, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3798:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3011, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3028, - "src": "3812:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3010, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3812:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3797:30:17" - }, - "returnParameters": { - "id": 3013, - "nodeType": "ParameterList", - "parameters": [], - "src": "3845:0:17" - }, - "scope": 3046, - "src": "3780:171:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 3044, - "nodeType": "Block", - "src": "4021:81:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3038, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3030, - "src": "4064:2:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3039, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3032, - "src": "4068:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3036, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2811, - "src": "4039:15:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$1477", - "typeString": "contract IERC20" - } - }, - "id": 3037, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 1426, - "src": "4039:24:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 3040, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4039:36:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6661696c65642d7472616e73666572", - "id": 3041, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4077:17:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e7ec5fb7877eeda04e9c305afe2ef377c223d93963bda0cefaf723fa9d3ff5d", - "typeString": "literal_string \"failed-transfer\"" - }, - "value": "failed-transfer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e7ec5fb7877eeda04e9c305afe2ef377c223d93963bda0cefaf723fa9d3ff5d", - "typeString": "literal_string \"failed-transfer\"" - } - ], - "id": 3035, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4031:7:17", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 3042, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4031:64:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3043, - "nodeType": "ExpressionStatement", - "src": "4031:64:17" - } - ] - }, - "documentation": null, - "id": 3045, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 3033, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3030, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3045, - "src": "3976:10:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3029, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3976:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3032, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3045, - "src": "3988:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3031, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3988:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3975:28:17" - }, - "returnParameters": { - "id": 3034, - "nodeType": "ParameterList", - "parameters": [], - "src": "4021:0:17" - }, - "scope": 3046, - "src": "3957:145:17", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 3047, - "src": "1325:2779:17" - } - ], - "src": "1242:2863:17" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang", - "optimizer": { - "enabled": true, - "runs": 200 - }, - "evmVersion": "petersburg" - }, - "networks": { - "5": { - "events": { - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - "0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - "0x629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d34": { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } - }, - "links": {}, - "address": "0x381790F5602401F46C2a447355d84715d744f273", - "transactionHash": "0x34d51bd46d12e2c1af134347883b05724b8be455cf02977383ef02b2f2c8b4ba" - } - }, - "schemaVersion": "3.2.2", - "updatedAt": "2020-11-16T18:53:40.926Z", - "networkType": "ethereum" -} \ No newline at end of file diff --git a/build/contracts/ERLCTokenSwap.json b/build/contracts/ERLCTokenSwap.json deleted file mode 100644 index af335e5bc..000000000 --- a/build/contracts/ERLCTokenSwap.json +++ /dev/null @@ -1,8565 +0,0 @@ -{ - "contractName": "ERLCTokenSwap", - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "underlyingtoken", - "type": "address" - }, - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "uint256", - "name": "softcap", - "type": "uint256" - }, - { - "internalType": "address[]", - "name": "admins", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "kycadmins", - "type": "address[]" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "KYC_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "KYC_MEMBER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "approveAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "balanceOfAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "detectTransferRestriction", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "name": "getRoleMember", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleMemberCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - } - ], - "name": "grantKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "hasRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isKYC", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "restrictionCode", - "type": "uint8" - } - ], - "name": "messageForTransferRestriction", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "renounceRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "accounts", - "type": "address[]" - } - ], - "name": "revokeKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "revokeRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "snapshot", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "softCap", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "softCapReached", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "snapshotId", - "type": "uint256" - } - ], - "name": "totalSupplyAt", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "transferAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "underlyingToken", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "recover", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "receiveApproval", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onTokenTransfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlyingtoken\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"softcap\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"admins\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"kycadmins\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"Snapshot\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"SoftCapReached\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"KYC_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"KYC_MEMBER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"balanceOfAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"detectTransferRestriction\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"grantKYC\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isKYC\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"restrictionCode\",\"type\":\"uint8\"}],\"name\":\"messageForTransferRestriction\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"receiveApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recover\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"}],\"name\":\"revokeKYC\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"snapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"softCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"softCapReached\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"snapshotId\",\"type\":\"uint256\"}],\"name\":\"totalSupplyAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"transferAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"underlyingToken\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"balanceOfAt(address,uint256)\":{\"details\":\"Retrieves the balance of `account` at the time `snapshotId` was created.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"totalSupplyAt(uint256)\":{\"details\":\"Retrieves the total supply at the time `snapshotId` was created.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/amxx/Work/iExec/code/eRLC/contracts/ERLCTokenSwap.sol\":\"ERLCTokenSwap\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/amxx/Work/iExec/code/eRLC/contracts/Claimable.sol\":{\"keccak256\":\"0x7f1fecf56c4e7bbee9dcb189b24b3781a6766e43240285b5c31c03efb156817a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://35b29e432ddff08d5e548b9ff7668125d00bfbca11286020bc1a3c34b81167c4\",\"dweb:/ipfs/QmXEeYzbLZzjMWVoj1uyvyZBoTG1i9nvtGzaEhVAnK2zvz\"]},\"/home/amxx/Work/iExec/code/eRLC/contracts/ERC20KYC.sol\":{\"keccak256\":\"0xfc044cf56d46aaf3c30cdd82f0657508240856041b4e450d7e65f0cfe1ccb95a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://185f7f107242dee448808c31ae869811ffb266dc461059e9cd989bcdb8ff123d\",\"dweb:/ipfs/QmcaGKcGmND8jtfNP8S1VkzRu1cjAw2qnBFJ282qUZ7tqU\"]},\"/home/amxx/Work/iExec/code/eRLC/contracts/ERC20Softcap.sol\":{\"keccak256\":\"0x5922a8f47b15f3bd9a3e54606d83f64bb3906ccef0db62f482dc3597161bb284\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://ecfe2cbbc6fd16e15179d5dc58b97895b1875e874ba13feff28b91266163de22\",\"dweb:/ipfs/QmRRwL5gTVL7fUpndJRUEbzAxEnrtYbZDyWnwwFaQVehFh\"]},\"/home/amxx/Work/iExec/code/eRLC/contracts/ERC677.sol\":{\"keccak256\":\"0x80f8767deff204af9c0a3f81a1f661415c5374e8deb661268d4f40e23c370fee\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://d685b911b278e93e36d9e8f884a6f0075a43e6eef8cff82aa58001fb57187051\",\"dweb:/ipfs/QmZzmMdTXEFUcK6u33WbecCJcy9SSjnXMPeeuHXiRVKVGa\"]},\"/home/amxx/Work/iExec/code/eRLC/contracts/ERLC.sol\":{\"keccak256\":\"0x5bc2f05d0d9d774e4bf42eb35b9250aa736e4618e02f0170bacb3af1dee77b88\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://7f0f7cd5bc993a38473725413fbfcc80b81d53dbbbce9349a151ce9b0b00b2da\",\"dweb:/ipfs/Qmdbj1ePu9fjTVAxY2iLxLpdUSLqBaAMMuena19rdLZhzo\"]},\"/home/amxx/Work/iExec/code/eRLC/contracts/ERLCTokenSwap.sol\":{\"keccak256\":\"0x364c4905ef87f3a17dc13ad7e28e2db54b5231d5c19c342a643f121ee81a14a4\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f7c7e22475080d76a6101be00cd587a0971bc894758415d7e8b2e78e74196471\",\"dweb:/ipfs/QmPgT2A2EXPUhT7gfdbuhh5CMLhpNEEkiph61KJU5PW3Zu\"]},\"/home/amxx/Work/iExec/code/eRLC/contracts/KYC.sol\":{\"keccak256\":\"0x0727a4816cbd9014997bc04197c677426fd142a91f091364631eb5c15d02012c\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://63f3bd0861aa5e2c5d6f7cbc0cb4ce9ead1010c4bfc5e622bd9bcfd771e1cfeb\",\"dweb:/ipfs/QmRKA1HybBK6LrU5easpiTEQ7V1iU1o4zXKb8LWTmcKHDV\"]},\"/home/amxx/Work/iExec/code/eRLC/contracts/interfaces/IERC1404.sol\":{\"keccak256\":\"0xec243d84d26dd07f7a93a6f0665d56d60d20b139bf7f201a502a438ac95ac771\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://75cd876336f5cb77d0492f2082912fa42b526cf00820f1f0a0e8be012d402360\",\"dweb:/ipfs/QmZWgMF27i1JfGbgc7FTny9YkoFWDXiYh9gjpfXnHVLWy8\"]},\"/home/amxx/Work/iExec/code/eRLC/contracts/interfaces/IERC20KYC.sol\":{\"keccak256\":\"0xe89be47e6817e4c9f61aa6622dae692ff5561a163ade8d671425ac70e41e8ed4\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://58f9e16d4d5607748044d7d2fed26b8bb23235c33d34396eb734f0aa2a816c71\",\"dweb:/ipfs/QmNnucsxu7WtrYKdF5mtD4DqpA52DjMfkN3rTR5zF3rX41\"]},\"/home/amxx/Work/iExec/code/eRLC/contracts/interfaces/IERC677.sol\":{\"keccak256\":\"0x282bbe6c74b67c0f9e88a878bf8183e01af5d7213144a974e680361f215a0146\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://6289ef41bb0bf4428ff557600bc61f464857dfc5a49a4d2f499127bab525bdca\",\"dweb:/ipfs/QmZkWF65jzMzM6QG26V2C3yYnR8zbFkjqkSaLKJBSfXade\"]},\"/home/amxx/Work/iExec/code/eRLC/contracts/interfaces/IERC677Receiver.sol\":{\"keccak256\":\"0x91d2e0e94792931f5db578496ac76ce5d8841d1c62e2c3a2595fd3d4a2894cca\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://06612fbbd8b862ccabb665e3be52dc156d5099102f6e40d0755927c02bfb71e1\",\"dweb:/ipfs/QmPprNBeiVKrMw3ENPxhXDRXnAdMR53NMFA16rg7UXjcSV\"]},\"/home/amxx/Work/iExec/code/eRLC/contracts/interfaces/IKYC.sol\":{\"keccak256\":\"0xd6d3defa5acc8314a25eae10f20ea630db0a23ecdb3ddf79e8ec7c50fc64bcbc\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://8027cce56d986c3b9d877bc09bc95c642d25a3b279abb530ebd3789453b2dc00\",\"dweb:/ipfs/QmfV5YdHTKNnRWBW1qiMfKY1fjkdq6RpqGjYddTgTq5CsB\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/access/AccessControl.sol\":{\"keccak256\":\"0x37ff88aa5ca8f533e31b9e1cb5354816b15bb7d41c904ea1c8f5dd5a78d6da25\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://f3731db435ced7084f2cb3947e708371c10a2e3f654dcfe2a237fc8fbdafbe5f\",\"dweb:/ipfs/QmUyiwkuiP2fYBVaTwwY82sJKxJyPQaBqAtS4uG6iaUSP7\"]},\"@openzeppelin/contracts/math/Math.sol\":{\"keccak256\":\"0x363bd3b45201f07c9b71c2edc96533468cf14a3d029fabd82fddceb1eb3ebd9c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d676d5c3a72e5fea8364a1e3e5b488a959aae08d069995b1274027f3845e6521\",\"dweb:/ipfs/Qma7DL738Wje4G9kcwW9bXwTGY4ePR7SMmsMhbULWqmixE\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x3b21f2c8d626de3b9925ae33e972d8bf5c8b1bffb3f4ee94daeed7d0679036e6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7f8d45329fecbf0836ad7543330c3ecd0f8d0ffa42d4016278c3eb2215fdcdfe\",\"dweb:/ipfs/QmXWLT7GcnHtA5NiD6MFi2CV3EWJY4wv5mLNnypqYDrxL3\"]},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xcbd85c86627a47fd939f1f4ee3ba626575ff2a182e1804b29f5136394449b538\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://53c6a80c519bb9356aad28efa9a1ec31603860eb759d2dc57f545fcae1dd1aca\",\"dweb:/ipfs/QmfRS6TtMNUHhvgLHXK21qKNnpn2S7g2Yd1fKaHKyFiJsR\"]},\"@openzeppelin/contracts/token/ERC20/ERC20Snapshot.sol\":{\"keccak256\":\"0xa0d5ab817deac6b41ec1f8c583d3305c512871565674163e451b2b191045d1be\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://37948a259a858f44d6142e98463b2d2a91c57c55390a580cb288b18b1c786329\",\"dweb:/ipfs/Qme7PSSP42v4QoGYFFB6h7wLeCgo1dYrVcfNfQgzbs4dvD\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xa6a15ddddcbf29d2922a1e0d4151b5d2d33da24b93cc9ebc12390e0d855532f8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7c119bcaecfa853d564ac88d312777f75fa1126a3bca88a3371adb0ad9f35cb0\",\"dweb:/ipfs/QmY9UPuXeSKq86Zh38fE43VGQPhKMN34mkuFSFqPcr6nvZ\"]},\"@openzeppelin/contracts/utils/Arrays.sol\":{\"keccak256\":\"0x04cf924bfffd3331758fe93625fa90ea307f09d3ea57aa1c6a070cfcfe562674\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://16f415f3dd1fbf08a7b975bb055bf5da47e770ed4be927aecb3a60938d24fd54\",\"dweb:/ipfs/QmbpU3mL5SetKVqHHhozsFgntVCFTmFmN2xZXLe3iktCAX\"]},\"@openzeppelin/contracts/utils/Counters.sol\":{\"keccak256\":\"0x21662e4254ce4ac8570b30cc7ab31435966b3cb778a56ba4d09276881cfb2437\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://acce8fe6adc670f9987a8b6aedc4cc0abcd0dcd2e152d649a12099d735bd7bad\",\"dweb:/ipfs/QmXAk17oK3daBmA8CGyVcU56L496jW3U6Ef1WkfHyB1JAV\"]},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"keccak256\":\"0xae0992eb1ec30fd1ecdf2e04a6036decfc9797bf11dc1ec84b546b74318d5ec2\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3b61f99a64e999682ad7bfbb3a1c762a20a0a5b30f9f2011693fa857969af61f\",\"dweb:/ipfs/QmZystFY76wkWCf7V3yKh3buZuKVKbswiE7y6yU62kk3zi\"]}},\"version\":1}", - "bytecode": "0x60c06040523480156200001157600080fd5b506040516200319038038062003190833981810160405260c08110156200003757600080fd5b8151602083018051604051929492938301929190846401000000008211156200005f57600080fd5b9083019060208201858111156200007557600080fd5b82516401000000008111828201881017156200009057600080fd5b82525081516020918201929091019080838360005b83811015620000bf578181015183820152602001620000a5565b50505050905090810190601f168015620000ed5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011157600080fd5b9083019060208201858111156200012757600080fd5b82516401000000008111828201881017156200014257600080fd5b82525081516020918201929091019080838360005b838110156200017157818101518382015260200162000157565b50505050905090810190601f1680156200019f5780820380516001836020036101000a031916815260200191505b50604081815260208301519201805192949193919284640100000000821115620001c857600080fd5b908301906020820185811115620001de57600080fd5b8251866020820283011164010000000082111715620001fc57600080fd5b82525081516020918201928201910280838360005b838110156200022b57818101518382015260200162000211565b50505050905001604052602001805160405193929190846401000000008211156200025557600080fd5b9083019060208201858111156200026b57600080fd5b82518660208202830111640100000000821117156200028957600080fd5b82525081516020918201928201910280838360005b83811015620002b85781810151838201526020016200029e565b50505050905001604052505050848484848482828287878160039080519060200190620002e7929190620005eb565b508051620002fd906004906020840190620005eb565b50506005805460ff1916601217905550620003487fce55f595624c86c7e93aa4cf15cb4a958406550ae728a9b7ffda71a7d62eca73600080516020620031708339815191526200046d565b60005b825181101562000387576200037e6000801b8483815181106200036a57fe5b6020026020010151620004bf60201b60201c565b6001016200034b565b5060005b8151811015620003bf57620003b6600080516020620031708339815191528383815181106200036a57fe5b6001016200038b565b50505060805250506007805460ff191690555050506001600160601b0319606087901b1660a0526040805163313ce56760e01b8152905162000461916001600160a01b0389169163313ce56791600480820192602092909190829003018186803b1580156200042d57600080fd5b505afa15801562000442573d6000803e3d6000fd5b505050506040513d60208110156200045957600080fd5b5051620004cf565b50505050505062000687565b600082815260066020526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526006602052604090912060020155565b620004cb8282620004e5565b5050565b6005805460ff191660ff92909216919091179055565b60008281526006602090815260409091206200050c918390620017f862000560821b17901c565b15620004cb576200051c62000580565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000577836001600160a01b03841662000584565b90505b92915050565b3390565b6000620005928383620005d3565b620005ca575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200057a565b5060006200057a565b60009081526001919091016020526040902054151590565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200062e57805160ff19168380011785556200065e565b828001600101855582156200065e579182015b828111156200065e57825182559160200191906001019062000641565b506200066c92915062000670565b5090565b5b808211156200066c576000815560010162000671565b60805160a05160601c612a9f620006d160003980610bcf5280610d07528061113552806113d652806116695280611c485280611f575250806111e152806124075250612a9f6000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c80637f4ab1dd1161013b578063a457c2d7116100b8578063cae9ca511161007c578063cae9ca51146108c7578063ce7460241461094a578063d4ce141514610952578063d547741f14610988578063dd62ed3e146109b457610248565b8063a457c2d7146107b2578063a4c0ed36146107de578063a9059cbb14610861578063b6b55f251461088d578063ca15c873146108aa57610248565b806395d89b41116100ff57806395d89b41146107575780639711715a1461075f578063981b24d0146107675780639944f51814610784578063a217fddf146107aa57610248565b80637f4ab1dd146106535780638f4ffcb1146106735780639010d07c14610700578063906a26e01461072357806391d148541461072b57610248565b80632b9edee9116101c9578063395093511161018d57806339509351146104e45780634000aea0146105105780634a4e629c146105935780634ee2cd7e1461060157806370a082311461062d57610248565b80632b9edee9146104495780632e1a7d4d146104515780632f2ff15d1461046e578063313ce5671461049a57806336568abe146104b857610248565b806321c0b3421161021057806321c0b3421461039c57806323b872dd146103ca578063248a9ca3146104005780632495a5991461041d57806327e9083b1461044157610248565b806302d7fd921461024d57806306fdde0314610267578063095ea7b3146102e457806318160ddd1461032457806318f33caf1461032c575b600080fd5b6102556109e2565b60408051918252519081900360200190f35b61026f610a06565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102a9578181015183820152602001610291565b50505050905090810190601f1680156102d65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610310600480360360408110156102fa57600080fd5b506001600160a01b038135169060200135610a9c565b604080519115158252519081900360200190f35b610255610aba565b61039a6004803603602081101561034257600080fd5b810190602081018135600160201b81111561035c57600080fd5b82018360208201111561036e57600080fd5b803590602001918460208302840111600160201b8311171561038f57600080fd5b509092509050610ac0565b005b61039a600480360360408110156103b257600080fd5b506001600160a01b0381358116916020013516610b0b565b610310600480360360608110156103e057600080fd5b506001600160a01b03813581169160208101359091169060400135610c65565b6102556004803603602081101561041657600080fd5b5035610ced565b610425610d05565b604080516001600160a01b039092168252519081900360200190f35b610255610d29565b610310610d3b565b61039a6004803603602081101561046757600080fd5b5035610d44565b61039a6004803603604081101561048457600080fd5b50803590602001356001600160a01b0316610d69565b6104a2610dd5565b6040805160ff9092168252519081900360200190f35b61039a600480360360408110156104ce57600080fd5b50803590602001356001600160a01b0316610dde565b610310600480360360408110156104fa57600080fd5b506001600160a01b038135169060200135610e3f565b6103106004803603606081101561052657600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561055557600080fd5b82018360208201111561056757600080fd5b803590602001918460018302840111600160201b8311171561058857600080fd5b509092509050610e8d565b61039a600480360360208110156105a957600080fd5b810190602081018135600160201b8111156105c357600080fd5b8201836020820111156105d557600080fd5b803590602001918460208302840111600160201b831117156105f657600080fd5b509092509050610fb4565b6102556004803603604081101561061757600080fd5b506001600160a01b038135169060200135610ffa565b6102556004803603602081101561064357600080fd5b50356001600160a01b0316611043565b61026f6004803603602081101561066957600080fd5b503560ff1661105e565b6103106004803603608081101561068957600080fd5b6001600160a01b038235811692602081013592604082013590921691810190608081016060820135600160201b8111156106c257600080fd5b8201836020820111156106d457600080fd5b803590602001918460018302840111600160201b831117156106f557600080fd5b509092509050611131565b6104256004803603604081101561071657600080fd5b50803590602001356111c7565b6102556111df565b6103106004803603604081101561074157600080fd5b50803590602001356001600160a01b0316611203565b61026f61121b565b61025561127c565b6102556004803603602081101561077d57600080fd5b503561131b565b6103106004803603602081101561079a57600080fd5b50356001600160a01b031661134b565b610255611365565b610310600480360360408110156107c857600080fd5b506001600160a01b03813516906020013561136a565b610310600480360360608110156107f457600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561082357600080fd5b82018360208201111561083557600080fd5b803590602001918460018302840111600160201b8311171561085657600080fd5b5090925090506113d2565b6103106004803603604081101561087757600080fd5b506001600160a01b03813516906020013561145a565b61039a600480360360208110156108a357600080fd5b503561146e565b610255600480360360208110156108c057600080fd5b5035611490565b610310600480360360608110156108dd57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561090c57600080fd5b82018360208201111561091e57600080fd5b803590602001918460018302840111600160201b8311171561093f57600080fd5b5090925090506114a7565b61039a6115d4565b6104a26004803603606081101561096857600080fd5b506001600160a01b03813581169160208101359091169060400135611712565b61039a6004803603604081101561099e57600080fd5b50803590602001356001600160a01b0316611774565b610255600480360360408110156109ca57600080fd5b506001600160a01b03813581169160200135166117cd565b7f811427a0fa4932aef534bba16bc34e9b7b2d7d2a79c475fca1765f6cc1faebea81565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a925780601f10610a6757610100808354040283529160200191610a92565b820191906000526020600020905b815481529060010190602001808311610a7557829003601f168201915b5050505050905090565b6000610ab0610aa961180d565b8484611811565b5060015b92915050565b60025490565b60005b81811015610b0657610afe600080516020612964833981519152848484818110610ae957fe5b905060200201356001600160a01b0316610d69565b600101610ac3565b505050565b6000610b1561180d565b6040518060400160405280600a81526020016937b7363c96b0b236b4b760b11b815250610b428383611203565b8190610bcc5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b91578181015183820152602001610b79565b50505050905090810190601f168015610bbe5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b03161415610c54576040805162461bcd60e51b815260206004820152601d60248201527f63616e6e6f742d636c61696d2d756e6465726c79696e672d746f6b656e000000604482015290519081900360640190fd5b610c5e85856118fd565b5050505050565b6000610c72848484611995565b610ce284610c7e61180d565b610cdd85604051806060016040528060288152602001612984602891396001600160a01b038a16600090815260016020526040812090610cbc61180d565b6001600160a01b031681526020810191909152604001600020549190611af0565b611811565b5060015b9392505050565b6000818152600660205260409020600201545b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008051602061296483398151915281565b60075460ff1681565b610d55610d4f61180d565b82611b4a565b610d66610d6061180d565b82611c46565b50565b600082815260066020526040902060020154610d8c90610d8761180d565b611203565b610dc75760405162461bcd60e51b815260040180806020018281038252602f81526020018061289b602f913960400191505060405180910390fd5b610dd18282611d2c565b5050565b60055460ff1690565b610de661180d565b6001600160a01b0316816001600160a01b031614610e355760405162461bcd60e51b815260040180806020018281038252602f815260200180612a3b602f913960400191505060405180910390fd5b610dd18282611d95565b6000610ab0610e4c61180d565b84610cdd8560016000610e5d61180d565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611dfe565b6000610e99858561145a565b50846001600160a01b031663a4c0ed36610eb161180d565b8686866040518563ffffffff1660e01b815260040180856001600160a01b03168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050602060405180830381600087803b158015610f2c57600080fd5b505af1158015610f40573d6000803e3d6000fd5b505050506040513d6020811015610f5657600080fd5b5051610fa9576040805162461bcd60e51b815260206004820152601c60248201527f7472616e736665722d726566757365642d62792d726563656976657200000000604482015290519081900360640190fd5b506001949350505050565b60005b81811015610b0657610ff2600080516020612964833981519152848484818110610fdd57fe5b905060200201356001600160a01b0316611774565b600101610fb7565b6001600160a01b038216600090815260086020526040812081908190611021908590611e58565b91509150816110385761103385611043565b61103a565b805b95945050505050565b6001600160a01b031660009081526020819052604090205490565b606060ff82166001141561109e575060408051808201909152601581527453656e646572206973206d697373696e67204b594360581b6020820152610d00565b60ff8216600214156110e4575060408051808201909152601781527f5265636569766572206973206d697373696e67204b59430000000000000000006020820152610d00565b6040805162461bcd60e51b815260206004820152601860248201527f696e76616c69642d7265737472696374696f6e2d636f64650000000000000000604482015290519081900360640190fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316146111a7576040805162461bcd60e51b815260206004820152600b60248201526a3bb937b73396ba37b5b2b760a91b604482015290519081900360640190fd5b6111b18686611f55565b6111bb8686612050565b50600195945050505050565b6000828152600660205260408120610ce6908361205a565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000828152600660205260408120610ce69083612066565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a925780601f10610a6757610100808354040283529160200191610a92565b60008061128761180d565b604051806040016040528060138152602001723932b9ba3934b1ba32b216ba3796b0b236b4b760691b8152506112bd8383611203565b819061130a5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b91578181015183820152602001610b79565b5061131361207b565b935050505090565b600080600061132b846009611e58565b91509150816113415761133c610aba565b611343565b805b949350505050565b6000610ab460008051602061296483398151915283611203565b600081565b6000610ab061137761180d565b84610cdd85604051806060016040528060258152602001612a1660259139600160006113a161180d565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611af0565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661140661180d565b6001600160a01b031614611450576040805162461bcd60e51b815260206004820152600c60248201526b3bb937b73396b9b2b73232b960a11b604482015290519081900360640190fd5b610fa98585612050565b6000610ab061146761180d565b8484611995565b61147f61147961180d565b82611f55565b610d6661148a61180d565b82612050565b6000818152600660205260408120610ab4906120cf565b60006114b38585610a9c565b50846001600160a01b0316638f4ffcb16114cb61180d565b863087876040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001846001600160a01b03168152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050602060405180830381600087803b15801561155757600080fd5b505af115801561156b573d6000803e3d6000fd5b505050506040513d602081101561158157600080fd5b5051610fa9576040805162461bcd60e51b815260206004820152601c60248201527f617070726f76616c2d726566757365642d62792d726563656976657200000000604482015290519081900360640190fd5b60006115de61180d565b6040518060400160405280600a81526020016937b7363c96b0b236b4b760b11b81525061160b8383611203565b81906116585760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b91578181015183820152602001610b79565b50610b0661166461180d565b61170d7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156116d457600080fd5b505afa1580156116e8573d6000803e3d6000fd5b505050506040513d60208110156116fe57600080fd5b5051611708610aba565b6120da565b612050565b60006001600160a01b0384161580159061173257506117308461134b565b155b1561173f57506001610ce6565b6001600160a01b0383161580159061175d575061175b8361134b565b155b1561176a57506002610ce6565b5060009392505050565b60008281526006602052604090206002015461179290610d8761180d565b610e355760405162461bcd60e51b81526004018080602001828103825260308152602001806129346030913960400191505060405180910390fd5b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6000610ce6836001600160a01b03841661211c565b3390565b6001600160a01b0383166118565760405162461bcd60e51b81526004018080602001828103825260248152602001806129f26024913960400191505060405180910390fd5b6001600160a01b03821661189b5760405162461bcd60e51b81526004018080602001828103825260228152602001806128ec6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600061190761180d565b604051806040016040528060138152602001723932b9ba3934b1ba32b216ba3796b0b236b4b760691b81525061193d8383611203565b819061198a5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b91578181015183820152602001610b79565b50610c5e8585612166565b6001600160a01b0383166119da5760405162461bcd60e51b81526004018080602001828103825260258152602001806129cd6025913960400191505060405180910390fd5b6001600160a01b038216611a1f5760405162461bcd60e51b81526004018080602001828103825260238152602001806128786023913960400191505060405180910390fd5b611a2a83838361231d565b611a678160405180606001604052806026815260200161290e602691396001600160a01b0386166000908152602081905260409020549190611af0565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611a969082611dfe565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611b425760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b91578181015183820152602001610b79565b505050900390565b6001600160a01b038216611b8f5760405162461bcd60e51b81526004018080602001828103825260218152602001806129ac6021913960400191505060405180910390fd5b611b9b8260008361231d565b611bd8816040518060600160405280602281526020016128ca602291396001600160a01b0385166000908152602081905260409020549190611af0565b6001600160a01b038316600090815260208190526040902055600254611bfe90826120da565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611cbd57600080fd5b505af1158015611cd1573d6000803e3d6000fd5b505050506040513d6020811015611ce757600080fd5b5051610dd1576040805162461bcd60e51b815260206004820152600f60248201526e3330b4b632b216ba3930b739b332b960891b604482015290519081900360640190fd5b6000828152600660205260409020611d4490826117f8565b15610dd157611d5161180d565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152600660205260409020611dad9082612333565b15610dd157611dba61180d565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600082820183811015610ce6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008060008411611ea9576040805162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b604482015290519081900360640190fd5b611eb3600b612348565b841115611f07576040805162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e74206964000000604482015290519081900360640190fd5b6000611f13848661234c565b8454909150811415611f2c576000809250925050611f4e565b6001846001018281548110611f3d57fe5b906000526020600020015492509250505b9250929050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd8330846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b158015611fdd57600080fd5b505af1158015611ff1573d6000803e3d6000fd5b505050506040513d602081101561200757600080fd5b5051610dd1576040805162461bcd60e51b81526020600482015260136024820152726661696c65642d7472616e7366657246726f6d60681b604482015290519081900360640190fd5b610dd182826123ed565b6000610ce68383612470565b6000610ce6836001600160a01b0384166124d4565b6000612087600b6124ec565b6000612093600b612348565b6040805182815290519192507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67919081900360200190a1905090565b6000610ab482612348565b6000610ce683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611af0565b600061212883836124d4565b61215e57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ab4565b506000610ab4565b6001600160a01b038216612215576040516000906001600160a01b0383169047908381818185875af1925050503d80600081146121bf576040519150601f19603f3d011682016040523d82523d6000602084013e6121c4565b606091505b505090508061220f576040805162461bcd60e51b81526020600482015260126024820152710cae4e4dee45ac6d8c2d2dad2dcce5acae8d60731b604482015290519081900360640190fd5b50610dd1565b816001600160a01b031663a9059cbb82846001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561227257600080fd5b505afa158015612286573d6000803e3d6000fd5b505050506040513d602081101561229c57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b1580156122ed57600080fd5b505af1158015612301573d6000803e3d6000fd5b505050506040513d602081101561231757600080fd5b50505050565b6123288383836124f5565b610b0683838361254d565b6000610ce6836001600160a01b0384166125c0565b5490565b815460009061235d57506000610ab4565b82546000905b808210156123ac5760006123778383612686565b90508486828154811061238657fe5b9060005260206000200154111561239f578091506123a6565b8060010192505b50612363565b6000821180156123d45750838560018403815481106123c757fe5b9060005260206000200154145b156123e55750600019019050610ab4565b509050610ab4565b6123f782826126ab565b60075460ff1615801561243157507f000000000000000000000000000000000000000000000000000000000000000061242e610aba565b10155b15610dd1576007805460ff191660011790556040517f629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d3490600090a15050565b815460009082106124b25760405162461bcd60e51b81526004018080602001828103825260228152602001806128566022913960400191505060405180910390fd5b8260000182815481106124c157fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b80546001019055565b61250083838361254d565b6001600160a01b038316612524576125178261279b565b61251f6127c5565b610b06565b6001600160a01b03821661253b576125178361279b565b6125448361279b565b610b068261279b565b600061255a848484611712565b905060ff8116156125b55761256e8161105e565b60405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b91578181015183820152602001610b79565b612317848484610b06565b6000818152600183016020526040812054801561267c57835460001980830191908101906000908790839081106125f357fe5b906000526020600020015490508087600001848154811061261057fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061264057fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610ab4565b6000915050610ab4565b6000600280830660028506018161269957fe5b04600283046002850401019392505050565b6001600160a01b038216612706576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6127126000838361231d565b60025461271f9082611dfe565b6002556001600160a01b0382166000908152602081905260409020546127459082611dfe565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0381166000908152600860205260409020610d66906127c083611043565b6127d4565b6127d260096127c0610aba565b565b60006127e0600b612348565b9050806127ec84612820565b1015610b06578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b805460009061283157506000610d00565b81548290600019810190811061284357fe5b90600052602060002001549050610d0056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65ce55f595624c86c7e93aa4cf15cb4a958406550ae728a9b7ffda71a7d62eca7345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220bc884e74ef113483e79df929c5d7f950f3937be32d5177207b8b35833109238b64736f6c634300060c0033811427a0fa4932aef534bba16bc34e9b7b2d7d2a79c475fca1765f6cc1faebea", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102485760003560e01c80637f4ab1dd1161013b578063a457c2d7116100b8578063cae9ca511161007c578063cae9ca51146108c7578063ce7460241461094a578063d4ce141514610952578063d547741f14610988578063dd62ed3e146109b457610248565b8063a457c2d7146107b2578063a4c0ed36146107de578063a9059cbb14610861578063b6b55f251461088d578063ca15c873146108aa57610248565b806395d89b41116100ff57806395d89b41146107575780639711715a1461075f578063981b24d0146107675780639944f51814610784578063a217fddf146107aa57610248565b80637f4ab1dd146106535780638f4ffcb1146106735780639010d07c14610700578063906a26e01461072357806391d148541461072b57610248565b80632b9edee9116101c9578063395093511161018d57806339509351146104e45780634000aea0146105105780634a4e629c146105935780634ee2cd7e1461060157806370a082311461062d57610248565b80632b9edee9146104495780632e1a7d4d146104515780632f2ff15d1461046e578063313ce5671461049a57806336568abe146104b857610248565b806321c0b3421161021057806321c0b3421461039c57806323b872dd146103ca578063248a9ca3146104005780632495a5991461041d57806327e9083b1461044157610248565b806302d7fd921461024d57806306fdde0314610267578063095ea7b3146102e457806318160ddd1461032457806318f33caf1461032c575b600080fd5b6102556109e2565b60408051918252519081900360200190f35b61026f610a06565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102a9578181015183820152602001610291565b50505050905090810190601f1680156102d65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610310600480360360408110156102fa57600080fd5b506001600160a01b038135169060200135610a9c565b604080519115158252519081900360200190f35b610255610aba565b61039a6004803603602081101561034257600080fd5b810190602081018135600160201b81111561035c57600080fd5b82018360208201111561036e57600080fd5b803590602001918460208302840111600160201b8311171561038f57600080fd5b509092509050610ac0565b005b61039a600480360360408110156103b257600080fd5b506001600160a01b0381358116916020013516610b0b565b610310600480360360608110156103e057600080fd5b506001600160a01b03813581169160208101359091169060400135610c65565b6102556004803603602081101561041657600080fd5b5035610ced565b610425610d05565b604080516001600160a01b039092168252519081900360200190f35b610255610d29565b610310610d3b565b61039a6004803603602081101561046757600080fd5b5035610d44565b61039a6004803603604081101561048457600080fd5b50803590602001356001600160a01b0316610d69565b6104a2610dd5565b6040805160ff9092168252519081900360200190f35b61039a600480360360408110156104ce57600080fd5b50803590602001356001600160a01b0316610dde565b610310600480360360408110156104fa57600080fd5b506001600160a01b038135169060200135610e3f565b6103106004803603606081101561052657600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561055557600080fd5b82018360208201111561056757600080fd5b803590602001918460018302840111600160201b8311171561058857600080fd5b509092509050610e8d565b61039a600480360360208110156105a957600080fd5b810190602081018135600160201b8111156105c357600080fd5b8201836020820111156105d557600080fd5b803590602001918460208302840111600160201b831117156105f657600080fd5b509092509050610fb4565b6102556004803603604081101561061757600080fd5b506001600160a01b038135169060200135610ffa565b6102556004803603602081101561064357600080fd5b50356001600160a01b0316611043565b61026f6004803603602081101561066957600080fd5b503560ff1661105e565b6103106004803603608081101561068957600080fd5b6001600160a01b038235811692602081013592604082013590921691810190608081016060820135600160201b8111156106c257600080fd5b8201836020820111156106d457600080fd5b803590602001918460018302840111600160201b831117156106f557600080fd5b509092509050611131565b6104256004803603604081101561071657600080fd5b50803590602001356111c7565b6102556111df565b6103106004803603604081101561074157600080fd5b50803590602001356001600160a01b0316611203565b61026f61121b565b61025561127c565b6102556004803603602081101561077d57600080fd5b503561131b565b6103106004803603602081101561079a57600080fd5b50356001600160a01b031661134b565b610255611365565b610310600480360360408110156107c857600080fd5b506001600160a01b03813516906020013561136a565b610310600480360360608110156107f457600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561082357600080fd5b82018360208201111561083557600080fd5b803590602001918460018302840111600160201b8311171561085657600080fd5b5090925090506113d2565b6103106004803603604081101561087757600080fd5b506001600160a01b03813516906020013561145a565b61039a600480360360208110156108a357600080fd5b503561146e565b610255600480360360208110156108c057600080fd5b5035611490565b610310600480360360608110156108dd57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561090c57600080fd5b82018360208201111561091e57600080fd5b803590602001918460018302840111600160201b8311171561093f57600080fd5b5090925090506114a7565b61039a6115d4565b6104a26004803603606081101561096857600080fd5b506001600160a01b03813581169160208101359091169060400135611712565b61039a6004803603604081101561099e57600080fd5b50803590602001356001600160a01b0316611774565b610255600480360360408110156109ca57600080fd5b506001600160a01b03813581169160200135166117cd565b7f811427a0fa4932aef534bba16bc34e9b7b2d7d2a79c475fca1765f6cc1faebea81565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a925780601f10610a6757610100808354040283529160200191610a92565b820191906000526020600020905b815481529060010190602001808311610a7557829003601f168201915b5050505050905090565b6000610ab0610aa961180d565b8484611811565b5060015b92915050565b60025490565b60005b81811015610b0657610afe600080516020612964833981519152848484818110610ae957fe5b905060200201356001600160a01b0316610d69565b600101610ac3565b505050565b6000610b1561180d565b6040518060400160405280600a81526020016937b7363c96b0b236b4b760b11b815250610b428383611203565b8190610bcc5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b91578181015183820152602001610b79565b50505050905090810190601f168015610bbe5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b03161415610c54576040805162461bcd60e51b815260206004820152601d60248201527f63616e6e6f742d636c61696d2d756e6465726c79696e672d746f6b656e000000604482015290519081900360640190fd5b610c5e85856118fd565b5050505050565b6000610c72848484611995565b610ce284610c7e61180d565b610cdd85604051806060016040528060288152602001612984602891396001600160a01b038a16600090815260016020526040812090610cbc61180d565b6001600160a01b031681526020810191909152604001600020549190611af0565b611811565b5060015b9392505050565b6000818152600660205260409020600201545b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008051602061296483398151915281565b60075460ff1681565b610d55610d4f61180d565b82611b4a565b610d66610d6061180d565b82611c46565b50565b600082815260066020526040902060020154610d8c90610d8761180d565b611203565b610dc75760405162461bcd60e51b815260040180806020018281038252602f81526020018061289b602f913960400191505060405180910390fd5b610dd18282611d2c565b5050565b60055460ff1690565b610de661180d565b6001600160a01b0316816001600160a01b031614610e355760405162461bcd60e51b815260040180806020018281038252602f815260200180612a3b602f913960400191505060405180910390fd5b610dd18282611d95565b6000610ab0610e4c61180d565b84610cdd8560016000610e5d61180d565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611dfe565b6000610e99858561145a565b50846001600160a01b031663a4c0ed36610eb161180d565b8686866040518563ffffffff1660e01b815260040180856001600160a01b03168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050602060405180830381600087803b158015610f2c57600080fd5b505af1158015610f40573d6000803e3d6000fd5b505050506040513d6020811015610f5657600080fd5b5051610fa9576040805162461bcd60e51b815260206004820152601c60248201527f7472616e736665722d726566757365642d62792d726563656976657200000000604482015290519081900360640190fd5b506001949350505050565b60005b81811015610b0657610ff2600080516020612964833981519152848484818110610fdd57fe5b905060200201356001600160a01b0316611774565b600101610fb7565b6001600160a01b038216600090815260086020526040812081908190611021908590611e58565b91509150816110385761103385611043565b61103a565b805b95945050505050565b6001600160a01b031660009081526020819052604090205490565b606060ff82166001141561109e575060408051808201909152601581527453656e646572206973206d697373696e67204b594360581b6020820152610d00565b60ff8216600214156110e4575060408051808201909152601781527f5265636569766572206973206d697373696e67204b59430000000000000000006020820152610d00565b6040805162461bcd60e51b815260206004820152601860248201527f696e76616c69642d7265737472696374696f6e2d636f64650000000000000000604482015290519081900360640190fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316146111a7576040805162461bcd60e51b815260206004820152600b60248201526a3bb937b73396ba37b5b2b760a91b604482015290519081900360640190fd5b6111b18686611f55565b6111bb8686612050565b50600195945050505050565b6000828152600660205260408120610ce6908361205a565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000828152600660205260408120610ce69083612066565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a925780601f10610a6757610100808354040283529160200191610a92565b60008061128761180d565b604051806040016040528060138152602001723932b9ba3934b1ba32b216ba3796b0b236b4b760691b8152506112bd8383611203565b819061130a5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b91578181015183820152602001610b79565b5061131361207b565b935050505090565b600080600061132b846009611e58565b91509150816113415761133c610aba565b611343565b805b949350505050565b6000610ab460008051602061296483398151915283611203565b600081565b6000610ab061137761180d565b84610cdd85604051806060016040528060258152602001612a1660259139600160006113a161180d565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611af0565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661140661180d565b6001600160a01b031614611450576040805162461bcd60e51b815260206004820152600c60248201526b3bb937b73396b9b2b73232b960a11b604482015290519081900360640190fd5b610fa98585612050565b6000610ab061146761180d565b8484611995565b61147f61147961180d565b82611f55565b610d6661148a61180d565b82612050565b6000818152600660205260408120610ab4906120cf565b60006114b38585610a9c565b50846001600160a01b0316638f4ffcb16114cb61180d565b863087876040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001846001600160a01b03168152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050602060405180830381600087803b15801561155757600080fd5b505af115801561156b573d6000803e3d6000fd5b505050506040513d602081101561158157600080fd5b5051610fa9576040805162461bcd60e51b815260206004820152601c60248201527f617070726f76616c2d726566757365642d62792d726563656976657200000000604482015290519081900360640190fd5b60006115de61180d565b6040518060400160405280600a81526020016937b7363c96b0b236b4b760b11b81525061160b8383611203565b81906116585760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b91578181015183820152602001610b79565b50610b0661166461180d565b61170d7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156116d457600080fd5b505afa1580156116e8573d6000803e3d6000fd5b505050506040513d60208110156116fe57600080fd5b5051611708610aba565b6120da565b612050565b60006001600160a01b0384161580159061173257506117308461134b565b155b1561173f57506001610ce6565b6001600160a01b0383161580159061175d575061175b8361134b565b155b1561176a57506002610ce6565b5060009392505050565b60008281526006602052604090206002015461179290610d8761180d565b610e355760405162461bcd60e51b81526004018080602001828103825260308152602001806129346030913960400191505060405180910390fd5b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6000610ce6836001600160a01b03841661211c565b3390565b6001600160a01b0383166118565760405162461bcd60e51b81526004018080602001828103825260248152602001806129f26024913960400191505060405180910390fd5b6001600160a01b03821661189b5760405162461bcd60e51b81526004018080602001828103825260228152602001806128ec6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600061190761180d565b604051806040016040528060138152602001723932b9ba3934b1ba32b216ba3796b0b236b4b760691b81525061193d8383611203565b819061198a5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b91578181015183820152602001610b79565b50610c5e8585612166565b6001600160a01b0383166119da5760405162461bcd60e51b81526004018080602001828103825260258152602001806129cd6025913960400191505060405180910390fd5b6001600160a01b038216611a1f5760405162461bcd60e51b81526004018080602001828103825260238152602001806128786023913960400191505060405180910390fd5b611a2a83838361231d565b611a678160405180606001604052806026815260200161290e602691396001600160a01b0386166000908152602081905260409020549190611af0565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611a969082611dfe565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611b425760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b91578181015183820152602001610b79565b505050900390565b6001600160a01b038216611b8f5760405162461bcd60e51b81526004018080602001828103825260218152602001806129ac6021913960400191505060405180910390fd5b611b9b8260008361231d565b611bd8816040518060600160405280602281526020016128ca602291396001600160a01b0385166000908152602081905260409020549190611af0565b6001600160a01b038316600090815260208190526040902055600254611bfe90826120da565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611cbd57600080fd5b505af1158015611cd1573d6000803e3d6000fd5b505050506040513d6020811015611ce757600080fd5b5051610dd1576040805162461bcd60e51b815260206004820152600f60248201526e3330b4b632b216ba3930b739b332b960891b604482015290519081900360640190fd5b6000828152600660205260409020611d4490826117f8565b15610dd157611d5161180d565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152600660205260409020611dad9082612333565b15610dd157611dba61180d565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600082820183811015610ce6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008060008411611ea9576040805162461bcd60e51b815260206004820152601660248201527504552433230536e617073686f743a20696420697320360541b604482015290519081900360640190fd5b611eb3600b612348565b841115611f07576040805162461bcd60e51b815260206004820152601d60248201527f4552433230536e617073686f743a206e6f6e6578697374656e74206964000000604482015290519081900360640190fd5b6000611f13848661234c565b8454909150811415611f2c576000809250925050611f4e565b6001846001018281548110611f3d57fe5b906000526020600020015492509250505b9250929050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166323b872dd8330846040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b158015611fdd57600080fd5b505af1158015611ff1573d6000803e3d6000fd5b505050506040513d602081101561200757600080fd5b5051610dd1576040805162461bcd60e51b81526020600482015260136024820152726661696c65642d7472616e7366657246726f6d60681b604482015290519081900360640190fd5b610dd182826123ed565b6000610ce68383612470565b6000610ce6836001600160a01b0384166124d4565b6000612087600b6124ec565b6000612093600b612348565b6040805182815290519192507f8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67919081900360200190a1905090565b6000610ab482612348565b6000610ce683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611af0565b600061212883836124d4565b61215e57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ab4565b506000610ab4565b6001600160a01b038216612215576040516000906001600160a01b0383169047908381818185875af1925050503d80600081146121bf576040519150601f19603f3d011682016040523d82523d6000602084013e6121c4565b606091505b505090508061220f576040805162461bcd60e51b81526020600482015260126024820152710cae4e4dee45ac6d8c2d2dad2dcce5acae8d60731b604482015290519081900360640190fd5b50610dd1565b816001600160a01b031663a9059cbb82846001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561227257600080fd5b505afa158015612286573d6000803e3d6000fd5b505050506040513d602081101561229c57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b1580156122ed57600080fd5b505af1158015612301573d6000803e3d6000fd5b505050506040513d602081101561231757600080fd5b50505050565b6123288383836124f5565b610b0683838361254d565b6000610ce6836001600160a01b0384166125c0565b5490565b815460009061235d57506000610ab4565b82546000905b808210156123ac5760006123778383612686565b90508486828154811061238657fe5b9060005260206000200154111561239f578091506123a6565b8060010192505b50612363565b6000821180156123d45750838560018403815481106123c757fe5b9060005260206000200154145b156123e55750600019019050610ab4565b509050610ab4565b6123f782826126ab565b60075460ff1615801561243157507f000000000000000000000000000000000000000000000000000000000000000061242e610aba565b10155b15610dd1576007805460ff191660011790556040517f629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d3490600090a15050565b815460009082106124b25760405162461bcd60e51b81526004018080602001828103825260228152602001806128566022913960400191505060405180910390fd5b8260000182815481106124c157fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b80546001019055565b61250083838361254d565b6001600160a01b038316612524576125178261279b565b61251f6127c5565b610b06565b6001600160a01b03821661253b576125178361279b565b6125448361279b565b610b068261279b565b600061255a848484611712565b905060ff8116156125b55761256e8161105e565b60405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610b91578181015183820152602001610b79565b612317848484610b06565b6000818152600183016020526040812054801561267c57835460001980830191908101906000908790839081106125f357fe5b906000526020600020015490508087600001848154811061261057fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061264057fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610ab4565b6000915050610ab4565b6000600280830660028506018161269957fe5b04600283046002850401019392505050565b6001600160a01b038216612706576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6127126000838361231d565b60025461271f9082611dfe565b6002556001600160a01b0382166000908152602081905260409020546127459082611dfe565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0381166000908152600860205260409020610d66906127c083611043565b6127d4565b6127d260096127c0610aba565b565b60006127e0600b612348565b9050806127ec84612820565b1015610b06578254600180820185556000858152602080822090930193909355938401805494850181558252902090910155565b805460009061283157506000610d00565b81548290600019810190811061284357fe5b90600052602060002001549050610d0056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e647345524332303a207472616e7366657220746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65ce55f595624c86c7e93aa4cf15cb4a958406550ae728a9b7ffda71a7d62eca7345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220bc884e74ef113483e79df929c5d7f950f3937be32d5177207b8b35833109238b64736f6c634300060c0033", - "immutableReferences": { - "201": [ - { - "length": 32, - "start": 4577 - }, - { - "length": 32, - "start": 9223 - } - ], - "469": [ - { - "length": 32, - "start": 3023 - }, - { - "length": 32, - "start": 3335 - }, - { - "length": 32, - "start": 4405 - }, - { - "length": 32, - "start": 5078 - }, - { - "length": 32, - "start": 5737 - }, - { - "length": 32, - "start": 7240 - }, - { - "length": 32, - "start": 8023 - } - ] - }, - "sourceMap": "1325:2845:5:-:0;;;1425:405;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1425:405:5;;;;;;;;;;-1:-1:-1;1425:405:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1425:405:5;;;;;;;;;;-1:-1:-1;1425:405:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1425:405:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1425:405:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1425:405:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1667:4;1673:6;1681:7;1690:6;1698:9;1703:7:4;1720:6;1728:9;1672:4;1678:6;2038:5:18;2030;:13;;;;;;;;;;;;:::i;:::-;-1:-1:-1;2053:17:18;;;;:7;;:17;;;;;:::i;:::-;-1:-1:-1;;2080:9:18;:14;;-1:-1:-1;;2080:14:18;2092:2;2080:14;;;-1:-1:-1;1821:46:6;1546:28;-1:-1:-1;;;;;;;;;;;1821:13:6;:46::i;:::-;1882:9;1877:118;1901:6;:13;1897:1;:17;1877:118;;;1943:41;1770:4:15;1954:18:6;;1974:6;1981:1;1974:9;;;;;;;;;;;;;;1943:10;;;:41;;:::i;:::-;1916:3;;1877:118;;;;2009:9;2004:120;2028:9;:16;2024:1;:20;2004:120;;;2073:40;-1:-1:-1;;;;;;;;;;;2100:9:6;2110:1;2100:12;;;;;;;2073:40;2046:3;;2004:120;;;-1:-1:-1;;;1530:24:2;;-1:-1:-1;;1564:14:2;:22;;-1:-1:-1;;1564:22:2;;;-1:-1:-1;;;;;;;;;1723:41:5::1;::::0;;;;::::1;::::0;1789:33:::1;::::0;;-1:-1:-1;;;1789:33:5;;;;1774:49:::1;::::0;-1:-1:-1;;;;;1723:41:5;::::1;::::0;1789:31:::1;::::0;:33:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;1723:41;1789:33;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;1789:33:5;1774:14:::1;:49::i;:::-;1425:405:::0;;;;;;1325:2845;;6821:196:15;6932:12;;;;:6;:12;;;;;;:22;;;6909:57;;6956:9;;6939:4;;6909:57;;6932:12;6909:57;6976:12;;;;:6;:12;;;;;;:22;;:34;6821:196::o;6586:110::-;6664:25;6675:4;6681:7;6664:10;:25::i;:::-;6586:110;;:::o;9976:88:18:-;10036:9;:21;;-1:-1:-1;;10036:21:18;;;;;;;;;;;;9976:88::o;7023:184:15:-;7096:12;;;;:6;:12;;;;;;;;:33;;7121:7;;7096:24;;;;;:33;;:::i;:::-;7092:109;;;7177:12;:10;:12::i;:::-;-1:-1:-1;;;;;7150:40:15;7168:7;-1:-1:-1;;;;;7150:40:15;7162:4;7150:40;;;;;;;;;;7023:184;;:::o;6429:141:24:-;6499:4;6522:41;6527:3;-1:-1:-1;;;;;6547:14:24;;6522:4;:41::i;:::-;6515:48;;6429:141;;;;;:::o;598:104:14:-;685:10;598:104;:::o;1640:404:24:-;1703:4;1724:21;1734:3;1739:5;1724:9;:21::i;:::-;1719:319;;-1:-1:-1;1761:23:24;;;;;;;;:11;:23;;;;;;;;;;;;;1941:18;;1919:19;;;:12;;;:19;;;;;;:40;;;;1973:11;;1719:319;-1:-1:-1;2022:5:24;2015:12;;3805:127;3878:4;3901:19;;;:12;;;;;:19;;;;;;:24;;;3805:127::o;1325:2845:5:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1325:2845:5;;;-1:-1:-1;1325:2845:5;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;", - "deployedSourceMap": "1325:2845:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1411:78:6;;;:::i;:::-;;;;;;;;;;;;;;;;2166:81:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4202:166;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4202:166:18;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;3209:98;;;:::i;2275:215:6:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2275:215:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2275:215:6;;;;;;;;;;-1:-1:-1;2275:215:6;;-1:-1:-1;2275:215:6;-1:-1:-1;2275:215:6;:::i;:::-;;2560:259:5;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2560:259:5;;;;;;;;;;:::i;4835:317:18:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4835:317:18;;;;;;;;;;;;;;;;;:::i;4280:112:15:-;;;;;;;;;;;;;;;;-1:-1:-1;4280:112:15;;:::i;1379:39:5:-;;;:::i;:::-;;;;-1:-1:-1;;;;;1379:39:5;;;;;;;;;;;;;;1495:79:6;;;:::i;1409:29:2:-;;;:::i;2212:134:5:-;;;;;;;;;;;;;;;;-1:-1:-1;2212:134:5;;:::i;4642:223:15:-;;;;;;;;;;;;;;;;-1:-1:-1;4642:223:15;;;;;;-1:-1:-1;;;;;4642:223:15;;:::i;3068:81:18:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5816:205:15;;;;;;;;;;;;;;;;-1:-1:-1;5816:205:15;;;;;;-1:-1:-1;;;;;5816:205:15;;:::i;5547:215:18:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5547:215:18;;;;;;;;:::i;1791:313:3:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1791:313:3;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1791:313:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1791:313:3;;;;;;;;;;-1:-1:-1;1791:313:3;;-1:-1:-1;1791:313:3;-1:-1:-1;1791:313:3;:::i;2496:217:6:-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2496:217:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2496:217:6;;;;;;;;;;-1:-1:-1;2496:217:6;;-1:-1:-1;2496:217:6;-1:-1:-1;2496:217:6;:::i;4285:254:19:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;4285:254:19;;;;;;;;:::i;3365:117:18:-;;;;;;;;;;;;;;;;-1:-1:-1;3365:117:18;-1:-1:-1;;;;;3365:117:18;;:::i;2236:418:1:-;;;;;;;;;;;;;;;;-1:-1:-1;2236:418:1;;;;:::i;3063:287:5:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3063:287:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3063:287:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3063:287:5;;;;;;;;;;-1:-1:-1;3063:287:5;;-1:-1:-1;3063:287:5;-1:-1:-1;3063:287:5;:::i;3963:136:15:-;;;;;;;;;;;;;;;;-1:-1:-1;3963:136:15;;;;;;;:::i;1371:32:2:-;;;:::i;2948:137:15:-;;;;;;;;;;;;;;;;-1:-1:-1;2948:137:15;;;;;;-1:-1:-1;;;;;2948:137:15;;:::i;2360:85:18:-;;;:::i;2164:170:4:-;;;:::i;4638:221:19:-;;;;;;;;;;;;;;;;-1:-1:-1;4638:221:19;;:::i;2136:133:6:-;;;;;;;;;;;;;;;;-1:-1:-1;2136:133:6;-1:-1:-1;;;;;2136:133:6;;:::i;1725:49:15:-;;;:::i;6249:266:18:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6249:266:18;;;;;;;;:::i;3356:246:5:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3356:246:5;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3356:246:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3356:246:5;;;;;;;;;;-1:-1:-1;3356:246:5;;-1:-1:-1;3356:246:5;-1:-1:-1;3356:246:5;:::i;3685:172:18:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3685:172:18;;;;;;;;:::i;2074:132:5:-;;;;;;;;;;;;;;;;-1:-1:-1;2074:132:5;;:::i;3253:125:15:-;;;;;;;;;;;;;;;;-1:-1:-1;3253:125:15;;:::i;1452:333:3:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1452:333:3;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1452:333:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1452:333:3;;;;;;;;;;-1:-1:-1;1452:333:3;;-1:-1:-1;1452:333:3;-1:-1:-1;1452:333:3;:::i;2352:202:5:-;;;:::i;1657:573:1:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1657:573:1;;;;;;;;;;;;;;;;;:::i;5099:226:15:-;;;;;;;;;;;;;;;;-1:-1:-1;5099:226:15;;;;;;-1:-1:-1;;;;;5099:226:15;;:::i;3915:149:18:-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3915:149:18;;;;;;;;;;:::i;1411:78:6:-;1462:27;1411:78;:::o;2166:81:18:-;2235:5;2228:12;;;;;;;;-1:-1:-1;;2228:12:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2203:13;;2228:12;;2235:5;;2228:12;;2235:5;2228:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2166:81;:::o;4202:166::-;4285:4;4301:39;4310:12;:10;:12::i;:::-;4324:7;4333:6;4301:8;:39::i;:::-;-1:-1:-1;4357:4:18;4202:166;;;;;:::o;3209:98::-;3288:12;;3209:98;:::o;2275:215:6:-;2371:9;2366:118;2386:19;;;2366:118;;;2434:39;-1:-1:-1;;;;;;;;;;;2461:8:6;;2470:1;2461:11;;;;;;;;;;;;;-1:-1:-1;;;;;2461:11:6;2434:9;:39::i;:::-;2407:3;;2366:118;;;;2275:215;;:::o;2560:259:5:-;1770:4:15;2663:12:5;:10;:12::i;:::-;1581:142:6;;;;;;;;;;;;;-1:-1:-1;;;1581:142:6;;;1674:21;1682:4;1688:6;1674:7;:21::i;:::-;1697:7;1666:39;;;;;-1:-1:-1;;;1666:39:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2730:15:5::1;-1:-1:-1::0;;;;;2713:33:5::1;:5;-1:-1:-1::0;;;;;2713:33:5::1;;;2705:75;;;::::0;;-1:-1:-1;;;2705:75:5;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;2790:22;2802:5;2809:2;2790:11;:22::i;:::-;2560:259:::0;;;;;:::o;4835:317:18:-;4941:4;4957:36;4967:6;4975:9;4986:6;4957:9;:36::i;:::-;5003:121;5012:6;5020:12;:10;:12::i;:::-;5034:89;5072:6;5034:89;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5034:19:18;;;;;;:11;:19;;;;;;5054:12;:10;:12::i;:::-;-1:-1:-1;;;;;5034:33:18;;;;;;;;;;;;-1:-1:-1;5034:33:18;;;:89;:37;:89::i;:::-;5003:8;:121::i;:::-;-1:-1:-1;5141:4:18;4835:317;;;;;;:::o;4280:112:15:-;4337:7;4363:12;;;:6;:12;;;;;:22;;;4280:112;;;;:::o;1379:39:5:-;;;:::o;1495:79:6:-;-1:-1:-1;;;;;;;;;;;1495:79:6;:::o;1409:29:2:-;;;;;;:::o;2212:134:5:-;2271:27;2277:12;:10;:12::i;:::-;2291:6;2271:5;:27::i;:::-;2308:31;2318:12;:10;:12::i;:::-;2332:6;2308:9;:31::i;:::-;2212:134;:::o;4642:223:15:-;4733:12;;;;:6;:12;;;;;:22;;;4725:45;;4757:12;:10;:12::i;:::-;4725:7;:45::i;:::-;4717:105;;;;-1:-1:-1;;;4717:105:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4833:25;4844:4;4850:7;4833:10;:25::i;:::-;4642:223;;:::o;3068:81:18:-;3133:9;;;;3068:81;:::o;5816:205:15:-;5913:12;:10;:12::i;:::-;-1:-1:-1;;;;;5902:23:15;:7;-1:-1:-1;;;;;5902:23:15;;5894:83;;;;-1:-1:-1;;;5894:83:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5988:26;6000:4;6006:7;5988:11;:26::i;5547:215:18:-;5635:4;5651:83;5660:12;:10;:12::i;:::-;5674:7;5683:50;5722:10;5683:11;:25;5695:12;:10;:12::i;:::-;-1:-1:-1;;;;;5683:25:18;;;;;;;;;;;;;;;;;-1:-1:-1;5683:25:18;;;:34;;;;;;;;;;;:38;:50::i;1791:313:3:-;1910:4;1930:26;1939:8;1949:6;1930:8;:26::i;:::-;;1990:8;-1:-1:-1;;;;;1974:41:3;;2016:12;:10;:12::i;:::-;2030:6;2038:4;;1974:69;;;;;;;;;;;;;-1:-1:-1;;;;;1974:69:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1974:69:3;1966:110;;;;;-1:-1:-1;;;1966:110:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2093:4:3;1791:313;;;;;;:::o;2496:217:6:-;2593:9;2588:119;2608:19;;;2588:119;;;2656:40;-1:-1:-1;;;;;;;;;;;2684:8:6;;2693:1;2684:11;;;;;;;;;;;;;-1:-1:-1;;;;;2684:11:6;2656:10;:40::i;:::-;2629:3;;2588:119;;4285:254:19;-1:-1:-1;;;;;4440:33:19;;4364:7;4440:33;;;:24;:33;;;;;4364:7;;;;4419:55;;4428:10;;4419:8;:55::i;:::-;4383:91;;;;4492:11;:40;;4514:18;4524:7;4514:9;:18::i;:::-;4492:40;;;4506:5;4492:40;4485:47;4285:254;-1:-1:-1;;;;;4285:254:19:o;3365:117:18:-;-1:-1:-1;;;;;3457:18:18;3431:7;3457:18;;;;;;;;;;;;3365:117::o;2236:418:1:-;2332:13;2365:48;;;1572:4;2365:48;2361:117;;;-1:-1:-1;2437:30:1;;;;;;;;;;;;-1:-1:-1;;;2437:30:1;;;;;;2361:117;2491:46;;;1645:4;2491:46;2487:117;;;-1:-1:-1;2561:32:1;;;;;;;;;;;;;;;;;;;2487:117;2613:34;;;-1:-1:-1;;;2613:34:1;;;;;;;;;;;;;;;;;;;;;;;;;;;3063:287:5;3180:4;3225:15;-1:-1:-1;;;;;3208:33:5;:5;-1:-1:-1;;;;;3208:33:5;;3200:57;;;;;-1:-1:-1;;;3200:57:5;;;;;;;;;;;;-1:-1:-1;;;3200:57:5;;;;;;;;;;;;;;;3267:24;3276:6;3284;3267:8;:24::i;:::-;3301:21;3307:6;3315;3301:5;:21::i;:::-;-1:-1:-1;3339:4:5;3063:287;;;;;;;:::o;3963:136:15:-;4036:7;4062:12;;;:6;:12;;;;;:30;;4086:5;4062:23;:30::i;1371:32:2:-;;;:::o;2948:137:15:-;3017:4;3040:12;;;:6;:12;;;;;:38;;3070:7;3040:29;:38::i;2360:85:18:-;2431:7;2424:14;;;;;;;;-1:-1:-1;;2424:14:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2399:13;;2424:14;;2431:7;;2424:14;;2431:7;2424:14;;;;;;;;;;;;;;;;;;;;;;;;2164:170:4;2286:7;;2236:12;:10;:12::i;:::-;1581:142:6;;;;;;;;;;;;;-1:-1:-1;;;1581:142:6;;;1674:21;1682:4;1688:6;1674:7;:21::i;:::-;1697:7;1666:39;;;;;-1:-1:-1;;;1666:39:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2316:11:4::1;:9;:11::i;:::-;2309:18;;2164:170:::0;;;;:::o;4638:221:19:-;4701:7;4721:16;4739:13;4756:43;4765:10;4777:21;4756:8;:43::i;:::-;4720:79;;;;4817:11;:35;;4839:13;:11;:13::i;:::-;4817:35;;;4831:5;4817:35;4810:42;4638:221;-1:-1:-1;;;;4638:221:19:o;2136:133:6:-;2202:4;2229:33;-1:-1:-1;;;;;;;;;;;2254:7:6;2229;:33::i;1725:49:15:-;1770:4;1725:49;:::o;6249:266:18:-;6342:4;6358:129;6367:12;:10;:12::i;:::-;6381:7;6390:96;6429:15;6390:96;;;;;;;;;;;;;;;;;:11;:25;6402:12;:10;:12::i;:::-;-1:-1:-1;;;;;6390:25:18;;;;;;;;;;;;;;;;;-1:-1:-1;6390:25:18;;;:34;;;;;;;;;;;:96;:38;:96::i;3356:246:5:-;3458:4;3510:15;-1:-1:-1;;;;;3486:40:5;:12;:10;:12::i;:::-;-1:-1:-1;;;;;3486:40:5;;3478:65;;;;;-1:-1:-1;;;3478:65:5;;;;;;;;;;;;-1:-1:-1;;;3478:65:5;;;;;;;;;;;;;;;3553:21;3559:6;3567;3553:5;:21::i;3685:172:18:-;3771:4;3787:42;3797:12;:10;:12::i;:::-;3811:9;3822:6;3787:9;:42::i;2074:132:5:-;2132:30;2141:12;:10;:12::i;:::-;2155:6;2132:8;:30::i;:::-;2172:27;2178:12;:10;:12::i;:::-;2192:6;2172:5;:27::i;3253:125:15:-;3316:7;3342:12;;;:6;:12;;;;;:29;;:27;:29::i;1452:333:3:-;1574:4;1594:24;1602:7;1611:6;1594:7;:24::i;:::-;;1652:7;-1:-1:-1;;;;;1636:40:3;;1677:12;:10;:12::i;:::-;1691:6;1707:4;1714:9;;1636:88;;;;;;;;;;;;;-1:-1:-1;;;;;1636:88:3;;;;;;;;;;;-1:-1:-1;;;;;1636:88:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1636:88:3;1628:129;;;;;-1:-1:-1;;;1628:129:3;;;;;;;;;;;;;;;;;;;;;;;;;;;2352:202:5;1770:4:15;2415:12:5;:10;:12::i;:::-;1581:142:6;;;;;;;;;;;;;-1:-1:-1;;;1581:142:6;;;1674:21;1682:4;1688:6;1674:7;:21::i;:::-;1697:7;1666:39;;;;;-1:-1:-1;;;1666:39:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2457:90:5::1;2463:12;:10;:12::i;:::-;2477:69;2490:15;-1:-1:-1::0;;;;;2490:25:5::1;;2524:4;2490:40;;;;;;;;;;;;;-1:-1:-1::0;;;;;2490:40:5::1;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;2490:40:5;2532:13:::1;:11;:13::i;:::-;2477:12;:69::i;:::-;2457:5;:90::i;1657:573:1:-:0;1761:5;-1:-1:-1;;;;;1927:18:1;;;;;;:34;;;1950:11;1956:4;1950:5;:11::i;:::-;1949:12;1927:34;1923:109;;;-1:-1:-1;1572:4:1;1985:36;;1923:109;-1:-1:-1;;;;;2093:16:1;;;;;;:30;;;2114:9;2120:2;2114:5;:9::i;:::-;2113:10;2093:30;2089:103;;;-1:-1:-1;1645:4:1;2147:34;;2089:103;-1:-1:-1;1502:1:1;1657:573;;;;;:::o;5099:226:15:-;5191:12;;;;:6;:12;;;;;:22;;;5183:45;;5215:12;:10;:12::i;5183:45::-;5175:106;;;;-1:-1:-1;;;5175:106:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3915:149:18;-1:-1:-1;;;;;4030:18:18;;;4004:7;4030:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3915:149::o;6429:141:24:-;6499:4;6522:41;6527:3;-1:-1:-1;;;;;6547:14:24;;6522:4;:41::i;598:104:14:-;685:10;598:104;:::o;9313:340:18:-;-1:-1:-1;;;;;9414:19:18;;9406:68;;;;-1:-1:-1;;;9406:68:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9492:21:18;;9484:68;;;;-1:-1:-1;;;9484:68:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9563:18:18;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;9614:32;;;;;;;;;;;;;;;;;9313:340;;;:::o;1989:169:4:-;1770:4:15;2083:12:4;:10;:12::i;:::-;1581:142:6;;;;;;;;;;;;;-1:-1:-1;;;1581:142:6;;;1674:21;1682:4;1688:6;1674:7;:21::i;:::-;1697:7;1666:39;;;;;-1:-1:-1;;;1666:39:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2134:17:4::1;2141:5;2148:2;2134:6;:17::i;6989:530:18:-:0;-1:-1:-1;;;;;7094:20:18;;7086:70;;;;-1:-1:-1;;;7086:70:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7174:23:18;;7166:71;;;;-1:-1:-1;;;7166:71:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7248:47;7269:6;7277:9;7288:6;7248:20;:47::i;:::-;7326:71;7348:6;7326:71;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7326:17:18;;:9;:17;;;;;;;;;;;;:71;:21;:71::i;:::-;-1:-1:-1;;;;;7306:17:18;;;:9;:17;;;;;;;;;;;:91;;;;7430:20;;;;;;;:32;;7455:6;7430:24;:32::i;:::-;-1:-1:-1;;;;;7407:20:18;;;:9;:20;;;;;;;;;;;;:55;;;;7477:35;;;;;;;7407:20;;7477:35;;;;;;;;;;;;;6989:530;;;:::o;1754:187:17:-;1840:7;1875:12;1867:6;;;;1859:29;;;;-1:-1:-1;;;1859:29:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1910:5:17;;;1754:187::o;8480:410:18:-;-1:-1:-1;;;;;8563:21:18;;8555:67;;;;-1:-1:-1;;;8555:67:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8633:49;8654:7;8671:1;8675:6;8633:20;:49::i;:::-;8714:68;8737:6;8714:68;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8714:18:18;;:9;:18;;;;;;;;;;;;:68;:22;:68::i;:::-;-1:-1:-1;;;;;8693:18:18;;:9;:18;;;;;;;;;;:89;8807:12;;:24;;8824:6;8807:16;:24::i;:::-;8792:12;:39;8846:37;;;;;;;;8872:1;;-1:-1:-1;;;;;8846:37:18;;;;;;;;;;;;8480:410;;:::o;4023:145:5:-;4105:15;-1:-1:-1;;;;;4105:24:5;;4130:2;4134:6;4105:36;;;;;;;;;;;;;-1:-1:-1;;;;;4105:36:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4105:36:5;4097:64;;;;;-1:-1:-1;;;4097:64:5;;;;;;;;;;;;-1:-1:-1;;;4097:64:5;;;;;;;;;;;;;;7023:184:15;7096:12;;;;:6;:12;;;;;:33;;7121:7;7096:24;:33::i;:::-;7092:109;;;7177:12;:10;:12::i;:::-;-1:-1:-1;;;;;7150:40:15;7168:7;-1:-1:-1;;;;;7150:40:15;7162:4;7150:40;;;;;;;;;;7023:184;;:::o;7213:188::-;7287:12;;;;:6;:12;;;;;:36;;7315:7;7287:27;:36::i;:::-;7283:112;;;7371:12;:10;:12::i;:::-;-1:-1:-1;;;;;7344:40:15;7362:7;-1:-1:-1;;;;;7344:40:15;7356:4;7344:40;;;;;;;;;;7213:188;;:::o;882:176:17:-;940:7;971:5;;;994:6;;;;986:46;;;;;-1:-1:-1;;;986:46:17;;;;;;;;;;;;;;;;;;;;;;;;;;;5605:1664:19;5702:4;5708:7;5752:1;5739:10;:14;5731:49;;;;;-1:-1:-1;;;5731:49:19;;;;;;;;;;;;-1:-1:-1;;;5731:49:19;;;;;;;;;;;;;;;5865:28;:18;:26;:28::i;:::-;5851:10;:42;;5843:84;;;;;-1:-1:-1;;;5843:84:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;7050:13;7066:40;:9;7095:10;7066:28;:40::i;:::-;7130:20;;7050:56;;-1:-1:-1;7121:29:19;;7117:146;;;7174:5;7181:1;7166:17;;;;;;;7117:146;7222:4;7228:9;:16;;7245:5;7228:23;;;;;;;;;;;;;;;;7214:38;;;;;5605:1664;;;;;;:::o;3846:171:5:-;3929:15;-1:-1:-1;;;;;3929:28:5;;3958:4;3972;3979:6;3929:57;;;;;;;;;;;;;-1:-1:-1;;;;;3929:57:5;;;;;;-1:-1:-1;;;;;3929:57:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3929:57:5;3921:89;;;;;-1:-1:-1;;;3921:89:5;;;;;;;;;;;;-1:-1:-1;;;3921:89:5;;;;;;;;;;;;;;2848:155:4;2961:35;2980:7;2989:6;2961:18;:35::i;7650:147:24:-;7724:7;7766:22;7770:3;7782:5;7766:3;:22::i;6966:156::-;7046:4;7069:46;7079:3;-1:-1:-1;;;;;7099:14:24;;7069:9;:46::i;3956:222:19:-;4003:7;4022:30;:18;:28;:30::i;:::-;4063:17;4083:28;:18;:26;:28::i;:::-;4126:19;;;;;;;;4063:48;;-1:-1:-1;4126:19:19;;;;;;;;;;4162:9;-1:-1:-1;3956:222:19;:::o;7203:115:24:-;7266:7;7292:19;7300:3;7292:7;:19::i;1329:134:17:-;1387:7;1413:43;1417:1;1420;1413:43;;;;;;;;;;;;;;;;;:3;:43::i;1640:404:24:-;1703:4;1724:21;1734:3;1739:5;1724:9;:21::i;:::-;1719:319;;-1:-1:-1;1761:23:24;;;;;;;;:11;:23;;;;;;;;;;;;;1941:18;;1919:19;;;:12;;;:19;;;;;;:40;;;;1973:11;;1719:319;-1:-1:-1;2022:5:24;2015:12;;1360:423:0;-1:-1:-1;;;;;1434:19:0;;1430:347;;1558:43;;1541:12;;-1:-1:-1;;;;;1558:7:0;;;1574:21;;1541:12;1558:43;1541:12;1558:43;1574:21;1558:7;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1540:61;;;1623:7;1615:38;;;;;-1:-1:-1;;;1615:38:0;;;;;;;;;;;;-1:-1:-1;;;1615:38:0;;;;;;;;;;;;;;;1430:347;;;;1707:5;-1:-1:-1;;;;;1700:22:0;;1723:2;1734:5;-1:-1:-1;;;;;1727:23:0;;1759:4;1727:38;;;;;;;;;;;;;-1:-1:-1;;;;;1727:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1727:38:0;1700:66;;;-1:-1:-1;;;;;;1700:66:0;;;;;;;-1:-1:-1;;;;;1700:66:0;;;;;;;;;;;;;;;;;;;;1727:38;;1700:66;;;;;;;-1:-1:-1;1700:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1360:423:0;;:::o;2578:264:4:-;2726:52;2761:4;2767:2;2771:6;2726:34;:52::i;:::-;2788:47;2818:4;2824:2;2828:6;2788:29;:47::i;6738:147:24:-;6811:4;6834:44;6842:3;-1:-1:-1;;;;;6862:14:24;;6834:7;:44::i;1106:112:23:-;1197:14;;1106:112::o;590:892:22:-;702:12;;679:7;;698:56;;-1:-1:-1;742:1:22;735:8;;698:56;804:12;;764:11;;827:414;840:4;834:3;:10;827:414;;;860:11;874:23;887:3;892:4;874:12;:23::i;:::-;860:37;;1127:7;1114:5;1120:3;1114:10;;;;;;;;;;;;;;;;:20;1110:121;;;1161:3;1154:10;;1110:121;;;1209:3;1215:1;1209:7;1203:13;;1110:121;827:414;;;;1364:1;1358:3;:7;:36;;;;;1387:7;1369:5;1381:1;1375:3;:7;1369:14;;;;;;;;;;;;;;;;:25;1358:36;1354:122;;;-1:-1:-1;;;1417:7:22;;-1:-1:-1;1410:14:22;;1354:122;-1:-1:-1;1462:3:22;-1:-1:-1;1455:10:22;;1599:274:2;1691:28;1703:7;1712:6;1691:11;:28::i;:::-;1734:14;;;;1733:15;:43;;;;;1769:7;1752:13;:11;:13::i;:::-;:24;;1733:43;1729:138;;;1800:14;:21;;-1:-1:-1;;1800:21:2;1817:4;1800:21;;;1840:16;;;;1800:14;;1840:16;1599:274;;:::o;4452:201:24:-;4546:18;;4519:7;;4546:26;-1:-1:-1;4538:73:24;;;;-1:-1:-1;;;4538:73:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4628:3;:11;;4640:5;4628:18;;;;;;;;;;;;;;;;4621:25;;4452:201;;;;:::o;3805:127::-;3878:4;3901:19;;;:12;;;;;:19;;;;;;:24;;;3805:127::o;1224:178:23:-;1376:19;;1394:1;1376:19;;;1224:178::o;5073:526:19:-;5179:44;5206:4;5212:2;5216:6;5179:26;:44::i;:::-;-1:-1:-1;;;;;5236:18:19;;5232:361;;5282:26;5305:2;5282:22;:26::i;:::-;5318:28;:26;:28::i;:::-;5232:361;;;-1:-1:-1;;;;;5365:16:19;;5361:232;;5409:28;5432:4;5409:22;:28::i;5361:232::-;5520:28;5543:4;5520:22;:28::i;:::-;5558:26;5581:2;5558:22;:26::i;2660:380:1:-;2776:21;2800:43;2826:4;2832:2;2836:6;2800:25;:43::i;:::-;2776:67;-1:-1:-1;2857:34:1;;;;2853:127;;2922:46;2952:15;2922:29;:46::i;:::-;2915:54;;-1:-1:-1;;;2915:54:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2853:127;2989:44;3016:4;3022:2;3026:6;2989:26;:44::i;2212:1512:24:-;2278:4;2415:19;;;:12;;;:19;;;;;;2449:15;;2445:1273;;2878:18;;-1:-1:-1;;2830:14:24;;;;2878:22;;;;2806:21;;2878:3;;:22;;3160;;;;;;;;;;;;;;3140:42;;3303:9;3274:3;:11;;3286:13;3274:26;;;;;;;;;;;;;;;;;;;:38;;;;3378:23;;;3420:1;3378:12;;;:23;;;;;;3404:17;;;3378:43;;3527:17;;3378:3;;3527:17;;;;;;;;;;;;;;;;;;;;;;3619:3;:12;;:19;3632:5;3619:19;;;;;;;;;;;3612:26;;;3660:4;3653:11;;;;;;;;2445:1273;3702:5;3695:12;;;;;616:190:16;678:7;797:1;;788;:5;784:1;780;:5;:13;779:19;;;;;;773:1;769;:5;763:1;759;:5;758:17;:41;;616:190;-1:-1:-1;;;616:190:16:o;7790:370:18:-;-1:-1:-1;;;;;7873:21:18;;7865:65;;;;;-1:-1:-1;;;7865:65:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;7941:49;7970:1;7974:7;7983:6;7941:20;:49::i;:::-;8016:12;;:24;;8033:6;8016:16;:24::i;:::-;8001:12;:39;-1:-1:-1;;;;;8071:18:18;;:9;:18;;;;;;;;;;;:30;;8094:6;8071:22;:30::i;:::-;-1:-1:-1;;;;;8050:18:18;;:9;:18;;;;;;;;;;;:51;;;;8116:37;;;;;;;8050:18;;:9;;8116:37;;;;;;;;;;7790:370;;:::o;7275:144:19:-;-1:-1:-1;;;;;7358:33:19;;;;;;:24;:33;;;;;7342:70;;7393:18;7383:7;7393:9;:18::i;:::-;7342:15;:70::i;7425:116::-;7481:53;7497:21;7520:13;:11;:13::i;7481:53::-;7425:116::o;7547:309::-;7641:17;7661:28;:18;:26;:28::i;:::-;7641:48;-1:-1:-1;7641:48:19;7703:30;7719:9;7703:15;:30::i;:::-;:42;7699:151;;;7761:29;;;;;;;;-1:-1:-1;7761:29:19;;;;;;;;;;;;;;7804:16;;;:35;;;;;;;;;;;;;;;7547:309::o;7862:206::-;7955:10;;7932:7;;7951:111;;-1:-1:-1;7993:1:19;7986:8;;7951:111;8036:10;;8032:3;;-1:-1:-1;;8036:14:19;;;8032:19;;;;;;;;;;;;;;8025:26;;;", - "source": "// SPDX-License-Identifier: Apache-2.0\n\n/******************************************************************************\n * Copyright 2020 IEXEC BLOCKCHAIN TECH *\n * *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); *\n * you may not use this file except in compliance with the License. *\n * You may obtain a copy of the License at *\n * *\n * http://www.apache.org/licenses/LICENSE-2.0 *\n * *\n * Unless required by applicable law or agreed to in writing, software *\n * distributed under the License is distributed on an \"AS IS\" BASIS, *\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *\n * See the License for the specific language governing permissions and *\n * limitations under the License. *\n ******************************************************************************/\n\npragma solidity ^0.6.0;\n\nimport \"./interfaces/IERC677.sol\";\nimport \"./ERLC.sol\";\n\n\ncontract ERLCTokenSwap is ERLC, IERC677Receiver\n{\n IERC20 public immutable underlyingToken;\n\n constructor(\n address underlyingtoken,\n string memory name,\n string memory symbol,\n uint256 softcap,\n address[] memory admins,\n address[] memory kycadmins)\n public\n ERLC(name, symbol, softcap, admins, kycadmins)\n {\n underlyingToken = IERC20(underlyingtoken);\n _setupDecimals(ERC20(underlyingtoken).decimals());\n }\n\n /*************************************************************************\n * Escrow - public interface *\n *************************************************************************/\n function deposit(uint256 amount)\n public\n {\n _deposit(_msgSender(), amount);\n _mint(_msgSender(), amount);\n }\n\n function withdraw(uint256 amount)\n public\n {\n _burn(_msgSender(), amount);\n _withdraw(_msgSender(), amount);\n }\n\n function recover()\n public\n onlyRole(DEFAULT_ADMIN_ROLE, _msgSender(), \"only-admin\")\n {\n _mint(_msgSender(), SafeMath.sub(underlyingToken.balanceOf(address(this)), totalSupply()));\n }\n\n function claim(address token, address to)\n public virtual override\n onlyRole(DEFAULT_ADMIN_ROLE, _msgSender(), \"only-admin\")\n {\n require(token != address(underlyingToken), \"cannot-claim-underlying-token\");\n super.claim(token, to);\n }\n\n /*************************************************************************\n * ERC677Receiver - One-transaction ERC20 deposits *\n *************************************************************************/\n function receiveApproval(address sender, uint256 amount, address token, bytes calldata)\n public override returns (bool)\n {\n require(token == address(underlyingToken), \"wrong-token\");\n _deposit(sender, amount);\n _mint(sender, amount);\n return true;\n }\n\n function onTokenTransfer(address sender, uint256 amount, bytes calldata)\n public override returns (bool)\n {\n require(_msgSender() == address(underlyingToken), \"wrong-sender\");\n _mint(sender, amount);\n return true;\n }\n\n /*************************************************************************\n * Escrow - internal functions *\n *************************************************************************/\n function _deposit(address from, uint256 amount)\n internal\n {\n require(underlyingToken.transferFrom(from, address(this), amount), \"failed-transferFrom\");\n }\n\n function _withdraw(address to, uint256 amount)\n internal\n {\n require(underlyingToken.transfer(to, amount), \"failed-transfer\");\n }\n}\n", - "sourcePath": "/home/amxx/Work/iExec/code/eRLC/contracts/ERLCTokenSwap.sol", - "ast": { - "absolutePath": "/home/amxx/Work/iExec/code/eRLC/contracts/ERLCTokenSwap.sol", - "exportedSymbols": { - "ERLCTokenSwap": [ - 710 - ] - }, - "id": 711, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 461, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:5" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/eRLC/contracts/interfaces/IERC677.sol", - "file": "./interfaces/IERC677.sol", - "id": 462, - "nodeType": "ImportDirective", - "scope": 711, - "sourceUnit": 933, - "src": "1267:34:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/eRLC/contracts/ERLC.sol", - "file": "./ERLC.sol", - "id": 463, - "nodeType": "ImportDirective", - "scope": 711, - "sourceUnit": 460, - "src": "1302:20:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 464, - "name": "ERLC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 459, - "src": "1351:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLC_$459", - "typeString": "contract ERLC" - } - }, - "id": 465, - "nodeType": "InheritanceSpecifier", - "src": "1351:4:5" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 466, - "name": "IERC677Receiver", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 959, - "src": "1357:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC677Receiver_$959", - "typeString": "contract IERC677Receiver" - } - }, - "id": 467, - "nodeType": "InheritanceSpecifier", - "src": "1357:15:5" - } - ], - "contractDependencies": [ - 54, - 194, - 252, - 332, - 459, - 874, - 895, - 907, - 932, - 959, - 991, - 1431, - 1714, - 2486, - 2804, - 2882 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 710, - "linearizedBaseContracts": [ - 710, - 959, - 459, - 54, - 332, - 2804, - 252, - 194, - 874, - 1714, - 2486, - 907, - 2882, - 1431, - 932, - 991, - 895 - ], - "name": "ERLCTokenSwap", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "functionSelector": "2495a599", - "id": 469, - "mutability": "immutable", - "name": "underlyingToken", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 710, - "src": "1379:39:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 468, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2882, - "src": "1379:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 507, - "nodeType": "Block", - "src": "1713:117:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 493, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "1723:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 495, - "name": "underlyingtoken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "1748:15:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 494, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2882, - "src": "1741:6:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$2882_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1741:23:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "src": "1723:41:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "id": 498, - "nodeType": "ExpressionStatement", - "src": "1723:41:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 501, - "name": "underlyingtoken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "1795:15:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 500, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2486, - "src": "1789:5:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$2486_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1789:22:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$2486", - "typeString": "contract ERC20" - } - }, - "id": 503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decimals", - "nodeType": "MemberAccess", - "referencedDeclaration": 2062, - "src": "1789:31:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 504, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1789:33:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 499, - "name": "_setupDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2474, - "src": "1774:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint8_$returns$__$", - "typeString": "function (uint8)" - } - }, - "id": 505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1774:49:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 506, - "nodeType": "ExpressionStatement", - "src": "1774:49:5" - } - ] - }, - "documentation": null, - "id": 508, - "implemented": true, - "kind": "constructor", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 486, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 473, - "src": "1667:4:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 487, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 475, - "src": "1673:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 488, - "name": "softcap", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 477, - "src": "1681:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 489, - "name": "admins", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 480, - "src": "1690:6:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 490, - "name": "kycadmins", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 483, - "src": "1698:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - } - ], - "id": 491, - "modifierName": { - "argumentTypes": null, - "id": 485, - "name": "ERLC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 459, - "src": "1662:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERLC_$459_$", - "typeString": "type(contract ERLC)" - } - }, - "nodeType": "ModifierInvocation", - "src": "1662:46:5" - } - ], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 484, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 471, - "mutability": "mutable", - "name": "underlyingtoken", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1446:32:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 470, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1446:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 473, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1488:21:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 472, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1488:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 475, - "mutability": "mutable", - "name": "symbol", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1519:23:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 474, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1519:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 477, - "mutability": "mutable", - "name": "softcap", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1552:24:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1552:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 480, - "mutability": "mutable", - "name": "admins", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1586:23:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 478, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1586:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 479, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1586:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 483, - "mutability": "mutable", - "name": "kycadmins", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1619:26:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 481, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1619:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 482, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1619:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1436:210:5" - }, - "returnParameters": { - "id": 492, - "nodeType": "ParameterList", - "parameters": [], - "src": "1713:0:5" - }, - "scope": 710, - "src": "1425:405:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 525, - "nodeType": "Block", - "src": "2122:84:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 514, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2141:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2141:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 516, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 510, - "src": "2155:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 513, - "name": "_deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 692, - "src": "2132:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2132:30:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 518, - "nodeType": "ExpressionStatement", - "src": "2132:30:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 520, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2178:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2178:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 522, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 510, - "src": "2192:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 519, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 458 - ], - "referencedDeclaration": 458, - "src": "2172:5:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2172:27:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 524, - "nodeType": "ExpressionStatement", - "src": "2172:27:5" - } - ] - }, - "documentation": null, - "functionSelector": "b6b55f25", - "id": 526, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 511, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 510, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 526, - "src": "2091:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 509, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2091:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2090:16:5" - }, - "returnParameters": { - "id": 512, - "nodeType": "ParameterList", - "parameters": [], - "src": "2122:0:5" - }, - "scope": 710, - "src": "2074:132:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 543, - "nodeType": "Block", - "src": "2261:85:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 532, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2277:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2277:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 534, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 528, - "src": "2291:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 531, - "name": "_burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2418, - "src": "2271:5:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2271:27:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 536, - "nodeType": "ExpressionStatement", - "src": "2271:27:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 538, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2318:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2318:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 540, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 528, - "src": "2332:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 537, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 709, - "src": "2308:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2308:31:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 542, - "nodeType": "ExpressionStatement", - "src": "2308:31:5" - } - ] - }, - "documentation": null, - "functionSelector": "2e1a7d4d", - "id": 544, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 529, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 528, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 544, - "src": "2230:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 527, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2229:16:5" - }, - "returnParameters": { - "id": 530, - "nodeType": "ParameterList", - "parameters": [], - "src": "2261:0:5" - }, - "scope": 710, - "src": "2212:134:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 570, - "nodeType": "Block", - "src": "2447:107:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 554, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2463:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2463:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 562, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "2524:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLCTokenSwap_$710", - "typeString": "contract ERLCTokenSwap" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERLCTokenSwap_$710", - "typeString": "contract ERLCTokenSwap" - } - ], - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2516:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 560, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2516:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2516:13:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 558, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "2490:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "id": 559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 2821, - "src": "2490:25:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2490:40:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 565, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "2532:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2532:13:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 556, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1983, - "src": "2477:8:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$1983_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 557, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1833, - "src": "2477:12:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2477:69:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 553, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 458 - ], - "referencedDeclaration": 458, - "src": "2457:5:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2457:90:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 569, - "nodeType": "ExpressionStatement", - "src": "2457:90:5" - } - ] - }, - "documentation": null, - "functionSelector": "ce746024", - "id": 571, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 547, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1457, - "src": "2395:18:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 548, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2415:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2415:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792d61646d696e", - "id": 550, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2429:12:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c7df34e6fbdd8fe937d348fad38c372bc44ed4bcbc38cb371f47165a35e8b951", - "typeString": "literal_string \"only-admin\"" - }, - "value": "only-admin" - } - ], - "id": 551, - "modifierName": { - "argumentTypes": null, - "id": 546, - "name": "onlyRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 748, - "src": "2386:8:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_bytes32_$_t_address_$_t_string_memory_ptr_$", - "typeString": "modifier (bytes32,address,string memory)" - } - }, - "nodeType": "ModifierInvocation", - "src": "2386:56:5" - } - ], - "name": "recover", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 545, - "nodeType": "ParameterList", - "parameters": [], - "src": "2368:2:5" - }, - "returnParameters": { - "id": 552, - "nodeType": "ParameterList", - "parameters": [], - "src": "2447:0:5" - }, - "scope": 710, - "src": "2352:202:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 395 - ], - "body": { - "id": 602, - "nodeType": "Block", - "src": "2695:124:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 586, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 573, - "src": "2713:5:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 589, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "2730:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - ], - "id": 588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2722:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 587, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2722:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2722:24:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2713:33:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "63616e6e6f742d636c61696d2d756e6465726c79696e672d746f6b656e", - "id": 592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2748:31:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e4d5ba616fad114363ebb203e1192e855c2a78fd7804e1d7605556cec789b516", - "typeString": "literal_string \"cannot-claim-underlying-token\"" - }, - "value": "cannot-claim-underlying-token" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e4d5ba616fad114363ebb203e1192e855c2a78fd7804e1d7605556cec789b516", - "typeString": "literal_string \"cannot-claim-underlying-token\"" - } - ], - "id": 585, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2705:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2705:75:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 594, - "nodeType": "ExpressionStatement", - "src": "2705:75:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 598, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 573, - "src": "2802:5:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 599, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 575, - "src": "2809:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 595, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "2790:5:5", - "typeDescriptions": { - "typeIdentifier": "t_super$_ERLCTokenSwap_$710", - "typeString": "contract super ERLCTokenSwap" - } - }, - "id": 597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "claim", - "nodeType": "MemberAccess", - "referencedDeclaration": 395, - "src": "2790:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2790:22:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 601, - "nodeType": "ExpressionStatement", - "src": "2790:22:5" - } - ] - }, - "documentation": null, - "functionSelector": "21c0b342", - "id": 603, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 579, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1457, - "src": "2643:18:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 580, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2663:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2663:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792d61646d696e", - "id": 582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2677:12:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c7df34e6fbdd8fe937d348fad38c372bc44ed4bcbc38cb371f47165a35e8b951", - "typeString": "literal_string \"only-admin\"" - }, - "value": "only-admin" - } - ], - "id": 583, - "modifierName": { - "argumentTypes": null, - "id": 578, - "name": "onlyRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 748, - "src": "2634:8:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_bytes32_$_t_address_$_t_string_memory_ptr_$", - "typeString": "modifier (bytes32,address,string memory)" - } - }, - "nodeType": "ModifierInvocation", - "src": "2634:56:5" - } - ], - "name": "claim", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 577, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "2621:8:5" - }, - "parameters": { - "id": 576, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 573, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 603, - "src": "2575:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 572, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2575:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 575, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 603, - "src": "2590:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 574, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2590:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2574:27:5" - }, - "returnParameters": { - "id": 584, - "nodeType": "ParameterList", - "parameters": [], - "src": "2695:0:5" - }, - "scope": 710, - "src": "2560:259:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [ - 947 - ], - "body": { - "id": 639, - "nodeType": "Block", - "src": "3190:160:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 618, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 609, - "src": "3208:5:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 621, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "3225:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - ], - "id": 620, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3217:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3217:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3217:24:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3208:33:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "77726f6e672d746f6b656e", - "id": 624, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3243:13:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c850bd0defd9074593777b4fbc4abf7d5f6f32ff09f90f9c726524f96d40c30b", - "typeString": "literal_string \"wrong-token\"" - }, - "value": "wrong-token" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c850bd0defd9074593777b4fbc4abf7d5f6f32ff09f90f9c726524f96d40c30b", - "typeString": "literal_string \"wrong-token\"" - } - ], - "id": 617, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3200:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3200:57:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 626, - "nodeType": "ExpressionStatement", - "src": "3200:57:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 628, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 605, - "src": "3276:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 629, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 607, - "src": "3284:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 627, - "name": "_deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 692, - "src": "3267:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3267:24:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 631, - "nodeType": "ExpressionStatement", - "src": "3267:24:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 633, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 605, - "src": "3307:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 634, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 607, - "src": "3315:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 632, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 458 - ], - "referencedDeclaration": 458, - "src": "3301:5:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3301:21:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 636, - "nodeType": "ExpressionStatement", - "src": "3301:21:5" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 637, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3339:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 616, - "id": 638, - "nodeType": "Return", - "src": "3332:11:5" - } - ] - }, - "documentation": null, - "functionSelector": "8f4ffcb1", - "id": 640, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "receiveApproval", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 613, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3162:8:5" - }, - "parameters": { - "id": 612, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 605, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 640, - "src": "3088:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 604, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3088:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 607, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 640, - "src": "3104:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 606, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3104:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 609, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 640, - "src": "3120:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 608, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3120:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 611, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 640, - "src": "3135:14:5", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 610, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3135:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3087:63:5" - }, - "returnParameters": { - "id": 616, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 615, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 640, - "src": "3180:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 614, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3180:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3179:6:5" - }, - "scope": 710, - "src": "3063:287:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 958 - ], - "body": { - "id": 670, - "nodeType": "Block", - "src": "3468:134:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 653, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "3486:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3486:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 657, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "3510:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - ], - "id": 656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3502:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 655, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3502:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3502:24:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3486:40:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "77726f6e672d73656e646572", - "id": 660, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3528:14:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_dc74c88d9455fd7e407983997f9656cee8d85c9cadd8acda8396a36f1cb0bd4a", - "typeString": "literal_string \"wrong-sender\"" - }, - "value": "wrong-sender" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_dc74c88d9455fd7e407983997f9656cee8d85c9cadd8acda8396a36f1cb0bd4a", - "typeString": "literal_string \"wrong-sender\"" - } - ], - "id": 652, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3478:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3478:65:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 662, - "nodeType": "ExpressionStatement", - "src": "3478:65:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 664, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 642, - "src": "3559:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 665, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 644, - "src": "3567:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 663, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 458 - ], - "referencedDeclaration": 458, - "src": "3553:5:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3553:21:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 667, - "nodeType": "ExpressionStatement", - "src": "3553:21:5" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3591:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 651, - "id": 669, - "nodeType": "Return", - "src": "3584:11:5" - } - ] - }, - "documentation": null, - "functionSelector": "a4c0ed36", - "id": 671, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "onTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 648, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3440:8:5" - }, - "parameters": { - "id": 647, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 642, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 671, - "src": "3381:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 641, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3381:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 644, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 671, - "src": "3397:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 643, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3397:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 646, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 671, - "src": "3413:14:5", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 645, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3413:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3380:48:5" - }, - "returnParameters": { - "id": 651, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 650, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 671, - "src": "3458:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 649, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3458:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3457:6:5" - }, - "scope": 710, - "src": "3356:246:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 691, - "nodeType": "Block", - "src": "3911:106:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 681, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 673, - "src": "3958:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 684, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "3972:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLCTokenSwap_$710", - "typeString": "contract ERLCTokenSwap" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERLCTokenSwap_$710", - "typeString": "contract ERLCTokenSwap" - } - ], - "id": 683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3964:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 682, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3964:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3964:13:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 686, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 675, - "src": "3979:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 679, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "3929:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "id": 680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 2863, - "src": "3929:28:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3929:57:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6661696c65642d7472616e7366657246726f6d", - "id": 688, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3988:21:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f574db8a79d1556499f642cf39c52648970977877bdffe1234a32044752b8fe9", - "typeString": "literal_string \"failed-transferFrom\"" - }, - "value": "failed-transferFrom" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f574db8a79d1556499f642cf39c52648970977877bdffe1234a32044752b8fe9", - "typeString": "literal_string \"failed-transferFrom\"" - } - ], - "id": 678, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3921:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3921:89:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 690, - "nodeType": "ExpressionStatement", - "src": "3921:89:5" - } - ] - }, - "documentation": null, - "id": 692, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 676, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 673, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 692, - "src": "3864:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 672, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3864:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 675, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 692, - "src": "3878:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 674, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3878:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3863:30:5" - }, - "returnParameters": { - "id": 677, - "nodeType": "ParameterList", - "parameters": [], - "src": "3911:0:5" - }, - "scope": 710, - "src": "3846:171:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 708, - "nodeType": "Block", - "src": "4087:81:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 702, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 694, - "src": "4130:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 703, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 696, - "src": "4134:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 700, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "4105:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "id": 701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2831, - "src": "4105:24:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4105:36:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6661696c65642d7472616e73666572", - "id": 705, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4143:17:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e7ec5fb7877eeda04e9c305afe2ef377c223d93963bda0cefaf723fa9d3ff5d", - "typeString": "literal_string \"failed-transfer\"" - }, - "value": "failed-transfer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e7ec5fb7877eeda04e9c305afe2ef377c223d93963bda0cefaf723fa9d3ff5d", - "typeString": "literal_string \"failed-transfer\"" - } - ], - "id": 699, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4097:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4097:64:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 707, - "nodeType": "ExpressionStatement", - "src": "4097:64:5" - } - ] - }, - "documentation": null, - "id": 709, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 697, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 694, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 709, - "src": "4042:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 693, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4042:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 696, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 709, - "src": "4054:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 695, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4054:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4041:28:5" - }, - "returnParameters": { - "id": 698, - "nodeType": "ParameterList", - "parameters": [], - "src": "4087:0:5" - }, - "scope": 710, - "src": "4023:145:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 711, - "src": "1325:2845:5" - } - ], - "src": "1242:2929:5" - }, - "legacyAST": { - "absolutePath": "/home/amxx/Work/iExec/code/eRLC/contracts/ERLCTokenSwap.sol", - "exportedSymbols": { - "ERLCTokenSwap": [ - 710 - ] - }, - "id": 711, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 461, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:5" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/eRLC/contracts/interfaces/IERC677.sol", - "file": "./interfaces/IERC677.sol", - "id": 462, - "nodeType": "ImportDirective", - "scope": 711, - "sourceUnit": 933, - "src": "1267:34:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/eRLC/contracts/ERLC.sol", - "file": "./ERLC.sol", - "id": 463, - "nodeType": "ImportDirective", - "scope": 711, - "sourceUnit": 460, - "src": "1302:20:5", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 464, - "name": "ERLC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 459, - "src": "1351:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLC_$459", - "typeString": "contract ERLC" - } - }, - "id": 465, - "nodeType": "InheritanceSpecifier", - "src": "1351:4:5" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 466, - "name": "IERC677Receiver", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 959, - "src": "1357:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC677Receiver_$959", - "typeString": "contract IERC677Receiver" - } - }, - "id": 467, - "nodeType": "InheritanceSpecifier", - "src": "1357:15:5" - } - ], - "contractDependencies": [ - 54, - 194, - 252, - 332, - 459, - 874, - 895, - 907, - 932, - 959, - 991, - 1431, - 1714, - 2486, - 2804, - 2882 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 710, - "linearizedBaseContracts": [ - 710, - 959, - 459, - 54, - 332, - 2804, - 252, - 194, - 874, - 1714, - 2486, - 907, - 2882, - 1431, - 932, - 991, - 895 - ], - "name": "ERLCTokenSwap", - "nodeType": "ContractDefinition", - "nodes": [ - { - "constant": false, - "functionSelector": "2495a599", - "id": 469, - "mutability": "immutable", - "name": "underlyingToken", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 710, - "src": "1379:39:5", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - }, - "typeName": { - "contractScope": null, - "id": 468, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2882, - "src": "1379:6:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "value": null, - "visibility": "public" - }, - { - "body": { - "id": 507, - "nodeType": "Block", - "src": "1713:117:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "id": 497, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": { - "argumentTypes": null, - "id": 493, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "1723:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 495, - "name": "underlyingtoken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "1748:15:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 494, - "name": "IERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2882, - "src": "1741:6:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IERC20_$2882_$", - "typeString": "type(contract IERC20)" - } - }, - "id": 496, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1741:23:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "src": "1723:41:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "id": 498, - "nodeType": "ExpressionStatement", - "src": "1723:41:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 501, - "name": "underlyingtoken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 471, - "src": "1795:15:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "id": 500, - "name": "ERC20", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2486, - "src": "1789:5:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERC20_$2486_$", - "typeString": "type(contract ERC20)" - } - }, - "id": 502, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1789:22:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERC20_$2486", - "typeString": "contract ERC20" - } - }, - "id": 503, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "decimals", - "nodeType": "MemberAccess", - "referencedDeclaration": 2062, - "src": "1789:31:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$__$returns$_t_uint8_$", - "typeString": "function () view external returns (uint8)" - } - }, - "id": 504, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1789:33:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "id": 499, - "name": "_setupDecimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2474, - "src": "1774:14:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_uint8_$returns$__$", - "typeString": "function (uint8)" - } - }, - "id": 505, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1774:49:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 506, - "nodeType": "ExpressionStatement", - "src": "1774:49:5" - } - ] - }, - "documentation": null, - "id": 508, - "implemented": true, - "kind": "constructor", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 486, - "name": "name", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 473, - "src": "1667:4:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 487, - "name": "symbol", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 475, - "src": "1673:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - }, - { - "argumentTypes": null, - "id": 488, - "name": "softcap", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 477, - "src": "1681:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "id": 489, - "name": "admins", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 480, - "src": "1690:6:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "argumentTypes": null, - "id": 490, - "name": "kycadmins", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 483, - "src": "1698:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - } - ], - "id": 491, - "modifierName": { - "argumentTypes": null, - "id": 485, - "name": "ERLC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 459, - "src": "1662:4:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_ERLC_$459_$", - "typeString": "type(contract ERLC)" - } - }, - "nodeType": "ModifierInvocation", - "src": "1662:46:5" - } - ], - "name": "", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 484, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 471, - "mutability": "mutable", - "name": "underlyingtoken", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1446:32:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 470, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1446:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 473, - "mutability": "mutable", - "name": "name", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1488:21:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 472, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1488:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 475, - "mutability": "mutable", - "name": "symbol", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1519:23:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string" - }, - "typeName": { - "id": 474, - "name": "string", - "nodeType": "ElementaryTypeName", - "src": "1519:6:5", - "typeDescriptions": { - "typeIdentifier": "t_string_storage_ptr", - "typeString": "string" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 477, - "mutability": "mutable", - "name": "softcap", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1552:24:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 476, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1552:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 480, - "mutability": "mutable", - "name": "admins", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1586:23:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 478, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1586:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 479, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1586:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 483, - "mutability": "mutable", - "name": "kycadmins", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 508, - "src": "1619:26:5", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 481, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1619:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 482, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1619:9:5", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1436:210:5" - }, - "returnParameters": { - "id": 492, - "nodeType": "ParameterList", - "parameters": [], - "src": "1713:0:5" - }, - "scope": 710, - "src": "1425:405:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 525, - "nodeType": "Block", - "src": "2122:84:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 514, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2141:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 515, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2141:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 516, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 510, - "src": "2155:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 513, - "name": "_deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 692, - "src": "2132:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 517, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2132:30:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 518, - "nodeType": "ExpressionStatement", - "src": "2132:30:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 520, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2178:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 521, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2178:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 522, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 510, - "src": "2192:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 519, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 458 - ], - "referencedDeclaration": 458, - "src": "2172:5:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 523, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2172:27:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 524, - "nodeType": "ExpressionStatement", - "src": "2172:27:5" - } - ] - }, - "documentation": null, - "functionSelector": "b6b55f25", - "id": 526, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 511, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 510, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 526, - "src": "2091:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 509, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2091:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2090:16:5" - }, - "returnParameters": { - "id": 512, - "nodeType": "ParameterList", - "parameters": [], - "src": "2122:0:5" - }, - "scope": 710, - "src": "2074:132:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 543, - "nodeType": "Block", - "src": "2261:85:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 532, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2277:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 533, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2277:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 534, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 528, - "src": "2291:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 531, - "name": "_burn", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2418, - "src": "2271:5:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 535, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2271:27:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 536, - "nodeType": "ExpressionStatement", - "src": "2271:27:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 538, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2318:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 539, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2318:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "id": 540, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 528, - "src": "2332:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 537, - "name": "_withdraw", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 709, - "src": "2308:9:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 541, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2308:31:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 542, - "nodeType": "ExpressionStatement", - "src": "2308:31:5" - } - ] - }, - "documentation": null, - "functionSelector": "2e1a7d4d", - "id": 544, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 529, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 528, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 544, - "src": "2230:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 527, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "2230:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2229:16:5" - }, - "returnParameters": { - "id": 530, - "nodeType": "ParameterList", - "parameters": [], - "src": "2261:0:5" - }, - "scope": 710, - "src": "2212:134:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 570, - "nodeType": "Block", - "src": "2447:107:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 554, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2463:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 555, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2463:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 562, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "2524:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLCTokenSwap_$710", - "typeString": "contract ERLCTokenSwap" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERLCTokenSwap_$710", - "typeString": "contract ERLCTokenSwap" - } - ], - "id": 561, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2516:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 560, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2516:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 563, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2516:13:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 558, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "2490:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "id": 559, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "balanceOf", - "nodeType": "MemberAccess", - "referencedDeclaration": 2821, - "src": "2490:25:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", - "typeString": "function (address) view external returns (uint256)" - } - }, - "id": 564, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2490:40:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 565, - "name": "totalSupply", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2072, - "src": "2532:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", - "typeString": "function () view returns (uint256)" - } - }, - "id": 566, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2532:13:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 556, - "name": "SafeMath", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1983, - "src": "2477:8:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_SafeMath_$1983_$", - "typeString": "type(library SafeMath)" - } - }, - "id": 557, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sub", - "nodeType": "MemberAccess", - "referencedDeclaration": 1833, - "src": "2477:12:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 567, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2477:69:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 553, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 458 - ], - "referencedDeclaration": 458, - "src": "2457:5:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 568, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2457:90:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 569, - "nodeType": "ExpressionStatement", - "src": "2457:90:5" - } - ] - }, - "documentation": null, - "functionSelector": "ce746024", - "id": 571, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 547, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1457, - "src": "2395:18:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 548, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2415:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 549, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2415:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792d61646d696e", - "id": 550, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2429:12:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c7df34e6fbdd8fe937d348fad38c372bc44ed4bcbc38cb371f47165a35e8b951", - "typeString": "literal_string \"only-admin\"" - }, - "value": "only-admin" - } - ], - "id": 551, - "modifierName": { - "argumentTypes": null, - "id": 546, - "name": "onlyRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 748, - "src": "2386:8:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_bytes32_$_t_address_$_t_string_memory_ptr_$", - "typeString": "modifier (bytes32,address,string memory)" - } - }, - "nodeType": "ModifierInvocation", - "src": "2386:56:5" - } - ], - "name": "recover", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 545, - "nodeType": "ParameterList", - "parameters": [], - "src": "2368:2:5" - }, - "returnParameters": { - "id": 552, - "nodeType": "ParameterList", - "parameters": [], - "src": "2447:0:5" - }, - "scope": 710, - "src": "2352:202:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 395 - ], - "body": { - "id": 602, - "nodeType": "Block", - "src": "2695:124:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 591, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 586, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 573, - "src": "2713:5:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 589, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "2730:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - ], - "id": 588, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "2722:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 587, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2722:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 590, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2722:24:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "2713:33:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "63616e6e6f742d636c61696d2d756e6465726c79696e672d746f6b656e", - "id": 592, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2748:31:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_e4d5ba616fad114363ebb203e1192e855c2a78fd7804e1d7605556cec789b516", - "typeString": "literal_string \"cannot-claim-underlying-token\"" - }, - "value": "cannot-claim-underlying-token" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_e4d5ba616fad114363ebb203e1192e855c2a78fd7804e1d7605556cec789b516", - "typeString": "literal_string \"cannot-claim-underlying-token\"" - } - ], - "id": 585, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "2705:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 593, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2705:75:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 594, - "nodeType": "ExpressionStatement", - "src": "2705:75:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 598, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 573, - "src": "2802:5:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 599, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 575, - "src": "2809:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 595, - "name": "super", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -25, - "src": "2790:5:5", - "typeDescriptions": { - "typeIdentifier": "t_super$_ERLCTokenSwap_$710", - "typeString": "contract super ERLCTokenSwap" - } - }, - "id": 597, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "claim", - "nodeType": "MemberAccess", - "referencedDeclaration": 395, - "src": "2790:11:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$returns$__$", - "typeString": "function (address,address)" - } - }, - "id": 600, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2790:22:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 601, - "nodeType": "ExpressionStatement", - "src": "2790:22:5" - } - ] - }, - "documentation": null, - "functionSelector": "21c0b342", - "id": 603, - "implemented": true, - "kind": "function", - "modifiers": [ - { - "arguments": [ - { - "argumentTypes": null, - "id": 579, - "name": "DEFAULT_ADMIN_ROLE", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1457, - "src": "2643:18:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 580, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "2663:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 581, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "2663:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - { - "argumentTypes": null, - "hexValue": "6f6e6c792d61646d696e", - "id": 582, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "2677:12:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c7df34e6fbdd8fe937d348fad38c372bc44ed4bcbc38cb371f47165a35e8b951", - "typeString": "literal_string \"only-admin\"" - }, - "value": "only-admin" - } - ], - "id": 583, - "modifierName": { - "argumentTypes": null, - "id": 578, - "name": "onlyRole", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 748, - "src": "2634:8:5", - "typeDescriptions": { - "typeIdentifier": "t_modifier$_t_bytes32_$_t_address_$_t_string_memory_ptr_$", - "typeString": "modifier (bytes32,address,string memory)" - } - }, - "nodeType": "ModifierInvocation", - "src": "2634:56:5" - } - ], - "name": "claim", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 577, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "2621:8:5" - }, - "parameters": { - "id": 576, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 573, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 603, - "src": "2575:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 572, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2575:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 575, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 603, - "src": "2590:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 574, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "2590:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "2574:27:5" - }, - "returnParameters": { - "id": 584, - "nodeType": "ParameterList", - "parameters": [], - "src": "2695:0:5" - }, - "scope": 710, - "src": "2560:259:5", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "public" - }, - { - "baseFunctions": [ - 947 - ], - "body": { - "id": 639, - "nodeType": "Block", - "src": "3190:160:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 623, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 618, - "name": "token", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 609, - "src": "3208:5:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 621, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "3225:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - ], - "id": 620, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3217:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 619, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3217:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 622, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3217:24:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3208:33:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "77726f6e672d746f6b656e", - "id": 624, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3243:13:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_c850bd0defd9074593777b4fbc4abf7d5f6f32ff09f90f9c726524f96d40c30b", - "typeString": "literal_string \"wrong-token\"" - }, - "value": "wrong-token" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_c850bd0defd9074593777b4fbc4abf7d5f6f32ff09f90f9c726524f96d40c30b", - "typeString": "literal_string \"wrong-token\"" - } - ], - "id": 617, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3200:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 625, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3200:57:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 626, - "nodeType": "ExpressionStatement", - "src": "3200:57:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 628, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 605, - "src": "3276:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 629, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 607, - "src": "3284:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 627, - "name": "_deposit", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 692, - "src": "3267:8:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 630, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3267:24:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 631, - "nodeType": "ExpressionStatement", - "src": "3267:24:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 633, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 605, - "src": "3307:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 634, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 607, - "src": "3315:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 632, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 458 - ], - "referencedDeclaration": 458, - "src": "3301:5:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 635, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3301:21:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 636, - "nodeType": "ExpressionStatement", - "src": "3301:21:5" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 637, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3339:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 616, - "id": 638, - "nodeType": "Return", - "src": "3332:11:5" - } - ] - }, - "documentation": null, - "functionSelector": "8f4ffcb1", - "id": 640, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "receiveApproval", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 613, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3162:8:5" - }, - "parameters": { - "id": 612, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 605, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 640, - "src": "3088:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 604, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3088:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 607, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 640, - "src": "3104:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 606, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3104:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 609, - "mutability": "mutable", - "name": "token", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 640, - "src": "3120:13:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 608, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3120:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 611, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 640, - "src": "3135:14:5", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 610, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3135:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3087:63:5" - }, - "returnParameters": { - "id": 616, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 615, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 640, - "src": "3180:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 614, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3180:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3179:6:5" - }, - "scope": 710, - "src": "3063:287:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "baseFunctions": [ - 958 - ], - "body": { - "id": 670, - "nodeType": "Block", - "src": "3468:134:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 659, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "arguments": [], - "expression": { - "argumentTypes": [], - "id": 653, - "name": "_msgSender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 1419, - "src": "3486:10:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", - "typeString": "function () view returns (address payable)" - } - }, - "id": 654, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3486:12:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address_payable", - "typeString": "address payable" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 657, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "3510:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - ], - "id": 656, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3502:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 655, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3502:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 658, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3502:24:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "3486:40:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "77726f6e672d73656e646572", - "id": 660, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3528:14:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_dc74c88d9455fd7e407983997f9656cee8d85c9cadd8acda8396a36f1cb0bd4a", - "typeString": "literal_string \"wrong-sender\"" - }, - "value": "wrong-sender" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_dc74c88d9455fd7e407983997f9656cee8d85c9cadd8acda8396a36f1cb0bd4a", - "typeString": "literal_string \"wrong-sender\"" - } - ], - "id": 652, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3478:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 661, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3478:65:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 662, - "nodeType": "ExpressionStatement", - "src": "3478:65:5" - }, - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 664, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 642, - "src": "3559:6:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 665, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 644, - "src": "3567:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 663, - "name": "_mint", - "nodeType": "Identifier", - "overloadedDeclarations": [ - 458 - ], - "referencedDeclaration": 458, - "src": "3553:5:5", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,uint256)" - } - }, - "id": 666, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3553:21:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 667, - "nodeType": "ExpressionStatement", - "src": "3553:21:5" - }, - { - "expression": { - "argumentTypes": null, - "hexValue": "74727565", - "id": 668, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3591:4:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 651, - "id": 669, - "nodeType": "Return", - "src": "3584:11:5" - } - ] - }, - "documentation": null, - "functionSelector": "a4c0ed36", - "id": 671, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "onTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 648, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "3440:8:5" - }, - "parameters": { - "id": 647, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 642, - "mutability": "mutable", - "name": "sender", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 671, - "src": "3381:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 641, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3381:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 644, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 671, - "src": "3397:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 643, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3397:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 646, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 671, - "src": "3413:14:5", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_bytes_calldata_ptr", - "typeString": "bytes" - }, - "typeName": { - "id": 645, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "3413:5:5", - "typeDescriptions": { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3380:48:5" - }, - "returnParameters": { - "id": 651, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 650, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 671, - "src": "3458:4:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 649, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "3458:4:5", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3457:6:5" - }, - "scope": 710, - "src": "3356:246:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - }, - { - "body": { - "id": 691, - "nodeType": "Block", - "src": "3911:106:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 681, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 673, - "src": "3958:4:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 684, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "3972:4:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_ERLCTokenSwap_$710", - "typeString": "contract ERLCTokenSwap" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_contract$_ERLCTokenSwap_$710", - "typeString": "contract ERLCTokenSwap" - } - ], - "id": 683, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "3964:7:5", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": { - "id": 682, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3964:7:5", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 685, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3964:13:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 686, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 675, - "src": "3979:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 679, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "3929:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "id": 680, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transferFrom", - "nodeType": "MemberAccess", - "referencedDeclaration": 2863, - "src": "3929:28:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,address,uint256) external returns (bool)" - } - }, - "id": 687, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3929:57:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6661696c65642d7472616e7366657246726f6d", - "id": 688, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "3988:21:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_f574db8a79d1556499f642cf39c52648970977877bdffe1234a32044752b8fe9", - "typeString": "literal_string \"failed-transferFrom\"" - }, - "value": "failed-transferFrom" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_f574db8a79d1556499f642cf39c52648970977877bdffe1234a32044752b8fe9", - "typeString": "literal_string \"failed-transferFrom\"" - } - ], - "id": 678, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "3921:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 689, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "3921:89:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 690, - "nodeType": "ExpressionStatement", - "src": "3921:89:5" - } - ] - }, - "documentation": null, - "id": 692, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 676, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 673, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 692, - "src": "3864:12:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 672, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "3864:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 675, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 692, - "src": "3878:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 674, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "3878:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "3863:30:5" - }, - "returnParameters": { - "id": 677, - "nodeType": "ParameterList", - "parameters": [], - "src": "3911:0:5" - }, - "scope": 710, - "src": "3846:171:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - }, - { - "body": { - "id": 708, - "nodeType": "Block", - "src": "4087:81:5", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 702, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 694, - "src": "4130:2:5", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 703, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 696, - "src": "4134:6:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 700, - "name": "underlyingToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 469, - "src": "4105:15:5", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$2882", - "typeString": "contract IERC20" - } - }, - "id": 701, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "transfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2831, - "src": "4105:24:5", - "typeDescriptions": { - "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", - "typeString": "function (address,uint256) external returns (bool)" - } - }, - "id": 704, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4105:36:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - { - "argumentTypes": null, - "hexValue": "6661696c65642d7472616e73666572", - "id": 705, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "4143:17:5", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_stringliteral_7e7ec5fb7877eeda04e9c305afe2ef377c223d93963bda0cefaf723fa9d3ff5d", - "typeString": "literal_string \"failed-transfer\"" - }, - "value": "failed-transfer" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - { - "typeIdentifier": "t_stringliteral_7e7ec5fb7877eeda04e9c305afe2ef377c223d93963bda0cefaf723fa9d3ff5d", - "typeString": "literal_string \"failed-transfer\"" - } - ], - "id": 699, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "4097:7:5", - "typeDescriptions": { - "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", - "typeString": "function (bool,string memory) pure" - } - }, - "id": 706, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "4097:64:5", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 707, - "nodeType": "ExpressionStatement", - "src": "4097:64:5" - } - ] - }, - "documentation": null, - "id": 709, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 697, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 694, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 709, - "src": "4042:10:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 693, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "4042:7:5", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 696, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 709, - "src": "4054:14:5", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 695, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "4054:7:5", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "4041:28:5" - }, - "returnParameters": { - "id": 698, - "nodeType": "ParameterList", - "parameters": [], - "src": "4087:0:5" - }, - "scope": 710, - "src": "4023:145:5", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "internal" - } - ], - "scope": 711, - "src": "1325:2845:5" - } - ], - "src": "1242:2929:5" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": { - "1": { - "events": { - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - "0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - "0x629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d34": { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } - }, - "links": {}, - "address": "0xA3B26327482312f70E077aAba62336f7643e41E1", - "transactionHash": "0x978c7b48dbf5830976c095929e8cfd65e9d657d46f526aea580981bf0de20a17" - }, - "5": { - "events": { - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - "0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - "0x629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d34": { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } - }, - "links": {}, - "address": "0xe8D9DB06F99536612c6B193E4C7347866B84C9d5", - "transactionHash": "0x2dc477812cbeed9ed49b1943952492d4c3684f699e81d4ddc5b43e677c103274" - }, - "1607418933360": { - "events": { - "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - "0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "previousAdminRole", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "newAdminRole", - "type": "bytes32" - } - ], - "name": "RoleAdminChanged", - "type": "event" - }, - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleGranted", - "type": "event" - }, - "0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - } - ], - "name": "RoleRevoked", - "type": "event" - }, - "0x8030e83b04d87bef53480e26263266d6ca66863aa8506aca6f2559d18aa1cb67": { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "id", - "type": "uint256" - } - ], - "name": "Snapshot", - "type": "event" - }, - "0x629c1b672a634075c61f1cbfbec5f3e47b94c3f90f065486f615ecfa18713d34": { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - } - }, - "links": {}, - "address": "0x63e0E0F3e1628318572ECD2f5d5B91FDfdf10bd2", - "transactionHash": "0xa74d2f6b211c9cedc38a2b4501dcd5081852bf39f83a26f7b1205c060e313353" - } - }, - "schemaVersion": "3.3.2", - "updatedAt": "2021-01-12T10:31:12.109Z", - "networkType": "ethereum", - "devdoc": { - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "balanceOfAt(address,uint256)": { - "details": "Retrieves the balance of `account` at the time `snapshotId` was created." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "getRoleAdmin(bytes32)": { - "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." - }, - "getRoleMember(bytes32,uint256)": { - "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." - }, - "getRoleMemberCount(bytes32)": { - "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." - }, - "grantRole(bytes32,address)": { - "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." - }, - "hasRole(bytes32,address)": { - "details": "Returns `true` if `account` has been granted `role`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "renounceRole(bytes32,address)": { - "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." - }, - "revokeRole(bytes32,address)": { - "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "totalSupplyAt(uint256)": { - "details": "Retrieves the total supply at the time `snapshotId` was created." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/build/contracts/IERC20KYC.json b/build/contracts/IERC20KYC.json deleted file mode 100644 index aac63d09e..000000000 --- a/build/contracts/IERC20KYC.json +++ /dev/null @@ -1,1865 +0,0 @@ -{ - "contractName": "IERC20KYC", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldMinDeposit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newMinDeposit", - "type": "uint256" - } - ], - "name": "MinDepositChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "SoftCapReached", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "approveAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "detectTransferRestriction", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "restrictionCode", - "type": "uint8" - } - ], - "name": "messageForTransferRestriction", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "onTokenTransfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "receiveApproval", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "name": "transferAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "setMinDeposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isKYC", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "name": "grantKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "name": "revokeKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "recover", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldMinDeposit\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newMinDeposit\",\"type\":\"uint256\"}],\"name\":\"MinDepositChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"SoftCapReached\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"detectTransferRestriction\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"name\":\"grantKYC\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isKYC\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"restrictionCode\",\"type\":\"uint8\"}],\"name\":\"messageForTransferRestriction\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"receiveApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recover\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"name\":\"revokeKYC\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"setMinDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"transferAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC20KYC.sol\":\"IERC20KYC\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC1404.sol\":{\"keccak256\":\"0xec243d84d26dd07f7a93a6f0665d56d60d20b139bf7f201a502a438ac95ac771\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://75cd876336f5cb77d0492f2082912fa42b526cf00820f1f0a0e8be012d402360\",\"dweb:/ipfs/QmZWgMF27i1JfGbgc7FTny9YkoFWDXiYh9gjpfXnHVLWy8\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC20KYC.sol\":{\"keccak256\":\"0xc2aa3e67c31421ad6f43594875c1d5c5a62366d19ef22485d4764a9c2e53ab7c\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f15679680aa5a9590707ab921d90569eb7e30a3c8340a4d9d0bef3ac5375d56b\",\"dweb:/ipfs/QmWZovmERYpAu3FKW7Ea3gZZeangFyGpkpgcLEggbkqhdM\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC677.sol\":{\"keccak256\":\"0x2fc0f8ca46db18638bd9daed90a3e6bd90fec77ef4c899b7aa1b28010355d096\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c213b13843b23ba7b755ad821c07b77cfacafddc5348a2191c164300344818ce\",\"dweb:/ipfs/QmSruFZbrEuzJFmRbbzZL3GehKpqEm6RfVGcuZZGwBedsp\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://efdc632af6960cf865dbc113665ea1f5b90eab75cc40ec062b2f6ae6da582017\",\"dweb:/ipfs/QmfAZFDuG62vxmAN9DnXApv7e7PMzPqi4RkqqZHLMSQiY5\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "immutableReferences": {}, - "sourceMap": "", - "deployedSourceMap": "", - "source": "// SPDX-License-Identifier: Apache-2.0\n\n/******************************************************************************\n * Copyright 2020 IEXEC BLOCKCHAIN TECH *\n * *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); *\n * you may not use this file except in compliance with the License. *\n * You may obtain a copy of the License at *\n * *\n * http://www.apache.org/licenses/LICENSE-2.0 *\n * *\n * Unless required by applicable law or agreed to in writing, software *\n * distributed under the License is distributed on an \"AS IS\" BASIS, *\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *\n * See the License for the specific language governing permissions and *\n * limitations under the License. *\n ******************************************************************************/\n\npragma solidity ^0.6.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"./IERC677.sol\";\nimport \"./IERC1404.sol\";\n\n\ninterface IERC20KYC is IERC20, IERC677, IERC677Receiver, IERC1404\n{\n event MinDepositChanged(uint256 oldMinDeposit, uint256 newMinDeposit);\n event SoftCapReached();\n\n function setMinDeposit(uint256) external;\n function isKYC(address) external view returns (bool);\n function grantKYC(address[] calldata) external;\n function revokeKYC(address[] calldata) external;\n function deposit(uint256) external;\n function withdraw(uint256) external;\n function recover() external;\n}\n", - "sourcePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC20KYC.sol", - "ast": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC20KYC.sol", - "exportedSymbols": { - "IERC20KYC": [ - 1030 - ] - }, - "id": 1031, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 973, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:7" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "id": 974, - "nodeType": "ImportDirective", - "scope": 1031, - "sourceUnit": 15389, - "src": "1267:56:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC677.sol", - "file": "./IERC677.sol", - "id": 975, - "nodeType": "ImportDirective", - "scope": 1031, - "sourceUnit": 1081, - "src": "1324:23:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC1404.sol", - "file": "./IERC1404.sol", - "id": 976, - "nodeType": "ImportDirective", - "scope": 1031, - "sourceUnit": 972, - "src": "1348:24:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 977, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 15388, - "src": "1398:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$15388", - "typeString": "contract IERC20" - } - }, - "id": 978, - "nodeType": "InheritanceSpecifier", - "src": "1398:6:7" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 979, - "name": "IERC677", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1055, - "src": "1406:7:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC677_$1055", - "typeString": "contract IERC677" - } - }, - "id": 980, - "nodeType": "InheritanceSpecifier", - "src": "1406:7:7" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 981, - "name": "IERC677Receiver", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1080, - "src": "1415:15:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC677Receiver_$1080", - "typeString": "contract IERC677Receiver" - } - }, - "id": 982, - "nodeType": "InheritanceSpecifier", - "src": "1415:15:7" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 983, - "name": "IERC1404", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 971, - "src": "1432:8:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC1404_$971", - "typeString": "contract IERC1404" - } - }, - "id": 984, - "nodeType": "InheritanceSpecifier", - "src": "1432:8:7" - } - ], - "contractDependencies": [ - 971, - 1055, - 1080, - 15388 - ], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 1030, - "linearizedBaseContracts": [ - 1030, - 971, - 1080, - 1055, - 15388 - ], - "name": "IERC20KYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 990, - "name": "MinDepositChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 989, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 986, - "indexed": false, - "mutability": "mutable", - "name": "oldMinDeposit", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 990, - "src": "1471:21:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 985, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1471:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 988, - "indexed": false, - "mutability": "mutable", - "name": "newMinDeposit", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 990, - "src": "1494:21:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 987, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1494:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1470:46:7" - }, - "src": "1447:70:7" - }, - { - "anonymous": false, - "documentation": null, - "id": 992, - "name": "SoftCapReached", - "nodeType": "EventDefinition", - "parameters": { - "id": 991, - "nodeType": "ParameterList", - "parameters": [], - "src": "1542:2:7" - }, - "src": "1522:23:7" - }, - { - "body": null, - "documentation": null, - "functionSelector": "8fcc9cfb", - "id": 997, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "setMinDeposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 995, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 994, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 997, - "src": "1574:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 993, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1574:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1573:9:7" - }, - "returnParameters": { - "id": 996, - "nodeType": "ParameterList", - "parameters": [], - "src": "1591:0:7" - }, - "scope": 1030, - "src": "1551:41:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "9944f518", - "id": 1004, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "isKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1000, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 999, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1004, - "src": "1612:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 998, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1612:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1611:9:7" - }, - "returnParameters": { - "id": 1003, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1002, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1004, - "src": "1644:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1001, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1644:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1643:6:7" - }, - "scope": 1030, - "src": "1597:53:7", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "18f33caf", - "id": 1010, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "grantKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1008, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1007, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1010, - "src": "1673:18:7", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1005, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1673:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1006, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1673:9:7", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1672:20:7" - }, - "returnParameters": { - "id": 1009, - "nodeType": "ParameterList", - "parameters": [], - "src": "1701:0:7" - }, - "scope": 1030, - "src": "1655:47:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "4a4e629c", - "id": 1016, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "revokeKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1014, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1013, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1016, - "src": "1726:18:7", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1011, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1726:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1012, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1726:9:7", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1725:20:7" - }, - "returnParameters": { - "id": 1015, - "nodeType": "ParameterList", - "parameters": [], - "src": "1754:0:7" - }, - "scope": 1030, - "src": "1707:48:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "b6b55f25", - "id": 1021, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1019, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1018, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1021, - "src": "1777:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1017, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1777:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1776:9:7" - }, - "returnParameters": { - "id": 1020, - "nodeType": "ParameterList", - "parameters": [], - "src": "1794:0:7" - }, - "scope": 1030, - "src": "1760:35:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "2e1a7d4d", - "id": 1026, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1024, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1023, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1026, - "src": "1818:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1022, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1818:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1817:9:7" - }, - "returnParameters": { - "id": 1025, - "nodeType": "ParameterList", - "parameters": [], - "src": "1835:0:7" - }, - "scope": 1030, - "src": "1800:36:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "ce746024", - "id": 1029, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "recover", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1027, - "nodeType": "ParameterList", - "parameters": [], - "src": "1857:2:7" - }, - "returnParameters": { - "id": 1028, - "nodeType": "ParameterList", - "parameters": [], - "src": "1868:0:7" - }, - "scope": 1030, - "src": "1841:28:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 1031, - "src": "1375:496:7" - } - ], - "src": "1242:630:7" - }, - "legacyAST": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC20KYC.sol", - "exportedSymbols": { - "IERC20KYC": [ - 1030 - ] - }, - "id": 1031, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 973, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:7" - }, - { - "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", - "id": 974, - "nodeType": "ImportDirective", - "scope": 1031, - "sourceUnit": 15389, - "src": "1267:56:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC677.sol", - "file": "./IERC677.sol", - "id": 975, - "nodeType": "ImportDirective", - "scope": 1031, - "sourceUnit": 1081, - "src": "1324:23:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC1404.sol", - "file": "./IERC1404.sol", - "id": 976, - "nodeType": "ImportDirective", - "scope": 1031, - "sourceUnit": 972, - "src": "1348:24:7", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 977, - "name": "IERC20", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 15388, - "src": "1398:6:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$15388", - "typeString": "contract IERC20" - } - }, - "id": 978, - "nodeType": "InheritanceSpecifier", - "src": "1398:6:7" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 979, - "name": "IERC677", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1055, - "src": "1406:7:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC677_$1055", - "typeString": "contract IERC677" - } - }, - "id": 980, - "nodeType": "InheritanceSpecifier", - "src": "1406:7:7" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 981, - "name": "IERC677Receiver", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 1080, - "src": "1415:15:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC677Receiver_$1080", - "typeString": "contract IERC677Receiver" - } - }, - "id": 982, - "nodeType": "InheritanceSpecifier", - "src": "1415:15:7" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 983, - "name": "IERC1404", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 971, - "src": "1432:8:7", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC1404_$971", - "typeString": "contract IERC1404" - } - }, - "id": 984, - "nodeType": "InheritanceSpecifier", - "src": "1432:8:7" - } - ], - "contractDependencies": [ - 971, - 1055, - 1080, - 15388 - ], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 1030, - "linearizedBaseContracts": [ - 1030, - 971, - 1080, - 1055, - 15388 - ], - "name": "IERC20KYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "anonymous": false, - "documentation": null, - "id": 990, - "name": "MinDepositChanged", - "nodeType": "EventDefinition", - "parameters": { - "id": 989, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 986, - "indexed": false, - "mutability": "mutable", - "name": "oldMinDeposit", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 990, - "src": "1471:21:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 985, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1471:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 988, - "indexed": false, - "mutability": "mutable", - "name": "newMinDeposit", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 990, - "src": "1494:21:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 987, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1494:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1470:46:7" - }, - "src": "1447:70:7" - }, - { - "anonymous": false, - "documentation": null, - "id": 992, - "name": "SoftCapReached", - "nodeType": "EventDefinition", - "parameters": { - "id": 991, - "nodeType": "ParameterList", - "parameters": [], - "src": "1542:2:7" - }, - "src": "1522:23:7" - }, - { - "body": null, - "documentation": null, - "functionSelector": "8fcc9cfb", - "id": 997, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "setMinDeposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 995, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 994, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 997, - "src": "1574:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 993, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1574:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1573:9:7" - }, - "returnParameters": { - "id": 996, - "nodeType": "ParameterList", - "parameters": [], - "src": "1591:0:7" - }, - "scope": 1030, - "src": "1551:41:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "9944f518", - "id": 1004, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "isKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1000, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 999, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1004, - "src": "1612:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 998, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1612:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1611:9:7" - }, - "returnParameters": { - "id": 1003, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1002, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1004, - "src": "1644:4:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 1001, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1644:4:7", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1643:6:7" - }, - "scope": 1030, - "src": "1597:53:7", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "18f33caf", - "id": 1010, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "grantKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1008, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1007, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1010, - "src": "1673:18:7", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1005, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1673:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1006, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1673:9:7", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1672:20:7" - }, - "returnParameters": { - "id": 1009, - "nodeType": "ParameterList", - "parameters": [], - "src": "1701:0:7" - }, - "scope": 1030, - "src": "1655:47:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "4a4e629c", - "id": 1016, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "revokeKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1014, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1013, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1016, - "src": "1726:18:7", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 1011, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1726:7:7", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 1012, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1726:9:7", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1725:20:7" - }, - "returnParameters": { - "id": 1015, - "nodeType": "ParameterList", - "parameters": [], - "src": "1754:0:7" - }, - "scope": 1030, - "src": "1707:48:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "b6b55f25", - "id": 1021, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "deposit", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1019, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1018, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1021, - "src": "1777:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1017, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1777:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1776:9:7" - }, - "returnParameters": { - "id": 1020, - "nodeType": "ParameterList", - "parameters": [], - "src": "1794:0:7" - }, - "scope": 1030, - "src": "1760:35:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "2e1a7d4d", - "id": 1026, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "withdraw", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1024, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 1023, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 1026, - "src": "1818:7:7", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 1022, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1818:7:7", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1817:9:7" - }, - "returnParameters": { - "id": 1025, - "nodeType": "ParameterList", - "parameters": [], - "src": "1835:0:7" - }, - "scope": 1030, - "src": "1800:36:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "ce746024", - "id": 1029, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "recover", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 1027, - "nodeType": "ParameterList", - "parameters": [], - "src": "1857:2:7" - }, - "returnParameters": { - "id": 1028, - "nodeType": "ParameterList", - "parameters": [], - "src": "1868:0:7" - }, - "scope": 1030, - "src": "1841:28:7", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 1031, - "src": "1375:496:7" - } - ], - "src": "1242:630:7" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.2.2", - "updatedAt": "2020-11-09T09:15:00.548Z", - "devdoc": { - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called." - }, - "approve(address,uint256)": { - "details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event." - }, - "balanceOf(address)": { - "details": "Returns the amount of tokens owned by `account`." - }, - "totalSupply()": { - "details": "Returns the amount of tokens in existence." - }, - "transfer(address,uint256)": { - "details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." - }, - "transferFrom(address,address,uint256)": { - "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} \ No newline at end of file diff --git a/build/contracts/IKYC.json b/build/contracts/IKYC.json deleted file mode 100644 index b6ecdb49c..000000000 --- a/build/contracts/IKYC.json +++ /dev/null @@ -1,871 +0,0 @@ -{ - "contractName": "IKYC", - "abi": [ - { - "inputs": [], - "name": "KYC_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "KYC_MEMBER_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "isKYC", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "name": "grantKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "name": "revokeKYC", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"KYC_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"KYC_MEMBER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"name\":\"grantKYC\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isKYC\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"name\":\"revokeKYC\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@iexec/erlc/contracts/interfaces/IKYC.sol\":\"IKYC\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@iexec/erlc/contracts/interfaces/IKYC.sol\":{\"keccak256\":\"0xd6d3defa5acc8314a25eae10f20ea630db0a23ecdb3ddf79e8ec7c50fc64bcbc\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://8027cce56d986c3b9d877bc09bc95c642d25a3b279abb530ebd3789453b2dc00\",\"dweb:/ipfs/QmfV5YdHTKNnRWBW1qiMfKY1fjkdq6RpqGjYddTgTq5CsB\"]}},\"version\":1}", - "bytecode": "0x", - "deployedBytecode": "0x", - "immutableReferences": {}, - "sourceMap": "", - "deployedSourceMap": "", - "source": "// SPDX-License-Identifier: Apache-2.0\n\n/******************************************************************************\n * Copyright 2020 IEXEC BLOCKCHAIN TECH *\n * *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); *\n * you may not use this file except in compliance with the License. *\n * You may obtain a copy of the License at *\n * *\n * http://www.apache.org/licenses/LICENSE-2.0 *\n * *\n * Unless required by applicable law or agreed to in writing, software *\n * distributed under the License is distributed on an \"AS IS\" BASIS, *\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *\n * See the License for the specific language governing permissions and *\n * limitations under the License. *\n ******************************************************************************/\n\npragma solidity ^0.6.0;\n\n\ninterface IKYC\n{\n function KYC_ADMIN_ROLE() external view returns(bytes32);\n function KYC_MEMBER_ROLE() external view returns(bytes32);\n function isKYC(address) external view returns (bool);\n function grantKYC(address[] calldata) external;\n function revokeKYC(address[] calldata) external;\n}\n", - "sourcePath": "@iexec/erlc/contracts/interfaces/IKYC.sol", - "ast": { - "absolutePath": "@iexec/erlc/contracts/interfaces/IKYC.sol", - "exportedSymbols": { - "IKYC": [ - 10947 - ] - }, - "id": 10948, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 10917, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:61" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 10947, - "linearizedBaseContracts": [ - 10947 - ], - "name": "IKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "functionSelector": "02d7fd92", - "id": 10922, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "KYC_ADMIN_ROLE", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 10918, - "nodeType": "ParameterList", - "parameters": [], - "src": "1312:2:61" - }, - "returnParameters": { - "id": 10921, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10920, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10922, - "src": "1337:7:61", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10919, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1337:7:61", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1336:9:61" - }, - "scope": 10947, - "src": "1289:57:61", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "27e9083b", - "id": 10927, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "KYC_MEMBER_ROLE", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 10923, - "nodeType": "ParameterList", - "parameters": [], - "src": "1375:2:61" - }, - "returnParameters": { - "id": 10926, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10925, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10927, - "src": "1400:7:61", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10924, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1400:7:61", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1399:9:61" - }, - "scope": 10947, - "src": "1351:58:61", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "9944f518", - "id": 10934, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "isKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 10930, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10929, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10934, - "src": "1429:7:61", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10928, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1429:7:61", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1428:9:61" - }, - "returnParameters": { - "id": 10933, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10932, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10934, - "src": "1461:4:61", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 10931, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1461:4:61", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1460:6:61" - }, - "scope": 10947, - "src": "1414:53:61", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "18f33caf", - "id": 10940, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "grantKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 10938, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10937, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10940, - "src": "1490:18:61", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 10935, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1490:7:61", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10936, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1490:9:61", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1489:20:61" - }, - "returnParameters": { - "id": 10939, - "nodeType": "ParameterList", - "parameters": [], - "src": "1518:0:61" - }, - "scope": 10947, - "src": "1472:47:61", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "4a4e629c", - "id": 10946, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "revokeKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 10944, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10943, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10946, - "src": "1543:18:61", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 10941, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1543:7:61", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10942, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1543:9:61", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1542:20:61" - }, - "returnParameters": { - "id": 10945, - "nodeType": "ParameterList", - "parameters": [], - "src": "1571:0:61" - }, - "scope": 10947, - "src": "1524:48:61", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 10948, - "src": "1268:306:61" - } - ], - "src": "1242:333:61" - }, - "legacyAST": { - "absolutePath": "@iexec/erlc/contracts/interfaces/IKYC.sol", - "exportedSymbols": { - "IKYC": [ - 10947 - ] - }, - "id": 10948, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 10917, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:61" - }, - { - "abstract": false, - "baseContracts": [], - "contractDependencies": [], - "contractKind": "interface", - "documentation": null, - "fullyImplemented": false, - "id": 10947, - "linearizedBaseContracts": [ - 10947 - ], - "name": "IKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "body": null, - "documentation": null, - "functionSelector": "02d7fd92", - "id": 10922, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "KYC_ADMIN_ROLE", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 10918, - "nodeType": "ParameterList", - "parameters": [], - "src": "1312:2:61" - }, - "returnParameters": { - "id": 10921, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10920, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10922, - "src": "1337:7:61", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10919, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1337:7:61", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1336:9:61" - }, - "scope": 10947, - "src": "1289:57:61", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "27e9083b", - "id": 10927, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "KYC_MEMBER_ROLE", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 10923, - "nodeType": "ParameterList", - "parameters": [], - "src": "1375:2:61" - }, - "returnParameters": { - "id": 10926, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10925, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10927, - "src": "1400:7:61", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - }, - "typeName": { - "id": 10924, - "name": "bytes32", - "nodeType": "ElementaryTypeName", - "src": "1400:7:61", - "typeDescriptions": { - "typeIdentifier": "t_bytes32", - "typeString": "bytes32" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1399:9:61" - }, - "scope": 10947, - "src": "1351:58:61", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "9944f518", - "id": 10934, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "isKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 10930, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10929, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10934, - "src": "1429:7:61", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 10928, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1429:7:61", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1428:9:61" - }, - "returnParameters": { - "id": 10933, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10932, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10934, - "src": "1461:4:61", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 10931, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1461:4:61", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1460:6:61" - }, - "scope": 10947, - "src": "1414:53:61", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "18f33caf", - "id": 10940, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "grantKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 10938, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10937, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10940, - "src": "1490:18:61", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 10935, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1490:7:61", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10936, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1490:9:61", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1489:20:61" - }, - "returnParameters": { - "id": 10939, - "nodeType": "ParameterList", - "parameters": [], - "src": "1518:0:61" - }, - "scope": 10947, - "src": "1472:47:61", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - }, - { - "body": null, - "documentation": null, - "functionSelector": "4a4e629c", - "id": 10946, - "implemented": false, - "kind": "function", - "modifiers": [], - "name": "revokeKYC", - "nodeType": "FunctionDefinition", - "overrides": null, - "parameters": { - "id": 10944, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 10943, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 10946, - "src": "1543:18:61", - "stateVariable": false, - "storageLocation": "calldata", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", - "typeString": "address[]" - }, - "typeName": { - "baseType": { - "id": 10941, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1543:7:61", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 10942, - "length": null, - "nodeType": "ArrayTypeName", - "src": "1543:9:61", - "typeDescriptions": { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1542:20:61" - }, - "returnParameters": { - "id": 10945, - "nodeType": "ParameterList", - "parameters": [], - "src": "1571:0:61" - }, - "scope": 10947, - "src": "1524:48:61", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "external" - } - ], - "scope": 10948, - "src": "1268:306:61" - } - ], - "src": "1242:333:61" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.2.2", - "updatedAt": "2020-11-13T16:44:43.540Z", - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - } -} diff --git a/build/contracts/IexecERC20CoreKYC.json b/build/contracts/IexecERC20CoreKYC.json deleted file mode 100644 index 5f5ee42a1..000000000 --- a/build/contracts/IexecERC20CoreKYC.json +++ /dev/null @@ -1,1748 +0,0 @@ -{ - "contractName": "IexecERC20CoreKYC", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "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": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "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.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"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\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"ref\",\"type\":\"bytes32\"}],\"name\":\"Reward\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"ref\",\"type\":\"bytes32\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"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\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol\":\"IexecERC20CoreKYC\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/Store.sol\":{\"keccak256\":\"0xbc74ce351bc304d65cc20a95bad8290711ac47267b7cfff5500cdeff42b1a18b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f92ebcd5817a7d6f20ef48662f985e9bdb8a68f3752249a14a1a4cbb8b99f190\",\"dweb:/ipfs/QmZAph8GSDPRkXxNUsQpGCXDsmMSGo6Pr5HFg2f4ZXgRZc\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC1404.sol\":{\"keccak256\":\"0xec243d84d26dd07f7a93a6f0665d56d60d20b139bf7f201a502a438ac95ac771\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://75cd876336f5cb77d0492f2082912fa42b526cf00820f1f0a0e8be012d402360\",\"dweb:/ipfs/QmZWgMF27i1JfGbgc7FTny9YkoFWDXiYh9gjpfXnHVLWy8\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC20KYC.sol\":{\"keccak256\":\"0xc2aa3e67c31421ad6f43594875c1d5c5a62366d19ef22485d4764a9c2e53ab7c\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f15679680aa5a9590707ab921d90569eb7e30a3c8340a4d9d0bef3ac5375d56b\",\"dweb:/ipfs/QmWZovmERYpAu3FKW7Ea3gZZeangFyGpkpgcLEggbkqhdM\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC677.sol\":{\"keccak256\":\"0x2fc0f8ca46db18638bd9daed90a3e6bd90fec77ef4c899b7aa1b28010355d096\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c213b13843b23ba7b755ad821c07b77cfacafddc5348a2191c164300344818ce\",\"dweb:/ipfs/QmSruFZbrEuzJFmRbbzZL3GehKpqEm6RfVGcuZZGwBedsp\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/libs/IexecLibCore_v5.sol\":{\"keccak256\":\"0x7fab9c16493884c64cdd31627c5d71389de785becf611b738343d75f7495471d\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://3e243796363e7d4cd249b432a2511cdb49759ed7d2e8bd73817f09ff60ff919c\",\"dweb:/ipfs/Qmeat95AtRviDFcJ3W3aBZmH51aHReX9RLnPZ3Gof3FnzW\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/libs/IexecLibOrders_v5.sol\":{\"keccak256\":\"0x430eaa82ce8d43771c8a84af5113e31de79490d5b9d561ef90034bdc5a2a993b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://65cb57ac25afa5b6e0811290866aace3b013fe67aa82c5e72b6bb00d50e9f28a\",\"dweb:/ipfs/QmTTNTASsnM8db9vTjkbxz5kiNtqVxNrjwxkvVEmoHuMj9\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/DelegateBase.sol\":{\"keccak256\":\"0xb59c042fe327f79a7c13fca4f0512c643545b51045a07517723dd1104fcb68f1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://42231705416aaefd95467b78933eb5dc4c71d5f0eebd3628f60cb2388109e4ec\",\"dweb:/ipfs/QmU7Eeejx7tGcAP14D1XinQgt4Mjfo2a3Ur7cipLPzjPqx\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20Core.sol\":{\"keccak256\":\"0x28db238625e52e31aa9d602612e6874d2a1f8091063dd04e8cd7870642af3d54\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e6e5db14c0e38900a3f92476f45c608b143fd83fa48fffe82bd03bd4a28a1bc6\",\"dweb:/ipfs/QmecHBiCZgekCafN6BnopvRuiiZ9GjRn6PeM6x7PHkUHLZ\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol\":{\"keccak256\":\"0x74e0cfc2f63fec8064535691819308cc537140ba22494d64bfd4bb748d9c0f74\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://93c10dce05b3e05084715c3660b61a5e9b7e21db85da2899cfcac9a7f03df7ff\",\"dweb:/ipfs/QmNoHo5uPYPqusH7cki6j2afHbCE1zWovU8V1QzTpCKwi6\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/IRegistry.sol\":{\"keccak256\":\"0xc735f7764e312ea161551bc1a2749820928b1bf80c4aeb2f528a2f4a498078cd\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://7dbefb9d9bec9b56f694d2ee6dc0a44b341c027c0d392534b457867208f019b9\",\"dweb:/ipfs/QmSiSkhgUcAGscopDoRtGnHiWAbxNwBf9ZV8nnVYoWqZ8Z\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/Registry.sol\":{\"keccak256\":\"0x18bdeaad129f5034937fb69a7afbd68ffba8341172a7a124d6be22d6cd2cc5ad\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e77b038842b0c19eb8cb2bac495025ec2fe074472370708cc0b6b6a9e6e5275c\",\"dweb:/ipfs/QmNPUSUBUPezTebKA3VzRu8u5KKuYiKGP1m3yME2J6YnSc\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/RegistryEntry.sol\":{\"keccak256\":\"0xc5e7a46311946df50486dd451f456aee0abe92184dbc31e3a40fc9198f8f6582\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://24f058496713a743781c3353477a03255cdce4cfca845883d207a62346c5c684\",\"dweb:/ipfs/QmVVrLgcoAetTY7EsL3fWfC7VuqKzh1ncVF8spkEkgPQot\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/apps/App.sol\":{\"keccak256\":\"0x1408d4f83f2c512ce71a680975d480fffb5ff417b2ecc37de45076e8d8f43d1a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e817bcc02c7e8547179b0293ed61b4066a04ab3e2b7cda6db90b41e42cabcecc\",\"dweb:/ipfs/QmVPJzM6SXg4ngSSHi2kioQ2htbJPUta5ZMyrgMnAGmrW6\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/datasets/Dataset.sol\":{\"keccak256\":\"0xf58ec4bed61a76b9d557e7b1f486fced23cb4dfc5047fc93ba6b4684c1624c2a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://530858af626fb5598eb9c973b9d3a0c2c1d431b43ca9e7c49143ab5edf619d67\",\"dweb:/ipfs/QmRkksj1gDnz1kcB6JFKuBKXD3mq52SsjuPN5SMUqSK46u\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/workerpools/Workerpool.sol\":{\"keccak256\":\"0x5604f1f935ea198caa899dfd96af42f9f2280954c9798caa58e9cf198b8d492e\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://10fabd01e983ad441a08c57ff78451237c0d350ba7e0cab42a7dccbf784209bd\",\"dweb:/ipfs/Qmbt3eiERXv3QUHHJAFKwfgrCNz6ZcA1ccUWtztLFiv9Av\"]},\"@iexec/interface/contracts/IexecClerk.sol\":{\"keccak256\":\"0x703252a638a5a7e2b600395fd920712a1ac259018bc9578fe581a77fa2f008a9\",\"urls\":[\"bzz-raw://072b9e948e5ac4a7f60466c23b322ea0f1aca711f1a94616e658600c2a4c36a2\",\"dweb:/ipfs/QmRP57bkhWDr5BeawfjiKsbdwFiHnw6nc6zgiEad3hQoSJ\"]},\"@iexec/interface/contracts/IexecHub.sol\":{\"keccak256\":\"0x8e293b7624550823838ed9113400544c5980afac1043ddacad7a862c91b0840d\",\"urls\":[\"bzz-raw://ae34ebc355838595ee69b24a31e60deb186455cc388c88de7ecd0294c7037075\",\"dweb:/ipfs/QmUYVQJBWG7ohAYksJRDJKcJVyPMXNFJSPWMAuQcGfWHo7\"]},\"@iexec/interface/contracts/IexecRegistries.sol\":{\"keccak256\":\"0xb39eef47d62d8751c5adfeaf169ce57b50c480788be8356289bc28b78bc24fde\",\"urls\":[\"bzz-raw://a86593f1ef9953ac0965aab4e764374580a899a7f7871ad66b432523171063a1\",\"dweb:/ipfs/QmcYZhHD45APoS1Ebi416DhXU3fiCzoFW2WSMux4AxhFqk\"]},\"@iexec/interface/contracts/libs/IexecODBLibCore.sol\":{\"keccak256\":\"0x3fc7ff4152e9a8f9747d42e262c15c3d460d409732711d9e1da8a88163880183\",\"urls\":[\"bzz-raw://8bacc98b866852e9f1e3563948381cba142ab61d6b1a7c62fbc53b7d57aa0589\",\"dweb:/ipfs/QmUNjhjBxdtHQFWQ61CgnPoaAzL767tQSKF6x34VFWeRyF\"]},\"@iexec/interface/contracts/libs/IexecODBLibOrders.sol\":{\"keccak256\":\"0xe2848a685785b09dc9ee5a6e6329a417eaf18e520388e8575d45a5376b1d62ca\",\"urls\":[\"bzz-raw://d1385ab26f382baa7aadb80faed54290296be09eeccbee1193a1b8a53b0b15d5\",\"dweb:/ipfs/QmUQTFcGX5VZiYwHKu9Yjc4PHNrMgdAyKwKi6tFEMsbaJk\"]},\"@iexec/solidity/contracts/ENStools/ENSReverseRegistration.sol\":{\"keccak256\":\"0xd1e5b9222925769b40cbf20a4b96d9d3fa462cca6e40d0d9021033ebb0a7d584\",\"urls\":[\"bzz-raw://0e47b7621c8f6cee3c5900f0545cb563fa763712cf235d320fd88d0857699ed1\",\"dweb:/ipfs/QmS18tjVQ6oxc7MHUK5DKLrRSX1v7N4e5Pc6xKjJCNcFv3\"]},\"@iexec/solidity/contracts/ENStools/IENS.sol\":{\"keccak256\":\"0xb109a681632d71269ed4efbe11fc9d1bcee6bc29109f2fb8ced6951dafc28302\",\"urls\":[\"bzz-raw://920ee6b3712ebe1cb28977abf4ded033067305d786116f94777ab03a6b6b9ee9\",\"dweb:/ipfs/QmWFCBtMLUZYJ2cxzHBjHq5WZC8Yydnbk6dezoXHT4Pxgz\"]},\"@iexec/solidity/contracts/ENStools/IReverseRegistrar.sol\":{\"keccak256\":\"0xff985fd263e59bd387e543cd5cf99235ab6e066b6d1be95e79108dacc749673f\",\"urls\":[\"bzz-raw://98a054bc372f5fd6c80793d32a74f3387d562ed6b3e17388b5f8f4b6bc96a62c\",\"dweb:/ipfs/QmQtkE8u6h7zrBrdfEez6STf18766AFP5kK8hGL4SNoWuP\"]},\"@iexec/solidity/contracts/ERC1538/ERC1538Module.sol\":{\"keccak256\":\"0xb1e1ff5fcce00614303b0bb01c595a7d2f3496ae88bc2068e56ba9cd72ec8921\",\"urls\":[\"bzz-raw://a6b87d03a17727ce6fe6c5b0078a198898153ae8230345468479a9aa4560835d\",\"dweb:/ipfs/QmV4T7Wg8TS3uAVhnqMhqD6yZ7Qv8iouYnYrkTSCJirG2P\"]},\"@iexec/solidity/contracts/ERC1538/ERC1538Store.sol\":{\"keccak256\":\"0x4d1e8821dc216013f20044bbf82df3c2ab2c739d1b2ce4d90c15cb65f85707d8\",\"urls\":[\"bzz-raw://e36d4db70862f87b8657c19330f0d45e8e7018ebcf3df97525638c8caa919d2b\",\"dweb:/ipfs/QmZqsrXPsyRkRkjuupKG2SYsyUTBXqe7nkkCy7RKxDKz1L\"]},\"@iexec/solidity/contracts/Libs/SafeMathExtended.sol\":{\"keccak256\":\"0xf2802ae591eb22954d9c8e02658ae7577940890aff8d8927a7255e254fed605b\",\"urls\":[\"bzz-raw://8dcc485d21a3aa3f643768d4ac4fc69697b9b37f8fb779f3998ab4cee143fa66\",\"dweb:/ipfs/QmWdwgKPMoWuidYQp6WFsJBhNbJUwFHNE9YPYQZhBsKj7e\"]},\"@iexec/solidity/contracts/Upgradeability/BaseUpgradeabilityProxy.sol\":{\"keccak256\":\"0x47ec56a1226ecf04d49aa82f768814923c1957b69f7fc9e7e470885c75b5a2c6\",\"urls\":[\"bzz-raw://4eae82be03a247a27a2948ed12d5a826dea977f4b5528830c19d9cf4c23dcd53\",\"dweb:/ipfs/Qmb9HtnohAMvjb7vYnXaT3AnQd9p9sLsThnyLnXVzz1umq\"]},\"@iexec/solidity/contracts/Upgradeability/InitializableUpgradeabilityProxy.sol\":{\"keccak256\":\"0xe1bf07e5d913bd04484305a3fb0cc576f6b5d8e4fc0406bf7c9a8b6b2ed766e5\",\"urls\":[\"bzz-raw://b42f6dff696ceadeb44a02aae3049e603984c18af8d94f33fb6544a8b279179c\",\"dweb:/ipfs/QmRWTaRHCGZhKZFKrVAJwXukXiCZcezrVhJJ28H2qBbai7\"]},\"@iexec/solidity/contracts/Upgradeability/Proxy.sol\":{\"keccak256\":\"0xd89f285d80cfeff0efc87f11dbc024a587da3bba142a06695cbac7e4050e9302\",\"urls\":[\"bzz-raw://9c8323ec7efc9fde6c1529f1070c3f3406adb5f8836b17221530d8f0110fe3f4\",\"dweb:/ipfs/QmURRsX9L2gZ83aMULtY1EuRMJExHhFYErCbkxE5CNkAzE\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0xdb26cbf4d028490f49831a7865c2fe1b28db44b535ca8d343785a3b768aae183\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://840b14ce0315c47d49ba328f1f9fa7654ded1c9e1559e6c5e777a7b2dc28bf0a\",\"dweb:/ipfs/QmTLLabn4wcfGro9LEmUXUN2nwKqZSotXMvjDCLXEnLtZP\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x4bd6402ca6b3419008c2b482aff54e66836e8cb4eba2680e42ac5884ae6424fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f9f711fb8d0d92aeea1c327e3845d13ca1fa8f142e47f8723cd5b3106fb29a3\",\"dweb:/ipfs/QmVQUReDW9f4zGqhizwHnyU8EntMs95tbASdqkGncnikba\"]},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"keccak256\":\"0xb046d18f9d09683ca1c0ed6d80c61da8a8a7d9b30bad70a17b898538683eff74\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4728713afa6ae36cc9e92c7107c796a313add3ec20f813be2cde76c814486b2a\",\"dweb:/ipfs/QmUJBTXvYaGDF5PVnd5pUvYerc9DRXvqANDzgCzAp3FkkA\"]},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xfa152b6e88a1dc50780e8f1580426dc23ad2e1e2c2f086a088adf206a202f453\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5127b264994adab88fae419b1c493efc5acd07134c19ee5c0397e50018291ebf\",\"dweb:/ipfs/QmWwJZVhvdmvUCdimbb6R2Jiu59zjPqm6XTMchM6LaEHAp\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x9a9cf02622cd7a64261b10534fc3260449da25c98c9e96d1b4ae8110a20e5806\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2df142592d1dc267d9549049ee3317fa190d2f87eaa565f86ab05ec83f7ab8f5\",\"dweb:/ipfs/QmSkJtcfWo7c42KnL5hho6GFxK6HRNV91XABx1P7xDtfLV\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://efdc632af6960cf865dbc113665ea1f5b90eab75cc40ec062b2f6ae6da582017\",\"dweb:/ipfs/QmfAZFDuG62vxmAN9DnXApv7e7PMzPqi4RkqqZHLMSQiY5\"]},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"keccak256\":\"0x1071a23188ba7f5bb16f51b0b01a67fd41fe56f862d8f83985788cf46f3b91bd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c7082ca99b93f2e541cafaad00ed32675adf0752eab78eccabcf91dec9fd5d73\",\"dweb:/ipfs/QmdqooMmYBQVi7p6subDFM4e1944AuLjZUpHMjGtae7Lgd\"]},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x227bafd3e165b13f5d98c42a44376e48d41f4a265db8803f2707faaeae9659aa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c9aa7959a30871669ce46172cd117b084b607d602d9ce695ce79005582b0b69b\",\"dweb:/ipfs/QmXZUWeLXmArQinHL4RnacJLT22GvCExqREYM6pHLX7CX9\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"keccak256\":\"0x3636662804cd8f474536b2875a9038a4c3fb91879f1bbff48af5c3f140fcd2f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9fab8521263fa581544000cb57335a3f2e6bcdfbb5579d3ceaa5acf741c67c4f\",\"dweb:/ipfs/QmZfXnMom7JSNtfyie5yGPN1SUC4SmHbz4ScVBH88URmA7\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"keccak256\":\"0xe7f984cedc00a138dc27f263c73c32ba9a4b2fd23b6c34ac46f46c074b943538\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0f4acda12f076fe7584921241ddbb5b460ca7cad6cb8a42252ac7f2a9f539127\",\"dweb:/ipfs/QmQmfhkEv9GrhdWe67QtXnU19AMuoEmy31QnHPkucdYLjZ\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"keccak256\":\"0x321ee37ef4925020aa818a03ec7fe48e057561f65ab009a84f6c20c86026ade7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://01f9d74a17a56024984251b97e428e24c9d3abffbae5bd290f0ec263c82e9694\",\"dweb:/ipfs/QmRryCuuXu2ukrDmatB8TqdEhPLiK6NBRt41RiPUaX1qKy\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xdfb4f812600ba4ce6738c35584ceb8c9433472583051b48ba5b1f66cb758a498\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://df02dffe1c1de089d9b4f6192f0dcf464526f2230f420b3deec4645e0cdd2bff\",\"dweb:/ipfs/QmcqXGAU3KJqwrgUVoGJ2W8osomhSJ4R5kdsRpbuW3fELS\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x16926b3c19504ea52f73abe41dfa9c1ef9c328d6088b82162d475caecaa47a6d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc578656a08c07f33ecf4a54324bad5f951afdcd990cdab1dcde493d6bb49d9c\",\"dweb:/ipfs/QmbXLJtTaqBg7WwC4p9gsRjA3VEwNwGc6W9afJeAaacF71\"]},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"keccak256\":\"0x244e4b74b17716120cf28e58636f11c699b8c0c94628bd952a95cee038d7e32b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://198d566157120c526bd6b5086b32cae85a11389b8a538f533ba9f9447915da0e\",\"dweb:/ipfs/QmeE6d8KWERx7f1FVS5tMnitNJxBm2yWXRSEUBF7R6voLh\"]},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"keccak256\":\"0xb2a11b236f073662f5a196995863f51c11d006bf7c3de158b316dfa1506c4b79\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8651649cf0b9efa18c3b01c030276fa320d41adbdc286833417e7f36e357b2f3\",\"dweb:/ipfs/QmafhM2Nd1aP43QVB1eRRZaqRXQKswNfQcWi8U8xjrxCfN\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x79484115dbfa737054f73e041009a02eeb434dd81be5d684bf4255ad3b5ab558\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://12c119699463450c2544f5b9d8709b5e9e9164c62948a79c3ec53423a051d969\",\"dweb:/ipfs/QmPJduzSAaekq447QeFqAp3E7dc8CnNk5ajofckJ4ahA7Q\"]},\"solstruct/contracts/libs/LibMap2.bytes4.address.bytes.sol\":{\"keccak256\":\"0x471645d4b20cc36606122fc6bb692cdf8489118547f90bde2740cb73b1e64d54\",\"urls\":[\"bzz-raw://7ca824c03cd077e6d9630eaa4755787c785a61f612cb8e3ba13d0ce92ee55738\",\"dweb:/ipfs/QmdavtXDokZ7vWZt8pMxPi7DaG3Hd1Q5MyeJjXGRFQuL9r\"]},\"solstruct/contracts/libs/LibSet.bytes4.sol\":{\"keccak256\":\"0xdec5833ab65ae8cab500b84424dde49c1f7817c6575e1631a729fc88c6d4bd7f\",\"urls\":[\"bzz-raw://2e5d23b8383819e6dd77ea61ed30740bcba45b0fff609922b11d1cae2b0223f1\",\"dweb:/ipfs/QmQ27sefXEYXBUSEGdPkuzCqemtUJzNXhhsyd7kB94w6CE\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50600061001b610060565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350916000805160206103e3833981519152908290a35061005b610064565b61010f565b3390565b61006c610060565b6000546001600160a01b039081169116146100a25760405162461bcd60e51b8152600401610099906100da565b60405180910390fd5b600080546040516001600160a01b03909116906000805160206103e3833981519152908390a3600080546001600160a01b0319169055565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6102c58061011e6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063715018a6146100465780638da5cb5b14610050578063f2fde38b1461006e575b600080fd5b61004e610081565b005b610058610109565b6040516100659190610200565b60405180910390f35b61004e61007c3660046101d2565b610118565b6100896101ce565b6000546001600160a01b039081169116146100bf5760405162461bcd60e51b81526004016100b69061025a565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6101206101ce565b6000546001600160a01b0390811691161461014d5760405162461bcd60e51b81526004016100b69061025a565b6001600160a01b0381166101735760405162461bcd60e51b81526004016100b690610214565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6000602082840312156101e3578081fd5b81356001600160a01b03811681146101f9578182fd5b9392505050565b6001600160a01b0391909116815260200190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea26469706673582212200d342686778a4a292a629f528497d15fc246ddc0658107199e7c55b8ce01adee64736f6c634300060c00338be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063715018a6146100465780638da5cb5b14610050578063f2fde38b1461006e575b600080fd5b61004e610081565b005b610058610109565b6040516100659190610200565b60405180910390f35b61004e61007c3660046101d2565b610118565b6100896101ce565b6000546001600160a01b039081169116146100bf5760405162461bcd60e51b81526004016100b69061025a565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6101206101ce565b6000546001600160a01b0390811691161461014d5760405162461bcd60e51b81526004016100b69061025a565b6001600160a01b0381166101735760405162461bcd60e51b81526004016100b690610214565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6000602082840312156101e3578081fd5b81356001600160a01b03811681146101f9578182fd5b9392505050565b6001600160a01b0391909116815260200190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea26469706673582212200d342686778a4a292a629f528497d15fc246ddc0658107199e7c55b8ce01adee64736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "1334:478:17:-:0;;;;;;;;;;;;-1:-1:-1;865:17:83;885:12;:10;:12::i;:::-;907:6;:18;;-1:-1:-1;;;;;;907:18:83;-1:-1:-1;;;;;907:18:83;;;;;;;940:43;;907:18;;-1:-1:-1;907:18:83;-1:-1:-1;;;;;;;;;;;940:43:83;907:6;;940:43;-1:-1:-1;124:19:73;:17;:19::i;:::-;1334:478:17;;590:104:81;677:10;590:104;:::o;1689:145:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;;;;;;;;;1795:1:::1;1779:6:::0;;1758:40:::1;::::0;-1:-1:-1;;;;;1779:6:83;;::::1;::::0;-1:-1:-1;;;;;;;;;;;1758:40:83;1795:1;;1758:40:::1;1825:1;1808:19:::0;;-1:-1:-1;;;;;;1808:19:83::1;::::0;;1689:145::o;346:416:-1:-;546:2;560:47;;;531:18;;;873:19;266:34;913:14;;;246:55;320:12;;;517:245::o;:::-;1334:478:17;;;;;;", - "deployedSourceMap": "1334:478:17:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1689:145:83;;;:::i;:::-;;1066:77;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1983:240;;;;;;:::i;:::-;;:::i;1689:145::-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;;;;;;;;;1795:1:::1;1779:6:::0;;1758:40:::1;::::0;-1:-1:-1;;;;;1779:6:83;;::::1;::::0;1758:40:::1;::::0;1795:1;;1758:40:::1;1825:1;1808:19:::0;;-1:-1:-1;;;;;;1808:19:83::1;::::0;;1689:145::o;1066:77::-;1104:7;1130:6;-1:-1:-1;;;;;1130:6:83;1066:77;:::o;1983:240::-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;-1:-1:-1;;;;;2071:22:83;::::1;2063:73;;;;-1:-1:-1::0;;;2063:73:83::1;;;;;;;:::i;:::-;2172:6;::::0;;2151:38:::1;::::0;-1:-1:-1;;;;;2151:38:83;;::::1;::::0;2172:6;::::1;::::0;2151:38:::1;::::0;::::1;2199:6;:17:::0;;-1:-1:-1;;;;;;2199:17:83::1;-1:-1:-1::0;;;;;2199:17:83;;;::::1;::::0;;;::::1;::::0;;1983:240::o;590:104:81:-;677:10;590:104;:::o;142:241:-1:-;;246:2;234:9;225:7;221:23;217:32;214:2;;;-1:-1;;252:12;214:2;72:20;;-1:-1;;;;;2642:54;;2767:35;;2757:2;;-1:-1;;2806:12;2757:2;304:63;208:175;-1:-1;;;208:175::o;1235:222::-;-1:-1;;;;;2642:54;;;;461:37;;1362:2;1347:18;;1333:124::o;1464:416::-;1664:2;1678:47;;;735:2;1649:18;;;2414:19;771:34;2454:14;;;751:55;-1:-1;;;826:12;;;819:30;868:12;;;1635:245::o;1887:416::-;2087:2;2101:47;;;2072:18;;;2414:19;1155:34;2454:14;;;1135:55;1209:12;;;2058:245::o", - "source": "// SPDX-License-Identifier: Apache-2.0\n\n/******************************************************************************\n * Copyright 2020 IEXEC BLOCKCHAIN TECH *\n * *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); *\n * you may not use this file except in compliance with the License. *\n * You may obtain a copy of the License at *\n * *\n * http://www.apache.org/licenses/LICENSE-2.0 *\n * *\n * Unless required by applicable law or agreed to in writing, software *\n * distributed under the License is distributed on an \"AS IS\" BASIS, *\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *\n * See the License for the specific language governing permissions and *\n * limitations under the License. *\n ******************************************************************************/\n\npragma solidity ^0.6.0;\npragma experimental ABIEncoderV2;\n\nimport \"./IexecERC20Core.sol\";\n\n\ncontract IexecERC20CoreKYC is IexecERC20Core\n{\n\tfunction _isAuthorized(address account)\n\tinternal virtual override returns (bool)\n\t{\n\t\treturn m_baseToken.isKYC(account);\n\t}\n\n\tfunction _beforeTokenTransfer(address from, address to, uint256 amount)\n\tinternal virtual override\n\t{\n\t\tuint8 restrictionCode = m_baseToken.detectTransferRestriction(from, to, amount);\n\t\tif (restrictionCode != uint8(0))\n\t\t{\n\t\t\trevert(m_baseToken.messageForTransferRestriction(restrictionCode));\n\t\t}\n\t}\n}\n", - "sourcePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol", - "ast": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol", - "exportedSymbols": { - "IexecERC20CoreKYC": [ - 2995 - ] - }, - "id": 2996, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2941, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:17" - }, - { - "id": 2942, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "1266:33:17" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20Core.sol", - "file": "./IexecERC20Core.sol", - "id": 2943, - "nodeType": "ImportDirective", - "scope": 2996, - "sourceUnit": 2940, - "src": "1301:30:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2944, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1364:14:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - "id": 2945, - "nodeType": "InheritanceSpecifier", - "src": "1364:14:17" - } - ], - "contractDependencies": [ - 309, - 1658, - 2939, - 13161, - 13173, - 13740, - 14132 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2995, - "linearizedBaseContracts": [ - 2995, - 2939, - 1658, - 13161, - 309, - 13173, - 14132, - 13740 - ], - "name": "IexecERC20CoreKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "baseFunctions": [ - 2463 - ], - "body": { - "id": 2958, - "nodeType": "Block", - "src": "1465:41:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2955, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2947, - "src": "1494:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2953, - "name": "m_baseToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 217, - "src": "1476:11:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20KYC_$1030", - "typeString": "contract IERC20KYC" - } - }, - "id": 2954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isKYC", - "nodeType": "MemberAccess", - "referencedDeclaration": 1004, - "src": "1476:17:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view external returns (bool)" - } - }, - "id": 2956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1476:26:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2952, - "id": 2957, - "nodeType": "Return", - "src": "1469:33:17" - } - ] - }, - "documentation": null, - "id": 2959, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_isAuthorized", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2949, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "1440:8:17" - }, - "parameters": { - "id": 2948, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2947, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2959, - "src": "1405:15:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2946, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1405:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1404:17:17" - }, - "returnParameters": { - "id": 2952, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2951, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2959, - "src": "1458:4:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2950, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1458:4:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1457:6:17" - }, - "scope": 2995, - "src": "1382:124:17", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "baseFunctions": [ - 2473 - ], - "body": { - "id": 2993, - "nodeType": "Block", - "src": "1609:201:17", - "statements": [ - { - "assignments": [ - 2970 - ], - "declarations": [ - { - "constant": false, - "id": 2970, - "mutability": "mutable", - "name": "restrictionCode", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2993, - "src": "1613:21:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2969, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1613:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2977, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2973, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2961, - "src": "1675:4:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2974, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2963, - "src": "1681:2:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2975, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2965, - "src": "1685:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2971, - "name": "m_baseToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 217, - "src": "1637:11:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20KYC_$1030", - "typeString": "contract IERC20KYC" - } - }, - "id": 2972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "detectTransferRestriction", - "nodeType": "MemberAccess", - "referencedDeclaration": 963, - "src": "1637:37:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$_t_uint256_$returns$_t_uint8_$", - "typeString": "function (address,address,uint256) view external returns (uint8)" - } - }, - "id": 2976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1637:55:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1613:79:17" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 2983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2978, - "name": "restrictionCode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2970, - "src": "1700:15:17", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1725:1:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2980, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1719:5:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint8_$", - "typeString": "type(uint8)" - }, - "typeName": { - "id": 2979, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1719:5:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1719:8:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "1700:27:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2992, - "nodeType": "IfStatement", - "src": "1696:111:17", - "trueBody": { - "id": 2991, - "nodeType": "Block", - "src": "1731:76:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2987, - "name": "restrictionCode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2970, - "src": "1785:15:17", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "expression": { - "argumentTypes": null, - "id": 2985, - "name": "m_baseToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 217, - "src": "1743:11:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20KYC_$1030", - "typeString": "contract IERC20KYC" - } - }, - "id": 2986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "messageForTransferRestriction", - "nodeType": "MemberAccess", - "referencedDeclaration": 970, - "src": "1743:41:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint8_$returns$_t_string_memory_ptr_$", - "typeString": "function (uint8) view external returns (string memory)" - } - }, - "id": 2988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1743:58:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2984, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "src": "1736:6:17", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 2989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1736:66:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2990, - "nodeType": "ExpressionStatement", - "src": "1736:66:17" - } - ] - } - } - ] - }, - "documentation": null, - "id": 2994, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2967, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "1599:8:17" - }, - "parameters": { - "id": 2966, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2961, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2994, - "src": "1539:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2960, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1539:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2963, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2994, - "src": "1553:10:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2962, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1553:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2965, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2994, - "src": "1565:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2964, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1565:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1538:42:17" - }, - "returnParameters": { - "id": 2968, - "nodeType": "ParameterList", - "parameters": [], - "src": "1609:0:17" - }, - "scope": 2995, - "src": "1509:301:17", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 2996, - "src": "1334:478:17" - } - ], - "src": "1242:571:17" - }, - "legacyAST": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol", - "exportedSymbols": { - "IexecERC20CoreKYC": [ - 2995 - ] - }, - "id": 2996, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 2941, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:17" - }, - { - "id": 2942, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "1266:33:17" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20Core.sol", - "file": "./IexecERC20Core.sol", - "id": 2943, - "nodeType": "ImportDirective", - "scope": 2996, - "sourceUnit": 2940, - "src": "1301:30:17", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 2944, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1364:14:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - "id": 2945, - "nodeType": "InheritanceSpecifier", - "src": "1364:14:17" - } - ], - "contractDependencies": [ - 309, - 1658, - 2939, - 13161, - 13173, - 13740, - 14132 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 2995, - "linearizedBaseContracts": [ - 2995, - 2939, - 1658, - 13161, - 309, - 13173, - 14132, - 13740 - ], - "name": "IexecERC20CoreKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "baseFunctions": [ - 2463 - ], - "body": { - "id": 2958, - "nodeType": "Block", - "src": "1465:41:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2955, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2947, - "src": "1494:7:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 2953, - "name": "m_baseToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 217, - "src": "1476:11:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20KYC_$1030", - "typeString": "contract IERC20KYC" - } - }, - "id": 2954, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "isKYC", - "nodeType": "MemberAccess", - "referencedDeclaration": 1004, - "src": "1476:17:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", - "typeString": "function (address) view external returns (bool)" - } - }, - "id": 2956, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1476:26:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 2952, - "id": 2957, - "nodeType": "Return", - "src": "1469:33:17" - } - ] - }, - "documentation": null, - "id": 2959, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_isAuthorized", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2949, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "1440:8:17" - }, - "parameters": { - "id": 2948, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2947, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2959, - "src": "1405:15:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2946, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1405:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1404:17:17" - }, - "returnParameters": { - "id": 2952, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2951, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2959, - "src": "1458:4:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 2950, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1458:4:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1457:6:17" - }, - "scope": 2995, - "src": "1382:124:17", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "baseFunctions": [ - 2473 - ], - "body": { - "id": 2993, - "nodeType": "Block", - "src": "1609:201:17", - "statements": [ - { - "assignments": [ - 2970 - ], - "declarations": [ - { - "constant": false, - "id": 2970, - "mutability": "mutable", - "name": "restrictionCode", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2993, - "src": "1613:21:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": { - "id": 2969, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1613:5:17", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "value": null, - "visibility": "internal" - } - ], - "id": 2977, - "initialValue": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2973, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2961, - "src": "1675:4:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2974, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2963, - "src": "1681:2:17", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 2975, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2965, - "src": "1685:6:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 2971, - "name": "m_baseToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 217, - "src": "1637:11:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20KYC_$1030", - "typeString": "contract IERC20KYC" - } - }, - "id": 2972, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "detectTransferRestriction", - "nodeType": "MemberAccess", - "referencedDeclaration": 963, - "src": "1637:37:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$_t_uint256_$returns$_t_uint8_$", - "typeString": "function (address,address,uint256) view external returns (uint8)" - } - }, - "id": 2976, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1637:55:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "1613:79:17" - }, - { - "condition": { - "argumentTypes": null, - "commonType": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "id": 2983, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": { - "argumentTypes": null, - "id": 2978, - "name": "restrictionCode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2970, - "src": "1700:15:17", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "nodeType": "BinaryOperation", - "operator": "!=", - "rightExpression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "hexValue": "30", - "id": 2981, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "1725:1:17", - "subdenomination": null, - "typeDescriptions": { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - } - ], - "id": 2980, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "1719:5:17", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_uint8_$", - "typeString": "type(uint8)" - }, - "typeName": { - "id": 2979, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "1719:5:17", - "typeDescriptions": { - "typeIdentifier": null, - "typeString": null - } - } - }, - "id": 2982, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1719:8:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "1700:27:17", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": null, - "id": 2992, - "nodeType": "IfStatement", - "src": "1696:111:17", - "trueBody": { - "id": 2991, - "nodeType": "Block", - "src": "1731:76:17", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 2987, - "name": "restrictionCode", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2970, - "src": "1785:15:17", - "typeDescriptions": { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - ], - "expression": { - "argumentTypes": null, - "id": 2985, - "name": "m_baseToken", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 217, - "src": "1743:11:17", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20KYC_$1030", - "typeString": "contract IERC20KYC" - } - }, - "id": 2986, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "messageForTransferRestriction", - "nodeType": "MemberAccess", - "referencedDeclaration": 970, - "src": "1743:41:17", - "typeDescriptions": { - "typeIdentifier": "t_function_external_view$_t_uint8_$returns$_t_string_memory_ptr_$", - "typeString": "function (uint8) view external returns (string memory)" - } - }, - "id": 2988, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1743:58:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_string_memory_ptr", - "typeString": "string memory" - } - ], - "id": 2984, - "name": "revert", - "nodeType": "Identifier", - "overloadedDeclarations": [ - -19, - -19 - ], - "referencedDeclaration": -19, - "src": "1736:6:17", - "typeDescriptions": { - "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", - "typeString": "function (string memory) pure" - } - }, - "id": 2989, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1736:66:17", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 2990, - "nodeType": "ExpressionStatement", - "src": "1736:66:17" - } - ] - } - } - ] - }, - "documentation": null, - "id": 2994, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 2967, - "nodeType": "OverrideSpecifier", - "overrides": [], - "src": "1599:8:17" - }, - "parameters": { - "id": 2966, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 2961, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2994, - "src": "1539:12:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2960, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1539:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2963, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2994, - "src": "1553:10:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 2962, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1553:7:17", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 2965, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 2994, - "src": "1565:14:17", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 2964, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1565:7:17", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1538:42:17" - }, - "returnParameters": { - "id": 2968, - "nodeType": "ParameterList", - "parameters": [], - "src": "1609:0:17" - }, - "scope": 2995, - "src": "1509:301:17", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 2996, - "src": "1334:478:17" - } - ], - "src": "1242:571:17" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.2.2", - "updatedAt": "2020-11-09T09:15:00.571Z", - "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/IexecERC20DelegateKYC.json b/build/contracts/IexecERC20DelegateKYC.json deleted file mode 100644 index e388bed0e..000000000 --- a/build/contracts/IexecERC20DelegateKYC.json +++ /dev/null @@ -1,1566 +0,0 @@ -{ - "contractName": "IexecERC20DelegateKYC", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "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": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "extraData", - "type": "bytes" - } - ], - "name": "approveAndCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "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": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"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\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"ref\",\"type\":\"bytes32\"}],\"name\":\"Reward\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"ref\",\"type\":\"bytes32\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"approveAndCall\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"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\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20DelegateKYC.sol\":\"IexecERC20DelegateKYC\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/Store.sol\":{\"keccak256\":\"0xbc74ce351bc304d65cc20a95bad8290711ac47267b7cfff5500cdeff42b1a18b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f92ebcd5817a7d6f20ef48662f985e9bdb8a68f3752249a14a1a4cbb8b99f190\",\"dweb:/ipfs/QmZAph8GSDPRkXxNUsQpGCXDsmMSGo6Pr5HFg2f4ZXgRZc\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC1404.sol\":{\"keccak256\":\"0xec243d84d26dd07f7a93a6f0665d56d60d20b139bf7f201a502a438ac95ac771\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://75cd876336f5cb77d0492f2082912fa42b526cf00820f1f0a0e8be012d402360\",\"dweb:/ipfs/QmZWgMF27i1JfGbgc7FTny9YkoFWDXiYh9gjpfXnHVLWy8\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC20KYC.sol\":{\"keccak256\":\"0xc2aa3e67c31421ad6f43594875c1d5c5a62366d19ef22485d4764a9c2e53ab7c\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f15679680aa5a9590707ab921d90569eb7e30a3c8340a4d9d0bef3ac5375d56b\",\"dweb:/ipfs/QmWZovmERYpAu3FKW7Ea3gZZeangFyGpkpgcLEggbkqhdM\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC677.sol\":{\"keccak256\":\"0x2fc0f8ca46db18638bd9daed90a3e6bd90fec77ef4c899b7aa1b28010355d096\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c213b13843b23ba7b755ad821c07b77cfacafddc5348a2191c164300344818ce\",\"dweb:/ipfs/QmSruFZbrEuzJFmRbbzZL3GehKpqEm6RfVGcuZZGwBedsp\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/libs/IexecLibCore_v5.sol\":{\"keccak256\":\"0x7fab9c16493884c64cdd31627c5d71389de785becf611b738343d75f7495471d\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://3e243796363e7d4cd249b432a2511cdb49759ed7d2e8bd73817f09ff60ff919c\",\"dweb:/ipfs/Qmeat95AtRviDFcJ3W3aBZmH51aHReX9RLnPZ3Gof3FnzW\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/libs/IexecLibOrders_v5.sol\":{\"keccak256\":\"0x430eaa82ce8d43771c8a84af5113e31de79490d5b9d561ef90034bdc5a2a993b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://65cb57ac25afa5b6e0811290866aace3b013fe67aa82c5e72b6bb00d50e9f28a\",\"dweb:/ipfs/QmTTNTASsnM8db9vTjkbxz5kiNtqVxNrjwxkvVEmoHuMj9\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/DelegateBase.sol\":{\"keccak256\":\"0xb59c042fe327f79a7c13fca4f0512c643545b51045a07517723dd1104fcb68f1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://42231705416aaefd95467b78933eb5dc4c71d5f0eebd3628f60cb2388109e4ec\",\"dweb:/ipfs/QmU7Eeejx7tGcAP14D1XinQgt4Mjfo2a3Ur7cipLPzjPqx\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20Core.sol\":{\"keccak256\":\"0x28db238625e52e31aa9d602612e6874d2a1f8091063dd04e8cd7870642af3d54\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e6e5db14c0e38900a3f92476f45c608b143fd83fa48fffe82bd03bd4a28a1bc6\",\"dweb:/ipfs/QmecHBiCZgekCafN6BnopvRuiiZ9GjRn6PeM6x7PHkUHLZ\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol\":{\"keccak256\":\"0x74e0cfc2f63fec8064535691819308cc537140ba22494d64bfd4bb748d9c0f74\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://93c10dce05b3e05084715c3660b61a5e9b7e21db85da2899cfcac9a7f03df7ff\",\"dweb:/ipfs/QmNoHo5uPYPqusH7cki6j2afHbCE1zWovU8V1QzTpCKwi6\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20Delegate.sol\":{\"keccak256\":\"0x4fbfe96061c135cb76d50b63d02de2af203262f80bb5a148a13b6b103108a2d3\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://178934504642b9b899cb95292d6ec0d33f6dd3c41119c39ff7c0e748d816169e\",\"dweb:/ipfs/QmdyutvM43YqjYUhqXQzD2DJnYBrjVSqiTa2zBEg8hAzgj\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20DelegateKYC.sol\":{\"keccak256\":\"0xade7bd75677728094ec1447ff0699373e2a9c0d03b6d1aaef4a8bc9b67ed4af0\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://1bd98c788c09d950baa4973d3f4e34a57a34280c68c5fe31e43984baa45cfa94\",\"dweb:/ipfs/QmQ725Eb2MrvsLrvs6mehMem9ucuz86wyoNEjD4Ub2S8BN\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/interfaces/IexecERC20.sol\":{\"keccak256\":\"0x48a3d6b87e89223fc9e3858342fabd761b55883cdbbcb8b95e0f87c92de758b0\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e1e033e1509c4d7560b214f24301a1748033697c662d2ef2d25ff2e4b0dc1e0e\",\"dweb:/ipfs/Qmaa1XduJbBDEXn9kd1ZqWo8TBi5aiafUFpkFMXQqz3by7\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/interfaces/IexecTokenSpender.sol\":{\"keccak256\":\"0xd914d8f8a6ebf78bdb876c2243e90c6bfffcf280e3760affa57afd7e618cd420\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://1807226c064ecf6819c50440342aaaab2833209193c6307f4ab42567d54d329c\",\"dweb:/ipfs/QmSBVCBo2GqWKqW98pw3mXwzXY7iupoUTnDytXAVyTi8T5\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/IRegistry.sol\":{\"keccak256\":\"0xc735f7764e312ea161551bc1a2749820928b1bf80c4aeb2f528a2f4a498078cd\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://7dbefb9d9bec9b56f694d2ee6dc0a44b341c027c0d392534b457867208f019b9\",\"dweb:/ipfs/QmSiSkhgUcAGscopDoRtGnHiWAbxNwBf9ZV8nnVYoWqZ8Z\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/Registry.sol\":{\"keccak256\":\"0x18bdeaad129f5034937fb69a7afbd68ffba8341172a7a124d6be22d6cd2cc5ad\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e77b038842b0c19eb8cb2bac495025ec2fe074472370708cc0b6b6a9e6e5275c\",\"dweb:/ipfs/QmNPUSUBUPezTebKA3VzRu8u5KKuYiKGP1m3yME2J6YnSc\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/RegistryEntry.sol\":{\"keccak256\":\"0xc5e7a46311946df50486dd451f456aee0abe92184dbc31e3a40fc9198f8f6582\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://24f058496713a743781c3353477a03255cdce4cfca845883d207a62346c5c684\",\"dweb:/ipfs/QmVVrLgcoAetTY7EsL3fWfC7VuqKzh1ncVF8spkEkgPQot\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/apps/App.sol\":{\"keccak256\":\"0x1408d4f83f2c512ce71a680975d480fffb5ff417b2ecc37de45076e8d8f43d1a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e817bcc02c7e8547179b0293ed61b4066a04ab3e2b7cda6db90b41e42cabcecc\",\"dweb:/ipfs/QmVPJzM6SXg4ngSSHi2kioQ2htbJPUta5ZMyrgMnAGmrW6\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/datasets/Dataset.sol\":{\"keccak256\":\"0xf58ec4bed61a76b9d557e7b1f486fced23cb4dfc5047fc93ba6b4684c1624c2a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://530858af626fb5598eb9c973b9d3a0c2c1d431b43ca9e7c49143ab5edf619d67\",\"dweb:/ipfs/QmRkksj1gDnz1kcB6JFKuBKXD3mq52SsjuPN5SMUqSK46u\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/workerpools/Workerpool.sol\":{\"keccak256\":\"0x5604f1f935ea198caa899dfd96af42f9f2280954c9798caa58e9cf198b8d492e\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://10fabd01e983ad441a08c57ff78451237c0d350ba7e0cab42a7dccbf784209bd\",\"dweb:/ipfs/Qmbt3eiERXv3QUHHJAFKwfgrCNz6ZcA1ccUWtztLFiv9Av\"]},\"@iexec/interface/contracts/IexecClerk.sol\":{\"keccak256\":\"0x703252a638a5a7e2b600395fd920712a1ac259018bc9578fe581a77fa2f008a9\",\"urls\":[\"bzz-raw://072b9e948e5ac4a7f60466c23b322ea0f1aca711f1a94616e658600c2a4c36a2\",\"dweb:/ipfs/QmRP57bkhWDr5BeawfjiKsbdwFiHnw6nc6zgiEad3hQoSJ\"]},\"@iexec/interface/contracts/IexecHub.sol\":{\"keccak256\":\"0x8e293b7624550823838ed9113400544c5980afac1043ddacad7a862c91b0840d\",\"urls\":[\"bzz-raw://ae34ebc355838595ee69b24a31e60deb186455cc388c88de7ecd0294c7037075\",\"dweb:/ipfs/QmUYVQJBWG7ohAYksJRDJKcJVyPMXNFJSPWMAuQcGfWHo7\"]},\"@iexec/interface/contracts/IexecRegistries.sol\":{\"keccak256\":\"0xb39eef47d62d8751c5adfeaf169ce57b50c480788be8356289bc28b78bc24fde\",\"urls\":[\"bzz-raw://a86593f1ef9953ac0965aab4e764374580a899a7f7871ad66b432523171063a1\",\"dweb:/ipfs/QmcYZhHD45APoS1Ebi416DhXU3fiCzoFW2WSMux4AxhFqk\"]},\"@iexec/interface/contracts/libs/IexecODBLibCore.sol\":{\"keccak256\":\"0x3fc7ff4152e9a8f9747d42e262c15c3d460d409732711d9e1da8a88163880183\",\"urls\":[\"bzz-raw://8bacc98b866852e9f1e3563948381cba142ab61d6b1a7c62fbc53b7d57aa0589\",\"dweb:/ipfs/QmUNjhjBxdtHQFWQ61CgnPoaAzL767tQSKF6x34VFWeRyF\"]},\"@iexec/interface/contracts/libs/IexecODBLibOrders.sol\":{\"keccak256\":\"0xe2848a685785b09dc9ee5a6e6329a417eaf18e520388e8575d45a5376b1d62ca\",\"urls\":[\"bzz-raw://d1385ab26f382baa7aadb80faed54290296be09eeccbee1193a1b8a53b0b15d5\",\"dweb:/ipfs/QmUQTFcGX5VZiYwHKu9Yjc4PHNrMgdAyKwKi6tFEMsbaJk\"]},\"@iexec/solidity/contracts/ENStools/ENSReverseRegistration.sol\":{\"keccak256\":\"0xd1e5b9222925769b40cbf20a4b96d9d3fa462cca6e40d0d9021033ebb0a7d584\",\"urls\":[\"bzz-raw://0e47b7621c8f6cee3c5900f0545cb563fa763712cf235d320fd88d0857699ed1\",\"dweb:/ipfs/QmS18tjVQ6oxc7MHUK5DKLrRSX1v7N4e5Pc6xKjJCNcFv3\"]},\"@iexec/solidity/contracts/ENStools/IENS.sol\":{\"keccak256\":\"0xb109a681632d71269ed4efbe11fc9d1bcee6bc29109f2fb8ced6951dafc28302\",\"urls\":[\"bzz-raw://920ee6b3712ebe1cb28977abf4ded033067305d786116f94777ab03a6b6b9ee9\",\"dweb:/ipfs/QmWFCBtMLUZYJ2cxzHBjHq5WZC8Yydnbk6dezoXHT4Pxgz\"]},\"@iexec/solidity/contracts/ENStools/IReverseRegistrar.sol\":{\"keccak256\":\"0xff985fd263e59bd387e543cd5cf99235ab6e066b6d1be95e79108dacc749673f\",\"urls\":[\"bzz-raw://98a054bc372f5fd6c80793d32a74f3387d562ed6b3e17388b5f8f4b6bc96a62c\",\"dweb:/ipfs/QmQtkE8u6h7zrBrdfEez6STf18766AFP5kK8hGL4SNoWuP\"]},\"@iexec/solidity/contracts/ERC1538/ERC1538Module.sol\":{\"keccak256\":\"0xb1e1ff5fcce00614303b0bb01c595a7d2f3496ae88bc2068e56ba9cd72ec8921\",\"urls\":[\"bzz-raw://a6b87d03a17727ce6fe6c5b0078a198898153ae8230345468479a9aa4560835d\",\"dweb:/ipfs/QmV4T7Wg8TS3uAVhnqMhqD6yZ7Qv8iouYnYrkTSCJirG2P\"]},\"@iexec/solidity/contracts/ERC1538/ERC1538Store.sol\":{\"keccak256\":\"0x4d1e8821dc216013f20044bbf82df3c2ab2c739d1b2ce4d90c15cb65f85707d8\",\"urls\":[\"bzz-raw://e36d4db70862f87b8657c19330f0d45e8e7018ebcf3df97525638c8caa919d2b\",\"dweb:/ipfs/QmZqsrXPsyRkRkjuupKG2SYsyUTBXqe7nkkCy7RKxDKz1L\"]},\"@iexec/solidity/contracts/Libs/SafeMathExtended.sol\":{\"keccak256\":\"0xf2802ae591eb22954d9c8e02658ae7577940890aff8d8927a7255e254fed605b\",\"urls\":[\"bzz-raw://8dcc485d21a3aa3f643768d4ac4fc69697b9b37f8fb779f3998ab4cee143fa66\",\"dweb:/ipfs/QmWdwgKPMoWuidYQp6WFsJBhNbJUwFHNE9YPYQZhBsKj7e\"]},\"@iexec/solidity/contracts/Upgradeability/BaseUpgradeabilityProxy.sol\":{\"keccak256\":\"0x47ec56a1226ecf04d49aa82f768814923c1957b69f7fc9e7e470885c75b5a2c6\",\"urls\":[\"bzz-raw://4eae82be03a247a27a2948ed12d5a826dea977f4b5528830c19d9cf4c23dcd53\",\"dweb:/ipfs/Qmb9HtnohAMvjb7vYnXaT3AnQd9p9sLsThnyLnXVzz1umq\"]},\"@iexec/solidity/contracts/Upgradeability/InitializableUpgradeabilityProxy.sol\":{\"keccak256\":\"0xe1bf07e5d913bd04484305a3fb0cc576f6b5d8e4fc0406bf7c9a8b6b2ed766e5\",\"urls\":[\"bzz-raw://b42f6dff696ceadeb44a02aae3049e603984c18af8d94f33fb6544a8b279179c\",\"dweb:/ipfs/QmRWTaRHCGZhKZFKrVAJwXukXiCZcezrVhJJ28H2qBbai7\"]},\"@iexec/solidity/contracts/Upgradeability/Proxy.sol\":{\"keccak256\":\"0xd89f285d80cfeff0efc87f11dbc024a587da3bba142a06695cbac7e4050e9302\",\"urls\":[\"bzz-raw://9c8323ec7efc9fde6c1529f1070c3f3406adb5f8836b17221530d8f0110fe3f4\",\"dweb:/ipfs/QmURRsX9L2gZ83aMULtY1EuRMJExHhFYErCbkxE5CNkAzE\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0xdb26cbf4d028490f49831a7865c2fe1b28db44b535ca8d343785a3b768aae183\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://840b14ce0315c47d49ba328f1f9fa7654ded1c9e1559e6c5e777a7b2dc28bf0a\",\"dweb:/ipfs/QmTLLabn4wcfGro9LEmUXUN2nwKqZSotXMvjDCLXEnLtZP\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x4bd6402ca6b3419008c2b482aff54e66836e8cb4eba2680e42ac5884ae6424fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f9f711fb8d0d92aeea1c327e3845d13ca1fa8f142e47f8723cd5b3106fb29a3\",\"dweb:/ipfs/QmVQUReDW9f4zGqhizwHnyU8EntMs95tbASdqkGncnikba\"]},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"keccak256\":\"0xb046d18f9d09683ca1c0ed6d80c61da8a8a7d9b30bad70a17b898538683eff74\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4728713afa6ae36cc9e92c7107c796a313add3ec20f813be2cde76c814486b2a\",\"dweb:/ipfs/QmUJBTXvYaGDF5PVnd5pUvYerc9DRXvqANDzgCzAp3FkkA\"]},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xfa152b6e88a1dc50780e8f1580426dc23ad2e1e2c2f086a088adf206a202f453\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5127b264994adab88fae419b1c493efc5acd07134c19ee5c0397e50018291ebf\",\"dweb:/ipfs/QmWwJZVhvdmvUCdimbb6R2Jiu59zjPqm6XTMchM6LaEHAp\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x9a9cf02622cd7a64261b10534fc3260449da25c98c9e96d1b4ae8110a20e5806\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2df142592d1dc267d9549049ee3317fa190d2f87eaa565f86ab05ec83f7ab8f5\",\"dweb:/ipfs/QmSkJtcfWo7c42KnL5hho6GFxK6HRNV91XABx1P7xDtfLV\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://efdc632af6960cf865dbc113665ea1f5b90eab75cc40ec062b2f6ae6da582017\",\"dweb:/ipfs/QmfAZFDuG62vxmAN9DnXApv7e7PMzPqi4RkqqZHLMSQiY5\"]},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"keccak256\":\"0x1071a23188ba7f5bb16f51b0b01a67fd41fe56f862d8f83985788cf46f3b91bd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c7082ca99b93f2e541cafaad00ed32675adf0752eab78eccabcf91dec9fd5d73\",\"dweb:/ipfs/QmdqooMmYBQVi7p6subDFM4e1944AuLjZUpHMjGtae7Lgd\"]},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x227bafd3e165b13f5d98c42a44376e48d41f4a265db8803f2707faaeae9659aa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c9aa7959a30871669ce46172cd117b084b607d602d9ce695ce79005582b0b69b\",\"dweb:/ipfs/QmXZUWeLXmArQinHL4RnacJLT22GvCExqREYM6pHLX7CX9\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"keccak256\":\"0x3636662804cd8f474536b2875a9038a4c3fb91879f1bbff48af5c3f140fcd2f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9fab8521263fa581544000cb57335a3f2e6bcdfbb5579d3ceaa5acf741c67c4f\",\"dweb:/ipfs/QmZfXnMom7JSNtfyie5yGPN1SUC4SmHbz4ScVBH88URmA7\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"keccak256\":\"0xe7f984cedc00a138dc27f263c73c32ba9a4b2fd23b6c34ac46f46c074b943538\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0f4acda12f076fe7584921241ddbb5b460ca7cad6cb8a42252ac7f2a9f539127\",\"dweb:/ipfs/QmQmfhkEv9GrhdWe67QtXnU19AMuoEmy31QnHPkucdYLjZ\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"keccak256\":\"0x321ee37ef4925020aa818a03ec7fe48e057561f65ab009a84f6c20c86026ade7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://01f9d74a17a56024984251b97e428e24c9d3abffbae5bd290f0ec263c82e9694\",\"dweb:/ipfs/QmRryCuuXu2ukrDmatB8TqdEhPLiK6NBRt41RiPUaX1qKy\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xdfb4f812600ba4ce6738c35584ceb8c9433472583051b48ba5b1f66cb758a498\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://df02dffe1c1de089d9b4f6192f0dcf464526f2230f420b3deec4645e0cdd2bff\",\"dweb:/ipfs/QmcqXGAU3KJqwrgUVoGJ2W8osomhSJ4R5kdsRpbuW3fELS\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x16926b3c19504ea52f73abe41dfa9c1ef9c328d6088b82162d475caecaa47a6d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc578656a08c07f33ecf4a54324bad5f951afdcd990cdab1dcde493d6bb49d9c\",\"dweb:/ipfs/QmbXLJtTaqBg7WwC4p9gsRjA3VEwNwGc6W9afJeAaacF71\"]},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"keccak256\":\"0x244e4b74b17716120cf28e58636f11c699b8c0c94628bd952a95cee038d7e32b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://198d566157120c526bd6b5086b32cae85a11389b8a538f533ba9f9447915da0e\",\"dweb:/ipfs/QmeE6d8KWERx7f1FVS5tMnitNJxBm2yWXRSEUBF7R6voLh\"]},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"keccak256\":\"0xb2a11b236f073662f5a196995863f51c11d006bf7c3de158b316dfa1506c4b79\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8651649cf0b9efa18c3b01c030276fa320d41adbdc286833417e7f36e357b2f3\",\"dweb:/ipfs/QmafhM2Nd1aP43QVB1eRRZaqRXQKswNfQcWi8U8xjrxCfN\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x79484115dbfa737054f73e041009a02eeb434dd81be5d684bf4255ad3b5ab558\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://12c119699463450c2544f5b9d8709b5e9e9164c62948a79c3ec53423a051d969\",\"dweb:/ipfs/QmPJduzSAaekq447QeFqAp3E7dc8CnNk5ajofckJ4ahA7Q\"]},\"solstruct/contracts/libs/LibMap2.bytes4.address.bytes.sol\":{\"keccak256\":\"0x471645d4b20cc36606122fc6bb692cdf8489118547f90bde2740cb73b1e64d54\",\"urls\":[\"bzz-raw://7ca824c03cd077e6d9630eaa4755787c785a61f612cb8e3ba13d0ce92ee55738\",\"dweb:/ipfs/QmdavtXDokZ7vWZt8pMxPi7DaG3Hd1Q5MyeJjXGRFQuL9r\"]},\"solstruct/contracts/libs/LibSet.bytes4.sol\":{\"keccak256\":\"0xdec5833ab65ae8cab500b84424dde49c1f7817c6575e1631a729fc88c6d4bd7f\",\"urls\":[\"bzz-raw://2e5d23b8383819e6dd77ea61ed30740bcba45b0fff609922b11d1cae2b0223f1\",\"dweb:/ipfs/QmQ27sefXEYXBUSEGdPkuzCqemtUJzNXhhsyd7kB94w6CE\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50600061001b610060565b600080546001600160a01b0319166001600160a01b038316908117825560405192935091600080516020610df8833981519152908290a35061005b610064565b61010f565b3390565b61006c610060565b6000546001600160a01b039081169116146100a25760405162461bcd60e51b8152600401610099906100da565b60405180910390fd5b600080546040516001600160a01b0390911690600080516020610df8833981519152908390a3600080546001600160a01b0319169055565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b610cda8061011e6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146100f1578063a457c2d714610106578063a9059cbb14610119578063cae9ca511461012c578063f2fde38b1461013f57610093565b8063095ea7b31461009857806323b872dd146100c157806339509351146100d4578063715018a6146100e7575b600080fd5b6100ab6100a6366004610845565b610152565b6040516100b89190610a58565b60405180910390f35b6100ab6100cf366004610805565b610170565b6100ab6100e2366004610845565b6101df565b6100ef61022d565b005b6100f96102b5565b6040516100b891906109cf565b6100ab610114366004610845565b6102c4565b6100ab610127366004610845565b610312565b6100ab61013a36600461086f565b610326565b6100ef61014d3660046107ea565b6103ee565b600061016661015f6104a4565b84846104a8565b5060015b92915050565b600061017d84848461055c565b6101d5846101896104a4565b6001600160a01b0387166000908152600f602052604081206101d0918791906101b06104a4565b6001600160a01b0316815260208101919091526040016000205490610577565b6104a8565b5060019392505050565b60006101666101ec6104a4565b846101d085600f60006101fd6104a4565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061058c565b6102356104a4565b6000546001600160a01b0390811691161461026b5760405162461bcd60e51b815260040161026290610b8b565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60006101666102d16104a4565b846101d085600f60006102e26104a4565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610577565b600061016661031f6104a4565b848461055c565b600061033a6103336104a4565b86866104a8565b846001600160a01b0316638f4ffcb16103516104a4565b863087876040518663ffffffff1660e01b81526004016103759594939291906109e3565b602060405180830381600087803b15801561038f57600080fd5b505af11580156103a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c791906108f3565b6103e35760405162461bcd60e51b815260040161026290610b61565b506001949350505050565b6103f66104a4565b6000546001600160a01b039081169116146104235760405162461bcd60e51b815260040161026290610b8b565b6001600160a01b0381166104495760405162461bcd60e51b815260040161026290610ad9565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b0383166104ce5760405162461bcd60e51b815260040161026290610c05565b6001600160a01b0382166104f45760405162461bcd60e51b815260040161026290610b1f565b6001600160a01b038084166000818152600f602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061054f908590610c49565b60405180910390a3505050565b6105678383836105a5565b6105728383836105b0565b505050565b60008282111561058657600080fd5b50900390565b60008282018381101561059e57600080fd5b9392505050565b6105728383836106a0565b6001600160a01b0383166105d65760405162461bcd60e51b815260040161026290610bc0565b6001600160a01b0382166105fc5760405162461bcd60e51b815260040161026290610a96565b6001600160a01b0383166000908152600d602052604090205461061f9082610577565b6001600160a01b038085166000908152600d6020526040808220939093559084168152205461064e908261058c565b6001600160a01b038084166000818152600d602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061054f908590610c49565b60085460405163d4ce141560e01b81526000916001600160a01b03169063d4ce1415906106d590879087908790600401610a34565b60206040518083038186803b1580156106ed57600080fd5b505afa158015610701573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072591906109ae565b905060ff8116156107cd57600854604051637f4ab1dd60e01b81526001600160a01b0390911690637f4ab1dd90610760908490600401610c52565b60006040518083038186803b15801561077857600080fd5b505afa15801561078c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107b49190810190610913565b60405162461bcd60e51b81526004016102629190610a63565b50505050565b80356001600160a01b038116811461016a57600080fd5b6000602082840312156107fb578081fd5b61059e83836107d3565b600080600060608486031215610819578182fd5b833561082481610c8c565b9250602084013561083481610c8c565b929592945050506040919091013590565b60008060408385031215610857578182fd5b61086184846107d3565b946020939093013593505050565b60008060008060608587031215610884578081fd5b843561088f81610c8c565b935060208501359250604085013567ffffffffffffffff808211156108b2578283fd5b818701915087601f8301126108c5578283fd5b8135818111156108d3578384fd5b8860208285010111156108e4578384fd5b95989497505060200194505050565b600060208284031215610904578081fd5b8151801515811461059e578182fd5b600060208284031215610924578081fd5b815167ffffffffffffffff8082111561093b578283fd5b818401915084601f83011261094e578283fd5b81518181111561095c578384fd5b604051601f8201601f19168101602001838111828210171561097c578586fd5b604052818152838201602001871015610993578485fd5b6109a4826020830160208701610c60565b9695505050505050565b6000602082840312156109bf578081fd5b815160ff8116811461059e578182fd5b6001600160a01b0391909116815260200190565b6001600160a01b038681168252602082018690528416604082015260806060820181905281018290526000828460a084013781830160a090810191909152601f909201601f19160101949350505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b6000602082528251806020840152610a82816040850160208701610c60565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526010908201526f185c1c1c9bdd985b0b5c99599d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b90815260200190565b60ff91909116815260200190565b60005b83811015610c7b578181015183820152602001610c63565b838111156107cd5750506000910152565b6001600160a01b0381168114610ca157600080fd5b5056fea26469706673582212204bc35eafe581845a2f6453808dd76bfcff3d21cfd19343e244eb1b4495c316b764736f6c634300060c00338be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b146100f1578063a457c2d714610106578063a9059cbb14610119578063cae9ca511461012c578063f2fde38b1461013f57610093565b8063095ea7b31461009857806323b872dd146100c157806339509351146100d4578063715018a6146100e7575b600080fd5b6100ab6100a6366004610845565b610152565b6040516100b89190610a58565b60405180910390f35b6100ab6100cf366004610805565b610170565b6100ab6100e2366004610845565b6101df565b6100ef61022d565b005b6100f96102b5565b6040516100b891906109cf565b6100ab610114366004610845565b6102c4565b6100ab610127366004610845565b610312565b6100ab61013a36600461086f565b610326565b6100ef61014d3660046107ea565b6103ee565b600061016661015f6104a4565b84846104a8565b5060015b92915050565b600061017d84848461055c565b6101d5846101896104a4565b6001600160a01b0387166000908152600f602052604081206101d0918791906101b06104a4565b6001600160a01b0316815260208101919091526040016000205490610577565b6104a8565b5060019392505050565b60006101666101ec6104a4565b846101d085600f60006101fd6104a4565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061058c565b6102356104a4565b6000546001600160a01b0390811691161461026b5760405162461bcd60e51b815260040161026290610b8b565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60006101666102d16104a4565b846101d085600f60006102e26104a4565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610577565b600061016661031f6104a4565b848461055c565b600061033a6103336104a4565b86866104a8565b846001600160a01b0316638f4ffcb16103516104a4565b863087876040518663ffffffff1660e01b81526004016103759594939291906109e3565b602060405180830381600087803b15801561038f57600080fd5b505af11580156103a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c791906108f3565b6103e35760405162461bcd60e51b815260040161026290610b61565b506001949350505050565b6103f66104a4565b6000546001600160a01b039081169116146104235760405162461bcd60e51b815260040161026290610b8b565b6001600160a01b0381166104495760405162461bcd60e51b815260040161026290610ad9565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b0383166104ce5760405162461bcd60e51b815260040161026290610c05565b6001600160a01b0382166104f45760405162461bcd60e51b815260040161026290610b1f565b6001600160a01b038084166000818152600f602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061054f908590610c49565b60405180910390a3505050565b6105678383836105a5565b6105728383836105b0565b505050565b60008282111561058657600080fd5b50900390565b60008282018381101561059e57600080fd5b9392505050565b6105728383836106a0565b6001600160a01b0383166105d65760405162461bcd60e51b815260040161026290610bc0565b6001600160a01b0382166105fc5760405162461bcd60e51b815260040161026290610a96565b6001600160a01b0383166000908152600d602052604090205461061f9082610577565b6001600160a01b038085166000908152600d6020526040808220939093559084168152205461064e908261058c565b6001600160a01b038084166000818152600d602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061054f908590610c49565b60085460405163d4ce141560e01b81526000916001600160a01b03169063d4ce1415906106d590879087908790600401610a34565b60206040518083038186803b1580156106ed57600080fd5b505afa158015610701573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072591906109ae565b905060ff8116156107cd57600854604051637f4ab1dd60e01b81526001600160a01b0390911690637f4ab1dd90610760908490600401610c52565b60006040518083038186803b15801561077857600080fd5b505afa15801561078c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107b49190810190610913565b60405162461bcd60e51b81526004016102629190610a63565b50505050565b80356001600160a01b038116811461016a57600080fd5b6000602082840312156107fb578081fd5b61059e83836107d3565b600080600060608486031215610819578182fd5b833561082481610c8c565b9250602084013561083481610c8c565b929592945050506040919091013590565b60008060408385031215610857578182fd5b61086184846107d3565b946020939093013593505050565b60008060008060608587031215610884578081fd5b843561088f81610c8c565b935060208501359250604085013567ffffffffffffffff808211156108b2578283fd5b818701915087601f8301126108c5578283fd5b8135818111156108d3578384fd5b8860208285010111156108e4578384fd5b95989497505060200194505050565b600060208284031215610904578081fd5b8151801515811461059e578182fd5b600060208284031215610924578081fd5b815167ffffffffffffffff8082111561093b578283fd5b818401915084601f83011261094e578283fd5b81518181111561095c578384fd5b604051601f8201601f19168101602001838111828210171561097c578586fd5b604052818152838201602001871015610993578485fd5b6109a4826020830160208701610c60565b9695505050505050565b6000602082840312156109bf578081fd5b815160ff8116811461059e578182fd5b6001600160a01b0391909116815260200190565b6001600160a01b038681168252602082018690528416604082015260806060820181905281018290526000828460a084013781830160a090810191909152601f909201601f19160101949350505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b901515815260200190565b6000602082528251806020840152610a82816040850160208701610c60565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526010908201526f185c1c1c9bdd985b0b5c99599d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b90815260200190565b60ff91909116815260200190565b60005b83811015610c7b578181015183820152602001610c63565b838111156107cd5750506000910152565b6001600160a01b0381168114610ca157600080fd5b5056fea26469706673582212204bc35eafe581845a2f6453808dd76bfcff3d21cfd19343e244eb1b4495c316b764736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "1372:452:19:-:0;;;;;;;;;;;;-1:-1:-1;865:17:83;885:12;:10;:12::i;:::-;907:6;:18;;-1:-1:-1;;;;;;907:18:83;-1:-1:-1;;;;;907:18:83;;;;;;;940:43;;907:18;;-1:-1:-1;907:18:83;-1:-1:-1;;;;;;;;;;;940:43:83;907:6;;940:43;-1:-1:-1;124:19:73;:17;:19::i;:::-;1372:452:19;;590:104:81;677:10;590:104;:::o;1689:145:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;;;;;;;;;1795:1:::1;1779:6:::0;;1758:40:::1;::::0;-1:-1:-1;;;;;1779:6:83;;::::1;::::0;-1:-1:-1;;;;;;;;;;;1758:40:83;1795:1;;1758:40:::1;1825:1;1808:19:::0;;-1:-1:-1;;;;;;1808:19:83::1;::::0;;1689:145::o;346:416:-1:-;546:2;560:47;;;531:18;;;873:19;266:34;913:14;;;246:55;320:12;;;517:245::o;:::-;1372:452:19;;;;;;", - "deployedSourceMap": "1372:452:19:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1680:145:18;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2131:249;;;;;;:::i;:::-;;:::i;2383:206::-;;;;;;:::i;:::-;;:::i;1689:145:83:-;;;:::i;:::-;;1066:77;;;:::i;:::-;;;;;;;:::i;2593:218:18:-;;;;;;:::i;:::-;;:::i;1524:153::-;;;;;;:::i;:::-;;:::i;1828:300::-;;;;;;:::i;:::-;;:::i;1983:240:83:-;;;;;;:::i;:::-;;:::i;1680:145:18:-;1757:4;1768:38;1777:12;:10;:12::i;:::-;1791:7;1800:5;1768:8;:38::i;:::-;-1:-1:-1;1817:4:18;1680:145;;;;;:::o;2131:249::-;2232:4;2243:36;2253:6;2261:9;2272:6;2243:9;:36::i;:::-;2283:78;2292:6;2300:12;:10;:12::i;:::-;-1:-1:-1;;;;;2314:20:18;;;;;;:12;:20;;;;;:46;;2353:6;;2314:20;2335:12;:10;:12::i;:::-;-1:-1:-1;;;;;2314:34:18;;;;;;;;;;;;-1:-1:-1;2314:34:18;;;:38;:46::i;:::-;2283:8;:78::i;:::-;-1:-1:-1;2372:4:18;2131:249;;;;;:::o;2383:206::-;2475:4;2486:84;2495:12;:10;:12::i;:::-;2509:7;2518:51;2558:10;2518:12;:26;2531:12;:10;:12::i;:::-;-1:-1:-1;;;;;2518:26:18;;;;;;;;;;;;;;;;;-1:-1:-1;2518:26:18;;;:35;;;;;;;;;;;:39;:51::i;1689:145:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;;;;;;;;;1795:1:::1;1779:6:::0;;1758:40:::1;::::0;-1:-1:-1;;;;;1779:6:83;;::::1;::::0;1758:40:::1;::::0;1795:1;;1758:40:::1;1825:1;1808:19:::0;;-1:-1:-1;;;;;;1808:19:83::1;::::0;;1689:145::o;1066:77::-;1104:7;1130:6;-1:-1:-1;;;;;1130:6:83;1066:77;:::o;2593:218:18:-;2690:4;2702:89;2711:12;:10;:12::i;:::-;2725:7;2734:56;2774:15;2734:12;:26;2747:12;:10;:12::i;:::-;-1:-1:-1;;;;;2734:26:18;;;;;;;;;;;;;;;;;-1:-1:-1;2734:26:18;;;:35;;;;;;;;;;;:39;:56::i;1524:153::-;1605:4;1616:42;1626:12;:10;:12::i;:::-;1640:9;1651:6;1616:9;:42::i;1828:300::-;1938:4;1949:38;1958:12;:10;:12::i;:::-;1972:7;1981:5;1949:8;:38::i;:::-;2017:7;-1:-1:-1;;;;;1999:42:18;;2042:12;:10;:12::i;:::-;2056:5;2071:4;2078:9;;1999:89;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1991:118;;;;-1:-1:-1;;;1991:118:18;;;;;;;:::i;:::-;-1:-1:-1;2120:4:18;1828:300;;;;;;:::o;1983:240:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;-1:-1:-1;;;;;2071:22:83;::::1;2063:73;;;;-1:-1:-1::0;;;2063:73:83::1;;;;;;;:::i;:::-;2172:6;::::0;;2151:38:::1;::::0;-1:-1:-1;;;;;2151:38:83;;::::1;::::0;2172:6;::::1;::::0;2151:38:::1;::::0;::::1;2199:6;:17:::0;;-1:-1:-1;;;;;;2199:17:83::1;-1:-1:-1::0;;;;;2199:17:83;;;::::1;::::0;;;::::1;::::0;;1983:240::o;590:104:81:-;677:10;590:104;:::o;3028:308:16:-;-1:-1:-1;;;;;3117:19:16;;3109:68;;;;-1:-1:-1;;;3109:68:16;;;;;;;:::i;:::-;-1:-1:-1;;;;;3189:21:16;;3181:68;;;;-1:-1:-1;;;3181:68:16;;;;;;;:::i;:::-;-1:-1:-1;;;;;3254:19:16;;;;;;;:12;:19;;;;;;;;:28;;;;;;;;;;;;;;:37;;;3300:32;;;;;3285:6;;3300:32;:::i;:::-;;;;;;;;3028:308;;;:::o;2162:185::-;2247:47;2268:6;2276:9;2287:6;2247:20;:47::i;:::-;2298:45;2317:6;2325:9;2336:6;2298:18;:45::i;:::-;2162:185;;;:::o;470:124:77:-;528:7;555:1;550;:6;;542:15;;;;;;-1:-1:-1;573:5:77;;;470:124::o;227:::-;285:7;311:5;;;328:6;;;;320:15;;;;;;346:1;227:124;-1:-1:-1;;;227:124:77:o;1447:199:19:-;1586:56;1625:4;1631:2;1635:6;1586:38;:56::i;1755:404:16:-;-1:-1:-1;;;;;1857:20:16;;1849:70;;;;-1:-1:-1;;;1849:70:16;;;;;;;:::i;:::-;-1:-1:-1;;;;;1931:23:16;;1923:71;;;;-1:-1:-1;;;1923:71:16;;;;;;;:::i;:::-;-1:-1:-1;;;;;2020:18:16;;;;;;:10;:18;;;;;;:30;;2043:6;2020:22;:30::i;:::-;-1:-1:-1;;;;;1999:18:16;;;;;;;:10;:18;;;;;;:51;;;;2078:21;;;;;;;:33;;2104:6;2078:25;:33::i;:::-;-1:-1:-1;;;;;2054:21:16;;;;;;;:10;:21;;;;;;;:57;;;;2120:35;;;;;;;;;;2148:6;;2120:35;:::i;1509:301:17:-;1637:11;;:55;;-1:-1:-1;;;1637:55:17;;1613:21;;-1:-1:-1;;;;;1637:11:17;;:37;;:55;;1675:4;;1681:2;;1685:6;;1637:55;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1613:79;-1:-1:-1;1700:27:17;;;;1696:111;;1743:11;;:58;;-1:-1:-1;;;1743:58:17;;-1:-1:-1;;;;;1743:11:17;;;;:41;;:58;;1785:15;;1743:58;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1743:58:17;;;;;;;;;;;;:::i;:::-;1736:66;;-1:-1:-1;;;1736:66:17;;;;;;;;:::i;1696:111::-;1509:301;;;;:::o;5:130:-1:-;72:20;;-1:-1;;;;;14498:54;;15705:35;;15695:2;;15754:1;;15744:12;1362:241;;1466:2;1454:9;1445:7;1441:23;1437:32;1434:2;;;-1:-1;;1472:12;1434:2;1534:53;1579:7;1555:22;1534:53;:::i;1610:491::-;;;;1748:2;1736:9;1727:7;1723:23;1719:32;1716:2;;;-1:-1;;1754:12;1716:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;1806:63;-1:-1;1906:2;1945:22;;72:20;97:33;72:20;97:33;:::i;:::-;1710:391;;1914:63;;-1:-1;;;2014:2;2053:22;;;;1155:20;;1710:391::o;2108:366::-;;;2229:2;2217:9;2208:7;2204:23;2200:32;2197:2;;;-1:-1;;2235:12;2197:2;2297:53;2342:7;2318:22;2297:53;:::i;:::-;2287:63;2387:2;2426:22;;;;1155:20;;-1:-1;;;2191:283::o;2481:615::-;;;;;2638:2;2626:9;2617:7;2613:23;2609:32;2606:2;;;-1:-1;;2644:12;2606:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;2696:63;-1:-1;2796:2;2835:22;;1155:20;;-1:-1;2932:2;2917:18;;2904:32;2956:18;2945:30;;;2942:2;;;-1:-1;;2978:12;2942:2;3063:6;3052:9;3048:22;;;405:3;398:4;390:6;386:17;382:27;372:2;;-1:-1;;413:12;372:2;456:6;443:20;2956:18;475:6;472:30;469:2;;;-1:-1;;505:12;469:2;600:3;2796:2;580:17;541:6;566:32;;563:41;560:2;;;-1:-1;;607:12;560:2;2600:496;;;;-1:-1;;2796:2;537:17;;-1:-1;;;2600:496::o;3103:257::-;;3215:2;3203:9;3194:7;3190:23;3186:32;3183:2;;;-1:-1;;3221:12;3183:2;223:6;217:13;15851:5;14410:13;14403:21;15829:5;15826:32;15816:2;;-1:-1;;15862:12;3367:362;;3492:2;3480:9;3471:7;3467:23;3463:32;3460:2;;;-1:-1;;3498:12;3460:2;3549:17;3543:24;3587:18;;3579:6;3576:30;3573:2;;;-1:-1;;3609:12;3573:2;3696:6;3685:9;3681:22;;;749:3;742:4;734:6;730:17;726:27;716:2;;-1:-1;;757:12;716:2;797:6;791:13;3587:18;13581:6;13578:30;13575:2;;;-1:-1;;13611:12;13575:2;13244;13238:9;13684;13665:17;;-1:-1;;13661:33;13270:17;;3492:2;13270:17;13330:34;;;13366:22;;;13327:62;13324:2;;;-1:-1;;13392:12;13324:2;13244;13411:22;890:21;;;990:16;;;3492:2;990:16;987:25;-1:-1;984:2;;;-1:-1;;1015:12;984:2;1035:39;1067:6;3492:2;966:5;962:16;3492:2;932:6;928:17;1035:39;:::i;:::-;3629:84;3454:275;-1:-1;;;;;;3454:275::o;3736:259::-;;3849:2;3837:9;3828:7;3824:23;3820:32;3817:2;;;-1:-1;;3855:12;3817:2;1307:6;1301:13;14714:4;16095:5;14703:16;16072:5;16069:33;16059:2;;-1:-1;;16106:12;7874:222;-1:-1;;;;;14498:54;;;;4222:37;;8001:2;7986:18;;7972:124::o;8103:676::-;-1:-1;;;;;14498:54;;;4081:58;;8523:2;8508:18;;7711:37;;;14498:54;;8606:2;8591:18;;4222:37;8350:3;8643:2;8628:18;;8621:48;;;8335:19;;14006;;;8103:676;14018:6;15187:3;14509:42;14046:14;;15169:30;15230:16;;;14046:14;15230:16;;;15223:27;;;;13684:9;15609:14;;;-1:-1;;15605:28;4657:39;;;8321:458;-1:-1;;;;8321:458::o;8786:444::-;-1:-1;;;;;14498:54;;;4222:37;;14498:54;;;;9133:2;9118:18;;4222:37;9216:2;9201:18;;7711:37;;;;8969:2;8954:18;;8940:290::o;9237:210::-;14410:13;;14403:21;4336:34;;9358:2;9343:18;;9329:118::o;9454:310::-;;9601:2;9622:17;9615:47;4855:5;13862:12;14018:6;9601:2;9590:9;9586:18;14006:19;4949:52;4994:6;14046:14;9590:9;14046:14;9601:2;4975:5;4971:16;4949:52;:::i;:::-;13684:9;15609:14;-1:-1;;15605:28;5013:39;;;;14046:14;5013:39;;9572:192;-1:-1;;9572:192::o;9771:416::-;9971:2;9985:47;;;5289:2;9956:18;;;14006:19;5325:34;14046:14;;;5305:55;-1:-1;;;5380:12;;;5373:27;5419:12;;;9942:245::o;10194:416::-;10394:2;10408:47;;;5670:2;10379:18;;;14006:19;5706:34;14046:14;;;5686:55;-1:-1;;;5761:12;;;5754:30;5803:12;;;10365:245::o;10617:416::-;10817:2;10831:47;;;6054:2;10802:18;;;14006:19;6090:34;14046:14;;;6070:55;-1:-1;;;6145:12;;;6138:26;6183:12;;;10788:245::o;11040:416::-;11240:2;11254:47;;;6434:2;11225:18;;;14006:19;-1:-1;;;14046:14;;;6450:39;6508:12;;;11211:245::o;11463:416::-;11663:2;11677:47;;;11648:18;;;14006:19;6795:34;14046:14;;;6775:55;6849:12;;;11634:245::o;11886:416::-;12086:2;12100:47;;;7100:2;12071:18;;;14006:19;7136:34;14046:14;;;7116:55;-1:-1;;;7191:12;;;7184:29;7232:12;;;12057:245::o;12309:416::-;12509:2;12523:47;;;7483:2;12494:18;;;14006:19;7519:34;14046:14;;;7499:55;-1:-1;;;7574:12;;;7567:28;7614:12;;;12480:245::o;12732:222::-;7711:37;;;12859:2;12844:18;;12830:124::o;12961:214::-;14714:4;14703:16;;;;7827:35;;13084:2;13069:18;;13055:120::o;15265:268::-;15330:1;15337:101;15351:6;15348:1;15345:13;15337:101;;;15418:11;;;15412:18;15399:11;;;15392:39;15373:2;15366:10;15337:101;;;15453:6;15450:1;15447:13;15444:2;;;-1:-1;;15330:1;15500:16;;15493:27;15314:219::o;15646:117::-;-1:-1;;;;;14498:54;;15705:35;;15695:2;;15754:1;;15744:12;15695:2;15689:74;:::o", - "source": "// SPDX-License-Identifier: Apache-2.0\n\n/******************************************************************************\n * Copyright 2020 IEXEC BLOCKCHAIN TECH *\n * *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); *\n * you may not use this file except in compliance with the License. *\n * You may obtain a copy of the License at *\n * *\n * http://www.apache.org/licenses/LICENSE-2.0 *\n * *\n * Unless required by applicable law or agreed to in writing, software *\n * distributed under the License is distributed on an \"AS IS\" BASIS, *\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *\n * See the License for the specific language governing permissions and *\n * limitations under the License. *\n ******************************************************************************/\n\npragma solidity ^0.6.0;\npragma experimental ABIEncoderV2;\n\nimport \"./IexecERC20Delegate.sol\";\nimport \"./IexecERC20CoreKYC.sol\";\n\n\ncontract IexecERC20DelegateKYC is IexecERC20Delegate, IexecERC20CoreKYC\n{\n\tfunction _beforeTokenTransfer(address from, address to, uint256 amount)\n\tinternal virtual override(IexecERC20Core, IexecERC20CoreKYC)\n\t{\n\t\tIexecERC20CoreKYC._beforeTokenTransfer(from, to, amount);\n\t}\n\n\tfunction _isAuthorized(address account)\n\tinternal virtual override(IexecERC20Core, IexecERC20CoreKYC) returns (bool)\n\t{\n\t\treturn IexecERC20CoreKYC._isAuthorized(account);\n\t}\n}\n", - "sourcePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20DelegateKYC.sol", - "ast": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20DelegateKYC.sol", - "exportedSymbols": { - "IexecERC20DelegateKYC": [ - 3227 - ] - }, - "id": 3228, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3182, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:19" - }, - { - "id": 3183, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "1266:33:19" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20Delegate.sol", - "file": "./IexecERC20Delegate.sol", - "id": 3184, - "nodeType": "ImportDirective", - "scope": 3228, - "sourceUnit": 3181, - "src": "1301:34:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol", - "file": "./IexecERC20CoreKYC.sol", - "id": 3185, - "nodeType": "ImportDirective", - "scope": 3228, - "sourceUnit": 2996, - "src": "1336:33:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3186, - "name": "IexecERC20Delegate", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3180, - "src": "1406:18:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Delegate_$3180", - "typeString": "contract IexecERC20Delegate" - } - }, - "id": 3187, - "nodeType": "InheritanceSpecifier", - "src": "1406:18:19" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3188, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1426:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - }, - "id": 3189, - "nodeType": "InheritanceSpecifier", - "src": "1426:17:19" - } - ], - "contractDependencies": [ - 309, - 1658, - 2939, - 2995, - 3180, - 9255, - 13161, - 13173, - 13740, - 14132 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 3227, - "linearizedBaseContracts": [ - 3227, - 2995, - 3180, - 2939, - 1658, - 13161, - 309, - 13173, - 14132, - 13740, - 9255 - ], - "name": "IexecERC20DelegateKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "baseFunctions": [ - 2473, - 2994 - ], - "body": { - "id": 3209, - "nodeType": "Block", - "src": "1582:64:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3204, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3191, - "src": "1625:4:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3205, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3193, - "src": "1631:2:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3206, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3195, - "src": "1635:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3201, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1586:17:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 3203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_beforeTokenTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2994, - "src": "1586:38:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1586:56:19", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3208, - "nodeType": "ExpressionStatement", - "src": "1586:56:19" - } - ] - }, - "documentation": null, - "id": 3210, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 3199, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 3197, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1546:14:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 3198, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1562:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1537:43:19" - }, - "parameters": { - "id": 3196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3191, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3210, - "src": "1477:12:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3190, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1477:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3193, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3210, - "src": "1491:10:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3192, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1491:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3195, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3210, - "src": "1503:14:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3194, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1503:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1476:42:19" - }, - "returnParameters": { - "id": 3200, - "nodeType": "ParameterList", - "parameters": [], - "src": "1582:0:19" - }, - "scope": 3227, - "src": "1447:199:19", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "baseFunctions": [ - 2463, - 2959 - ], - "body": { - "id": 3225, - "nodeType": "Block", - "src": "1767:55:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3222, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3212, - "src": "1810:7:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3220, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1778:17:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 3221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_isAuthorized", - "nodeType": "MemberAccess", - "referencedDeclaration": 2959, - "src": "1778:31:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", - "typeString": "function (address) returns (bool)" - } - }, - "id": 3223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1778:40:19", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3219, - "id": 3224, - "nodeType": "Return", - "src": "1771:47:19" - } - ] - }, - "documentation": null, - "id": 3226, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_isAuthorized", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 3216, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 3214, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1716:14:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 3215, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1732:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1707:43:19" - }, - "parameters": { - "id": 3213, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3212, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3226, - "src": "1672:15:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3211, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1672:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1671:17:19" - }, - "returnParameters": { - "id": 3219, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3218, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3226, - "src": "1760:4:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3217, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1760:4:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1759:6:19" - }, - "scope": 3227, - "src": "1649:173:19", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 3228, - "src": "1372:452:19" - } - ], - "src": "1242:583:19" - }, - "legacyAST": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20DelegateKYC.sol", - "exportedSymbols": { - "IexecERC20DelegateKYC": [ - 3227 - ] - }, - "id": 3228, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3182, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:19" - }, - { - "id": 3183, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "1266:33:19" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20Delegate.sol", - "file": "./IexecERC20Delegate.sol", - "id": 3184, - "nodeType": "ImportDirective", - "scope": 3228, - "sourceUnit": 3181, - "src": "1301:34:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol", - "file": "./IexecERC20CoreKYC.sol", - "id": 3185, - "nodeType": "ImportDirective", - "scope": 3228, - "sourceUnit": 2996, - "src": "1336:33:19", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3186, - "name": "IexecERC20Delegate", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3180, - "src": "1406:18:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Delegate_$3180", - "typeString": "contract IexecERC20Delegate" - } - }, - "id": 3187, - "nodeType": "InheritanceSpecifier", - "src": "1406:18:19" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3188, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1426:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - }, - "id": 3189, - "nodeType": "InheritanceSpecifier", - "src": "1426:17:19" - } - ], - "contractDependencies": [ - 309, - 1658, - 2939, - 2995, - 3180, - 9255, - 13161, - 13173, - 13740, - 14132 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 3227, - "linearizedBaseContracts": [ - 3227, - 2995, - 3180, - 2939, - 1658, - 13161, - 309, - 13173, - 14132, - 13740, - 9255 - ], - "name": "IexecERC20DelegateKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "baseFunctions": [ - 2473, - 2994 - ], - "body": { - "id": 3209, - "nodeType": "Block", - "src": "1582:64:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3204, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3191, - "src": "1625:4:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3205, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3193, - "src": "1631:2:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3206, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3195, - "src": "1635:6:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3201, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1586:17:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 3203, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_beforeTokenTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2994, - "src": "1586:38:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3207, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1586:56:19", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3208, - "nodeType": "ExpressionStatement", - "src": "1586:56:19" - } - ] - }, - "documentation": null, - "id": 3210, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 3199, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 3197, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1546:14:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 3198, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1562:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1537:43:19" - }, - "parameters": { - "id": 3196, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3191, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3210, - "src": "1477:12:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3190, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1477:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3193, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3210, - "src": "1491:10:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3192, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1491:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3195, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3210, - "src": "1503:14:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3194, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1503:7:19", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1476:42:19" - }, - "returnParameters": { - "id": 3200, - "nodeType": "ParameterList", - "parameters": [], - "src": "1582:0:19" - }, - "scope": 3227, - "src": "1447:199:19", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "baseFunctions": [ - 2463, - 2959 - ], - "body": { - "id": 3225, - "nodeType": "Block", - "src": "1767:55:19", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3222, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3212, - "src": "1810:7:19", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3220, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1778:17:19", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 3221, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_isAuthorized", - "nodeType": "MemberAccess", - "referencedDeclaration": 2959, - "src": "1778:31:19", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", - "typeString": "function (address) returns (bool)" - } - }, - "id": 3223, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1778:40:19", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3219, - "id": 3224, - "nodeType": "Return", - "src": "1771:47:19" - } - ] - }, - "documentation": null, - "id": 3226, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_isAuthorized", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 3216, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 3214, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1716:14:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 3215, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1732:17:19", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1707:43:19" - }, - "parameters": { - "id": 3213, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3212, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3226, - "src": "1672:15:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3211, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1672:7:19", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1671:17:19" - }, - "returnParameters": { - "id": 3219, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3218, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3226, - "src": "1760:4:19", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3217, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1760:4:19", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1759:6:19" - }, - "scope": 3227, - "src": "1649:173:19", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 3228, - "src": "1372:452:19" - } - ], - "src": "1242:583:19" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.2.2", - "updatedAt": "2020-11-09T09:15:00.575Z", - "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/IexecEscrowTokenDelegateKYC.json b/build/contracts/IexecEscrowTokenDelegateKYC.json deleted file mode 100644 index 5c3ace6d9..000000000 --- a/build/contracts/IexecEscrowTokenDelegateKYC.json +++ /dev/null @@ -1,1581 +0,0 @@ -{ - "contractName": "IexecEscrowTokenDelegateKYC", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "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": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "type": "event" - }, - { - "stateMutability": "payable", - "type": "fallback" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "depositFor", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "amounts", - "type": "uint256[]" - }, - { - "internalType": "address[]", - "name": "targets", - "type": "address[]" - } - ], - "name": "depositForArray", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "receiveApproval", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "recover", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "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": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "address", - "name": "target", - "type": "address" - } - ], - "name": "withdrawTo", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"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\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"ref\",\"type\":\"bytes32\"}],\"name\":\"Reward\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"ref\",\"type\":\"bytes32\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"depositFor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"}],\"name\":\"depositForArray\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"receiveApproval\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recover\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"withdrawTo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"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\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecEscrowTokenDelegateKYC.sol\":\"IexecEscrowTokenDelegateKYC\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/Store.sol\":{\"keccak256\":\"0xbc74ce351bc304d65cc20a95bad8290711ac47267b7cfff5500cdeff42b1a18b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f92ebcd5817a7d6f20ef48662f985e9bdb8a68f3752249a14a1a4cbb8b99f190\",\"dweb:/ipfs/QmZAph8GSDPRkXxNUsQpGCXDsmMSGo6Pr5HFg2f4ZXgRZc\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC1404.sol\":{\"keccak256\":\"0xec243d84d26dd07f7a93a6f0665d56d60d20b139bf7f201a502a438ac95ac771\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://75cd876336f5cb77d0492f2082912fa42b526cf00820f1f0a0e8be012d402360\",\"dweb:/ipfs/QmZWgMF27i1JfGbgc7FTny9YkoFWDXiYh9gjpfXnHVLWy8\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC20KYC.sol\":{\"keccak256\":\"0xc2aa3e67c31421ad6f43594875c1d5c5a62366d19ef22485d4764a9c2e53ab7c\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f15679680aa5a9590707ab921d90569eb7e30a3c8340a4d9d0bef3ac5375d56b\",\"dweb:/ipfs/QmWZovmERYpAu3FKW7Ea3gZZeangFyGpkpgcLEggbkqhdM\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC677.sol\":{\"keccak256\":\"0x2fc0f8ca46db18638bd9daed90a3e6bd90fec77ef4c899b7aa1b28010355d096\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c213b13843b23ba7b755ad821c07b77cfacafddc5348a2191c164300344818ce\",\"dweb:/ipfs/QmSruFZbrEuzJFmRbbzZL3GehKpqEm6RfVGcuZZGwBedsp\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/libs/IexecLibCore_v5.sol\":{\"keccak256\":\"0x7fab9c16493884c64cdd31627c5d71389de785becf611b738343d75f7495471d\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://3e243796363e7d4cd249b432a2511cdb49759ed7d2e8bd73817f09ff60ff919c\",\"dweb:/ipfs/Qmeat95AtRviDFcJ3W3aBZmH51aHReX9RLnPZ3Gof3FnzW\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/libs/IexecLibOrders_v5.sol\":{\"keccak256\":\"0x430eaa82ce8d43771c8a84af5113e31de79490d5b9d561ef90034bdc5a2a993b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://65cb57ac25afa5b6e0811290866aace3b013fe67aa82c5e72b6bb00d50e9f28a\",\"dweb:/ipfs/QmTTNTASsnM8db9vTjkbxz5kiNtqVxNrjwxkvVEmoHuMj9\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/DelegateBase.sol\":{\"keccak256\":\"0xb59c042fe327f79a7c13fca4f0512c643545b51045a07517723dd1104fcb68f1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://42231705416aaefd95467b78933eb5dc4c71d5f0eebd3628f60cb2388109e4ec\",\"dweb:/ipfs/QmU7Eeejx7tGcAP14D1XinQgt4Mjfo2a3Ur7cipLPzjPqx\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20Core.sol\":{\"keccak256\":\"0x28db238625e52e31aa9d602612e6874d2a1f8091063dd04e8cd7870642af3d54\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e6e5db14c0e38900a3f92476f45c608b143fd83fa48fffe82bd03bd4a28a1bc6\",\"dweb:/ipfs/QmecHBiCZgekCafN6BnopvRuiiZ9GjRn6PeM6x7PHkUHLZ\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol\":{\"keccak256\":\"0x74e0cfc2f63fec8064535691819308cc537140ba22494d64bfd4bb748d9c0f74\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://93c10dce05b3e05084715c3660b61a5e9b7e21db85da2899cfcac9a7f03df7ff\",\"dweb:/ipfs/QmNoHo5uPYPqusH7cki6j2afHbCE1zWovU8V1QzTpCKwi6\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecEscrowTokenDelegate.sol\":{\"keccak256\":\"0xe6a8a370fadff761430d29e6cbf9c53cf9193948407efbb6ba6faa783c37f2f1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://4659185da0ae3360923d58770934d2b3f8490c34c1fb4dfe603f9842efcb88a0\",\"dweb:/ipfs/QmcrZpRq6egsTwsHYSrEydNVWJMu1qP3uYUmKxKrwsC9sn\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecEscrowTokenDelegateKYC.sol\":{\"keccak256\":\"0xbb643e5af3693933aea9da8ccf80267b98af1dfcdbdd56238ff1a94ccf6453fc\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f4b5034ab805784125acc110a3c8d21993df3835e739fa56695f1599dab8aace\",\"dweb:/ipfs/QmaDnL7QypzNK3XHDbNkFQV7vhCMNNbCrmfQxH8K4RBS4B\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/interfaces/IexecEscrowToken.sol\":{\"keccak256\":\"0x35891a5e6747ea3f767461e96c0f83a65083266f2a408ca7d12d3f5f75a95b22\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://ab801e62787f65163dc730c778fb470dcf8ec2e294184b54905fc9dcd93d61c9\",\"dweb:/ipfs/QmcVsR97kjqQqaggUokYrKKRSFGbgzRpx9ki2wgJtj8rZc\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/interfaces/IexecTokenSpender.sol\":{\"keccak256\":\"0xd914d8f8a6ebf78bdb876c2243e90c6bfffcf280e3760affa57afd7e618cd420\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://1807226c064ecf6819c50440342aaaab2833209193c6307f4ab42567d54d329c\",\"dweb:/ipfs/QmSBVCBo2GqWKqW98pw3mXwzXY7iupoUTnDytXAVyTi8T5\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/IRegistry.sol\":{\"keccak256\":\"0xc735f7764e312ea161551bc1a2749820928b1bf80c4aeb2f528a2f4a498078cd\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://7dbefb9d9bec9b56f694d2ee6dc0a44b341c027c0d392534b457867208f019b9\",\"dweb:/ipfs/QmSiSkhgUcAGscopDoRtGnHiWAbxNwBf9ZV8nnVYoWqZ8Z\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/Registry.sol\":{\"keccak256\":\"0x18bdeaad129f5034937fb69a7afbd68ffba8341172a7a124d6be22d6cd2cc5ad\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e77b038842b0c19eb8cb2bac495025ec2fe074472370708cc0b6b6a9e6e5275c\",\"dweb:/ipfs/QmNPUSUBUPezTebKA3VzRu8u5KKuYiKGP1m3yME2J6YnSc\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/RegistryEntry.sol\":{\"keccak256\":\"0xc5e7a46311946df50486dd451f456aee0abe92184dbc31e3a40fc9198f8f6582\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://24f058496713a743781c3353477a03255cdce4cfca845883d207a62346c5c684\",\"dweb:/ipfs/QmVVrLgcoAetTY7EsL3fWfC7VuqKzh1ncVF8spkEkgPQot\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/apps/App.sol\":{\"keccak256\":\"0x1408d4f83f2c512ce71a680975d480fffb5ff417b2ecc37de45076e8d8f43d1a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e817bcc02c7e8547179b0293ed61b4066a04ab3e2b7cda6db90b41e42cabcecc\",\"dweb:/ipfs/QmVPJzM6SXg4ngSSHi2kioQ2htbJPUta5ZMyrgMnAGmrW6\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/datasets/Dataset.sol\":{\"keccak256\":\"0xf58ec4bed61a76b9d557e7b1f486fced23cb4dfc5047fc93ba6b4684c1624c2a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://530858af626fb5598eb9c973b9d3a0c2c1d431b43ca9e7c49143ab5edf619d67\",\"dweb:/ipfs/QmRkksj1gDnz1kcB6JFKuBKXD3mq52SsjuPN5SMUqSK46u\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/workerpools/Workerpool.sol\":{\"keccak256\":\"0x5604f1f935ea198caa899dfd96af42f9f2280954c9798caa58e9cf198b8d492e\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://10fabd01e983ad441a08c57ff78451237c0d350ba7e0cab42a7dccbf784209bd\",\"dweb:/ipfs/Qmbt3eiERXv3QUHHJAFKwfgrCNz6ZcA1ccUWtztLFiv9Av\"]},\"@iexec/interface/contracts/IexecClerk.sol\":{\"keccak256\":\"0x703252a638a5a7e2b600395fd920712a1ac259018bc9578fe581a77fa2f008a9\",\"urls\":[\"bzz-raw://072b9e948e5ac4a7f60466c23b322ea0f1aca711f1a94616e658600c2a4c36a2\",\"dweb:/ipfs/QmRP57bkhWDr5BeawfjiKsbdwFiHnw6nc6zgiEad3hQoSJ\"]},\"@iexec/interface/contracts/IexecHub.sol\":{\"keccak256\":\"0x8e293b7624550823838ed9113400544c5980afac1043ddacad7a862c91b0840d\",\"urls\":[\"bzz-raw://ae34ebc355838595ee69b24a31e60deb186455cc388c88de7ecd0294c7037075\",\"dweb:/ipfs/QmUYVQJBWG7ohAYksJRDJKcJVyPMXNFJSPWMAuQcGfWHo7\"]},\"@iexec/interface/contracts/IexecRegistries.sol\":{\"keccak256\":\"0xb39eef47d62d8751c5adfeaf169ce57b50c480788be8356289bc28b78bc24fde\",\"urls\":[\"bzz-raw://a86593f1ef9953ac0965aab4e764374580a899a7f7871ad66b432523171063a1\",\"dweb:/ipfs/QmcYZhHD45APoS1Ebi416DhXU3fiCzoFW2WSMux4AxhFqk\"]},\"@iexec/interface/contracts/libs/IexecODBLibCore.sol\":{\"keccak256\":\"0x3fc7ff4152e9a8f9747d42e262c15c3d460d409732711d9e1da8a88163880183\",\"urls\":[\"bzz-raw://8bacc98b866852e9f1e3563948381cba142ab61d6b1a7c62fbc53b7d57aa0589\",\"dweb:/ipfs/QmUNjhjBxdtHQFWQ61CgnPoaAzL767tQSKF6x34VFWeRyF\"]},\"@iexec/interface/contracts/libs/IexecODBLibOrders.sol\":{\"keccak256\":\"0xe2848a685785b09dc9ee5a6e6329a417eaf18e520388e8575d45a5376b1d62ca\",\"urls\":[\"bzz-raw://d1385ab26f382baa7aadb80faed54290296be09eeccbee1193a1b8a53b0b15d5\",\"dweb:/ipfs/QmUQTFcGX5VZiYwHKu9Yjc4PHNrMgdAyKwKi6tFEMsbaJk\"]},\"@iexec/solidity/contracts/ENStools/ENSReverseRegistration.sol\":{\"keccak256\":\"0xd1e5b9222925769b40cbf20a4b96d9d3fa462cca6e40d0d9021033ebb0a7d584\",\"urls\":[\"bzz-raw://0e47b7621c8f6cee3c5900f0545cb563fa763712cf235d320fd88d0857699ed1\",\"dweb:/ipfs/QmS18tjVQ6oxc7MHUK5DKLrRSX1v7N4e5Pc6xKjJCNcFv3\"]},\"@iexec/solidity/contracts/ENStools/IENS.sol\":{\"keccak256\":\"0xb109a681632d71269ed4efbe11fc9d1bcee6bc29109f2fb8ced6951dafc28302\",\"urls\":[\"bzz-raw://920ee6b3712ebe1cb28977abf4ded033067305d786116f94777ab03a6b6b9ee9\",\"dweb:/ipfs/QmWFCBtMLUZYJ2cxzHBjHq5WZC8Yydnbk6dezoXHT4Pxgz\"]},\"@iexec/solidity/contracts/ENStools/IReverseRegistrar.sol\":{\"keccak256\":\"0xff985fd263e59bd387e543cd5cf99235ab6e066b6d1be95e79108dacc749673f\",\"urls\":[\"bzz-raw://98a054bc372f5fd6c80793d32a74f3387d562ed6b3e17388b5f8f4b6bc96a62c\",\"dweb:/ipfs/QmQtkE8u6h7zrBrdfEez6STf18766AFP5kK8hGL4SNoWuP\"]},\"@iexec/solidity/contracts/ERC1538/ERC1538Module.sol\":{\"keccak256\":\"0xb1e1ff5fcce00614303b0bb01c595a7d2f3496ae88bc2068e56ba9cd72ec8921\",\"urls\":[\"bzz-raw://a6b87d03a17727ce6fe6c5b0078a198898153ae8230345468479a9aa4560835d\",\"dweb:/ipfs/QmV4T7Wg8TS3uAVhnqMhqD6yZ7Qv8iouYnYrkTSCJirG2P\"]},\"@iexec/solidity/contracts/ERC1538/ERC1538Store.sol\":{\"keccak256\":\"0x4d1e8821dc216013f20044bbf82df3c2ab2c739d1b2ce4d90c15cb65f85707d8\",\"urls\":[\"bzz-raw://e36d4db70862f87b8657c19330f0d45e8e7018ebcf3df97525638c8caa919d2b\",\"dweb:/ipfs/QmZqsrXPsyRkRkjuupKG2SYsyUTBXqe7nkkCy7RKxDKz1L\"]},\"@iexec/solidity/contracts/Libs/SafeMathExtended.sol\":{\"keccak256\":\"0xf2802ae591eb22954d9c8e02658ae7577940890aff8d8927a7255e254fed605b\",\"urls\":[\"bzz-raw://8dcc485d21a3aa3f643768d4ac4fc69697b9b37f8fb779f3998ab4cee143fa66\",\"dweb:/ipfs/QmWdwgKPMoWuidYQp6WFsJBhNbJUwFHNE9YPYQZhBsKj7e\"]},\"@iexec/solidity/contracts/Upgradeability/BaseUpgradeabilityProxy.sol\":{\"keccak256\":\"0x47ec56a1226ecf04d49aa82f768814923c1957b69f7fc9e7e470885c75b5a2c6\",\"urls\":[\"bzz-raw://4eae82be03a247a27a2948ed12d5a826dea977f4b5528830c19d9cf4c23dcd53\",\"dweb:/ipfs/Qmb9HtnohAMvjb7vYnXaT3AnQd9p9sLsThnyLnXVzz1umq\"]},\"@iexec/solidity/contracts/Upgradeability/InitializableUpgradeabilityProxy.sol\":{\"keccak256\":\"0xe1bf07e5d913bd04484305a3fb0cc576f6b5d8e4fc0406bf7c9a8b6b2ed766e5\",\"urls\":[\"bzz-raw://b42f6dff696ceadeb44a02aae3049e603984c18af8d94f33fb6544a8b279179c\",\"dweb:/ipfs/QmRWTaRHCGZhKZFKrVAJwXukXiCZcezrVhJJ28H2qBbai7\"]},\"@iexec/solidity/contracts/Upgradeability/Proxy.sol\":{\"keccak256\":\"0xd89f285d80cfeff0efc87f11dbc024a587da3bba142a06695cbac7e4050e9302\",\"urls\":[\"bzz-raw://9c8323ec7efc9fde6c1529f1070c3f3406adb5f8836b17221530d8f0110fe3f4\",\"dweb:/ipfs/QmURRsX9L2gZ83aMULtY1EuRMJExHhFYErCbkxE5CNkAzE\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0xdb26cbf4d028490f49831a7865c2fe1b28db44b535ca8d343785a3b768aae183\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://840b14ce0315c47d49ba328f1f9fa7654ded1c9e1559e6c5e777a7b2dc28bf0a\",\"dweb:/ipfs/QmTLLabn4wcfGro9LEmUXUN2nwKqZSotXMvjDCLXEnLtZP\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x4bd6402ca6b3419008c2b482aff54e66836e8cb4eba2680e42ac5884ae6424fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f9f711fb8d0d92aeea1c327e3845d13ca1fa8f142e47f8723cd5b3106fb29a3\",\"dweb:/ipfs/QmVQUReDW9f4zGqhizwHnyU8EntMs95tbASdqkGncnikba\"]},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"keccak256\":\"0xb046d18f9d09683ca1c0ed6d80c61da8a8a7d9b30bad70a17b898538683eff74\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4728713afa6ae36cc9e92c7107c796a313add3ec20f813be2cde76c814486b2a\",\"dweb:/ipfs/QmUJBTXvYaGDF5PVnd5pUvYerc9DRXvqANDzgCzAp3FkkA\"]},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xfa152b6e88a1dc50780e8f1580426dc23ad2e1e2c2f086a088adf206a202f453\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5127b264994adab88fae419b1c493efc5acd07134c19ee5c0397e50018291ebf\",\"dweb:/ipfs/QmWwJZVhvdmvUCdimbb6R2Jiu59zjPqm6XTMchM6LaEHAp\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x9a9cf02622cd7a64261b10534fc3260449da25c98c9e96d1b4ae8110a20e5806\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2df142592d1dc267d9549049ee3317fa190d2f87eaa565f86ab05ec83f7ab8f5\",\"dweb:/ipfs/QmSkJtcfWo7c42KnL5hho6GFxK6HRNV91XABx1P7xDtfLV\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://efdc632af6960cf865dbc113665ea1f5b90eab75cc40ec062b2f6ae6da582017\",\"dweb:/ipfs/QmfAZFDuG62vxmAN9DnXApv7e7PMzPqi4RkqqZHLMSQiY5\"]},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"keccak256\":\"0x1071a23188ba7f5bb16f51b0b01a67fd41fe56f862d8f83985788cf46f3b91bd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c7082ca99b93f2e541cafaad00ed32675adf0752eab78eccabcf91dec9fd5d73\",\"dweb:/ipfs/QmdqooMmYBQVi7p6subDFM4e1944AuLjZUpHMjGtae7Lgd\"]},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x227bafd3e165b13f5d98c42a44376e48d41f4a265db8803f2707faaeae9659aa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c9aa7959a30871669ce46172cd117b084b607d602d9ce695ce79005582b0b69b\",\"dweb:/ipfs/QmXZUWeLXmArQinHL4RnacJLT22GvCExqREYM6pHLX7CX9\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"keccak256\":\"0x3636662804cd8f474536b2875a9038a4c3fb91879f1bbff48af5c3f140fcd2f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9fab8521263fa581544000cb57335a3f2e6bcdfbb5579d3ceaa5acf741c67c4f\",\"dweb:/ipfs/QmZfXnMom7JSNtfyie5yGPN1SUC4SmHbz4ScVBH88URmA7\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"keccak256\":\"0xe7f984cedc00a138dc27f263c73c32ba9a4b2fd23b6c34ac46f46c074b943538\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0f4acda12f076fe7584921241ddbb5b460ca7cad6cb8a42252ac7f2a9f539127\",\"dweb:/ipfs/QmQmfhkEv9GrhdWe67QtXnU19AMuoEmy31QnHPkucdYLjZ\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"keccak256\":\"0x321ee37ef4925020aa818a03ec7fe48e057561f65ab009a84f6c20c86026ade7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://01f9d74a17a56024984251b97e428e24c9d3abffbae5bd290f0ec263c82e9694\",\"dweb:/ipfs/QmRryCuuXu2ukrDmatB8TqdEhPLiK6NBRt41RiPUaX1qKy\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xdfb4f812600ba4ce6738c35584ceb8c9433472583051b48ba5b1f66cb758a498\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://df02dffe1c1de089d9b4f6192f0dcf464526f2230f420b3deec4645e0cdd2bff\",\"dweb:/ipfs/QmcqXGAU3KJqwrgUVoGJ2W8osomhSJ4R5kdsRpbuW3fELS\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x16926b3c19504ea52f73abe41dfa9c1ef9c328d6088b82162d475caecaa47a6d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc578656a08c07f33ecf4a54324bad5f951afdcd990cdab1dcde493d6bb49d9c\",\"dweb:/ipfs/QmbXLJtTaqBg7WwC4p9gsRjA3VEwNwGc6W9afJeAaacF71\"]},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"keccak256\":\"0x244e4b74b17716120cf28e58636f11c699b8c0c94628bd952a95cee038d7e32b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://198d566157120c526bd6b5086b32cae85a11389b8a538f533ba9f9447915da0e\",\"dweb:/ipfs/QmeE6d8KWERx7f1FVS5tMnitNJxBm2yWXRSEUBF7R6voLh\"]},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"keccak256\":\"0xb2a11b236f073662f5a196995863f51c11d006bf7c3de158b316dfa1506c4b79\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8651649cf0b9efa18c3b01c030276fa320d41adbdc286833417e7f36e357b2f3\",\"dweb:/ipfs/QmafhM2Nd1aP43QVB1eRRZaqRXQKswNfQcWi8U8xjrxCfN\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x79484115dbfa737054f73e041009a02eeb434dd81be5d684bf4255ad3b5ab558\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://12c119699463450c2544f5b9d8709b5e9e9164c62948a79c3ec53423a051d969\",\"dweb:/ipfs/QmPJduzSAaekq447QeFqAp3E7dc8CnNk5ajofckJ4ahA7Q\"]},\"solstruct/contracts/libs/LibMap2.bytes4.address.bytes.sol\":{\"keccak256\":\"0x471645d4b20cc36606122fc6bb692cdf8489118547f90bde2740cb73b1e64d54\",\"urls\":[\"bzz-raw://7ca824c03cd077e6d9630eaa4755787c785a61f612cb8e3ba13d0ce92ee55738\",\"dweb:/ipfs/QmdavtXDokZ7vWZt8pMxPi7DaG3Hd1Q5MyeJjXGRFQuL9r\"]},\"solstruct/contracts/libs/LibSet.bytes4.sol\":{\"keccak256\":\"0xdec5833ab65ae8cab500b84424dde49c1f7817c6575e1631a729fc88c6d4bd7f\",\"urls\":[\"bzz-raw://2e5d23b8383819e6dd77ea61ed30740bcba45b0fff609922b11d1cae2b0223f1\",\"dweb:/ipfs/QmQ27sefXEYXBUSEGdPkuzCqemtUJzNXhhsyd7kB94w6CE\"]}},\"version\":1}", - "bytecode": "0x608060405234801561001057600080fd5b50600061001b610060565b600080546001600160a01b0319166001600160a01b038316908117825560405192935091600080516020611063833981519152908290a35061005b610064565b61010f565b3390565b61006c610060565b6000546001600160a01b039081169116146100a25760405162461bcd60e51b8152600401610099906100da565b60405180910390fd5b600080546040516001600160a01b0390911690600080516020611063833981519152908390a3600080546001600160a01b0319169055565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b610f458061011e6000396000f3fe6080604052600436106100955760003560e01c80638f4ffcb1116100595780638f4ffcb114610182578063b6b55f25146101a2578063c86283c8146101c2578063ce746024146101e2578063f2fde38b14610204576100bb565b80632e1a7d4d146100d35780633354f8a51461010957806336efd16f14610129578063715018a6146101495780638da5cb5b14610160576100bb565b366100bb5760405162461bcd60e51b81526004016100b290610dec565b60405180910390fd5b60405162461bcd60e51b81526004016100b290610dec565b3480156100df57600080fd5b506100f36100ee366004610c09565b610224565b6040516101009190610cd7565b60405180910390f35b34801561011557600080fd5b506100f3610124366004610ae5565b610250565b34801561013557600080fd5b506100f3610144366004610c39565b6102ef565b34801561015557600080fd5b5061015e610316565b005b34801561016c57600080fd5b50610175610395565b6040516101009190610c86565b34801561018e57600080fd5b506100f361019d366004610a4b565b6103a4565b3480156101ae57600080fd5b506100f36101bd366004610c09565b6103e8565b3480156101ce57600080fd5b506100f36101dd366004610c39565b61040c565b3480156101ee57600080fd5b506101f7610429565b6040516101009190610eb4565b34801561021057600080fd5b5061015e61021f366004610a30565b61050a565b60006102376102316105c0565b836105c4565b6102486102426105c0565b83610681565b506001919050565b60008382146102715760405162461bcd60e51b81526004016100b290610d89565b60005b848110156102e35761029f6102876105c0565b87878481811061029357fe5b9050602002013561070a565b6102db8484838181106102ae57fe5b90506020020160208101906102c39190610a30565b8787848181106102cf57fe5b905060200201356107b0565b600101610274565b50600195945050505050565b60006103026102fc6105c0565b8461070a565b61030c82846107b0565b5060015b92915050565b61031e6105c0565b6000546001600160a01b0390811691161461034b5760405162461bcd60e51b81526004016100b290610db7565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6008546000906001600160a01b038581169116146103d45760405162461bcd60e51b81526004016100b290610e58565b6103de868661070a565b6102e386866107b0565b60006103fb6103f56105c0565b8361070a565b6102486104066105c0565b836107b0565b600061041f6104196105c0565b846105c4565b61030c8284610681565b60006104336105c0565b6000546001600160a01b039081169116146104605760405162461bcd60e51b81526004016100b290610db7565b600c546008546040516370a0823160e01b81526000926104f29290916001600160a01b03909116906370a082319061049c903090600401610c86565b60206040518083038186803b1580156104b457600080fd5b505afa1580156104c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ec9190610c21565b90610864565b90506105056104ff610395565b826107b0565b905090565b6105126105c0565b6000546001600160a01b0390811691161461053f5760405162461bcd60e51b81526004016100b290610db7565b6001600160a01b0381166105655760405162461bcd60e51b81526004016100b290610d15565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b0382166105ea5760405162461bcd60e51b81526004016100b290610e17565b6105f682600083610879565b600c546106039082610864565b600c556001600160a01b0382166000908152600d60205260409020546106299082610864565b6001600160a01b0383166000818152600d60205260408082209390935591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610675908590610eb4565b60405180910390a35050565b60085460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906106b39085908590600401610cbe565b602060405180830381600087803b1580156106cd57600080fd5b505af11580156106e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107059190610b4e565b505050565b6008546040516323b872dd60e01b81526001600160a01b03909116906323b872dd9061073e90859030908690600401610c9a565b602060405180830381600087803b15801561075857600080fd5b505af115801561076c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107909190610b4e565b6107ac5760405162461bcd60e51b81526004016100b290610d5b565b5050565b6001600160a01b0382166107d65760405162461bcd60e51b81526004016100b290610e7d565b6107e260008383610879565b600c546107ef9082610884565b600c556001600160a01b0382166000908152600d60205260409020546108159082610884565b6001600160a01b0383166000818152600d60205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610675908590610eb4565b60008282111561087357600080fd5b50900390565b61070583838361089d565b60008282018381101561089657600080fd5b9392505050565b60085460405163d4ce141560e01b81526000916001600160a01b03169063d4ce1415906108d290879087908790600401610c9a565b60206040518083038186803b1580156108ea57600080fd5b505afa1580156108fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109229190610c65565b905060ff8116156109ca57600854604051637f4ab1dd60e01b81526001600160a01b0390911690637f4ab1dd9061095d908490600401610ebd565b60006040518083038186803b15801561097557600080fd5b505afa158015610989573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109b19190810190610b6e565b60405162461bcd60e51b81526004016100b29190610ce2565b50505050565b80356001600160a01b038116811461031057600080fd5b60008083601f8401126109f8578182fd5b50813567ffffffffffffffff811115610a0f578182fd5b6020830191508360208083028501011115610a2957600080fd5b9250929050565b600060208284031215610a41578081fd5b61089683836109d0565b600080600080600060808688031215610a62578081fd5b8535610a6d81610ef7565b9450602086013593506040860135610a8481610ef7565b9250606086013567ffffffffffffffff80821115610aa0578283fd5b818801915088601f830112610ab3578283fd5b813581811115610ac1578384fd5b896020828501011115610ad2578384fd5b9699959850939650602001949392505050565b60008060008060408587031215610afa578384fd5b843567ffffffffffffffff80821115610b11578586fd5b610b1d888389016109e7565b90965094506020870135915080821115610b35578384fd5b50610b42878288016109e7565b95989497509550505050565b600060208284031215610b5f578081fd5b81518015158114610896578182fd5b600060208284031215610b7f578081fd5b815167ffffffffffffffff80821115610b96578283fd5b818401915084601f830112610ba9578283fd5b815181811115610bb7578384fd5b604051601f8201601f191681016020018381118282101715610bd7578586fd5b604052818152838201602001871015610bee578485fd5b610bff826020830160208701610ecb565b9695505050505050565b600060208284031215610c1a578081fd5b5035919050565b600060208284031215610c32578081fd5b5051919050565b60008060408385031215610c4b578182fd5b82359150610c5c84602085016109d0565b90509250929050565b600060208284031215610c76578081fd5b815160ff81168114610896578182fd5b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082528251806020840152610d01816040850160208701610ecb565b601f01601f19169190910160400192915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601490820152736661696c6c65642d7472616e7366657246726f6d60601b604082015260600190565b6020808252601490820152730d2dcecc2d8d2c85ac2e4e4c2f25ad8cadccee8d60631b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526011908201527019985b1b189858dacb591a5cd8589b1959607a1b604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252600b908201526a3bb937b73396ba37b5b2b760a91b604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b60ff91909116815260200190565b60005b83811015610ee6578181015183820152602001610ece565b838111156109ca5750506000910152565b6001600160a01b0381168114610f0c57600080fd5b5056fea26469706673582212207f5b0d55adf0fbc619a241b8e331ea3a070ade921ffa76f7266a812e11bcac3c64736f6c634300060c00338be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "deployedBytecode": "0x6080604052600436106100955760003560e01c80638f4ffcb1116100595780638f4ffcb114610182578063b6b55f25146101a2578063c86283c8146101c2578063ce746024146101e2578063f2fde38b14610204576100bb565b80632e1a7d4d146100d35780633354f8a51461010957806336efd16f14610129578063715018a6146101495780638da5cb5b14610160576100bb565b366100bb5760405162461bcd60e51b81526004016100b290610dec565b60405180910390fd5b60405162461bcd60e51b81526004016100b290610dec565b3480156100df57600080fd5b506100f36100ee366004610c09565b610224565b6040516101009190610cd7565b60405180910390f35b34801561011557600080fd5b506100f3610124366004610ae5565b610250565b34801561013557600080fd5b506100f3610144366004610c39565b6102ef565b34801561015557600080fd5b5061015e610316565b005b34801561016c57600080fd5b50610175610395565b6040516101009190610c86565b34801561018e57600080fd5b506100f361019d366004610a4b565b6103a4565b3480156101ae57600080fd5b506100f36101bd366004610c09565b6103e8565b3480156101ce57600080fd5b506100f36101dd366004610c39565b61040c565b3480156101ee57600080fd5b506101f7610429565b6040516101009190610eb4565b34801561021057600080fd5b5061015e61021f366004610a30565b61050a565b60006102376102316105c0565b836105c4565b6102486102426105c0565b83610681565b506001919050565b60008382146102715760405162461bcd60e51b81526004016100b290610d89565b60005b848110156102e35761029f6102876105c0565b87878481811061029357fe5b9050602002013561070a565b6102db8484838181106102ae57fe5b90506020020160208101906102c39190610a30565b8787848181106102cf57fe5b905060200201356107b0565b600101610274565b50600195945050505050565b60006103026102fc6105c0565b8461070a565b61030c82846107b0565b5060015b92915050565b61031e6105c0565b6000546001600160a01b0390811691161461034b5760405162461bcd60e51b81526004016100b290610db7565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6008546000906001600160a01b038581169116146103d45760405162461bcd60e51b81526004016100b290610e58565b6103de868661070a565b6102e386866107b0565b60006103fb6103f56105c0565b8361070a565b6102486104066105c0565b836107b0565b600061041f6104196105c0565b846105c4565b61030c8284610681565b60006104336105c0565b6000546001600160a01b039081169116146104605760405162461bcd60e51b81526004016100b290610db7565b600c546008546040516370a0823160e01b81526000926104f29290916001600160a01b03909116906370a082319061049c903090600401610c86565b60206040518083038186803b1580156104b457600080fd5b505afa1580156104c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ec9190610c21565b90610864565b90506105056104ff610395565b826107b0565b905090565b6105126105c0565b6000546001600160a01b0390811691161461053f5760405162461bcd60e51b81526004016100b290610db7565b6001600160a01b0381166105655760405162461bcd60e51b81526004016100b290610d15565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b0382166105ea5760405162461bcd60e51b81526004016100b290610e17565b6105f682600083610879565b600c546106039082610864565b600c556001600160a01b0382166000908152600d60205260409020546106299082610864565b6001600160a01b0383166000818152600d60205260408082209390935591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610675908590610eb4565b60405180910390a35050565b60085460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906106b39085908590600401610cbe565b602060405180830381600087803b1580156106cd57600080fd5b505af11580156106e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107059190610b4e565b505050565b6008546040516323b872dd60e01b81526001600160a01b03909116906323b872dd9061073e90859030908690600401610c9a565b602060405180830381600087803b15801561075857600080fd5b505af115801561076c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107909190610b4e565b6107ac5760405162461bcd60e51b81526004016100b290610d5b565b5050565b6001600160a01b0382166107d65760405162461bcd60e51b81526004016100b290610e7d565b6107e260008383610879565b600c546107ef9082610884565b600c556001600160a01b0382166000908152600d60205260409020546108159082610884565b6001600160a01b0383166000818152600d60205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610675908590610eb4565b60008282111561087357600080fd5b50900390565b61070583838361089d565b60008282018381101561089657600080fd5b9392505050565b60085460405163d4ce141560e01b81526000916001600160a01b03169063d4ce1415906108d290879087908790600401610c9a565b60206040518083038186803b1580156108ea57600080fd5b505afa1580156108fe573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109229190610c65565b905060ff8116156109ca57600854604051637f4ab1dd60e01b81526001600160a01b0390911690637f4ab1dd9061095d908490600401610ebd565b60006040518083038186803b15801561097557600080fd5b505afa158015610989573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109b19190810190610b6e565b60405162461bcd60e51b81526004016100b29190610ce2565b50505050565b80356001600160a01b038116811461031057600080fd5b60008083601f8401126109f8578182fd5b50813567ffffffffffffffff811115610a0f578182fd5b6020830191508360208083028501011115610a2957600080fd5b9250929050565b600060208284031215610a41578081fd5b61089683836109d0565b600080600080600060808688031215610a62578081fd5b8535610a6d81610ef7565b9450602086013593506040860135610a8481610ef7565b9250606086013567ffffffffffffffff80821115610aa0578283fd5b818801915088601f830112610ab3578283fd5b813581811115610ac1578384fd5b896020828501011115610ad2578384fd5b9699959850939650602001949392505050565b60008060008060408587031215610afa578384fd5b843567ffffffffffffffff80821115610b11578586fd5b610b1d888389016109e7565b90965094506020870135915080821115610b35578384fd5b50610b42878288016109e7565b95989497509550505050565b600060208284031215610b5f578081fd5b81518015158114610896578182fd5b600060208284031215610b7f578081fd5b815167ffffffffffffffff80821115610b96578283fd5b818401915084601f830112610ba9578283fd5b815181811115610bb7578384fd5b604051601f8201601f191681016020018381118282101715610bd7578586fd5b604052818152838201602001871015610bee578485fd5b610bff826020830160208701610ecb565b9695505050505050565b600060208284031215610c1a578081fd5b5035919050565b600060208284031215610c32578081fd5b5051919050565b60008060408385031215610c4b578182fd5b82359150610c5c84602085016109d0565b90509250929050565b600060208284031215610c76578081fd5b815160ff81168114610896578182fd5b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082528251806020840152610d01816040850160208701610ecb565b601f01601f19169190910160400192915050565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601490820152736661696c6c65642d7472616e7366657246726f6d60601b604082015260600190565b6020808252601490820152730d2dcecc2d8d2c85ac2e4e4c2f25ad8cadccee8d60631b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526011908201527019985b1b189858dacb591a5cd8589b1959607a1b604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252600b908201526a3bb937b73396ba37b5b2b760a91b604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b60ff91909116815260200190565b60005b83811015610ee6578181015183820152602001610ece565b838111156109ca5750506000910152565b6001600160a01b0381168114610f0c57600080fd5b5056fea26469706673582212207f5b0d55adf0fbc619a241b8e331ea3a070ade921ffa76f7266a812e11bcac3c64736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "1378:464:22:-:0;;;;;;;;;;;;-1:-1:-1;865:17:83;885:12;:10;:12::i;:::-;907:6;:18;;-1:-1:-1;;;;;;907:18:83;-1:-1:-1;;;;;907:18:83;;;;;;;940:43;;907:18;;-1:-1:-1;907:18:83;-1:-1:-1;;;;;;;;;;;940:43:83;907:6;;940:43;-1:-1:-1;124:19:73;:17;:19::i;:::-;1378:464:22;;590:104:81;677:10;590:104;:::o;1689:145:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;;;;;;;;;1795:1:::1;1779:6:::0;;1758:40:::1;::::0;-1:-1:-1;;;;;1779:6:83;;::::1;::::0;-1:-1:-1;;;;;;;;;;;1758:40:83;1795:1;;1758:40:::1;1825:1;1808:19:::0;;-1:-1:-1;;;;;;1808:19:83::1;::::0;;1689:145::o;346:416:-1:-;546:2;560:47;;;531:18;;;873:19;266:34;913:14;;;246:55;320:12;;;517:245::o;:::-;1378:464:22;;;;;;", - "deployedSourceMap": "1378:464:22:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1876:27:21;;-1:-1:-1;;;1876:27:21;;;;;;;:::i;:::-;;;;;;;;1378:464:22;1953:27:21;;-1:-1:-1;;;1953:27:21;;;;;;;:::i;2642:154::-;;;;;;;;;;-1:-1:-1;2642:154:21;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;2310:329;;;;;;;;;;-1:-1:-1;2310:329:21;;;;;:::i;:::-;;:::i;2142:165::-;;;;;;;;;;-1:-1:-1;2142:165:21;;;;;:::i;:::-;;:::i;1689:145:83:-;;;;;;;;;;;;;:::i;:::-;;1066:77;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;3229:252:21:-;;;;;;;;;;-1:-1:-1;3229:252:21;;;;;:::i;:::-;;:::i;1987:152::-;;;;;;;;;;-1:-1:-1;1987:152:21;;;;;:::i;:::-;;:::i;2799:166::-;;;;;;;;;;-1:-1:-1;2799:166:21;;;;;:::i;:::-;;:::i;2968:187::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;1983:240:83:-;;;;;;;;;;-1:-1:-1;1983:240:83;;;;;:::i;:::-;;:::i;2642:154:21:-;2704:4;2715:27;2721:12;:10;:12::i;:::-;2735:6;2715:5;:27::i;:::-;2746:31;2756:12;:10;:12::i;:::-;2770:6;2746:9;:31::i;:::-;-1:-1:-1;2788:4:21;2642:154;;;:::o;2310:329::-;2419:4;2438:32;;;2430:65;;;;-1:-1:-1;;;2430:65:21;;;;;;;:::i;:::-;2504:6;2499:122;2516:18;;;2499:122;;;2548:34;2557:12;:10;:12::i;:::-;2571:7;;2579:1;2571:10;;;;;;;;;;;;;2548:8;:34::i;:::-;2587:29;2593:7;;2601:1;2593:10;;;;;;;;;;;;;;;;;;;;:::i;:::-;2605:7;;2613:1;2605:10;;;;;;;;;;;;;2587:5;:29::i;:::-;2536:3;;2499:122;;;-1:-1:-1;2631:4:21;;2310:329;-1:-1:-1;;;;;2310:329:21:o;2142:165::-;2222:4;2233:30;2242:12;:10;:12::i;:::-;2256:6;2233:8;:30::i;:::-;2267:21;2273:6;2281;2267:5;:21::i;:::-;-1:-1:-1;2299:4:21;2142:165;;;;;:::o;1689:145:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;1795:1:::1;1779:6:::0;;1758:40:::1;::::0;-1:-1:-1;;;;;1779:6:83;;::::1;::::0;1758:40:::1;::::0;1795:1;;1758:40:::1;1825:1;1808:19:::0;;-1:-1:-1;;;;;;1808:19:83::1;::::0;;1689:145::o;1066:77::-;1104:7;1130:6;-1:-1:-1;;;;;1130:6:83;1066:77;:::o;3229:252:21:-;3381:11;;3345:4;;-1:-1:-1;;;;;3364:29:21;;;3381:11;;3364:29;3356:53;;;;-1:-1:-1;;;3356:53:21;;;;;;;:::i;:::-;3413:24;3422:6;3430;3413:8;:24::i;:::-;3441:21;3447:6;3455;3441:5;:21::i;1987:152::-;2048:4;2059:30;2068:12;:10;:12::i;:::-;2082:6;2059:8;:30::i;:::-;2093:27;2099:12;:10;:12::i;:::-;2113:6;2093:5;:27::i;2799:166::-;2879:4;2890:27;2896:12;:10;:12::i;:::-;2910:6;2890:5;:27::i;:::-;2921:25;2931:6;2939;2921:9;:25::i;2968:187::-;3025:7;1280:12:83;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;3096:13:21::1;::::0;3055:11:::1;::::0;:36:::1;::::0;-1:-1:-1;;;3055:36:21;;3039:13:::1;::::0;3055:55:::1;::::0;3096:13;;-1:-1:-1;;;;;3055:11:21;;::::1;::::0;:21:::1;::::0;:36:::1;::::0;3085:4:::1;::::0;3055:36:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:40:::0;::::1;:55::i;:::-;3039:71;;3114:21;3120:7;:5;:7::i;:::-;3129:5;3114;:21::i;:::-;3146:5:::0;-1:-1:-1;2968:187:21;:::o;1983:240:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;-1:-1:-1;;;;;2071:22:83;::::1;2063:73;;;;-1:-1:-1::0;;;2063:73:83::1;;;;;;;:::i;:::-;2172:6;::::0;;2151:38:::1;::::0;-1:-1:-1;;;;;2151:38:83;;::::1;::::0;2172:6;::::1;::::0;2151:38:::1;::::0;::::1;2199:6;:17:::0;;-1:-1:-1;;;;;;2199:17:83::1;-1:-1:-1::0;;;;;2199:17:83;;;::::1;::::0;;;::::1;::::0;;1983:240::o;590:104:81:-;677:10;590:104;:::o;2688:337:16:-;-1:-1:-1;;;;;2759:21:16;;2751:67;;;;-1:-1:-1;;;2751:67:16;;;;;;;:::i;:::-;2823:49;2844:7;2861:1;2865:6;2823:20;:49::i;:::-;2893:13;;:25;;2911:6;2893:17;:25::i;:::-;2877:13;:41;-1:-1:-1;;;;;2944:19:16;;;;;;:10;:19;;;;;;:31;;2968:6;2944:23;:31::i;:::-;-1:-1:-1;;;;;2922:19:16;;;;;;:10;:19;;;;;;:53;;;;2984:37;;;;;;3014:6;;2984:37;:::i;:::-;;;;;;;;2688:337;;:::o;3640:98:21:-;3702:11;;:32;;-1:-1:-1;;;3702:32:21;;-1:-1:-1;;;;;3702:11:21;;;;:20;;:32;;3723:2;;3727:6;;3702:32;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3640:98;;:::o;3484:153::-;3555:11;;:53;;-1:-1:-1;;;3555:53:21;;-1:-1:-1;;;;;3555:11:21;;;;:24;;:53;;3580:4;;3594;;3601:6;;3555:53;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3547:86;;;;-1:-1:-1;;;3547:86:21;;;;;;;:::i;:::-;3484:153;;:::o;2350:335:16:-;-1:-1:-1;;;;;2421:21:16;;2413:65;;;;-1:-1:-1;;;2413:65:16;;;;;;;:::i;:::-;2483:49;2512:1;2516:7;2525:6;2483:20;:49::i;:::-;2553:13;;:25;;2571:6;2553:17;:25::i;:::-;2537:13;:41;-1:-1:-1;;;;;2604:19:16;;;;;;:10;:19;;;;;;:31;;2628:6;2604:23;:31::i;:::-;-1:-1:-1;;;;;2582:19:16;;;;;;:10;:19;;;;;;:53;;;;2644:37;;2582:19;;;2644:37;;;;2674:6;;2644:37;:::i;470:124:77:-;528:7;555:1;550;:6;;542:15;;;;;;-1:-1:-1;573:5:77;;;470:124::o;1465:199:22:-;1604:56;1643:4;1649:2;1653:6;1604:38;:56::i;227:124:77:-;285:7;311:5;;;328:6;;;;320:15;;;;;;346:1;227:124;-1:-1:-1;;;227:124:77:o;1509:301:17:-;1637:11;;:55;;-1:-1:-1;;;1637:55:17;;1613:21;;-1:-1:-1;;;;;1637:11:17;;:37;;:55;;1675:4;;1681:2;;1685:6;;1637:55;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1613:79;-1:-1:-1;1700:27:17;;;;1696:111;;1743:11;;:58;;-1:-1:-1;;;1743:58:17;;-1:-1:-1;;;;;1743:11:17;;;;:41;;:58;;1785:15;;1743:58;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1743:58:17;;;;;;;;;;;;:::i;:::-;1736:66;;-1:-1:-1;;;1736:66:17;;;;;;;;:::i;1696:111::-;1509:301;;;;:::o;5:130:-1:-;72:20;;-1:-1;;;;;16691:54;;17744:35;;17734:2;;17793:1;;17783:12;160:352;;;290:3;283:4;275:6;271:17;267:27;257:2;;-1:-1;;298:12;257:2;-1:-1;328:20;;368:18;357:30;;354:2;;;-1:-1;;390:12;354:2;434:4;426:6;422:17;410:29;;485:3;434:4;;469:6;465:17;426:6;451:32;;448:41;445:2;;;502:1;;492:12;445:2;250:262;;;;;:::o;2259:241::-;;2363:2;2351:9;2342:7;2338:23;2334:32;2331:2;;;-1:-1;;2369:12;2331:2;2431:53;2476:7;2452:22;2431:53;:::i;2507:741::-;;;;;;2681:3;2669:9;2660:7;2656:23;2652:33;2649:2;;;-1:-1;;2688:12;2649:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;2740:63;-1:-1;2840:2;2879:22;;1911:20;;-1:-1;2948:2;2987:22;;72:20;97:33;72:20;97:33;:::i;:::-;2956:63;-1:-1;3084:2;3069:18;;3056:32;3108:18;3097:30;;;3094:2;;;-1:-1;;3130:12;3094:2;3215:6;3204:9;3200:22;;;1161:3;1154:4;1146:6;1142:17;1138:27;1128:2;;-1:-1;;1169:12;1128:2;1212:6;1199:20;3108:18;1231:6;1228:30;1225:2;;;-1:-1;;1261:12;1225:2;1356:3;2840:2;1336:17;1297:6;1322:32;;1319:41;1316:2;;;-1:-1;;1363:12;1316:2;2643:605;;;;-1:-1;2643:605;;-1:-1;2840:2;1293:17;;3150:82;2643:605;-1:-1;;;2643:605::o;3255:678::-;;;;;3446:2;3434:9;3425:7;3421:23;3417:32;3414:2;;;-1:-1;;3452:12;3414:2;3510:17;3497:31;3548:18;;3540:6;3537:30;3534:2;;;-1:-1;;3570:12;3534:2;3608:80;3680:7;3671:6;3660:9;3656:22;3608:80;:::i;:::-;3590:98;;-1:-1;3590:98;-1:-1;3753:2;3738:18;;3725:32;;-1:-1;3766:30;;;3763:2;;;-1:-1;;3799:12;3763:2;;3837:80;3909:7;3900:6;3889:9;3885:22;3837:80;:::i;:::-;3408:525;;;;-1:-1;3819:98;-1:-1;;;;3408:525::o;3940:257::-;;4052:2;4040:9;4031:7;4027:23;4023:32;4020:2;;;-1:-1;;4058:12;4020:2;979:6;973:13;17890:5;16603:13;16596:21;17868:5;17865:32;17855:2;;-1:-1;;17901:12;4204:362;;4329:2;4317:9;4308:7;4304:23;4300:32;4297:2;;;-1:-1;;4335:12;4297:2;4386:17;4380:24;4424:18;;4416:6;4413:30;4410:2;;;-1:-1;;4446:12;4410:2;4533:6;4522:9;4518:22;;;1505:3;1498:4;1490:6;1486:17;1482:27;1472:2;;-1:-1;;1513:12;1472:2;1553:6;1547:13;4424:18;15945:6;15942:30;15939:2;;;-1:-1;;15975:12;15939:2;15608;15602:9;16048;16029:17;;-1:-1;;16025:33;15634:17;;4329:2;15634:17;15694:34;;;15730:22;;;15691:62;15688:2;;;-1:-1;;15756:12;15688:2;15608;15775:22;1646:21;;;1746:16;;;4329:2;1746:16;1743:25;-1:-1;1740:2;;;-1:-1;;1771:12;1740:2;1791:39;1823:6;4329:2;1722:5;1718:16;4329:2;1688:6;1684:17;1791:39;:::i;:::-;4466:84;4291:275;-1:-1;;;;;;4291:275::o;4573:241::-;;4677:2;4665:9;4656:7;4652:23;4648:32;4645:2;;;-1:-1;;4683:12;4645:2;-1:-1;1911:20;;4639:175;-1:-1;4639:175::o;4821:263::-;;4936:2;4924:9;4915:7;4911:23;4907:32;4904:2;;;-1:-1;;4942:12;4904:2;-1:-1;2059:13;;4898:186;-1:-1;4898:186::o;5091:366::-;;;5212:2;5200:9;5191:7;5187:23;5183:32;5180:2;;;-1:-1;;5218:12;5180:2;1924:6;1911:20;5270:63;;5388:53;5433:7;5370:2;5413:9;5409:22;5388:53;:::i;:::-;5378:63;;5174:283;;;;;:::o;5464:259::-;;5577:2;5565:9;5556:7;5552:23;5548:32;5545:2;;;-1:-1;;5583:12;5545:2;2204:6;2198:13;16907:4;18134:5;16896:16;18111:5;18108:33;18098:2;;-1:-1;;18145:12;9446:222;-1:-1;;;;;16691:54;;;;5950:37;;9573:2;9558:18;;9544:124::o;9920:460::-;-1:-1;;;;;16691:54;;;5950:37;;16691:54;;;;10283:2;10268:18;;5809:58;10366:2;10351:18;;9283:37;;;;10111:2;10096:18;;10082:298::o;10838:333::-;-1:-1;;;;;16691:54;;;;5950:37;;11157:2;11142:18;;9283:37;10993:2;10978:18;;10964:207::o;11178:210::-;16603:13;;16596:21;6064:34;;11299:2;11284:18;;11270:118::o;11395:310::-;;11542:2;11563:17;11556:47;6255:5;16226:12;16383:6;11542:2;11531:9;11527:18;16371:19;6349:52;6394:6;16411:14;11531:9;16411:14;11542:2;6375:5;6371:16;6349:52;:::i;:::-;16048:9;17648:14;-1:-1;;17644:28;6413:39;;;;16411:14;6413:39;;11513:192;-1:-1;;11513:192::o;11712:416::-;11912:2;11926:47;;;6689:2;11897:18;;;16371:19;6725:34;16411:14;;;6705:55;-1:-1;;;6780:12;;;6773:30;6822:12;;;11883:245::o;12135:416::-;12335:2;12349:47;;;7073:2;12320:18;;;16371:19;-1:-1;;;16411:14;;;7089:43;7151:12;;;12306:245::o;12558:416::-;12758:2;12772:47;;;7402:2;12743:18;;;16371:19;-1:-1;;;16411:14;;;7418:43;7480:12;;;12729:245::o;12981:416::-;13181:2;13195:47;;;13166:18;;;16371:19;7767:34;16411:14;;;7747:55;7821:12;;;13152:245::o;13404:416::-;13604:2;13618:47;;;8072:2;13589:18;;;16371:19;-1:-1;;;16411:14;;;8088:40;8147:12;;;13575:245::o;13827:416::-;14027:2;14041:47;;;8398:2;14012:18;;;16371:19;8434:34;16411:14;;;8414:55;-1:-1;;;8489:12;;;8482:25;8526:12;;;13998:245::o;14250:416::-;14450:2;14464:47;;;8777:2;14435:18;;;16371:19;-1:-1;;;16411:14;;;8793:34;8846:12;;;14421:245::o;14673:416::-;14873:2;14887:47;;;9097:2;14858:18;;;16371:19;9133:33;16411:14;;;9113:54;9186:12;;;14844:245::o;15096:222::-;9283:37;;;15223:2;15208:18;;15194:124::o;15325:214::-;16907:4;16896:16;;;;9399:35;;15448:2;15433:18;;15419:120::o;17304:268::-;17369:1;17376:101;17390:6;17387:1;17384:13;17376:101;;;17457:11;;;17451:18;17438:11;;;17431:39;17412:2;17405:10;17376:101;;;17492:6;17489:1;17486:13;17483:2;;;-1:-1;;17369:1;17539:16;;17532:27;17353:219::o;17685:117::-;-1:-1;;;;;16691:54;;17744:35;;17734:2;;17793:1;;17783:12;17734:2;17728:74;:::o", - "source": "// SPDX-License-Identifier: Apache-2.0\n\n/******************************************************************************\n * Copyright 2020 IEXEC BLOCKCHAIN TECH *\n * *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); *\n * you may not use this file except in compliance with the License. *\n * You may obtain a copy of the License at *\n * *\n * http://www.apache.org/licenses/LICENSE-2.0 *\n * *\n * Unless required by applicable law or agreed to in writing, software *\n * distributed under the License is distributed on an \"AS IS\" BASIS, *\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *\n * See the License for the specific language governing permissions and *\n * limitations under the License. *\n ******************************************************************************/\n\npragma solidity ^0.6.0;\npragma experimental ABIEncoderV2;\n\nimport \"./IexecEscrowTokenDelegate.sol\";\nimport \"./IexecERC20CoreKYC.sol\";\n\n\ncontract IexecEscrowTokenDelegateKYC is IexecEscrowTokenDelegate, IexecERC20CoreKYC\n{\n\tfunction _beforeTokenTransfer(address from, address to, uint256 amount)\n\tinternal virtual override(IexecERC20Core, IexecERC20CoreKYC)\n\t{\n\t\tIexecERC20CoreKYC._beforeTokenTransfer(from, to, amount);\n\t}\n\n\tfunction _isAuthorized(address account)\n\tinternal virtual override(IexecERC20Core, IexecERC20CoreKYC) returns (bool)\n\t{\n\t\treturn IexecERC20CoreKYC._isAuthorized(account);\n\t}\n}\n", - "sourcePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecEscrowTokenDelegateKYC.sol", - "ast": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecEscrowTokenDelegateKYC.sol", - "exportedSymbols": { - "IexecEscrowTokenDelegateKYC": [ - 3832 - ] - }, - "id": 3833, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3787, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:22" - }, - { - "id": 3788, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "1266:33:22" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecEscrowTokenDelegate.sol", - "file": "./IexecEscrowTokenDelegate.sol", - "id": 3789, - "nodeType": "ImportDirective", - "scope": 3833, - "sourceUnit": 3786, - "src": "1301:40:22", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol", - "file": "./IexecERC20CoreKYC.sol", - "id": 3790, - "nodeType": "ImportDirective", - "scope": 3833, - "sourceUnit": 2996, - "src": "1342:33:22", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3791, - "name": "IexecEscrowTokenDelegate", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3785, - "src": "1418:24:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecEscrowTokenDelegate_$3785", - "typeString": "contract IexecEscrowTokenDelegate" - } - }, - "id": 3792, - "nodeType": "InheritanceSpecifier", - "src": "1418:24:22" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3793, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1444:17:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - }, - "id": 3794, - "nodeType": "InheritanceSpecifier", - "src": "1444:17:22" - } - ], - "contractDependencies": [ - 309, - 1658, - 2939, - 2995, - 3785, - 9399, - 9972, - 13161, - 13173, - 13740, - 14132 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 3832, - "linearizedBaseContracts": [ - 3832, - 2995, - 3785, - 2939, - 1658, - 13161, - 309, - 13173, - 14132, - 13740, - 9972, - 9399 - ], - "name": "IexecEscrowTokenDelegateKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "baseFunctions": [ - 2473, - 2994 - ], - "body": { - "id": 3814, - "nodeType": "Block", - "src": "1600:64:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3809, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3796, - "src": "1643:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3810, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3798, - "src": "1649:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3811, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3800, - "src": "1653:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3806, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1604:17:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 3808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_beforeTokenTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2994, - "src": "1604:38:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1604:56:22", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3813, - "nodeType": "ExpressionStatement", - "src": "1604:56:22" - } - ] - }, - "documentation": null, - "id": 3815, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 3804, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 3802, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1564:14:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 3803, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1580:17:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1555:43:22" - }, - "parameters": { - "id": 3801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3796, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3815, - "src": "1495:12:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3795, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1495:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3798, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3815, - "src": "1509:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3797, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1509:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3800, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3815, - "src": "1521:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3799, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1521:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1494:42:22" - }, - "returnParameters": { - "id": 3805, - "nodeType": "ParameterList", - "parameters": [], - "src": "1600:0:22" - }, - "scope": 3832, - "src": "1465:199:22", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "baseFunctions": [ - 2463, - 2959 - ], - "body": { - "id": 3830, - "nodeType": "Block", - "src": "1785:55:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3827, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3817, - "src": "1828:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3825, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1796:17:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 3826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_isAuthorized", - "nodeType": "MemberAccess", - "referencedDeclaration": 2959, - "src": "1796:31:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", - "typeString": "function (address) returns (bool)" - } - }, - "id": 3828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1796:40:22", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3824, - "id": 3829, - "nodeType": "Return", - "src": "1789:47:22" - } - ] - }, - "documentation": null, - "id": 3831, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_isAuthorized", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 3821, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 3819, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1734:14:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 3820, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1750:17:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1725:43:22" - }, - "parameters": { - "id": 3818, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3817, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3831, - "src": "1690:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3816, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1690:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1689:17:22" - }, - "returnParameters": { - "id": 3824, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3823, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3831, - "src": "1778:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3822, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1778:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1777:6:22" - }, - "scope": 3832, - "src": "1667:173:22", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 3833, - "src": "1378:464:22" - } - ], - "src": "1242:601:22" - }, - "legacyAST": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecEscrowTokenDelegateKYC.sol", - "exportedSymbols": { - "IexecEscrowTokenDelegateKYC": [ - 3832 - ] - }, - "id": 3833, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 3787, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:22" - }, - { - "id": 3788, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "1266:33:22" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecEscrowTokenDelegate.sol", - "file": "./IexecEscrowTokenDelegate.sol", - "id": 3789, - "nodeType": "ImportDirective", - "scope": 3833, - "sourceUnit": 3786, - "src": "1301:40:22", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol", - "file": "./IexecERC20CoreKYC.sol", - "id": 3790, - "nodeType": "ImportDirective", - "scope": 3833, - "sourceUnit": 2996, - "src": "1342:33:22", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3791, - "name": "IexecEscrowTokenDelegate", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 3785, - "src": "1418:24:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecEscrowTokenDelegate_$3785", - "typeString": "contract IexecEscrowTokenDelegate" - } - }, - "id": 3792, - "nodeType": "InheritanceSpecifier", - "src": "1418:24:22" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 3793, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1444:17:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - }, - "id": 3794, - "nodeType": "InheritanceSpecifier", - "src": "1444:17:22" - } - ], - "contractDependencies": [ - 309, - 1658, - 2939, - 2995, - 3785, - 9399, - 9972, - 13161, - 13173, - 13740, - 14132 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 3832, - "linearizedBaseContracts": [ - 3832, - 2995, - 3785, - 2939, - 1658, - 13161, - 309, - 13173, - 14132, - 13740, - 9972, - 9399 - ], - "name": "IexecEscrowTokenDelegateKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "baseFunctions": [ - 2473, - 2994 - ], - "body": { - "id": 3814, - "nodeType": "Block", - "src": "1600:64:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3809, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3796, - "src": "1643:4:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3810, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3798, - "src": "1649:2:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 3811, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3800, - "src": "1653:6:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 3806, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1604:17:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 3808, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_beforeTokenTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2994, - "src": "1604:38:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 3812, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1604:56:22", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 3813, - "nodeType": "ExpressionStatement", - "src": "1604:56:22" - } - ] - }, - "documentation": null, - "id": 3815, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 3804, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 3802, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1564:14:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 3803, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1580:17:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1555:43:22" - }, - "parameters": { - "id": 3801, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3796, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3815, - "src": "1495:12:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3795, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1495:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3798, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3815, - "src": "1509:10:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3797, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1509:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 3800, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3815, - "src": "1521:14:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 3799, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1521:7:22", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1494:42:22" - }, - "returnParameters": { - "id": 3805, - "nodeType": "ParameterList", - "parameters": [], - "src": "1600:0:22" - }, - "scope": 3832, - "src": "1465:199:22", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "baseFunctions": [ - 2463, - 2959 - ], - "body": { - "id": 3830, - "nodeType": "Block", - "src": "1785:55:22", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 3827, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3817, - "src": "1828:7:22", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 3825, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1796:17:22", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 3826, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_isAuthorized", - "nodeType": "MemberAccess", - "referencedDeclaration": 2959, - "src": "1796:31:22", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", - "typeString": "function (address) returns (bool)" - } - }, - "id": 3828, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1796:40:22", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 3824, - "id": 3829, - "nodeType": "Return", - "src": "1789:47:22" - } - ] - }, - "documentation": null, - "id": 3831, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_isAuthorized", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 3821, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 3819, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1734:14:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 3820, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1750:17:22", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1725:43:22" - }, - "parameters": { - "id": 3818, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3817, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3831, - "src": "1690:15:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 3816, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1690:7:22", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1689:17:22" - }, - "returnParameters": { - "id": 3824, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 3823, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 3831, - "src": "1778:4:22", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 3822, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1778:4:22", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1777:6:22" - }, - "scope": 3832, - "src": "1667:173:22", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 3833, - "src": "1378:464:22" - } - ], - "src": "1242:601:22" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.2.2", - "updatedAt": "2020-11-09T09:15:00.586Z", - "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/IexecPoco1DelegateKYC.json b/build/contracts/IexecPoco1DelegateKYC.json deleted file mode 100644 index 72f920d3c..000000000 --- a/build/contracts/IexecPoco1DelegateKYC.json +++ /dev/null @@ -1,1827 +0,0 @@ -{ - "contractName": "IexecPoco1DelegateKYC", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "dealid", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "appHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "datasetHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "workerpoolHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "requestHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "volume", - "type": "uint256" - } - ], - "name": "OrdersMatched", - "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": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "workerpool", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "dealid", - "type": "bytes32" - } - ], - "name": "SchedulerNotice", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "type": "event" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "app", - "type": "address" - }, - { - "internalType": "uint256", - "name": "appprice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "volume", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tag", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "datasetrestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "workerpoolrestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "requesterrestrict", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "sign", - "type": "bytes" - } - ], - "internalType": "struct IexecLibOrders_v5.AppOrder", - "name": "_apporder", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "dataset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "datasetprice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "volume", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tag", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "apprestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "workerpoolrestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "requesterrestrict", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "sign", - "type": "bytes" - } - ], - "internalType": "struct IexecLibOrders_v5.DatasetOrder", - "name": "_datasetorder", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "workerpool", - "type": "address" - }, - { - "internalType": "uint256", - "name": "workerpoolprice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "volume", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tag", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "category", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "trust", - "type": "uint256" - }, - { - "internalType": "address", - "name": "apprestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "datasetrestrict", - "type": "address" - }, - { - "internalType": "address", - "name": "requesterrestrict", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "sign", - "type": "bytes" - } - ], - "internalType": "struct IexecLibOrders_v5.WorkerpoolOrder", - "name": "_workerpoolorder", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "address", - "name": "app", - "type": "address" - }, - { - "internalType": "uint256", - "name": "appmaxprice", - "type": "uint256" - }, - { - "internalType": "address", - "name": "dataset", - "type": "address" - }, - { - "internalType": "uint256", - "name": "datasetmaxprice", - "type": "uint256" - }, - { - "internalType": "address", - "name": "workerpool", - "type": "address" - }, - { - "internalType": "uint256", - "name": "workerpoolmaxprice", - "type": "uint256" - }, - { - "internalType": "address", - "name": "requester", - "type": "address" - }, - { - "internalType": "uint256", - "name": "volume", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "tag", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "category", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "trust", - "type": "uint256" - }, - { - "internalType": "address", - "name": "beneficiary", - "type": "address" - }, - { - "internalType": "address", - "name": "callback", - "type": "address" - }, - { - "internalType": "string", - "name": "params", - "type": "string" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "sign", - "type": "bytes" - } - ], - "internalType": "struct IexecLibOrders_v5.RequestOrder", - "name": "_requestorder", - "type": "tuple" - } - ], - "name": "matchOrders", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "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": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_identity", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_hash", - "type": "bytes32" - } - ], - "name": "verifyPresignature", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_identity", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_hash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_signature", - "type": "bytes" - } - ], - "name": "verifyPresignatureOrSignature", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_identity", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_hash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_signature", - "type": "bytes" - } - ], - "name": "verifySignature", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"dealid\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"appHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"datasetHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"workerpoolHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"requestHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"volume\",\"type\":\"uint256\"}],\"name\":\"OrdersMatched\",\"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\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"ref\",\"type\":\"bytes32\"}],\"name\":\"Reward\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"workerpool\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"dealid\",\"type\":\"bytes32\"}],\"name\":\"SchedulerNotice\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"ref\",\"type\":\"bytes32\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"appprice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"volume\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"tag\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"datasetrestrict\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"workerpoolrestrict\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterrestrict\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sign\",\"type\":\"bytes\"}],\"internalType\":\"struct IexecLibOrders_v5.AppOrder\",\"name\":\"_apporder\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"dataset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"datasetprice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"volume\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"tag\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"apprestrict\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"workerpoolrestrict\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterrestrict\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sign\",\"type\":\"bytes\"}],\"internalType\":\"struct IexecLibOrders_v5.DatasetOrder\",\"name\":\"_datasetorder\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"workerpool\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"workerpoolprice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"volume\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"tag\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"category\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"trust\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"apprestrict\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"datasetrestrict\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterrestrict\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sign\",\"type\":\"bytes\"}],\"internalType\":\"struct IexecLibOrders_v5.WorkerpoolOrder\",\"name\":\"_workerpoolorder\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"app\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"appmaxprice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"dataset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"datasetmaxprice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"workerpool\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"workerpoolmaxprice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"requester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"volume\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"tag\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"category\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"trust\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"callback\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"params\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sign\",\"type\":\"bytes\"}],\"internalType\":\"struct IexecLibOrders_v5.RequestOrder\",\"name\":\"_requestorder\",\"type\":\"tuple\"}],\"name\":\"matchOrders\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"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\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_identity\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"verifyPresignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_identity\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_signature\",\"type\":\"bytes\"}],\"name\":\"verifyPresignatureOrSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_identity\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_signature\",\"type\":\"bytes\"}],\"name\":\"verifySignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco1DelegateKYC.sol\":\"IexecPoco1DelegateKYC\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/Store.sol\":{\"keccak256\":\"0xbc74ce351bc304d65cc20a95bad8290711ac47267b7cfff5500cdeff42b1a18b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f92ebcd5817a7d6f20ef48662f985e9bdb8a68f3752249a14a1a4cbb8b99f190\",\"dweb:/ipfs/QmZAph8GSDPRkXxNUsQpGCXDsmMSGo6Pr5HFg2f4ZXgRZc\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC1404.sol\":{\"keccak256\":\"0xec243d84d26dd07f7a93a6f0665d56d60d20b139bf7f201a502a438ac95ac771\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://75cd876336f5cb77d0492f2082912fa42b526cf00820f1f0a0e8be012d402360\",\"dweb:/ipfs/QmZWgMF27i1JfGbgc7FTny9YkoFWDXiYh9gjpfXnHVLWy8\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC20KYC.sol\":{\"keccak256\":\"0xc2aa3e67c31421ad6f43594875c1d5c5a62366d19ef22485d4764a9c2e53ab7c\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f15679680aa5a9590707ab921d90569eb7e30a3c8340a4d9d0bef3ac5375d56b\",\"dweb:/ipfs/QmWZovmERYpAu3FKW7Ea3gZZeangFyGpkpgcLEggbkqhdM\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC677.sol\":{\"keccak256\":\"0x2fc0f8ca46db18638bd9daed90a3e6bd90fec77ef4c899b7aa1b28010355d096\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c213b13843b23ba7b755ad821c07b77cfacafddc5348a2191c164300344818ce\",\"dweb:/ipfs/QmSruFZbrEuzJFmRbbzZL3GehKpqEm6RfVGcuZZGwBedsp\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/libs/IexecLibCore_v5.sol\":{\"keccak256\":\"0x7fab9c16493884c64cdd31627c5d71389de785becf611b738343d75f7495471d\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://3e243796363e7d4cd249b432a2511cdb49759ed7d2e8bd73817f09ff60ff919c\",\"dweb:/ipfs/Qmeat95AtRviDFcJ3W3aBZmH51aHReX9RLnPZ3Gof3FnzW\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/libs/IexecLibOrders_v5.sol\":{\"keccak256\":\"0x430eaa82ce8d43771c8a84af5113e31de79490d5b9d561ef90034bdc5a2a993b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://65cb57ac25afa5b6e0811290866aace3b013fe67aa82c5e72b6bb00d50e9f28a\",\"dweb:/ipfs/QmTTNTASsnM8db9vTjkbxz5kiNtqVxNrjwxkvVEmoHuMj9\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/DelegateBase.sol\":{\"keccak256\":\"0xb59c042fe327f79a7c13fca4f0512c643545b51045a07517723dd1104fcb68f1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://42231705416aaefd95467b78933eb5dc4c71d5f0eebd3628f60cb2388109e4ec\",\"dweb:/ipfs/QmU7Eeejx7tGcAP14D1XinQgt4Mjfo2a3Ur7cipLPzjPqx\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20Core.sol\":{\"keccak256\":\"0x28db238625e52e31aa9d602612e6874d2a1f8091063dd04e8cd7870642af3d54\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e6e5db14c0e38900a3f92476f45c608b143fd83fa48fffe82bd03bd4a28a1bc6\",\"dweb:/ipfs/QmecHBiCZgekCafN6BnopvRuiiZ9GjRn6PeM6x7PHkUHLZ\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol\":{\"keccak256\":\"0x74e0cfc2f63fec8064535691819308cc537140ba22494d64bfd4bb748d9c0f74\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://93c10dce05b3e05084715c3660b61a5e9b7e21db85da2899cfcac9a7f03df7ff\",\"dweb:/ipfs/QmNoHo5uPYPqusH7cki6j2afHbCE1zWovU8V1QzTpCKwi6\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco1Delegate.sol\":{\"keccak256\":\"0x2d3d1e57b932c7ac0961d7f29d64b346a7fb486f1e72a23522694b85d0304e29\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://ac44460683b8c0e6b8a35ced467ff22c492261973937c2de6b62777966729e27\",\"dweb:/ipfs/QmbiaSsY5AJWwjg8xUEVzdfUBAMYxpJVJZbspXYE14dQxU\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco1DelegateKYC.sol\":{\"keccak256\":\"0x95779d25bb790fa7632c1e8f958898d9a79097ce45f5de6d82ad95f96ad5f2ad\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://ad6097266feca890e63804d0db1a90fe281bc8cf7dc9fb79ba5ab2050a726d9f\",\"dweb:/ipfs/QmNpwCnjEkM3yMoJUz8CQFKWyrisQ4jtavv8HecuJY2xwZ\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/SignatureVerifier.sol\":{\"keccak256\":\"0xba769d239982db0002541e750395aaceda605036bc1a7a1bb9982780c3cc206d\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://d7404ee2d2a812df8af1b31efa41c40a4576fb361beccd044320a8bd3fe778e6\",\"dweb:/ipfs/QmaxWP1sWGHahrUBdfvrvTJJAuyoWoGRQ1Pz68qAJhLzZw\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/interfaces/IexecPoco1.sol\":{\"keccak256\":\"0xbf0048c4a61d82d5dc6fec0f1b34616cc8c4d3cc8288ec74cfd22f504726738d\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://9263644264f543404472038bfe527494859ca63788ad26b7266353c91da73e07\",\"dweb:/ipfs/QmW7fuTjbq6zUk2cgLKwHrAQangKirC2wbLwQCbj52UdJw\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/IRegistry.sol\":{\"keccak256\":\"0xc735f7764e312ea161551bc1a2749820928b1bf80c4aeb2f528a2f4a498078cd\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://7dbefb9d9bec9b56f694d2ee6dc0a44b341c027c0d392534b457867208f019b9\",\"dweb:/ipfs/QmSiSkhgUcAGscopDoRtGnHiWAbxNwBf9ZV8nnVYoWqZ8Z\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/Registry.sol\":{\"keccak256\":\"0x18bdeaad129f5034937fb69a7afbd68ffba8341172a7a124d6be22d6cd2cc5ad\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e77b038842b0c19eb8cb2bac495025ec2fe074472370708cc0b6b6a9e6e5275c\",\"dweb:/ipfs/QmNPUSUBUPezTebKA3VzRu8u5KKuYiKGP1m3yME2J6YnSc\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/RegistryEntry.sol\":{\"keccak256\":\"0xc5e7a46311946df50486dd451f456aee0abe92184dbc31e3a40fc9198f8f6582\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://24f058496713a743781c3353477a03255cdce4cfca845883d207a62346c5c684\",\"dweb:/ipfs/QmVVrLgcoAetTY7EsL3fWfC7VuqKzh1ncVF8spkEkgPQot\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/apps/App.sol\":{\"keccak256\":\"0x1408d4f83f2c512ce71a680975d480fffb5ff417b2ecc37de45076e8d8f43d1a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e817bcc02c7e8547179b0293ed61b4066a04ab3e2b7cda6db90b41e42cabcecc\",\"dweb:/ipfs/QmVPJzM6SXg4ngSSHi2kioQ2htbJPUta5ZMyrgMnAGmrW6\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/datasets/Dataset.sol\":{\"keccak256\":\"0xf58ec4bed61a76b9d557e7b1f486fced23cb4dfc5047fc93ba6b4684c1624c2a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://530858af626fb5598eb9c973b9d3a0c2c1d431b43ca9e7c49143ab5edf619d67\",\"dweb:/ipfs/QmRkksj1gDnz1kcB6JFKuBKXD3mq52SsjuPN5SMUqSK46u\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/workerpools/Workerpool.sol\":{\"keccak256\":\"0x5604f1f935ea198caa899dfd96af42f9f2280954c9798caa58e9cf198b8d492e\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://10fabd01e983ad441a08c57ff78451237c0d350ba7e0cab42a7dccbf784209bd\",\"dweb:/ipfs/Qmbt3eiERXv3QUHHJAFKwfgrCNz6ZcA1ccUWtztLFiv9Av\"]},\"@iexec/interface/contracts/IexecClerk.sol\":{\"keccak256\":\"0x703252a638a5a7e2b600395fd920712a1ac259018bc9578fe581a77fa2f008a9\",\"urls\":[\"bzz-raw://072b9e948e5ac4a7f60466c23b322ea0f1aca711f1a94616e658600c2a4c36a2\",\"dweb:/ipfs/QmRP57bkhWDr5BeawfjiKsbdwFiHnw6nc6zgiEad3hQoSJ\"]},\"@iexec/interface/contracts/IexecHub.sol\":{\"keccak256\":\"0x8e293b7624550823838ed9113400544c5980afac1043ddacad7a862c91b0840d\",\"urls\":[\"bzz-raw://ae34ebc355838595ee69b24a31e60deb186455cc388c88de7ecd0294c7037075\",\"dweb:/ipfs/QmUYVQJBWG7ohAYksJRDJKcJVyPMXNFJSPWMAuQcGfWHo7\"]},\"@iexec/interface/contracts/IexecRegistries.sol\":{\"keccak256\":\"0xb39eef47d62d8751c5adfeaf169ce57b50c480788be8356289bc28b78bc24fde\",\"urls\":[\"bzz-raw://a86593f1ef9953ac0965aab4e764374580a899a7f7871ad66b432523171063a1\",\"dweb:/ipfs/QmcYZhHD45APoS1Ebi416DhXU3fiCzoFW2WSMux4AxhFqk\"]},\"@iexec/interface/contracts/libs/IexecODBLibCore.sol\":{\"keccak256\":\"0x3fc7ff4152e9a8f9747d42e262c15c3d460d409732711d9e1da8a88163880183\",\"urls\":[\"bzz-raw://8bacc98b866852e9f1e3563948381cba142ab61d6b1a7c62fbc53b7d57aa0589\",\"dweb:/ipfs/QmUNjhjBxdtHQFWQ61CgnPoaAzL767tQSKF6x34VFWeRyF\"]},\"@iexec/interface/contracts/libs/IexecODBLibOrders.sol\":{\"keccak256\":\"0xe2848a685785b09dc9ee5a6e6329a417eaf18e520388e8575d45a5376b1d62ca\",\"urls\":[\"bzz-raw://d1385ab26f382baa7aadb80faed54290296be09eeccbee1193a1b8a53b0b15d5\",\"dweb:/ipfs/QmUQTFcGX5VZiYwHKu9Yjc4PHNrMgdAyKwKi6tFEMsbaJk\"]},\"@iexec/solidity/contracts/ENStools/ENSReverseRegistration.sol\":{\"keccak256\":\"0xd1e5b9222925769b40cbf20a4b96d9d3fa462cca6e40d0d9021033ebb0a7d584\",\"urls\":[\"bzz-raw://0e47b7621c8f6cee3c5900f0545cb563fa763712cf235d320fd88d0857699ed1\",\"dweb:/ipfs/QmS18tjVQ6oxc7MHUK5DKLrRSX1v7N4e5Pc6xKjJCNcFv3\"]},\"@iexec/solidity/contracts/ENStools/IENS.sol\":{\"keccak256\":\"0xb109a681632d71269ed4efbe11fc9d1bcee6bc29109f2fb8ced6951dafc28302\",\"urls\":[\"bzz-raw://920ee6b3712ebe1cb28977abf4ded033067305d786116f94777ab03a6b6b9ee9\",\"dweb:/ipfs/QmWFCBtMLUZYJ2cxzHBjHq5WZC8Yydnbk6dezoXHT4Pxgz\"]},\"@iexec/solidity/contracts/ENStools/IReverseRegistrar.sol\":{\"keccak256\":\"0xff985fd263e59bd387e543cd5cf99235ab6e066b6d1be95e79108dacc749673f\",\"urls\":[\"bzz-raw://98a054bc372f5fd6c80793d32a74f3387d562ed6b3e17388b5f8f4b6bc96a62c\",\"dweb:/ipfs/QmQtkE8u6h7zrBrdfEez6STf18766AFP5kK8hGL4SNoWuP\"]},\"@iexec/solidity/contracts/ERC1271/IERC1271.sol\":{\"keccak256\":\"0x5aacf5aa4d2f95e60146bc396f5ca94df0f224c1361bef93488e587bcefad1b3\",\"urls\":[\"bzz-raw://bcd2ab979ce9ebba488df57671a2e7cf8b169ba55a58503930bbf876ece99639\",\"dweb:/ipfs/QmYTS8gpAAWBPQ2Eazw9Ro74PmQGFwjaa3T6uAn5XCktQG\"]},\"@iexec/solidity/contracts/ERC1538/ERC1538Module.sol\":{\"keccak256\":\"0xb1e1ff5fcce00614303b0bb01c595a7d2f3496ae88bc2068e56ba9cd72ec8921\",\"urls\":[\"bzz-raw://a6b87d03a17727ce6fe6c5b0078a198898153ae8230345468479a9aa4560835d\",\"dweb:/ipfs/QmV4T7Wg8TS3uAVhnqMhqD6yZ7Qv8iouYnYrkTSCJirG2P\"]},\"@iexec/solidity/contracts/ERC1538/ERC1538Store.sol\":{\"keccak256\":\"0x4d1e8821dc216013f20044bbf82df3c2ab2c739d1b2ce4d90c15cb65f85707d8\",\"urls\":[\"bzz-raw://e36d4db70862f87b8657c19330f0d45e8e7018ebcf3df97525638c8caa919d2b\",\"dweb:/ipfs/QmZqsrXPsyRkRkjuupKG2SYsyUTBXqe7nkkCy7RKxDKz1L\"]},\"@iexec/solidity/contracts/ERC1654/IERC1654.sol\":{\"keccak256\":\"0x7898850b7046bdfa2abccfe5c1dfc431cbb95c2814e5074cabeb462a32486fa6\",\"urls\":[\"bzz-raw://24fd636386fcd52ce7d0037806c56dd1227dffb8cb28fd29cd7eb39153176dd4\",\"dweb:/ipfs/QmNvwBKUJa8AaMKYmxrny2wRSENgiztbvRHPrbYR5yjKZK\"]},\"@iexec/solidity/contracts/ERC734/IERC734.sol\":{\"keccak256\":\"0x8c90e6571af80f3ccb1e04469cef3a5ac6d7ee02f61c8643bdceb5b8a141da62\",\"urls\":[\"bzz-raw://2402fc97239c6fd515910d4a6c367cabd24abcdc1c54c3090e64cdbaa9deb948\",\"dweb:/ipfs/Qma7jLg9bqkT8QeftRHgftGMZvSjqmsSoQZmWLhnwc2shy\"]},\"@iexec/solidity/contracts/Libs/SafeMathExtended.sol\":{\"keccak256\":\"0xf2802ae591eb22954d9c8e02658ae7577940890aff8d8927a7255e254fed605b\",\"urls\":[\"bzz-raw://8dcc485d21a3aa3f643768d4ac4fc69697b9b37f8fb779f3998ab4cee143fa66\",\"dweb:/ipfs/QmWdwgKPMoWuidYQp6WFsJBhNbJUwFHNE9YPYQZhBsKj7e\"]},\"@iexec/solidity/contracts/Upgradeability/BaseUpgradeabilityProxy.sol\":{\"keccak256\":\"0x47ec56a1226ecf04d49aa82f768814923c1957b69f7fc9e7e470885c75b5a2c6\",\"urls\":[\"bzz-raw://4eae82be03a247a27a2948ed12d5a826dea977f4b5528830c19d9cf4c23dcd53\",\"dweb:/ipfs/Qmb9HtnohAMvjb7vYnXaT3AnQd9p9sLsThnyLnXVzz1umq\"]},\"@iexec/solidity/contracts/Upgradeability/InitializableUpgradeabilityProxy.sol\":{\"keccak256\":\"0xe1bf07e5d913bd04484305a3fb0cc576f6b5d8e4fc0406bf7c9a8b6b2ed766e5\",\"urls\":[\"bzz-raw://b42f6dff696ceadeb44a02aae3049e603984c18af8d94f33fb6544a8b279179c\",\"dweb:/ipfs/QmRWTaRHCGZhKZFKrVAJwXukXiCZcezrVhJJ28H2qBbai7\"]},\"@iexec/solidity/contracts/Upgradeability/Proxy.sol\":{\"keccak256\":\"0xd89f285d80cfeff0efc87f11dbc024a587da3bba142a06695cbac7e4050e9302\",\"urls\":[\"bzz-raw://9c8323ec7efc9fde6c1529f1070c3f3406adb5f8836b17221530d8f0110fe3f4\",\"dweb:/ipfs/QmURRsX9L2gZ83aMULtY1EuRMJExHhFYErCbkxE5CNkAzE\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0xdb26cbf4d028490f49831a7865c2fe1b28db44b535ca8d343785a3b768aae183\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://840b14ce0315c47d49ba328f1f9fa7654ded1c9e1559e6c5e777a7b2dc28bf0a\",\"dweb:/ipfs/QmTLLabn4wcfGro9LEmUXUN2nwKqZSotXMvjDCLXEnLtZP\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x4bd6402ca6b3419008c2b482aff54e66836e8cb4eba2680e42ac5884ae6424fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f9f711fb8d0d92aeea1c327e3845d13ca1fa8f142e47f8723cd5b3106fb29a3\",\"dweb:/ipfs/QmVQUReDW9f4zGqhizwHnyU8EntMs95tbASdqkGncnikba\"]},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"keccak256\":\"0xb046d18f9d09683ca1c0ed6d80c61da8a8a7d9b30bad70a17b898538683eff74\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4728713afa6ae36cc9e92c7107c796a313add3ec20f813be2cde76c814486b2a\",\"dweb:/ipfs/QmUJBTXvYaGDF5PVnd5pUvYerc9DRXvqANDzgCzAp3FkkA\"]},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xfa152b6e88a1dc50780e8f1580426dc23ad2e1e2c2f086a088adf206a202f453\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5127b264994adab88fae419b1c493efc5acd07134c19ee5c0397e50018291ebf\",\"dweb:/ipfs/QmWwJZVhvdmvUCdimbb6R2Jiu59zjPqm6XTMchM6LaEHAp\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x9a9cf02622cd7a64261b10534fc3260449da25c98c9e96d1b4ae8110a20e5806\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2df142592d1dc267d9549049ee3317fa190d2f87eaa565f86ab05ec83f7ab8f5\",\"dweb:/ipfs/QmSkJtcfWo7c42KnL5hho6GFxK6HRNV91XABx1P7xDtfLV\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://efdc632af6960cf865dbc113665ea1f5b90eab75cc40ec062b2f6ae6da582017\",\"dweb:/ipfs/QmfAZFDuG62vxmAN9DnXApv7e7PMzPqi4RkqqZHLMSQiY5\"]},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"keccak256\":\"0x1071a23188ba7f5bb16f51b0b01a67fd41fe56f862d8f83985788cf46f3b91bd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c7082ca99b93f2e541cafaad00ed32675adf0752eab78eccabcf91dec9fd5d73\",\"dweb:/ipfs/QmdqooMmYBQVi7p6subDFM4e1944AuLjZUpHMjGtae7Lgd\"]},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x227bafd3e165b13f5d98c42a44376e48d41f4a265db8803f2707faaeae9659aa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c9aa7959a30871669ce46172cd117b084b607d602d9ce695ce79005582b0b69b\",\"dweb:/ipfs/QmXZUWeLXmArQinHL4RnacJLT22GvCExqREYM6pHLX7CX9\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"keccak256\":\"0x3636662804cd8f474536b2875a9038a4c3fb91879f1bbff48af5c3f140fcd2f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9fab8521263fa581544000cb57335a3f2e6bcdfbb5579d3ceaa5acf741c67c4f\",\"dweb:/ipfs/QmZfXnMom7JSNtfyie5yGPN1SUC4SmHbz4ScVBH88URmA7\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"keccak256\":\"0xe7f984cedc00a138dc27f263c73c32ba9a4b2fd23b6c34ac46f46c074b943538\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0f4acda12f076fe7584921241ddbb5b460ca7cad6cb8a42252ac7f2a9f539127\",\"dweb:/ipfs/QmQmfhkEv9GrhdWe67QtXnU19AMuoEmy31QnHPkucdYLjZ\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"keccak256\":\"0x321ee37ef4925020aa818a03ec7fe48e057561f65ab009a84f6c20c86026ade7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://01f9d74a17a56024984251b97e428e24c9d3abffbae5bd290f0ec263c82e9694\",\"dweb:/ipfs/QmRryCuuXu2ukrDmatB8TqdEhPLiK6NBRt41RiPUaX1qKy\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xdfb4f812600ba4ce6738c35584ceb8c9433472583051b48ba5b1f66cb758a498\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://df02dffe1c1de089d9b4f6192f0dcf464526f2230f420b3deec4645e0cdd2bff\",\"dweb:/ipfs/QmcqXGAU3KJqwrgUVoGJ2W8osomhSJ4R5kdsRpbuW3fELS\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x16926b3c19504ea52f73abe41dfa9c1ef9c328d6088b82162d475caecaa47a6d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc578656a08c07f33ecf4a54324bad5f951afdcd990cdab1dcde493d6bb49d9c\",\"dweb:/ipfs/QmbXLJtTaqBg7WwC4p9gsRjA3VEwNwGc6W9afJeAaacF71\"]},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"keccak256\":\"0x244e4b74b17716120cf28e58636f11c699b8c0c94628bd952a95cee038d7e32b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://198d566157120c526bd6b5086b32cae85a11389b8a538f533ba9f9447915da0e\",\"dweb:/ipfs/QmeE6d8KWERx7f1FVS5tMnitNJxBm2yWXRSEUBF7R6voLh\"]},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"keccak256\":\"0xb2a11b236f073662f5a196995863f51c11d006bf7c3de158b316dfa1506c4b79\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8651649cf0b9efa18c3b01c030276fa320d41adbdc286833417e7f36e357b2f3\",\"dweb:/ipfs/QmafhM2Nd1aP43QVB1eRRZaqRXQKswNfQcWi8U8xjrxCfN\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x79484115dbfa737054f73e041009a02eeb434dd81be5d684bf4255ad3b5ab558\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://12c119699463450c2544f5b9d8709b5e9e9164c62948a79c3ec53423a051d969\",\"dweb:/ipfs/QmPJduzSAaekq447QeFqAp3E7dc8CnNk5ajofckJ4ahA7Q\"]},\"solstruct/contracts/libs/LibMap2.bytes4.address.bytes.sol\":{\"keccak256\":\"0x471645d4b20cc36606122fc6bb692cdf8489118547f90bde2740cb73b1e64d54\",\"urls\":[\"bzz-raw://7ca824c03cd077e6d9630eaa4755787c785a61f612cb8e3ba13d0ce92ee55738\",\"dweb:/ipfs/QmdavtXDokZ7vWZt8pMxPi7DaG3Hd1Q5MyeJjXGRFQuL9r\"]},\"solstruct/contracts/libs/LibSet.bytes4.sol\":{\"keccak256\":\"0xdec5833ab65ae8cab500b84424dde49c1f7817c6575e1631a729fc88c6d4bd7f\",\"urls\":[\"bzz-raw://2e5d23b8383819e6dd77ea61ed30740bcba45b0fff609922b11d1cae2b0223f1\",\"dweb:/ipfs/QmQ27sefXEYXBUSEGdPkuzCqemtUJzNXhhsyd7kB94w6CE\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060006200001e62000067565b600080546001600160a01b0319166001600160a01b03831690811782556040519293509160008051602062002ed0833981519152908290a350620000616200006b565b6200011c565b3390565b6200007562000067565b6000546001600160a01b03908116911614620000ae5760405162461bcd60e51b8152600401620000a590620000e7565b60405180910390fd5b600080546040516001600160a01b039091169060008051602062002ed0833981519152908390a3600080546001600160a01b0319169055565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b612da4806200012c6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146100d5578063bf36994e146100ea578063c87b582a146100fd578063f2fde38b146101105761007d565b80630175199814610082578063156194d4146100ab578063715018a6146100cb575b600080fd5b610095610090366004611efb565b610123565b6040516100a29190612285565b60405180910390f35b6100be6100b9366004611fdf565b61016f565b6040516100a29190612290565b6100d3611208565b005b6100dd611287565b6040516100a29190612258565b6100956100f8366004611efb565b611296565b61009561010b366004611ed0565b6112d9565b6100d361011e366004611e98565b6112ee565b6000610166858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113a492505050565b95945050505050565b60008082610100015185606001518760600151171790508360800151836101200151146101b75760405162461bcd60e51b81526004016101ae906125cc565b60405180910390fd5b601a54610120840151106101dd5760405162461bcd60e51b81526004016101ae90612595565b8360a0015183610140015111156102065760405162461bcd60e51b81526004016101ae9061274d565b85602001518360200151101561022e5760405162461bcd60e51b81526004016101ae90612967565b8460200151836060015110156102565760405162461bcd60e51b81526004016101ae90612671565b83602001518360a00151101561027e5760405162461bcd60e51b81526004016101ae90612527565b6060840151198116156102a35760405162461bcd60e51b81526004016101ae906126a8565b6060860151811860f81b600160f81b16156102d05760405162461bcd60e51b81526004016101ae9061255e565b855183516001600160a01b039081169116146102fe5760405162461bcd60e51b81526004016101ae90612930565b84600001516001600160a01b031683604001516001600160a01b0316146103375760405162461bcd60e51b81526004016101ae90612405565b60808301516001600160a01b0316158061036057506103608360800151856000015160046114ae565b61037c5760405162461bcd60e51b81526004016101ae90612a88565b60808601516001600160a01b031615806103a557506103a58660800151866000015160046114ae565b6103c15760405162461bcd60e51b81526004016101ae906124f0565b60a08601516001600160a01b031615806103ea57506103ea8660a00151856000015160046114ae565b6104065760405162461bcd60e51b81526004016101ae906127bb565b60c08601516001600160a01b0316158061042f575061042f8660c001518460c0015160046114ae565b61044b5760405162461bcd60e51b81526004016101ae90612a1a565b60808501516001600160a01b0316158061047457506104748560800151876000015160046114ae565b6104905760405162461bcd60e51b81526004016101ae906127f2565b60a08501516001600160a01b031615806104b957506104b98560a00151856000015160046114ae565b6104d55760405162461bcd60e51b81526004016101ae90612b2d565b60c08501516001600160a01b031615806104fe57506104fe8560c001518460c0015160046114ae565b61051a5760405162461bcd60e51b81526004016101ae90612860565b60c08401516001600160a01b0316158061054357506105438460c00151876000015160046114ae565b61055f5760405162461bcd60e51b81526004016101ae9061231d565b60e08401516001600160a01b0316158061058857506105888460e00151866000015160046114ae565b6105a45760405162461bcd60e51b81526004016101ae90612603565b6101008401516001600160a01b031615806105cf57506105cf8461010001518460c0015160046114ae565b6105eb5760405162461bcd60e51b81526004016101ae9061263a565b6105f3611b42565b85516001600160a01b03161515610160820152604051637c0d54d360e01b81526106999073__IexecLibOrders_v5_____________________90637c0d54d390610641908b90600401612b64565b60206040518083038186803b15801561065957600080fd5b505af415801561066d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106919190611f9f565b601054611559565b808252805160209182012081830152875160408051638da5cb5b60e01b815290516001600160a01b0390921692638da5cb5b92600480840193829003018186803b1580156106e657600080fd5b505afa1580156106fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071e9190611eb4565b6001600160a01b039081166040808401919091526005548951915163c3c5a54760e01b815292169163c3c5a5479161075891600401612258565b60206040518083038186803b15801561077057600080fd5b505afa158015610784573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a89190611f7f565b6107c45760405162461bcd60e51b81526004016101ae90612829565b6107dc81604001518260000151896101000151611585565b6107f85760405162461bcd60e51b81526004016101ae90612a51565b61080581604001516115a9565b6108215760405162461bcd60e51b81526004016101ae90612af6565b806101600151156109f4576040516308d9777160e11b81526108679073__IexecLibOrders_v5_____________________906311b2eee290610641908a90600401612b64565b6060820181905280516020918201206080830152865160408051638da5cb5b60e01b815290516001600160a01b0390921692638da5cb5b92600480840193829003018186803b1580156108b957600080fd5b505afa1580156108cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f19190611eb4565b6001600160a01b0390811660a0830152600654875160405163c3c5a54760e01b8152919092169163c3c5a5479161092b9190600401612258565b60206040518083038186803b15801561094357600080fd5b505afa158015610957573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097b9190611f7f565b6109975760405162461bcd60e51b81526004016101ae906124b9565b6109af8160a001518260600151886101000151611585565b6109cb5760405162461bcd60e51b81526004016101ae90612354565b6109d88160a001516115a9565b6109f45760405162461bcd60e51b81526004016101ae90612abf565b604051637f6cc2ff60e11b8152610a2f9073__IexecLibOrders_v5_____________________9063fed985fe90610641908990600401612c87565b60c08201819052805160209182012060e0830152855160408051638da5cb5b60e01b815290516001600160a01b0390921692638da5cb5b92600480840193829003018186803b158015610a8157600080fd5b505afa158015610a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab99190611eb4565b6001600160a01b03908116610100830152600754865160405163c3c5a54760e01b8152919092169163c3c5a54791610af49190600401612258565b60206040518083038186803b158015610b0c57600080fd5b505afa158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b449190611f7f565b610b605760405162461bcd60e51b81526004016101ae90612716565b610b798161010001518260c00151876101400151611585565b610b955760405162461bcd60e51b81526004016101ae9061243c565b610ba38161010001516115a9565b610bbf5760405162461bcd60e51b81526004016101ae906123ce565b604051638ac03f3360e01b8152610bfa9073__IexecLibOrders_v5_____________________90638ac03f3390610641908890600401612b77565b61012082018190528051602082012061014083015260c08501516101e0860151610c249290611585565b610c405760405162461bcd60e51b81526004016101ae906126df565b610c4d8460c001516115a9565b610c695760405162461bcd60e51b81526004016101ae906128f9565b6020808201516000908152601290915260408082205490890151610c8c916115b4565b9050816101600151610c9e5780610ccd565b6080820151600090815260126020526040908190205490880151610ccd91610cc691906115b4565b82906115c9565b60e0830151600090815260126020526040908190205490880151919250610cf791610cc6916115b4565b61014083015160009081526012602052604090205460e0870151919250610d2191610cc6916115b4565b905060008111610d435760405162461bcd60e51b81526004016101ae90612784565b61014082015160008181526012602090815260408083205490519293610d6b9390920161222f565b60408051808303601f1901815291815281516020928301206000818152601384528290208c5181546001600160a01b03199081166001600160a01b03928316178355938801516001830180548616918316919091179055938d0151600282015560a087015160048201805485169186169190911790558b51600382018054909416941693909317909155610160850151909250610e09576000610e0f565b88602001515b600582015587516006820180546001600160a01b039283166001600160a01b03199182161790915561010086015160078401805491909316911617905560208801516008820155610140870151610e679060016115df565b6009820155610120870151600a820155600b810185905560c0870151600c820180546001600160a01b039283166001600160a01b031991821617909155610160890151600d84018054918416918316919091179055610180890151600e840180549190931691161790556101a08701518051610eed91600f840191602090910190611ba5565b504260108201556101408401516000908152601260208181526040928390205460118501559083018590558951825163b55e75af60e01b81529251610f9c936001600160a01b039092169263b55e75af9260048082019391829003018186803b158015610f5957600080fd5b505afa158015610f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f919190611f9f565b60208a0151906115ef565b816013018190555087600001516001600160a01b03166387639c686040518163ffffffff1660e01b815260040160206040518083038186803b158015610fe157600080fd5b505afa158015610ff5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110199190611f9f565b601482015560208085015160009081526012909152604090205461103d90846115fd565b60208086015160009081526012909152604090205561016084015161108390611067576000611069565b835b6080860151600090815260126020526040902054906115fd565b60808501516000908152601260205260408082209290925560e0860151815220546110ae90846115fd565b60e085015160009081526012602052604080822092909255610140860151815220546110da90846115fd565b610140850151600090815260126020526040902055600c810154600882015460058301546002840154611137936001600160a01b03169261113292889261112c929161112691906115fd565b906115fd565b9061160f565b611636565b60078101546008820154611160916001600160a01b03169061113290869061112c90601e6115ef565b60068101546040516001600160a01b03909116907f692ad61076dceddd0f1a861f737553dd61fc8501cf4190d29c4e90af6607f765906111a1908590612290565b60405180910390a27fd811b592ed0899225773e8933d8df64bd0b62761a9d7aad4ed5b22735f4610a482856020015186608001518760e00151886101400151886040516111f396959493929190612299565b60405180910390a15098975050505050505050565b6112106116be565b6000546001600160a01b0390811691161461123d5760405162461bcd60e51b81526004016101ae906128c4565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6000610166858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506116c292505050565b60006112e583836116df565b90505b92915050565b6112f66116be565b6000546001600160a01b039081169116146113235760405162461bcd60e51b81526004016101ae906128c4565b6001600160a01b0381166113495760405162461bcd60e51b81526004016101ae90612473565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006113af84611715565b1561148657604051630b135d3f60e11b81526001600160a01b03851690631626ba7e906113e290869086906004016122c1565b60206040518083038186803b1580156113fa57600080fd5b505afa92505050801561142a575060408051601f3d908101601f1916820190925261142791810190611fb7565b60015b611464573d808015611458576040519150601f19603f3d011682016040523d82523d6000602084013e61145d565b606091505b505061147e565b6001600160e01b031916630b135d3f60e11b1490506114a7565b5060006114a7565b836001600160a01b031661149a848461174e565b6001600160a01b03161490505b9392505050565b6000826001600160a01b0316846001600160a01b031614806115515750836001600160a01b031663d202158d6114e385611858565b846040518363ffffffff1660e01b815260040161150192919061222f565b60206040518083038186803b15801561151957600080fd5b505afa15801561152d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115519190611f7f565b949350505050565b6060818360405160200161156e92919061223d565b604051602081830303815290604052905092915050565b60006115988484805190602001206116df565b806115515750611551848484611864565b60006112e88261198d565b6000828211156115c357600080fd5b50900390565b60008183106115d857816112e5565b5090919050565b6000818310156115d857816112e5565b60006112e583836064611a0e565b6000828201838110156112e557600080fd5b60008261161e575060006112e8565b8282028284828161162b57fe5b04146112e557600080fd5b611641823083611a23565b6001600160a01b0382166000908152600e602052604090205461166490826115fd565b6001600160a01b0383166000908152600e60205260409081902091909155517f625fed9875dada8643f2418b838ae0bc78d9a148a18eee4ee1979ff0f3f5d427906116b2908490849061226c565b60405180910390a15050565b3390565b60006116ce84846116df565b8061155157506115518484846113a4565b60006001600160a01b038316158015906112e55750506000908152601160205260409020546001600160a01b0390811691161490565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611551575050151592915050565b6000806000808451604114156117785750505060208201516040830151606084015160001a6117bd565b8451604014156117a557505050602082015160408301516001600160ff1b0381169060001a60071c6117bd565b60405162461bcd60e51b81526004016101ae906129e3565b601b8160ff1610156117cd57601b015b8060ff16601b14806117e257508060ff16601c145b6117fe5760405162461bcd60e51b81526004016101ae90612897565b6001868285856040516000815260200160405260405161182194939291906122da565b6020604051602081039080840390855afa158015611843573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6001600160a01b031690565b600061186f84611715565b15611972576040516320c13b0b60e01b81526001600160a01b038516906320c13b0b906118a290869086906004016122f8565b60206040518083038186803b1580156118ba57600080fd5b505afa9250505080156118ea575060408051601f3d908101601f191682019092526118e791810190611fb7565b60015b611924573d808015611918576040519150601f19603f3d011682016040523d82523d6000602084013e61191d565b606091505b505061193e565b6001600160e01b0319166320c13b0b60e01b1490506114a7565b82516020840120604051630b135d3f60e11b81526001600160a01b03861691631626ba7e916113e2919086906004016122c1565b836001600160a01b031661149a84805190602001208461174e565b6008546040516313289ea360e31b81526000916001600160a01b031690639944f518906119be908590600401612258565b60206040518083038186803b1580156119d657600080fd5b505afa1580156119ea573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e89190611f7f565b6000611551611a1d858561160f565b83611b20565b6001600160a01b038316611a495760405162461bcd60e51b81526004016101ae9061299e565b6001600160a01b038216611a6f5760405162461bcd60e51b81526004016101ae9061238b565b6001600160a01b0383166000908152600d6020526040902054611a9290826115b4565b6001600160a01b038085166000908152600d60205260408082209390935590841681522054611ac190826115fd565b6001600160a01b038084166000818152600d602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611b13908590612290565b60405180910390a3505050565b6000808211611b2e57600080fd5b6000828481611b3957fe5b04949350505050565b604080516101808101825260608082526000602083018190529282018390528082018190526080820183905260a0820183905260c0820181905260e082018390526101008201839052610120820152610140810182905261016081019190915290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611be657805160ff1916838001178555611c13565b82800160010185558215611c13579182015b82811115611c13578251825591602001919060010190611bf8565b50611c1f929150611c23565b5090565b5b80821115611c1f5760008155600101611c24565b80356112e881612d56565b600082601f830112611c53578081fd5b813567ffffffffffffffff811115611c69578182fd5b611c7c601f8201601f1916602001612d2f565b9150808252836020828501011115611c9357600080fd5b8060208401602084013760009082016020015292915050565b6000610120808385031215611cbf578182fd5b611cc881612d2f565b915050611cd58383611c38565b8152602082013560208201526040820135604082015260608201356060820152611d028360808401611c38565b6080820152611d148360a08401611c38565b60a0820152611d268360c08401611c38565b60c082015260e082013560e08201526101008083013567ffffffffffffffff811115611d5157600080fd5b611d5d85828601611c43565b82840152505092915050565b6000610200808385031215611d7c578182fd5b611d8581612d2f565b915050611d928383611c38565b815260208201356020820152611dab8360408401611c38565b604082015260608201356060820152611dc78360808401611c38565b608082015260a082013560a0820152611de38360c08401611c38565b60c082015260e08281013590820152610100808301359082015261012080830135908201526101408083013590820152610160611e2284828501611c38565b90820152610180611e3584848301611c38565b908201526101a08281013567ffffffffffffffff80821115611e5657600080fd5b611e6286838701611c43565b838501526101c0925082850135838501526101e0925082850135915080821115611e8b57600080fd5b50611d5d85828601611c43565b600060208284031215611ea9578081fd5b81356112e581612d56565b600060208284031215611ec5578081fd5b81516112e581612d56565b60008060408385031215611ee2578081fd5b8235611eed81612d56565b946020939093013593505050565b60008060008060608587031215611f10578182fd5b8435611f1b81612d56565b935060208501359250604085013567ffffffffffffffff80821115611f3e578384fd5b818701915087601f830112611f51578384fd5b813581811115611f5f578485fd5b886020828501011115611f70578485fd5b95989497505060200194505050565b600060208284031215611f90578081fd5b815180151581146112e5578182fd5b600060208284031215611fb0578081fd5b5051919050565b600060208284031215611fc8578081fd5b81516001600160e01b0319811681146112e5578182fd5b60008060008060808587031215611ff4578182fd5b843567ffffffffffffffff8082111561200b578384fd5b61201788838901611cac565b9550602087013591508082111561202c578384fd5b61203888838901611cac565b9450604087013591508082111561204d578384fd5b818701915061016080838a031215612063578485fd5b61206c81612d2f565b90506120788984611c38565b81526020830135602082015260408301356040820152606083013560608201526080830135608082015260a083013560a08201526120b98960c08501611c38565b60c08201526120cb8960e08501611c38565b60e08201526101006120df8a828601611c38565b9082015261012083810135908201526101408084013583811115612101578687fd5b61210d8b828701611c43565b82840152505080945050606087013591508082111561212a578283fd5b5061213787828801611d69565b91505092959194509250565b6001600160a01b03169052565b60008151808452815b8181101561217557602081850181015186830182015201612159565b818111156121865782602083870101525b50601f01601f19169290920160200192915050565b600061012060018060a01b03835116845260208301516020850152604083015160408501526060830151606085015260808301516121dc6080860182612143565b5060a08301516121ef60a0860182612143565b5060c083015161220260c0860182612143565b5060e083015160e085015261010080840151828287015261222583870182612150565b9695505050505050565b918252602082015260400190565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b958652602086019490945260408501929092526060840152608083015260a082015260c00190565b6000838252604060208301526115516040830184612150565b93845260ff9290921660208401526040830152606082015260800190565b60006040825261230b6040830185612150565b82810360208401526101668185612150565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831390000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307833310000000000000000604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307834320000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831310000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307834310000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307833300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831330000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830350000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830370000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830310000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831610000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831620000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830340000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830360000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307835300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307834300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830320000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307836300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831340000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831360000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307832300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831380000000000000000604082015260600190565b60208082526013908201527234b73b30b634b216b9b4b3b730ba3ab93296bb60691b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307835310000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830330000000000000000604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526018908201527f696e76616c69642d7369676e61747572652d666f726d61740000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831350000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307832310000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831320000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307833320000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307832320000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831370000000000000000604082015260600190565b6000602082526112e5602083018461219b565b600060208252612b8b602083018451612143565b602083015160408301526040830151612ba76060840182612143565b50606083015160808301526080830151612bc460a0840182612143565b5060a083015160c083015260c0830151612be160e0840182612143565b5060e083015161010083810191909152830151610120808401919091528301516101408084019190915283015161016080840191909152830151610180612c2a81850183612143565b84015190506101a0612c3e84820183612143565b808501519150506102006101c08181860152612c5e610220860184612150565b908601516101e086810191909152860151858203601f1901838701529092506122258382612150565b600060208252612c9b602083018451612143565b602083015160408301526040830151606083015260608301516080830152608083015160a083015260a083015160c083015260c0830151612cdf60e0840182612143565b5060e0830151610100612cf481850183612143565b8401519050610120612d0884820183612143565b84015161014084810191909152840151610160808501529050611551610180840182612150565b60405181810167ffffffffffffffff81118282101715612d4e57600080fd5b604052919050565b6001600160a01b0381168114612d6b57600080fd5b5056fea26469706673582212201fed518272938fd82341524b33183b6ae233703de37bb68648aa808431445b9e64736f6c634300060c00338be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146100d5578063bf36994e146100ea578063c87b582a146100fd578063f2fde38b146101105761007d565b80630175199814610082578063156194d4146100ab578063715018a6146100cb575b600080fd5b610095610090366004611efb565b610123565b6040516100a29190612285565b60405180910390f35b6100be6100b9366004611fdf565b61016f565b6040516100a29190612290565b6100d3611208565b005b6100dd611287565b6040516100a29190612258565b6100956100f8366004611efb565b611296565b61009561010b366004611ed0565b6112d9565b6100d361011e366004611e98565b6112ee565b6000610166858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506113a492505050565b95945050505050565b60008082610100015185606001518760600151171790508360800151836101200151146101b75760405162461bcd60e51b81526004016101ae906125cc565b60405180910390fd5b601a54610120840151106101dd5760405162461bcd60e51b81526004016101ae90612595565b8360a0015183610140015111156102065760405162461bcd60e51b81526004016101ae9061274d565b85602001518360200151101561022e5760405162461bcd60e51b81526004016101ae90612967565b8460200151836060015110156102565760405162461bcd60e51b81526004016101ae90612671565b83602001518360a00151101561027e5760405162461bcd60e51b81526004016101ae90612527565b6060840151198116156102a35760405162461bcd60e51b81526004016101ae906126a8565b6060860151811860f81b600160f81b16156102d05760405162461bcd60e51b81526004016101ae9061255e565b855183516001600160a01b039081169116146102fe5760405162461bcd60e51b81526004016101ae90612930565b84600001516001600160a01b031683604001516001600160a01b0316146103375760405162461bcd60e51b81526004016101ae90612405565b60808301516001600160a01b0316158061036057506103608360800151856000015160046114ae565b61037c5760405162461bcd60e51b81526004016101ae90612a88565b60808601516001600160a01b031615806103a557506103a58660800151866000015160046114ae565b6103c15760405162461bcd60e51b81526004016101ae906124f0565b60a08601516001600160a01b031615806103ea57506103ea8660a00151856000015160046114ae565b6104065760405162461bcd60e51b81526004016101ae906127bb565b60c08601516001600160a01b0316158061042f575061042f8660c001518460c0015160046114ae565b61044b5760405162461bcd60e51b81526004016101ae90612a1a565b60808501516001600160a01b0316158061047457506104748560800151876000015160046114ae565b6104905760405162461bcd60e51b81526004016101ae906127f2565b60a08501516001600160a01b031615806104b957506104b98560a00151856000015160046114ae565b6104d55760405162461bcd60e51b81526004016101ae90612b2d565b60c08501516001600160a01b031615806104fe57506104fe8560c001518460c0015160046114ae565b61051a5760405162461bcd60e51b81526004016101ae90612860565b60c08401516001600160a01b0316158061054357506105438460c00151876000015160046114ae565b61055f5760405162461bcd60e51b81526004016101ae9061231d565b60e08401516001600160a01b0316158061058857506105888460e00151866000015160046114ae565b6105a45760405162461bcd60e51b81526004016101ae90612603565b6101008401516001600160a01b031615806105cf57506105cf8461010001518460c0015160046114ae565b6105eb5760405162461bcd60e51b81526004016101ae9061263a565b6105f3611b42565b85516001600160a01b03161515610160820152604051637c0d54d360e01b81526106999073__IexecLibOrders_v5_____________________90637c0d54d390610641908b90600401612b64565b60206040518083038186803b15801561065957600080fd5b505af415801561066d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106919190611f9f565b601054611559565b808252805160209182012081830152875160408051638da5cb5b60e01b815290516001600160a01b0390921692638da5cb5b92600480840193829003018186803b1580156106e657600080fd5b505afa1580156106fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071e9190611eb4565b6001600160a01b039081166040808401919091526005548951915163c3c5a54760e01b815292169163c3c5a5479161075891600401612258565b60206040518083038186803b15801561077057600080fd5b505afa158015610784573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a89190611f7f565b6107c45760405162461bcd60e51b81526004016101ae90612829565b6107dc81604001518260000151896101000151611585565b6107f85760405162461bcd60e51b81526004016101ae90612a51565b61080581604001516115a9565b6108215760405162461bcd60e51b81526004016101ae90612af6565b806101600151156109f4576040516308d9777160e11b81526108679073__IexecLibOrders_v5_____________________906311b2eee290610641908a90600401612b64565b6060820181905280516020918201206080830152865160408051638da5cb5b60e01b815290516001600160a01b0390921692638da5cb5b92600480840193829003018186803b1580156108b957600080fd5b505afa1580156108cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f19190611eb4565b6001600160a01b0390811660a0830152600654875160405163c3c5a54760e01b8152919092169163c3c5a5479161092b9190600401612258565b60206040518083038186803b15801561094357600080fd5b505afa158015610957573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097b9190611f7f565b6109975760405162461bcd60e51b81526004016101ae906124b9565b6109af8160a001518260600151886101000151611585565b6109cb5760405162461bcd60e51b81526004016101ae90612354565b6109d88160a001516115a9565b6109f45760405162461bcd60e51b81526004016101ae90612abf565b604051637f6cc2ff60e11b8152610a2f9073__IexecLibOrders_v5_____________________9063fed985fe90610641908990600401612c87565b60c08201819052805160209182012060e0830152855160408051638da5cb5b60e01b815290516001600160a01b0390921692638da5cb5b92600480840193829003018186803b158015610a8157600080fd5b505afa158015610a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab99190611eb4565b6001600160a01b03908116610100830152600754865160405163c3c5a54760e01b8152919092169163c3c5a54791610af49190600401612258565b60206040518083038186803b158015610b0c57600080fd5b505afa158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b449190611f7f565b610b605760405162461bcd60e51b81526004016101ae90612716565b610b798161010001518260c00151876101400151611585565b610b955760405162461bcd60e51b81526004016101ae9061243c565b610ba38161010001516115a9565b610bbf5760405162461bcd60e51b81526004016101ae906123ce565b604051638ac03f3360e01b8152610bfa9073__IexecLibOrders_v5_____________________90638ac03f3390610641908890600401612b77565b61012082018190528051602082012061014083015260c08501516101e0860151610c249290611585565b610c405760405162461bcd60e51b81526004016101ae906126df565b610c4d8460c001516115a9565b610c695760405162461bcd60e51b81526004016101ae906128f9565b6020808201516000908152601290915260408082205490890151610c8c916115b4565b9050816101600151610c9e5780610ccd565b6080820151600090815260126020526040908190205490880151610ccd91610cc691906115b4565b82906115c9565b60e0830151600090815260126020526040908190205490880151919250610cf791610cc6916115b4565b61014083015160009081526012602052604090205460e0870151919250610d2191610cc6916115b4565b905060008111610d435760405162461bcd60e51b81526004016101ae90612784565b61014082015160008181526012602090815260408083205490519293610d6b9390920161222f565b60408051808303601f1901815291815281516020928301206000818152601384528290208c5181546001600160a01b03199081166001600160a01b03928316178355938801516001830180548616918316919091179055938d0151600282015560a087015160048201805485169186169190911790558b51600382018054909416941693909317909155610160850151909250610e09576000610e0f565b88602001515b600582015587516006820180546001600160a01b039283166001600160a01b03199182161790915561010086015160078401805491909316911617905560208801516008820155610140870151610e679060016115df565b6009820155610120870151600a820155600b810185905560c0870151600c820180546001600160a01b039283166001600160a01b031991821617909155610160890151600d84018054918416918316919091179055610180890151600e840180549190931691161790556101a08701518051610eed91600f840191602090910190611ba5565b504260108201556101408401516000908152601260208181526040928390205460118501559083018590558951825163b55e75af60e01b81529251610f9c936001600160a01b039092169263b55e75af9260048082019391829003018186803b158015610f5957600080fd5b505afa158015610f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f919190611f9f565b60208a0151906115ef565b816013018190555087600001516001600160a01b03166387639c686040518163ffffffff1660e01b815260040160206040518083038186803b158015610fe157600080fd5b505afa158015610ff5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110199190611f9f565b601482015560208085015160009081526012909152604090205461103d90846115fd565b60208086015160009081526012909152604090205561016084015161108390611067576000611069565b835b6080860151600090815260126020526040902054906115fd565b60808501516000908152601260205260408082209290925560e0860151815220546110ae90846115fd565b60e085015160009081526012602052604080822092909255610140860151815220546110da90846115fd565b610140850151600090815260126020526040902055600c810154600882015460058301546002840154611137936001600160a01b03169261113292889261112c929161112691906115fd565b906115fd565b9061160f565b611636565b60078101546008820154611160916001600160a01b03169061113290869061112c90601e6115ef565b60068101546040516001600160a01b03909116907f692ad61076dceddd0f1a861f737553dd61fc8501cf4190d29c4e90af6607f765906111a1908590612290565b60405180910390a27fd811b592ed0899225773e8933d8df64bd0b62761a9d7aad4ed5b22735f4610a482856020015186608001518760e00151886101400151886040516111f396959493929190612299565b60405180910390a15098975050505050505050565b6112106116be565b6000546001600160a01b0390811691161461123d5760405162461bcd60e51b81526004016101ae906128c4565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6000610166858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506116c292505050565b60006112e583836116df565b90505b92915050565b6112f66116be565b6000546001600160a01b039081169116146113235760405162461bcd60e51b81526004016101ae906128c4565b6001600160a01b0381166113495760405162461bcd60e51b81526004016101ae90612473565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006113af84611715565b1561148657604051630b135d3f60e11b81526001600160a01b03851690631626ba7e906113e290869086906004016122c1565b60206040518083038186803b1580156113fa57600080fd5b505afa92505050801561142a575060408051601f3d908101601f1916820190925261142791810190611fb7565b60015b611464573d808015611458576040519150601f19603f3d011682016040523d82523d6000602084013e61145d565b606091505b505061147e565b6001600160e01b031916630b135d3f60e11b1490506114a7565b5060006114a7565b836001600160a01b031661149a848461174e565b6001600160a01b03161490505b9392505050565b6000826001600160a01b0316846001600160a01b031614806115515750836001600160a01b031663d202158d6114e385611858565b846040518363ffffffff1660e01b815260040161150192919061222f565b60206040518083038186803b15801561151957600080fd5b505afa15801561152d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115519190611f7f565b949350505050565b6060818360405160200161156e92919061223d565b604051602081830303815290604052905092915050565b60006115988484805190602001206116df565b806115515750611551848484611864565b60006112e88261198d565b6000828211156115c357600080fd5b50900390565b60008183106115d857816112e5565b5090919050565b6000818310156115d857816112e5565b60006112e583836064611a0e565b6000828201838110156112e557600080fd5b60008261161e575060006112e8565b8282028284828161162b57fe5b04146112e557600080fd5b611641823083611a23565b6001600160a01b0382166000908152600e602052604090205461166490826115fd565b6001600160a01b0383166000908152600e60205260409081902091909155517f625fed9875dada8643f2418b838ae0bc78d9a148a18eee4ee1979ff0f3f5d427906116b2908490849061226c565b60405180910390a15050565b3390565b60006116ce84846116df565b8061155157506115518484846113a4565b60006001600160a01b038316158015906112e55750506000908152601160205260409020546001600160a01b0390811691161490565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611551575050151592915050565b6000806000808451604114156117785750505060208201516040830151606084015160001a6117bd565b8451604014156117a557505050602082015160408301516001600160ff1b0381169060001a60071c6117bd565b60405162461bcd60e51b81526004016101ae906129e3565b601b8160ff1610156117cd57601b015b8060ff16601b14806117e257508060ff16601c145b6117fe5760405162461bcd60e51b81526004016101ae90612897565b6001868285856040516000815260200160405260405161182194939291906122da565b6020604051602081039080840390855afa158015611843573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6001600160a01b031690565b600061186f84611715565b15611972576040516320c13b0b60e01b81526001600160a01b038516906320c13b0b906118a290869086906004016122f8565b60206040518083038186803b1580156118ba57600080fd5b505afa9250505080156118ea575060408051601f3d908101601f191682019092526118e791810190611fb7565b60015b611924573d808015611918576040519150601f19603f3d011682016040523d82523d6000602084013e61191d565b606091505b505061193e565b6001600160e01b0319166320c13b0b60e01b1490506114a7565b82516020840120604051630b135d3f60e11b81526001600160a01b03861691631626ba7e916113e2919086906004016122c1565b836001600160a01b031661149a84805190602001208461174e565b6008546040516313289ea360e31b81526000916001600160a01b031690639944f518906119be908590600401612258565b60206040518083038186803b1580156119d657600080fd5b505afa1580156119ea573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e89190611f7f565b6000611551611a1d858561160f565b83611b20565b6001600160a01b038316611a495760405162461bcd60e51b81526004016101ae9061299e565b6001600160a01b038216611a6f5760405162461bcd60e51b81526004016101ae9061238b565b6001600160a01b0383166000908152600d6020526040902054611a9290826115b4565b6001600160a01b038085166000908152600d60205260408082209390935590841681522054611ac190826115fd565b6001600160a01b038084166000818152600d602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611b13908590612290565b60405180910390a3505050565b6000808211611b2e57600080fd5b6000828481611b3957fe5b04949350505050565b604080516101808101825260608082526000602083018190529282018390528082018190526080820183905260a0820183905260c0820181905260e082018390526101008201839052610120820152610140810182905261016081019190915290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611be657805160ff1916838001178555611c13565b82800160010185558215611c13579182015b82811115611c13578251825591602001919060010190611bf8565b50611c1f929150611c23565b5090565b5b80821115611c1f5760008155600101611c24565b80356112e881612d56565b600082601f830112611c53578081fd5b813567ffffffffffffffff811115611c69578182fd5b611c7c601f8201601f1916602001612d2f565b9150808252836020828501011115611c9357600080fd5b8060208401602084013760009082016020015292915050565b6000610120808385031215611cbf578182fd5b611cc881612d2f565b915050611cd58383611c38565b8152602082013560208201526040820135604082015260608201356060820152611d028360808401611c38565b6080820152611d148360a08401611c38565b60a0820152611d268360c08401611c38565b60c082015260e082013560e08201526101008083013567ffffffffffffffff811115611d5157600080fd5b611d5d85828601611c43565b82840152505092915050565b6000610200808385031215611d7c578182fd5b611d8581612d2f565b915050611d928383611c38565b815260208201356020820152611dab8360408401611c38565b604082015260608201356060820152611dc78360808401611c38565b608082015260a082013560a0820152611de38360c08401611c38565b60c082015260e08281013590820152610100808301359082015261012080830135908201526101408083013590820152610160611e2284828501611c38565b90820152610180611e3584848301611c38565b908201526101a08281013567ffffffffffffffff80821115611e5657600080fd5b611e6286838701611c43565b838501526101c0925082850135838501526101e0925082850135915080821115611e8b57600080fd5b50611d5d85828601611c43565b600060208284031215611ea9578081fd5b81356112e581612d56565b600060208284031215611ec5578081fd5b81516112e581612d56565b60008060408385031215611ee2578081fd5b8235611eed81612d56565b946020939093013593505050565b60008060008060608587031215611f10578182fd5b8435611f1b81612d56565b935060208501359250604085013567ffffffffffffffff80821115611f3e578384fd5b818701915087601f830112611f51578384fd5b813581811115611f5f578485fd5b886020828501011115611f70578485fd5b95989497505060200194505050565b600060208284031215611f90578081fd5b815180151581146112e5578182fd5b600060208284031215611fb0578081fd5b5051919050565b600060208284031215611fc8578081fd5b81516001600160e01b0319811681146112e5578182fd5b60008060008060808587031215611ff4578182fd5b843567ffffffffffffffff8082111561200b578384fd5b61201788838901611cac565b9550602087013591508082111561202c578384fd5b61203888838901611cac565b9450604087013591508082111561204d578384fd5b818701915061016080838a031215612063578485fd5b61206c81612d2f565b90506120788984611c38565b81526020830135602082015260408301356040820152606083013560608201526080830135608082015260a083013560a08201526120b98960c08501611c38565b60c08201526120cb8960e08501611c38565b60e08201526101006120df8a828601611c38565b9082015261012083810135908201526101408084013583811115612101578687fd5b61210d8b828701611c43565b82840152505080945050606087013591508082111561212a578283fd5b5061213787828801611d69565b91505092959194509250565b6001600160a01b03169052565b60008151808452815b8181101561217557602081850181015186830182015201612159565b818111156121865782602083870101525b50601f01601f19169290920160200192915050565b600061012060018060a01b03835116845260208301516020850152604083015160408501526060830151606085015260808301516121dc6080860182612143565b5060a08301516121ef60a0860182612143565b5060c083015161220260c0860182612143565b5060e083015160e085015261010080840151828287015261222583870182612150565b9695505050505050565b918252602082015260400190565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b958652602086019490945260408501929092526060840152608083015260a082015260c00190565b6000838252604060208301526115516040830184612150565b93845260ff9290921660208401526040830152606082015260800190565b60006040825261230b6040830185612150565b82810360208401526101668185612150565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831390000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307833310000000000000000604082015260600190565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307834320000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831310000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307834310000000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307833300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831330000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830350000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830370000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830310000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831610000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831620000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830340000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830360000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307835300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307834300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830320000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307836300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831340000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831360000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307832300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831380000000000000000604082015260600190565b60208082526013908201527234b73b30b634b216b9b4b3b730ba3ab93296bb60691b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307835310000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831300000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307830330000000000000000604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526018908201527f696e76616c69642d7369676e61747572652d666f726d61740000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831350000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307832310000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831320000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307833320000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307832320000000000000000604082015260600190565b60208082526018908201527f694578656356352d6d617463684f72646572732d307831370000000000000000604082015260600190565b6000602082526112e5602083018461219b565b600060208252612b8b602083018451612143565b602083015160408301526040830151612ba76060840182612143565b50606083015160808301526080830151612bc460a0840182612143565b5060a083015160c083015260c0830151612be160e0840182612143565b5060e083015161010083810191909152830151610120808401919091528301516101408084019190915283015161016080840191909152830151610180612c2a81850183612143565b84015190506101a0612c3e84820183612143565b808501519150506102006101c08181860152612c5e610220860184612150565b908601516101e086810191909152860151858203601f1901838701529092506122258382612150565b600060208252612c9b602083018451612143565b602083015160408301526040830151606083015260608301516080830152608083015160a083015260a083015160c083015260c0830151612cdf60e0840182612143565b5060e0830151610100612cf481850183612143565b8401519050610120612d0884820183612143565b84015161014084810191909152840151610160808501529050611551610180840182612150565b60405181810167ffffffffffffffff81118282101715612d4e57600080fd5b604052919050565b6001600160a01b0381168114612d6b57600080fd5b5056fea26469706673582212201fed518272938fd82341524b33183b6ae233703de37bb68648aa808431445b9e64736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "1372:452:28:-:0;;;;;;;;;;;;-1:-1:-1;865:17:83;885:12;:10;:12::i;:::-;907:6;:18;;-1:-1:-1;;;;;;907:18:83;-1:-1:-1;;;;;907:18:83;;;;;;;940:43;;907:18;;-1:-1:-1;907:18:83;-1:-1:-1;;;;;;;;;;;940:43:83;907:6;;940:43;-1:-1:-1;124:19:73;:17;:19::i;:::-;1372:452:28;;590:104:81;677:10;590:104;:::o;1689:145:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;;;;;;;;;1795:1:::1;1779:6:::0;;1758:40:::1;::::0;-1:-1:-1;;;;;1779:6:83;;::::1;::::0;-1:-1:-1;;;;;;;;;;;1758:40:83;1795:1;;1758:40:::1;1825:1;1808:19:::0;;-1:-1:-1;;;;;;1808:19:83::1;::::0;;1689:145::o;346:416:-1:-;546:2;560:47;;;531:18;;;873:19;266:34;913:14;;;246:55;320:12;;;517:245::o;:::-;1372:452:28;;;;;;", - "deployedSourceMap": "1372:452:28:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2380:186:27;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3200:9415;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1689:145:83:-;;;:::i;:::-;;1066:77;;;:::i;:::-;;;;;;;:::i;2725:214:27:-;;;;;;:::i;:::-;;:::i;2569:153::-;;;;;;:::i;:::-;;:::i;1983:240:83:-;;;;;;:::i;:::-;;:::i;2380:186:27:-;2499:4;2517:45;2533:9;2544:5;2551:10;;2517:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2517:15:27;;-1:-1:-1;;;2517:45:27:i;:::-;2510:52;2380:186;-1:-1:-1;;;;;2380:186:27:o;3200:9415::-;3479:7;3590:11;3640:13;:17;;;3620:13;:17;;;3604:9;:13;;;:33;:53;3590:67;;3705:16;:25;;;3669:13;:22;;;:61;3661:105;;;;-1:-1:-1;;;3661:105:27;;;;;;;:::i;:::-;;;;;;;;;3814:12;:19;3778:22;;;;:55;3770:105;;;;-1:-1:-1;;;3770:105:27;;;;;;;:::i;:::-;3923:16;:22;;;3887:13;:19;;;:58;;3879:105;;;;-1:-1:-1;;;3879:105:27;;;;;;;:::i;:::-;4032:9;:18;;;3996:13;:25;;;:54;;3988:105;;;;-1:-1:-1;;;3988:105:27;;;;;;;:::i;:::-;4141:13;:26;;;4105:13;:29;;;:62;;4097:105;;;;-1:-1:-1;;;4097:105:27;;;;;;;:::i;:::-;4250:16;:32;;;4214:13;:32;;;:68;;4206:105;;;;-1:-1:-1;;;4206:105:27;;;;;;;:::i;:::-;4330:20;;;;4329:21;4323:27;;:39;4315:105;;;;-1:-1:-1;;;4315:105:27;;;;;;;:::i;:::-;4439:13;;;;4433:19;;4432:25;;-1:-1:-1;;;4432:32:27;:39;4424:105;;;;-1:-1:-1;;;4424:105:27;;;;;;;:::i;:::-;4604:13;;4579:17;;-1:-1:-1;;;;;4579:38:27;;;;;;4571:189;;;;-1:-1:-1;;;4571:189:27;;;;;;;:::i;:::-;4797:13;:21;;;-1:-1:-1;;;;;4772:46:27;:13;:21;;;-1:-1:-1;;;;;4772:46:27;;4764:189;;;;-1:-1:-1;;;4764:189:27;;;;;;;:::i;:::-;4965:24;;;;-1:-1:-1;;;;;4965:48:27;;;:152;;;5017:100;5032:13;:24;;;5068:16;:27;;;3595:1:4;5017:14:27;:100::i;:::-;4957:189;;;;-1:-1:-1;;;4957:189:27;;;;;;;:::i;:::-;5202:25;;;;-1:-1:-1;;;;;5202:48:27;;;:152;;;5254:100;5269:9;:25;;;5305:13;:21;;;3595:1:4;5254:14:27;:100::i;:::-;5194:189;;;;-1:-1:-1;;;5194:189:27;;;;;;;:::i;:::-;5395:28;;;;-1:-1:-1;;;;;5395:48:27;;;:152;;;5447:100;5462:9;:28;;;5498:16;:27;;;3595:1:4;5447:14:27;:100::i;:::-;5387:189;;;;-1:-1:-1;;;5387:189:27;;;;;;;:::i;:::-;5588:27;;;;-1:-1:-1;;;;;5588:48:27;;;:152;;;5640:100;5655:9;:27;;;5691:13;:23;;;3595:1:4;5640:14:27;:100::i;:::-;5580:189;;;;-1:-1:-1;;;5580:189:27;;;;;;;:::i;:::-;5781:25;;;;-1:-1:-1;;;;;5781:48:27;;;:152;;;5833:100;5848:13;:25;;;5884:9;:13;;;3595:1:4;5833:14:27;:100::i;:::-;5773:189;;;;-1:-1:-1;;;5773:189:27;;;;;;;:::i;:::-;5974:32;;;;-1:-1:-1;;;;;5974:48:27;;;:152;;;6026:100;6041:13;:32;;;6077:16;:27;;;3595:1:4;6026:14:27;:100::i;:::-;5966:189;;;;-1:-1:-1;;;5966:189:27;;;;;;;:::i;:::-;6167:31;;;;-1:-1:-1;;;;;6167:48:27;;;:152;;;6219:100;6234:13;:31;;;6270:13;:23;;;3595:1:4;6219:14:27;:100::i;:::-;6159:189;;;;-1:-1:-1;;;6159:189:27;;;;;;;:::i;:::-;6360:28;;;;-1:-1:-1;;;;;6360:48:27;;;:152;;;6412:100;6427:16;:28;;;6463:9;:13;;;3595:1:4;6412:14:27;:100::i;:::-;6352:189;;;;-1:-1:-1;;;6352:189:27;;;;;;;:::i;:::-;6553:32;;;;-1:-1:-1;;;;;6553:48:27;;;:152;;;6605:100;6620:16;:32;;;6656:13;:21;;;3595:1:4;6605:14:27;:100::i;:::-;6545:189;;;;-1:-1:-1;;;6545:189:27;;;;;;;:::i;:::-;6746:34;;;;-1:-1:-1;;;;;6746:48:27;;;:152;;;6798:100;6813:16;:34;;;6849:13;:23;;;3595:1:4;6798:14:27;:100::i;:::-;6738:189;;;;-1:-1:-1;;;6738:189:27;;;;;;;:::i;:::-;6975:19;;:::i;:::-;7015:21;;-1:-1:-1;;;;;7015:35:27;;;6998:14;;;:52;7103:16;;-1:-1:-1;;;7103:16:27;;7085:59;;7103:14;;;;:16;;:9;;:16;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7121:22;;7085:17;:59::i;:::-;7064:80;;;7169:29;;;;;;;7148:16;;;:50;7227:13;;7223:26;;;-1:-1:-1;;;7223:26:27;;;;-1:-1:-1;;;;;7223:24:27;;;;;;:26;;;;;;;;;;:24;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;7202:47:27;;;:12;;;;:47;;;;7262:13;;7289;;7262:41;;-1:-1:-1;;;7262:41:27;;:13;;;:26;;:41;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7254:116;;;;-1:-1:-1;;;7254:116:27;;;;;;;:::i;:::-;7382:79;7412:3;:12;;;7426:3;:18;;;7446:9;:14;;;7382:29;:79::i;:::-;7374:116;;;;-1:-1:-1;;;7374:116:27;;;;;;;:::i;:::-;7502:27;7516:3;:12;;;7502:13;:27::i;:::-;7494:123;;;;-1:-1:-1;;;7494:123:27;;;;;;;:::i;:::-;7639:3;:14;;;7635:694;;;7741:20;;-1:-1:-1;;;7741:20:27;;7723:63;;7741:18;;;;:20;;:13;;:20;;;:::i;7723:63::-;7698:22;;;:88;;;7816:33;;;;;;;7791:20;;;:58;7887:21;;7879:38;;;-1:-1:-1;;;7879:38:27;;;;-1:-1:-1;;;;;7879:36:27;;;;;;:38;;;;;;;;;;:36;:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;7854:63:27;;;:16;;;:63;7931:17;;7962:21;;7931:53;;-1:-1:-1;;;7931:53:27;;:17;;;;;:30;;:53;;7962:21;7931:53;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7923:128;;;;-1:-1:-1;;;7923:128:27;;;;;;;:::i;:::-;8064:91;8094:3;:16;;;8112:3;:22;;;8136:13;:18;;;8064:29;:91::i;:::-;8056:128;;;;-1:-1:-1;;;8056:128:27;;;;;;;:::i;:::-;8197:31;8211:3;:16;;;8197:13;:31::i;:::-;8189:135;;;;-1:-1:-1;;;8189:135:27;;;;;;;:::i;:::-;8395:23;;-1:-1:-1;;;8395:23:27;;8377:66;;8395:21;;;;:23;;:16;;:23;;;:::i;8377:66::-;8349:25;;;:94;;;8475:36;;;;;;;8447:23;;;:64;8554:27;;8543:47;;;-1:-1:-1;;;8543:47:27;;;;-1:-1:-1;;;;;8543:45:27;;;;;;:47;;;;;;;;;;:45;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;8515:75:27;;;:19;;;:75;8603:20;;8637:27;;8603:62;;-1:-1:-1;;;8603:62:27;;:20;;;;;:33;;:62;;8637:27;8603:62;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;8595:137;;;;-1:-1:-1;;;8595:137:27;;;;;;;:::i;:::-;8744:100;8774:3;:19;;;8795:3;:25;;;8822:16;:21;;;8744:29;:100::i;:::-;8736:137;;;;-1:-1:-1;;;8736:137:27;;;;;;;:::i;:::-;8885:34;8899:3;:19;;;8885:13;:34::i;:::-;8877:143;;;;-1:-1:-1;;;8877:143:27;;;;;;;:::i;:::-;9081:20;;-1:-1:-1;;;9081:20:27;;9063:63;;9081:18;;;;:20;;:13;;:20;;;:::i;9063:63::-;9038:22;;;:88;;;9155:33;;;;;;9130:20;;;:58;9230:23;;;;9279:18;;;;9200:98;;9038:88;9200:29;:98::i;:::-;9192:135;;;;-1:-1:-1;;;9192:135:27;;;;;;;:::i;:::-;9339:38;9353:13;:23;;;9339:13;:38::i;:::-;9331:142;;;;-1:-1:-1;;;9331:142:27;;;;;;;:::i;:::-;9608:16;;;;;9514:14;9597:35;;;:10;:35;;;;;;;;9569:16;;;;:64;;:20;:64::i;:::-;9532:101;;9646:3;:14;;;:102;;9742:6;9646:102;;;9713:20;;;;9702:35;;;;:10;:35;;;;;;;;9674:20;;;;9663:76;;9674:64;;:20;:24;:64::i;:::-;9663:6;;:10;:76::i;:::-;9828:23;;;;9817:35;;;;:10;:35;;;;;;;;9789:23;;;;9637:111;;-1:-1:-1;9778:76:27;;9789:64;;:27;:64::i;9778:76::-;9934:20;;;;9923:35;;;;:10;:35;;;;;;9895:20;;;;9752:102;;-1:-1:-1;9884:76:27;;9895:64;;:24;:64::i;9884:76::-;9858:102;;9981:1;9972:6;:10;9964:47;;;;-1:-1:-1;;;9964:47:27;;;;;;;:::i;:::-;10088:20;;;;10040:14;10139:32;;;:10;:32;;;;;;;;;10067:132;;10040:14;;10067:132;;10088:20;;10067:132;;:::i;:::-;;;;;;;-1:-1:-1;;10067:132:27;;;;;;10057:143;;10067:132;10057:143;;;;10205:33;10241:15;;;:7;:15;;;;;10288:13;;10260:41;;-1:-1:-1;;;;;;10260:41:27;;;-1:-1:-1;;;;;10260:41:27;;;;;;10333:12;;;;-1:-1:-1;10305:14:27;;:40;;;;;;;;;;;;;10377:18;;;;10349:14;;;:46;10427:16;;;;10399:18;;;:44;;;;;;;;;;;;;10475:21;;10399:12;;;10447:49;;;;;;;;;;;;;;10528:14;;;;10057:143;;-1:-1:-1;10528:47:27;;10574:1;10528:47;;;10545:13;:26;;;10528:47;10500:18;;;:75;10607:27;;10579:15;;;:55;;-1:-1:-1;;;;;10579:55:27;;;-1:-1:-1;;;;;;10579:55:27;;;;;;;;10666:19;;;10638:21;;;:47;;;;;;;;;;;10717:32;;;;10689:21;;;:60;10781:19;;;;:26;;10579:55;10781:23;:26::i;:::-;10753:10;;;:54;10839:22;;;;10811:13;;;:50;10865:8;;;:31;;;10928:23;;;;10900:14;;;:51;;-1:-1:-1;;;;;10900:51:27;;;-1:-1:-1;;;;;;10900:51:27;;;;;;;10983:25;;;;10955:16;;;:53;;;;;;;;;;;;;;11040:22;;;;11012:13;;;:50;;;;;;;;;;;11094:20;;;;11066:48;;;;:11;;;;:48;;;;;;:::i;:::-;-1:-1:-1;11146:3:27;11118:14;;;:31;11192:20;;;;11181:32;;;;:10;:32;;;;;;;;;;11153:13;;;:60;11217:12;;;:34;;;11338:27;;11327:66;;-1:-1:-1;;;11327:66:27;;;;11283:111;;-1:-1:-1;;;;;11327:64:27;;;;;;:66;;;;;;;;;;;:64;:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;11283:32;;;;;:43;:111::i;:::-;11255:4;:16;;:139;;;;11437:16;:27;;;-1:-1:-1;;;;;11426:68:27;;:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;11398:25;;;:98;11583:16;;;;;11572:35;;;;:10;:35;;;;;;;:68;;11629:6;11572:39;:68::i;:::-;11545:16;;;;;11534:35;;;;:10;:35;;;;;;:106;11722:14;;;;11682:68;;11722:27;;11748:1;11722:27;;;11739:6;11722:27;11693:20;;;;11682:35;;;;:10;:35;;;;;;;:39;:68::i;:::-;11655:20;;;;11644:35;;;;:10;:35;;;;;;:106;;;;11803:23;;;;11792:35;;;;:68;;11849:6;11792:39;:68::i;:::-;11765:23;;;;11754:35;;;;:10;:35;;;;;;:106;;;;11913:20;;;;11902:35;;;;:68;;11959:6;11902:39;:68::i;:::-;11875:20;;;;11864:35;;;;:10;:35;;;;;:106;12006:14;;;;12076:21;;;;12048:18;;;;12076:21;12025:14;;;11997:121;;-1:-1:-1;;;;;12006:14:27;;12025:89;;12107:6;;12025:73;;12076:21;12025:42;;:14;:22;:42::i;:::-;:50;;:73::i;:::-;:81;;:89::i;:::-;11997:4;:121::i;:::-;12131:21;;;;12157;;;;12122:194;;-1:-1:-1;;;;;12131:21:27;;12157:104;;12254:6;;12157:60;;3222:2:4;12157:36:27;:60::i;12122:194::-;12374:15;;;:23;12358:48;;-1:-1:-1;;;;;12374:23:27;;;;12358:48;;;;12399:6;;12358:48;:::i;:::-;;;;;;;;12455:138;12473:6;12484:3;:16;;;12505:3;:20;;;12530:3;:23;;;12558:3;:20;;;12583:6;12455:138;;;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1;12605:6:27;3200:9415;-1:-1:-1;;;;;;;;3200:9415:27:o;1689:145:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;1795:1:::1;1779:6:::0;;1758:40:::1;::::0;-1:-1:-1;;;;;1779:6:83;;::::1;::::0;1758:40:::1;::::0;1795:1;;1758:40:::1;1825:1;1808:19:::0;;-1:-1:-1;;;;;;1808:19:83::1;::::0;;1689:145::o;1066:77::-;1104:7;1130:6;-1:-1:-1;;;;;1130:6:83;1066:77;:::o;2725:214:27:-;2858:4;2876:59;2906:9;2917:5;2924:10;;2876:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2876:29:27;;-1:-1:-1;;;2876:59:27:i;2569:153::-;2664:4;2682:36;2701:9;2712:5;2682:18;:36::i;:::-;2675:43;;2569:153;;;;;:::o;1983:240:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;-1:-1:-1;;;;;2071:22:83;::::1;2063:73;;;;-1:-1:-1::0;;;2063:73:83::1;;;;;;;:::i;:::-;2172:6;::::0;;2151:38:::1;::::0;-1:-1:-1;;;;;2151:38:83;;::::1;::::0;2172:6;::::1;::::0;2151:38:::1;::::0;::::1;2199:6;:17:::0;;-1:-1:-1;;;;;;2199:17:83::1;-1:-1:-1::0;;;;;2199:17:83;;;::::1;::::0;;;::::1;::::0;;1983:240::o;4164:438:32:-;4272:4;4287:22;4299:9;4287:11;:22::i;:::-;4283:316;;;4322:55;;-1:-1:-1;;;4322:55:32;;-1:-1:-1;;;;;4322:36:32;;;;;:55;;4359:5;;4366:10;;4322:55;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4322:55:32;;;;;;;;-1:-1:-1;;4322:55:32;;;;;;;;;;;;:::i;:::-;;;4318:192;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4470:40;4318:192;;;-1:-1:-1;;;;;;4417:46:32;-1:-1:-1;;;4417:46:32;;-1:-1:-1;4410:53:32;;4318:192;-1:-1:-1;4522:5:32;4515:12;;4283:316;4585:9;-1:-1:-1;;;;;4554:40:32;:27;4563:5;4570:10;4554:8;:27::i;:::-;-1:-1:-1;;;;;4554:40:32;;4547:47;;4283:316;4164:438;;;;;:::o;3719:273::-;3824:10;3861;-1:-1:-1;;;;;3848:23:32;:9;-1:-1:-1;;;;;3848:23:32;;:93;;;;3883:9;-1:-1:-1;;;;;3875:32:32;;3908:22;3919:10;3908;:22::i;:::-;3932:8;3875:66;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3841:100;3719:273;-1:-1:-1;;;;3719:273:32:o;1780:177::-;1873:12;1928:11;1941;1899:54;;;;;;;;;:::i;:::-;;;;;;;;;;;;;1892:61;;1780:177;;;;:::o;5524:257::-;5655:4;5673:51;5692:9;5713;5703:20;;;;;;5673:18;:51::i;:::-;:104;;;;5728:49;5744:9;5755;5766:10;5728:15;:49::i;1649:173:28:-;1760:4;1778:40;1810:7;1778:31;:40::i;470:124:77:-;528:7;555:1;550;:6;;542:15;;;;;;-1:-1:-1;573:5:77;;;470:124::o;1869:96::-;1927:7;1952:1;1948;:5;:13;;1960:1;1948:13;;;-1:-1:-1;1956:1:77;;1869:96;-1:-1:-1;1869:96:77:o;1715:97::-;1773:7;1799:1;1794;:6;;:14;;1807:1;1794:14;;2218:114;2283:7;2304:24;2318:1;2321;2324:3;2304:13;:24::i;227:124::-;285:7;311:5;;;328:6;;;;320:15;;;;;669:362;727:7;944:6;940:32;;-1:-1:-1;966:1:77;959:8;;940:32;987:5;;;991:1;987;:5;:1;1004:5;;;;;:10;996:19;;;;;4213:228:16;4293:47;4312:4;4326;4333:6;4293:18;:47::i;:::-;-1:-1:-1;;;;;4362:15:16;;;;;;:9;:15;;;;;;:27;;4382:6;4362:19;:27::i;:::-;-1:-1:-1;;;;;4344:15:16;;;;;;:9;:15;;;;;;;:45;;;;4398:18;;;;;4354:4;;4409:6;;4398:18;:::i;:::-;;;;;;;;4213:228;;:::o;590:104:81:-;677:10;590:104;:::o;5292:229:32:-;5414:4;5432:36;5451:9;5462:5;5432:18;:36::i;:::-;:85;;;;5472:45;5488:9;5499:5;5506:10;5472:15;:45::i;3995:166::-;4081:4;-1:-1:-1;;;;;4099:23:32;;;;;;:58;;-1:-1:-1;;4139:18:32;;;;:11;:18;;;;;;-1:-1:-1;;;;;4139:18:32;;;4126:31;;;;3995:166::o;2957:562::-;3019:4;3439:20;;3296:66;3472:23;;;;;;:42;;-1:-1:-1;;3499:15:32;;;3464:51;-1:-1:-1;;2957:562:32:o;2067:820::-;2144:7;2158:9;2171;2184;2202:5;:12;2218:2;2202:18;2198:572;;;-1:-1:-1;;;2302:4:32;2291:16;;2285:23;2343:4;2332:16;;2326:23;2384:4;2373:16;;2367:23;2364:1;2359:32;2266:130;;;2412:5;:12;2428:2;2412:18;2408:362;;;-1:-1:-1;;;2534:4:32;2523:16;;2517:23;2582:4;2571:16;;2565:23;-1:-1:-1;;;;;2550:107:32;;;2679:1;2674:32;2671:1;2667:40;2491:221;;;2731:34;;-1:-1:-1;;;2731:34:32;;;;;;;:::i;2408:362::-;2782:2;2778:1;:6;;;2774:19;;;2791:2;2786:7;2774:19;2805:1;:7;;2810:2;2805:7;:18;;;;2816:1;:7;;2821:2;2816:7;2805:18;2797:50;;;;-1:-1:-1;;;2797:50:32;;;;;;;:::i;:::-;2858:25;2868:5;2875:1;2878;2881;2858:25;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2858:25:32;;-1:-1:-1;;2858:25:32;;;2067:820;-1:-1:-1;;;;;;;2067:820:32:o;3573:107::-;-1:-1:-1;;;;;3661:14:32;;3573:107::o;4605:684::-;4722:4;4737:22;4749:9;4737:11;:22::i;:::-;4733:553;;;4772:59;;-1:-1:-1;;;4772:59:32;;-1:-1:-1;;;;;4772:36:32;;;;;:59;;4809:9;;4820:10;;4772:59;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4772:59:32;;;;;;;;-1:-1:-1;;4772:59:32;;;;;;;;;;;;:::i;:::-;;;4768:199;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4927:40;4768:199;;;-1:-1:-1;;;;;;4871:46:32;-1:-1:-1;;;4871:46:32;;-1:-1:-1;4864:53:32;;4768:199;5013:20;;;;;;4976:70;;-1:-1:-1;;;4976:70:32;;-1:-1:-1;;;;;4976:36:32;;;;;:70;;5013:20;5035:10;;4976:70;;;:::i;4733:553::-;5272:9;-1:-1:-1;;;;;5226:55:32;:42;5245:9;5235:20;;;;;;5257:10;5226:8;:42::i;1382:124:17:-;1476:11;;:26;;-1:-1:-1;;;1476:26:17;;1458:4;;-1:-1:-1;;;;;1476:11:17;;:17;;:26;;1494:7;;1476:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2022:121:77:-;2101:7;2122:17;2126:9;2130:1;2133;2126:3;:9::i;:::-;2137:1;2122:3;:17::i;1755:404:16:-;-1:-1:-1;;;;;1857:20:16;;1849:70;;;;-1:-1:-1;;;1849:70:16;;;;;;;:::i;:::-;-1:-1:-1;;;;;1931:23:16;;1923:71;;;;-1:-1:-1;;;1923:71:16;;;;;;;:::i;:::-;-1:-1:-1;;;;;2020:18:16;;;;;;:10;:18;;;;;;:30;;2043:6;2020:22;:30::i;:::-;-1:-1:-1;;;;;1999:18:16;;;;;;;:10;:18;;;;;;:51;;;;2078:21;;;;;;;:33;;2104:6;2078:25;:33::i;:::-;-1:-1:-1;;;;;2054:21:16;;;;;;;:10;:21;;;;;;;:57;;;;2120:35;;;;;;;;;;2148:6;;2120:35;:::i;:::-;;;;;;;;1755:404;;;:::o;1147:268:77:-;1205:7;1293:1;1289;:5;1281:14;;;;;;1300:9;1316:1;1312;:5;;;;;;;1147:268;-1:-1:-1;;;;1147:268:77:o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;5:130;72:20;;97:33;72:20;97:33;:::i;1194:440::-;;1295:3;1288:4;1280:6;1276:17;1272:27;1262:2;;-1:-1;;1303:12;1262:2;1350:6;1337:20;62012:18;62004:6;62001:30;61998:2;;;-1:-1;;62034:12;61998:2;1372:64;62107:9;62088:17;;-1:-1;;62084:33;62175:4;62165:15;1372:64;:::i;:::-;1363:73;;1456:6;1449:5;1442:21;1560:3;62175:4;1551:6;1484;1542:16;;1539:25;1536:2;;;1577:1;;1567:12;1536:2;64416:6;62175:4;1484:6;1480:17;62175:4;1518:5;1514:16;64393:30;64472:1;64454:16;;;62175:4;64454:16;64447:27;1518:5;1255:379;-1:-1;;1255:379::o;2133:1624::-;;2248:6;;2236:9;2231:3;2227:19;2223:32;2220:2;;;-1:-1;;2258:12;2220:2;2286:22;2248:6;2286:22;:::i;:::-;2277:31;;;2389:49;2434:3;2410:22;2389:49;:::i;:::-;2371:16;2364:75;2504:2;2562:9;2558:22;10331:20;2504:2;2523:5;2519:16;2512:75;2650:2;2708:9;2704:22;10331:20;2650:2;2669:5;2665:16;2658:75;2793:2;2851:9;2847:22;485:20;2793:2;2812:5;2808:16;2801:75;2982:49;3027:3;2948;3007:9;3003:22;2982:49;:::i;:::-;2948:3;2968:5;2964:16;2957:75;3141:49;3186:3;3107;3166:9;3162:22;3141:49;:::i;:::-;3107:3;3127:5;3123:16;3116:75;3299:49;3344:3;3265;3324:9;3320:22;3299:49;:::i;:::-;3265:3;3285:5;3281:16;3274:75;3410:3;3469:9;3465:22;485:20;3410:3;3430:5;3426:16;3419:75;3583:3;;3572:9;3568:19;3555:33;3608:18;3600:6;3597:30;3594:2;;;2357:1;;3630:12;3594:2;3677:58;3731:3;3722:6;3711:9;3707:22;3677:58;:::i;:::-;3583:3;3661:5;3657:18;3650:86;;;2214:1543;;;;:::o;5491:2775::-;;5610:6;;5598:9;5593:3;5589:19;5585:32;5582:2;;;-1:-1;;5620:12;5582:2;5648:22;5610:6;5648:22;:::i;:::-;5639:31;;;5751:49;5796:3;5772:22;5751:49;:::i;:::-;5733:16;5726:75;5869:2;5927:9;5923:22;10331:20;5869:2;5888:5;5884:16;5877:75;6049:49;6094:3;6016:2;6074:9;6070:22;6049:49;:::i;:::-;6016:2;6035:5;6031:16;6024:75;6171:2;6229:9;6225:22;10331:20;6171:2;6190:5;6186:16;6179:75;6355:49;6400:3;6321;6380:9;6376:22;6355:49;:::i;:::-;6321:3;6341:5;6337:16;6330:75;6480:3;6539:9;6535:22;10331:20;6480:3;6500:5;6496:16;6489:75;6664:49;6709:3;6630;6689:9;6685:22;6664:49;:::i;:::-;6630:3;6646:16;;6639:75;6777:3;6832:22;;;10331:20;6793:16;;;6786:75;6921:3;6978:22;;;485:20;6937:18;;;6930:77;7072:3;7129:22;;;10331:20;7088:18;;;7081:77;7220:3;7277:22;;;10331:20;7236:18;;;7229:77;7374:3;7410:49;7455:3;7431:22;;;7410:49;:::i;:::-;7390:18;;;7383:77;7525:3;7561:49;7606:3;7582:22;;;7561:49;:::i;:::-;7541:18;;;7534:77;7702:3;7687:19;;;7674:33;7727:18;7716:30;;;7713:2;;;5719:1;;7749:12;7713:2;7796:59;7851:3;7842:6;7831:9;7827:22;7796:59;:::i;:::-;7702:3;7780:5;7776:18;7769:87;7917:3;;;;7978:9;7974:22;485:20;7917:3;7937:5;7933:18;7926:77;8092:3;;;;8081:9;8077:19;8064:33;8050:47;;7727:18;8109:6;8106:30;8103:2;;;5719:1;;8139:12;8103:2;;8186:58;8240:3;8231:6;8220:9;8216:22;8186:58;:::i;10542:241::-;;10646:2;10634:9;10625:7;10621:23;10617:32;10614:2;;;-1:-1;;10652:12;10614:2;85:6;72:20;97:33;124:5;97:33;:::i;10790:263::-;;10905:2;10893:9;10884:7;10880:23;10876:32;10873:2;;;-1:-1;;10911:12;10873:2;226:6;220:13;238:33;265:5;238:33;:::i;11060:366::-;;;11181:2;11169:9;11160:7;11156:23;11152:32;11149:2;;;-1:-1;;11187:12;11149:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;11239:63;11339:2;11378:22;;;;485:20;;-1:-1;;;11143:283::o;11433:615::-;;;;;11590:2;11578:9;11569:7;11565:23;11561:32;11558:2;;;-1:-1;;11596:12;11558:2;85:6;72:20;97:33;124:5;97:33;:::i;:::-;11648:63;-1:-1;11748:2;11787:22;;485:20;;-1:-1;11884:2;11869:18;;11856:32;11908:18;11897:30;;;11894:2;;;-1:-1;;11930:12;11894:2;12015:6;12004:9;12000:22;;;963:3;956:4;948:6;944:17;940:27;930:2;;-1:-1;;971:12;930:2;1014:6;1001:20;11908:18;1033:6;1030:30;1027:2;;;-1:-1;;1063:12;1027:2;1158:3;11748:2;1138:17;1099:6;1124:32;;1121:41;1118:2;;;-1:-1;;1165:12;1118:2;11552:496;;;;-1:-1;;11748:2;1095:17;;-1:-1;;;11552:496::o;12055:257::-;;12167:2;12155:9;12146:7;12142:23;12138:32;12135:2;;;-1:-1;;12173:12;12135:2;364:6;358:13;65237:5;63783:13;63776:21;65215:5;65212:32;65202:2;;-1:-1;;65248:12;12319:263;;12434:2;12422:9;12413:7;12409:23;12405:32;12402:2;;;-1:-1;;12440:12;12402:2;-1:-1;633:13;;12396:186;-1:-1;12396:186::o;12589:261::-;;12703:2;12691:9;12682:7;12678:23;12674:32;12671:2;;;-1:-1;;12709:12;12671:2;773:13;;-1:-1;;;;;;63949:78;;65456:34;;65446:2;;-1:-1;;65494:12;12857:1199;;;;;13131:3;13119:9;13110:7;13106:23;13102:33;13099:2;;;-1:-1;;13138:12;13099:2;13196:17;13183:31;13234:18;;13226:6;13223:30;13220:2;;;-1:-1;;13256:12;13220:2;13286:79;13357:7;13348:6;13337:9;13333:22;13286:79;:::i;:::-;13276:89;;13430:2;13419:9;13415:18;13402:32;13388:46;;13234:18;13446:6;13443:30;13440:2;;;-1:-1;;13476:12;13440:2;13506:83;13581:7;13572:6;13561:9;13557:22;13506:83;:::i;:::-;13496:93;;13654:2;13643:9;13639:18;13626:32;13612:46;;13234:18;13670:6;13667:30;13664:2;;;-1:-1;;13700:12;13664:2;13799:6;13788:9;13784:22;;;8442:6;;8430:9;8425:3;8421:19;8417:32;8414:2;;;-1:-1;;8452:12;8414:2;8480:22;8442:6;8480:22;:::i;:::-;8471:31;;8590:49;8635:3;8611:22;8590:49;:::i;:::-;8572:16;8565:75;13430:2;8770:9;8766:22;10331:20;13430:2;8731:5;8727:16;8720:75;13654:2;8916:9;8912:22;10331:20;13654:2;8877:5;8873:16;8866:75;9001:2;9059:9;9055:22;485:20;9001:2;9020:5;9016:16;9009:75;13131:3;9208:9;9204:22;10331:20;13131:3;9169:5;9165:16;9158:75;9295:3;9354:9;9350:22;10331:20;9295:3;9315:5;9311:16;9304:75;9481:49;9526:3;9447;9506:9;9502:22;9481:49;:::i;:::-;9447:3;9467:5;9463:16;9456:75;9637:49;9682:3;9603;9662:9;9658:22;9637:49;:::i;:::-;9603:3;9623:5;9619:16;9612:75;9761:3;9797:49;9842:3;9761;9822:9;9818:22;9797:49;:::i;:::-;9777:18;;;9770:77;9908:3;9965:22;;;485:20;9924:18;;;9917:77;10083:3;10068:19;;;10055:33;10097:30;;;10094:2;;;-1:-1;;10130:12;10094:2;10177:58;10231:3;10222:6;10211:9;10207:22;10177:58;:::i;:::-;10083:3;10161:5;10157:18;10150:86;;;13720:96;;;;9001:2;13870:9;13866:18;13853:32;13839:46;;13234:18;13897:6;13894:30;13891:2;;;-1:-1;;13927:12;13891:2;;13957:83;14032:7;14023:6;14012:9;14008:22;13957:83;:::i;:::-;13947:93;;;13093:963;;;;;;;:::o;14333:113::-;-1:-1;;;;;64101:54;14404:37;;14398:48::o;15079:343::-;;15221:5;62613:12;62898:6;62893:3;62886:19;-1:-1;64561:101;64575:6;64572:1;64569:13;64561:101;;;62935:4;64642:11;;;;;64636:18;64623:11;;;;;64616:39;64590:10;64561:101;;;64677:6;64674:1;64671:13;64668:2;;;-1:-1;62935:4;64733:6;62930:3;64724:16;;64717:27;64668:2;-1:-1;62107:9;64995:14;-1:-1;;64991:28;15378:39;;;;62935:4;15378:39;;15169:253;-1:-1;;15169:253::o;29415:1777::-;;29576:6;62012:18;;64112:42;;;29649:16;29643:23;64101:54;14411:3;14404:37;29826:4;29819:5;29815:16;29809:23;29826:4;29898:3;29894:14;14753:37;29990:4;29983:5;29979:16;29973:23;29990:4;30062:3;30058:14;14753:37;30151:4;30144:5;30140:16;30134:23;30151:4;30223:3;30219:14;14753:37;30324:4;30317:5;30313:16;30307:23;30336:71;30324:4;30396:3;30392:14;30378:12;30336:71;:::i;:::-;;30500:4;30493:5;30489:16;30483:23;30512:71;30500:4;30572:3;30568:14;30554:12;30512:71;:::i;:::-;;30675:4;30668:5;30664:16;30658:23;30687:71;30675:4;30747:3;30743:14;30729:12;30687:71;:::i;:::-;;30837:4;30830:5;30826:16;30820:23;30837:4;30909:3;30905:14;14753:37;30999:6;;30992:5;30988:18;30982:25;29576:6;30999;31031:3;31027:16;31020:40;31075:79;29576:6;29571:3;29567:16;31135:12;31075:79;:::i;:::-;31176:11;29549:1643;-1:-1;;;;;;29549:1643::o;38961:392::-;14753:37;;;39214:2;39205:12;;14753:37;39316:12;;;39105:248::o;39360:659::-;-1:-1;;;20163:87;;20148:1;20269:11;;14753:37;;;;39871:12;;;14753:37;39982:12;;;39605:414::o;40026:222::-;-1:-1;;;;;64101:54;;;;14404:37;;40153:2;40138:18;;40124:124::o;40255:333::-;-1:-1;;;;;64101:54;;;;14404:37;;40574:2;40559:18;;14753:37;40410:2;40395:18;;40381:207::o;40595:210::-;63783:13;;63776:21;14636:34;;40716:2;40701:18;;40687:118::o;40812:222::-;14753:37;;;40939:2;40924:18;;40910:124::o;41041:780::-;14753:37;;;41473:2;41458:18;;14753:37;;;;41556:2;41541:18;;14753:37;;;;41639:2;41624:18;;14753:37;41722:3;41707:19;;14753:37;41806:3;41791:19;;14753:37;41308:3;41293:19;;41279:542::o;41828:417::-;;14783:5;14760:3;14753:37;42001:2;42119;42108:9;42104:18;42097:48;42159:76;42001:2;41990:9;41986:18;42221:6;42159:76;:::i;42592:548::-;14753:37;;;64317:4;64306:16;;;;42960:2;42945:18;;38914:35;43043:2;43028:18;;14753:37;43126:2;43111:18;;14753:37;42799:3;42784:19;;42770:370::o;43147:501::-;;43338:2;43359:17;43352:47;43413:76;43338:2;43327:9;43323:18;43475:6;43413:76;:::i;:::-;43537:9;43531:4;43527:20;43522:2;43511:9;43507:18;43500:48;43562:76;43633:4;43624:6;43562:76;:::i;43655:416::-;43855:2;43869:47;;;16350:2;43840:18;;;62886:19;16386:26;62926:14;;;16366:47;16432:12;;;43826:245::o;44078:416::-;44278:2;44292:47;;;16683:2;44263:18;;;62886:19;16719:26;62926:14;;;16699:47;16765:12;;;44249:245::o;44501:416::-;44701:2;44715:47;;;17016:2;44686:18;;;62886:19;17052:34;62926:14;;;17032:55;-1:-1;;;17107:12;;;17100:27;17146:12;;;44672:245::o;44924:416::-;45124:2;45138:47;;;17397:2;45109:18;;;62886:19;17433:26;62926:14;;;17413:47;17479:12;;;45095:245::o;45347:416::-;45547:2;45561:47;;;17730:2;45532:18;;;62886:19;17766:26;62926:14;;;17746:47;17812:12;;;45518:245::o;45770:416::-;45970:2;45984:47;;;18063:2;45955:18;;;62886:19;18099:26;62926:14;;;18079:47;18145:12;;;45941:245::o;46193:416::-;46393:2;46407:47;;;18396:2;46378:18;;;62886:19;18432:34;62926:14;;;18412:55;-1:-1;;;18487:12;;;18480:30;18529:12;;;46364:245::o;46616:416::-;46816:2;46830:47;;;18780:2;46801:18;;;62886:19;18816:26;62926:14;;;18796:47;18862:12;;;46787:245::o;47039:416::-;47239:2;47253:47;;;19113:2;47224:18;;;62886:19;19149:26;62926:14;;;19129:47;19195:12;;;47210:245::o;47462:416::-;47662:2;47676:47;;;19446:2;47647:18;;;62886:19;19482:26;62926:14;;;19462:47;19528:12;;;47633:245::o;47885:416::-;48085:2;48099:47;;;19779:2;48070:18;;;62886:19;19815:26;62926:14;;;19795:47;19861:12;;;48056:245::o;48308:416::-;48508:2;48522:47;;;20519:2;48493:18;;;62886:19;20555:26;62926:14;;;20535:47;20601:12;;;48479:245::o;48731:416::-;48931:2;48945:47;;;20852:2;48916:18;;;62886:19;20888:26;62926:14;;;20868:47;20934:12;;;48902:245::o;49154:416::-;49354:2;49368:47;;;21185:2;49339:18;;;62886:19;21221:26;62926:14;;;21201:47;21267:12;;;49325:245::o;49577:416::-;49777:2;49791:47;;;21518:2;49762:18;;;62886:19;21554:26;62926:14;;;21534:47;21600:12;;;49748:245::o;50000:416::-;50200:2;50214:47;;;21851:2;50185:18;;;62886:19;21887:26;62926:14;;;21867:47;21933:12;;;50171:245::o;50423:416::-;50623:2;50637:47;;;22184:2;50608:18;;;62886:19;22220:26;62926:14;;;22200:47;22266:12;;;50594:245::o;50846:416::-;51046:2;51060:47;;;22517:2;51031:18;;;62886:19;22553:26;62926:14;;;22533:47;22599:12;;;51017:245::o;51269:416::-;51469:2;51483:47;;;22850:2;51454:18;;;62886:19;22886:26;62926:14;;;22866:47;22932:12;;;51440:245::o;51692:416::-;51892:2;51906:47;;;23183:2;51877:18;;;62886:19;23219:26;62926:14;;;23199:47;23265:12;;;51863:245::o;52115:416::-;52315:2;52329:47;;;23516:2;52300:18;;;62886:19;23552:26;62926:14;;;23532:47;23598:12;;;52286:245::o;52538:416::-;52738:2;52752:47;;;23849:2;52723:18;;;62886:19;23885:26;62926:14;;;23865:47;23931:12;;;52709:245::o;52961:416::-;53161:2;53175:47;;;24182:2;53146:18;;;62886:19;24218:26;62926:14;;;24198:47;24264:12;;;53132:245::o;53384:416::-;53584:2;53598:47;;;24515:2;53569:18;;;62886:19;24551:26;62926:14;;;24531:47;24597:12;;;53555:245::o;53807:416::-;54007:2;54021:47;;;24848:2;53992:18;;;62886:19;24884:26;62926:14;;;24864:47;24930:12;;;53978:245::o;54230:416::-;54430:2;54444:47;;;25181:2;54415:18;;;62886:19;-1:-1;;;62926:14;;;25197:42;25258:12;;;54401:245::o;54653:416::-;54853:2;54867:47;;;54838:18;;;62886:19;25545:34;62926:14;;;25525:55;25599:12;;;54824:245::o;55076:416::-;55276:2;55290:47;;;25850:2;55261:18;;;62886:19;25886:26;62926:14;;;25866:47;25932:12;;;55247:245::o;55499:416::-;55699:2;55713:47;;;26183:2;55684:18;;;62886:19;26219:26;62926:14;;;26199:47;26265:12;;;55670:245::o;55922:416::-;56122:2;56136:47;;;26516:2;56107:18;;;62886:19;26552:26;62926:14;;;26532:47;26598:12;;;56093:245::o;56345:416::-;56545:2;56559:47;;;26849:2;56530:18;;;62886:19;26885:34;62926:14;;;26865:55;-1:-1;;;26940:12;;;26933:29;26981:12;;;56516:245::o;56768:416::-;56968:2;56982:47;;;27232:2;56953:18;;;62886:19;27268:26;62926:14;;;27248:47;27314:12;;;56939:245::o;57191:416::-;57391:2;57405:47;;;27565:2;57376:18;;;62886:19;27601:26;62926:14;;;27581:47;27647:12;;;57362:245::o;57614:416::-;57814:2;57828:47;;;27898:2;57799:18;;;62886:19;27934:26;62926:14;;;27914:47;27980:12;;;57785:245::o;58037:416::-;58237:2;58251:47;;;28231:2;58222:18;;;62886:19;28267:26;62926:14;;;28247:47;28313:12;;;58208:245::o;58460:416::-;58660:2;58674:47;;;28564:2;58645:18;;;62886:19;28600:26;62926:14;;;28580:47;28646:12;;;58631:245::o;58883:416::-;59083:2;59097:47;;;28897:2;59068:18;;;62886:19;28933:26;62926:14;;;28913:47;28979:12;;;59054:245::o;59306:416::-;59506:2;59520:47;;;29230:2;59491:18;;;62886:19;29266:26;62926:14;;;29246:47;29312:12;;;59477:245::o;59729:390::-;;59916:2;59937:17;59930:47;59991:118;59916:2;59905:9;59901:18;60095:6;59991:118;:::i;60539:406::-;;60734:2;60755:17;60748:47;33430:71;60734:2;60723:9;60719:18;33407:16;33401:23;33430:71;:::i;:::-;60734:2;33580:5;33576:16;33570:23;33655:14;60723:9;33655:14;14753:37;33655:14;33745:5;33741:16;33735:23;33764:71;33820:14;60723:9;33820:14;33806:12;33764:71;:::i;:::-;;33820:14;33918:5;33914:16;33908:23;33993:14;60723:9;33993:14;14753:37;33993:14;34086:5;34082:16;34076:23;34105:71;34161:14;60723:9;34161:14;34147:12;34105:71;:::i;:::-;;34161:14;34262:5;34258:16;34252:23;34337:14;60723:9;34337:14;14753:37;34337:14;34429:5;34425:16;34419:23;34448:71;34504:14;60723:9;34504:14;34490:12;34448:71;:::i;:::-;-1:-1;34504:14;34589:16;;34583:23;34668:14;;;;14753:37;;;;34750:18;;34744:25;34831:16;;;;14753:37;;;;34920:18;;34914:25;35001:16;;;;14753:37;;;;35087:18;;35081:25;35168:16;;;;14753:37;;;;35260:18;;35254:25;35341:16;35285:73;35341:16;;;35254:25;35285:73;:::i;:::-;35430:18;;35424:25;;-1:-1;35511:16;35455:73;35511:16;;;35424:25;35455:73;:::i;:::-;35511:16;35602:5;35598:18;35592:25;35572:45;;;33334:6;35637:16;33334:6;35637:16;60723:9;35637:16;35630:40;35685:81;33325:16;60723:9;33325:16;35747:12;35685:81;:::i;:::-;35840:18;;;35834:25;35921:16;;;;14753:37;;;;36006:18;;36000:25;36063:14;;;-1:-1;;36063:14;36045:16;;;36038:40;35677:89;;-1:-1;36093:79;35677:89;36000:25;36093:79;:::i;60952:418::-;;61153:2;61174:17;61167:47;36586:71;61153:2;61142:9;61138:18;36563:16;36557:23;36586:71;:::i;:::-;61153:2;36740:5;36736:16;36730:23;36815:14;61142:9;36815:14;14753:37;36815:14;36904:5;36900:16;36894:23;36979:14;61142:9;36979:14;14753:37;36979:14;37065:5;37061:16;37055:23;37140:14;61142:9;37140:14;14753:37;37140:14;37231:5;37227:16;37221:23;37306:14;61142:9;37306:14;14753:37;37306:14;37394:5;37390:16;37384:23;37469:14;61142:9;37469:14;14753:37;37469:14;37563:5;37559:16;37553:23;37582:71;37638:14;61142:9;37638:14;37624:12;37582:71;:::i;:::-;;37638:14;37736:5;37732:16;37726:23;37811:14;37755:71;37811:14;61142:9;37811:14;37797:12;37755:71;:::i;:::-;37907:18;;37901:25;;-1:-1;37988:16;37932:73;37988:16;;;37901:25;37932:73;:::i;:::-;38073:18;;38067:25;38154:16;;;;14753:37;;;;38239:18;;38233:25;36483:6;38278:16;;;38271:40;38233:25;-1:-1;38326:79;36474:16;;;38233:25;38326:79;:::i;61606:256::-;61668:2;61662:9;61694:17;;;61769:18;61754:34;;61790:22;;;61751:62;61748:2;;;61826:1;;61816:12;61748:2;61668;61835:22;61646:216;;-1:-1;61646:216::o;65032:117::-;-1:-1;;;;;64101:54;;65091:35;;65081:2;;65140:1;;65130:12;65081:2;65075:74;:::o", - "source": "// SPDX-License-Identifier: Apache-2.0\n\n/******************************************************************************\n * Copyright 2020 IEXEC BLOCKCHAIN TECH *\n * *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); *\n * you may not use this file except in compliance with the License. *\n * You may obtain a copy of the License at *\n * *\n * http://www.apache.org/licenses/LICENSE-2.0 *\n * *\n * Unless required by applicable law or agreed to in writing, software *\n * distributed under the License is distributed on an \"AS IS\" BASIS, *\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *\n * See the License for the specific language governing permissions and *\n * limitations under the License. *\n ******************************************************************************/\n\npragma solidity ^0.6.0;\npragma experimental ABIEncoderV2;\n\nimport \"./IexecPoco1Delegate.sol\";\nimport \"./IexecERC20CoreKYC.sol\";\n\n\ncontract IexecPoco1DelegateKYC is IexecPoco1Delegate, IexecERC20CoreKYC\n{\n\tfunction _beforeTokenTransfer(address from, address to, uint256 amount)\n\tinternal virtual override(IexecERC20Core, IexecERC20CoreKYC)\n\t{\n\t\tIexecERC20CoreKYC._beforeTokenTransfer(from, to, amount);\n\t}\n\n\tfunction _isAuthorized(address account)\n\tinternal virtual override(IexecERC20Core, IexecERC20CoreKYC) returns (bool)\n\t{\n\t\treturn IexecERC20CoreKYC._isAuthorized(account);\n\t}\n}\n", - "sourcePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco1DelegateKYC.sol", - "ast": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco1DelegateKYC.sol", - "exportedSymbols": { - "IexecPoco1DelegateKYC": [ - 6237 - ] - }, - "id": 6238, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6192, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:28" - }, - { - "id": 6193, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "1266:33:28" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco1Delegate.sol", - "file": "./IexecPoco1Delegate.sol", - "id": 6194, - "nodeType": "ImportDirective", - "scope": 6238, - "sourceUnit": 6191, - "src": "1301:34:28", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol", - "file": "./IexecERC20CoreKYC.sol", - "id": 6195, - "nodeType": "ImportDirective", - "scope": 6238, - "sourceUnit": 2996, - "src": "1336:33:28", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6196, - "name": "IexecPoco1Delegate", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6190, - "src": "1406:18:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecPoco1Delegate_$6190", - "typeString": "contract IexecPoco1Delegate" - } - }, - "id": 6197, - "nodeType": "InheritanceSpecifier", - "src": "1406:18:28" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6198, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1426:17:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - }, - "id": 6199, - "nodeType": "InheritanceSpecifier", - "src": "1426:17:28" - } - ], - "contractDependencies": [ - 309, - 1658, - 2939, - 2995, - 6190, - 8801, - 9731, - 13161, - 13173, - 13740, - 14132 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6237, - "linearizedBaseContracts": [ - 6237, - 2995, - 6190, - 8801, - 2939, - 1658, - 13161, - 309, - 13173, - 14132, - 13740, - 9731 - ], - "name": "IexecPoco1DelegateKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "baseFunctions": [ - 2473, - 2994 - ], - "body": { - "id": 6219, - "nodeType": "Block", - "src": "1582:64:28", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6214, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6201, - "src": "1625:4:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6215, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6203, - "src": "1631:2:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6216, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6205, - "src": "1635:6:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6211, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1586:17:28", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 6213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_beforeTokenTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2994, - "src": "1586:38:28", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 6217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1586:56:28", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6218, - "nodeType": "ExpressionStatement", - "src": "1586:56:28" - } - ] - }, - "documentation": null, - "id": 6220, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 6209, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 6207, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1546:14:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 6208, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1562:17:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1537:43:28" - }, - "parameters": { - "id": 6206, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6201, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 6220, - "src": "1477:12:28", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6200, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1477:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6203, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 6220, - "src": "1491:10:28", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6202, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1491:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6205, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 6220, - "src": "1503:14:28", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6204, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1503:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1476:42:28" - }, - "returnParameters": { - "id": 6210, - "nodeType": "ParameterList", - "parameters": [], - "src": "1582:0:28" - }, - "scope": 6237, - "src": "1447:199:28", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "baseFunctions": [ - 2463, - 2959 - ], - "body": { - "id": 6235, - "nodeType": "Block", - "src": "1767:55:28", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6232, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6222, - "src": "1810:7:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 6230, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1778:17:28", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 6231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_isAuthorized", - "nodeType": "MemberAccess", - "referencedDeclaration": 2959, - "src": "1778:31:28", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", - "typeString": "function (address) returns (bool)" - } - }, - "id": 6233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1778:40:28", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 6229, - "id": 6234, - "nodeType": "Return", - "src": "1771:47:28" - } - ] - }, - "documentation": null, - "id": 6236, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_isAuthorized", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 6226, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 6224, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1716:14:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 6225, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1732:17:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1707:43:28" - }, - "parameters": { - "id": 6223, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6222, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 6236, - "src": "1672:15:28", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6221, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1672:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1671:17:28" - }, - "returnParameters": { - "id": 6229, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6228, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 6236, - "src": "1760:4:28", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6227, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1760:4:28", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1759:6:28" - }, - "scope": 6237, - "src": "1649:173:28", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 6238, - "src": "1372:452:28" - } - ], - "src": "1242:583:28" - }, - "legacyAST": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco1DelegateKYC.sol", - "exportedSymbols": { - "IexecPoco1DelegateKYC": [ - 6237 - ] - }, - "id": 6238, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 6192, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:28" - }, - { - "id": 6193, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "1266:33:28" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco1Delegate.sol", - "file": "./IexecPoco1Delegate.sol", - "id": 6194, - "nodeType": "ImportDirective", - "scope": 6238, - "sourceUnit": 6191, - "src": "1301:34:28", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol", - "file": "./IexecERC20CoreKYC.sol", - "id": 6195, - "nodeType": "ImportDirective", - "scope": 6238, - "sourceUnit": 2996, - "src": "1336:33:28", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6196, - "name": "IexecPoco1Delegate", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 6190, - "src": "1406:18:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecPoco1Delegate_$6190", - "typeString": "contract IexecPoco1Delegate" - } - }, - "id": 6197, - "nodeType": "InheritanceSpecifier", - "src": "1406:18:28" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 6198, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1426:17:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - }, - "id": 6199, - "nodeType": "InheritanceSpecifier", - "src": "1426:17:28" - } - ], - "contractDependencies": [ - 309, - 1658, - 2939, - 2995, - 6190, - 8801, - 9731, - 13161, - 13173, - 13740, - 14132 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 6237, - "linearizedBaseContracts": [ - 6237, - 2995, - 6190, - 8801, - 2939, - 1658, - 13161, - 309, - 13173, - 14132, - 13740, - 9731 - ], - "name": "IexecPoco1DelegateKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "baseFunctions": [ - 2473, - 2994 - ], - "body": { - "id": 6219, - "nodeType": "Block", - "src": "1582:64:28", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6214, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6201, - "src": "1625:4:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6215, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6203, - "src": "1631:2:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 6216, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6205, - "src": "1635:6:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 6211, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1586:17:28", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 6213, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_beforeTokenTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2994, - "src": "1586:38:28", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 6217, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1586:56:28", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 6218, - "nodeType": "ExpressionStatement", - "src": "1586:56:28" - } - ] - }, - "documentation": null, - "id": 6220, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 6209, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 6207, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1546:14:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 6208, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1562:17:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1537:43:28" - }, - "parameters": { - "id": 6206, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6201, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 6220, - "src": "1477:12:28", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6200, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1477:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6203, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 6220, - "src": "1491:10:28", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6202, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1491:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 6205, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 6220, - "src": "1503:14:28", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 6204, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1503:7:28", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1476:42:28" - }, - "returnParameters": { - "id": 6210, - "nodeType": "ParameterList", - "parameters": [], - "src": "1582:0:28" - }, - "scope": 6237, - "src": "1447:199:28", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "baseFunctions": [ - 2463, - 2959 - ], - "body": { - "id": 6235, - "nodeType": "Block", - "src": "1767:55:28", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 6232, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6222, - "src": "1810:7:28", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 6230, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1778:17:28", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 6231, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_isAuthorized", - "nodeType": "MemberAccess", - "referencedDeclaration": 2959, - "src": "1778:31:28", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", - "typeString": "function (address) returns (bool)" - } - }, - "id": 6233, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1778:40:28", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 6229, - "id": 6234, - "nodeType": "Return", - "src": "1771:47:28" - } - ] - }, - "documentation": null, - "id": 6236, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_isAuthorized", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 6226, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 6224, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1716:14:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 6225, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1732:17:28", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1707:43:28" - }, - "parameters": { - "id": 6223, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6222, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 6236, - "src": "1672:15:28", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 6221, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1672:7:28", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1671:17:28" - }, - "returnParameters": { - "id": 6229, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 6228, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 6236, - "src": "1760:4:28", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 6227, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1760:4:28", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1759:6:28" - }, - "scope": 6237, - "src": "1649:173:28", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 6238, - "src": "1372:452:28" - } - ], - "src": "1242:583:28" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.2.2", - "updatedAt": "2020-11-09T09:15:00.628Z", - "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/IexecPoco2DelegateKYC.json b/build/contracts/IexecPoco2DelegateKYC.json deleted file mode 100644 index 288fad597..000000000 --- a/build/contracts/IexecPoco2DelegateKYC.json +++ /dev/null @@ -1,1826 +0,0 @@ -{ - "contractName": "IexecPoco2DelegateKYC", - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "worker", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - } - ], - "name": "AccurateContribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "worker", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - } - ], - "name": "FaultyContribution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Lock", - "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": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Reward", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "ref", - "type": "bytes32" - } - ], - "name": "Seize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - } - ], - "name": "TaskClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "consensus", - "type": "bytes32" - } - ], - "name": "TaskConsensus", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "worker", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "name": "TaskContribute", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "results", - "type": "bytes" - } - ], - "name": "TaskFinalize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "workerpool", - "type": "address" - } - ], - "name": "TaskInitialize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - } - ], - "name": "TaskReopen", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "taskid", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "worker", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "digest", - "type": "bytes32" - } - ], - "name": "TaskReveal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Unlock", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_taskid", - "type": "bytes32" - } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "_taskid", - "type": "bytes32[]" - } - ], - "name": "claimArray", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_taskid", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_resultHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_resultSeal", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "_enclaveChallenge", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_enclaveSign", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "_authorizationSign", - "type": "bytes" - } - ], - "name": "contribute", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_taskid", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_resultDigest", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_results", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "_resultsCallback", - "type": "bytes" - }, - { - "internalType": "address", - "name": "_enclaveChallenge", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_enclaveSign", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "_authorizationSign", - "type": "bytes" - } - ], - "name": "contributeAndFinalize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_taskid", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_results", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "_resultsCallback", - "type": "bytes" - } - ], - "name": "finalize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_dealid", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "idx", - "type": "uint256" - } - ], - "name": "initialize", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "_dealid", - "type": "bytes32[]" - }, - { - "internalType": "uint256[]", - "name": "_idx", - "type": "uint256[]" - } - ], - "name": "initializeAndClaimArray", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32[]", - "name": "_dealid", - "type": "bytes32[]" - }, - { - "internalType": "uint256[]", - "name": "_idx", - "type": "uint256[]" - } - ], - "name": "initializeArray", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "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": "_taskid", - "type": "bytes32" - } - ], - "name": "reopen", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_taskid", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_resultDigest", - "type": "bytes32" - } - ], - "name": "reveal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"worker\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"taskid\",\"type\":\"bytes32\"}],\"name\":\"AccurateContribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"worker\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"taskid\",\"type\":\"bytes32\"}],\"name\":\"FaultyContribution\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Lock\",\"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\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"ref\",\"type\":\"bytes32\"}],\"name\":\"Reward\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"ref\",\"type\":\"bytes32\"}],\"name\":\"Seize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"taskid\",\"type\":\"bytes32\"}],\"name\":\"TaskClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"taskid\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"consensus\",\"type\":\"bytes32\"}],\"name\":\"TaskConsensus\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"taskid\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"worker\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"TaskContribute\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"taskid\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"results\",\"type\":\"bytes\"}],\"name\":\"TaskFinalize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"taskid\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"workerpool\",\"type\":\"address\"}],\"name\":\"TaskInitialize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"taskid\",\"type\":\"bytes32\"}],\"name\":\"TaskReopen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"taskid\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"worker\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"digest\",\"type\":\"bytes32\"}],\"name\":\"TaskReveal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Unlock\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskid\",\"type\":\"bytes32\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_taskid\",\"type\":\"bytes32[]\"}],\"name\":\"claimArray\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskid\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_resultHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_resultSeal\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_enclaveChallenge\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_enclaveSign\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_authorizationSign\",\"type\":\"bytes\"}],\"name\":\"contribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskid\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_resultDigest\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_results\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_resultsCallback\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"_enclaveChallenge\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_enclaveSign\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_authorizationSign\",\"type\":\"bytes\"}],\"name\":\"contributeAndFinalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskid\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"_results\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_resultsCallback\",\"type\":\"bytes\"}],\"name\":\"finalize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_dealid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"idx\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_dealid\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_idx\",\"type\":\"uint256[]\"}],\"name\":\"initializeAndClaimArray\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"_dealid\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_idx\",\"type\":\"uint256[]\"}],\"name\":\"initializeArray\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"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\":\"_taskid\",\"type\":\"bytes32\"}],\"name\":\"reopen\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_taskid\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_resultDigest\",\"type\":\"bytes32\"}],\"name\":\"reveal\",\"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\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco2KYCDelegate.sol\":\"IexecPoco2DelegateKYC\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/Store.sol\":{\"keccak256\":\"0xbc74ce351bc304d65cc20a95bad8290711ac47267b7cfff5500cdeff42b1a18b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f92ebcd5817a7d6f20ef48662f985e9bdb8a68f3752249a14a1a4cbb8b99f190\",\"dweb:/ipfs/QmZAph8GSDPRkXxNUsQpGCXDsmMSGo6Pr5HFg2f4ZXgRZc\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC1404.sol\":{\"keccak256\":\"0xec243d84d26dd07f7a93a6f0665d56d60d20b139bf7f201a502a438ac95ac771\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://75cd876336f5cb77d0492f2082912fa42b526cf00820f1f0a0e8be012d402360\",\"dweb:/ipfs/QmZWgMF27i1JfGbgc7FTny9YkoFWDXiYh9gjpfXnHVLWy8\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC20KYC.sol\":{\"keccak256\":\"0xc2aa3e67c31421ad6f43594875c1d5c5a62366d19ef22485d4764a9c2e53ab7c\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://f15679680aa5a9590707ab921d90569eb7e30a3c8340a4d9d0bef3ac5375d56b\",\"dweb:/ipfs/QmWZovmERYpAu3FKW7Ea3gZZeangFyGpkpgcLEggbkqhdM\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/erlc/IERC677.sol\":{\"keccak256\":\"0x2fc0f8ca46db18638bd9daed90a3e6bd90fec77ef4c899b7aa1b28010355d096\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c213b13843b23ba7b755ad821c07b77cfacafddc5348a2191c164300344818ce\",\"dweb:/ipfs/QmSruFZbrEuzJFmRbbzZL3GehKpqEm6RfVGcuZZGwBedsp\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/libs/IexecLibCore_v5.sol\":{\"keccak256\":\"0x7fab9c16493884c64cdd31627c5d71389de785becf611b738343d75f7495471d\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://3e243796363e7d4cd249b432a2511cdb49759ed7d2e8bd73817f09ff60ff919c\",\"dweb:/ipfs/Qmeat95AtRviDFcJ3W3aBZmH51aHReX9RLnPZ3Gof3FnzW\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/libs/IexecLibOrders_v5.sol\":{\"keccak256\":\"0x430eaa82ce8d43771c8a84af5113e31de79490d5b9d561ef90034bdc5a2a993b\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://65cb57ac25afa5b6e0811290866aace3b013fe67aa82c5e72b6bb00d50e9f28a\",\"dweb:/ipfs/QmTTNTASsnM8db9vTjkbxz5kiNtqVxNrjwxkvVEmoHuMj9\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/DelegateBase.sol\":{\"keccak256\":\"0xb59c042fe327f79a7c13fca4f0512c643545b51045a07517723dd1104fcb68f1\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://42231705416aaefd95467b78933eb5dc4c71d5f0eebd3628f60cb2388109e4ec\",\"dweb:/ipfs/QmU7Eeejx7tGcAP14D1XinQgt4Mjfo2a3Ur7cipLPzjPqx\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20Core.sol\":{\"keccak256\":\"0x28db238625e52e31aa9d602612e6874d2a1f8091063dd04e8cd7870642af3d54\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e6e5db14c0e38900a3f92476f45c608b143fd83fa48fffe82bd03bd4a28a1bc6\",\"dweb:/ipfs/QmecHBiCZgekCafN6BnopvRuiiZ9GjRn6PeM6x7PHkUHLZ\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol\":{\"keccak256\":\"0x74e0cfc2f63fec8064535691819308cc537140ba22494d64bfd4bb748d9c0f74\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://93c10dce05b3e05084715c3660b61a5e9b7e21db85da2899cfcac9a7f03df7ff\",\"dweb:/ipfs/QmNoHo5uPYPqusH7cki6j2afHbCE1zWovU8V1QzTpCKwi6\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco2Delegate.sol\":{\"keccak256\":\"0xb2866b2953e13cf29cb80d0fa1206cd53c9b83853afb68fcef6e743819c6c952\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://0da7d72d317661d281d3608ac33e8794c795edddece1c9b3e73dd356fd9dc099\",\"dweb:/ipfs/QmQPzy1CLT5ZbBmfdSDBj7vGF8ebRBQTqN7NXDrhjAQ3Td\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco2KYCDelegate.sol\":{\"keccak256\":\"0x714f496856ef6d02a6af3cb53a5b4185300602fe6f8c6a0d7d54e2685a6ed715\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://bc4a0a35ee62ee1cd349757bb9c927331789ae1c61f4901ffa8b3643f143bc67\",\"dweb:/ipfs/QmbbtmhcfMgBVWg85ujiZJGUGqsdfUtAzeniPm6Ed1Mh4s\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/SignatureVerifier.sol\":{\"keccak256\":\"0xba769d239982db0002541e750395aaceda605036bc1a7a1bb9982780c3cc206d\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://d7404ee2d2a812df8af1b31efa41c40a4576fb361beccd044320a8bd3fe778e6\",\"dweb:/ipfs/QmaxWP1sWGHahrUBdfvrvTJJAuyoWoGRQ1Pz68qAJhLzZw\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/interfaces/IexecPoco2.sol\":{\"keccak256\":\"0x37a8fbf46336d6eb8bdcfb68dc26611197539fbb1ee1d9ca5e36d97004858122\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c474b6dfb549a06e0548d5dc74aaf93ca622b52e45a06bdeff67482ab4218369\",\"dweb:/ipfs/QmdUSHD4wyvsdgeymZ5wfVWCJbZ4qWALH6st4JomdGFiQN\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/IRegistry.sol\":{\"keccak256\":\"0xc735f7764e312ea161551bc1a2749820928b1bf80c4aeb2f528a2f4a498078cd\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://7dbefb9d9bec9b56f694d2ee6dc0a44b341c027c0d392534b457867208f019b9\",\"dweb:/ipfs/QmSiSkhgUcAGscopDoRtGnHiWAbxNwBf9ZV8nnVYoWqZ8Z\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/Registry.sol\":{\"keccak256\":\"0x18bdeaad129f5034937fb69a7afbd68ffba8341172a7a124d6be22d6cd2cc5ad\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e77b038842b0c19eb8cb2bac495025ec2fe074472370708cc0b6b6a9e6e5275c\",\"dweb:/ipfs/QmNPUSUBUPezTebKA3VzRu8u5KKuYiKGP1m3yME2J6YnSc\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/RegistryEntry.sol\":{\"keccak256\":\"0xc5e7a46311946df50486dd451f456aee0abe92184dbc31e3a40fc9198f8f6582\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://24f058496713a743781c3353477a03255cdce4cfca845883d207a62346c5c684\",\"dweb:/ipfs/QmVVrLgcoAetTY7EsL3fWfC7VuqKzh1ncVF8spkEkgPQot\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/apps/App.sol\":{\"keccak256\":\"0x1408d4f83f2c512ce71a680975d480fffb5ff417b2ecc37de45076e8d8f43d1a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e817bcc02c7e8547179b0293ed61b4066a04ab3e2b7cda6db90b41e42cabcecc\",\"dweb:/ipfs/QmVPJzM6SXg4ngSSHi2kioQ2htbJPUta5ZMyrgMnAGmrW6\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/datasets/Dataset.sol\":{\"keccak256\":\"0xf58ec4bed61a76b9d557e7b1f486fced23cb4dfc5047fc93ba6b4684c1624c2a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://530858af626fb5598eb9c973b9d3a0c2c1d431b43ca9e7c49143ab5edf619d67\",\"dweb:/ipfs/QmRkksj1gDnz1kcB6JFKuBKXD3mq52SsjuPN5SMUqSK46u\"]},\"/home/amxx/Work/iExec/code/PoCo-dev/contracts/registries/workerpools/Workerpool.sol\":{\"keccak256\":\"0x5604f1f935ea198caa899dfd96af42f9f2280954c9798caa58e9cf198b8d492e\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://10fabd01e983ad441a08c57ff78451237c0d350ba7e0cab42a7dccbf784209bd\",\"dweb:/ipfs/Qmbt3eiERXv3QUHHJAFKwfgrCNz6ZcA1ccUWtztLFiv9Av\"]},\"@iexec/interface/contracts/IexecClerk.sol\":{\"keccak256\":\"0x703252a638a5a7e2b600395fd920712a1ac259018bc9578fe581a77fa2f008a9\",\"urls\":[\"bzz-raw://072b9e948e5ac4a7f60466c23b322ea0f1aca711f1a94616e658600c2a4c36a2\",\"dweb:/ipfs/QmRP57bkhWDr5BeawfjiKsbdwFiHnw6nc6zgiEad3hQoSJ\"]},\"@iexec/interface/contracts/IexecHub.sol\":{\"keccak256\":\"0x8e293b7624550823838ed9113400544c5980afac1043ddacad7a862c91b0840d\",\"urls\":[\"bzz-raw://ae34ebc355838595ee69b24a31e60deb186455cc388c88de7ecd0294c7037075\",\"dweb:/ipfs/QmUYVQJBWG7ohAYksJRDJKcJVyPMXNFJSPWMAuQcGfWHo7\"]},\"@iexec/interface/contracts/IexecRegistries.sol\":{\"keccak256\":\"0xb39eef47d62d8751c5adfeaf169ce57b50c480788be8356289bc28b78bc24fde\",\"urls\":[\"bzz-raw://a86593f1ef9953ac0965aab4e764374580a899a7f7871ad66b432523171063a1\",\"dweb:/ipfs/QmcYZhHD45APoS1Ebi416DhXU3fiCzoFW2WSMux4AxhFqk\"]},\"@iexec/interface/contracts/libs/IexecODBLibCore.sol\":{\"keccak256\":\"0x3fc7ff4152e9a8f9747d42e262c15c3d460d409732711d9e1da8a88163880183\",\"urls\":[\"bzz-raw://8bacc98b866852e9f1e3563948381cba142ab61d6b1a7c62fbc53b7d57aa0589\",\"dweb:/ipfs/QmUNjhjBxdtHQFWQ61CgnPoaAzL767tQSKF6x34VFWeRyF\"]},\"@iexec/interface/contracts/libs/IexecODBLibOrders.sol\":{\"keccak256\":\"0xe2848a685785b09dc9ee5a6e6329a417eaf18e520388e8575d45a5376b1d62ca\",\"urls\":[\"bzz-raw://d1385ab26f382baa7aadb80faed54290296be09eeccbee1193a1b8a53b0b15d5\",\"dweb:/ipfs/QmUQTFcGX5VZiYwHKu9Yjc4PHNrMgdAyKwKi6tFEMsbaJk\"]},\"@iexec/solidity/contracts/ENStools/ENSReverseRegistration.sol\":{\"keccak256\":\"0xd1e5b9222925769b40cbf20a4b96d9d3fa462cca6e40d0d9021033ebb0a7d584\",\"urls\":[\"bzz-raw://0e47b7621c8f6cee3c5900f0545cb563fa763712cf235d320fd88d0857699ed1\",\"dweb:/ipfs/QmS18tjVQ6oxc7MHUK5DKLrRSX1v7N4e5Pc6xKjJCNcFv3\"]},\"@iexec/solidity/contracts/ENStools/IENS.sol\":{\"keccak256\":\"0xb109a681632d71269ed4efbe11fc9d1bcee6bc29109f2fb8ced6951dafc28302\",\"urls\":[\"bzz-raw://920ee6b3712ebe1cb28977abf4ded033067305d786116f94777ab03a6b6b9ee9\",\"dweb:/ipfs/QmWFCBtMLUZYJ2cxzHBjHq5WZC8Yydnbk6dezoXHT4Pxgz\"]},\"@iexec/solidity/contracts/ENStools/IReverseRegistrar.sol\":{\"keccak256\":\"0xff985fd263e59bd387e543cd5cf99235ab6e066b6d1be95e79108dacc749673f\",\"urls\":[\"bzz-raw://98a054bc372f5fd6c80793d32a74f3387d562ed6b3e17388b5f8f4b6bc96a62c\",\"dweb:/ipfs/QmQtkE8u6h7zrBrdfEez6STf18766AFP5kK8hGL4SNoWuP\"]},\"@iexec/solidity/contracts/ERC1154/IERC1154.sol\":{\"keccak256\":\"0x542ed19435ffdf4e5f1fbf57f87d26883e04cf96c21c69f7eb691e46c0f6ee5d\",\"urls\":[\"bzz-raw://d7744c331a362162870775cdea560f2db4da1ae6123ca05aba825a8850da37a0\",\"dweb:/ipfs/Qmf3FgPtiUiCA4Mnb9LpGrUciub9RwxniGSRPriRM4hVpc\"]},\"@iexec/solidity/contracts/ERC1271/IERC1271.sol\":{\"keccak256\":\"0x5aacf5aa4d2f95e60146bc396f5ca94df0f224c1361bef93488e587bcefad1b3\",\"urls\":[\"bzz-raw://bcd2ab979ce9ebba488df57671a2e7cf8b169ba55a58503930bbf876ece99639\",\"dweb:/ipfs/QmYTS8gpAAWBPQ2Eazw9Ro74PmQGFwjaa3T6uAn5XCktQG\"]},\"@iexec/solidity/contracts/ERC1538/ERC1538Module.sol\":{\"keccak256\":\"0xb1e1ff5fcce00614303b0bb01c595a7d2f3496ae88bc2068e56ba9cd72ec8921\",\"urls\":[\"bzz-raw://a6b87d03a17727ce6fe6c5b0078a198898153ae8230345468479a9aa4560835d\",\"dweb:/ipfs/QmV4T7Wg8TS3uAVhnqMhqD6yZ7Qv8iouYnYrkTSCJirG2P\"]},\"@iexec/solidity/contracts/ERC1538/ERC1538Store.sol\":{\"keccak256\":\"0x4d1e8821dc216013f20044bbf82df3c2ab2c739d1b2ce4d90c15cb65f85707d8\",\"urls\":[\"bzz-raw://e36d4db70862f87b8657c19330f0d45e8e7018ebcf3df97525638c8caa919d2b\",\"dweb:/ipfs/QmZqsrXPsyRkRkjuupKG2SYsyUTBXqe7nkkCy7RKxDKz1L\"]},\"@iexec/solidity/contracts/ERC1654/IERC1654.sol\":{\"keccak256\":\"0x7898850b7046bdfa2abccfe5c1dfc431cbb95c2814e5074cabeb462a32486fa6\",\"urls\":[\"bzz-raw://24fd636386fcd52ce7d0037806c56dd1227dffb8cb28fd29cd7eb39153176dd4\",\"dweb:/ipfs/QmNvwBKUJa8AaMKYmxrny2wRSENgiztbvRHPrbYR5yjKZK\"]},\"@iexec/solidity/contracts/ERC734/IERC734.sol\":{\"keccak256\":\"0x8c90e6571af80f3ccb1e04469cef3a5ac6d7ee02f61c8643bdceb5b8a141da62\",\"urls\":[\"bzz-raw://2402fc97239c6fd515910d4a6c367cabd24abcdc1c54c3090e64cdbaa9deb948\",\"dweb:/ipfs/Qma7jLg9bqkT8QeftRHgftGMZvSjqmsSoQZmWLhnwc2shy\"]},\"@iexec/solidity/contracts/Libs/SafeMathExtended.sol\":{\"keccak256\":\"0xf2802ae591eb22954d9c8e02658ae7577940890aff8d8927a7255e254fed605b\",\"urls\":[\"bzz-raw://8dcc485d21a3aa3f643768d4ac4fc69697b9b37f8fb779f3998ab4cee143fa66\",\"dweb:/ipfs/QmWdwgKPMoWuidYQp6WFsJBhNbJUwFHNE9YPYQZhBsKj7e\"]},\"@iexec/solidity/contracts/Upgradeability/BaseUpgradeabilityProxy.sol\":{\"keccak256\":\"0x47ec56a1226ecf04d49aa82f768814923c1957b69f7fc9e7e470885c75b5a2c6\",\"urls\":[\"bzz-raw://4eae82be03a247a27a2948ed12d5a826dea977f4b5528830c19d9cf4c23dcd53\",\"dweb:/ipfs/Qmb9HtnohAMvjb7vYnXaT3AnQd9p9sLsThnyLnXVzz1umq\"]},\"@iexec/solidity/contracts/Upgradeability/InitializableUpgradeabilityProxy.sol\":{\"keccak256\":\"0xe1bf07e5d913bd04484305a3fb0cc576f6b5d8e4fc0406bf7c9a8b6b2ed766e5\",\"urls\":[\"bzz-raw://b42f6dff696ceadeb44a02aae3049e603984c18af8d94f33fb6544a8b279179c\",\"dweb:/ipfs/QmRWTaRHCGZhKZFKrVAJwXukXiCZcezrVhJJ28H2qBbai7\"]},\"@iexec/solidity/contracts/Upgradeability/Proxy.sol\":{\"keccak256\":\"0xd89f285d80cfeff0efc87f11dbc024a587da3bba142a06695cbac7e4050e9302\",\"urls\":[\"bzz-raw://9c8323ec7efc9fde6c1529f1070c3f3406adb5f8836b17221530d8f0110fe3f4\",\"dweb:/ipfs/QmURRsX9L2gZ83aMULtY1EuRMJExHhFYErCbkxE5CNkAzE\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0xdb26cbf4d028490f49831a7865c2fe1b28db44b535ca8d343785a3b768aae183\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://840b14ce0315c47d49ba328f1f9fa7654ded1c9e1559e6c5e777a7b2dc28bf0a\",\"dweb:/ipfs/QmTLLabn4wcfGro9LEmUXUN2nwKqZSotXMvjDCLXEnLtZP\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x4bd6402ca6b3419008c2b482aff54e66836e8cb4eba2680e42ac5884ae6424fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8f9f711fb8d0d92aeea1c327e3845d13ca1fa8f142e47f8723cd5b3106fb29a3\",\"dweb:/ipfs/QmVQUReDW9f4zGqhizwHnyU8EntMs95tbASdqkGncnikba\"]},\"@openzeppelin/contracts/introspection/ERC165.sol\":{\"keccak256\":\"0xb046d18f9d09683ca1c0ed6d80c61da8a8a7d9b30bad70a17b898538683eff74\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://4728713afa6ae36cc9e92c7107c796a313add3ec20f813be2cde76c814486b2a\",\"dweb:/ipfs/QmUJBTXvYaGDF5PVnd5pUvYerc9DRXvqANDzgCzAp3FkkA\"]},\"@openzeppelin/contracts/introspection/IERC165.sol\":{\"keccak256\":\"0xfa152b6e88a1dc50780e8f1580426dc23ad2e1e2c2f086a088adf206a202f453\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5127b264994adab88fae419b1c493efc5acd07134c19ee5c0397e50018291ebf\",\"dweb:/ipfs/QmWwJZVhvdmvUCdimbb6R2Jiu59zjPqm6XTMchM6LaEHAp\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x9a9cf02622cd7a64261b10534fc3260449da25c98c9e96d1b4ae8110a20e5806\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2df142592d1dc267d9549049ee3317fa190d2f87eaa565f86ab05ec83f7ab8f5\",\"dweb:/ipfs/QmSkJtcfWo7c42KnL5hho6GFxK6HRNV91XABx1P7xDtfLV\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://efdc632af6960cf865dbc113665ea1f5b90eab75cc40ec062b2f6ae6da582017\",\"dweb:/ipfs/QmfAZFDuG62vxmAN9DnXApv7e7PMzPqi4RkqqZHLMSQiY5\"]},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"keccak256\":\"0x1071a23188ba7f5bb16f51b0b01a67fd41fe56f862d8f83985788cf46f3b91bd\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c7082ca99b93f2e541cafaad00ed32675adf0752eab78eccabcf91dec9fd5d73\",\"dweb:/ipfs/QmdqooMmYBQVi7p6subDFM4e1944AuLjZUpHMjGtae7Lgd\"]},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"keccak256\":\"0x227bafd3e165b13f5d98c42a44376e48d41f4a265db8803f2707faaeae9659aa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c9aa7959a30871669ce46172cd117b084b607d602d9ce695ce79005582b0b69b\",\"dweb:/ipfs/QmXZUWeLXmArQinHL4RnacJLT22GvCExqREYM6pHLX7CX9\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol\":{\"keccak256\":\"0x3636662804cd8f474536b2875a9038a4c3fb91879f1bbff48af5c3f140fcd2f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://9fab8521263fa581544000cb57335a3f2e6bcdfbb5579d3ceaa5acf741c67c4f\",\"dweb:/ipfs/QmZfXnMom7JSNtfyie5yGPN1SUC4SmHbz4ScVBH88URmA7\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol\":{\"keccak256\":\"0xe7f984cedc00a138dc27f263c73c32ba9a4b2fd23b6c34ac46f46c074b943538\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0f4acda12f076fe7584921241ddbb5b460ca7cad6cb8a42252ac7f2a9f539127\",\"dweb:/ipfs/QmQmfhkEv9GrhdWe67QtXnU19AMuoEmy31QnHPkucdYLjZ\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"keccak256\":\"0x321ee37ef4925020aa818a03ec7fe48e057561f65ab009a84f6c20c86026ade7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://01f9d74a17a56024984251b97e428e24c9d3abffbae5bd290f0ec263c82e9694\",\"dweb:/ipfs/QmRryCuuXu2ukrDmatB8TqdEhPLiK6NBRt41RiPUaX1qKy\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xdfb4f812600ba4ce6738c35584ceb8c9433472583051b48ba5b1f66cb758a498\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://df02dffe1c1de089d9b4f6192f0dcf464526f2230f420b3deec4645e0cdd2bff\",\"dweb:/ipfs/QmcqXGAU3KJqwrgUVoGJ2W8osomhSJ4R5kdsRpbuW3fELS\"]},\"@openzeppelin/contracts/utils/Create2.sol\":{\"keccak256\":\"0x16926b3c19504ea52f73abe41dfa9c1ef9c328d6088b82162d475caecaa47a6d\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://bc578656a08c07f33ecf4a54324bad5f951afdcd990cdab1dcde493d6bb49d9c\",\"dweb:/ipfs/QmbXLJtTaqBg7WwC4p9gsRjA3VEwNwGc6W9afJeAaacF71\"]},\"@openzeppelin/contracts/utils/EnumerableMap.sol\":{\"keccak256\":\"0x244e4b74b17716120cf28e58636f11c699b8c0c94628bd952a95cee038d7e32b\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://198d566157120c526bd6b5086b32cae85a11389b8a538f533ba9f9447915da0e\",\"dweb:/ipfs/QmeE6d8KWERx7f1FVS5tMnitNJxBm2yWXRSEUBF7R6voLh\"]},\"@openzeppelin/contracts/utils/EnumerableSet.sol\":{\"keccak256\":\"0xb2a11b236f073662f5a196995863f51c11d006bf7c3de158b316dfa1506c4b79\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8651649cf0b9efa18c3b01c030276fa320d41adbdc286833417e7f36e357b2f3\",\"dweb:/ipfs/QmafhM2Nd1aP43QVB1eRRZaqRXQKswNfQcWi8U8xjrxCfN\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0x79484115dbfa737054f73e041009a02eeb434dd81be5d684bf4255ad3b5ab558\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://12c119699463450c2544f5b9d8709b5e9e9164c62948a79c3ec53423a051d969\",\"dweb:/ipfs/QmPJduzSAaekq447QeFqAp3E7dc8CnNk5ajofckJ4ahA7Q\"]},\"solstruct/contracts/libs/LibMap2.bytes4.address.bytes.sol\":{\"keccak256\":\"0x471645d4b20cc36606122fc6bb692cdf8489118547f90bde2740cb73b1e64d54\",\"urls\":[\"bzz-raw://7ca824c03cd077e6d9630eaa4755787c785a61f612cb8e3ba13d0ce92ee55738\",\"dweb:/ipfs/QmdavtXDokZ7vWZt8pMxPi7DaG3Hd1Q5MyeJjXGRFQuL9r\"]},\"solstruct/contracts/libs/LibSet.bytes4.sol\":{\"keccak256\":\"0xdec5833ab65ae8cab500b84424dde49c1f7817c6575e1631a729fc88c6d4bd7f\",\"urls\":[\"bzz-raw://2e5d23b8383819e6dd77ea61ed30740bcba45b0fff609922b11d1cae2b0223f1\",\"dweb:/ipfs/QmQ27sefXEYXBUSEGdPkuzCqemtUJzNXhhsyd7kB94w6CE\"]}},\"version\":1}", - "bytecode": "0x60806040523480156200001157600080fd5b5060006200001e62000067565b600080546001600160a01b0319166001600160a01b03831690811782556040519293509160008051602062004084833981519152908290a350620000616200006b565b6200011c565b3390565b6200007562000067565b6000546001600160a01b03908116911614620000ae5760405162461bcd60e51b8152600401620000a590620000e7565b60405180910390fd5b600080546040516001600160a01b039091169060008051602062004084833981519152908390a3600080546001600160a01b0319169055565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b613f58806200012c6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b504681d1161008c578063f6c68e1011610066578063f6c68e101461019b578063f722cb32146101ae578063fa055d7e146101c1578063fc334e8c146101d4576100cf565b8063b504681d14610155578063bd66528a14610175578063f2fde38b14610188576100cf565b806334623484146100d45780635b36c66b146100e95780635facd76114610112578063715018a6146101255780638da5cb5b1461012d5780638fc375e514610142575b600080fd5b6100e76100e236600461398e565b6101e7565b005b6100fc6100f736600461396d565b6106f4565b6040516101099190613cdb565b60405180910390f35b6100e7610120366004613a28565b610a1a565b6100e761100a565b610135611092565b6040516101099190613c82565b6100e7610150366004613af5565b6110a1565b6101686101633660046138cc565b61141c565b6040516101099190613cd0565b6100e7610183366004613955565b611478565b6100e7610196366004613871565b611568565b6100e76101a9366004613955565b61161e565b6101686101bc3660046138cc565b6117f2565b6101686101cf36600461388c565b611838565b6100e76101e236600461396d565b611871565b6101f76101f26119fb565b6119ff565b61020057600080fd5b600086815260146020908152604080832060169092528220909190816102246119fb565b6001600160a01b03166001600160a01b03168152602001908152602001600020905061024e61350c565b60018381015460009081526013602090815260409182902082516102408101845281546001600160a01b039081166101e0830190815283870154821661020084015260028085015461022085015290835285516060808201885260038601548416825260048601548416828801526005860154828901528487019190915286518082018852600686015484168152600786015484168188015260088601548189015284880152600985015490840152600a8401546080840152600b84015460a0840152600c840154821660c0840152600d840154821660e0840152600e84015490911661010080840191909152600f840180548751988116159092026000190190911691909104601f8101859004850287018501909552848652909491936101208601938301828280156103c35780601f10610398576101008083540402835291602001916103c3565b820191906000526020600020905b8154815290600101906020018083116103a657829003601f168201915b50505091835250506010820154602082015260118201546040820152601282015460608201526013820154608082015260149091015460a09091015290506001835460ff16600481111561041357fe5b1461041d57600080fd5b4283600401541161042d57600080fd5b6000825460ff16600381111561043f57fe5b1461044957600080fd5b6001600160a01b03861615158061046e575060a0810151601f1a60f81b600160f81b16155b61047757600080fd5b6104fb6001600160a01b0387161580159061049c57506018546001600160a01b031615155b6104ae578160400151602001516104bb565b6018546001600160a01b03165b6104f56104c66119fb565b8c8a6040516020016104da93929190613bc0565b60405160208183030381529060405280519060200120611a0a565b86611a33565b61050457600080fd5b6001600160a01b038616158061053557506105358661052f8a8a6040516020016104da929190613c17565b87611a33565b61053e57600080fd5b8154600160ff19909116811783558201889055600282018790556003820180546001600160a01b0319166001600160a01b038816179055600a83016105816119fb565b815460018082018455600093845260209093200180546001600160a01b0319166001600160a01b03929092169190911790558301546105c7906105c26119fb565b611c14565b6105cf6119fb565b6001600160a01b0316897f3fdb8d7797562d49a81078dbf7fa1771958ea452f8b13d1148383bd9506aecfb8a6040516106089190613cdb565b60405180910390a3600089815260156020526040812090610664600161065e6003610658816017876106386119fb565b6001600160a01b0316815260208101919091526040016000205490611c38565b90611c5a565b90611c71565b60008b81526020849052604081205491925061068f8261065e85610689836001611c5a565b90611c86565b905061069a83611cad565b600487015560008c8152602085905260409020546106b89082611e6b565b60008d81526020869052604090205560018401546106d69082611e6b565b60018501556106e58d8d611e7d565b50505050505050505050505050565b60006106fe61350c565b60008481526013602090815260409182902082516102408101845281546001600160a01b039081166101e08301908152600180850154831661020085015260028086015461022086015291845286516060808201895260038701548516825260048701548516828901526005870154828a0152858801919091528751808201895260068701548516815260078701548516818901526008870154818a015285890152600986015490850152600a8501546080850152600b85015460a0850152600c850154831660c0850152600d850154831660e0850152600e85015490921661010080850191909152600f850180548851948116159092026000190190911691909104601f810186900486028301860190965285825291949293610120860193919291908301828280156108735780601f1061084857610100808354040283529160200191610873565b820191906000526020600020905b81548152906001019060200180831161085657829003601f168201915b505050505081526020016010820154815260200160118201548152602001601282015481526020016013820154815260200160148201548152505090508061016001518310156108c257600080fd5b6101808101516101608201516108d791611e6b565b83106108e257600080fd5b600084846040516020016108f7929190613c17565b60408051601f1981840301815291815281516020928301206000818152601490935290822090925090815460ff16600481111561093057fe5b1461093a57600080fd5b805460ff1916600190811782558101869055600281018590556080830151601a8054909190811061096757fe5b600091825260209091206003918202016002015490820181905561014084015161099c91610996906007611c86565b90611e6b565b600482015561014083015160038201546109bc919061099690600a611c86565b6006820155600082815260156020526040808220600190810155848101515190516001600160a01b039091169184917f252992fb0468d68d6a5784ec03214f0d0a362083f2d7ebd157af43b017a22e069190a3509150505b92915050565b610a256101f26119fb565b610a2e57600080fd5b60008781526014602090815260408083206016909252822090919081610a526119fb565b6001600160a01b03166001600160a01b031681526020019081526020016000209050610a7c61350c565b60018381015460009081526013602090815260409182902082516102408101845281546001600160a01b039081166101e0830190815283870154821661020084015260028085015461022085015290835285516060808201885260038601548416825260048601548416828801526005860154828901528487019190915286518082018852600686015484168152600786015484168188015260088601548189015284880152600985015490840152600a8401546080840152600b84015460a0840152600c840154821660c0840152600d840154821660e0840152600e84015490911661010080840191909152600f840180548751988116159092026000190190911691909104601f810185900485028701850190955284865290949193610120860193830182828015610bf15780601f10610bc657610100808354040283529160200191610bf1565b820191906000526020600020905b815481529060010190602001808311610bd457829003601f168201915b50505091835250506010820154602082015260118201546040820152601282015460608201526013820154608082015260149091015460a09091015290506001835460ff166004811115610c4157fe5b14610c4b57600080fd5b42836004015411610c5b57600080fd5b600a83015415610c6a57600080fd5b8060600151600114610c7b57600080fd5b60008a8a604051602001610c90929190613c17565b6040516020818303038152906040528051906020012090506000610cb26119fb565b8c8c604051602001610cc693929190613bed565b60405160208183030381529060405280519060200120905060006001600160a01b03168361010001516001600160a01b0316148015610d0457508851155b80610d185750600b850154895160208b0120145b610d2157600080fd5b6001600160a01b038816151580610d46575060a0830151601f1a60f81b600160f81b16155b610d4f57600080fd5b610db86001600160a01b03891615801590610d7457506018546001600160a01b031615155b610d8657836040015160200151610d93565b6018546001600160a01b03165b610db2610d9e6119fb565b8f8c6040516020016104da93929190613bc0565b88611a33565b610dc157600080fd5b6001600160a01b0388161580610df25750610df288610dec84846040516020016104da929190613c17565b89611a33565b610dfb57600080fd5b8354600260ff199182168117865560018601848155818701849055600380880180546001600160a01b0319166001600160a01b038e1617905588549093168317885554600788015590860154610e5691429161099691611c86565b60058601556001600886018190556009860155600b85018b90558951610e8590600c87019060208d01906135b2565b508851610e9b90600e87019060208c01906135b2565b5084600a01610ea86119fb565b815460018082018455600093845260209093200180546001600160a01b0319166001600160a01b0392909216919091179055850154610ee7908d612014565b610ef08c61219b565b610ef86119fb565b6001600160a01b03168c7f3fdb8d7797562d49a81078dbf7fa1771958ea452f8b13d1148383bd9506aecfb84604051610f319190613cdb565b60405180910390a38b7ff6d49bf3e05d33a4bc497d3c793fb5756388bb96b947cf51bb60aaecb0e022e383604051610f699190613cdb565b60405180910390a2610f796119fb565b6001600160a01b03168c7f4b1763d473ac8fa80b4432ba90047e1b92444d8fabc55e6a002d9b1a316d79598d604051610fb29190613cdb565b60405180910390a38b7f78ce8a8bc0fcb704e8ba3b3dbb36aa88002df8038128b4af2f27ef65db6650448b604051610fea9190613d4a565b60405180910390a2610ffc8c8a612602565b505050505050505050505050565b6110126119fb565b6000546001600160a01b039081169116146110485760405162461bcd60e51b815260040161103f90613e41565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6000858152601460209081526040808320600101548352601390915290206007015485906001600160a01b03166110d66119fb565b6001600160a01b0316146110e957600080fd5b60008681526014602052604090206110ff61350c565b60018281015460009081526013602090815260409182902082516102408101845281546001600160a01b039081166101e0830190815283870154821661020084015260028085015461022085015290835285516060808201885260038601548416825260048601548416828801526005860154828901528487019190915286518082018852600686015484168152600786015484168188015260088601548189015284880152600985015490840152600a8401546080840152600b84015460a0840152600c840154821660c0840152600d840154821660e0840152600e84015490911661010080840191909152600f840180548751988116159092026000190190911691909104601f8101859004850287018501909552848652909491936101208601938301828280156112745780601f1061124957610100808354040283529160200191611274565b820191906000526020600020905b81548152906001019060200180831161125757829003601f168201915b50505091835250506010820154602082015260118201546040820152601282015460608201526013820154608082015260149091015460a09091015290506002825460ff1660048111156112c457fe5b146112ce57600080fd5b428260060154116112de57600080fd5b816009015482600801541480611307575060008260080154118015611307575042826005015411155b61131057600080fd5b6101008101516001600160a01b031615801561132a575083155b8061134f575081600b01548585604051611345929190613c25565b6040518091039020145b61135857600080fd5b815460ff19166003178255611371600c83018888613630565b50611380600e83018686613630565b5061138f826001015489612014565b611398886126ee565b877f78ce8a8bc0fcb704e8ba3b3dbb36aa88002df8038128b4af2f27ef65db66504488886040516113ca929190613d1b565b60405180910390a26114128886868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061260292505050565b5050505050505050565b600083821461142a57600080fd5b60005b8481101561146c5761146386868381811061144457fe5b9050602002013585858481811061145757fe5b905060200201356106f4565b5060010161142d565b50600195945050505050565b60008181526014602052604090206001815460ff16600481111561149857fe5b14806114b357506002815460ff1660048111156114b157fe5b145b6114bc57600080fd5b42816006015411156114cd57600080fd5b805460ff1916600417815560018101546114e79083612d77565b60005b600a82015481101561153857600082600a01828154811061150757fe5b60009182526020909120015460018401546001600160a01b03909116915061152f9082612fe2565b506001016114ea565b5060405182907fcbc308b5f91040d2659a5201858344b0b583cd2f9e18e8470c2fa052c5b21ff890600090a25050565b6115706119fb565b6000546001600160a01b0390811691161461159d5760405162461bcd60e51b815260040161103f90613e41565b6001600160a01b0381166115c35760405162461bcd60e51b815260040161103f90613dce565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152601460209081526040808320600101548352601390915290206007015481906001600160a01b03166116536119fb565b6001600160a01b03161461166657600080fd5b60008281526014602052604090206002815460ff16600481111561168657fe5b1461169057600080fd5b428160060154116116a057600080fd5b428160050154111580156116b657506008810154155b6116bf57600080fd5b60005b600a82015481101561175857600082600a0182815481106116df57fe5b600091825260208083209091015460078601548884526016835260408085206001600160a01b03909316808652929093529190922060010154919250141561174f5760008581526016602090815260408083206001600160a01b03851684529091529020805460ff191660031790555b506001016116c2565b506000838152601560209081526040808320600785015484529182905290912054600182015461178791611c71565b600182810191909155600783018054600090815260208490526040808220829055855460ff19169093178555908190556005840181905560098401819055905185917f3afe0f24796ce653c6ab1f3e7aba5ce564eece5e82aee724aff28253e829f07b91a250505050565b600083821461180057600080fd5b60005b8481101561146c5761183061018387878481811061181d57fe5b9050602002013586868581811061145757fe5b600101611803565b6000805b828110156118675761185f84848381811061185357fe5b90506020020135611478565b60010161183c565b5060019392505050565b600082815260146020908152604080832060169092528220909190816118956119fb565b6001600160a01b03168152602081019190915260400160002090506002825460ff1660048111156118c257fe5b146118cc57600080fd5b428260050154116118dc57600080fd5b6001815460ff1660038111156118ee57fe5b146118f857600080fd5b816007015481600101541461190c57600080fd5b838360405160200161191f929190613c17565b6040516020818303038152906040528051906020012081600101541461194457600080fd5b61194c6119fb565b848460405160200161196093929190613bed565b6040516020818303038152906040528051906020012081600201541461198557600080fd5b805460ff1916600217815560088201546119a0906001611e6b565b6008830155600b82018390556119b46119fb565b6001600160a01b0316847f4b1763d473ac8fa80b4432ba90047e1b92444d8fabc55e6a002d9b1a316d7959856040516119ed9190613cdb565b60405180910390a350505050565b3390565b6000610a1482613002565b606081604051602001611a1d9190613c51565b6040516020818303038152906040529050919050565b6000611a3e84613083565b15611be5576040516320c13b0b60e01b81526001600160a01b038516906320c13b0b90611a719086908690600401613d5d565b60206040518083038186803b158015611a8957600080fd5b505afa925050508015611ab9575060408051601f3d908101601f19168201909252611ab691810190613b6c565b60015b611af3573d808015611ae7576040519150601f19603f3d011682016040523d82523d6000602084013e611aec565b606091505b5050611b0d565b6001600160e01b0319166320c13b0b60e01b149050611c0d565b82516020840120604051630b135d3f60e11b81526001600160a01b03861691631626ba7e91611b4191908690600401613ce4565b60206040518083038186803b158015611b5957600080fd5b505afa925050508015611b89575060408051601f3d908101601f19168201909252611b8691810190613b6c565b60015b611bc3573d808015611bb7576040519150601f19603f3d011682016040523d82523d6000602084013e611bbc565b606091505b5050611bdd565b6001600160e01b031916630b135d3f60e11b149050611c0d565b506000611c0d565b836001600160a01b0316611c008480519060200120846130bf565b6001600160a01b03161490505b9392505050565b611c348160136000858152602001908152602001600020601301546131c9565b5050565b6000808211611c4657600080fd5b6000828481611c5157fe5b04949350505050565b600081831015611c6a5781611c0d565b5090919050565b600082821115611c8057600080fd5b50900390565b600082611c9557506000610a14565b82820282848281611ca257fe5b0414611c0d57600080fd5b604080517ff8f9cbfae6cc78fbefe7cdc3a1793dfcf4f0e8bbd8cec470b6a28a7a5a3e1efd81527ff5ecf1b3e9debc68e1d9cfabc5997135bfb7a7a3938b7b606b5b4b3f2f1f0ffe60208201527ff6e4ed9ff2d6b458eadcdf97bd91692de2d4da8fd2d0ac50c6ae9a8272523616818301527fc8c0b887b0a8a4489c948c7f847c6125746c645c544c444038302820181008ff60608201527ff7cae577eec2a03cf3bad76fb589591debb2dd67e0aa9834bea6925f6a4a2e0e60808201527fe39ed557db96902cd38ed14fad815115c786af479b7e8324736353433727170760a08201527fc976c13bb96e881cb166a933a55e490d9d56952b8d4e801485467d236242260660c08201527f753a6d1b65325d0c552a4d1345224105391a310b29122104190a11030902010060e0820152610100808201909252600160f81b6001600160801b68010000000000000000640100000000620100006010600460026000198c019081041790810417908104178881041790810417908104179081041790810417017e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff0281900460ff039091015104600160ff1b909211020190565b600082820183811015611c0d57600080fd5b6000828152601460209081526040808320601583528184206001808301548652601390945291909320600901549091611ec690611ebb908390611c71565b600184015490611c86565b600085815260208490526040902054611edf9083611c86565b111561200d576000805b600a850154811015611f9557600085600a018281548110611f0657fe5b60009182526020808320909101548a83526016825260408084206001600160a01b039092168085529190925291206001015490915087148015611f795750600160008981526016602090815260408083206001600160a01b038616845290915290205460ff166003811115611f7757fe5b145b15611f8c57611f89836001611e6b565b92505b50600101611ee9565b50835460ff191660029081178555600785018690556003850154611fbe91429161099691611c86565b6005850155600060088501556009840181905560405186907ff6d49bf3e05d33a4bc497d3c793fb5756388bb96b947cf51bb60aaecb0e022e390612003908890613cdb565b60405180910390a2505b5050505050565b600082815260136020526040812060088101546005820154600283015492939261204392916109969190611e6b565b600883015490915060009061205990601e613251565b600c840154909150612075906001600160a01b0316838661325f565b60028301541561209d576001830154600284015461209d916001600160a01b031690866132df565b6005830154158015906120bc575060038301546001600160a01b031615155b156120df57600483015460058401546120df916001600160a01b031690866132df565b60078301546120f7906001600160a01b03168261331d565b7399c2268479b93fde36232351229815df80837e23600052600e6020527f0c6541af8a90dc64ec40ead0c49d5d6bd34489a48d08db53d659372ff556a4305480156121935761215981612153633b9aca0061065883600a613251565b90613399565b905061217a7399c2268479b93fde36232351229815df80837e23828761325f565b6007840154612193906001600160a01b031682876132df565b505050505050565b6121a361369e565b6000828152601460205260409081902081516101e081019092528054829060ff1660048111156121cf57fe5b60048111156121da57fe5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a820180548060200260200160405190810160405280929190818152602001828054801561229157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612273575b5050509183525050600b820154602080830191909152600c8301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850182528281529401939283018282801561232f5780601f106123045761010080835404028352916020019161232f565b820191906000526020600020905b81548152906001019060200180831161231257829003601f168201915b5050509183525050600d820154602080830191909152600e8301805460408051601f600260001961010060018716150201909416939093049283018590048502810185018252828152940193928301828280156123cd5780601f106123a2576101008083540402835291602001916123cd565b820191906000526020600020905b8154815290600101906020018083116123b057829003601f168201915b50505050508152505090506123e061350c565b60208281015160009081526013825260409081902081516102408101835281546001600160a01b039081166101e08301908152600180850154831661020085015260028086015461022086015291845285516060808201885260038701548516825260048701548516828a0152600587015482890152858901919091528651808201885260068701548516815260078701548516818a015260088701548189015285880152600986015490850152600a8501546080850152600b85015460a0850152600c850154831660c0850152600d850154831660e0850152600e85015490921661010080850191909152600f850180548751948116159092026000190190911691909104601f8101879004870283018701909552848252919492936101208601939192918301828280156125575780601f1061252c57610100808354040283529160200191612557565b820191906000526020600020905b81548152906001019060200180831161253a57829003601f168201915b5050505050815260200160108201548152602001601182015481526020016012820154815260200160138201548152602001601482015481525050905060006125c06125b2836101c001516064611c7190919063ffffffff16565b604080850151015190613251565b905060006125df82846040015160400151611c7190919063ffffffff16565b90506125f36125ec6119fb565b83876133a8565b61200d846020015182876133b3565b600082815260146020908152604080832060010154835260139091529020600e01546001600160a01b031680156126e95760006060826001600160a01b03166019548686604051602401612657929190613ce4565b60408051601f198184030181529181526020820180516001600160e01b0316635dd8085560e01b1790525161268c9190613c35565b60006040518083038160008787f1925050503d80600081146126ca576040519150601f19603f3d011682016040523d82523d6000602084013e6126cf565b606091505b5091509150603f601954816126e057fe5b045a1161200d57fe5b505050565b6126f661369e565b6000828152601460205260409081902081516101e081019092528054829060ff16600481111561272257fe5b600481111561272d57fe5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a82018054806020026020016040519081016040528092919081815260200182805480156127e457602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116127c6575b5050509183525050600b820154602080830191909152600c8301805460408051601f600260001961010060018716150201909416939093049283018590048502810185018252828152940193928301828280156128825780601f1061285757610100808354040283529160200191612882565b820191906000526020600020905b81548152906001019060200180831161286557829003601f168201915b5050509183525050600d820154602080830191909152600e8301805460408051601f600260001961010060018716150201909416939093049283018590048502810185018252828152940193928301828280156129205780601f106128f557610100808354040283529160200191612920565b820191906000526020600020905b81548152906001019060200180831161290357829003601f168201915b505050505081525050905061293361350c565b60208281015160009081526013825260409081902081516102408101835281546001600160a01b039081166101e08301908152600180850154831661020085015260028086015461022086015291845285516060808201885260038701548516825260048701548516828a0152600587015482890152858901919091528651808201885260068701548516815260078701548516818a015260088701548189015285880152600986015490850152600a8501546080850152600b85015460a0850152600c850154831660c0850152600d850154831660e0850152600e85015490921661010080850191909152600f850180548751948116159092026000190190911691909104601f810187900487028301870190955284825291949293610120860193919291830182828015612aaa5780601f10612a7f57610100808354040283529160200191612aaa565b820191906000526020600020905b815481529060010190602001808311612a8d57829003601f168201915b50505050508152602001601082015481526020016011820154815260200160128201548152602001601382015481526020016014820154815250509050600080826040015160400151905060005b84610140015151811015612b965760008561014001518281518110612b1957fe5b60209081029190910181015160008981526016835260408082206001600160a01b0384168352909352919091209091506002815460ff166003811115612b5b57fe5b1415612b78576004810154612b71908690611e6b565b9450612b8c565b6101a0860151612b89908590611e6b565b93505b5050600101612af8565b506000612bbc612bb5856101c001516064611c7190919063ffffffff16565b8390613251565b905060005b85610140015151811015612d675760008661014001518281518110612be257fe5b60209081029190910181015160008a81526016835260408082206001600160a01b0384168352909352919091209091506002815460ff166003811115612c2457fe5b1415612ce3576004810154600090612c3e908690896133d9565b9050612c4a8682611c71565b9550612c5a896020015184612fe2565b612c6583828c6133a8565b6001896101400151511115612cdd576001600160a01b038316600090815260176020526040902054612c98906001611e6b565b6001600160a01b0384166000818152601760205260408082209390935591518c927f9703f4589802246c80b822e63697180da799e363cd1b6fd9465a5e5574d5349291a35b50612d5d565b612cf28860200151838b6133ee565b6001600160a01b038216600090815260176020526040902054612d1890600260036133d9565b6001600160a01b0383166000818152601760205260408082209390935591518b927ff868788948d55240774fdbad06555105ef20bbc70d1b7eccda982b65e11e79bb91a35b5050600101612bc1565b50612193856020015183886133b3565b612d7f61350c565b60008381526013602090815260409182902082516102408101845281546001600160a01b039081166101e08301908152600180850154831661020085015260028086015461022086015291845286516060808201895260038701548516825260048701548516828901526005870154828a0152858801919091528751808201895260068701548516815260078701548516818901526008870154818a015285890152600986015490850152600a8501546080850152600b85015460a0850152600c850154831660c0850152600d850154831660e0850152600e85015490921661010080850191909152600f850180548851948116159092026000190190911691909104601f81018690048602830186019096528582529194929361012086019391929190830182828015612ef45780601f10612ec957610100808354040283529160200191612ef4565b820191906000526020600020905b815481529060010190602001808311612ed757829003601f168201915b505050505081526020016010820154815260200160118201548152602001601282015481526020016013820154815260200160148201548152505090506000612f62826040015160400151610996846020015160400151856000015160400151611e6b90919063ffffffff16565b90506000612f82601e84604001516040015161325190919063ffffffff16565b9050612f928360c001518361331d565b612fa5836040015160200151828661325f565b612fc47399c2268479b93fde36232351229815df80837e2382866132df565b61200d7399c2268479b93fde36232351229815df80837e23826131c9565b611c3481601360008581526020019081526020016000206013015461331d565b6008546040516313289ea360e31b81526000916001600160a01b031690639944f51890613033908590600401613c82565b60206040518083038186803b15801561304b57600080fd5b505afa15801561305f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a149190613935565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906130b757508115155b949350505050565b6000806000808451604114156130e95750505060208201516040830151606084015160001a61312e565b84516040141561311657505050602082015160408301516001600160ff1b0381169060001a60071c61312e565b60405162461bcd60e51b815260040161103f90613ebb565b601b8160ff16101561313e57601b015b8060ff16601b148061315357508060ff16601c145b61316f5760405162461bcd60e51b815260040161103f90613e14565b600186828585604051600081526020016040526040516131929493929190613cfd565b6020604051602081039080840390855afa1580156131b4573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6131d482308361340f565b6001600160a01b0382166000908152600e60205260409020546131f79082611e6b565b6001600160a01b0383166000908152600e60205260409081902091909155517f625fed9875dada8643f2418b838ae0bc78d9a148a18eee4ee1979ff0f3f5d427906132459084908490613c96565b60405180910390a15050565b6000611c0d838360646133d9565b6001600160a01b0383166000908152600e60205260409020546132829083611c71565b6001600160a01b0384166000908152600e60205260409081902091909155517f1bccc549c38561cd5b57f0db11ceb8dde1b0b6ee05ab5e155b51c7c5ba64becb906132d290859085908590613caf565b60405180910390a1505050565b6132ea30848461340f565b7fc2aca55aa696938c7e95842e8939ca0fbb2120a3eeb8948cdcee2b70da5666728383836040516132d293929190613caf565b61332830838361340f565b6001600160a01b0382166000908152600e602052604090205461334b9082611c71565b6001600160a01b0383166000908152600e60205260409081902091909155517f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1906132459084908490613c96565b6000818310611c6a5781611c0d565b6126e98383836132df565b6000838152601360205260409020600701546126e9906001600160a01b031683836132df565b60006130b76133e88585611c86565b83611c38565b6126e98260136000868152602001908152602001600020601301548361325f565b6001600160a01b0383166134355760405162461bcd60e51b815260040161103f90613e76565b6001600160a01b03821661345b5760405162461bcd60e51b815260040161103f90613d8b565b6001600160a01b0383166000908152600d602052604090205461347e9082611c71565b6001600160a01b038085166000908152600d602052604080822093909355908416815220546134ad9082611e6b565b6001600160a01b038084166000818152600d602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906134ff908590613cdb565b60405180910390a3505050565b604051806101e0016040528061352061371e565b815260200161352d61371e565b815260200161353a61371e565b815260200160008152602001600081526020016000801916815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160008152602001600081526020016000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106135f357805160ff1916838001178555613620565b82800160010185558215613620579182015b82811115613620578251825591602001919060010190613605565b5061362c92915061373e565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106136715782800160ff19823516178555613620565b82800160010185558215613620579182015b82811115613620578235825591602001919060010190613683565b604080516101e08101909152806000815260200160008019168152602001600081526020016000815260200160008152602001600081526020016000815260200160008019168152602001600081526020016000815260200160608152602001600080191681526020016060815260200160008152602001606081525090565b604080516060810182526000808252602082018190529181019190915290565b5b8082111561362c576000815560010161373f565b80356001600160a01b0381168114610a1457600080fd5b60008083601f84011261377b578182fd5b50813567ffffffffffffffff811115613792578182fd5b60208301915083602080830285010111156137ac57600080fd5b9250929050565b60008083601f8401126137c4578182fd5b50813567ffffffffffffffff8111156137db578182fd5b6020830191508360208285010111156137ac57600080fd5b600082601f830112613803578081fd5b813567ffffffffffffffff8082111561381a578283fd5b604051601f8301601f19168101602001828111828210171561383a578485fd5b60405282815292508284830160200186101561385557600080fd5b8260208601602083013760006020848301015250505092915050565b600060208284031215613882578081fd5b611c0d8383613753565b6000806020838503121561389e578081fd5b823567ffffffffffffffff8111156138b4578182fd5b6138c08582860161376a565b90969095509350505050565b600080600080604085870312156138e1578182fd5b843567ffffffffffffffff808211156138f8578384fd5b6139048883890161376a565b9096509450602087013591508082111561391c578384fd5b506139298782880161376a565b95989497509550505050565b600060208284031215613946578081fd5b81518015158114611c0d578182fd5b600060208284031215613966578081fd5b5035919050565b6000806040838503121561397f578182fd5b50508035926020909101359150565b60008060008060008060c087890312156139a6578182fd5b86359550602087013594506040870135935060608701356001600160a01b03811681146139d1578283fd5b9250608087013567ffffffffffffffff808211156139ed578384fd5b6139f98a838b016137f3565b935060a0890135915080821115613a0e578283fd5b50613a1b89828a016137f3565b9150509295509295509295565b600080600080600080600060e0888a031215613a42578081fd5b8735965060208801359550604088013567ffffffffffffffff80821115613a67578283fd5b613a738b838c016137f3565b965060608a0135915080821115613a88578283fd5b613a948b838c016137f3565b9550613aa38b60808c01613753565b945060a08a0135915080821115613ab8578283fd5b613ac48b838c016137f3565b935060c08a0135915080821115613ad9578283fd5b50613ae68a828b016137f3565b91505092959891949750929550565b600080600080600060608688031215613b0c578081fd5b85359450602086013567ffffffffffffffff80821115613b2a578283fd5b613b3689838a016137b3565b90965094506040880135915080821115613b4e578283fd5b50613b5b888289016137b3565b969995985093965092949392505050565b600060208284031215613b7d578081fd5b81516001600160e01b031981168114611c0d578182fd5b60008151808452613bac816020860160208601613ef2565b601f01601f19169290920160200192915050565b6bffffffffffffffffffffffff19606094851b811682526014820193909352921b16603482015260480190565b60609390931b6bffffffffffffffffffffffff191683526014830191909152603482015260540190565b918252602082015260400190565b6000828483379101908152919050565b60008251613c47818460208701613ef2565b9190910192915050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b901515815260200190565b90815260200190565b6000838252604060208301526130b76040830184613b94565b93845260ff9290921660208401526040830152606082015260800190565b60006020825282602083015282846040840137818301604090810191909152601f909201601f19160101919050565b600060208252611c0d6020830184613b94565b600060408252613d706040830185613b94565b8281036020840152613d828185613b94565b95945050505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526013908201527234b73b30b634b216b9b4b3b730ba3ab93296bb60691b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526018908201527f696e76616c69642d7369676e61747572652d666f726d61740000000000000000604082015260600190565b60005b83811015613f0d578181015183820152602001613ef5565b83811115613f1c576000848401525b5050505056fea2646970667358221220cc1cb0201b2d624050b00628d41816686245167b7b2fb68e2603088533af189664736f6c634300060c00338be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b504681d1161008c578063f6c68e1011610066578063f6c68e101461019b578063f722cb32146101ae578063fa055d7e146101c1578063fc334e8c146101d4576100cf565b8063b504681d14610155578063bd66528a14610175578063f2fde38b14610188576100cf565b806334623484146100d45780635b36c66b146100e95780635facd76114610112578063715018a6146101255780638da5cb5b1461012d5780638fc375e514610142575b600080fd5b6100e76100e236600461398e565b6101e7565b005b6100fc6100f736600461396d565b6106f4565b6040516101099190613cdb565b60405180910390f35b6100e7610120366004613a28565b610a1a565b6100e761100a565b610135611092565b6040516101099190613c82565b6100e7610150366004613af5565b6110a1565b6101686101633660046138cc565b61141c565b6040516101099190613cd0565b6100e7610183366004613955565b611478565b6100e7610196366004613871565b611568565b6100e76101a9366004613955565b61161e565b6101686101bc3660046138cc565b6117f2565b6101686101cf36600461388c565b611838565b6100e76101e236600461396d565b611871565b6101f76101f26119fb565b6119ff565b61020057600080fd5b600086815260146020908152604080832060169092528220909190816102246119fb565b6001600160a01b03166001600160a01b03168152602001908152602001600020905061024e61350c565b60018381015460009081526013602090815260409182902082516102408101845281546001600160a01b039081166101e0830190815283870154821661020084015260028085015461022085015290835285516060808201885260038601548416825260048601548416828801526005860154828901528487019190915286518082018852600686015484168152600786015484168188015260088601548189015284880152600985015490840152600a8401546080840152600b84015460a0840152600c840154821660c0840152600d840154821660e0840152600e84015490911661010080840191909152600f840180548751988116159092026000190190911691909104601f8101859004850287018501909552848652909491936101208601938301828280156103c35780601f10610398576101008083540402835291602001916103c3565b820191906000526020600020905b8154815290600101906020018083116103a657829003601f168201915b50505091835250506010820154602082015260118201546040820152601282015460608201526013820154608082015260149091015460a09091015290506001835460ff16600481111561041357fe5b1461041d57600080fd5b4283600401541161042d57600080fd5b6000825460ff16600381111561043f57fe5b1461044957600080fd5b6001600160a01b03861615158061046e575060a0810151601f1a60f81b600160f81b16155b61047757600080fd5b6104fb6001600160a01b0387161580159061049c57506018546001600160a01b031615155b6104ae578160400151602001516104bb565b6018546001600160a01b03165b6104f56104c66119fb565b8c8a6040516020016104da93929190613bc0565b60405160208183030381529060405280519060200120611a0a565b86611a33565b61050457600080fd5b6001600160a01b038616158061053557506105358661052f8a8a6040516020016104da929190613c17565b87611a33565b61053e57600080fd5b8154600160ff19909116811783558201889055600282018790556003820180546001600160a01b0319166001600160a01b038816179055600a83016105816119fb565b815460018082018455600093845260209093200180546001600160a01b0319166001600160a01b03929092169190911790558301546105c7906105c26119fb565b611c14565b6105cf6119fb565b6001600160a01b0316897f3fdb8d7797562d49a81078dbf7fa1771958ea452f8b13d1148383bd9506aecfb8a6040516106089190613cdb565b60405180910390a3600089815260156020526040812090610664600161065e6003610658816017876106386119fb565b6001600160a01b0316815260208101919091526040016000205490611c38565b90611c5a565b90611c71565b60008b81526020849052604081205491925061068f8261065e85610689836001611c5a565b90611c86565b905061069a83611cad565b600487015560008c8152602085905260409020546106b89082611e6b565b60008d81526020869052604090205560018401546106d69082611e6b565b60018501556106e58d8d611e7d565b50505050505050505050505050565b60006106fe61350c565b60008481526013602090815260409182902082516102408101845281546001600160a01b039081166101e08301908152600180850154831661020085015260028086015461022086015291845286516060808201895260038701548516825260048701548516828901526005870154828a0152858801919091528751808201895260068701548516815260078701548516818901526008870154818a015285890152600986015490850152600a8501546080850152600b85015460a0850152600c850154831660c0850152600d850154831660e0850152600e85015490921661010080850191909152600f850180548851948116159092026000190190911691909104601f810186900486028301860190965285825291949293610120860193919291908301828280156108735780601f1061084857610100808354040283529160200191610873565b820191906000526020600020905b81548152906001019060200180831161085657829003601f168201915b505050505081526020016010820154815260200160118201548152602001601282015481526020016013820154815260200160148201548152505090508061016001518310156108c257600080fd5b6101808101516101608201516108d791611e6b565b83106108e257600080fd5b600084846040516020016108f7929190613c17565b60408051601f1981840301815291815281516020928301206000818152601490935290822090925090815460ff16600481111561093057fe5b1461093a57600080fd5b805460ff1916600190811782558101869055600281018590556080830151601a8054909190811061096757fe5b600091825260209091206003918202016002015490820181905561014084015161099c91610996906007611c86565b90611e6b565b600482015561014083015160038201546109bc919061099690600a611c86565b6006820155600082815260156020526040808220600190810155848101515190516001600160a01b039091169184917f252992fb0468d68d6a5784ec03214f0d0a362083f2d7ebd157af43b017a22e069190a3509150505b92915050565b610a256101f26119fb565b610a2e57600080fd5b60008781526014602090815260408083206016909252822090919081610a526119fb565b6001600160a01b03166001600160a01b031681526020019081526020016000209050610a7c61350c565b60018381015460009081526013602090815260409182902082516102408101845281546001600160a01b039081166101e0830190815283870154821661020084015260028085015461022085015290835285516060808201885260038601548416825260048601548416828801526005860154828901528487019190915286518082018852600686015484168152600786015484168188015260088601548189015284880152600985015490840152600a8401546080840152600b84015460a0840152600c840154821660c0840152600d840154821660e0840152600e84015490911661010080840191909152600f840180548751988116159092026000190190911691909104601f810185900485028701850190955284865290949193610120860193830182828015610bf15780601f10610bc657610100808354040283529160200191610bf1565b820191906000526020600020905b815481529060010190602001808311610bd457829003601f168201915b50505091835250506010820154602082015260118201546040820152601282015460608201526013820154608082015260149091015460a09091015290506001835460ff166004811115610c4157fe5b14610c4b57600080fd5b42836004015411610c5b57600080fd5b600a83015415610c6a57600080fd5b8060600151600114610c7b57600080fd5b60008a8a604051602001610c90929190613c17565b6040516020818303038152906040528051906020012090506000610cb26119fb565b8c8c604051602001610cc693929190613bed565b60405160208183030381529060405280519060200120905060006001600160a01b03168361010001516001600160a01b0316148015610d0457508851155b80610d185750600b850154895160208b0120145b610d2157600080fd5b6001600160a01b038816151580610d46575060a0830151601f1a60f81b600160f81b16155b610d4f57600080fd5b610db86001600160a01b03891615801590610d7457506018546001600160a01b031615155b610d8657836040015160200151610d93565b6018546001600160a01b03165b610db2610d9e6119fb565b8f8c6040516020016104da93929190613bc0565b88611a33565b610dc157600080fd5b6001600160a01b0388161580610df25750610df288610dec84846040516020016104da929190613c17565b89611a33565b610dfb57600080fd5b8354600260ff199182168117865560018601848155818701849055600380880180546001600160a01b0319166001600160a01b038e1617905588549093168317885554600788015590860154610e5691429161099691611c86565b60058601556001600886018190556009860155600b85018b90558951610e8590600c87019060208d01906135b2565b508851610e9b90600e87019060208c01906135b2565b5084600a01610ea86119fb565b815460018082018455600093845260209093200180546001600160a01b0319166001600160a01b0392909216919091179055850154610ee7908d612014565b610ef08c61219b565b610ef86119fb565b6001600160a01b03168c7f3fdb8d7797562d49a81078dbf7fa1771958ea452f8b13d1148383bd9506aecfb84604051610f319190613cdb565b60405180910390a38b7ff6d49bf3e05d33a4bc497d3c793fb5756388bb96b947cf51bb60aaecb0e022e383604051610f699190613cdb565b60405180910390a2610f796119fb565b6001600160a01b03168c7f4b1763d473ac8fa80b4432ba90047e1b92444d8fabc55e6a002d9b1a316d79598d604051610fb29190613cdb565b60405180910390a38b7f78ce8a8bc0fcb704e8ba3b3dbb36aa88002df8038128b4af2f27ef65db6650448b604051610fea9190613d4a565b60405180910390a2610ffc8c8a612602565b505050505050505050505050565b6110126119fb565b6000546001600160a01b039081169116146110485760405162461bcd60e51b815260040161103f90613e41565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6000858152601460209081526040808320600101548352601390915290206007015485906001600160a01b03166110d66119fb565b6001600160a01b0316146110e957600080fd5b60008681526014602052604090206110ff61350c565b60018281015460009081526013602090815260409182902082516102408101845281546001600160a01b039081166101e0830190815283870154821661020084015260028085015461022085015290835285516060808201885260038601548416825260048601548416828801526005860154828901528487019190915286518082018852600686015484168152600786015484168188015260088601548189015284880152600985015490840152600a8401546080840152600b84015460a0840152600c840154821660c0840152600d840154821660e0840152600e84015490911661010080840191909152600f840180548751988116159092026000190190911691909104601f8101859004850287018501909552848652909491936101208601938301828280156112745780601f1061124957610100808354040283529160200191611274565b820191906000526020600020905b81548152906001019060200180831161125757829003601f168201915b50505091835250506010820154602082015260118201546040820152601282015460608201526013820154608082015260149091015460a09091015290506002825460ff1660048111156112c457fe5b146112ce57600080fd5b428260060154116112de57600080fd5b816009015482600801541480611307575060008260080154118015611307575042826005015411155b61131057600080fd5b6101008101516001600160a01b031615801561132a575083155b8061134f575081600b01548585604051611345929190613c25565b6040518091039020145b61135857600080fd5b815460ff19166003178255611371600c83018888613630565b50611380600e83018686613630565b5061138f826001015489612014565b611398886126ee565b877f78ce8a8bc0fcb704e8ba3b3dbb36aa88002df8038128b4af2f27ef65db66504488886040516113ca929190613d1b565b60405180910390a26114128886868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061260292505050565b5050505050505050565b600083821461142a57600080fd5b60005b8481101561146c5761146386868381811061144457fe5b9050602002013585858481811061145757fe5b905060200201356106f4565b5060010161142d565b50600195945050505050565b60008181526014602052604090206001815460ff16600481111561149857fe5b14806114b357506002815460ff1660048111156114b157fe5b145b6114bc57600080fd5b42816006015411156114cd57600080fd5b805460ff1916600417815560018101546114e79083612d77565b60005b600a82015481101561153857600082600a01828154811061150757fe5b60009182526020909120015460018401546001600160a01b03909116915061152f9082612fe2565b506001016114ea565b5060405182907fcbc308b5f91040d2659a5201858344b0b583cd2f9e18e8470c2fa052c5b21ff890600090a25050565b6115706119fb565b6000546001600160a01b0390811691161461159d5760405162461bcd60e51b815260040161103f90613e41565b6001600160a01b0381166115c35760405162461bcd60e51b815260040161103f90613dce565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152601460209081526040808320600101548352601390915290206007015481906001600160a01b03166116536119fb565b6001600160a01b03161461166657600080fd5b60008281526014602052604090206002815460ff16600481111561168657fe5b1461169057600080fd5b428160060154116116a057600080fd5b428160050154111580156116b657506008810154155b6116bf57600080fd5b60005b600a82015481101561175857600082600a0182815481106116df57fe5b600091825260208083209091015460078601548884526016835260408085206001600160a01b03909316808652929093529190922060010154919250141561174f5760008581526016602090815260408083206001600160a01b03851684529091529020805460ff191660031790555b506001016116c2565b506000838152601560209081526040808320600785015484529182905290912054600182015461178791611c71565b600182810191909155600783018054600090815260208490526040808220829055855460ff19169093178555908190556005840181905560098401819055905185917f3afe0f24796ce653c6ab1f3e7aba5ce564eece5e82aee724aff28253e829f07b91a250505050565b600083821461180057600080fd5b60005b8481101561146c5761183061018387878481811061181d57fe5b9050602002013586868581811061145757fe5b600101611803565b6000805b828110156118675761185f84848381811061185357fe5b90506020020135611478565b60010161183c565b5060019392505050565b600082815260146020908152604080832060169092528220909190816118956119fb565b6001600160a01b03168152602081019190915260400160002090506002825460ff1660048111156118c257fe5b146118cc57600080fd5b428260050154116118dc57600080fd5b6001815460ff1660038111156118ee57fe5b146118f857600080fd5b816007015481600101541461190c57600080fd5b838360405160200161191f929190613c17565b6040516020818303038152906040528051906020012081600101541461194457600080fd5b61194c6119fb565b848460405160200161196093929190613bed565b6040516020818303038152906040528051906020012081600201541461198557600080fd5b805460ff1916600217815560088201546119a0906001611e6b565b6008830155600b82018390556119b46119fb565b6001600160a01b0316847f4b1763d473ac8fa80b4432ba90047e1b92444d8fabc55e6a002d9b1a316d7959856040516119ed9190613cdb565b60405180910390a350505050565b3390565b6000610a1482613002565b606081604051602001611a1d9190613c51565b6040516020818303038152906040529050919050565b6000611a3e84613083565b15611be5576040516320c13b0b60e01b81526001600160a01b038516906320c13b0b90611a719086908690600401613d5d565b60206040518083038186803b158015611a8957600080fd5b505afa925050508015611ab9575060408051601f3d908101601f19168201909252611ab691810190613b6c565b60015b611af3573d808015611ae7576040519150601f19603f3d011682016040523d82523d6000602084013e611aec565b606091505b5050611b0d565b6001600160e01b0319166320c13b0b60e01b149050611c0d565b82516020840120604051630b135d3f60e11b81526001600160a01b03861691631626ba7e91611b4191908690600401613ce4565b60206040518083038186803b158015611b5957600080fd5b505afa925050508015611b89575060408051601f3d908101601f19168201909252611b8691810190613b6c565b60015b611bc3573d808015611bb7576040519150601f19603f3d011682016040523d82523d6000602084013e611bbc565b606091505b5050611bdd565b6001600160e01b031916630b135d3f60e11b149050611c0d565b506000611c0d565b836001600160a01b0316611c008480519060200120846130bf565b6001600160a01b03161490505b9392505050565b611c348160136000858152602001908152602001600020601301546131c9565b5050565b6000808211611c4657600080fd5b6000828481611c5157fe5b04949350505050565b600081831015611c6a5781611c0d565b5090919050565b600082821115611c8057600080fd5b50900390565b600082611c9557506000610a14565b82820282848281611ca257fe5b0414611c0d57600080fd5b604080517ff8f9cbfae6cc78fbefe7cdc3a1793dfcf4f0e8bbd8cec470b6a28a7a5a3e1efd81527ff5ecf1b3e9debc68e1d9cfabc5997135bfb7a7a3938b7b606b5b4b3f2f1f0ffe60208201527ff6e4ed9ff2d6b458eadcdf97bd91692de2d4da8fd2d0ac50c6ae9a8272523616818301527fc8c0b887b0a8a4489c948c7f847c6125746c645c544c444038302820181008ff60608201527ff7cae577eec2a03cf3bad76fb589591debb2dd67e0aa9834bea6925f6a4a2e0e60808201527fe39ed557db96902cd38ed14fad815115c786af479b7e8324736353433727170760a08201527fc976c13bb96e881cb166a933a55e490d9d56952b8d4e801485467d236242260660c08201527f753a6d1b65325d0c552a4d1345224105391a310b29122104190a11030902010060e0820152610100808201909252600160f81b6001600160801b68010000000000000000640100000000620100006010600460026000198c019081041790810417908104178881041790810417908104179081041790810417017e818283848586878898a8b8c8d8e8f929395969799a9b9d9e9faaeb6bedeeff0281900460ff039091015104600160ff1b909211020190565b600082820183811015611c0d57600080fd5b6000828152601460209081526040808320601583528184206001808301548652601390945291909320600901549091611ec690611ebb908390611c71565b600184015490611c86565b600085815260208490526040902054611edf9083611c86565b111561200d576000805b600a850154811015611f9557600085600a018281548110611f0657fe5b60009182526020808320909101548a83526016825260408084206001600160a01b039092168085529190925291206001015490915087148015611f795750600160008981526016602090815260408083206001600160a01b038616845290915290205460ff166003811115611f7757fe5b145b15611f8c57611f89836001611e6b565b92505b50600101611ee9565b50835460ff191660029081178555600785018690556003850154611fbe91429161099691611c86565b6005850155600060088501556009840181905560405186907ff6d49bf3e05d33a4bc497d3c793fb5756388bb96b947cf51bb60aaecb0e022e390612003908890613cdb565b60405180910390a2505b5050505050565b600082815260136020526040812060088101546005820154600283015492939261204392916109969190611e6b565b600883015490915060009061205990601e613251565b600c840154909150612075906001600160a01b0316838661325f565b60028301541561209d576001830154600284015461209d916001600160a01b031690866132df565b6005830154158015906120bc575060038301546001600160a01b031615155b156120df57600483015460058401546120df916001600160a01b031690866132df565b60078301546120f7906001600160a01b03168261331d565b7399c2268479b93fde36232351229815df80837e23600052600e6020527f0c6541af8a90dc64ec40ead0c49d5d6bd34489a48d08db53d659372ff556a4305480156121935761215981612153633b9aca0061065883600a613251565b90613399565b905061217a7399c2268479b93fde36232351229815df80837e23828761325f565b6007840154612193906001600160a01b031682876132df565b505050505050565b6121a361369e565b6000828152601460205260409081902081516101e081019092528054829060ff1660048111156121cf57fe5b60048111156121da57fe5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a820180548060200260200160405190810160405280929190818152602001828054801561229157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612273575b5050509183525050600b820154602080830191909152600c8301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850182528281529401939283018282801561232f5780601f106123045761010080835404028352916020019161232f565b820191906000526020600020905b81548152906001019060200180831161231257829003601f168201915b5050509183525050600d820154602080830191909152600e8301805460408051601f600260001961010060018716150201909416939093049283018590048502810185018252828152940193928301828280156123cd5780601f106123a2576101008083540402835291602001916123cd565b820191906000526020600020905b8154815290600101906020018083116123b057829003601f168201915b50505050508152505090506123e061350c565b60208281015160009081526013825260409081902081516102408101835281546001600160a01b039081166101e08301908152600180850154831661020085015260028086015461022086015291845285516060808201885260038701548516825260048701548516828a0152600587015482890152858901919091528651808201885260068701548516815260078701548516818a015260088701548189015285880152600986015490850152600a8501546080850152600b85015460a0850152600c850154831660c0850152600d850154831660e0850152600e85015490921661010080850191909152600f850180548751948116159092026000190190911691909104601f8101879004870283018701909552848252919492936101208601939192918301828280156125575780601f1061252c57610100808354040283529160200191612557565b820191906000526020600020905b81548152906001019060200180831161253a57829003601f168201915b5050505050815260200160108201548152602001601182015481526020016012820154815260200160138201548152602001601482015481525050905060006125c06125b2836101c001516064611c7190919063ffffffff16565b604080850151015190613251565b905060006125df82846040015160400151611c7190919063ffffffff16565b90506125f36125ec6119fb565b83876133a8565b61200d846020015182876133b3565b600082815260146020908152604080832060010154835260139091529020600e01546001600160a01b031680156126e95760006060826001600160a01b03166019548686604051602401612657929190613ce4565b60408051601f198184030181529181526020820180516001600160e01b0316635dd8085560e01b1790525161268c9190613c35565b60006040518083038160008787f1925050503d80600081146126ca576040519150601f19603f3d011682016040523d82523d6000602084013e6126cf565b606091505b5091509150603f601954816126e057fe5b045a1161200d57fe5b505050565b6126f661369e565b6000828152601460205260409081902081516101e081019092528054829060ff16600481111561272257fe5b600481111561272d57fe5b8152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152602001600a82018054806020026020016040519081016040528092919081815260200182805480156127e457602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116127c6575b5050509183525050600b820154602080830191909152600c8301805460408051601f600260001961010060018716150201909416939093049283018590048502810185018252828152940193928301828280156128825780601f1061285757610100808354040283529160200191612882565b820191906000526020600020905b81548152906001019060200180831161286557829003601f168201915b5050509183525050600d820154602080830191909152600e8301805460408051601f600260001961010060018716150201909416939093049283018590048502810185018252828152940193928301828280156129205780601f106128f557610100808354040283529160200191612920565b820191906000526020600020905b81548152906001019060200180831161290357829003601f168201915b505050505081525050905061293361350c565b60208281015160009081526013825260409081902081516102408101835281546001600160a01b039081166101e08301908152600180850154831661020085015260028086015461022086015291845285516060808201885260038701548516825260048701548516828a0152600587015482890152858901919091528651808201885260068701548516815260078701548516818a015260088701548189015285880152600986015490850152600a8501546080850152600b85015460a0850152600c850154831660c0850152600d850154831660e0850152600e85015490921661010080850191909152600f850180548751948116159092026000190190911691909104601f810187900487028301870190955284825291949293610120860193919291830182828015612aaa5780601f10612a7f57610100808354040283529160200191612aaa565b820191906000526020600020905b815481529060010190602001808311612a8d57829003601f168201915b50505050508152602001601082015481526020016011820154815260200160128201548152602001601382015481526020016014820154815250509050600080826040015160400151905060005b84610140015151811015612b965760008561014001518281518110612b1957fe5b60209081029190910181015160008981526016835260408082206001600160a01b0384168352909352919091209091506002815460ff166003811115612b5b57fe5b1415612b78576004810154612b71908690611e6b565b9450612b8c565b6101a0860151612b89908590611e6b565b93505b5050600101612af8565b506000612bbc612bb5856101c001516064611c7190919063ffffffff16565b8390613251565b905060005b85610140015151811015612d675760008661014001518281518110612be257fe5b60209081029190910181015160008a81526016835260408082206001600160a01b0384168352909352919091209091506002815460ff166003811115612c2457fe5b1415612ce3576004810154600090612c3e908690896133d9565b9050612c4a8682611c71565b9550612c5a896020015184612fe2565b612c6583828c6133a8565b6001896101400151511115612cdd576001600160a01b038316600090815260176020526040902054612c98906001611e6b565b6001600160a01b0384166000818152601760205260408082209390935591518c927f9703f4589802246c80b822e63697180da799e363cd1b6fd9465a5e5574d5349291a35b50612d5d565b612cf28860200151838b6133ee565b6001600160a01b038216600090815260176020526040902054612d1890600260036133d9565b6001600160a01b0383166000818152601760205260408082209390935591518b927ff868788948d55240774fdbad06555105ef20bbc70d1b7eccda982b65e11e79bb91a35b5050600101612bc1565b50612193856020015183886133b3565b612d7f61350c565b60008381526013602090815260409182902082516102408101845281546001600160a01b039081166101e08301908152600180850154831661020085015260028086015461022086015291845286516060808201895260038701548516825260048701548516828901526005870154828a0152858801919091528751808201895260068701548516815260078701548516818901526008870154818a015285890152600986015490850152600a8501546080850152600b85015460a0850152600c850154831660c0850152600d850154831660e0850152600e85015490921661010080850191909152600f850180548851948116159092026000190190911691909104601f81018690048602830186019096528582529194929361012086019391929190830182828015612ef45780601f10612ec957610100808354040283529160200191612ef4565b820191906000526020600020905b815481529060010190602001808311612ed757829003601f168201915b505050505081526020016010820154815260200160118201548152602001601282015481526020016013820154815260200160148201548152505090506000612f62826040015160400151610996846020015160400151856000015160400151611e6b90919063ffffffff16565b90506000612f82601e84604001516040015161325190919063ffffffff16565b9050612f928360c001518361331d565b612fa5836040015160200151828661325f565b612fc47399c2268479b93fde36232351229815df80837e2382866132df565b61200d7399c2268479b93fde36232351229815df80837e23826131c9565b611c3481601360008581526020019081526020016000206013015461331d565b6008546040516313289ea360e31b81526000916001600160a01b031690639944f51890613033908590600401613c82565b60206040518083038186803b15801561304b57600080fd5b505afa15801561305f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a149190613935565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906130b757508115155b949350505050565b6000806000808451604114156130e95750505060208201516040830151606084015160001a61312e565b84516040141561311657505050602082015160408301516001600160ff1b0381169060001a60071c61312e565b60405162461bcd60e51b815260040161103f90613ebb565b601b8160ff16101561313e57601b015b8060ff16601b148061315357508060ff16601c145b61316f5760405162461bcd60e51b815260040161103f90613e14565b600186828585604051600081526020016040526040516131929493929190613cfd565b6020604051602081039080840390855afa1580156131b4573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6131d482308361340f565b6001600160a01b0382166000908152600e60205260409020546131f79082611e6b565b6001600160a01b0383166000908152600e60205260409081902091909155517f625fed9875dada8643f2418b838ae0bc78d9a148a18eee4ee1979ff0f3f5d427906132459084908490613c96565b60405180910390a15050565b6000611c0d838360646133d9565b6001600160a01b0383166000908152600e60205260409020546132829083611c71565b6001600160a01b0384166000908152600e60205260409081902091909155517f1bccc549c38561cd5b57f0db11ceb8dde1b0b6ee05ab5e155b51c7c5ba64becb906132d290859085908590613caf565b60405180910390a1505050565b6132ea30848461340f565b7fc2aca55aa696938c7e95842e8939ca0fbb2120a3eeb8948cdcee2b70da5666728383836040516132d293929190613caf565b61332830838361340f565b6001600160a01b0382166000908152600e602052604090205461334b9082611c71565b6001600160a01b0383166000908152600e60205260409081902091909155517f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1906132459084908490613c96565b6000818310611c6a5781611c0d565b6126e98383836132df565b6000838152601360205260409020600701546126e9906001600160a01b031683836132df565b60006130b76133e88585611c86565b83611c38565b6126e98260136000868152602001908152602001600020601301548361325f565b6001600160a01b0383166134355760405162461bcd60e51b815260040161103f90613e76565b6001600160a01b03821661345b5760405162461bcd60e51b815260040161103f90613d8b565b6001600160a01b0383166000908152600d602052604090205461347e9082611c71565b6001600160a01b038085166000908152600d602052604080822093909355908416815220546134ad9082611e6b565b6001600160a01b038084166000818152600d602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906134ff908590613cdb565b60405180910390a3505050565b604051806101e0016040528061352061371e565b815260200161352d61371e565b815260200161353a61371e565b815260200160008152602001600081526020016000801916815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160008152602001600081526020016000815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106135f357805160ff1916838001178555613620565b82800160010185558215613620579182015b82811115613620578251825591602001919060010190613605565b5061362c92915061373e565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106136715782800160ff19823516178555613620565b82800160010185558215613620579182015b82811115613620578235825591602001919060010190613683565b604080516101e08101909152806000815260200160008019168152602001600081526020016000815260200160008152602001600081526020016000815260200160008019168152602001600081526020016000815260200160608152602001600080191681526020016060815260200160008152602001606081525090565b604080516060810182526000808252602082018190529181019190915290565b5b8082111561362c576000815560010161373f565b80356001600160a01b0381168114610a1457600080fd5b60008083601f84011261377b578182fd5b50813567ffffffffffffffff811115613792578182fd5b60208301915083602080830285010111156137ac57600080fd5b9250929050565b60008083601f8401126137c4578182fd5b50813567ffffffffffffffff8111156137db578182fd5b6020830191508360208285010111156137ac57600080fd5b600082601f830112613803578081fd5b813567ffffffffffffffff8082111561381a578283fd5b604051601f8301601f19168101602001828111828210171561383a578485fd5b60405282815292508284830160200186101561385557600080fd5b8260208601602083013760006020848301015250505092915050565b600060208284031215613882578081fd5b611c0d8383613753565b6000806020838503121561389e578081fd5b823567ffffffffffffffff8111156138b4578182fd5b6138c08582860161376a565b90969095509350505050565b600080600080604085870312156138e1578182fd5b843567ffffffffffffffff808211156138f8578384fd5b6139048883890161376a565b9096509450602087013591508082111561391c578384fd5b506139298782880161376a565b95989497509550505050565b600060208284031215613946578081fd5b81518015158114611c0d578182fd5b600060208284031215613966578081fd5b5035919050565b6000806040838503121561397f578182fd5b50508035926020909101359150565b60008060008060008060c087890312156139a6578182fd5b86359550602087013594506040870135935060608701356001600160a01b03811681146139d1578283fd5b9250608087013567ffffffffffffffff808211156139ed578384fd5b6139f98a838b016137f3565b935060a0890135915080821115613a0e578283fd5b50613a1b89828a016137f3565b9150509295509295509295565b600080600080600080600060e0888a031215613a42578081fd5b8735965060208801359550604088013567ffffffffffffffff80821115613a67578283fd5b613a738b838c016137f3565b965060608a0135915080821115613a88578283fd5b613a948b838c016137f3565b9550613aa38b60808c01613753565b945060a08a0135915080821115613ab8578283fd5b613ac48b838c016137f3565b935060c08a0135915080821115613ad9578283fd5b50613ae68a828b016137f3565b91505092959891949750929550565b600080600080600060608688031215613b0c578081fd5b85359450602086013567ffffffffffffffff80821115613b2a578283fd5b613b3689838a016137b3565b90965094506040880135915080821115613b4e578283fd5b50613b5b888289016137b3565b969995985093965092949392505050565b600060208284031215613b7d578081fd5b81516001600160e01b031981168114611c0d578182fd5b60008151808452613bac816020860160208601613ef2565b601f01601f19169290920160200192915050565b6bffffffffffffffffffffffff19606094851b811682526014820193909352921b16603482015260480190565b60609390931b6bffffffffffffffffffffffff191683526014830191909152603482015260540190565b918252602082015260400190565b6000828483379101908152919050565b60008251613c47818460208701613ef2565b9190910192915050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b901515815260200190565b90815260200190565b6000838252604060208301526130b76040830184613b94565b93845260ff9290921660208401526040830152606082015260800190565b60006020825282602083015282846040840137818301604090810191909152601f909201601f19160101919050565b600060208252611c0d6020830184613b94565b600060408252613d706040830185613b94565b8281036020840152613d828185613b94565b95945050505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526013908201527234b73b30b634b216b9b4b3b730ba3ab93296bb60691b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526018908201527f696e76616c69642d7369676e61747572652d666f726d61740000000000000000604082015260600190565b60005b83811015613f0d578181015183820152602001613ef5565b83811115613f1c576000848401525b5050505056fea2646970667358221220cc1cb0201b2d624050b00628d41816686245167b7b2fb68e2603088533af189664736f6c634300060c0033", - "immutableReferences": {}, - "sourceMap": "1372:452:30:-:0;;;;;;;;;;;;-1:-1:-1;865:17:83;885:12;:10;:12::i;:::-;907:6;:18;;-1:-1:-1;;;;;;907:18:83;-1:-1:-1;;;;;907:18:83;;;;;;;940:43;;907:18;;-1:-1:-1;907:18:83;-1:-1:-1;;;;;;;;;;;940:43:83;907:6;;940:43;-1:-1:-1;124:19:73;:17;:19::i;:::-;1372:452:30;;590:104:81;677:10;590:104;:::o;1689:145:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;;;;;;;;;1795:1:::1;1779:6:::0;;1758:40:::1;::::0;-1:-1:-1;;;;;1779:6:83;;::::1;::::0;-1:-1:-1;;;;;;;;;;;1758:40:83;1795:1;;1758:40:::1;1825:1;1808:19:::0;;-1:-1:-1;;;;;;1808:19:83::1;::::0;;1689:145::o;346:416:-1:-;546:2;560:47;;;531:18;;;873:19;266:34;913:14;;;246:55;320:12;;;517:245::o;:::-;1372:452:30;;;;;;", - "deployedSourceMap": "1372:452:30:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4858:2847:29;;;;;;:::i;:::-;;:::i;:::-;;3803:977;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;7784:3034;;;;;;:::i;:::-;;:::i;1689:145:83:-;;;:::i;1066:77::-;;;:::i;:::-;;;;;;;:::i;12963:1173:29:-;;;;;;:::i;:::-;;:::i;21540:267::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;14139:587::-;;;;;;:::i;:::-;;:::i;1983:240:83:-;;;;;;:::i;:::-;;:::i;11935:1025:29:-;;;;;;:::i;:::-;;:::i;21992:282::-;;;;;;:::i;:::-;;:::i;21810:179::-;;;;;;:::i;:::-;;:::i;10821:1111::-;;;;;;:::i;:::-;;:::i;4858:2847::-;5087:27;5101:12;:10;:12::i;:::-;5087:13;:27::i;:::-;5079:36;;;;;;5120:41;5172:16;;;:7;:16;;;;;;;;5244:15;:24;;;;;5172:16;;5120:41;;5269:12;:10;:12::i;:::-;-1:-1:-1;;;;;5244:38:29;-1:-1:-1;;;;;5244:38:29;;;;;;;;;;;;5192:90;;5286:41;;:::i;:::-;5346:11;;;;;5338:20;;;;:7;:20;;;;;;;;;5286:72;;;;;;;;;-1:-1:-1;;;;;5286:72:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5286:72:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;5338:20;;5286:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5286:72:29;;;-1:-1:-1;;5286:72:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5400:37:29;5371:11;;;;:66;;;;;;;;;5363:82;;;;;;5486:3;5457:4;:25;;;:32;5449:82;;;;;;5572:44;5543:19;;;;:73;;;;;;;;;5535:82;;;;;;-1:-1:-1;;;;;5672:31:29;;;;;:61;;-1:-1:-1;5708:8:29;;;;5717:2;5708:12;;;-1:-1:-1;;;5708:19:29;:24;5672:61;5664:70;;;;;;5849:261;-1:-1:-1;;;;;5871:31:29;;;;;;:60;;-1:-1:-1;5906:11:29;;-1:-1:-1;;;;;5906:11:29;:25;;5871:60;5869:102;;5950:4;:15;;;:21;;;5869:102;;;5936:11;;-1:-1:-1;;;;;5936:11:29;5869:102;5976:107;6028:12;:10;:12::i;:::-;6046:7;6059:17;6006:75;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;5996:86;;;;;;5976:19;:107::i;:::-;6088:18;5849:15;:261::i;:::-;5841:270;;;;;;-1:-1:-1;;;;;6153:31:29;;;;:185;;;6188:150;6208:17;6230:87;6282:11;6299;6260:55;;;;;;;;;:::i;6230:87::-;6322:12;6188:15;:150::i;:::-;6145:194;;;;;;6375:82;;6407:50;-1:-1:-1;;6375:82:29;;;;;;;6461:23;;:43;;;6508:23;;;:43;;;6555:29;;;:49;;-1:-1:-1;;;;;;6555:49:29;-1:-1:-1;;;;;6555:49:29;;;;;6608:17;;;6631:12;:10;:12::i;:::-;6608:36;;;;;;;;-1:-1:-1;6608:36:29;;;;;;;;;;-1:-1:-1;;;;;;6608:36:29;-1:-1:-1;;;;;6608:36:29;;;;;;;;;;6666:11;;;6649:43;;6679:12;:10;:12::i;:::-;6649:16;:43::i;:::-;6726:12;:10;:12::i;:::-;-1:-1:-1;;;;;6702:50:29;6717:7;6702:50;6740:11;6702:50;;;;;;:::i;:::-;;;;;;;;7214:43;7260:20;;;:11;:20;;;;;;7302:49;7349:1;7302:42;7342:1;7302:35;7342:1;7302:14;7214:43;7317:12;:10;:12::i;:::-;-1:-1:-1;;;;;7302:28:29;;;;;;;;;;;;-1:-1:-1;7302:28:29;;;:32;:35::i;:::-;:39;;:42::i;:::-;:46;;:49::i;:::-;7355:13;7372:28;;;;;;;;;;;7285:66;;-1:-1:-1;7421:35:29;7372:28;7421:24;7285:66;7421:12;7372:28;7431:1;7421:9;:12::i;:::-;:16;;:24::i;:35::-;7404:52;;7492:12;:6;:10;:12::i;:::-;7461:19;;;:43;7539:15;:28;;;;;;;;;;;:39;;7572:5;7539:32;:39::i;:::-;7508:15;:28;;;;;;;;;;:70;7613:15;;;;:26;;7633:5;7613:19;:26::i;:::-;7582:15;;;:57;7665:36;7680:7;7689:11;7665:14;:36::i;:::-;4858:2847;;;;;;;;;;;;;:::o;3803:977::-;3879:7;3893:32;;:::i;:::-;3928:16;;;;:7;:16;;;;;;;;;3893:51;;;;;;;;;-1:-1:-1;;;;;3893:51:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3893:51:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;3928:16;;3893:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3964:4;:13;;;3957:3;:20;;3949:47;;;;;;4033:12;;;;4015:13;;;;:31;;:17;:31::i;:::-;4008:3;:38;4000:47;;;;;;4052:14;4097:7;4106:3;4080:30;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;4080:30:29;;;;;;;;;4070:41;;4080:30;4070:41;;;;4115:33;4151:15;;;:7;:15;;;;;;4070:41;;-1:-1:-1;4151:15:29;4178:11;;;;:51;;;;;;;;;4170:60;;;;;;4235:65;;-1:-1:-1;;4235:65:29;4263:37;4235:65;;;;;4304:11;;:35;;;4343:8;;;:31;;;4419:13;;;;4406:12;:27;;:12;;4419:13;4406:27;;;;;;;;;;;;;;;;;;;:44;;;4378:12;;;:72;;;4532:14;;;;4482:65;;:45;;3041:1:4;4482:16:29;:45::i;:::-;:49;;:65::i;:::-;4454:25;;;:93;4629:14;;;;4579:12;;;;:65;;4629:14;4579:45;;3161:2:4;4579:16:29;:45::i;:65::-;4551:18;;;:93;4672:19;;;;:11;:19;;;;;;4700:1;4672:25;;;:29;4734:15;;;;:23;4711:47;;-1:-1:-1;;;;;4711:47:29;;;;4684:6;;4711:47;;4672:19;4711:47;-1:-1:-1;4770:6:29;-1:-1:-1;;3803:977:29;;;;;:::o;7784:3034::-;8089:27;8103:12;:10;:12::i;8089:27::-;8081:36;;;;;;8122:41;8174:16;;;:7;:16;;;;;;;;8246:15;:24;;;;;8174:16;;8122:41;;8271:12;:10;:12::i;:::-;-1:-1:-1;;;;;8246:38:29;-1:-1:-1;;;;;8246:38:29;;;;;;;;;;;;8194:90;;8288:41;;:::i;:::-;8348:11;;;;;8340:20;;;;:7;:20;;;;;;;;;8288:72;;;;;;;;;-1:-1:-1;;;;;8288:72:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8288:72:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;8340:20;;8288:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;8288:72:29;;;-1:-1:-1;;8288:72:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8402:37:29;8373:11;;;;:66;;;;;;;;;8365:75;;;;;;8481:3;8452:4;:25;;;:32;8444:75;;;;;;8531:17;;;:24;:30;8523:75;;;;;;8610:4;:10;;;8639:1;8610:30;8602:75;;;;;;8734:18;8796:7;8805:13;8765:54;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8755:65;;;;;;8734:86;;8824:18;8872:12;:10;:12::i;:::-;8886:7;8895:13;8855:54;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;8845:65;;;;;;8824:86;;8949:1;-1:-1:-1;;;;;8924:27:29;:4;:13;;;-1:-1:-1;;;;;8924:27:29;;:59;;;;-1:-1:-1;8955:23:29;;:28;8924:59;8923:113;;;-1:-1:-1;9019:17:29;;;;8988:27;;;;;;:48;8923:113;8915:122;;;;;;-1:-1:-1;;;;;9092:31:29;;;;;:61;;-1:-1:-1;9128:8:29;;;;9137:2;9128:12;;;-1:-1:-1;;;9128:19:29;:24;9092:61;9084:70;;;;;;9269:261;-1:-1:-1;;;;;9291:31:29;;;;;;:60;;-1:-1:-1;9326:11:29;;-1:-1:-1;;;;;9326:11:29;:25;;9291:60;9289:102;;9370:4;:15;;;:21;;;9289:102;;;9356:11;;-1:-1:-1;;;;;9356:11:29;9289:102;9396:107;9448:12;:10;:12::i;:::-;9466:7;9479:17;9426:75;;;;;;;;;;:::i;9396:107::-;9508:18;9269:15;:261::i;:::-;9261:270;;;;;;-1:-1:-1;;;;;9573:31:29;;;;:183;;;9608:148;9628:17;9650:85;9702:10;9718;9680:53;;;;;;;;;:::i;9650:85::-;9740:12;9608:15;:148::i;:::-;9565:192;;;;;;9762:77;;9794:45;-1:-1:-1;;9762:77:29;;;;;;;-1:-1:-1;9843:23:29;;:42;;;9889:23;;;:42;;;9935:29;;;;:49;;-1:-1:-1;;;;;;9935:49:29;-1:-1:-1;;;;;9935:49:29;;;;;9989:72;;;;;;;;;10097:23;10065:19;;;:55;10156:12;;;;:48;;10200:3;;10156:39;;:16;:39::i;:48::-;10124:19;;;:80;10240:1;10208:18;;;:33;;;10245:18;;;:33;10282:17;;;:45;;;10331:40;;;;:12;;;;:40;;;;;:::i;:::-;-1:-1:-1;10375:48:29;;;;:20;;;;:48;;;;;:::i;:::-;;10460:4;:17;;10483:12;:10;:12::i;:::-;10460:36;;;;;;;;-1:-1:-1;10460:36:29;;;;;;;;;;-1:-1:-1;;;;;;10460:36:29;-1:-1:-1;;;;;10460:36:29;;;;;;;;;;10513:11;;;10501:33;;10526:7;10501:11;:33::i;:::-;10538:30;10560:7;10538:21;:30::i;:::-;10602:12;:10;:12::i;:::-;-1:-1:-1;;;;;10578:49:29;10593:7;10578:49;10616:10;10578:49;;;;;;:::i;:::-;;;;;;;;10650:7;10636:34;10659:10;10636:34;;;;;;:::i;:::-;;;;;;;;10699:12;:10;:12::i;:::-;-1:-1:-1;;;;;10679:48:29;10690:7;10679:48;10713:13;10679:48;;;;;;:::i;:::-;;;;;;;;10749:7;10736:31;10758:8;10736:31;;;;;;:::i;:::-;;;;;;;;10772:42;10788:7;10797:16;10772:15;:42::i;:::-;7784:3034;;;;;;;;;;;;:::o;1689:145:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;;;;;;;;;1795:1:::1;1779:6:::0;;1758:40:::1;::::0;-1:-1:-1;;;;;1779:6:83;;::::1;::::0;1758:40:::1;::::0;1795:1;;1758:40:::1;1825:1;1808:19:::0;;-1:-1:-1;;;;;;1808:19:83::1;::::0;;1689:145::o;1066:77::-;1104:7;1130:6;-1:-1:-1;;;;;1130:6:83;1066:77;:::o;12963:1173:29:-;1481:32:11;1489:16;;;:7;:16;;;;;;;;:23;;;1481:32;;:7;:32;;;;;:49;;;13142:7:29;;-1:-1:-1;;;;;1481:49:11;1465:12;:10;:12::i;:::-;-1:-1:-1;;;;;1465:65:11;;1457:74;;;;;;13156:33:29::1;13192:16:::0;;;:7:::1;:16;::::0;;;;13212:33:::1;;:::i;:::-;13256:11;::::0;;::::1;::::0;13248:20:::1;::::0;;;:7:::1;:20;::::0;;;;;;;;13212:56;;;;;;;;;-1:-1:-1;;;;;13212:56:29;;::::1;;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;::::0;;;;::::1;::::0;;::::1;::::0;;;;;;;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;;;;;;::::1;::::0;;::::1;::::0;;;;;;;;;;;::::1;::::0;;;;;;;;::::1;::::0;;::::1;::::0;::::1;::::0;;::::1;::::0;;;;;;;::::1;::::0;;::::1;::::0;;;;;;;;;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;::::1;::::0;;;;::::1;::::0;::::1;::::0;;::::1;::::0;;;;::::1;::::0;::::1;::::0;;;::::1;;::::0;;;;;;;::::1;::::0;::::1;::::0;;;;;;::::1;;::::0;;::::1;-1:-1:-1::0;;13212:56:29;;;::::1;::::0;;;::::1;;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;;;13248:20;;13212:56;;;;;::::1;::::0;;;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;13212:56:29;;;-1:-1:-1;;13212:56:29::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;::::1;::::0;;;;;;;-1:-1:-1;13303:40:29::1;13281:11:::0;;::::1;;:62;::::0;::::1;;;;;;;13273:107;;;::::0;::::1;;13414:3;13392:4;:18;;;:25;13384:107;;;::::0;::::1;;13525:4;:18;;;13503:4;:18;;;:40;:98;;;;13569:1;13548:4;:18;;;:22;:52;;;;;13597:3;13574:4;:19;;;:26;;13548:52;13495:107;;;::::0;::::1;;13616:13;::::0;::::1;::::0;-1:-1:-1;;;;;13616:27:29::1;::::0;:59;::::1;;;-1:-1:-1::0;13647:28:29;;13616:59:::1;13615:113;;;;13711:4;:17;;;13690:16;;13680:27;;;;;;;:::i;:::-;;;;;;;;:48;13615:113;13607:122;;;::::0;::::1;;13734:63:::0;;-1:-1:-1;;13734:63:29::1;13757:40;13734:63;::::0;;13801:31:::1;:12;::::0;::::1;13824:8:::0;;13801:31:::1;:::i;:::-;-1:-1:-1::0;13836:39:29::1;:20;::::0;::::1;13859:16:::0;;13836:39:::1;:::i;:::-;;13958:33;13970:4;:11;;;13983:7;13958:11;:33::i;:::-;13995:26;14013:7;13995:17;:26::i;:::-;14067:7;14054:31;14076:8;;14054:31;;;;;;;:::i;:::-;;;;;;;;14090:42;14106:7;14115:16;;14090:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;;-1:-1:-1;14090:15:29::1;::::0;-1:-1:-1;;;14090:42:29:i:1;:::-;1535:1:11;;12963:1173:29::0;;;;;;:::o;21540:267::-;21651:4;21670:29;;;21662:38;;;;;;21709:6;21704:85;21721:18;;;21704:85;;;21753:31;21764:7;;21772:1;21764:10;;;;;;;;;;;;;21776:4;;21781:1;21776:7;;;;;;;;;;;;;21753:10;:31::i;:::-;-1:-1:-1;21741:3:29;;21704:85;;;-1:-1:-1;21799:4:29;;21540:267;-1:-1:-1;;;;;21540:267:29:o;14139:587::-;14196:33;14232:16;;;:7;:16;;;;;14275:37;14260:11;;;;:52;;;;;;;;;:115;;;-1:-1:-1;14335:40:29;14320:11;;;;:55;;;;;;;;;14260:115;14252:124;;;;;;14410:3;14388:4;:18;;;:25;;14380:34;;;;;;14419:51;;-1:-1:-1;;14419:51:29;14433:37;14419:51;;;;14520:11;;;14509:32;;14533:7;14509:10;:32::i;:::-;14550:9;14545:148;14569:17;;;:24;14565:28;;14545:148;;;14607:14;14624:4;:17;;14642:1;14624:20;;;;;;;;;;;;;;;;;;;14668:11;;;-1:-1:-1;;;;;14624:20:29;;;;-1:-1:-1;14649:39:29;;14624:20;14649:18;:39::i;:::-;-1:-1:-1;14595:3:29;;14545:148;;;-1:-1:-1;14702:20:29;;14714:7;;14702:20;;;;;14139:587;;:::o;1983:240:83:-;1280:12;:10;:12::i;:::-;1270:6;;-1:-1:-1;;;;;1270:6:83;;;:22;;;1262:67;;;;-1:-1:-1;;;1262:67:83;;;;;;;:::i;:::-;-1:-1:-1;;;;;2071:22:83;::::1;2063:73;;;;-1:-1:-1::0;;;2063:73:83::1;;;;;;;:::i;:::-;2172:6;::::0;;2151:38:::1;::::0;-1:-1:-1;;;;;2151:38:83;;::::1;::::0;2172:6;::::1;::::0;2151:38:::1;::::0;::::1;2199:6;:17:::0;;-1:-1:-1;;;;;;2199:17:83::1;-1:-1:-1::0;;;;;2199:17:83;;;::::1;::::0;;;::::1;::::0;;1983:240::o;11935:1025:29:-;1481:32:11;1489:16;;;:7;:16;;;;;;;;:23;;;1481:32;;:7;:32;;;;;:49;;;12004:7:29;;-1:-1:-1;;;;;1481:49:11;1465:12;:10;:12::i;:::-;-1:-1:-1;;;;;1465:65:11;;1457:74;;;;;;12018:33:29::1;12054:16:::0;;;:7:::1;:16;::::0;;;;12105:40:::1;12082:11:::0;;::::1;;:63;::::0;::::1;;;;;;;12074:72;;;::::0;::::1;;12181:3;12158:4;:18;;;:26;12150:72;;;::::0;::::1;;12257:3;12234:4;:19;;;:26;;:53;;;;-1:-1:-1::0;12264:18:29::1;::::0;::::1;::::0;:23;12234:53:::1;12226:72;;;::::0;::::1;;12308:9;12303:284;12327:17;::::0;::::1;:24:::0;12323:28;::::1;12303:284;;;12365:14;12382:4;:17;;12400:1;12382:20;;;;;;;;;::::0;;;::::1;::::0;;;;;::::1;::::0;12458:19:::1;::::0;::::1;::::0;12411:24;;;:15:::1;:24:::0;;;;;;-1:-1:-1;;;;;12382:20:29;;::::1;12411:32:::0;;;;;;;;;;;12382:20;12411:43:::1;::::0;12382:20;;-1:-1:-1;12411:66:29::1;12407:176;;;12488:24;::::0;;;:15:::1;:24;::::0;;;;;;;-1:-1:-1;;;;;12488:32:29;::::1;::::0;;;;;;;:89;;-1:-1:-1;;12488:89:29::1;12530:47;12488:89;::::0;;12407:176:::1;-1:-1:-1::0;12353:3:29::1;;12303:284;;;-1:-1:-1::0;12591:43:29::1;12637:20:::0;;;:11:::1;:20;::::0;;;;;;;12715:19:::1;::::0;::::1;::::0;12699:36;;;;;;;;;;12679:15:::1;::::0;::::1;::::0;:57:::1;::::0;:19:::1;:57::i;:::-;12661:15;::::0;;::::1;:75:::0;;;;12756:19:::1;::::0;::::1;::::0;;12779:1:::1;12740:36:::0;;;::::1;::::0;;;;;;;:40;;;12785:59;;-1:-1:-1;;12785:59:29::1;::::0;;::::1;::::0;;12848:25;;;;12877:19:::1;::::0;::::1;:23:::0;;;12904:18:::1;::::0;::::1;:23:::0;;;12937:19;;12948:7;;12937:19:::1;::::0;::::1;1535:1:11;;11935:1025:29::0;;:::o;21992:282::-;22111:4;22130:29;;;22122:38;;;;;;22169:6;22164:92;22181:18;;;22164:92;;;22213:38;22219:31;22230:7;;22238:1;22230:10;;;;;;;;;;;;;22242:4;;22247:1;22242:7;;;;;;22213:38;22201:3;;22164:92;;21810:179;21889:4;;21900:71;21917:18;;;21900:71;;;21949:17;21955:7;;21963:1;21955:10;;;;;;;;;;;;;21949:5;:17::i;:::-;21937:3;;21900:71;;;-1:-1:-1;21981:4:29;;21810:179;-1:-1:-1;;;21810:179:29:o;10821:1111::-;10916:41;10968:16;;;:7;:16;;;;;;;;11040:15;:24;;;;;10968:16;;10916:41;;11065:12;:10;:12::i;:::-;-1:-1:-1;;;;;11040:38:29;;;;;;;;;;;;-1:-1:-1;11040:38:29;;-1:-1:-1;11117:40:29;11090:11;;;;:67;;;;;;;;;11082:101;;;;;;11222:3;11195:4;:19;;;:30;11187:101;;;;;;11327:50;11300:19;;;;:77;;;;;;;;;11292:101;;;;;;11432:4;:19;;;11405:12;:23;;;:46;11397:101;;;;;;11578:7;11587:13;11547:54;;;;;;;;;:::i;:::-;;;;;;;;;;;;;11537:65;;;;;;11510:12;:23;;;:92;11502:101;;;;;;11669:12;:10;:12::i;:::-;11683:7;11692:13;11652:54;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;11642:65;;;;;;11615:12;:23;;;:92;11607:101;;;;;;11713:67;;-1:-1:-1;;11713:67:29;11735:45;11713:67;;;11806:18;;;;:25;;11713:67;11806:22;:25::i;:::-;11784:18;;;:47;11835:17;;;:35;;;11900:12;:10;:12::i;:::-;-1:-1:-1;;;;;11880:48:29;11891:7;11880:48;11914:13;11880:48;;;;;;:::i;:::-;;;;;;;;10821:1111;;;;:::o;590:104:81:-;677:10;590:104;:::o;1649:173:30:-;1760:4;1778:40;1810:7;1778:31;:40::i;1614:163:32:-;1685:12;1764:8;1711:62;;;;;;;;:::i;:::-;;;;;;;;;;;;;1704:69;;1614:163;;;:::o;4605:684::-;4722:4;4737:22;4749:9;4737:11;:22::i;:::-;4733:553;;;4772:59;;-1:-1:-1;;;4772:59:32;;-1:-1:-1;;;;;4772:36:32;;;;;:59;;4809:9;;4820:10;;4772:59;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4772:59:32;;;;;;;;-1:-1:-1;;4772:59:32;;;;;;;;;;;;:::i;:::-;;;4768:199;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4927:40;4768:199;;;-1:-1:-1;;;;;;4871:46:32;-1:-1:-1;;;4871:46:32;;-1:-1:-1;4864:53:32;;4768:199;5013:20;;;;;;4976:70;;-1:-1:-1;;;4976:70:32;;-1:-1:-1;;;;;4976:36:32;;;;;:70;;5013:20;5035:10;;4976:70;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4976:70:32;;;;;;;;-1:-1:-1;;4976:70:32;;;;;;;;;;;;:::i;:::-;;;4972:210;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5142:40;4972:210;;;-1:-1:-1;;;;;;5086:46:32;-1:-1:-1;;;5086:46:32;;-1:-1:-1;5079:53:32;;4972:210;-1:-1:-1;5194:5:32;5187:12;;4733:553;5272:9;-1:-1:-1;;;;;5226:55:32;:42;5245:9;5235:20;;;;;;5257:10;5226:8;:42::i;:::-;-1:-1:-1;;;;;5226:55:32;;5219:62;;4733:553;4605:684;;;;;:::o;4938:122:16:-;5013:43;5018:7;5027;:16;5035:7;5027:16;;;;;;;;;;;:28;;;5013:4;:43::i;:::-;4938:122;;:::o;1147:268:77:-;1205:7;1293:1;1289;:5;1281:14;;;;;;1300:9;1316:1;1312;:5;;;;;;;1147:268;-1:-1:-1;;;;1147:268:77:o;1715:97::-;1773:7;1799:1;1794;:6;;:14;;1807:1;1794:14;;;-1:-1:-1;1803:1:77;;1787:21;-1:-1:-1;1715:97:77:o;470:124::-;528:7;555:1;550;:6;;542:15;;;;;;-1:-1:-1;573:5:77;;;470:124::o;669:362::-;727:7;944:6;940:32;;-1:-1:-1;966:1:77;959:8;;940:32;987:5;;;991:1;987;:5;:1;1004:5;;;;;:10;996:19;;;;;2487:1539;2907:4;2901:11;;2936:66;2916:87;;3027:66;3020:4;3014:11;;3007:87;3118:66;3105:11;;;3098:87;3209:66;3202:4;3196:11;;3189:87;3300:66;3293:4;3287:11;;3280:87;3391:66;3384:4;3378:11;;3371:87;3482:66;3475:4;3469:11;;3462:87;3573:66;3566:4;3560:11;;3553:87;2695:5;3657:13;;;3644:27;;;-1:-1:-1;;;2587:1:77;-1:-1:-1;;;2790:19:77;2755:11;2724:7;2667:4;2639;2611;-1:-1:-1;;2581:8:77;;2604:12;;;2598:19;2632:12;;;2626:19;2660:12;;;2654:19;2688:13;;;2682:20;2717:15;;;2711:22;2748:19;;;2742:26;2783:27;;;2777:34;2826:43;;;2820:50;2879:9;3688:64;3851:13;3847:25;;;3901:3;3897:10;3891:17;;;3885:24;3881:36;-1:-1:-1;;;3942:75:77;;;3933:85;3926:93;;2555:1468::o;227:124::-;285:7;311:5;;;328:6;;;;320:15;;;;;14997:1624:29;15078:38;15124:16;;;:7;:16;;;;;;;;15190:11;:20;;;;;15239:11;;;;;15231:20;;:7;:20;;;;;;;:26;;;15190:20;;15769:33;;15789:12;;15231:26;;15789:9;:12::i;:::-;15769:15;;;;;:19;:33::i;:::-;15728:15;:27;;;;;;;;;;;:38;;15760:5;15728:31;:38::i;:::-;:74;15724:894;;;15859:21;15894:9;15889:379;15913:17;;;:24;15909:28;;15889:379;;;15953:9;15965:4;:17;;15983:1;15965:20;;;;;;;;;;;;;;;;;;;;16005:24;;;:15;:24;;;;;;-1:-1:-1;;;;;15965:20:29;;;16005:27;;;;;;;;;15965:20;16005:38;;15965:20;;-1:-1:-1;16005:52:29;;:154;;;;-1:-1:-1;16109:50:29;16071:24;;;;:15;:24;;;;;;;;-1:-1:-1;;;;;16071:27:29;;;;;;;;;:34;;;:88;;;;;;;;;16005:154;15991:272;;;16236:20;:13;16254:1;16236:17;:20::i;:::-;16220:36;;15991:272;-1:-1:-1;15939:3:29;;15889:379;;;-1:-1:-1;16326:62:29;;-1:-1:-1;;16326:62:29;16348:40;16326:62;;;;;16393:19;;;:32;;;16452:12;;;;:48;;16496:3;;16452:39;;:16;:39::i;:48::-;16430:19;;;:70;16527:1;16505:18;;;:23;16533:18;;;:35;;;16579:34;;16593:7;;16579:34;;;;16602:10;;16579:34;:::i;:::-;;;;;;;;15724:894;;14997:1624;;;;;:::o;1823:1159::-;1893:33;1929:16;;;:7;:16;;;;;2038:21;;;;2004:18;;;;2038:21;1975:14;;;1929:16;;1893:33;1975:85;;2038:21;1975:48;;:14;:28;:48::i;:85::-;2084:21;;;;1950:110;;-1:-1:-1;2064:17:29;;2084:64;;3222:2:4;2084:40:29;:64::i;:::-;2186:14;;;;2064:84;;-1:-1:-1;2180:46:29;;-1:-1:-1;;;;;2186:14:29;2202;2218:7;2180:5;:46::i;:::-;2251:14;;;;:18;2247:83;;2285:14;;;;2301;;;;2278:47;;-1:-1:-1;;;;;2285:14:29;;2317:7;2278:6;:47::i;:::-;2354:18;;;;:22;;;;:60;;-1:-1:-1;2380:12:29;;;:20;-1:-1:-1;;;;;2380:20:29;:34;;2354:60;2350:133;;;2430:18;;;;2450;;;;2423:55;;-1:-1:-1;;;;;2430:18:29;;2470:7;2423:6;:55::i;:::-;2516:21;;;;2509:40;;-1:-1:-1;;;;;2516:21:29;2539:9;2509:6;:40::i;:::-;3437:42:4;2646:13:29;2662:24;:9;:24;;;;2694:9;;2690:289;;2720:111;2825:5;2720:68;3344:10:4;2720:35:29;2825:5;3283:2:4;2720:22:29;:35::i;:68::-;:104;;:111::i;:::-;2712:119;;2879:45;3437:42:4;2909:5:29;2916:7;2879:5;:45::i;:::-;2936:21;;;;2929:45;;-1:-1:-1;;;;;2936:21:29;2959:5;2966:7;2929:6;:45::i;:::-;1823:1159;;;;;;:::o;19639:521::-;19702:32;;:::i;:::-;19737:16;;;;:7;:16;;;;;;;19702:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19702:51:29;;;;;;;;;;;;;;;;-1:-1:-1;;;19702:51:29;;;-1:-1:-1;;19702:51:29;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;19702:51:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;19702:51:29;;;-1:-1:-1;;19702:51:29;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;19702:51:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19757:32;;:::i;:::-;19800:11;;;;;19792:20;;;;:7;:20;;;;;;;19757:55;;;;;;;;;-1:-1:-1;;;;;19757:55:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;19757:55:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;19792:20;;19757:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19860:20;19886:77;19919:43;19936:4;:25;;;19927:3;19919:16;;:43;;;;:::i;:::-;19886:15;;;;;:21;;;:32;:77::i;:::-;19860:103;;19967:23;19993:39;20019:12;19993:4;:15;;;:21;;;:25;;:39;;;;:::i;:::-;19967:65;;20036:58;20058:12;:10;:12::i;:::-;20072;20086:7;20036:21;:58::i;:::-;20098;20118:4;:11;;;20131:15;20148:7;20098:19;:58::i;20219:1083::-;20307:14;20332:16;;;:7;:16;;;;;;;;:23;;;20324:32;;:7;:32;;;;;:41;;;-1:-1:-1;;;;;20324:41:29;20373:20;;20369:930;;21031:12;21045:23;21072:6;-1:-1:-1;;;;;21072:11:29;21089:13;;21160:7;21169:16;21104:82;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;21104:82:29;;;;;;;;;;;;;;-1:-1:-1;;;;;21104:82:29;-1:-1:-1;;;21104:82:29;;;21072:115;;;21104:82;21072:115;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21030:157;;;;21227:2;21211:13;;:18;;;;;;21199:9;:30;21192:38;;;20369:930;20219:1083;;;:::o;16657:2920::-;16716:32;;:::i;:::-;16751:16;;;;:7;:16;;;;;;;16716:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16716:51:29;;;;;;;;;;;;;;;;-1:-1:-1;;;16716:51:29;;;-1:-1:-1;;16716:51:29;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16716:51:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;16716:51:29;;;-1:-1:-1;;16716:51:29;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16716:51:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16771:32;;:::i;:::-;16814:11;;;;;16806:20;;;;:7;:20;;;;;;;16771:55;;;;;;;;;-1:-1:-1;;;;;16771:55:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;16771:55:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;16806:20;;16771:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16831:22;16861:19;16886:4;:15;;;:21;;;16861:46;;16917:9;16912:535;16936:4;:17;;;:24;16932:1;:28;16912:535;;;16974:43;17026:4;:17;;;17044:1;17026:20;;;;;;;;;;;;;;;;;;;17051:49;17103:24;;;:15;:24;;;;;;-1:-1:-1;;;;;17103:32:29;;;;;;;;;;;17026:20;;-1:-1:-1;17168:45:29;17145:19;;;;:68;;;;;;;;;17141:302;;;17260:19;;;;17241:39;;:14;;:18;:39::i;:::-;17224:56;;17141:302;;;17420:16;;;;17404:33;;:11;;:15;:33::i;:::-;17390:47;;17141:302;-1:-1:-1;;16962:3:29;;16912:535;;;;17497:21;17521:67;17544:43;17561:4;:25;;;17552:3;17544:16;;:43;;;;:::i;:::-;17521:11;;:22;:67::i;:::-;17497:91;;17598:9;17593:1873;17617:4;:17;;;:24;17613:1;:28;17593:1873;;;17655:43;17707:4;:17;;;17725:1;17707:20;;;;;;;;;;;;;;;;;;;17732:49;17784:24;;;:15;:24;;;;;;-1:-1:-1;;;;;17784:32:29;;;;;;;;;;;17707:20;;-1:-1:-1;17849:45:29;17826:19;;;;:68;;;;;;;;;17822:1640;;;17956:19;;;;17905:20;;17928:64;;:13;;17977:14;17928:27;:64::i;:::-;17905:87;-1:-1:-1;18021:29:29;:11;17905:87;18021:15;:29::i;:::-;17998:52;;18057:39;18076:4;:11;;;18089:6;18057:18;:39::i;:::-;18102:52;18124:6;18132:12;18146:7;18102:21;:52::i;:::-;18235:1;18208:4;:17;;;:24;:28;18204:526;;;-1:-1:-1;;;;;18645:22:29;;;;;;:14;:22;;;;;;:29;;18672:1;18645:26;:29::i;:::-;-1:-1:-1;;;;;18620:22:29;;;;;;:14;:22;;;;;;:54;;;;18686:37;;18715:7;;18686:37;;;18204:526;17822:1640;;;;18853:47;18871:4;:11;;;18884:6;18892:7;18853:17;:47::i;:::-;-1:-1:-1;;;;;19362:22:29;;;;;;:14;:22;;;;;;:41;;19399:1;19401;19362:36;:41::i;:::-;-1:-1:-1;;;;;19337:22:29;;;;;;:14;:22;;;;;;:66;;;;19415:35;;19442:7;;19415:35;;;17822:1640;-1:-1:-1;;17643:3:29;;17593:1873;;;;19519:54;19539:4;:11;;;19552;19565:7;19519:19;:54::i;2985:580::-;3054:32;;:::i;:::-;3089:16;;;;:7;:16;;;;;;;;;3054:51;;;;;;;;;-1:-1:-1;;;;;3054:51:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3054:51:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;3089:16;;3054:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3110:22;3135:85;3198:4;:15;;;:21;;;3135:48;3164:4;:12;;;:18;;;3135:4;:8;;;:14;;;:28;;:48;;;;:::i;:85::-;3110:110;;3224:17;3244:64;3222:2:4;3244:4:29;:15;;;:21;;;:40;;:64;;;;:::i;:::-;3224:84;;3313:49;3320:4;:14;;;3343;3313:6;:49::i;:::-;3366;3373:4;:15;;;:21;;;3396:9;3407:7;3366:5;:49::i;:::-;3419;3437:42:4;3449:9:29;3460:7;3419:6;:49::i;:::-;3492;3437:42:4;3522:9:29;3492:4;:49::i;5063:126:16:-;5140:45;5147:7;5156;:16;5164:7;5156:16;;;;;;;;;;;:28;;;5140:6;:45::i;1382:124:17:-;1476:11;;:26;;-1:-1:-1;;;1476:26:17;;1458:4;;-1:-1:-1;;;;;1476:11:17;;:17;;:26;;1494:7;;1476:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;2957:562:32:-;3019:4;3439:20;;3296:66;3472:23;;;;;;:42;;-1:-1:-1;3499:15:32;;;3472:42;3464:51;2957:562;-1:-1:-1;;;;2957:562:32:o;2067:820::-;2144:7;2158:9;2171;2184;2202:5;:12;2218:2;2202:18;2198:572;;;-1:-1:-1;;;2302:4:32;2291:16;;2285:23;2343:4;2332:16;;2326:23;2384:4;2373:16;;2367:23;2364:1;2359:32;2266:130;;;2412:5;:12;2428:2;2412:18;2408:362;;;-1:-1:-1;;;2534:4:32;2523:16;;2517:23;2582:4;2571:16;;2565:23;-1:-1:-1;;;;;2550:107:32;;;2679:1;2674:32;2671:1;2667:40;2491:221;;;2731:34;;-1:-1:-1;;;2731:34:32;;;;;;;:::i;2408:362::-;2782:2;2778:1;:6;;;2774:19;;;2791:2;2786:7;2774:19;2805:1;:7;;2810:2;2805:7;:18;;;;2816:1;:7;;2821:2;2816:7;2805:18;2797:50;;;;-1:-1:-1;;;2797:50:32;;;;;;;:::i;:::-;2858:25;2868:5;2875:1;2878;2881;2858:25;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2858:25:32;;-1:-1:-1;;2858:25:32;;;2067:820;-1:-1:-1;;;;;;;2067:820:32:o;4213:228:16:-;4293:47;4312:4;4326;4333:6;4293:18;:47::i;:::-;-1:-1:-1;;;;;4362:15:16;;;;;;:9;:15;;;;;;:27;;4382:6;4362:19;:27::i;:::-;-1:-1:-1;;;;;4344:15:16;;;;;;:9;:15;;;;;;;:45;;;;4398:18;;;;;4354:4;;4409:6;;4398:18;:::i;:::-;;;;;;;;4213:228;;:::o;2218:114:77:-;2283:7;2304:24;2318:1;2321;2324:3;2304:13;:24::i;4013:197:16:-;-1:-1:-1;;;;;4125:15:16;;;;;;:9;:15;;;;;;:27;;4145:6;4125:19;:27::i;:::-;-1:-1:-1;;;;;4107:15:16;;;;;;:9;:15;;;;;;;:45;;;;4161:24;;;;;4117:4;;4173:6;;4181:3;;4161:24;:::i;:::-;;;;;;;;4013:197;;;:::o;3785:225::-;3880:47;3907:4;3914;3920:6;3880:18;:47::i;:::-;3960:25;3967:4;3973:6;3981:3;3960:25;;;;;;;;:::i;4444:256::-;4526:47;4553:4;4560;4566:6;4526:18;:47::i;:::-;-1:-1:-1;;;;;4619:15:16;;;;;;:9;:15;;;;;;:27;;4639:6;4619:19;:27::i;:::-;-1:-1:-1;;;;;4601:15:16;;;;;;:9;:15;;;;;;;:45;;;;4655:20;;;;;4611:4;;4668:6;;4655:20;:::i;1869:96:77:-;1927:7;1952:1;1948;:5;:13;;1960:1;1948:13;;5192:134:16;5289:33;5296:7;5305;5314;5289:6;:33::i;5482:158::-;5584:16;;;;:7;:16;;;;;:33;;;5577:59;;-1:-1:-1;;;;;5584:33:16;5619:7;5628;5577:6;:59::i;2022:121:77:-;2101:7;2122:17;2126:9;2130:1;2133;2126:3;:9::i;:::-;2137:1;2122:3;:17::i;5329:150:16:-;5422:53;5428:7;5437;:16;5445:7;5437:16;;;;;;;;;;;:28;;;5467:7;5422:5;:53::i;1755:404::-;-1:-1:-1;;;;;1857:20:16;;1849:70;;;;-1:-1:-1;;;1849:70:16;;;;;;;:::i;:::-;-1:-1:-1;;;;;1931:23:16;;1923:71;;;;-1:-1:-1;;;1923:71:16;;;;;;;:::i;:::-;-1:-1:-1;;;;;2020:18:16;;;;;;:10;:18;;;;;;:30;;2043:6;2020:22;:30::i;:::-;-1:-1:-1;;;;;1999:18:16;;;;;;;:10;:18;;;;;;:51;;;;2078:21;;;;;;;:33;;2104:6;2078:25;:33::i;:::-;-1:-1:-1;;;;;2054:21:16;;;;;;;:10;:21;;;;;;;:57;;;;2120:35;;;;;;;;;;2148:6;;2120:35;:::i;:::-;;;;;;;;1755:404;;;:::o;-1:-1:-1:-;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;5:130;72:20;;-1:-1;;;;;24922:54;;26322:35;;26312:2;;26371:1;;26361:12;160:352;;;290:3;283:4;275:6;271:17;267:27;257:2;;-1:-1;;298:12;257:2;-1:-1;328:20;;368:18;357:30;;354:2;;;-1:-1;;390:12;354:2;434:4;426:6;422:17;410:29;;485:3;434:4;;469:6;465:17;426:6;451:32;;448:41;445:2;;;502:1;;492:12;445:2;250:262;;;;;:::o;1323:336::-;;;1437:3;1430:4;1422:6;1418:17;1414:27;1404:2;;-1:-1;;1445:12;1404:2;-1:-1;1475:20;;1515:18;1504:30;;1501:2;;;-1:-1;;1537:12;1501:2;1581:4;1573:6;1569:17;1557:29;;1632:3;1581:4;1612:17;1573:6;1598:32;;1595:41;1592:2;;;1649:1;;1639:12;1668:440;;1769:3;1762:4;1754:6;1750:17;1746:27;1736:2;;-1:-1;;1777:12;1736:2;1824:6;1811:20;23371:18;;23363:6;23360:30;23357:2;;;-1:-1;;23393:12;23357:2;23027;23021:9;23466;23447:17;;-1:-1;;23443:33;23053:17;;23534:4;23053:17;23113:34;;;23149:22;;;23110:62;23107:2;;;-1:-1;;23175:12;23107:2;23027;23194:22;1916:21;;;1837:73;-1:-1;1837:73;2016:16;;;23534:4;2016:16;2013:25;-1:-1;2010:2;;;2051:1;;2041:12;2010:2;25237:6;23534:4;1958:6;1954:17;23534:4;1992:5;1988:16;25214:30;25293:1;23534:4;25284:6;1992:5;25275:16;;25268:27;;;;1729:379;;;;:::o;2253:241::-;;2357:2;2345:9;2336:7;2332:23;2328:32;2325:2;;;-1:-1;;2363:12;2325:2;2425:53;2470:7;2446:22;2425:53;:::i;2501:397::-;;;2640:2;2628:9;2619:7;2615:23;2611:32;2608:2;;;-1:-1;;2646:12;2608:2;2704:17;2691:31;2742:18;2734:6;2731:30;2728:2;;;-1:-1;;2764:12;2728:2;2802:80;2874:7;2865:6;2854:9;2850:22;2802:80;:::i;:::-;2784:98;;;;-1:-1;2602:296;-1:-1;;;;2602:296::o;2905:678::-;;;;;3096:2;3084:9;3075:7;3071:23;3067:32;3064:2;;;-1:-1;;3102:12;3064:2;3160:17;3147:31;3198:18;;3190:6;3187:30;3184:2;;;-1:-1;;3220:12;3184:2;3258:80;3330:7;3321:6;3310:9;3306:22;3258:80;:::i;:::-;3240:98;;-1:-1;3240:98;-1:-1;3403:2;3388:18;;3375:32;;-1:-1;3416:30;;;3413:2;;;-1:-1;;3449:12;3413:2;;3487:80;3559:7;3550:6;3539:9;3535:22;3487:80;:::i;:::-;3058:525;;;;-1:-1;3469:98;-1:-1;;;;3058:525::o;3590:257::-;;3702:2;3690:9;3681:7;3677:23;3673:32;3670:2;;;-1:-1;;3708:12;3670:2;979:6;973:13;26468:5;24604:13;24597:21;26446:5;26443:32;26433:2;;-1:-1;;26479:12;3854:241;;3958:2;3946:9;3937:7;3933:23;3929:32;3926:2;;;-1:-1;;3964:12;3926:2;-1:-1;1100:20;;3920:175;-1:-1;3920:175::o;4102:366::-;;;4223:2;4211:9;4202:7;4198:23;4194:32;4191:2;;;-1:-1;;4229:12;4191:2;-1:-1;;1100:20;;;4381:2;4420:22;;;1100:20;;-1:-1;4185:283::o;4475:1077::-;;;;;;;4682:3;4670:9;4661:7;4657:23;4653:33;4650:2;;;-1:-1;;4689:12;4650:2;1100:20;;;-1:-1;4841:2;4880:22;;1100:20;;-1:-1;4949:2;4988:22;;1100:20;;-1:-1;5057:2;5096:22;;72:20;-1:-1;;;;;24922:54;;26322:35;;26312:2;;-1:-1;;26361:12;26312:2;5065:63;-1:-1;5193:3;5178:19;;5165:33;5218:18;5207:30;;;5204:2;;;-1:-1;;5240:12;5204:2;5270:62;5324:7;5315:6;5304:9;5300:22;5270:62;:::i;:::-;5260:72;;5397:3;5386:9;5382:19;5369:33;5355:47;;5218:18;5414:6;5411:30;5408:2;;;-1:-1;;5444:12;5408:2;;5474:62;5528:7;5519:6;5508:9;5504:22;5474:62;:::i;:::-;5464:72;;;4644:908;;;;;;;;:::o;5559:1411::-;;;;;;;;5801:3;5789:9;5780:7;5776:23;5772:33;5769:2;;;-1:-1;;5808:12;5769:2;5891:22;1100:20;5860:63;;5960:2;6003:9;5999:22;1100:20;5968:63;;6096:2;6085:9;6081:18;6068:32;6120:18;;6112:6;6109:30;6106:2;;;-1:-1;;6142:12;6106:2;6172:62;6226:7;6217:6;6206:9;6202:22;6172:62;:::i;:::-;6162:72;;6299:2;6288:9;6284:18;6271:32;6257:46;;6120:18;6315:6;6312:30;6309:2;;;-1:-1;;6345:12;6309:2;6375:62;6429:7;6420:6;6409:9;6405:22;6375:62;:::i;:::-;6365:72;;6493:53;6538:7;6474:3;6518:9;6514:22;6493:53;:::i;:::-;6483:63;;6611:3;6600:9;6596:19;6583:33;6569:47;;6120:18;6628:6;6625:30;6622:2;;;-1:-1;;6658:12;6622:2;6688:62;6742:7;6733:6;6722:9;6718:22;6688:62;:::i;:::-;6678:72;;6815:3;6804:9;6800:19;6787:33;6773:47;;6120:18;6832:6;6829:30;6826:2;;;-1:-1;;6862:12;6826:2;;6892:62;6946:7;6937:6;6926:9;6922:22;6892:62;:::i;:::-;6882:72;;;5763:1207;;;;;;;;;;:::o;6977:739::-;;;;;;7153:2;7141:9;7132:7;7128:23;7124:32;7121:2;;;-1:-1;;7159:12;7121:2;1113:6;1100:20;7211:63;;7339:2;7328:9;7324:18;7311:32;7363:18;;7355:6;7352:30;7349:2;;;-1:-1;;7385:12;7349:2;7423:64;7479:7;7470:6;7459:9;7455:22;7423:64;:::i;:::-;7405:82;;-1:-1;7405:82;-1:-1;7552:2;7537:18;;7524:32;;-1:-1;7565:30;;;7562:2;;;-1:-1;;7598:12;7562:2;;7636:64;7692:7;7683:6;7672:9;7668:22;7636:64;:::i;:::-;7115:601;;;;-1:-1;7115:601;;-1:-1;7618:82;;;7115:601;-1:-1;;;7115:601::o;8096:261::-;;8210:2;8198:9;8189:7;8185:23;8181:32;8178:2;;;-1:-1;;8216:12;8178:2;1247:13;;-1:-1;;;;;;24770:78;;26687:34;;26677:2;;-1:-1;;26725:12;9893:343;;10035:5;23643:12;23799:6;23794:3;23787:19;10128:52;10173:6;23836:4;23831:3;23827:14;23836:4;10154:5;10150:16;10128:52;:::i;:::-;23466:9;26124:14;-1:-1;;26120:28;10192:39;;;;23836:4;10192:39;;9983:253;-1:-1;;9983:253::o;13558:563::-;-1:-1;;26235:2;26231:14;;;;;8469:74;;13871:2;13862:12;;9016:37;;;;26231:14;;;13973:12;;;8469:74;14084:12;;;13746:375::o;14128:563::-;26235:2;26231:14;;;;-1:-1;;26231:14;8469:74;;14441:2;14432:12;;9016:37;;;;14543:12;;;9016:37;14654:12;;;14316:375::o;14698:392::-;9016:37;;;14951:2;14942:12;;9016:37;15053:12;;;14842:248::o;15496:291::-;;25237:6;25232:3;25227;25214:30;25275:16;;25268:27;;;25275:16;15640:147;-1:-1;15640:147::o;15794:271::-;;10403:5;23643:12;10514:52;10559:6;10554:3;10547:4;10540:5;10536:16;10514:52;:::i;:::-;10578:16;;;;;15928:137;-1:-1;;15928:137::o;16072:520::-;11284:66;11264:87;;11248:2;11370:12;;9016:37;;;;16555:12;;;16289:303::o;16599:222::-;-1:-1;;;;;24922:54;;;;8626:37;;16726:2;16711:18;;16697:124::o;16828:333::-;-1:-1;;;;;24922:54;;;;8626:37;;17147:2;17132:18;;9016:37;16983:2;16968:18;;16954:207::o;17168:444::-;-1:-1;;;;;24922:54;;;;8626:37;;17515:2;17500:18;;9016:37;;;;17598:2;17583:18;;9016:37;17351:2;17336:18;;17322:290::o;17619:210::-;24604:13;;24597:21;8899:34;;17740:2;17725:18;;17711:118::o;17836:222::-;9016:37;;;17963:2;17948:18;;17934:124::o;18065:417::-;;9046:5;9023:3;9016:37;18238:2;18356;18345:9;18341:18;18334:48;18396:76;18238:2;18227:9;18223:18;18458:6;18396:76;:::i;18489:548::-;9016:37;;;25138:4;25127:16;;;;18857:2;18842:18;;13511:35;18940:2;18925:18;;9016:37;19023:2;19008:18;;9016:37;18696:3;18681:19;;18667:370::o;19044:326::-;;19199:2;19220:17;19213:47;23799:6;19199:2;19188:9;19184:18;23787:19;25237:6;25232:3;23827:14;19188:9;23827:14;25214:30;25275:16;;;23827:14;25275:16;;;25268:27;;;;23466:9;26124:14;;;-1:-1;;26120:28;9499:39;;;19170:200;-1:-1;19170:200::o;19377:306::-;;19522:2;19543:17;19536:47;19597:76;19522:2;19511:9;19507:18;19659:6;19597:76;:::i;19690:501::-;;19881:2;19902:17;19895:47;19956:76;19881:2;19870:9;19866:18;20018:6;19956:76;:::i;:::-;20080:9;20074:4;20070:20;20065:2;20054:9;20050:18;20043:48;20105:76;20176:4;20167:6;20105:76;:::i;:::-;20097:84;19852:339;-1:-1;;;;;19852:339::o;20198:416::-;20398:2;20412:47;;;10831:2;20383:18;;;23787:19;10867:34;23827:14;;;10847:55;-1:-1;;;10922:12;;;10915:27;10961:12;;;20369:245::o;20621:416::-;20821:2;20835:47;;;11621:2;20806:18;;;23787:19;11657:34;23827:14;;;11637:55;-1:-1;;;11712:12;;;11705:30;11754:12;;;20792:245::o;21044:416::-;21244:2;21258:47;;;12005:2;21229:18;;;23787:19;-1:-1;;;23827:14;;;12021:42;12082:12;;;21215:245::o;21467:416::-;21667:2;21681:47;;;21652:18;;;23787:19;12369:34;23827:14;;;12349:55;12423:12;;;21638:245::o;21890:416::-;22090:2;22104:47;;;12674:2;22075:18;;;23787:19;12710:34;23827:14;;;12690:55;-1:-1;;;12765:12;;;12758:29;12806:12;;;22061:245::o;22313:416::-;22513:2;22527:47;;;13057:2;22498:18;;;23787:19;13093:26;23827:14;;;13073:47;13139:12;;;22484:245::o;25310:268::-;25375:1;25382:101;25396:6;25393:1;25390:13;25382:101;;;25463:11;;;25457:18;25444:11;;;25437:39;25418:2;25411:10;25382:101;;;25498:6;25495:1;25492:13;25489:2;;;25375:1;25554:6;25549:3;25545:16;25538:27;25489:2;;25359:219;;;:::o", - "source": "// SPDX-License-Identifier: Apache-2.0\n\n/******************************************************************************\n * Copyright 2020 IEXEC BLOCKCHAIN TECH *\n * *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); *\n * you may not use this file except in compliance with the License. *\n * You may obtain a copy of the License at *\n * *\n * http://www.apache.org/licenses/LICENSE-2.0 *\n * *\n * Unless required by applicable law or agreed to in writing, software *\n * distributed under the License is distributed on an \"AS IS\" BASIS, *\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *\n * See the License for the specific language governing permissions and *\n * limitations under the License. *\n ******************************************************************************/\n\npragma solidity ^0.6.0;\npragma experimental ABIEncoderV2;\n\nimport \"./IexecPoco2Delegate.sol\";\nimport \"./IexecERC20CoreKYC.sol\";\n\n\ncontract IexecPoco2DelegateKYC is IexecPoco2Delegate, IexecERC20CoreKYC\n{\n\tfunction _beforeTokenTransfer(address from, address to, uint256 amount)\n\tinternal virtual override(IexecERC20Core, IexecERC20CoreKYC)\n\t{\n\t\tIexecERC20CoreKYC._beforeTokenTransfer(from, to, amount);\n\t}\n\n\tfunction _isAuthorized(address account)\n\tinternal virtual override(IexecERC20Core, IexecERC20CoreKYC) returns (bool)\n\t{\n\t\treturn IexecERC20CoreKYC._isAuthorized(account);\n\t}\n}\n", - "sourcePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco2KYCDelegate.sol", - "ast": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco2KYCDelegate.sol", - "exportedSymbols": { - "IexecPoco2DelegateKYC": [ - 8363 - ] - }, - "id": 8364, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 8318, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:30" - }, - { - "id": 8319, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "1266:33:30" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco2Delegate.sol", - "file": "./IexecPoco2Delegate.sol", - "id": 8320, - "nodeType": "ImportDirective", - "scope": 8364, - "sourceUnit": 8317, - "src": "1301:34:30", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol", - "file": "./IexecERC20CoreKYC.sol", - "id": 8321, - "nodeType": "ImportDirective", - "scope": 8364, - "sourceUnit": 2996, - "src": "1336:33:30", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8322, - "name": "IexecPoco2Delegate", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8316, - "src": "1406:18:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecPoco2Delegate_$8316", - "typeString": "contract IexecPoco2Delegate" - } - }, - "id": 8323, - "nodeType": "InheritanceSpecifier", - "src": "1406:18:30" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8324, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1426:17:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - }, - "id": 8325, - "nodeType": "InheritanceSpecifier", - "src": "1426:17:30" - } - ], - "contractDependencies": [ - 309, - 1658, - 2939, - 2995, - 8316, - 8801, - 9914, - 13161, - 13173, - 13740, - 14132 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 8363, - "linearizedBaseContracts": [ - 8363, - 2995, - 8316, - 8801, - 2939, - 1658, - 13161, - 309, - 13173, - 14132, - 13740, - 9914 - ], - "name": "IexecPoco2DelegateKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "baseFunctions": [ - 2473, - 2994 - ], - "body": { - "id": 8345, - "nodeType": "Block", - "src": "1582:64:30", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8340, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8327, - "src": "1625:4:30", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8341, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8329, - "src": "1631:2:30", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8342, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8331, - "src": "1635:6:30", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8337, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1586:17:30", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 8339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_beforeTokenTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2994, - "src": "1586:38:30", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 8343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1586:56:30", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8344, - "nodeType": "ExpressionStatement", - "src": "1586:56:30" - } - ] - }, - "documentation": null, - "id": 8346, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 8335, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 8333, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1546:14:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 8334, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1562:17:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1537:43:30" - }, - "parameters": { - "id": 8332, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8327, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 8346, - "src": "1477:12:30", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8326, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1477:7:30", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8329, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 8346, - "src": "1491:10:30", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8328, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1491:7:30", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8331, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 8346, - "src": "1503:14:30", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8330, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1503:7:30", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1476:42:30" - }, - "returnParameters": { - "id": 8336, - "nodeType": "ParameterList", - "parameters": [], - "src": "1582:0:30" - }, - "scope": 8363, - "src": "1447:199:30", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "baseFunctions": [ - 2463, - 2959 - ], - "body": { - "id": 8361, - "nodeType": "Block", - "src": "1767:55:30", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8358, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8348, - "src": "1810:7:30", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8356, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1778:17:30", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 8357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_isAuthorized", - "nodeType": "MemberAccess", - "referencedDeclaration": 2959, - "src": "1778:31:30", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", - "typeString": "function (address) returns (bool)" - } - }, - "id": 8359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1778:40:30", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8355, - "id": 8360, - "nodeType": "Return", - "src": "1771:47:30" - } - ] - }, - "documentation": null, - "id": 8362, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_isAuthorized", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 8352, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 8350, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1716:14:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 8351, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1732:17:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1707:43:30" - }, - "parameters": { - "id": 8349, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8348, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 8362, - "src": "1672:15:30", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8347, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1672:7:30", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1671:17:30" - }, - "returnParameters": { - "id": 8355, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8354, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 8362, - "src": "1760:4:30", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8353, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1760:4:30", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1759:6:30" - }, - "scope": 8363, - "src": "1649:173:30", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 8364, - "src": "1372:452:30" - } - ], - "src": "1242:583:30" - }, - "legacyAST": { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco2KYCDelegate.sol", - "exportedSymbols": { - "IexecPoco2DelegateKYC": [ - 8363 - ] - }, - "id": 8364, - "license": "Apache-2.0", - "nodeType": "SourceUnit", - "nodes": [ - { - "id": 8318, - "literals": [ - "solidity", - "^", - "0.6", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "1242:23:30" - }, - { - "id": 8319, - "literals": [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "1266:33:30" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecPoco2Delegate.sol", - "file": "./IexecPoco2Delegate.sol", - "id": 8320, - "nodeType": "ImportDirective", - "scope": 8364, - "sourceUnit": 8317, - "src": "1301:34:30", - "symbolAliases": [], - "unitAlias": "" - }, - { - "absolutePath": "/home/amxx/Work/iExec/code/PoCo-dev/contracts/modules/delegates/IexecERC20CoreKYC.sol", - "file": "./IexecERC20CoreKYC.sol", - "id": 8321, - "nodeType": "ImportDirective", - "scope": 8364, - "sourceUnit": 2996, - "src": "1336:33:30", - "symbolAliases": [], - "unitAlias": "" - }, - { - "abstract": false, - "baseContracts": [ - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8322, - "name": "IexecPoco2Delegate", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 8316, - "src": "1406:18:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecPoco2Delegate_$8316", - "typeString": "contract IexecPoco2Delegate" - } - }, - "id": 8323, - "nodeType": "InheritanceSpecifier", - "src": "1406:18:30" - }, - { - "arguments": null, - "baseName": { - "contractScope": null, - "id": 8324, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1426:17:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - }, - "id": 8325, - "nodeType": "InheritanceSpecifier", - "src": "1426:17:30" - } - ], - "contractDependencies": [ - 309, - 1658, - 2939, - 2995, - 8316, - 8801, - 9914, - 13161, - 13173, - 13740, - 14132 - ], - "contractKind": "contract", - "documentation": null, - "fullyImplemented": true, - "id": 8363, - "linearizedBaseContracts": [ - 8363, - 2995, - 8316, - 8801, - 2939, - 1658, - 13161, - 309, - 13173, - 14132, - 13740, - 9914 - ], - "name": "IexecPoco2DelegateKYC", - "nodeType": "ContractDefinition", - "nodes": [ - { - "baseFunctions": [ - 2473, - 2994 - ], - "body": { - "id": 8345, - "nodeType": "Block", - "src": "1582:64:30", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8340, - "name": "from", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8327, - "src": "1625:4:30", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8341, - "name": "to", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8329, - "src": "1631:2:30", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - { - "argumentTypes": null, - "id": 8342, - "name": "amount", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8331, - "src": "1635:6:30", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": { - "argumentTypes": null, - "id": 8337, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1586:17:30", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 8339, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_beforeTokenTransfer", - "nodeType": "MemberAccess", - "referencedDeclaration": 2994, - "src": "1586:38:30", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", - "typeString": "function (address,address,uint256)" - } - }, - "id": 8343, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1586:56:30", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 8344, - "nodeType": "ExpressionStatement", - "src": "1586:56:30" - } - ] - }, - "documentation": null, - "id": 8346, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_beforeTokenTransfer", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 8335, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 8333, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1546:14:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 8334, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1562:17:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1537:43:30" - }, - "parameters": { - "id": 8332, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8327, - "mutability": "mutable", - "name": "from", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 8346, - "src": "1477:12:30", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8326, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1477:7:30", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8329, - "mutability": "mutable", - "name": "to", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 8346, - "src": "1491:10:30", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8328, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1491:7:30", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - }, - { - "constant": false, - "id": 8331, - "mutability": "mutable", - "name": "amount", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 8346, - "src": "1503:14:30", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": { - "id": 8330, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1503:7:30", - "typeDescriptions": { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1476:42:30" - }, - "returnParameters": { - "id": 8336, - "nodeType": "ParameterList", - "parameters": [], - "src": "1582:0:30" - }, - "scope": 8363, - "src": "1447:199:30", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - }, - { - "baseFunctions": [ - 2463, - 2959 - ], - "body": { - "id": 8361, - "nodeType": "Block", - "src": "1767:55:30", - "statements": [ - { - "expression": { - "argumentTypes": null, - "arguments": [ - { - "argumentTypes": null, - "id": 8358, - "name": "account", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8348, - "src": "1810:7:30", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": { - "argumentTypes": [ - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": { - "argumentTypes": null, - "id": 8356, - "name": "IexecERC20CoreKYC", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 2995, - "src": "1778:17:30", - "typeDescriptions": { - "typeIdentifier": "t_type$_t_contract$_IexecERC20CoreKYC_$2995_$", - "typeString": "type(contract IexecERC20CoreKYC)" - } - }, - "id": 8357, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "_isAuthorized", - "nodeType": "MemberAccess", - "referencedDeclaration": 2959, - "src": "1778:31:30", - "typeDescriptions": { - "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_bool_$", - "typeString": "function (address) returns (bool)" - } - }, - "id": 8359, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "1778:40:30", - "tryCall": false, - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 8355, - "id": 8360, - "nodeType": "Return", - "src": "1771:47:30" - } - ] - }, - "documentation": null, - "id": 8362, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "_isAuthorized", - "nodeType": "FunctionDefinition", - "overrides": { - "id": 8352, - "nodeType": "OverrideSpecifier", - "overrides": [ - { - "contractScope": null, - "id": 8350, - "name": "IexecERC20Core", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2939, - "src": "1716:14:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20Core_$2939", - "typeString": "contract IexecERC20Core" - } - }, - { - "contractScope": null, - "id": 8351, - "name": "IexecERC20CoreKYC", - "nodeType": "UserDefinedTypeName", - "referencedDeclaration": 2995, - "src": "1732:17:30", - "typeDescriptions": { - "typeIdentifier": "t_contract$_IexecERC20CoreKYC_$2995", - "typeString": "contract IexecERC20CoreKYC" - } - } - ], - "src": "1707:43:30" - }, - "parameters": { - "id": 8349, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8348, - "mutability": "mutable", - "name": "account", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 8362, - "src": "1672:15:30", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": { - "id": 8347, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "1672:7:30", - "stateMutability": "nonpayable", - "typeDescriptions": { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1671:17:30" - }, - "returnParameters": { - "id": 8355, - "nodeType": "ParameterList", - "parameters": [ - { - "constant": false, - "id": 8354, - "mutability": "mutable", - "name": "", - "nodeType": "VariableDeclaration", - "overrides": null, - "scope": 8362, - "src": "1760:4:30", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": { - "id": 8353, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "1760:4:30", - "typeDescriptions": { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "value": null, - "visibility": "internal" - } - ], - "src": "1759:6:30" - }, - "scope": 8363, - "src": "1649:173:30", - "stateMutability": "nonpayable", - "virtual": true, - "visibility": "internal" - } - ], - "scope": 8364, - "src": "1372:452:30" - } - ], - "src": "1242:583:30" - }, - "compiler": { - "name": "solc", - "version": "0.6.12+commit.27d51765.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "3.2.2", - "updatedAt": "2020-11-09T09:15:00.681Z", - "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/checkCopyright.sh b/checkCopyright.sh index 4f89ebffb..b0844dc8b 100755 --- a/checkCopyright.sh +++ b/checkCopyright.sh @@ -1,6 +1,7 @@ #!/bin/bash -expected='Copyright 2020 IEXEC BLOCKCHAIN TECH' +copyrightRegex='Copyright 202[0-9] IEXEC BLOCKCHAIN TECH' + folders=( 'contracts' 'migrations' @@ -9,8 +10,7 @@ folders=( 'utils' ) -for i in ${folders[@]}; -do - echo "# Checking copyrights in $i" - git grep -L "$expected" -- $i +for folder in ${folders[@]}; do + echo "# Checking copyrights in $folder" + grep --recursive --files-without-match --regexp "${copyrightRegex}" ${folder} | sort done diff --git a/config/accounts.json b/config/accounts.json deleted file mode 100644 index b9f1c35b7..000000000 --- a/config/accounts.json +++ /dev/null @@ -1,254 +0,0 @@ -[ - { "address": "0xabcd1339Ec7e762e639f4887E2bFe5EE8023E23E", "amount": 10000000 }, - { "address": "0x000a9c787a972F70F0903890E266F41c795C4DcA", "amount": 10000000 }, - { "address": "0x1a69b2EB604dB8eBa185dF03ea4F5288dcbbD248", "amount": 1000 }, - { "address": "0x2Ab2674aA374Fe6415d11f0a8FcbD8027fc1e6A9", "amount": 1000 }, - { "address": "0x3A3406E69ADf886c442Ff1791cbf67CEA679275D", "amount": 1000 }, - { "address": "0x4AEF50214110FdaD4e8B9128347F2Ba1eC72F614", "amount": 1000 }, - { "address": "0x5AF4eef749db212C594EFAc14C056a05261deDA9", "amount": 1000 }, - { "address": "0x6A5A96F946b6d5054B3eAf032D30744A3818f81F", "amount": 1000 }, - { "address": "0x7A9519E67F552f154657D65C2efe88D52bFeb025", "amount": 1000 }, - { "address": "0x8a5fDA948126db50687Ba100F7D6555ea92Ec841", "amount": 1000 }, - { "address": "0x9A2Df059ddFC9937d6673a7C6786E71F98b7f1cf", "amount": 1000 }, - { "address": "0x10aa7Fc6B27aEfF79Ff52924AfC23Da40A8261ca", "amount": 1000 }, - { "address": "0x11aCBF759A658c229F4bE1Adb9aAB1CF660FF192", "amount": 1000 }, - { "address": "0x12aa1fec8Ad2FD03157A11A6825DD9feB24D0b34", "amount": 1000 }, - { "address": "0x13aE3ce3DC8b9D8401894Bc178a1E48a7dce2218", "amount": 1000 }, - { "address": "0x14a60197Ed9cd183e4275c207CA8B1c594016392", "amount": 1000 }, - { "address": "0x15a7853A3E9EA1bBae16935f5f32207030cCFbAc", "amount": 1000 }, - { "address": "0x16a1E3872210A20F99307E6b716f87F247dB11C8", "amount": 1000 }, - { "address": "0x17A7212Bea68Ac0588bEA6e575a9f320C3640EA5", "amount": 1000 }, - { "address": "0x18a9b259Bb67Fe5d19281c341f868dEb2bD86343", "amount": 1000 }, - { "address": "0x19A1fAad2a0E0e3201fd0c8ea0EE465735225853", "amount": 1000 }, - { "address": "0x20ae0f1D4659AD306b6960237FFc90Ef0c2f280f", "amount": 1000 }, - { "address": "0x21A4d0C871fA050Fb1452BD19293A25bFC4D5702", "amount": 1000 }, - { "address": "0x22A0689175038c13523c646924f86e1857284619", "amount": 1000 }, - { "address": "0x23aeD71591b1b3a67CBEd6C6262137Be7cBd59e3", "amount": 1000 }, - { "address": "0x24A854e8701b9Bf212F87EA11713c41d3f05966c", "amount": 1000 }, - { "address": "0x25A643502C3EbcF3d2754423d5330213024A0cBA", "amount": 1000 }, - { "address": "0x26aCa9d1b57f35FF51BB7C485e78B4E44E962357", "amount": 1000 }, - { "address": "0x27ABdc52E2A4Fd3eE7D925BF1df3cf53572bC477", "amount": 1000 }, - { "address": "0x28aDC8519C97f1BC958202aEAC903F1d0ab47F8C", "amount": 1000 }, - { "address": "0x29A338B1b1c236CCb1cF3cB1E0651B450E430317", "amount": 1000 }, - { "address": "0x30A5EE7052E49788188e61169B5D6B005a8b5d2F", "amount": 1000 }, - { "address": "0x31A4d10b5E3a9e31F63e5999607894F48eD882eA", "amount": 1000 }, - { "address": "0x32A41A8ddE2380cEF575395B5791324c577d71a6", "amount": 1000 }, - { "address": "0x33A52EF23051e987f3E09DE1cF1a67162F70482d", "amount": 1000 }, - { "address": "0x34a12776b37209328a8e5163C1702863d418e955", "amount": 1000 }, - { "address": "0x35AE22B5E0a41C7A9d85D4Fa6a837090Ca79e993", "amount": 1000 }, - { "address": "0x36A1b8383fed641503e98b179494Bbf5F27AaF8c", "amount": 1000 }, - { "address": "0x37aDF6AE77f17A4Cc0C8389d8c3D230c11Ac5bF8", "amount": 1000 }, - { "address": "0x38a0C2964A4cd8512174A0Cd0e803BBa4e267076", "amount": 1000 }, - { "address": "0x39Af7D9b9cC9a68674E243Cf0CcDBd6ea8a2357f", "amount": 1000 }, - { "address": "0x40a7c92Bf935A4818Effc7817EC00C4C240632D6", "amount": 1000 }, - { "address": "0x41A5dE13C0A709776619c5A1a882d716199bC6ad", "amount": 1000 }, - { "address": "0x42a6957A345bd26218FdAA3Fb2fcD30cEDFF7FAc", "amount": 1000 }, - { "address": "0x43A21F43B8425299B8604954A847a392DA294ab4", "amount": 1000 }, - { "address": "0x44a95B35B96f707119f6c339417E17B7B12E621b", "amount": 1000 }, - { "address": "0x45a5C24eFf3F2BeB48d98ED528c6A1c0670aD068", "amount": 1000 }, - { "address": "0x46a63E885A308A1815A3b6a6A57563999123d7Eb", "amount": 1000 }, - { "address": "0x47A226F54A079263b29A9a230CF46f7bd844D576", "amount": 1000 }, - { "address": "0x48A8C9183A7Af6e7C9A4fAbd7aD620e81d00A33f", "amount": 1000 }, - { "address": "0x49a215ac86A096219188427De3FD6690072cB855", "amount": 1000 }, - { "address": "0x50ad6FeE6402bf20D6302cA5C7E00a9b8639Fdc3", "amount": 1000 }, - { "address": "0x51AfC7821A57fBc594E1a34650fbB1766D776182", "amount": 1000 }, - { "address": "0x52A6E86048296FC020CBA86BcBd33D532E551db8", "amount": 1000 }, - { "address": "0x53a3A945aB61e629dbE3F74aee63c5947A98f67B", "amount": 1000 }, - { "address": "0x54a96145bDAc3e25b84C1aD24679b3823e90312b", "amount": 1000 }, - { "address": "0x55a77232ef101de4D346a16b2b9A07E9a566ac9C", "amount": 1000 }, - { "address": "0x56a65029221167a44d341359944Bfb775A4DB68f", "amount": 1000 }, - { "address": "0x57Aa7b7621a36FE71FfED623C7E611F75C9802cE", "amount": 1000 }, - { "address": "0x58a02eDFa30C9F56EBe0D4d58164dA4e35c7aABd", "amount": 1000 }, - { "address": "0x59A71610cCfa580d6aFe9bF2CC4D5f8Ab48c71b1", "amount": 1000 }, - { "address": "0x60A6F7dC4B69d815D40f18feddc149Df456D2118", "amount": 1000 }, - { "address": "0x61A10043CEaB4FbA94FeEfF78888484DD7575a9A", "amount": 1000 }, - { "address": "0x62aE40A538345BcEC2b2A73f441B0AD7C4e1D667", "amount": 1000 }, - { "address": "0x63Abae0eEbCD23Bb84FB88Be6Fe6fbfBf0c16EF7", "amount": 1000 }, - { "address": "0x64a230bca31dCe0Ce78F46C55f338564881A6B7e", "amount": 1000 }, - { "address": "0x65a6802FC9Cc481762A691B01fccf8DB2aA36e60", "amount": 1000 }, - { "address": "0x66A5165E97869b09e4a55b25d5E0c6c3daAa85E9", "amount": 1000 }, - { "address": "0x67aaba1Efa65c308dE1Df6b952271Fc2b0742c3a", "amount": 1000 }, - { "address": "0x68A19Af4fcA17311b4be6AF8AE2309E3055cfABd", "amount": 1000 }, - { "address": "0x69A8093b4f44fE25274a26330be0fB2D4B5857BB", "amount": 1000 }, - { "address": "0x70a0B33623839c1a0f952c51Ae13Efd745e6d2c7", "amount": 1000 }, - { "address": "0x71ac40D0eb099182868d3D947Bdf92804A478C4f", "amount": 1000 }, - { "address": "0x72ac54F114EE0dfB4EC56B183a0c7Bb85f779168", "amount": 1000 }, - { "address": "0x73A834A6c616899A7484E1f6eA36BA737Fb948e1", "amount": 1000 }, - { "address": "0x74a100c60966b833b63FFa9F32f54D2ab5AFfD49", "amount": 1000 }, - { "address": "0x75aa687E0E68f57587F8de8aF873d1d2DE5c397b", "amount": 1000 }, - { "address": "0x76a6C64a9a26246571C8769bc3258F1F3fFdDE8B", "amount": 1000 }, - { "address": "0x77a220e10dD3698d86A46E0781EA787024278DC7", "amount": 1000 }, - { "address": "0x78A974a701275Ee61714842B9cFA04731C55A8Ca", "amount": 1000 }, - { "address": "0x79AFF737E77Da55ABA900177A06936CAa1048D31", "amount": 1000 }, - { "address": "0x80aFf346ECf0D1499A9C1A3A0c9EBb70318769D3", "amount": 1000 }, - { "address": "0x81A3cae5ACCa20B1f9Bfb07fcDD1D329621E895B", "amount": 1000 }, - { "address": "0x82A5157d6A66c28d7C2bEE46b7eBAEB77052ba75", "amount": 1000 }, - { "address": "0x83a0D67107a4D65C0f47AaF1A804450BaFf71b20", "amount": 1000 }, - { "address": "0x84A69E2BE32d26ea10CFFE138E50797412A7B44F", "amount": 1000 }, - { "address": "0x85a724eC22872A20d7B038e8A8216582Da0C64eF", "amount": 1000 }, - { "address": "0x86a0AB0Df4EbC6E5307E689f9360F59FF965d4b2", "amount": 1000 }, - { "address": "0x87aa664CACf8e28B951186329420D96bDC8F70F5", "amount": 1000 }, - { "address": "0x88AFd7E3d6eF74Dd8d56F6FD4181733127807A6d", "amount": 1000 }, - { "address": "0x89A7cf637A5f6caAC2FC3F47Cdaac9Fcc3574e10", "amount": 1000 }, - { "address": "0x90AcB3C757F6F3060043Bd533548D9c0aF13dC8E", "amount": 1000 }, - { "address": "0x91aEE896557143b7FCda0372ec6673aB213B1469", "amount": 1000 }, - { "address": "0x92a909d30C710fA4DB53b863Fe07e065E4C7f17A", "amount": 1000 }, - { "address": "0x93aA915f4D9265be9a9d3bc4D6C131c79BDDfE7b", "amount": 1000 }, - { "address": "0x94a5a325c5953240F33fb44d325f64374687f449", "amount": 1000 }, - { "address": "0x95ADFFb8CF8754d6Cb67c71A46F07aA667D6fFE1", "amount": 1000 }, - { "address": "0x96aEa88341402f4ab071eb15b76061E5CEBA0eBE", "amount": 1000 }, - { "address": "0x97a7EC10d982e97E514cB96E65a796b437157e3c", "amount": 1000 }, - { "address": "0x98Ad26771c4a990e0e166925Cc8aD0BC5Ce5848F", "amount": 1000 }, - { "address": "0x99afcbb25Ccb26d09982342b1a14c306Bf38bb0f", "amount": 1000 }, - { "address": "0x100Ad00aF2144cD3D65A3789a09C05684463a4c5", "amount": 1000 }, - { "address": "0x101AF8cD450eAa0b596585aF7078b08Ea46eC55f", "amount": 1000 }, - { "address": "0x102aD376f258b4e0CcC25069B8d78E828F96DF16", "amount": 1000 }, - { "address": "0x103af1BdF6C91f8d99D2287C3e3d7df6CCF25C37", "amount": 1000 }, - { "address": "0x104A77819dE2FEE866fc7003897F808ACc5BD225", "amount": 1000 }, - { "address": "0x105A03787f89DCBF418d79965490815F609a636a", "amount": 1000 }, - { "address": "0x106ae86bE3D46Ac4211f4950318A728C2aeD5048", "amount": 1000 }, - { "address": "0x107AD4F890b9B8842BB3ee587dD547bffB4A42b9", "amount": 1000 }, - { "address": "0x108A359CBDBFD92527B6d098e8456cC3121ECdF5", "amount": 1000 }, - { "address": "0x109aa7B2e94dEAf1FF3002FAB13278EF354e8e1d", "amount": 1000 }, - { "address": "0x110a268dEb44734E9884c9f6e7241dEB3e757aFc", "amount": 1000 }, - { "address": "0x111A35B42Bb128A0b7d4272dE8AB5e4D71224540", "amount": 1000 }, - { "address": "0x112A60b70F2835B053b62f17DFCf651BBA8143E8", "amount": 1000 }, - { "address": "0x113adECfad0B63f1bd0c4D5D03B00A1b12263339", "amount": 1000 }, - { "address": "0x114a72518770E64c2063c5A87F3F00Cf9dF78C2b", "amount": 1000 }, - { "address": "0x115A664e8c254a6042d48cdBfB9249fC55baF2B5", "amount": 1000 }, - { "address": "0x116a0A6815076224Bb1C8570Da56288a4C2617b3", "amount": 1000 }, - { "address": "0x117a0eE6a85c40F0570E285D7E022226ABe160a5", "amount": 1000 }, - { "address": "0x118A935490A6C110E0bA6654d8aF992647796f77", "amount": 1000 }, - { "address": "0x119aE6a195b3048e05206B9EAF3012723b52aD38", "amount": 1000 }, - { "address": "0x120Ae1332E852118074632F1188ce8B5548A9cE8", "amount": 1000 }, - { "address": "0x121a9CBa5f33Ea435153a62FADA442a263290bD5", "amount": 1000 }, - { "address": "0x122aF4bb0c562029eA5333D2B6364dfb558Ab88A", "amount": 1000 }, - { "address": "0x123a783F50437633D120088C45706D99D9C8c163", "amount": 1000 }, - { "address": "0x124A7a834D29f7D979AD125FA41c5be121493124", "amount": 1000 }, - { "address": "0x125ad0ca6EE6eAd3328da248eB1640604b6Aeecb", "amount": 1000 }, - { "address": "0x126a3f609bf8EDcfD3a336c4E833Bae2952408db", "amount": 1000 }, - { "address": "0x127a064b169d38C0B322D722dA84cDa991Bd315e", "amount": 1000 }, - { "address": "0x128a75434761b0CD9840132958A9cacEFC4bf072", "amount": 1000 }, - { "address": "0x129Af5D4C362F0522875938ACfaefcD459Bb6253", "amount": 1000 }, - { "address": "0x130Acec95F4C11C317Ef7F00Be692686d5ae5A44", "amount": 1000 }, - { "address": "0x131A707664eeE61139118945DB112D85302f78A9", "amount": 1000 }, - { "address": "0x132a0bB6E3A40cb412E4ad125ED0954C01b91b67", "amount": 1000 }, - { "address": "0x133AA93376306658C09e2f187BF934E3C134c239", "amount": 1000 }, - { "address": "0x134A365E26b5dbd1BaCA93AB46c0d35a992D095a", "amount": 1000 }, - { "address": "0x135AD7C99a99405C5D8783D78614FEAE8c0961E7", "amount": 1000 }, - { "address": "0x136aB508Bf8A3dBCe300F0e4991876202FC80CB9", "amount": 1000 }, - { "address": "0x137A88fB258F66D2817E33366b065C723a7F0704", "amount": 1000 }, - { "address": "0x138a285dE4EC9437CC5aE6072c3B17D6BF03eDfc", "amount": 1000 }, - { "address": "0x139ADD64267eE1e217B2183D874a6E87f2273c49", "amount": 1000 }, - { "address": "0x140a3Db8f02E3de807908A1C269508B7dBCDefeC", "amount": 1000 }, - { "address": "0x141Aa5767D71c5e08bcC52B63aD4a51a82910cee", "amount": 1000 }, - { "address": "0x142ab121D4d641e2Ab82aC7A45d13FDAb9d432ee", "amount": 1000 }, - { "address": "0x143a2313b3e966DBA3854A02d6aeFd0c23489B82", "amount": 1000 }, - { "address": "0x144af280E84341cCeaDFb7B317c18B880A228b6f", "amount": 1000 }, - { "address": "0x145abBf00384cAf891aF1623B7B240ef5f0E36D4", "amount": 1000 }, - { "address": "0x146aeFb264ca2b94cA807186c16EE2B687ec039C", "amount": 1000 }, - { "address": "0x147AdCA34520bd99E1f1C03A71831cCEf2CA5f4c", "amount": 1000 }, - { "address": "0x148abcD2674Ed44893dcFeAA509cA87FD46f16f5", "amount": 1000 }, - { "address": "0x149aAECDaD6cfeb5bB105b80d5c3539E948644fc", "amount": 1000 }, - { "address": "0x150a93c20AE038ea7453856b907321908C48f72e", "amount": 1000 }, - { "address": "0x151A4D3c898bA7639EdE5083448b904C713A92F5", "amount": 1000 }, - { "address": "0x152A3ce83261FDfa77c2930770C5d23342bbf088", "amount": 1000 }, - { "address": "0x153AC70724B2033a7Fcbe969193786BA33fb4d8C", "amount": 1000 }, - { "address": "0x154A03b6C9352dd18C7343096FA372f1030D6D48", "amount": 1000 }, - { "address": "0x155A99EC6c6f91D531EfEEA2bEd728232859B198", "amount": 1000 }, - { "address": "0x156AbA3eFF44957e8D746754C72F67a455a07508", "amount": 1000 }, - { "address": "0x157a5135F0eEf861972fBc24A9BF381918eA2FdF", "amount": 1000 }, - { "address": "0x158ADd5AEc7dC30aA90589B99e09065eCFF8BDAd", "amount": 1000 }, - { "address": "0x159AB5f6b9cB33ab5B83144bFC636069d5670A01", "amount": 1000 }, - { "address": "0x160adEA2A9399AeB5758B622B84335DA13047A0E", "amount": 1000 }, - { "address": "0x161AA2012F3825c28cAa62A52E13aAF8F1140E4c", "amount": 1000 }, - { "address": "0x162AbD33846ca2fD2195A3e47A241693625c14f1", "amount": 1000 }, - { "address": "0x163aF6A07C41a9DEC559EB7F95eeeb54439A986d", "amount": 1000 }, - { "address": "0x164Aec18D489Ac1833092517fA9AC1729D43CFCe", "amount": 1000 }, - { "address": "0x165aD5fA053cbea3af07E07165B641B6858AD97d", "amount": 1000 }, - { "address": "0x166A3B3A5efDb986c4014E375506ca944Fc169b1", "amount": 1000 }, - { "address": "0x167a69Dbc31B55CD8973538692d9678263DE0f92", "amount": 1000 }, - { "address": "0x168aE3966e0dab4C71AA5fC49D6BB162Adb6ea1E", "amount": 1000 }, - { "address": "0x169A022f508d0733F2F05F9A6828372829A14D3C", "amount": 1000 }, - { "address": "0x170a1E89e460F145fA602B28c82f39A63147dff5", "amount": 1000 }, - { "address": "0x171ACC73D210772D9d83B71a435e163FB62F805F", "amount": 1000 }, - { "address": "0x172af2f797afb825e17988DFD595Fe2edF5b078F", "amount": 1000 }, - { "address": "0x173A8e207FF51e5ac17Da7E7B0020e5a595f216C", "amount": 1000 }, - { "address": "0x174A04c0e4f46f750b8F3Bcee2654EAF1cD3A3C0", "amount": 1000 }, - { "address": "0x175A3765Af6B1658828A42dF38D760Ef038Bd6c6", "amount": 1000 }, - { "address": "0x176A3d1a06E30846d6Cc5a698a04E0a036ce8822", "amount": 1000 }, - { "address": "0x177A4d59Ce426745F4a84b6e54c0Cf89de40627C", "amount": 1000 }, - { "address": "0x178a81324F7d58E955eA0A310cadD86AFcd25F37", "amount": 1000 }, - { "address": "0x179Ac618B76EA27be5e7d5Ec5C8761B72d61C01d", "amount": 1000 }, - { "address": "0x180A829B7F62Ef0516B826fab14847b9EAa04552", "amount": 1000 }, - { "address": "0x181a030FDa05E906833aD2A1DB4A9bD8Bde23FF4", "amount": 1000 }, - { "address": "0x182a4696A1ce62FBd44702E8085DB15d31C00bd2", "amount": 1000 }, - { "address": "0x183AD0FE4abfd421F2974C8E69aE544FE70d6642", "amount": 1000 }, - { "address": "0x184aC75B5d0124BA0411972Ac28819deC2f71F9e", "amount": 1000 }, - { "address": "0x185a5d55e9B0FfFEF4934c8e8c8bb46D8e1Cc319", "amount": 1000 }, - { "address": "0x186A4287430A7F279A75d78b3Df5F80602F045C6", "amount": 1000 }, - { "address": "0x187A9A44f2a536ad170f65139f80D3Da421401d2", "amount": 1000 }, - { "address": "0x188a9b9Ca5C589299Ee4C853B800dF6E3208C47f", "amount": 1000 }, - { "address": "0x189A02cbA4a1a842EB307886D9C233Bf8eB342eb", "amount": 1000 }, - { "address": "0x190aa36be17a7067C46cb241916554F3b8F5f8fC", "amount": 1000 }, - { "address": "0x191Ae12537940d8a68007772DcA660cAD28E24CE", "amount": 1000 }, - { "address": "0x192a5313a6997B4E9993aAD011c9E3015Ff15fFe", "amount": 1000 }, - { "address": "0x193A1621298978848381Ca6FDe161B648a071387", "amount": 1000 }, - { "address": "0x194A92602C770eCe78eF575A3C31A2A8ad34284d", "amount": 1000 }, - { "address": "0x195A18fB280ED190f30Be8CD80C3eE851d414d5e", "amount": 1000 }, - { "address": "0x196A7cA3529049B48C9372c0c039F2741F817090", "amount": 1000 }, - { "address": "0x197A37eD6552f3Dbd5B4C37865379Bc711cfE523", "amount": 1000 }, - { "address": "0x198a3588f389F32f18C8B6832cC1C38BC2b468F5", "amount": 1000 }, - { "address": "0x199a3aE634249Aa216FAFD76fff9be7721b64E50", "amount": 1000 }, - { "address": "0x200Ac17Cae67a7A10372d7262D31972fD2b59809", "amount": 1000 }, - { "address": "0x201a31d8db88ddA273E1f84cCd63A81743Ad57b8", "amount": 1000 }, - { "address": "0x202A44a04A03cBC6BbbAd505BCc31EAd6c48F31C", "amount": 1000 }, - { "address": "0x203aD2082639D49594a733e4b6ECb5a2029226a1", "amount": 1000 }, - { "address": "0x204Af0eEE643Dc3fbE59fe6802E0a6756c43BCEc", "amount": 1000 }, - { "address": "0x205A96e5B1E4dd880FFB163A9909E4dE2C4663d5", "amount": 1000 }, - { "address": "0x206aDB086bD6D07663623d9097CC87Db2ACfC0eE", "amount": 1000 }, - { "address": "0x207aD2d733f74C1f81Ab9Bf88fFa8cE6B24107C7", "amount": 1000 }, - { "address": "0x208a2864F33022A1520915671557dC660aD10eEA", "amount": 1000 }, - { "address": "0x209Adc0230b4d47388CF15a778106F0289584eDc", "amount": 1000 }, - { "address": "0x210AF403293e0f4bc55f04cebBb5a957ae57fF6d", "amount": 1000 }, - { "address": "0x211ACC33CaD39F8f5A58e9Bc1E6BAA9e87692574", "amount": 1000 }, - { "address": "0x212ad4Ba61aF5C5963F6234B7B5c7b745EC2a0D5", "amount": 1000 }, - { "address": "0x213A008eAdC9e886De32b3BEe6d9b0b762FA6107", "amount": 1000 }, - { "address": "0x214aA361cAeD44920b7673E25f2a20AB807B2d8E", "amount": 1000 }, - { "address": "0x215Ac7e465e109A8e678534623700d89cDdB7B47", "amount": 1000 }, - { "address": "0x216aA1642df616ACeC88A9E0ccAB40BfeE5E4670", "amount": 1000 }, - { "address": "0x217a025c0ddf3832c0B32A36C597665cB25769Fb", "amount": 1000 }, - { "address": "0x218AA95a897F2289708910803ACa10570E1eB951", "amount": 1000 }, - { "address": "0x219a156696E6F12C07EE7F2348660C995D3fca3F", "amount": 1000 }, - { "address": "0x220aaE72C25f536aE648206DE1aDA44c98f9EB2f", "amount": 1000 }, - { "address": "0x221a4A36271EC5811cA22A330EDe98914d1dE1Bc", "amount": 1000 }, - { "address": "0x222A0Aa930caB0e4023778A3d9eB1625D963c300", "amount": 1000 }, - { "address": "0x223a8a303Ca0f37E668ea7A54A0dC67579Ee1d28", "amount": 1000 }, - { "address": "0x224a6142263d4107a2709A01Bc66BDc2b55Cd376", "amount": 1000 }, - { "address": "0x225a7A70E4afaE96d3Dd137dE102F8b6043DeAc1", "amount": 1000 }, - { "address": "0x226A8b66628ca81e3Bf35D0CEe77781e6291646D", "amount": 1000 }, - { "address": "0x227AD65232ad8804f19Dee818109eAB63AdeBFfb", "amount": 1000 }, - { "address": "0x228A19dDF28B6766b91EABeb2e31862f643f473B", "amount": 1000 }, - { "address": "0x229A7A304474016C8A2fEe2FA7668f0c021f2092", "amount": 1000 }, - { "address": "0x230AdD06091495cC05053Cf3fe01961C7f0d3F71", "amount": 1000 }, - { "address": "0x231Ad4FF515e7c713a6123d413e167E22dF6a6B1", "amount": 1000 }, - { "address": "0x232A24fE2768C4F55009434B5d70Fc4Fe9e6Ec6b", "amount": 1000 }, - { "address": "0x233aF87AE95093B7893D4366218e72253dd6bF6B", "amount": 1000 }, - { "address": "0x234Acfafb44241Dfb3885D2575e4271B024EEe92", "amount": 1000 }, - { "address": "0x235aBDAa4A17cCBE7Ae45FAcD5421b6941349a03", "amount": 1000 }, - { "address": "0x236aA1eF8661ab1f62d00ed5c2ed54018C9617d8", "amount": 1000 }, - { "address": "0x237a8f766ee194b8f89E907d1653442B004dd5cA", "amount": 1000 }, - { "address": "0x238ae320D6A38bFA9BD51D2347c2B6C6a3cc64e9", "amount": 1000 }, - { "address": "0x239Ab6Ed796C8Dc882Cbf699498aD786Cf4DD0A9", "amount": 1000 }, - { "address": "0x240a500c9b3D45678D5F7e14401F138b9296A213", "amount": 1000 }, - { "address": "0x241AF60fc6A83274698b04e139dc8D6144A0B8e4", "amount": 1000 }, - { "address": "0x242a4299EE6b1E467a7b3d4Bf9DC7F5Bf694AC98", "amount": 1000 }, - { "address": "0x243a1360Eb0bdB806DFE3a7b9A1EbB5Ef05BdD0F", "amount": 1000 }, - { "address": "0x244a4644EE0B41E5Bb8061A9C6dD7b97EAaF7137", "amount": 1000 }, - { "address": "0x245aA01A0Fe737cDe0ca670b354ab5842696FAE3", "amount": 1000 }, - { "address": "0x246A5c3bd98A3c83A107134Eb3a297d2fAa811Fa", "amount": 1000 }, - { "address": "0x247AA64022f7E59B9476341B05c1A1184e5FF54B", "amount": 1000 }, - { "address": "0x248A3E336c7B37319C40c7aEe4F09E86125699B1", "amount": 1000 }, - { "address": "0x249AaB1b71Dc59c682e7Ad24089372BE22591A7a", "amount": 1000 }, - { "address": "0x250a3919982ca7CEF58960fF716122dbb4514036", "amount": 1000 } -] diff --git a/config/config.json b/config/config.json index 3940a919e..58b38b0cb 100644 --- a/config/config.json +++ b/config/config.json @@ -1,183 +1,165 @@ { - "categories": [ - { - "name": "XS", - "description": {}, - "workClockTimeRef": 300 - }, - { - "name": "S", - "description": {}, - "workClockTimeRef": 1200 - }, - { - "name": "M", - "description": {}, - "workClockTimeRef": 3600 - }, - { - "name": "L", - "description": {}, - "workClockTimeRef": 10800 - }, - { - "name": "XL", - "description": {}, - "workClockTimeRef": 36000 - } - ], - "chains": - { - "1": - { - "_comment": "asset should be Token or Native", - "asset": "Token", - "token": "0x607F4C5BB672230e8672085532f7e901544a7375", - "uniswap": true, - "v3": - { - "Hub": "0x1383c16c927c4A853684d1a9c676986f25E22111", - "AppRegistry": "0x3322D449A43E01178672A5FBEA9E7aF3b8c7bB29", - "DatasetRegistry": "0xC28F63b8379087F02E09da1BC62148874E730Ffd", - "WorkerpoolRegistry": "0xc398052563469e6Ea7C442aBf124aADE7ec2CC92" - }, - "v5": - { - "usefactory": true, - "salt": "0x0000000000000000000000000000000000000000000000000000000000000000", - "AppRegistry": "0xB1C52075b276f87b1834919167312221d50c9D16", - "DatasetRegistry": "0x799DAa22654128d0C64d5b79eac9283008158730", - "WorkerpoolRegistry": "0xC76A18c78B7e530A165c5683CB1aB134E21938B4" - } - }, - "3": - { - "_comment": "asset should be Token or Native", - "asset": "Token", - "token": "0x7314Dc4d7794b5E7894212CA1556ae8e3De58621", - "uniswap": true, - "v3": - { - "Hub": null, - "AppRegistry": null, - "DatasetRegistry": null, - "WorkerpoolRegistry": null - }, - "v5": - { - "usefactory": true, - "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" - } - }, - "4": - { - "_comment": "asset should be Token or Native", - "asset": "Token", - "token": "0xf1e6Ad3a7eF0c86c915F0feDF80eD851809bEA90", - "uniswap": true, - "v3": - { - "Hub": null, - "AppRegistry": null, - "DatasetRegistry": null, - "WorkerpoolRegistry": null - }, - "v5": - { - "usefactory": true, - "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" - } - }, - "5": - { - "_comment": "asset should be Token or Native", - "asset": "Token", - "uniswap": true, - "token": "0xe0d00540a3729B4fdB96f92534dA97DC7973Af8b", - "etoken": "0x381790F5602401F46C2a447355d84715d744f273", - "v3": - { - "Hub": "0x99d8717A84d1E97422d04d9a2a82694038470753", - "AppRegistry": "0x221b9a91320a601b30992610425A960B1949B22d", - "DatasetRegistry": "0x8Dc0a7d917aeF68E340DBF68eF4ECB36d1Ca941b", - "WorkerpoolRegistry": "0xdAD30AAb14F569830bFd26EdF72df876dc30D20c" - }, - "v5": - { - "usefactory": true, - "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" - } - }, - "42": - { - "_comment": "asset should be Token or Native", - "asset": "Token", - "uniswap": true, - "token": "0xc57538846Ec405Ea25Deb00e0f9B29a432D53507", - "v3": - { - "Hub": "0xb3901d04CF645747b99DBbe8f2eE9cb41A89CeBF", - "AppRegistry": "0xd4945a24566AbF3517F81230Ff89820C3Dd39E33", - "DatasetRegistry": "0x1d7b69669e5781c3bCe590da74Ecf88Da5e12A9D", - "WorkerpoolRegistry": "0x3f4C18C322064576C048b1284b700288ffEf126B" - }, - "v5": - { - "usefactory": true, - "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" - } - }, - "133": - { - "_comment": "asset should be Token or Native", - "asset": "Native", - "v3": - { - "Hub": "0x4735e4BC6B143099fDF14224a82429aA34ba4d04", - "AppRegistry": "0x65313a6EDD5fF1E7d8C6cb235C09A82DbC159798", - "DatasetRegistry": "0x4D9080a52F13f6a1794Fd849Adb6e77DF35EBfA5", - "WorkerpoolRegistry": "0x1Cae59C7745A61dD37CD17f174745959D0f3f400" - }, - "v5": - { - "usefactory": true, - "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" - } - }, - "134": - { - "_comment": "asset should be Token or Native", - "asset": "Native", - "v3": - { - "Hub": "0xD5125A2d186E5266dA60e958043d32fE6fBA662f", - "AppRegistry": "0x6BC8657E0697728482418bD1a809598785C9E970", - "DatasetRegistry": "0x0BfDa3f68D836A99761205B20f6fa1C673bbF6Dd", - "WorkerpoolRegistry": "0x7E5459dC143cd51F7e1eCb644707Ee64aF24b6a6" - }, - "v5": - { - "usefactory": true, - "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" - } - }, - "default": - { - "_comment": "asset should be Token or Native", - "asset": "Token", - "token": null, - "uniswap": false, - "v3": - { - "Hub": null, - "AppRegistry": null, - "DatasetRegistry": null, - "WorkerpoolRegistry": null - }, - "v5": - { - "usefactory": true - } - } - } + "categories": [ + { + "name": "XS", + "description": {}, + "workClockTimeRef": 300 + }, + { + "name": "S", + "description": {}, + "workClockTimeRef": 1200 + }, + { + "name": "M", + "description": {}, + "workClockTimeRef": 3600 + }, + { + "name": "L", + "description": {}, + "workClockTimeRef": 10800 + }, + { + "name": "XL", + "description": {}, + "workClockTimeRef": 36000 + } + ], + "registriesBaseUri": { + "app": "https://nfts-metadata.iex.ec/app", + "dataset": "https://nfts-metadata.iex.ec/dataset", + "workerpool": "https://nfts-metadata.iex.ec/workerpool" + }, + "chains": { + "1": { + "_comment": "asset should be Token or Native", + "asset": "Token", + "token": "0x607F4C5BB672230e8672085532f7e901544a7375", + "uniswap": true, + "v3": { + "Hub": "0x1383c16c927c4A853684d1a9c676986f25E22111", + "AppRegistry": "0x3322D449A43E01178672A5FBEA9E7aF3b8c7bB29", + "DatasetRegistry": "0xC28F63b8379087F02E09da1BC62148874E730Ffd", + "WorkerpoolRegistry": "0xc398052563469e6Ea7C442aBf124aADE7ec2CC92" + }, + "v5": { + "usefactory": true, + "salt": "0x0000000000000000000000000000000000000000000000000000000000000000", + "AppRegistry": "0xB1C52075b276f87b1834919167312221d50c9D16", + "DatasetRegistry": "0x799DAa22654128d0C64d5b79eac9283008158730", + "WorkerpoolRegistry": "0xC76A18c78B7e530A165c5683CB1aB134E21938B4" + } + }, + "3": { + "_comment": "asset should be Token or Native", + "asset": "Token", + "token": "0x7314Dc4d7794b5E7894212CA1556ae8e3De58621", + "uniswap": true, + "v3": { + "Hub": null, + "AppRegistry": null, + "DatasetRegistry": null, + "WorkerpoolRegistry": null + }, + "v5": { + "usefactory": true, + "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "4": { + "_comment": "asset should be Token or Native", + "asset": "Token", + "token": "0xf1e6Ad3a7eF0c86c915F0feDF80eD851809bEA90", + "uniswap": true, + "v3": { + "Hub": null, + "AppRegistry": null, + "DatasetRegistry": null, + "WorkerpoolRegistry": null + }, + "v5": { + "usefactory": true, + "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "5": { + "_comment": "asset should be Token or Native", + "asset": "Token", + "uniswap": true, + "token": "0xe0d00540a3729B4fdB96f92534dA97DC7973Af8b", + "etoken": "0x381790F5602401F46C2a447355d84715d744f273", + "v3": { + "Hub": "0x99d8717A84d1E97422d04d9a2a82694038470753", + "AppRegistry": "0x221b9a91320a601b30992610425A960B1949B22d", + "DatasetRegistry": "0x8Dc0a7d917aeF68E340DBF68eF4ECB36d1Ca941b", + "WorkerpoolRegistry": "0xdAD30AAb14F569830bFd26EdF72df876dc30D20c" + }, + "v5": { + "usefactory": true, + "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "42": { + "_comment": "asset should be Token or Native", + "asset": "Token", + "uniswap": true, + "token": "0xc57538846Ec405Ea25Deb00e0f9B29a432D53507", + "v3": { + "Hub": "0xb3901d04CF645747b99DBbe8f2eE9cb41A89CeBF", + "AppRegistry": "0xd4945a24566AbF3517F81230Ff89820C3Dd39E33", + "DatasetRegistry": "0x1d7b69669e5781c3bCe590da74Ecf88Da5e12A9D", + "WorkerpoolRegistry": "0x3f4C18C322064576C048b1284b700288ffEf126B" + }, + "v5": { + "usefactory": true, + "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "133": { + "_comment": "asset should be Token or Native", + "asset": "Native", + "v3": { + "Hub": "0x4735e4BC6B143099fDF14224a82429aA34ba4d04", + "AppRegistry": "0x65313a6EDD5fF1E7d8C6cb235C09A82DbC159798", + "DatasetRegistry": "0x4D9080a52F13f6a1794Fd849Adb6e77DF35EBfA5", + "WorkerpoolRegistry": "0x1Cae59C7745A61dD37CD17f174745959D0f3f400" + }, + "v5": { + "usefactory": true, + "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "134": { + "_comment": "asset should be Token or Native", + "asset": "Native", + "v3": { + "Hub": "0xD5125A2d186E5266dA60e958043d32fE6fBA662f", + "AppRegistry": "0x6BC8657E0697728482418bD1a809598785C9E970", + "DatasetRegistry": "0x0BfDa3f68D836A99761205B20f6fa1C673bbF6Dd", + "WorkerpoolRegistry": "0x7E5459dC143cd51F7e1eCb644707Ee64aF24b6a6" + }, + "v5": { + "ERC1538Proxy": "0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f", + "IexecLibOrders_v5": "0xE8b04c85C47fcEc0e9eE30D4034e2997f6519123", + "usefactory": true, + "salt": "0x0000000000000000000000000000000000000000000000000000000000000000" + } + }, + "default": { + "_comment": "asset should be Token or Native", + "asset": "Token", + "token": null, + "uniswap": false, + "v3": { + "Hub": null, + "AppRegistry": null, + "DatasetRegistry": null, + "WorkerpoolRegistry": null + }, + "v5": { + "usefactory": true + } + } + } } diff --git a/config/config_native.json b/config/config_native.json index 6cfbcaff3..a26b66b0d 100644 --- a/config/config_native.json +++ b/config/config_native.json @@ -1,46 +1,51 @@ { - "categories": [ - { - "name": "XS", - "description": {}, - "workClockTimeRef": 300 + "categories": [ + { + "name": "XS", + "description": {}, + "workClockTimeRef": 300 + }, + { + "name": "S", + "description": {}, + "workClockTimeRef": 1200 + }, + { + "name": "M", + "description": {}, + "workClockTimeRef": 3600 + }, + { + "name": "L", + "description": {}, + "workClockTimeRef": 10800 + }, + { + "name": "XL", + "description": {}, + "workClockTimeRef": 36000 + } + ], + "registriesBaseUri": { + "app": "https://nfts-metadata.iex.ec/app", + "dataset": "https://nfts-metadata.iex.ec/dataset", + "workerpool": "https://nfts-metadata.iex.ec/workerpool" }, - { - "name": "S", - "description": {}, - "workClockTimeRef": 1200 - }, - { - "name": "M", - "description": {}, - "workClockTimeRef": 3600 - }, - { - "name": "L", - "description": {}, - "workClockTimeRef": 10800 - }, - { - "name": "XL", - "description": {}, - "workClockTimeRef": 36000 - } - ], - "chains": { - "default": { - "_comment": "asset should be Token or Native", - "asset": "Native", - "token": null, - "v3": { - "Hub": null, - "AppRegistry": null, - "DatasetRegistry": null, - "WorkerpoolRegistry": null - }, - "v5": { - "usefactory": true, - "salt": "0xbe1a000000000000000000000000000000000000000000000000000000000000" - } + "chains": { + "default": { + "_comment": "asset should be Token or Native", + "asset": "Native", + "token": null, + "v3": { + "Hub": null, + "AppRegistry": null, + "DatasetRegistry": null, + "WorkerpoolRegistry": null + }, + "v5": { + "usefactory": true, + "salt": "0xbe1a000000000000000000000000000000000000000000000000000000000000" + } + } } - } } diff --git a/config/config_token.json b/config/config_token.json index 4c69f0072..4fe9abe61 100644 --- a/config/config_token.json +++ b/config/config_token.json @@ -1,46 +1,51 @@ { - "categories": [ - { - "name": "XS", - "description": {}, - "workClockTimeRef": 300 + "categories": [ + { + "name": "XS", + "description": {}, + "workClockTimeRef": 300 + }, + { + "name": "S", + "description": {}, + "workClockTimeRef": 1200 + }, + { + "name": "M", + "description": {}, + "workClockTimeRef": 3600 + }, + { + "name": "L", + "description": {}, + "workClockTimeRef": 10800 + }, + { + "name": "XL", + "description": {}, + "workClockTimeRef": 36000 + } + ], + "registriesBaseUri": { + "app": "https://nfts-metadata.iex.ec/app", + "dataset": "https://nfts-metadata.iex.ec/dataset", + "workerpool": "https://nfts-metadata.iex.ec/workerpool" }, - { - "name": "S", - "description": {}, - "workClockTimeRef": 1200 - }, - { - "name": "M", - "description": {}, - "workClockTimeRef": 3600 - }, - { - "name": "L", - "description": {}, - "workClockTimeRef": 10800 - }, - { - "name": "XL", - "description": {}, - "workClockTimeRef": 36000 - } - ], - "chains": { - "default": { - "_comment": "asset should be Token or Native", - "asset": "Token", - "token": null, - "v3": { - "Hub": null, - "AppRegistry": null, - "DatasetRegistry": null, - "WorkerpoolRegistry": null - }, - "v5": { - "usefactory": true, - "salt": "0xbe1a000000000000000000000000000000000000000000000000000000000000" - } + "chains": { + "default": { + "_comment": "asset should be Token or Native", + "asset": "Token", + "token": null, + "v3": { + "Hub": null, + "AppRegistry": null, + "DatasetRegistry": null, + "WorkerpoolRegistry": null + }, + "v5": { + "usefactory": true, + "salt": "0xbe1a000000000000000000000000000000000000000000000000000000000000" + } + } } - } } diff --git a/contracts/Store.sol b/contracts/Store.sol index ac06f33ad..c160330fb 100644 --- a/contracts/Store.sol +++ b/contracts/Store.sol @@ -1,28 +1,12 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH // SPDX-License-Identifier: Apache-2.0 -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - pragma solidity ^0.6.0; import "@iexec/interface/contracts/IexecHub.sol"; import "@iexec/solidity/contracts/Libs/SafeMathExtended.sol"; import "@iexec/solidity/contracts/ERC1538/ERC1538Store.sol"; -// import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; -import "@iexec/erlc/contracts/interfaces/IERC20KYC.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./libs/IexecLibCore_v5.sol"; import "./libs/IexecLibOrders_v5.sol"; @@ -48,7 +32,7 @@ abstract contract Store is ERC1538Store IRegistry internal m_workerpoolregistry; // Escrow - IERC20KYC internal m_baseToken; + IERC20 internal m_baseToken; string internal m_name; string internal m_symbol; uint8 internal m_decimals; diff --git a/contracts/Store.v8.sol b/contracts/Store.v8.sol new file mode 100644 index 000000000..04898a865 --- /dev/null +++ b/contracts/Store.v8.sol @@ -0,0 +1,173 @@ +// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IERC20} from "@openzeppelin/contracts-v5/interfaces/IERC20.sol"; +import {IERC721Enumerable} from "@openzeppelin/contracts-v5/interfaces/IERC721Enumerable.sol"; +import {Ownable} from "@openzeppelin/contracts-v5/access/Ownable.sol"; +import {IexecLibCore_v5} from "./libs/IexecLibCore_v5.sol"; + +/**************************************************************************** + * WARNING: Be carefull when editing this file. * + * * + * If you want add new variables for expanded features, add them at the * + * end, or (better?) create a Store_v2 that inherits from this Store. * + * * + * If in doubt, read about ERC1538 memory store. * + ****************************************************************************/ + +/// @dev Solstruct translation for v0.8.0 +library LibSet_bytes4 { + struct set { + bytes4[] values; + mapping(bytes4 => uint256) indexes; + } +} + +library LibMap2_bytes4_address_bytes { + struct map { + LibSet_bytes4.set keyset; + mapping(bytes4 => address) values1; + mapping(bytes4 => bytes) values2; + } +} + +/// @dev @iexec/solidity ERC1538 +abstract contract ERC1538Store is Ownable { + LibMap2_bytes4_address_bytes.map internal m_funcs; +} + +/// @dev registries +interface IRegistry is IERC721Enumerable { + function isRegistered(address _entry) external view returns (bool); +} + +/// @dev Poco store +/** + * @title Central storage of all modules contracts. It follows the transparent + * contract standard aka ERC-1538. + * @dev note the new added state variable "m_dealsBoost" that holds a new type + * of deals for the PoCo Boost workflow. + */ +abstract contract Store is ERC1538Store { + // Registries + //slither-disable-next-line constable-states + IRegistry internal m_appregistry; + //slither-disable-next-line constable-states + IRegistry internal m_datasetregistry; + //slither-disable-next-line constable-states + IRegistry internal m_workerpoolregistry; + + // Escrow + //slither-disable-next-line constable-states + IERC20 internal m_baseToken; + //slither-disable-next-line constable-states + string internal m_name; + //slither-disable-next-line constable-states + string internal m_symbol; + //slither-disable-next-line constable-states + uint8 internal m_decimals; + //slither-disable-next-line constable-states + uint256 internal m_totalSupply; + + /** + * @dev In order to use the protocol, users have to deposit RLC + * and allow PoCo smart contracts to manage them. This state + * variable keeps track of users balances. + */ + mapping(address => uint256) internal m_balances; + + /** + * @dev When a deal is created, the protocol temporarily locks an amount + * of RLC tokens from the balances of both the requester and the workerpool owners. + * This is to guarantee the payment of different actors later. Frozen funds + * are released when the computation is completed and the result is pushed. + */ + mapping(address => uint256) internal m_frozens; + + mapping(address => mapping(address => uint256)) internal m_allowances; + + // Poco - Constants + uint256 internal constant CONTRIBUTION_DEADLINE_RATIO = 7; + uint256 internal constant REVEAL_DEADLINE_RATIO = 2; + uint256 internal constant FINAL_DEADLINE_RATIO = 10; + uint256 internal constant WORKERPOOL_STAKE_RATIO = 30; + uint256 internal constant KITTY_RATIO = 10; + uint256 internal constant KITTY_MIN = 1e9; // ADJUSTEMENT VARIABLE + + /** + * @dev Seized funds of workerpools that do not honor their deals are sent + * out to this kitty address. + * It is determined with address(uint256(keccak256(bytes('iExecKitty'))) - 1). + */ + address internal constant KITTY_ADDRESS = 0x99c2268479b93fDe36232351229815DF80837e23; + + /** + * @dev Used with ERC-734 Key Manager identity contract for authorization management. + */ + uint256 internal constant GROUPMEMBER_PURPOSE = 4; + + /** + * @dev EIP-712 domain hash. + */ + // Modified in IexecMaintenanceDelegate.updateDomainSeparator + //slither-disable-next-line constable-states + bytes32 internal EIP712DOMAIN_SEPARATOR; + + // Poco - Storage + + /** + * @dev Mapping an order hash to its owner. Since a smart contract cannot sign orders + * with a private key, it adds an entry to this mapping to provide presigned orders. + */ + mapping(bytes32 => address) internal m_presigned; + + /** + * @dev Each order has a volume (>=1). This tracks how much is consumed from + * the volume of each order. Mapping an order hash to its consumed amount. + */ + mapping(bytes32 => uint256) internal m_consumed; + + /** + * @dev a mapping to store PoCo classic deals. + */ + mapping(bytes32 => IexecLibCore_v5.Deal) internal m_deals; + + mapping(bytes32 => IexecLibCore_v5.Task) internal m_tasks; // per task + mapping(bytes32 => IexecLibCore_v5.Consensus) internal m_consensus; // per task + mapping(bytes32 => mapping(address => IexecLibCore_v5.Contribution)) internal m_contributions; // per task-worker + mapping(address => uint256) internal m_workerScores; // per worker + + // Poco - Settings + + /** + * @dev Address of a trusted TEE authority that manages enclave challenges. + */ + // Modified in IexecMaintenanceDelegate.setTeeBroker + //slither-disable-next-line constable-states + address internal m_teebroker; + + /** + * @dev Max amount of gas to be used with callbacks. + */ + // Modified in IexecMaintenanceDelegate.setCallbackGas + //slither-disable-next-line constable-states + uint256 internal m_callbackgas; + + /** + * @dev List of defined computation categories. + */ + IexecLibCore_v5.Category[] internal m_categories; + + // Backward compatibility + // Modified in IexecMaintenanceDelegate.configure + //slither-disable-next-line constable-states + address internal m_v3_iexecHub; // IexecHubInterface + mapping(address => bool) internal m_v3_scoreImported; + + /** + * @dev A mapping to store PoCo Boost deals. + */ + mapping(bytes32 => IexecLibCore_v5.DealBoost) internal m_dealsBoost; +} diff --git a/contracts/modules/delegates/IexecERC20DelegateKYC.sol b/contracts/external/interfaces/IERC734.sol similarity index 61% rename from contracts/modules/delegates/IexecERC20DelegateKYC.sol rename to contracts/external/interfaces/IERC734.sol index d8ae867da..2a5dc8d7b 100644 --- a/contracts/modules/delegates/IexecERC20DelegateKYC.sol +++ b/contracts/external/interfaces/IERC734.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 /****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * + * Copyright 2023 IEXEC BLOCKCHAIN TECH * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * @@ -16,24 +16,18 @@ * limitations under the License. * ******************************************************************************/ -pragma solidity ^0.6.0; -pragma experimental ABIEncoderV2; +pragma solidity ^0.8.0; -import "./IexecERC20Delegate.sol"; -import "./IexecERC20CoreKYC.sol"; - - -contract IexecERC20DelegateKYC is IexecERC20Delegate, IexecERC20CoreKYC -{ - function _beforeTokenTransfer(address from, address to, uint256 amount) - internal virtual override(IexecERC20Core, IexecERC20CoreKYC) - { - IexecERC20CoreKYC._beforeTokenTransfer(from, to, amount); - } - - function _isAuthorized(address account) - internal virtual override(IexecERC20Core, IexecERC20CoreKYC) returns (bool) - { - return IexecERC20CoreKYC._isAuthorized(account); - } +/** + * @notice The IERC734 interface of onchain-id requires a static version of solidity: + * https://github.com/onchain-id/solidity/blob/2.2.0/contracts/interface/IERC734.sol + * Pragma of the interface is updated here to maintain consistency accross the project. + * @dev Relevant part of ERC734 interface (Key Holder) standard as defined in the EIP. + */ +interface IERC734 { + /** + * @dev Returns TRUE if a key is present and has the given purpose. If the key is not + * present or does not have the given purpose it returns FALSE. + */ + function keyHasPurpose(bytes32 key, uint256 purpose) external view returns (bool exists); } diff --git a/contracts/external/interfaces/IOracleConsumer.sol b/contracts/external/interfaces/IOracleConsumer.sol new file mode 100644 index 000000000..7d562884a --- /dev/null +++ b/contracts/external/interfaces/IOracleConsumer.sol @@ -0,0 +1,17 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +/** + * @title Predefined interface of a contract that consumes the callback value + * submitted through a push result operation. + */ +interface IOracleConsumer { + /** + * Function called by PoCo contracts to consume the callback value. + * @param taskId id of the task. + * @param resultsCallback payload of the callback value. + */ + function receiveResult(bytes32 taskId, bytes calldata resultsCallback) external; +} diff --git a/contracts/libs/IexecLibCore_v5.sol b/contracts/libs/IexecLibCore_v5.sol index b21687eca..edf566315 100644 --- a/contracts/libs/IexecLibCore_v5.sol +++ b/contracts/libs/IexecLibCore_v5.sol @@ -1,129 +1,128 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH // SPDX-License-Identifier: Apache-2.0 -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +pragma solidity >=0.6.0; -pragma solidity ^0.6.0; +library IexecLibCore_v5 { + /** + * Tools + */ + struct Account { + uint256 stake; + uint256 locked; + } + struct Category { + string name; + string description; + uint256 workClockTimeRef; + } + /** + * Clerk - Deals + */ + struct Resource { + address pointer; + address owner; + uint256 price; + } + struct Deal { + // Ressources + Resource app; + Resource dataset; + Resource workerpool; + uint256 trust; + uint256 category; + bytes32 tag; + // execution details + address requester; + address beneficiary; + address callback; + string params; + // execution settings + uint256 startTime; + uint256 botFirst; + uint256 botSize; + // consistency + uint256 workerStake; + uint256 schedulerRewardRatio; + address sponsor; + } -library IexecLibCore_v5 -{ - /** - * Tools - */ - struct Account - { - uint256 stake; - uint256 locked; - } - struct Category - { - string name; - string description; - uint256 workClockTimeRef; - } + /** + * Simplified deals for PoCo Boost module. + */ + struct DealBoost { + // Offset 0 + address appOwner; + uint96 appPrice; + // Offset 1 + address datasetOwner; + uint96 datasetPrice; + // Offset 2 + address workerpoolOwner; + uint96 workerpoolPrice; + // Offset 3 + address requester; + uint96 workerReward; + // Offset 4 + address callback; + uint40 deadline; // Max: 1099511627776 => โˆž + uint16 botFirst; // Max: 65535 + uint16 botSize; // Max: 65535 + bytes3 shortTag; // Max: 0b111111111111111111111111 (0xFFFFFF) + // Offset 5 + address sponsor; + } + /** + * Tasks + */ + enum TaskStatusEnum { + UNSET, // Work order not yet initialized (invalid address) + ACTIVE, // Marketed โ†’ constributions are open + REVEALING, // Starting consensus reveal + COMPLETED, // Consensus achieved + FAILED // Failed consensus + } + struct Task { + TaskStatusEnum status; + bytes32 dealid; + uint256 idx; + uint256 timeref; + uint256 contributionDeadline; + uint256 revealDeadline; + uint256 finalDeadline; + bytes32 consensusValue; + uint256 revealCounter; + uint256 winnerCounter; + address[] contributors; + bytes32 resultDigest; + bytes results; + uint256 resultsTimestamp; + bytes resultsCallback; // Expansion - result separation + } - /** - * Clerk - Deals - */ - struct Resource - { - address pointer; - address owner; - uint256 price; - } - struct Deal - { - // Ressources - Resource app; - Resource dataset; - Resource workerpool; - uint256 trust; - uint256 category; - bytes32 tag; - // execution details - address requester; - address beneficiary; - address callback; - string params; - // execution settings - uint256 startTime; - uint256 botFirst; - uint256 botSize; - // consistency - uint256 workerStake; - uint256 schedulerRewardRatio; - } - - /** - * Tasks - */ - enum TaskStatusEnum - { - UNSET, // Work order not yet initialized (invalid address) - ACTIVE, // Marketed โ†’ constributions are open - REVEALING, // Starting consensus reveal - COMPLETED, // Consensus achieved - FAILED // Failed consensus - } - struct Task - { - TaskStatusEnum status; - bytes32 dealid; - uint256 idx; - uint256 timeref; - uint256 contributionDeadline; - uint256 revealDeadline; - uint256 finalDeadline; - bytes32 consensusValue; - uint256 revealCounter; - uint256 winnerCounter; - address[] contributors; - bytes32 resultDigest; - bytes results; - uint256 resultsTimestamp; - bytes resultsCallback; // Expansion - result separation - } - - /** - * Consensus - */ - struct Consensus - { - mapping(bytes32 => uint256) group; - uint256 total; - } - - /** - * Consensus - */ - enum ContributionStatusEnum - { - UNSET, - CONTRIBUTED, - PROVED, - REJECTED - } - struct Contribution - { - ContributionStatusEnum status; - bytes32 resultHash; - bytes32 resultSeal; - address enclaveChallenge; - uint256 weight; - } + /** + * Consensus + */ + struct Consensus { + mapping(bytes32 => uint256) group; + uint256 total; + } + /** + * Consensus + */ + enum ContributionStatusEnum { + UNSET, + CONTRIBUTED, + PROVED, + REJECTED + } + struct Contribution { + ContributionStatusEnum status; + bytes32 resultHash; + bytes32 resultSeal; + address enclaveChallenge; + uint256 weight; + } } diff --git a/contracts/libs/IexecLibOrders_v5.sol b/contracts/libs/IexecLibOrders_v5.sol index 773413a6d..13128da17 100644 --- a/contracts/libs/IexecLibOrders_v5.sol +++ b/contracts/libs/IexecLibOrders_v5.sol @@ -16,7 +16,7 @@ * limitations under the License. * ******************************************************************************/ -pragma solidity ^0.6.0; +pragma solidity >=0.6.0; pragma experimental ABIEncoderV2; diff --git a/contracts/modules/DelegateBase.sol b/contracts/modules/DelegateBase.sol index 114a90c23..188104668 100644 --- a/contracts/modules/DelegateBase.sol +++ b/contracts/modules/DelegateBase.sol @@ -1,32 +1,9 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH // SPDX-License-Identifier: Apache-2.0 -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - pragma solidity ^0.6.0; import "@iexec/solidity/contracts/ERC1538/ERC1538Module.sol"; import "../Store.sol"; - -abstract contract DelegateBase is Store, ERC1538Module -{ - modifier onlyScheduler(bytes32 _taskid) - { - require(_msgSender() == m_deals[m_tasks[_taskid].dealid].workerpool.owner); - _; - } -} +abstract contract DelegateBase is Store, ERC1538Module {} diff --git a/contracts/modules/DelegateBase.v8.sol b/contracts/modules/DelegateBase.v8.sol new file mode 100644 index 000000000..5cf521dfa --- /dev/null +++ b/contracts/modules/DelegateBase.v8.sol @@ -0,0 +1,21 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {Ownable} from "@openzeppelin/contracts-v5/access/Ownable.sol"; + +import {Store} from "../Store.v8.sol"; + +/** + * @title Base contract of all Delegate contracts. + * @dev Every module must inherit from this contract. + */ +abstract contract DelegateBase is Store { + /** + * @dev Constructor used by all PoCo modules. + */ + constructor() Ownable(msg.sender) { + renounceOwnership(); + } +} diff --git a/contracts/modules/delegates/IexecERC20Core.sol b/contracts/modules/delegates/IexecERC20Core.sol index 1aaf3e4b0..c0ee1d1bd 100644 --- a/contracts/modules/delegates/IexecERC20Core.sol +++ b/contracts/modules/delegates/IexecERC20Core.sol @@ -1,169 +1,51 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH // SPDX-License-Identifier: Apache-2.0 -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "../DelegateBase.sol"; +contract IexecERC20Core is DelegateBase { + using SafeMathExtended for uint256; -contract IexecERC20Core is DelegateBase -{ - using SafeMathExtended for uint256; - - event Transfer(address indexed from, address indexed to, uint256 value); - event Approval(address indexed owner, address indexed spender, uint256 value); - - function _isAuthorized(address) - internal virtual returns (bool) - { - return true; - } - - function _beforeTokenTransfer(address from, address to, uint256 amount) - internal virtual - { - } - - function _transferUnchecked(address sender, address recipient, uint256 amount) - internal - { - require(sender != address(0), 'ERC20: transfer from the zero address'); - require(recipient != address(0), 'ERC20: transfer to the zero address'); - - m_balances[sender] = m_balances[sender].sub(amount); - m_balances[recipient] = m_balances[recipient].add(amount); - emit Transfer(sender, recipient, amount); - } - - function _transfer(address sender, address recipient, uint256 amount) - internal - { - _beforeTokenTransfer(sender, recipient, amount); - _transferUnchecked(sender, recipient, amount); - } - - function _mint(address account, uint256 amount) - internal - { - require(account != address(0), 'ERC20: mint to the zero address'); - - _beforeTokenTransfer(address(0), account, amount); - - m_totalSupply = m_totalSupply.add(amount); - m_balances[account] = m_balances[account].add(amount); - emit Transfer(address(0), account, amount); - } - - function _burn(address account, uint256 amount) - internal - { - require(account != address(0), 'ERC20: burn from the zero address'); - - _beforeTokenTransfer(account, address(0), amount); - - m_totalSupply = m_totalSupply.sub(amount); - m_balances[account] = m_balances[account].sub(amount); - emit Transfer(account, address(0), amount); - } - - function _approve(address owner, address spender, uint256 amount) - internal - { - require(owner != address(0), 'ERC20: approve from the zero address'); - require(spender != address(0), 'ERC20: approve to the zero address'); - - m_allowances[owner][spender] = amount; - emit Approval(owner, spender, amount); - } - - /*************************************************************************** - * Escrow methods: internal * - ***************************************************************************/ - event Reward(address owner, uint256 amount, bytes32 ref); - event Seize (address owner, uint256 amount, bytes32 ref); - event Lock (address owner, uint256 amount); - event Unlock(address owner, uint256 amount); + event Transfer(address indexed from, address indexed to, uint256 value); + event Approval(address indexed owner, address indexed spender, uint256 value); - function reward(address user, uint256 amount, bytes32 ref) - internal /* returns (bool) */ - { - _transferUnchecked(address(this), user, amount); // prevent locking task - emit Reward(user, amount, ref); - /* return true; */ - } + function _transferUnchecked(address sender, address recipient, uint256 amount) internal { + require(sender != address(0), "ERC20: transfer from the zero address"); + require(recipient != address(0), "ERC20: transfer to the zero address"); - function seize(address user, uint256 amount, bytes32 ref) - internal /* returns (bool) */ - { - m_frozens[user] = m_frozens[user].sub(amount); - emit Seize(user, amount, ref); - /* return true; */ - } + m_balances[sender] = m_balances[sender].sub(amount); + m_balances[recipient] = m_balances[recipient].add(amount); + emit Transfer(sender, recipient, amount); + } - function lock(address user, uint256 amount) - internal /* returns (bool) */ - { - _transferUnchecked(user, address(this), amount); - m_frozens[user] = m_frozens[user].add(amount); - emit Lock(user, amount); - /* return true; */ - } + function _transfer(address sender, address recipient, uint256 amount) internal { + _transferUnchecked(sender, recipient, amount); + } - function unlock(address user, uint256 amount) - internal /* returns (bool) */ - { - _transferUnchecked(address(this), user, amount); // prevent locking task - m_frozens[user] = m_frozens[user].sub(amount); - emit Unlock(user, amount); - /* return true; */ - } + function _mint(address account, uint256 amount) internal { + require(account != address(0), "ERC20: mint to the zero address"); - /*************************************************************************** - * Escrow overhead for contribution * - ***************************************************************************/ - function lockContribution(bytes32 _dealid, address _worker) - internal - { - lock(_worker, m_deals[_dealid].workerStake); - } + m_totalSupply = m_totalSupply.add(amount); + m_balances[account] = m_balances[account].add(amount); + emit Transfer(address(0), account, amount); + } - function unlockContribution(bytes32 _dealid, address _worker) - internal - { - unlock(_worker, m_deals[_dealid].workerStake); - } + function _burn(address account, uint256 amount) internal { + require(account != address(0), "ERC20: burn from the zero address"); - function rewardForContribution(address _worker, uint256 _amount, bytes32 _taskid) - internal - { - reward(_worker, _amount, _taskid); - } + m_totalSupply = m_totalSupply.sub(amount); + m_balances[account] = m_balances[account].sub(amount); + emit Transfer(account, address(0), amount); + } - function seizeContribution(bytes32 _dealid, address _worker, bytes32 _taskid) - internal - { - seize(_worker, m_deals[_dealid].workerStake, _taskid); - } + function _approve(address owner, address spender, uint256 amount) internal { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); - function rewardForScheduling(bytes32 _dealid, uint256 _amount, bytes32 _taskid) - internal - { - reward(m_deals[_dealid].workerpool.owner, _amount, _taskid); - } + m_allowances[owner][spender] = amount; + emit Approval(owner, spender, amount); + } } diff --git a/contracts/modules/delegates/IexecERC20CoreKYC.sol b/contracts/modules/delegates/IexecERC20CoreKYC.sol deleted file mode 100644 index f3003c1f0..000000000 --- a/contracts/modules/delegates/IexecERC20CoreKYC.sol +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -pragma solidity ^0.6.0; -pragma experimental ABIEncoderV2; - -import "./IexecERC20Core.sol"; - - -contract IexecERC20CoreKYC is IexecERC20Core -{ - function _isAuthorized(address account) - internal virtual override returns (bool) - { - return m_baseToken.isKYC(account); - } - - function _beforeTokenTransfer(address from, address to, uint256 amount) - internal virtual override - { - uint8 restrictionCode = m_baseToken.detectTransferRestriction(from, to, amount); - if (restrictionCode != uint8(0)) - { - revert(m_baseToken.messageForTransferRestriction(restrictionCode)); - } - } -} diff --git a/contracts/modules/delegates/IexecEscrow.v8.sol b/contracts/modules/delegates/IexecEscrow.v8.sol new file mode 100644 index 000000000..540459909 --- /dev/null +++ b/contracts/modules/delegates/IexecEscrow.v8.sol @@ -0,0 +1,89 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {DelegateBase} from "../DelegateBase.v8.sol"; + +/** + * @title Manage (lock/unlock/reward/seize) user funds. + */ +contract IexecEscrow is DelegateBase { + event Transfer(address indexed from, address indexed to, uint256 value); + event Lock(address owner, uint256 amount); + event Unlock(address owner, uint256 amount); + event Reward(address owner, uint256 amount, bytes32 ref); + event Seize(address owner, uint256 amount, bytes32 ref); + + /** + * Lock some value of an account. + * @param account The account where the value should be locked. + * @param value The value to lock. + */ + function lock(address account, uint256 value) internal { + _transfer(account, address(this), value); + m_frozens[account] += value; + emit Lock(account, value); + } + + /** + * Unlock some value of an account. + * @param account The account where the value should be unlocked. + * @param value The value to unlock. + */ + function unlock(address account, uint256 value) internal { + _transfer(address(this), account, value); + m_frozens[account] -= value; + emit Unlock(account, value); + } + + /** + * Reward an account. + * @param account The account to reward. + * @param value The reward value. + * @param ref A reference of the reward context. + */ + function reward(address account, uint256 value, bytes32 ref) internal { + _transfer(address(this), account, value); + emit Reward(account, value, ref); + } + + /** + * Seize value on an account. + * @param account The account to seize. + * @param value The seize value. + * @param ref A reference of the seize context. + */ + function seize(address account, uint256 value, bytes32 ref) internal { + m_frozens[account] -= value; + emit Seize(account, value, ref); + } + + /** + * Transfer value from a spender account to a receiver account. + * @notice + * This function does not check for self-transfers + * because its current usage does not require such verification. + * Indeed, all operations that use this function are always between + * the proxy contract and another actor of the platform (requester, + * owner of dataset/application/workerpool). + * + * @param from The address of the spender account. + * @param to The address of the receiver account. + * @param value The value to transfer. + */ + function _transfer(address from, address to, uint256 value) private { + require(from != address(0), "IexecEscrow: Transfer from empty address"); + require(to != address(0), "IexecEscrow: Transfer to empty address"); + uint256 fromBalance = m_balances[from]; + require(value <= fromBalance, "IexecEscrow: Transfer amount exceeds balance"); + // This block is guaranteed to not underflow because we check the from balance + // and guaranteed to not overflow because the total supply is capped and there + // is no minting involved. + unchecked { + m_balances[from] = fromBalance - value; + m_balances[to] += value; + } + emit Transfer(from, to, value); + } +} diff --git a/contracts/modules/delegates/IexecEscrowTokenDelegateKYC.sol b/contracts/modules/delegates/IexecEscrowTokenDelegateKYC.sol deleted file mode 100644 index c6b0adaba..000000000 --- a/contracts/modules/delegates/IexecEscrowTokenDelegateKYC.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -pragma solidity ^0.6.0; -pragma experimental ABIEncoderV2; - -import "./IexecEscrowTokenDelegate.sol"; -import "./IexecERC20CoreKYC.sol"; - - -contract IexecEscrowTokenDelegateKYC is IexecEscrowTokenDelegate, IexecERC20CoreKYC -{ - function _beforeTokenTransfer(address from, address to, uint256 amount) - internal virtual override(IexecERC20Core, IexecERC20CoreKYC) - { - IexecERC20CoreKYC._beforeTokenTransfer(from, to, amount); - } - - function _isAuthorized(address account) - internal virtual override(IexecERC20Core, IexecERC20CoreKYC) returns (bool) - { - return IexecERC20CoreKYC._isAuthorized(account); - } -} diff --git a/contracts/modules/delegates/IexecMaintenanceDelegate.sol b/contracts/modules/delegates/IexecMaintenanceDelegate.sol index 80eee9081..83be035eb 100644 --- a/contracts/modules/delegates/IexecMaintenanceDelegate.sol +++ b/contracts/modules/delegates/IexecMaintenanceDelegate.sol @@ -1,24 +1,11 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH // SPDX-License-Identifier: Apache-2.0 -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + import "../DelegateBase.sol"; import "../interfaces/IexecMaintenance.sol"; @@ -42,7 +29,7 @@ contract IexecMaintenanceDelegate is IexecMaintenance, DelegateBase require(EIP712DOMAIN_SEPARATOR == bytes32(0), 'already-configured'); EIP712DOMAIN_SEPARATOR = _domain().hash(); - m_baseToken = IERC20KYC(_token); + m_baseToken = IERC20(_token); m_name = _name; m_symbol = _symbol; m_decimals = _decimal; diff --git a/contracts/modules/delegates/IexecOrderManagementDelegate.sol b/contracts/modules/delegates/IexecOrderManagementDelegate.sol index c7ab5daf8..3ebba8a13 100644 --- a/contracts/modules/delegates/IexecOrderManagementDelegate.sol +++ b/contracts/modules/delegates/IexecOrderManagementDelegate.sol @@ -1,116 +1,122 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH // SPDX-License-Identifier: Apache-2.0 -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +pragma solidity ^0.8.0; -pragma solidity ^0.6.0; -pragma experimental ABIEncoderV2; +import {IERC5313} from "@openzeppelin/contracts-v5/interfaces/IERC5313.sol"; +import {SignatureVerifier} from "./SignatureVerifier.v8.sol"; +import {DelegateBase} from "../DelegateBase.v8.sol"; +import {IexecOrderManagement} from "../interfaces/IexecOrderManagement.v8.sol"; +import {IexecLibOrders_v5} from "../../libs/IexecLibOrders_v5.sol"; -import "./SignatureVerifier.sol"; -import "../DelegateBase.sol"; -import "../interfaces/IexecOrderManagement.sol"; +contract IexecOrderManagementDelegate is IexecOrderManagement, DelegateBase, SignatureVerifier { + using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.WorkerpoolOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.RequestOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrderOperation; + using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrderOperation; + using IexecLibOrders_v5 for IexecLibOrders_v5.WorkerpoolOrderOperation; + using IexecLibOrders_v5 for IexecLibOrders_v5.RequestOrderOperation; + /*************************************************************************** + * order management tools * + ***************************************************************************/ + function manageAppOrder( + IexecLibOrders_v5.AppOrderOperation calldata _apporderoperation + ) external override { + address owner = IERC5313(_apporderoperation.order.app).owner(); + require( + owner == _msgSender() || + _verifySignature( + owner, + _toTypedDataHash(_apporderoperation.hash()), + _apporderoperation.sign + ), + "invalid-sender-or-signature" + ); -contract IexecOrderManagementDelegate is IexecOrderManagement, DelegateBase, SignatureVerifier -{ - using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrder; - using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrder; - using IexecLibOrders_v5 for IexecLibOrders_v5.WorkerpoolOrder; - using IexecLibOrders_v5 for IexecLibOrders_v5.RequestOrder; - using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrderOperation; - using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrderOperation; - using IexecLibOrders_v5 for IexecLibOrders_v5.WorkerpoolOrderOperation; - using IexecLibOrders_v5 for IexecLibOrders_v5.RequestOrderOperation; + bytes32 apporderHash = _toTypedDataHash(_apporderoperation.order.hash()); + if (_apporderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.SIGN) { + m_presigned[apporderHash] = owner; + emit SignedAppOrder(apporderHash); + } else if (_apporderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.CLOSE) { + m_consumed[apporderHash] = _apporderoperation.order.volume; + emit ClosedAppOrder(apporderHash); + } + } - /*************************************************************************** - * order management tools * - ***************************************************************************/ - function manageAppOrder(IexecLibOrders_v5.AppOrderOperation memory _apporderoperation) - public override - { - address owner = App(_apporderoperation.order.app).owner(); - require(owner == _msgSender() || _checkSignature(owner, _toEthTypedStruct(_apporderoperation.hash(), EIP712DOMAIN_SEPARATOR), _apporderoperation.sign), 'invalid-sender-or-signature'); + function manageDatasetOrder( + IexecLibOrders_v5.DatasetOrderOperation calldata _datasetorderoperation + ) external override { + address owner = IERC5313(_datasetorderoperation.order.dataset).owner(); + require( + owner == _msgSender() || + _verifySignature( + owner, + _toTypedDataHash(_datasetorderoperation.hash()), + _datasetorderoperation.sign + ), + "invalid-sender-or-signature" + ); - bytes32 apporderHash = keccak256(_toEthTypedStruct(_apporderoperation.order.hash(), EIP712DOMAIN_SEPARATOR)); - if (_apporderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.SIGN) - { - m_presigned[apporderHash] = owner; - emit SignedAppOrder(apporderHash); - } - else if (_apporderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.CLOSE) - { - m_consumed[apporderHash] = _apporderoperation.order.volume; - emit ClosedAppOrder(apporderHash); - } - } + bytes32 datasetorderHash = _toTypedDataHash(_datasetorderoperation.order.hash()); + if (_datasetorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.SIGN) { + m_presigned[datasetorderHash] = owner; + emit SignedDatasetOrder(datasetorderHash); + } else if (_datasetorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.CLOSE) { + m_consumed[datasetorderHash] = _datasetorderoperation.order.volume; + emit ClosedDatasetOrder(datasetorderHash); + } + } - function manageDatasetOrder(IexecLibOrders_v5.DatasetOrderOperation memory _datasetorderoperation) - public override - { - address owner = Dataset(_datasetorderoperation.order.dataset).owner(); - require(owner == _msgSender() || _checkSignature(owner, _toEthTypedStruct(_datasetorderoperation.hash(), EIP712DOMAIN_SEPARATOR), _datasetorderoperation.sign), 'invalid-sender-or-signature'); + function manageWorkerpoolOrder( + IexecLibOrders_v5.WorkerpoolOrderOperation calldata _workerpoolorderoperation + ) external override { + address owner = IERC5313(_workerpoolorderoperation.order.workerpool).owner(); + require( + owner == _msgSender() || + _verifySignature( + owner, + _toTypedDataHash(_workerpoolorderoperation.hash()), + _workerpoolorderoperation.sign + ), + "invalid-sender-or-signature" + ); - bytes32 datasetorderHash = keccak256(_toEthTypedStruct(_datasetorderoperation.order.hash(), EIP712DOMAIN_SEPARATOR)); - if (_datasetorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.SIGN) - { - m_presigned[datasetorderHash] = owner; - emit SignedDatasetOrder(datasetorderHash); - } - else if (_datasetorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.CLOSE) - { - m_consumed[datasetorderHash] = _datasetorderoperation.order.volume; - emit ClosedDatasetOrder(datasetorderHash); - } - } + bytes32 workerpoolorderHash = _toTypedDataHash(_workerpoolorderoperation.order.hash()); + if (_workerpoolorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.SIGN) { + m_presigned[workerpoolorderHash] = owner; + emit SignedWorkerpoolOrder(workerpoolorderHash); + } else if ( + _workerpoolorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.CLOSE + ) { + m_consumed[workerpoolorderHash] = _workerpoolorderoperation.order.volume; + emit ClosedWorkerpoolOrder(workerpoolorderHash); + } + } - function manageWorkerpoolOrder(IexecLibOrders_v5.WorkerpoolOrderOperation memory _workerpoolorderoperation) - public override - { - address owner = Workerpool(_workerpoolorderoperation.order.workerpool).owner(); - require(owner == _msgSender() || _checkSignature(owner, _toEthTypedStruct(_workerpoolorderoperation.hash(), EIP712DOMAIN_SEPARATOR), _workerpoolorderoperation.sign), 'invalid-sender-or-signature'); + function manageRequestOrder( + IexecLibOrders_v5.RequestOrderOperation calldata _requestorderoperation + ) external override { + address owner = _requestorderoperation.order.requester; + require( + owner == _msgSender() || + _verifySignature( + owner, + _toTypedDataHash(_requestorderoperation.hash()), + _requestorderoperation.sign + ), + "invalid-sender-or-signature" + ); - bytes32 workerpoolorderHash = keccak256(_toEthTypedStruct(_workerpoolorderoperation.order.hash(), EIP712DOMAIN_SEPARATOR)); - if (_workerpoolorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.SIGN) - { - m_presigned[workerpoolorderHash] = owner; - emit SignedWorkerpoolOrder(workerpoolorderHash); - } - else if (_workerpoolorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.CLOSE) - { - m_consumed[workerpoolorderHash] = _workerpoolorderoperation.order.volume; - emit ClosedWorkerpoolOrder(workerpoolorderHash); - } - } - - function manageRequestOrder(IexecLibOrders_v5.RequestOrderOperation memory _requestorderoperation) - public override - { - address owner = _requestorderoperation.order.requester; - require(owner == _msgSender() || _checkSignature(owner, _toEthTypedStruct(_requestorderoperation.hash(), EIP712DOMAIN_SEPARATOR), _requestorderoperation.sign), 'invalid-sender-or-signature'); - - bytes32 requestorderHash = keccak256(_toEthTypedStruct(_requestorderoperation.order.hash(), EIP712DOMAIN_SEPARATOR)); - if (_requestorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.SIGN) - { - m_presigned[requestorderHash] = owner; - emit SignedRequestOrder(requestorderHash); - } - else if (_requestorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.CLOSE) - { - m_consumed[requestorderHash] = _requestorderoperation.order.volume; - emit ClosedRequestOrder(requestorderHash); - } - } + bytes32 requestorderHash = _toTypedDataHash(_requestorderoperation.order.hash()); + if (_requestorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.SIGN) { + m_presigned[requestorderHash] = owner; + emit SignedRequestOrder(requestorderHash); + } else if (_requestorderoperation.operation == IexecLibOrders_v5.OrderOperationEnum.CLOSE) { + m_consumed[requestorderHash] = _requestorderoperation.order.volume; + emit ClosedRequestOrder(requestorderHash); + } + } } diff --git a/contracts/modules/delegates/IexecPoco1Delegate.sol b/contracts/modules/delegates/IexecPoco1Delegate.sol index b2f1dd3f1..066cdf0a4 100644 --- a/contracts/modules/delegates/IexecPoco1Delegate.sol +++ b/contracts/modules/delegates/IexecPoco1Delegate.sol @@ -1,240 +1,389 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH // SPDX-License-Identifier: Apache-2.0 -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -pragma solidity ^0.6.0; -pragma experimental ABIEncoderV2; - -import "./IexecERC20Core.sol"; -import "./SignatureVerifier.sol"; -import "../DelegateBase.sol"; -import "../interfaces/IexecPoco1.sol"; - - -struct Matching -{ - bytes apporderStruct; - bytes32 apporderHash; - address appOwner; - bytes datasetorderStruct; - bytes32 datasetorderHash; - address datasetOwner; - bytes workerpoolorderStruct; - bytes32 workerpoolorderHash; - address workerpoolOwner; - bytes requestorderStruct; - bytes32 requestorderHash; - bool hasDataset; +pragma solidity ^0.8.0; + +import {IERC5313} from "@openzeppelin/contracts-v5/interfaces/IERC5313.sol"; +import {Math} from "@openzeppelin/contracts-v5/utils/math/Math.sol"; + +import {IexecLibCore_v5} from "../../libs/IexecLibCore_v5.sol"; +import {IexecLibOrders_v5} from "../../libs/IexecLibOrders_v5.sol"; +import {IWorkerpool} from "../../registries/workerpools/IWorkerpool.v8.sol"; +import {DelegateBase} from "../DelegateBase.v8.sol"; +import {IexecPoco1} from "../interfaces/IexecPoco1.v8.sol"; +import {IexecEscrow} from "./IexecEscrow.v8.sol"; +import {IexecPocoCommonDelegate} from "./IexecPocoCommonDelegate.sol"; +import {SignatureVerifier} from "./SignatureVerifier.v8.sol"; + +struct Matching { + bytes32 apporderHash; + address appOwner; + bytes32 datasetorderHash; + address datasetOwner; + bytes32 workerpoolorderHash; + address workerpoolOwner; + bytes32 requestorderHash; + bool hasDataset; } -contract IexecPoco1Delegate is IexecPoco1, DelegateBase, IexecERC20Core, SignatureVerifier +contract IexecPoco1Delegate is + IexecPoco1, + DelegateBase, + IexecEscrow, + SignatureVerifier, + IexecPocoCommonDelegate { - using SafeMathExtended for uint256; - using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrder; - using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrder; - using IexecLibOrders_v5 for IexecLibOrders_v5.WorkerpoolOrder; - using IexecLibOrders_v5 for IexecLibOrders_v5.RequestOrder; - - /*************************************************************************** - * ODB order signature * - ***************************************************************************/ - function verifySignature(address _identity, bytes32 _hash, bytes calldata _signature) - external view override returns (bool) - { - return _checkSignature(_identity, _hash, _signature); - } - - function verifyPresignature(address _identity, bytes32 _hash) - external view override returns (bool) - { - return _checkPresignature(_identity, _hash); - } - - function verifyPresignatureOrSignature(address _identity, bytes32 _hash, bytes calldata _signature) - external view override returns (bool) - { - return _checkPresignatureOrSignature(_identity, _hash, _signature); - } - - /*************************************************************************** - * ODB order matching * - ***************************************************************************/ - // should be external - function matchOrders( - IexecLibOrders_v5.AppOrder memory _apporder, - IexecLibOrders_v5.DatasetOrder memory _datasetorder, - IexecLibOrders_v5.WorkerpoolOrder memory _workerpoolorder, - IexecLibOrders_v5.RequestOrder memory _requestorder) - public override returns (bytes32) - { - /** - * Check orders compatibility - */ - - // computation environment & allowed enough funds - bytes32 tag = _apporder.tag | _datasetorder.tag | _requestorder.tag; - require(_requestorder.category == _workerpoolorder.category, 'iExecV5-matchOrders-0x00'); - require(_requestorder.category < m_categories.length, 'iExecV5-matchOrders-0x01'); - require(_requestorder.trust <= _workerpoolorder.trust, 'iExecV5-matchOrders-0x02'); - require(_requestorder.appmaxprice >= _apporder.appprice, 'iExecV5-matchOrders-0x03'); - require(_requestorder.datasetmaxprice >= _datasetorder.datasetprice, 'iExecV5-matchOrders-0x04'); - require(_requestorder.workerpoolmaxprice >= _workerpoolorder.workerpoolprice, 'iExecV5-matchOrders-0x05'); - require(tag & ~_workerpoolorder.tag == 0x0, 'iExecV5-matchOrders-0x06'); - require((tag ^ _apporder.tag)[31] & 0x01 == 0x0, 'iExecV5-matchOrders-0x07'); - - // Check matching and restrictions - require(_requestorder.app == _apporder.app, 'iExecV5-matchOrders-0x10'); - require(_requestorder.dataset == _datasetorder.dataset, 'iExecV5-matchOrders-0x11'); - require(_requestorder.workerpool == address(0) || _checkIdentity(_requestorder.workerpool, _workerpoolorder.workerpool, GROUPMEMBER_PURPOSE), 'iExecV5-matchOrders-0x12'); // requestorder.workerpool is a restriction - require(_apporder.datasetrestrict == address(0) || _checkIdentity(_apporder.datasetrestrict, _datasetorder.dataset, GROUPMEMBER_PURPOSE), 'iExecV5-matchOrders-0x13'); - require(_apporder.workerpoolrestrict == address(0) || _checkIdentity(_apporder.workerpoolrestrict, _workerpoolorder.workerpool, GROUPMEMBER_PURPOSE), 'iExecV5-matchOrders-0x14'); - require(_apporder.requesterrestrict == address(0) || _checkIdentity(_apporder.requesterrestrict, _requestorder.requester, GROUPMEMBER_PURPOSE), 'iExecV5-matchOrders-0x15'); - require(_datasetorder.apprestrict == address(0) || _checkIdentity(_datasetorder.apprestrict, _apporder.app, GROUPMEMBER_PURPOSE), 'iExecV5-matchOrders-0x16'); - require(_datasetorder.workerpoolrestrict == address(0) || _checkIdentity(_datasetorder.workerpoolrestrict, _workerpoolorder.workerpool, GROUPMEMBER_PURPOSE), 'iExecV5-matchOrders-0x17'); - require(_datasetorder.requesterrestrict == address(0) || _checkIdentity(_datasetorder.requesterrestrict, _requestorder.requester, GROUPMEMBER_PURPOSE), 'iExecV5-matchOrders-0x18'); - require(_workerpoolorder.apprestrict == address(0) || _checkIdentity(_workerpoolorder.apprestrict, _apporder.app, GROUPMEMBER_PURPOSE), 'iExecV5-matchOrders-0x19'); - require(_workerpoolorder.datasetrestrict == address(0) || _checkIdentity(_workerpoolorder.datasetrestrict, _datasetorder.dataset, GROUPMEMBER_PURPOSE), 'iExecV5-matchOrders-0x1a'); - require(_workerpoolorder.requesterrestrict == address(0) || _checkIdentity(_workerpoolorder.requesterrestrict, _requestorder.requester, GROUPMEMBER_PURPOSE), 'iExecV5-matchOrders-0x1b'); - - /** - * Check orders authenticity - */ - Matching memory ids; - ids.hasDataset = _datasetorder.dataset != address(0); - - // app - ids.apporderStruct = _toEthTypedStruct(_apporder.hash(), EIP712DOMAIN_SEPARATOR); - ids.apporderHash = keccak256(ids.apporderStruct); - ids.appOwner = App(_apporder.app).owner(); - - require(m_appregistry.isRegistered(_apporder.app), 'iExecV5-matchOrders-0x20'); - require(_checkPresignatureOrSignature(ids.appOwner, ids.apporderStruct, _apporder.sign), 'iExecV5-matchOrders-0x21'); - require(_isAuthorized(ids.appOwner), 'iExecV5-matchOrders-0x22'); - - // dataset - if (ids.hasDataset) // only check if dataset is enabled - { - ids.datasetorderStruct = _toEthTypedStruct(_datasetorder.hash(), EIP712DOMAIN_SEPARATOR); - ids.datasetorderHash = keccak256(ids.datasetorderStruct); - ids.datasetOwner = Dataset(_datasetorder.dataset).owner(); - - require(m_datasetregistry.isRegistered(_datasetorder.dataset), 'iExecV5-matchOrders-0x30'); - require(_checkPresignatureOrSignature(ids.datasetOwner, ids.datasetorderStruct, _datasetorder.sign), 'iExecV5-matchOrders-0x31'); - require(_isAuthorized(ids.datasetOwner), 'iExecV5-matchOrders-0x32'); - } - - // workerpool - ids.workerpoolorderStruct = _toEthTypedStruct(_workerpoolorder.hash(), EIP712DOMAIN_SEPARATOR); - ids.workerpoolorderHash = keccak256(ids.workerpoolorderStruct); - ids.workerpoolOwner = Workerpool(_workerpoolorder.workerpool).owner(); - - require(m_workerpoolregistry.isRegistered(_workerpoolorder.workerpool), 'iExecV5-matchOrders-0x40'); - require(_checkPresignatureOrSignature(ids.workerpoolOwner, ids.workerpoolorderStruct, _workerpoolorder.sign), 'iExecV5-matchOrders-0x41'); - require(_isAuthorized(ids.workerpoolOwner), 'iExecV5-matchOrders-0x42'); - - // request - ids.requestorderStruct = _toEthTypedStruct(_requestorder.hash(), EIP712DOMAIN_SEPARATOR); - ids.requestorderHash = keccak256(ids.requestorderStruct); - require(_checkPresignatureOrSignature(_requestorder.requester, ids.requestorderStruct, _requestorder.sign), 'iExecV5-matchOrders-0x50'); - require(_isAuthorized(_requestorder.requester), 'iExecV5-matchOrders-0x51'); - - /** - * Check availability - */ - uint256 volume; - volume = _apporder.volume.sub (m_consumed[ids.apporderHash ]); - volume = ids.hasDataset ? volume.min(_datasetorder.volume.sub (m_consumed[ids.datasetorderHash ])) : volume; - volume = volume.min(_workerpoolorder.volume.sub(m_consumed[ids.workerpoolorderHash])); - volume = volume.min(_requestorder.volume.sub (m_consumed[ids.requestorderHash ])); - require(volume > 0, 'iExecV5-matchOrders-0x60'); - - /** - * Record - */ - bytes32 dealid = keccak256(abi.encodePacked( - ids.requestorderHash, // requestHash - m_consumed[ids.requestorderHash] // idx of first subtask - )); - - IexecLibCore_v5.Deal storage deal = m_deals[dealid]; - deal.app.pointer = _apporder.app; - deal.app.owner = ids.appOwner; - deal.app.price = _apporder.appprice; - deal.dataset.owner = ids.datasetOwner; - deal.dataset.pointer = _datasetorder.dataset; - deal.dataset.price = ids.hasDataset ? _datasetorder.datasetprice : 0; - deal.workerpool.pointer = _workerpoolorder.workerpool; - deal.workerpool.owner = ids.workerpoolOwner; - deal.workerpool.price = _workerpoolorder.workerpoolprice; - deal.trust = _requestorder.trust.max(1); - deal.category = _requestorder.category; - deal.tag = tag; - deal.requester = _requestorder.requester; - deal.beneficiary = _requestorder.beneficiary; - deal.callback = _requestorder.callback; - deal.params = _requestorder.params; - deal.startTime = now; - deal.botFirst = m_consumed[ids.requestorderHash]; - deal.botSize = volume; - deal.workerStake = _workerpoolorder.workerpoolprice.percentage(Workerpool(_workerpoolorder.workerpool).m_workerStakeRatioPolicy()); - deal.schedulerRewardRatio = Workerpool(_workerpoolorder.workerpool).m_schedulerRewardRatioPolicy(); - - /** - * Update consumed - */ - m_consumed[ids.apporderHash ] = m_consumed[ids.apporderHash ].add( volume ); - m_consumed[ids.datasetorderHash ] = m_consumed[ids.datasetorderHash ].add(ids.hasDataset ? volume : 0); - m_consumed[ids.workerpoolorderHash] = m_consumed[ids.workerpoolorderHash].add( volume ); - m_consumed[ids.requestorderHash ] = m_consumed[ids.requestorderHash ].add( volume ); - - /** - * Lock - */ - lock( - deal.requester, - deal.app.price - .add(deal.dataset.price) - .add(deal.workerpool.price) - .mul(volume) - ); - lock( - deal.workerpool.owner, - deal.workerpool.price - .percentage(WORKERPOOL_STAKE_RATIO) // ORDER IS IMPORTANT HERE! - .mul(volume) // ORDER IS IMPORTANT HERE! - ); - - /** - * Advertize deal - */ - emit SchedulerNotice(deal.workerpool.pointer, dealid); - - /** - * Advertize consumption - */ - emit OrdersMatched( - dealid - , ids.apporderHash - , ids.datasetorderHash - , ids.workerpoolorderHash - , ids.requestorderHash - , volume - ); - - return dealid; - } + using Math for uint256; + using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.WorkerpoolOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.RequestOrder; + + /*************************************************************************** + * ODB order signature * + ***************************************************************************/ + function verifySignature( + address _identity, + bytes32 _hash, + bytes calldata _signature + ) external view override returns (bool) { + return _verifySignature(_identity, _hash, _signature); + } + + function verifyPresignature( + address _identity, + bytes32 _hash + ) external view override returns (bool) { + return _verifyPresignature(_identity, _hash); + } + + function verifyPresignatureOrSignature( + address _identity, + bytes32 _hash, + bytes calldata _signature + ) external view override returns (bool) { + return _verifySignatureOrPresignature(_identity, _hash, _signature); + } + + /*************************************************************************** + * ODB order matching * + ***************************************************************************/ + /** + * Match orders. The requester gets debited. + * + * @param _apporder The app order. + * @param _datasetorder The dataset order. + * @param _workerpoolorder The workerpool order. + * @param _requestorder The requester order. + */ + function matchOrders( + IexecLibOrders_v5.AppOrder calldata _apporder, + IexecLibOrders_v5.DatasetOrder calldata _datasetorder, + IexecLibOrders_v5.WorkerpoolOrder calldata _workerpoolorder, + IexecLibOrders_v5.RequestOrder calldata _requestorder + ) external override returns (bytes32) { + return + _matchOrders( + _apporder, + _datasetorder, + _workerpoolorder, + _requestorder, + _requestorder.requester + ); + } + + /** + * Sponsor match orders for a requester. + * Unlike the standard `matchOrders(..)` hook where the requester pays for + * the deal, this current hook makes it possible for any `msg.sender` to pay for + * a third party requester. + * + * @notice Be aware that anyone seeing a valid request order on the network + * (via an off-chain public marketplace, via a `sponsorMatchOrders(..)` + * pending transaction in the mempool or by any other means) might decide + * to call the standard `matchOrders(..)` hook which will result in the + * requester being debited instead. Therefore, such a front run would result + * in a loss of some of the requester funds deposited in the iExec account + * (a loss value equivalent to the price of the deal). + * + * @param _apporder The app order. + * @param _datasetorder The dataset order. + * @param _workerpoolorder The workerpool order. + * @param _requestorder The requester order. + */ + function sponsorMatchOrders( + IexecLibOrders_v5.AppOrder calldata _apporder, + IexecLibOrders_v5.DatasetOrder calldata _datasetorder, + IexecLibOrders_v5.WorkerpoolOrder calldata _workerpoolorder, + IexecLibOrders_v5.RequestOrder calldata _requestorder + ) external override returns (bytes32) { + address sponsor = msg.sender; + bytes32 dealId = _matchOrders( + _apporder, + _datasetorder, + _workerpoolorder, + _requestorder, + sponsor + ); + emit DealSponsored(dealId, sponsor); + return dealId; + } + + /** + * Match orders and specify a sponsor in charge of paying for the deal. + * + * @param _apporder The app order. + * @param _datasetorder The dataset order. + * @param _workerpoolorder The workerpool order. + * @param _requestorder The requester order. + * @param _sponsor The sponsor in charge of paying the deal. + */ + function _matchOrders( + IexecLibOrders_v5.AppOrder calldata _apporder, + IexecLibOrders_v5.DatasetOrder calldata _datasetorder, + IexecLibOrders_v5.WorkerpoolOrder calldata _workerpoolorder, + IexecLibOrders_v5.RequestOrder calldata _requestorder, + address _sponsor + ) private returns (bytes32) { + /** + * Check orders compatibility + */ + + // computation environment & allowed enough funds + bytes32 tag = _apporder.tag | _datasetorder.tag | _requestorder.tag; + require(_requestorder.category == _workerpoolorder.category, "iExecV5-matchOrders-0x00"); + require(_requestorder.category < m_categories.length, "iExecV5-matchOrders-0x01"); + require(_requestorder.trust <= _workerpoolorder.trust, "iExecV5-matchOrders-0x02"); + require(_requestorder.appmaxprice >= _apporder.appprice, "iExecV5-matchOrders-0x03"); + require( + _requestorder.datasetmaxprice >= _datasetorder.datasetprice, + "iExecV5-matchOrders-0x04" + ); + require( + _requestorder.workerpoolmaxprice >= _workerpoolorder.workerpoolprice, + "iExecV5-matchOrders-0x05" + ); + require(tag & ~_workerpoolorder.tag == 0x0, "iExecV5-matchOrders-0x06"); + require((tag ^ _apporder.tag)[31] & 0x01 == 0x0, "iExecV5-matchOrders-0x07"); + + // Check matching and restrictions + require(_requestorder.app == _apporder.app, "iExecV5-matchOrders-0x10"); + require(_requestorder.dataset == _datasetorder.dataset, "iExecV5-matchOrders-0x11"); + require( + _isAccountAuthorizedByRestriction( + _requestorder.workerpool, + _workerpoolorder.workerpool + ), + "iExecV5-matchOrders-0x12" + ); // requestorder.workerpool is a restriction + require( + _isAccountAuthorizedByRestriction(_apporder.datasetrestrict, _datasetorder.dataset), + "iExecV5-matchOrders-0x13" + ); + require( + _isAccountAuthorizedByRestriction( + _apporder.workerpoolrestrict, + _workerpoolorder.workerpool + ), + "iExecV5-matchOrders-0x14" + ); + require( + _isAccountAuthorizedByRestriction(_apporder.requesterrestrict, _requestorder.requester), + "iExecV5-matchOrders-0x15" + ); + require( + _isAccountAuthorizedByRestriction(_datasetorder.apprestrict, _apporder.app), + "iExecV5-matchOrders-0x16" + ); + require( + _isAccountAuthorizedByRestriction( + _datasetorder.workerpoolrestrict, + _workerpoolorder.workerpool + ), + "iExecV5-matchOrders-0x17" + ); + require( + _isAccountAuthorizedByRestriction( + _datasetorder.requesterrestrict, + _requestorder.requester + ), + "iExecV5-matchOrders-0x18" + ); + require( + _isAccountAuthorizedByRestriction(_workerpoolorder.apprestrict, _apporder.app), + "iExecV5-matchOrders-0x19" + ); + require( + _isAccountAuthorizedByRestriction( + _workerpoolorder.datasetrestrict, + _datasetorder.dataset + ), + "iExecV5-matchOrders-0x1a" + ); + require( + _isAccountAuthorizedByRestriction( + _workerpoolorder.requesterrestrict, + _requestorder.requester + ), + "iExecV5-matchOrders-0x1b" + ); + + /** + * Check orders authenticity + */ + //slither-disable-next-line uninitialized-local + Matching memory ids; + ids.hasDataset = _datasetorder.dataset != address(0); + + // app + ids.apporderHash = _toTypedDataHash(_apporder.hash()); + ids.appOwner = IERC5313(_apporder.app).owner(); + + require(m_appregistry.isRegistered(_apporder.app), "iExecV5-matchOrders-0x20"); + require( + _verifySignatureOrPresignature(ids.appOwner, ids.apporderHash, _apporder.sign), + "iExecV5-matchOrders-0x21" + ); + + // dataset + if (ids.hasDataset) { + // only check if dataset is enabled + ids.datasetorderHash = _toTypedDataHash(_datasetorder.hash()); + ids.datasetOwner = IERC5313(_datasetorder.dataset).owner(); + + require( + m_datasetregistry.isRegistered(_datasetorder.dataset), + "iExecV5-matchOrders-0x30" + ); + require( + _verifySignatureOrPresignature( + ids.datasetOwner, + ids.datasetorderHash, + _datasetorder.sign + ), + "iExecV5-matchOrders-0x31" + ); + } + + // workerpool + ids.workerpoolorderHash = _toTypedDataHash(_workerpoolorder.hash()); + ids.workerpoolOwner = IERC5313(_workerpoolorder.workerpool).owner(); + + require( + m_workerpoolregistry.isRegistered(_workerpoolorder.workerpool), + "iExecV5-matchOrders-0x40" + ); + require( + _verifySignatureOrPresignature( + ids.workerpoolOwner, + ids.workerpoolorderHash, + _workerpoolorder.sign + ), + "iExecV5-matchOrders-0x41" + ); + + // request + ids.requestorderHash = _toTypedDataHash(_requestorder.hash()); + require( + _verifySignatureOrPresignature( + _requestorder.requester, + ids.requestorderHash, + _requestorder.sign + ), + "iExecV5-matchOrders-0x50" + ); + + /** + * Check availability + */ + uint256 volume = _computeDealVolume( + _apporder.volume, + ids.apporderHash, + ids.hasDataset, + _datasetorder.volume, + ids.datasetorderHash, + _workerpoolorder.volume, + ids.workerpoolorderHash, + _requestorder.volume, + ids.requestorderHash + ); + require(volume > 0, "iExecV5-matchOrders-0x60"); + + /** + * Record + */ + bytes32 dealid = keccak256( + abi.encodePacked( + ids.requestorderHash, // requestHash + m_consumed[ids.requestorderHash] // idx of first subtask + ) + ); + + IexecLibCore_v5.Deal storage deal = m_deals[dealid]; + deal.app.pointer = _apporder.app; + deal.app.owner = ids.appOwner; + deal.app.price = _apporder.appprice; + deal.dataset.owner = ids.datasetOwner; + deal.dataset.pointer = _datasetorder.dataset; + deal.dataset.price = ids.hasDataset ? _datasetorder.datasetprice : 0; + deal.workerpool.pointer = _workerpoolorder.workerpool; + deal.workerpool.owner = ids.workerpoolOwner; + deal.workerpool.price = _workerpoolorder.workerpoolprice; + deal.trust = _requestorder.trust.max(1); + deal.category = _requestorder.category; + deal.tag = tag; + deal.requester = _requestorder.requester; + deal.beneficiary = _requestorder.beneficiary; + deal.callback = _requestorder.callback; + deal.params = _requestorder.params; + deal.startTime = block.timestamp; + deal.botFirst = m_consumed[ids.requestorderHash]; + deal.botSize = volume; + deal.workerStake = + (_workerpoolorder.workerpoolprice * + IWorkerpool(_workerpoolorder.workerpool).m_workerStakeRatioPolicy()) / + 100; + deal.schedulerRewardRatio = IWorkerpool(_workerpoolorder.workerpool) + .m_schedulerRewardRatioPolicy(); + deal.sponsor = _sponsor; + + /** + * Update consumed + */ + m_consumed[ids.apporderHash] = m_consumed[ids.apporderHash] + volume; + m_consumed[ids.datasetorderHash] = + m_consumed[ids.datasetorderHash] + + (ids.hasDataset ? volume : 0); + m_consumed[ids.workerpoolorderHash] = m_consumed[ids.workerpoolorderHash] + volume; + m_consumed[ids.requestorderHash] = m_consumed[ids.requestorderHash] + volume; + + /** + * Lock + */ + lock(_sponsor, (deal.app.price + deal.dataset.price + deal.workerpool.price) * volume); + //slither-disable-next-line divide-before-multiply + lock( + deal.workerpool.owner, + ((deal.workerpool.price * WORKERPOOL_STAKE_RATIO) / 100) * volume // ORDER IS IMPORTANT HERE! + ); + + /** + * Advertize deal + */ + emit SchedulerNotice(deal.workerpool.pointer, dealid); + + /** + * Advertize consumption + */ + emit OrdersMatched( + dealid, + ids.apporderHash, + ids.datasetorderHash, + ids.workerpoolorderHash, + ids.requestorderHash, + volume + ); + + return dealid; + } } diff --git a/contracts/modules/delegates/IexecPoco1DelegateKYC.sol b/contracts/modules/delegates/IexecPoco1DelegateKYC.sol deleted file mode 100644 index 71b3851e0..000000000 --- a/contracts/modules/delegates/IexecPoco1DelegateKYC.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -pragma solidity ^0.6.0; -pragma experimental ABIEncoderV2; - -import "./IexecPoco1Delegate.sol"; -import "./IexecERC20CoreKYC.sol"; - - -contract IexecPoco1DelegateKYC is IexecPoco1Delegate, IexecERC20CoreKYC -{ - function _beforeTokenTransfer(address from, address to, uint256 amount) - internal virtual override(IexecERC20Core, IexecERC20CoreKYC) - { - IexecERC20CoreKYC._beforeTokenTransfer(from, to, amount); - } - - function _isAuthorized(address account) - internal virtual override(IexecERC20Core, IexecERC20CoreKYC) returns (bool) - { - return IexecERC20CoreKYC._isAuthorized(account); - } -} diff --git a/contracts/modules/delegates/IexecPoco2Delegate.sol b/contracts/modules/delegates/IexecPoco2Delegate.sol index 36d4d2ffe..33aeecec4 100644 --- a/contracts/modules/delegates/IexecPoco2Delegate.sol +++ b/contracts/modules/delegates/IexecPoco2Delegate.sol @@ -1,598 +1,558 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH // SPDX-License-Identifier: Apache-2.0 -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -pragma solidity ^0.6.0; -pragma experimental ABIEncoderV2; - -import "@iexec/solidity/contracts/ERC1154/IERC1154.sol"; -import "./IexecERC20Core.sol"; -import "./SignatureVerifier.sol"; -import "../DelegateBase.sol"; -import "../interfaces/IexecPoco2.sol"; - - -contract IexecPoco2Delegate is IexecPoco2, DelegateBase, IexecERC20Core, SignatureVerifier -{ - /*************************************************************************** - * Escrow overhead for contribution * - ***************************************************************************/ - function successWork(bytes32 _dealid, bytes32 _taskid) - internal - { - IexecLibCore_v5.Deal storage deal = m_deals[_dealid]; - - uint256 requesterstake = deal.app.price - .add(deal.dataset.price) - .add(deal.workerpool.price); - uint256 poolstake = deal.workerpool.price - .percentage(WORKERPOOL_STAKE_RATIO); - - // seize requester funds - seize(deal.requester, requesterstake, _taskid); - // dapp reward - if (deal.app.price > 0) - { - reward(deal.app.owner, deal.app.price, _taskid); - } - // data reward - if (deal.dataset.price > 0 && deal.dataset.pointer != address(0)) - { - reward(deal.dataset.owner, deal.dataset.price, _taskid); - } - // unlock pool stake - unlock(deal.workerpool.owner, poolstake); - // pool reward performed by consensus manager - - /** - * Retrieve part of the kitty - */ - uint256 kitty = m_frozens[KITTY_ADDRESS]; - if (kitty > 0) - { - kitty = kitty - .percentage(KITTY_RATIO) // fraction - .max(KITTY_MIN) // at least this - .min(kitty); // but not more than available - seize (KITTY_ADDRESS, kitty, _taskid); - reward(deal.workerpool.owner, kitty, _taskid); - } - } - - function failedWork(bytes32 _dealid, bytes32 _taskid) - internal - { - IexecLibCore_v5.Deal memory deal = m_deals[_dealid]; - - uint256 requesterstake = deal.app.price - .add(deal.dataset.price) - .add(deal.workerpool.price); - uint256 poolstake = deal.workerpool.price - .percentage(WORKERPOOL_STAKE_RATIO); - - unlock(deal.requester, requesterstake ); - seize (deal.workerpool.owner, poolstake, _taskid); - reward(KITTY_ADDRESS, poolstake, _taskid); // โ†’ Kitty / Burn - lock (KITTY_ADDRESS, poolstake ); // โ†’ Kitty / Burn - } - - /*************************************************************************** - * Consensus methods * - ***************************************************************************/ - function initialize(bytes32 _dealid, uint256 idx) - public override returns (bytes32) - { - IexecLibCore_v5.Deal memory deal = m_deals[_dealid]; - - require(idx >= deal.botFirst ); - require(idx < deal.botFirst.add(deal.botSize)); - - bytes32 taskid = keccak256(abi.encodePacked(_dealid, idx)); - IexecLibCore_v5.Task storage task = m_tasks[taskid]; - require(task.status == IexecLibCore_v5.TaskStatusEnum.UNSET); - - task.status = IexecLibCore_v5.TaskStatusEnum.ACTIVE; - task.dealid = _dealid; - task.idx = idx; - task.timeref = m_categories[deal.category].workClockTimeRef; - task.contributionDeadline = task.timeref.mul(CONTRIBUTION_DEADLINE_RATIO).add(deal.startTime); - task.finalDeadline = task.timeref.mul( FINAL_DEADLINE_RATIO).add(deal.startTime); - - // setup denominator - m_consensus[taskid].total = 1; - - emit TaskInitialize(taskid, deal.workerpool.pointer); - - return taskid; - } - // TODO / COMPILER ERROR: making it external causes "stack too deep" error - function contribute( - bytes32 _taskid, - bytes32 _resultHash, - bytes32 _resultSeal, - address _enclaveChallenge, - bytes memory _enclaveSign, - bytes memory _authorizationSign) - public override - { - require(_isAuthorized(_msgSender())); - - IexecLibCore_v5.Task storage task = m_tasks[_taskid]; - IexecLibCore_v5.Contribution storage contribution = m_contributions[_taskid][_msgSender()]; - IexecLibCore_v5.Deal memory deal = m_deals[task.dealid]; - - require(task.status == IexecLibCore_v5.TaskStatusEnum.ACTIVE ); - require(task.contributionDeadline > now ); - require(contribution.status == IexecLibCore_v5.ContributionStatusEnum.UNSET); - - // need enclave challenge if tag is set - require(_enclaveChallenge != address(0) || (deal.tag[31] & 0x01 == 0)); - - // Check that the worker + taskid + enclave combo is authorized to contribute (scheduler signature) - require(_checkSignature( - ( _enclaveChallenge != address(0) && m_teebroker != address(0) ) ? m_teebroker : deal.workerpool.owner, - _toEthSignedMessage(keccak256(abi.encodePacked( - _msgSender(), - _taskid, - _enclaveChallenge - ))), - _authorizationSign - )); - - // Check enclave signature - require(_enclaveChallenge == address(0) || _checkSignature( - _enclaveChallenge, - _toEthSignedMessage(keccak256(abi.encodePacked( - _resultHash, - _resultSeal - ))), - _enclaveSign - )); - - // Update contribution entry - contribution.status = IexecLibCore_v5.ContributionStatusEnum.CONTRIBUTED; - contribution.resultHash = _resultHash; - contribution.resultSeal = _resultSeal; - contribution.enclaveChallenge = _enclaveChallenge; - task.contributors.push(_msgSender()); - - lockContribution(task.dealid, _msgSender()); - - emit TaskContribute(_taskid, _msgSender(), _resultHash); - - // Contribution done โ†’ updating and checking consensus - - /************************************************************************* - * SCORE POLICY 1/3 * - * * - * see documentation! * - *************************************************************************/ - // k = 3 - IexecLibCore_v5.Consensus storage consensus = m_consensus[_taskid]; - - uint256 weight = m_workerScores[_msgSender()].div(3).max(3).sub(1); - uint256 group = consensus.group[_resultHash]; - uint256 delta = group.max(1).mul(weight).sub(group); - - contribution.weight = weight.log(); - consensus.group[_resultHash] = consensus.group[_resultHash].add(delta); - consensus.total = consensus.total.add(delta); - - // Check consensus - checkConsensus(_taskid, _resultHash); - } - - // TODO / COMPILER ERROR: making it external causes "stack too deep" error - function contributeAndFinalize( - bytes32 _taskid, - bytes32 _resultDigest, - bytes memory _results, - bytes memory _resultsCallback, // Expansion - result separation - address _enclaveChallenge, - bytes memory _enclaveSign, - bytes memory _authorizationSign) - public override - { - require(_isAuthorized(_msgSender())); - - IexecLibCore_v5.Task storage task = m_tasks[_taskid]; - IexecLibCore_v5.Contribution storage contribution = m_contributions[_taskid][_msgSender()]; - IexecLibCore_v5.Deal memory deal = m_deals[task.dealid]; - - require(task.status == IexecLibCore_v5.TaskStatusEnum.ACTIVE); - require(task.contributionDeadline > now ); - require(task.contributors.length == 0 ); - require(deal.trust == 1 ); // TODO / FUTURE FEATURE: consider sender's score ? - - bytes32 resultHash = keccak256(abi.encodePacked( _taskid, _resultDigest)); - bytes32 resultSeal = keccak256(abi.encodePacked(_msgSender(), _taskid, _resultDigest)); - - require((deal.callback == address(0) && _resultsCallback.length == 0) || keccak256(_resultsCallback) == task.resultDigest); - - // need enclave challenge if tag is set - require(_enclaveChallenge != address(0) || (deal.tag[31] & 0x01 == 0)); - - // Check that the worker + taskid + enclave combo is authorized to contribute (scheduler signature) - require(_checkSignature( - ( _enclaveChallenge != address(0) && m_teebroker != address(0) ) ? m_teebroker : deal.workerpool.owner, - _toEthSignedMessage(keccak256(abi.encodePacked( - _msgSender(), - _taskid, - _enclaveChallenge - ))), - _authorizationSign - )); - - // Check enclave signature - require(_enclaveChallenge == address(0) || _checkSignature( - _enclaveChallenge, - _toEthSignedMessage(keccak256(abi.encodePacked( - resultHash, - resultSeal - ))), - _enclaveSign - )); - - contribution.status = IexecLibCore_v5.ContributionStatusEnum.PROVED; - contribution.resultHash = resultHash; - contribution.resultSeal = resultSeal; - contribution.enclaveChallenge = _enclaveChallenge; - - task.status = IexecLibCore_v5.TaskStatusEnum.COMPLETED; - task.consensusValue = contribution.resultHash; - task.revealDeadline = task.timeref.mul(REVEAL_DEADLINE_RATIO).add(now); - task.revealCounter = 1; - task.winnerCounter = 1; - task.resultDigest = _resultDigest; - task.results = _results; - task.resultsCallback = _resultsCallback; // Expansion - result separation - task.contributors.push(_msgSender()); - - successWork(task.dealid, _taskid); - distributeRewardsFast(_taskid); - - emit TaskContribute(_taskid, _msgSender(), resultHash); - emit TaskConsensus(_taskid, resultHash); - emit TaskReveal(_taskid, _msgSender(), _resultDigest); - emit TaskFinalize(_taskid, _results); - - executeCallback(_taskid, _resultsCallback); - } - - function reveal( - bytes32 _taskid, - bytes32 _resultDigest) - external override // worker - { - IexecLibCore_v5.Task storage task = m_tasks[_taskid]; - IexecLibCore_v5.Contribution storage contribution = m_contributions[_taskid][_msgSender()]; - require(task.status == IexecLibCore_v5.TaskStatusEnum.REVEALING ); - require(task.revealDeadline > now ); - require(contribution.status == IexecLibCore_v5.ContributionStatusEnum.CONTRIBUTED ); - require(contribution.resultHash == task.consensusValue ); - require(contribution.resultHash == keccak256(abi.encodePacked( _taskid, _resultDigest))); - require(contribution.resultSeal == keccak256(abi.encodePacked(_msgSender(), _taskid, _resultDigest))); - - contribution.status = IexecLibCore_v5.ContributionStatusEnum.PROVED; - task.revealCounter = task.revealCounter.add(1); - task.resultDigest = _resultDigest; - - emit TaskReveal(_taskid, _msgSender(), _resultDigest); - } - - function reopen( - bytes32 _taskid) - external override onlyScheduler(_taskid) - { - IexecLibCore_v5.Task storage task = m_tasks[_taskid]; - require(task.status == IexecLibCore_v5.TaskStatusEnum.REVEALING); - require(task.finalDeadline > now ); - require(task.revealDeadline <= now && task.revealCounter == 0 ); - - for (uint256 i = 0; i < task.contributors.length; ++i) - { - address worker = task.contributors[i]; - if (m_contributions[_taskid][worker].resultHash == task.consensusValue) - { - m_contributions[_taskid][worker].status = IexecLibCore_v5.ContributionStatusEnum.REJECTED; - } - } - - IexecLibCore_v5.Consensus storage consensus = m_consensus[_taskid]; - consensus.total = consensus.total.sub(consensus.group[task.consensusValue]); - consensus.group[task.consensusValue] = 0; - - task.status = IexecLibCore_v5.TaskStatusEnum.ACTIVE; - task.consensusValue = 0x0; - task.revealDeadline = 0; - task.winnerCounter = 0; - - emit TaskReopen(_taskid); - } - - function finalize( - bytes32 _taskid, - bytes calldata _results, - bytes calldata _resultsCallback) // Expansion - result separation - external override onlyScheduler(_taskid) - { - IexecLibCore_v5.Task storage task = m_tasks[_taskid]; - IexecLibCore_v5.Deal memory deal = m_deals[task.dealid]; - - require(task.status == IexecLibCore_v5.TaskStatusEnum.REVEALING ); - require(task.finalDeadline > now ); - require(task.revealCounter == task.winnerCounter || (task.revealCounter > 0 && task.revealDeadline <= now)); - - require((deal.callback == address(0) && _resultsCallback.length == 0) || keccak256(_resultsCallback) == task.resultDigest); - - task.status = IexecLibCore_v5.TaskStatusEnum.COMPLETED; - task.results = _results; - task.resultsCallback = _resultsCallback; // Expansion - result separation - - /** - * Stake and reward management - */ - successWork(task.dealid, _taskid); - distributeRewards(_taskid); - - /** - * Event - */ - emit TaskFinalize(_taskid, _results); - - executeCallback(_taskid, _resultsCallback); - } - - function claim( - bytes32 _taskid) - public override - { - IexecLibCore_v5.Task storage task = m_tasks[_taskid]; - require(task.status == IexecLibCore_v5.TaskStatusEnum.ACTIVE - || task.status == IexecLibCore_v5.TaskStatusEnum.REVEALING); - require(task.finalDeadline <= now); - - task.status = IexecLibCore_v5.TaskStatusEnum.FAILED; - - /** - * Stake management - */ - failedWork(task.dealid, _taskid); - for (uint256 i = 0; i < task.contributors.length; ++i) - { - address worker = task.contributors[i]; - unlockContribution(task.dealid, worker); - } - - emit TaskClaimed(_taskid); - } - - /*************************************************************************** - * Internal Consensus methods * - ***************************************************************************/ - /* - * Consensus detection - */ - function checkConsensus( - bytes32 _taskid, - bytes32 _consensus) - internal - { - IexecLibCore_v5.Task storage task = m_tasks[_taskid]; - IexecLibCore_v5.Consensus storage consensus = m_consensus[_taskid]; - - uint256 trust = m_deals[task.dealid].trust; - /************************************************************************* - * Consensus detection * - * * - * see documentation: * - * ./ audit/docs/iExec_PoCo_and_trustmanagement_v1.pdf * - *************************************************************************/ - if (consensus.group[_consensus].mul(trust) > consensus.total.mul(trust.sub(1))) - { - // Preliminary checks done in "contribute()" - uint256 winnerCounter = 0; - for (uint256 i = 0; i < task.contributors.length; ++i) - { - address w = task.contributors[i]; - if - ( - m_contributions[_taskid][w].resultHash == _consensus - && - m_contributions[_taskid][w].status == IexecLibCore_v5.ContributionStatusEnum.CONTRIBUTED // REJECTED contribution must not be count - ) - { - winnerCounter = winnerCounter.add(1); - } - } - // _msgSender() is a contributor: no need to check - task.status = IexecLibCore_v5.TaskStatusEnum.REVEALING; - task.consensusValue = _consensus; - task.revealDeadline = task.timeref.mul(REVEAL_DEADLINE_RATIO).add(now); - task.revealCounter = 0; - task.winnerCounter = winnerCounter; - - emit TaskConsensus(_taskid, _consensus); - } - } - - /* - * Reward distribution - */ - function distributeRewards(bytes32 _taskid) - internal - { - IexecLibCore_v5.Task memory task = m_tasks[_taskid]; - IexecLibCore_v5.Deal memory deal = m_deals[task.dealid]; - - uint256 totalLogWeight = 0; - uint256 totalReward = deal.workerpool.price; - - for (uint256 i = 0; i < task.contributors.length; ++i) - { - address worker = task.contributors[i]; - IexecLibCore_v5.Contribution storage contribution = m_contributions[_taskid][worker]; - - if (contribution.status == IexecLibCore_v5.ContributionStatusEnum.PROVED) - { - totalLogWeight = totalLogWeight.add(contribution.weight); - } - else // ContributionStatusEnum.REJECT or ContributionStatusEnum.CONTRIBUTED (not revealed) - { - totalReward = totalReward.add(deal.workerStake); - } - } - - // compute how much is going to the workers - uint256 workersReward = totalReward.percentage(uint256(100).sub(deal.schedulerRewardRatio)); - - for (uint256 i = 0; i < task.contributors.length; ++i) - { - address worker = task.contributors[i]; - IexecLibCore_v5.Contribution storage contribution = m_contributions[_taskid][worker]; - - if (contribution.status == IexecLibCore_v5.ContributionStatusEnum.PROVED) - { - uint256 workerReward = workersReward.mulByFraction(contribution.weight, totalLogWeight); - totalReward = totalReward.sub(workerReward); - - unlockContribution(task.dealid, worker); - rewardForContribution(worker, workerReward, _taskid); - - // Only reward if replication happened - if (task.contributors.length > 1) - { - /******************************************************************* - * SCORE POLICY 2/3 * - * * - * see documentation! * - *******************************************************************/ - m_workerScores[worker] = m_workerScores[worker].add(1); - emit AccurateContribution(worker, _taskid); - } - } - else // WorkStatusEnum.POCO_REJECT or ContributionStatusEnum.CONTRIBUTED (not revealed) - { - // No Reward - seizeContribution(task.dealid, worker, _taskid); - - // Always punish bad contributors - { - /******************************************************************* - * SCORE POLICY 3/3 * - * * - * see documentation! * - *******************************************************************/ - // k = 3 - m_workerScores[worker] = m_workerScores[worker].mulByFraction(2,3); - emit FaultyContribution(worker, _taskid); - } - } - } - // totalReward now contains the scheduler share - rewardForScheduling(task.dealid, totalReward, _taskid); - } - - /* - * Reward distribution for contributeAndFinalize - */ - function distributeRewardsFast(bytes32 _taskid) - internal - { - IexecLibCore_v5.Task memory task = m_tasks[_taskid]; - IexecLibCore_v5.Deal memory deal = m_deals[task.dealid]; - - // simple reward, no score consideration - uint256 workerReward = deal.workerpool.price.percentage(uint256(100).sub(deal.schedulerRewardRatio)); - uint256 schedulerReward = deal.workerpool.price.sub(workerReward); - rewardForContribution(_msgSender(), workerReward, _taskid); - rewardForScheduling(task.dealid, schedulerReward, _taskid); - } - - /** - * Callback for smartcontracts using EIP1154 - */ - function executeCallback(bytes32 _taskid, bytes memory _resultsCallback) - internal - { - address target = m_deals[m_tasks[_taskid].dealid].callback; - if (target != address(0)) - { - // Solidity 0.6.0 reverts if target is not a smartcontracts - // /** - // * Call does not revert if the target smart contract is incompatible or reverts - // * Solidity 0.6.0 update. Check hit history for 0.5.0 implementation. - // */ - // try IOracleConsumer(target).receiveResult{gas: m_callbackgas}(_taskid, _results) - // { - // // Callback success, do nothing - // } - // catch (bytes memory /*lowLevelData*/) - // { - // // Check gas: https://ronan.eth.link/blog/ethereum-gas-dangers/ - // assert(gasleft() > m_callbackgas / 63); // no need for safemath here - // } - - // Pre solidity 0.6.0 version - (bool success, bytes memory returndata) = target.call{gas: m_callbackgas}(abi.encodeWithSignature("receiveResult(bytes32,bytes)", _taskid, _resultsCallback)); - assert(gasleft() > m_callbackgas / 63); - // silent unused variable warning - success; - returndata; - } - } - - /*************************************************************************** - * Array operations * - ***************************************************************************/ - function initializeArray( - bytes32[] calldata _dealid, - uint256[] calldata _idx) - external override returns (bool) - { - require(_dealid.length == _idx.length); - for (uint i = 0; i < _dealid.length; ++i) - { - initialize(_dealid[i], _idx[i]); - } - return true; - } - - function claimArray( - bytes32[] calldata _taskid) - external override returns (bool) - { - for (uint i = 0; i < _taskid.length; ++i) - { - claim(_taskid[i]); - } - return true; - } - - function initializeAndClaimArray( - bytes32[] calldata _dealid, - uint256[] calldata _idx) - external override returns (bool) - { - require(_dealid.length == _idx.length); - for (uint i = 0; i < _dealid.length; ++i) - { - claim(initialize(_dealid[i], _idx[i])); - } - return true; - } +pragma solidity ^0.8.0; + +import {Math} from "@openzeppelin/contracts-v5/utils/math/Math.sol"; +import {IOracleConsumer} from "../../external/interfaces/IOracleConsumer.sol"; +import {IexecLibCore_v5} from "../../libs/IexecLibCore_v5.sol"; +import {IexecLibOrders_v5} from "../../libs/IexecLibOrders_v5.sol"; +import {DelegateBase} from "../DelegateBase.v8.sol"; +import {IexecPoco2} from "../interfaces/IexecPoco2.v8.sol"; +import {IexecEscrow} from "./IexecEscrow.v8.sol"; +import {SignatureVerifier} from "./SignatureVerifier.v8.sol"; + +// TODO: Revert with custom errors + +contract IexecPoco2Delegate is IexecPoco2, DelegateBase, IexecEscrow, SignatureVerifier { + modifier onlyScheduler(bytes32 _taskId) { + require(_msgSender() == m_deals[m_tasks[_taskId].dealid].workerpool.owner); + _; + } + + /*************************************************************************** + * Escrow overhead for contribution * + ***************************************************************************/ + function successWork(bytes32 _dealid, bytes32 _taskid) internal { + IexecLibCore_v5.Deal storage deal = m_deals[_dealid]; + + uint256 taskPrice = deal.app.price + deal.dataset.price + deal.workerpool.price; + uint256 poolstake = (deal.workerpool.price * WORKERPOOL_STAKE_RATIO) / 100; + + // Seize the payer of the task + seize(deal.sponsor, taskPrice, _taskid); + // dapp reward + if (deal.app.price > 0) { + reward(deal.app.owner, deal.app.price, _taskid); + } + // data reward + if (deal.dataset.price > 0 && deal.dataset.pointer != address(0)) { + reward(deal.dataset.owner, deal.dataset.price, _taskid); + } + // unlock pool stake + unlock(deal.workerpool.owner, poolstake); + // pool reward performed by consensus manager + + // Retrieve part of the kitty + uint256 kitty = m_frozens[KITTY_ADDRESS]; + if (kitty > 0) { + // Get a fraction of the kitty where KITTY_MIN <= fraction <= kitty + kitty = Math.min(Math.max((kitty * KITTY_RATIO) / 100, KITTY_MIN), kitty); + seize(KITTY_ADDRESS, kitty, _taskid); + reward(deal.workerpool.owner, kitty, _taskid); + } + } + + function failedWork(bytes32 _dealid, bytes32 _taskid) internal { + IexecLibCore_v5.Deal memory deal = m_deals[_dealid]; + + uint256 taskPrice = deal.app.price + deal.dataset.price + deal.workerpool.price; + uint256 poolstake = (deal.workerpool.price * WORKERPOOL_STAKE_RATIO) / 100; + + unlock(deal.sponsor, taskPrice); // Refund the payer of the task + seize(deal.workerpool.owner, poolstake, _taskid); + reward(KITTY_ADDRESS, poolstake, _taskid); // โ†’ Kitty / Burn + lock(KITTY_ADDRESS, poolstake); // โ†’ Kitty / Burn + } + + /*************************************************************************** + * Consensus methods * + ***************************************************************************/ + function initialize(bytes32 _dealid, uint256 idx) public override returns (bytes32) { + IexecLibCore_v5.Deal memory deal = m_deals[_dealid]; + + require(idx >= deal.botFirst); + require(idx < deal.botFirst + deal.botSize); + + bytes32 taskid = keccak256(abi.encodePacked(_dealid, idx)); + IexecLibCore_v5.Task storage task = m_tasks[taskid]; + require(task.status == IexecLibCore_v5.TaskStatusEnum.UNSET); + + task.status = IexecLibCore_v5.TaskStatusEnum.ACTIVE; + task.dealid = _dealid; + task.idx = idx; + task.timeref = m_categories[deal.category].workClockTimeRef; + task.contributionDeadline = deal.startTime + task.timeref * CONTRIBUTION_DEADLINE_RATIO; + task.finalDeadline = deal.startTime + task.timeref * FINAL_DEADLINE_RATIO; + + // setup denominator + m_consensus[taskid].total = 1; + + emit TaskInitialize(taskid, deal.workerpool.pointer); + + return taskid; + } + + // TODO / COMPILER ERROR: making it external causes "stack too deep" error + function contribute( + bytes32 _taskid, + bytes32 _resultHash, + bytes32 _resultSeal, + address _enclaveChallenge, + bytes calldata _enclaveSign, + bytes calldata _authorizationSign + ) external override { + IexecLibCore_v5.Task storage task = m_tasks[_taskid]; + IexecLibCore_v5.Contribution storage contribution = m_contributions[_taskid][_msgSender()]; + IexecLibCore_v5.Deal memory deal = m_deals[task.dealid]; + + require(task.status == IexecLibCore_v5.TaskStatusEnum.ACTIVE); + require(task.contributionDeadline > block.timestamp); + require(contribution.status == IexecLibCore_v5.ContributionStatusEnum.UNSET); + + // need enclave challenge if tag is set + require(_enclaveChallenge != address(0) || (deal.tag[31] & 0x01 == 0)); + + // Check that the worker + taskid + enclave combo is authorized to contribute (scheduler signature) + require( + _verifySignatureOfEthSignedMessage( + (_enclaveChallenge != address(0) && m_teebroker != address(0)) + ? m_teebroker + : deal.workerpool.owner, + abi.encodePacked(_msgSender(), _taskid, _enclaveChallenge), + _authorizationSign + ) + ); + + // Check enclave signature + require( + _enclaveChallenge == address(0) || + _verifySignatureOfEthSignedMessage( + _enclaveChallenge, + abi.encodePacked(_resultHash, _resultSeal), + _enclaveSign + ) + ); + + // Update contribution entry + contribution.status = IexecLibCore_v5.ContributionStatusEnum.CONTRIBUTED; + contribution.resultHash = _resultHash; + contribution.resultSeal = _resultSeal; + contribution.enclaveChallenge = _enclaveChallenge; + task.contributors.push(_msgSender()); + + // Lock contribution. + lock(_msgSender(), deal.workerStake); + + emit TaskContribute(_taskid, _msgSender(), _resultHash); + + // Contribution done โ†’ updating and checking consensus + + /************************************************************************* + * SCORE POLICY 1/3 * + * * + * see documentation! * + *************************************************************************/ + // k = 3 + IexecLibCore_v5.Consensus storage consensus = m_consensus[_taskid]; + + uint256 weight = Math.max(m_workerScores[_msgSender()] / 3, 3) - 1; + uint256 group = consensus.group[_resultHash]; + uint256 delta = Math.max(group, 1) * weight - group; + + contribution.weight = Math.log2(weight); + consensus.group[_resultHash] = consensus.group[_resultHash] + delta; + consensus.total = consensus.total + delta; + + // Check consensus + checkConsensus(_taskid, _resultHash); + } + + // TODO / COMPILER ERROR: making it external causes "stack too deep" error + function contributeAndFinalize( + bytes32 _taskid, + bytes32 _resultDigest, + bytes calldata _results, + bytes calldata _resultsCallback, // Expansion - result separation + address _enclaveChallenge, + bytes calldata _enclaveSign, + bytes calldata _authorizationSign + ) external override { + IexecLibCore_v5.Task storage task = m_tasks[_taskid]; + IexecLibCore_v5.Contribution storage contribution = m_contributions[_taskid][_msgSender()]; + IexecLibCore_v5.Deal memory deal = m_deals[task.dealid]; + + require(task.status == IexecLibCore_v5.TaskStatusEnum.ACTIVE); + require(task.contributionDeadline > block.timestamp); + require(task.contributors.length == 0); + require(deal.trust == 1); // TODO / FUTURE FEATURE: consider sender's score ? + + bytes32 resultHash = keccak256(abi.encodePacked(_taskid, _resultDigest)); + bytes32 resultSeal = keccak256(abi.encodePacked(_msgSender(), _taskid, _resultDigest)); + + require( + (deal.callback == address(0) && _resultsCallback.length == 0) || + keccak256(_resultsCallback) == _resultDigest + ); + + // need enclave challenge if tag is set + require(_enclaveChallenge != address(0) || (deal.tag[31] & 0x01 == 0)); + + // Check that the worker + taskid + enclave combo is authorized to contribute (scheduler signature) + require( + _verifySignatureOfEthSignedMessage( + (_enclaveChallenge != address(0) && m_teebroker != address(0)) + ? m_teebroker + : deal.workerpool.owner, + abi.encodePacked(_msgSender(), _taskid, _enclaveChallenge), + _authorizationSign + ) + ); + + // Check enclave signature + require( + _enclaveChallenge == address(0) || + _verifySignatureOfEthSignedMessage( + _enclaveChallenge, + abi.encodePacked(resultHash, resultSeal), + _enclaveSign + ) + ); + + contribution.status = IexecLibCore_v5.ContributionStatusEnum.PROVED; + contribution.resultHash = resultHash; + contribution.resultSeal = resultSeal; + contribution.enclaveChallenge = _enclaveChallenge; + + task.status = IexecLibCore_v5.TaskStatusEnum.COMPLETED; + task.consensusValue = contribution.resultHash; + task.revealDeadline = block.timestamp + task.timeref * REVEAL_DEADLINE_RATIO; + task.revealCounter = 1; + task.winnerCounter = 1; + task.resultDigest = _resultDigest; + task.results = _results; + task.resultsCallback = _resultsCallback; // Expansion - result separation + task.contributors.push(_msgSender()); + + successWork(task.dealid, _taskid); + distributeRewardsFast(_taskid); + + emit TaskContribute(_taskid, _msgSender(), resultHash); + emit TaskConsensus(_taskid, resultHash); + emit TaskReveal(_taskid, _msgSender(), _resultDigest); + emit TaskFinalize(_taskid, _results); + + executeCallback(_taskid, _resultsCallback); + } + + function reveal(bytes32 _taskid, bytes32 _resultDigest) external override { + IexecLibCore_v5.Task storage task = m_tasks[_taskid]; + IexecLibCore_v5.Contribution storage contribution = m_contributions[_taskid][_msgSender()]; + require(task.status == IexecLibCore_v5.TaskStatusEnum.REVEALING); + require(task.revealDeadline > block.timestamp); + require(contribution.status == IexecLibCore_v5.ContributionStatusEnum.CONTRIBUTED); + require(contribution.resultHash == task.consensusValue); + require(contribution.resultHash == keccak256(abi.encodePacked(_taskid, _resultDigest))); + require( + contribution.resultSeal == + keccak256(abi.encodePacked(_msgSender(), _taskid, _resultDigest)) + ); + + contribution.status = IexecLibCore_v5.ContributionStatusEnum.PROVED; + task.revealCounter = task.revealCounter + 1; + task.resultDigest = _resultDigest; + + emit TaskReveal(_taskid, _msgSender(), _resultDigest); + } + + function reopen(bytes32 _taskid) external override onlyScheduler(_taskid) { + IexecLibCore_v5.Task storage task = m_tasks[_taskid]; + require(task.status == IexecLibCore_v5.TaskStatusEnum.REVEALING); + require(task.finalDeadline > block.timestamp); + require(task.revealDeadline <= block.timestamp && task.revealCounter == 0); + + for (uint256 i = 0; i < task.contributors.length; ++i) { + address worker = task.contributors[i]; + if (m_contributions[_taskid][worker].resultHash == task.consensusValue) { + m_contributions[_taskid][worker].status = IexecLibCore_v5 + .ContributionStatusEnum + .REJECTED; + } + } + + IexecLibCore_v5.Consensus storage consensus = m_consensus[_taskid]; + consensus.total = consensus.total - consensus.group[task.consensusValue]; + consensus.group[task.consensusValue] = 0; + + task.status = IexecLibCore_v5.TaskStatusEnum.ACTIVE; + task.consensusValue = 0x0; + task.revealDeadline = 0; + task.winnerCounter = 0; + + emit TaskReopen(_taskid); + } + + function finalize( + bytes32 _taskid, + bytes calldata _results, + bytes calldata _resultsCallback // Expansion - result separation + ) external override onlyScheduler(_taskid) { + IexecLibCore_v5.Task storage task = m_tasks[_taskid]; + IexecLibCore_v5.Deal memory deal = m_deals[task.dealid]; + + require(task.status == IexecLibCore_v5.TaskStatusEnum.REVEALING); + require(task.finalDeadline > block.timestamp); + require( + task.revealCounter == task.winnerCounter || + (task.revealCounter > 0 && task.revealDeadline <= block.timestamp) + ); + + require( + (deal.callback == address(0) && _resultsCallback.length == 0) || + keccak256(_resultsCallback) == task.resultDigest + ); + + task.status = IexecLibCore_v5.TaskStatusEnum.COMPLETED; + task.results = _results; + task.resultsCallback = _resultsCallback; // Expansion - result separation + + /** + * Stake and reward management + */ + successWork(task.dealid, _taskid); + distributeRewards(_taskid); + + /** + * Event + */ + emit TaskFinalize(_taskid, _results); + + executeCallback(_taskid, _resultsCallback); + } + + function claim(bytes32 _taskid) public override { + IexecLibCore_v5.Task storage task = m_tasks[_taskid]; + require( + task.status == IexecLibCore_v5.TaskStatusEnum.ACTIVE || + task.status == IexecLibCore_v5.TaskStatusEnum.REVEALING + ); + require(task.finalDeadline <= block.timestamp); + + task.status = IexecLibCore_v5.TaskStatusEnum.FAILED; + + /** + * Stake management + */ + failedWork(task.dealid, _taskid); + for (uint256 i = 0; i < task.contributors.length; ++i) { + address worker = task.contributors[i]; + // Unlock contribution + unlock(worker, m_deals[task.dealid].workerStake); + } + + emit TaskClaimed(_taskid); + } + + /*************************************************************************** + * Internal Consensus methods * + ***************************************************************************/ + /* + * Consensus detection + */ + function checkConsensus(bytes32 _taskid, bytes32 _consensus) internal { + IexecLibCore_v5.Task storage task = m_tasks[_taskid]; + IexecLibCore_v5.Consensus storage consensus = m_consensus[_taskid]; + + uint256 trust = m_deals[task.dealid].trust; + /************************************************************************* + * Consensus detection * + * * + * see documentation: * + * ./ audit/docs/iExec_PoCo_and_trustmanagement_v1.pdf * + *************************************************************************/ + if (consensus.group[_consensus] * trust > consensus.total * (trust - 1)) { + // Preliminary checks done in "contribute()" + uint256 winnerCounter = 0; + for (uint256 i = 0; i < task.contributors.length; ++i) { + address w = task.contributors[i]; + if ( + m_contributions[_taskid][w].resultHash == _consensus && + m_contributions[_taskid][w].status == + IexecLibCore_v5.ContributionStatusEnum.CONTRIBUTED // REJECTED contribution must not be count + ) { + winnerCounter = winnerCounter + 1; + } + } + // _msgSender() is a contributor: no need to check + task.status = IexecLibCore_v5.TaskStatusEnum.REVEALING; + task.consensusValue = _consensus; + task.revealDeadline = block.timestamp + task.timeref * REVEAL_DEADLINE_RATIO; + task.revealCounter = 0; + task.winnerCounter = winnerCounter; + + emit TaskConsensus(_taskid, _consensus); + } + } + + /* + * Reward distribution + */ + function distributeRewards(bytes32 _taskid) internal { + IexecLibCore_v5.Task memory task = m_tasks[_taskid]; + IexecLibCore_v5.Deal memory deal = m_deals[task.dealid]; + + uint256 totalLogWeight = 0; + uint256 totalReward = deal.workerpool.price; + + for (uint256 i = 0; i < task.contributors.length; ++i) { + address worker = task.contributors[i]; + IexecLibCore_v5.Contribution storage contribution = m_contributions[_taskid][worker]; + + if (contribution.status == IexecLibCore_v5.ContributionStatusEnum.PROVED) { + totalLogWeight = totalLogWeight + contribution.weight; + } + // ContributionStatusEnum.REJECT or ContributionStatusEnum.CONTRIBUTED (not revealed) + else { + totalReward = totalReward + deal.workerStake; + } + } + + // compute how much is going to the workers + uint256 workersReward = (totalReward * (100 - deal.schedulerRewardRatio)) / 100; + + for (uint256 i = 0; i < task.contributors.length; ++i) { + address worker = task.contributors[i]; + IexecLibCore_v5.Contribution storage contribution = m_contributions[_taskid][worker]; + + if (contribution.status == IexecLibCore_v5.ContributionStatusEnum.PROVED) { + uint256 workerReward = Math.mulDiv( + workersReward, + contribution.weight, + totalLogWeight + ); + totalReward = totalReward - workerReward; + + // Unlock contribution + unlock(worker, deal.workerStake); + // Reward for contribution + reward(worker, workerReward, _taskid); + + // Only reward if replication happened + if (task.contributors.length > 1) { + /******************************************************************* + * SCORE POLICY 2/3 * + * * + * see documentation! * + *******************************************************************/ + m_workerScores[worker] = m_workerScores[worker] + 1; + emit AccurateContribution(worker, _taskid); + } + } + // WorkStatusEnum.POCO_REJECT or ContributionStatusEnum.CONTRIBUTED (not revealed) + else { + // No Reward + // Seize contribution + seize(worker, deal.workerStake, _taskid); + + // Always punish bad contributors + { + /******************************************************************* + * SCORE POLICY 3/3 * + * * + * see documentation! * + *******************************************************************/ + // k = 3 + m_workerScores[worker] = Math.mulDiv(m_workerScores[worker], 2, 3); + emit FaultyContribution(worker, _taskid); + } + } + } + // totalReward now contains the scheduler share + // Reward for scheduling. + reward(deal.workerpool.owner, totalReward, _taskid); + } + + /* + * Reward distribution for contributeAndFinalize + */ + function distributeRewardsFast(bytes32 _taskid) internal { + IexecLibCore_v5.Task memory task = m_tasks[_taskid]; + IexecLibCore_v5.Deal memory deal = m_deals[task.dealid]; + + // simple reward, no score consideration + uint256 workerReward = (deal.workerpool.price * (100 - deal.schedulerRewardRatio)) / 100; + uint256 schedulerReward = deal.workerpool.price - workerReward; + // Reward for contribution. + reward(_msgSender(), workerReward, _taskid); + // Reward for scheduling. + reward(deal.workerpool.owner, schedulerReward, _taskid); + } + + /** + * Callback for smartcontracts using EIP1154 + */ + function executeCallback(bytes32 _taskid, bytes memory _resultsCallback) internal { + address target = m_deals[m_tasks[_taskid].dealid].callback; + if (target != address(0)) { + // Solidity 0.6.0 reverts if target is not a smartcontracts + // /** + // * Call does not revert if the target smart contract is incompatible or reverts + // * Solidity 0.6.0 update. Check hit history for 0.5.0 implementation. + // */ + // try IOracleConsumer(target).receiveResult{gas: m_callbackgas}(_taskid, _results) + // { + // // Callback success, do nothing + // } + // catch (bytes memory /*lowLevelData*/) + // { + // // Check gas: https://ronan.eth.link/blog/ethereum-gas-dangers/ + // assert(gasleft() > m_callbackgas / 63); // no need for safemath here + // } + + // Pre solidity 0.6.0 version + // See Halborn audit report for details + //slither-disable-next-line low-level-calls + (bool success, bytes memory returndata) = target.call{gas: m_callbackgas}( + abi.encodeWithSignature("receiveResult(bytes32,bytes)", _taskid, _resultsCallback) + ); + assert(gasleft() > m_callbackgas / 63); + // silent unused variable warning + //slither-disable-next-line redundant-statements + success; + //slither-disable-next-line redundant-statements + returndata; + } + } + + /*************************************************************************** + * Array operations * + ***************************************************************************/ + function initializeArray( + bytes32[] calldata _dealid, + uint256[] calldata _idx + ) external override returns (bool) { + require(_dealid.length == _idx.length); + for (uint i = 0; i < _dealid.length; ++i) { + initialize(_dealid[i], _idx[i]); + } + return true; + } + + function claimArray(bytes32[] calldata _taskid) external override returns (bool) { + for (uint i = 0; i < _taskid.length; ++i) { + claim(_taskid[i]); + } + return true; + } + + function initializeAndClaimArray( + bytes32[] calldata _dealid, + uint256[] calldata _idx + ) external override returns (bool) { + require(_dealid.length == _idx.length); + for (uint i = 0; i < _dealid.length; ++i) { + claim(initialize(_dealid[i], _idx[i])); + } + return true; + } } diff --git a/contracts/modules/delegates/IexecPoco2KYCDelegate.sol b/contracts/modules/delegates/IexecPoco2KYCDelegate.sol deleted file mode 100644 index 5b54ee23c..000000000 --- a/contracts/modules/delegates/IexecPoco2KYCDelegate.sol +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 - -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -pragma solidity ^0.6.0; -pragma experimental ABIEncoderV2; - -import "./IexecPoco2Delegate.sol"; -import "./IexecERC20CoreKYC.sol"; - - -contract IexecPoco2DelegateKYC is IexecPoco2Delegate, IexecERC20CoreKYC -{ - function _beforeTokenTransfer(address from, address to, uint256 amount) - internal virtual override(IexecERC20Core, IexecERC20CoreKYC) - { - IexecERC20CoreKYC._beforeTokenTransfer(from, to, amount); - } - - function _isAuthorized(address account) - internal virtual override(IexecERC20Core, IexecERC20CoreKYC) returns (bool) - { - return IexecERC20CoreKYC._isAuthorized(account); - } -} diff --git a/contracts/modules/delegates/IexecPocoAccessorsDelegate.sol b/contracts/modules/delegates/IexecPocoAccessorsDelegate.sol new file mode 100644 index 000000000..1f871ab2b --- /dev/null +++ b/contracts/modules/delegates/IexecPocoAccessorsDelegate.sol @@ -0,0 +1,73 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {DelegateBase} from "../DelegateBase.v8.sol"; +import {IexecLibCore_v5} from "../../libs/IexecLibCore_v5.sol"; +import {IexecLibOrders_v5} from "../../libs/IexecLibOrders_v5.sol"; +import {IexecPocoAccessors} from "../interfaces/IexecPocoAccessors.sol"; +import {IexecPocoCommonDelegate} from "./IexecPocoCommonDelegate.sol"; +import {SignatureVerifier} from "./SignatureVerifier.v8.sol"; + +/** + * @title Getters contract for PoCo module. + */ +contract IexecPocoAccessorsDelegate is + IexecPocoAccessors, + DelegateBase, + SignatureVerifier, + IexecPocoCommonDelegate +{ + using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.WorkerpoolOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.RequestOrder; + + /** + * Get a deal created by PoCo module. + * @param id The ID of the deal. + */ + function viewDeal(bytes32 id) external view returns (IexecLibCore_v5.Deal memory deal) { + return m_deals[id]; + } + + /** + * Get task created in Classic mode. + * @param id id of the task + */ + function viewTask(bytes32 id) external view returns (IexecLibCore_v5.Task memory) { + return m_tasks[id]; + } + + /** + * @notice Computes the volume of the "not yet created" deal based on the provided orders. + * This function should only be used if the deal is not yet created. + * For existing deals, use the deal accessors instead. + * + * @param appOrder The application order. + * @param datasetOrder The dataset order. + * @param workerpoolOrder The workerpool order. + * @param requestOrder The request order. + * @return The computed deal volume. + */ + function computeDealVolume( + IexecLibOrders_v5.AppOrder calldata appOrder, + IexecLibOrders_v5.DatasetOrder calldata datasetOrder, + IexecLibOrders_v5.WorkerpoolOrder calldata workerpoolOrder, + IexecLibOrders_v5.RequestOrder calldata requestOrder + ) external view override returns (uint256) { + return + _computeDealVolume( + appOrder.volume, + _toTypedDataHash(appOrder.hash()), + datasetOrder.dataset != address(0), + datasetOrder.volume, + _toTypedDataHash(datasetOrder.hash()), + workerpoolOrder.volume, + _toTypedDataHash(workerpoolOrder.hash()), + requestOrder.volume, + _toTypedDataHash(requestOrder.hash()) + ); + } +} diff --git a/contracts/modules/delegates/IexecPocoBoostAccessorsDelegate.sol b/contracts/modules/delegates/IexecPocoBoostAccessorsDelegate.sol new file mode 100644 index 000000000..fa3f47cbc --- /dev/null +++ b/contracts/modules/delegates/IexecPocoBoostAccessorsDelegate.sol @@ -0,0 +1,24 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IexecLibCore_v5} from "../../libs/IexecLibCore_v5.sol"; +import {DelegateBase} from "../DelegateBase.v8.sol"; +import {IexecPocoBoostAccessors} from "../interfaces/IexecPocoBoostAccessors.sol"; + +/** + * @title Getters contract for PoCo Boost module. + * @notice Access to PoCo Boost tasks must be done with PoCo Classic `IexecAccessors`. + */ +contract IexecPocoBoostAccessorsDelegate is IexecPocoBoostAccessors, DelegateBase { + /** + * Get a deal created by PoCo Boost module. + * @param id The ID of the deal. + */ + function viewDealBoost( + bytes32 id + ) external view returns (IexecLibCore_v5.DealBoost memory deal) { + return m_dealsBoost[id]; + } +} diff --git a/contracts/modules/delegates/IexecPocoBoostDelegate.sol b/contracts/modules/delegates/IexecPocoBoostDelegate.sol new file mode 100644 index 000000000..11cee8be1 --- /dev/null +++ b/contracts/modules/delegates/IexecPocoBoostDelegate.sol @@ -0,0 +1,542 @@ +// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IERC5313} from "@openzeppelin/contracts-v5/interfaces/IERC5313.sol"; +import {ECDSA} from "@openzeppelin/contracts-v5/utils/cryptography/ECDSA.sol"; +import {MessageHashUtils} from "@openzeppelin/contracts-v5/utils/cryptography/MessageHashUtils.sol"; +import {Math} from "@openzeppelin/contracts-v5/utils/math/Math.sol"; +import {SafeCast} from "@openzeppelin/contracts-v5/utils/math/SafeCast.sol"; + +import {IOracleConsumer} from "../../external/interfaces/IOracleConsumer.sol"; +import {IexecLibCore_v5} from "../../libs/IexecLibCore_v5.sol"; +import {IexecLibOrders_v5} from "../../libs/IexecLibOrders_v5.sol"; +import {IWorkerpool} from "../../registries/workerpools/IWorkerpool.v8.sol"; +import {DelegateBase} from "../DelegateBase.v8.sol"; +import {IexecPocoBoost} from "../interfaces/IexecPocoBoost.sol"; +import {IexecEscrow} from "./IexecEscrow.v8.sol"; +import {IexecPocoCommonDelegate} from "./IexecPocoCommonDelegate.sol"; +import {SignatureVerifier} from "./SignatureVerifier.v8.sol"; + +/** + * @title PoCo Boost to reduce latency and increase throughput of deals. + * @notice Works for deals with requested trust = 0. + */ +contract IexecPocoBoostDelegate is + IexecPocoBoost, + DelegateBase, + IexecEscrow, + SignatureVerifier, + IexecPocoCommonDelegate +{ + using ECDSA for bytes32; + using MessageHashUtils for bytes32; + using Math for uint256; + using SafeCast for uint256; + using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.WorkerpoolOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.RequestOrder; + + /** + * @notice This boost match orders is only compatible with trust <= 1. + * The requester gets debited. + * @param appOrder The order signed by the application developer. + * @param datasetOrder The order signed by the dataset provider. + * @param workerpoolOrder The order signed by the workerpool manager. + * @param requestOrder The order signed by the requester. + * @return The ID of the deal. + */ + function matchOrdersBoost( + IexecLibOrders_v5.AppOrder calldata appOrder, + IexecLibOrders_v5.DatasetOrder calldata datasetOrder, + IexecLibOrders_v5.WorkerpoolOrder calldata workerpoolOrder, + IexecLibOrders_v5.RequestOrder calldata requestOrder + ) external returns (bytes32) { + return + _matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + requestOrder.requester + ); + } + + /** + * Sponsor match orders boost for a requester. + * Unlike the standard `matchOrdersBoost(..)` hook where the requester pays for + * the deal, this current hook makes it possible for any `msg.sender` to pay for + * a third party requester. + * + * @notice Be aware that anyone seeing a valid request order on the network + * (via an off-chain public marketplace, via a `sponsorMatchOrdersBoost(..)` + * pending transaction in the mempool or by any other means) might decide + * to call the standard `matchOrdersBoost(..)` hook which will result in the + * requester being debited instead. Therefore, such a front run would result + * in a loss of some of the requester funds deposited in the iExec account + * (a loss value equivalent to the price of the deal). + * + * @param appOrder The app order. + * @param datasetOrder The dataset order. + * @param workerpoolOrder The workerpool order. + * @param requestOrder The requester order. + */ + + function sponsorMatchOrdersBoost( + IexecLibOrders_v5.AppOrder calldata appOrder, + IexecLibOrders_v5.DatasetOrder calldata datasetOrder, + IexecLibOrders_v5.WorkerpoolOrder calldata workerpoolOrder, + IexecLibOrders_v5.RequestOrder calldata requestOrder + ) external returns (bytes32) { + address sponsor = msg.sender; + bytes32 dealId = _matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + sponsor + ); + emit DealSponsoredBoost(dealId, sponsor); + return dealId; + } + + /** + * Match orders boost and specify a sponsor in charge of paying for the deal. + * + * @param appOrder The app order. + * @param datasetOrder The dataset order. + * @param workerpoolOrder The workerpool order. + * @param requestOrder The requester order. + * @param sponsor The sponsor in charge of paying the deal. + * @dev Considering minยทmaxยทavg gas values, preferred option for deal storage + * is b.: + * - a. Use memory struct and write new struct to storage once + * - b. Use memory struct and write to storage field per field + * - c. Write/read everything to/on storage + * - d. Write/read everything to/on memory struct and asign memory to storage + */ + function _matchOrdersBoost( + IexecLibOrders_v5.AppOrder calldata appOrder, + IexecLibOrders_v5.DatasetOrder calldata datasetOrder, + IexecLibOrders_v5.WorkerpoolOrder calldata workerpoolOrder, + IexecLibOrders_v5.RequestOrder calldata requestOrder, + address sponsor + ) private returns (bytes32) { + // Check orders compatibility + + // Ensure the trust level is within the acceptable range. + // Only accept tasks with no replication [trust <= 1]. + require(requestOrder.trust <= 1, "PocoBoost: Bad trust level"); + + // @dev An intermediate variable stored in the stack consumes + // less gas than accessing calldata each time. + uint256 category = requestOrder.category; + // Check if the requested category is matched. + require(category == workerpoolOrder.category, "PocoBoost: Category mismatch"); + // Check if the requested category is valid. + require(category < m_categories.length, "PocoBoost: Unknown category"); + uint256 appPrice = appOrder.appprice; + // Check if the app, dataset, and workerpool prices are within requester price limits. + require(requestOrder.appmaxprice >= appPrice, "PocoBoost: Overpriced app"); + uint256 datasetPrice = datasetOrder.datasetprice; + require(requestOrder.datasetmaxprice >= datasetPrice, "PocoBoost: Overpriced dataset"); + uint256 workerpoolPrice = workerpoolOrder.workerpoolprice; + require( + requestOrder.workerpoolmaxprice >= workerpoolPrice, + "PocoBoost: Overpriced workerpool" + ); + bytes32 appOrderTag = appOrder.tag; + bytes32 tag = appOrderTag | datasetOrder.tag | requestOrder.tag; + require( + tag & ~workerpoolOrder.tag == 0x0, + "PocoBoost: Workerpool tag does not match demand" + ); + require((tag ^ appOrderTag)[31] & 0x01 == 0x0, "PocoBoost: App tag does not match demand"); + // Verify that app and dataset match requester order. + address app = appOrder.app; + require(requestOrder.app == app, "PocoBoost: App mismatch"); + address dataset = datasetOrder.dataset; + require(requestOrder.dataset == dataset, "PocoBoost: Dataset mismatch"); + // Check all possible restrictions. + address workerpool = workerpoolOrder.workerpool; + require( + _isAccountAuthorizedByRestriction(requestOrder.workerpool, workerpool), + "PocoBoost: Workerpool restricted by request order" + ); + require( + _isAccountAuthorizedByRestriction(appOrder.datasetrestrict, dataset), + "PocoBoost: Dataset restricted by app order" + ); + require( + _isAccountAuthorizedByRestriction(appOrder.workerpoolrestrict, workerpool), + "PocoBoost: Workerpool restricted by app order" + ); + address requester = requestOrder.requester; + require( + _isAccountAuthorizedByRestriction(appOrder.requesterrestrict, requester), + "PocoBoost: Requester restricted by app order" + ); + require( + _isAccountAuthorizedByRestriction(datasetOrder.apprestrict, app), + "PocoBoost: App restricted by dataset order" + ); + require( + _isAccountAuthorizedByRestriction(datasetOrder.workerpoolrestrict, workerpool), + "PocoBoost: Workerpool restricted by dataset order" + ); + require( + _isAccountAuthorizedByRestriction(datasetOrder.requesterrestrict, requester), + "PocoBoost: Requester restricted by dataset order" + ); + require( + _isAccountAuthorizedByRestriction(workerpoolOrder.apprestrict, app), + "PocoBoost: App restricted by workerpool order" + ); + require( + _isAccountAuthorizedByRestriction(workerpoolOrder.datasetrestrict, dataset), + "PocoBoost: Dataset restricted by workerpool order" + ); + require( + _isAccountAuthorizedByRestriction(workerpoolOrder.requesterrestrict, requester), + "PocoBoost: Requester restricted by workerpool order" + ); + // Check ownership, registration, and signatures for app and dataset. + require(m_appregistry.isRegistered(app), "PocoBoost: App not registered"); + address appOwner = IERC5313(app).owner(); + bytes32 appOrderTypedDataHash = _toTypedDataHash(appOrder.hash()); + require( + _verifySignatureOrPresignature(appOwner, appOrderTypedDataHash, appOrder.sign), + "PocoBoost: Invalid app order signature" + ); + bool hasDataset = dataset != address(0); + address datasetOwner; + bytes32 datasetOrderTypedDataHash; + if (hasDataset) { + require(m_datasetregistry.isRegistered(dataset), "PocoBoost: Dataset not registered"); + datasetOwner = IERC5313(dataset).owner(); + datasetOrderTypedDataHash = _toTypedDataHash(datasetOrder.hash()); + require( + _verifySignatureOrPresignature( + datasetOwner, + datasetOrderTypedDataHash, + datasetOrder.sign + ), + "PocoBoost: Invalid dataset order signature" + ); + } + // Check ownership, registration, and signatures for workerpool. + require( + m_workerpoolregistry.isRegistered(workerpool), + "PocoBoost: Workerpool not registered" + ); + address workerpoolOwner = IERC5313(workerpool).owner(); + bytes32 workerpoolOrderTypedDataHash = _toTypedDataHash(workerpoolOrder.hash()); + require( + _verifySignatureOrPresignature( + workerpoolOwner, + workerpoolOrderTypedDataHash, + workerpoolOrder.sign + ), + "PocoBoost: Invalid workerpool order signature" + ); + bytes32 requestOrderTypedDataHash = _toTypedDataHash(requestOrder.hash()); + require( + _verifySignatureOrPresignature(requester, requestOrderTypedDataHash, requestOrder.sign), + "PocoBoost: Invalid request order signature" + ); + + uint256 requestOrderConsumed = m_consumed[requestOrderTypedDataHash]; + uint256 appOrderConsumed = m_consumed[appOrderTypedDataHash]; + uint256 workerpoolOrderConsumed = m_consumed[workerpoolOrderTypedDataHash]; + // @dev No dataset variable since dataset is optional + + // Compute the unique deal identifier. + bytes32 dealId = keccak256( + abi.encodePacked( + requestOrderTypedDataHash, // requestHash + requestOrderConsumed // index of first task + ) + ); + /** + * Compute deal volume and consume orders. + * @dev + * - Volume of the deal is equal to the smallest unconsumed volume + * among all orders. + * - Compute volume: + * - in multiple steps to prevent `Stack too deep` + * - but trying to use as little gas as possible + * - Overflows: Solidity 0.8 has built in overflow checking + */ + uint256 volume = _computeDealVolume( + appOrder.volume, + appOrderTypedDataHash, + hasDataset, + datasetOrder.volume, + datasetOrderTypedDataHash, + workerpoolOrder.volume, + workerpoolOrderTypedDataHash, + requestOrder.volume, + requestOrderTypedDataHash + ); + require(volume > 0, "PocoBoost: One or more orders consumed"); + // Store deal (all). Write all parts of the same storage slot together + // for gas optimization purposes. + IexecLibCore_v5.DealBoost storage deal = m_dealsBoost[dealId]; + deal.appOwner = appOwner; + deal.appPrice = appPrice.toUint96(); + deal.workerpoolOwner = workerpoolOwner; + deal.workerpoolPrice = workerpoolPrice.toUint96(); + deal.workerReward = ((workerpoolPrice * // reward depends on + (100 - IWorkerpool(workerpool).m_schedulerRewardRatioPolicy())) / 100).toUint96(); // worker reward ratio + deal.requester = requester; + deal.botFirst = requestOrderConsumed.toUint16(); + deal.deadline = (block.timestamp + + m_categories[category].workClockTimeRef * + CONTRIBUTION_DEADLINE_RATIO).toUint40(); + deal.botSize = volume.toUint16(); + /** + * Store right part of tag for later use. + * @dev From the cheapest to the most expensive option: + * a. Shift left with assembly + * b. Shift left in Solidity `tag << 232` + * c. Convert to smaller bytes size `uint24(uint256(tag))`, see + * https://github.com/ethereum/solidity/blob/v0.8.19/docs/types/value-types.rst?plain=1#L222 + */ + bytes3 shortTag; + //slither-disable-next-line assembly + assembly { + shortTag := shl(232, tag) // 24 = 256 - 232 + } + deal.shortTag = shortTag; + deal.callback = requestOrder.callback; + // Handle dataset-specific logic if a dataset is used. + if (hasDataset) { + // Store deal (dataset) + deal.datasetOwner = datasetOwner; + deal.datasetPrice = datasetPrice.toUint96(); + // Update consumed (dataset) + m_consumed[datasetOrderTypedDataHash] += volume; + } + deal.sponsor = sponsor; + /** + * Update consumed. + * @dev Update all consumed after external call on workerpool contract + * to prevent reentrancy. + */ + m_consumed[appOrderTypedDataHash] = appOrderConsumed + volume; // @dev cheaper than `+= volume` here + m_consumed[workerpoolOrderTypedDataHash] = workerpoolOrderConsumed + volume; + m_consumed[requestOrderTypedDataHash] = requestOrderConsumed + volume; + // Lock deal price from sponsor balance. + lock(sponsor, (appPrice + datasetPrice + workerpoolPrice) * volume); + // Lock deal stake from scheduler balance. + // Order is important here. First get percentage by task then + // multiply by volume. + //slither-disable-next-line divide-before-multiply + lock(workerpoolOwner, ((workerpoolPrice * WORKERPOOL_STAKE_RATIO) / 100) * volume); + // Notify workerpool. + emit SchedulerNoticeBoost( + workerpool, + dealId, + app, + dataset, + category, + tag, + requestOrder.params, + requestOrder.beneficiary + ); + // Broadcast consumption of orders. + emit OrdersMatched( + dealId, + appOrderTypedDataHash, + datasetOrderTypedDataHash, + workerpoolOrderTypedDataHash, + requestOrderTypedDataHash, + volume + ); + return dealId; + } + + /** + * @notice Accept results of a task computed by a worker during Boost workflow. + * @param dealId The id of the target deal. + * @param index The index of the target task of the deal. + * @param results The results of the task computed by the worker. + * @param resultsCallback The results of the task computed by the worker that + * will be forwarded as call data to the callback address set by the requester. + * @param authorizationSign The authorization signed by the scheduler. + * authorizing the worker to push a result. + * @param enclaveChallenge The enclave address which can produce enclave signature. + * @param enclaveSign The signature generated from the enclave. + */ + function pushResultBoost( + bytes32 dealId, + uint256 index, + bytes calldata results, + bytes calldata resultsCallback, + bytes calldata authorizationSign, + address enclaveChallenge, + bytes calldata enclaveSign + ) external { + IexecLibCore_v5.DealBoost storage deal = m_dealsBoost[dealId]; + // Compute the unique task identifier based on deal id and task index. + bytes32 taskId = keccak256(abi.encodePacked(dealId, index)); + IexecLibCore_v5.Task storage task = m_tasks[taskId]; + // Ensure that the task exists and is in the correct state + requireTaskExistsAndUnset(task.status, index, deal.botSize); + require(block.timestamp < deal.deadline, "PocoBoost: Deadline reached"); + // Check that the enclave challenge is present for TEE tasks + require( + enclaveChallenge != address(0) || deal.shortTag[2] & 0x01 == 0, + "PocoBoost: Tag requires enclave challenge" + ); + address workerpoolOwner = deal.workerpoolOwner; + // Check scheduler or TEE broker signature + require( + _verifySignatureOfEthSignedMessage( + enclaveChallenge != address(0) && m_teebroker != address(0) + ? m_teebroker + : workerpoolOwner, + abi.encodePacked(msg.sender, taskId, enclaveChallenge), + authorizationSign + ), + "PocoBoost: Invalid contribution authorization signature" + ); + address target = deal.callback; + bytes32 resultDigest = keccak256(target == address(0) ? results : resultsCallback); + // Check enclave signature + require( + enclaveChallenge == address(0) || + _verifySignatureOfEthSignedMessage( + enclaveChallenge, + abi.encodePacked(msg.sender, taskId, resultDigest), + enclaveSign + ), + "PocoBoost: Invalid enclave signature" + ); + + /** + * @dev Prevent reentrancy before external call + * Minimal reuse of Poco Classic task map. + * Benefit: Fetching task status is unchanged for clients + */ + task.status = IexecLibCore_v5.TaskStatusEnum.COMPLETED; + + // Reward, seize and unlock each parties + uint96 appPrice = deal.appPrice; + uint96 datasetPrice = deal.datasetPrice; + uint96 workerPoolPrice = deal.workerpoolPrice; + + // Seize requester + seize(deal.requester, appPrice + datasetPrice + workerPoolPrice, taskId); + uint96 workerReward = deal.workerReward; + // Reward worker + reward(msg.sender, workerReward, taskId); + // Reward app developer + if (appPrice > 0) { + reward(deal.appOwner, appPrice, taskId); + } + // Reward dataset provider + if (datasetPrice > 0) { + reward(deal.datasetOwner, datasetPrice, taskId); + } + + // Unlock scheduler stake + unlock(workerpoolOwner, (workerPoolPrice * WORKERPOOL_STAKE_RATIO) / 100); + // Reward scheduler + uint256 kitty = m_frozens[KITTY_ADDRESS]; + if (kitty > 0) { + kitty = KITTY_MIN // 1. retrieve bare minimum from kitty + .max( // 2. or eventually a fraction of kitty if bigger + // @dev As long as `KITTY_RATIO = 10`, we can introduce this small + kitty / KITTY_RATIO // optimization for `kitty * KITTY_RATIO / 100` + ).min(kitty); // 3. but no more than available + seize(KITTY_ADDRESS, kitty, taskId); + } + reward( + workerpoolOwner, + workerPoolPrice - // reward with + workerReward + // sheduler base reward + kitty, // and optional kitty fraction + taskId + ); + + emit ResultPushedBoost(dealId, index, results); + + if (target != address(0)) { + require(resultsCallback.length > 0, "PocoBoost: Callback requires data"); + /* + * The caller must be able to complete the task even if the external + * call reverts. + */ + // See Halborn audit report for details + //slither-disable-next-line low-level-calls + (bool success, ) = target.call{gas: m_callbackgas}( + abi.encodeCall(IOracleConsumer.receiveResult, (taskId, resultsCallback)) + ); + //slither-disable-next-line redundant-statements + success; // silent unused variable warning + require(gasleft() > m_callbackgas / 63, "PocoBoost: Not enough gas after callback"); + } + } + + /** + * @notice Claim task to get a refund if task is not completed after deadline. + * @param dealId The ID of the deal. + * @param index The index of the task. + */ + function claimBoost(bytes32 dealId, uint256 index) external { + // Retrieve deal and task information from storage. + IexecLibCore_v5.DealBoost storage deal = m_dealsBoost[dealId]; + bytes32 taskId = keccak256(abi.encodePacked(dealId, index)); + IexecLibCore_v5.Task storage task = m_tasks[taskId]; + // Ensure that the task exists and has the unset status. + requireTaskExistsAndUnset(task.status, index, deal.botSize); + // Check if the current time has reached or passed the deadline of the deal. + require(deal.deadline <= block.timestamp, "PocoBoost: Deadline not reached"); + // Mark the task as failed since it was not completed within the deadline. + task.status = IexecLibCore_v5.TaskStatusEnum.FAILED; + // Calculate workerpool price and task stake. + uint96 workerPoolPrice = deal.workerpoolPrice; + uint256 workerpoolTaskStake = (workerPoolPrice * WORKERPOOL_STAKE_RATIO) / 100; + // Refund the payer of the task by unlocking the locked funds. + unlock(deal.sponsor, deal.appPrice + deal.datasetPrice + workerPoolPrice); + // Seize task stake from workerpool. + seize(deal.workerpoolOwner, workerpoolTaskStake, taskId); + // Reward kitty and lock the rewarded amount. + m_frozens[KITTY_ADDRESS] += workerpoolTaskStake; + // Emit events to publish state changes. + emit Reward(KITTY_ADDRESS, workerpoolTaskStake, taskId); + emit Lock(KITTY_ADDRESS, workerpoolTaskStake); + emit TaskClaimed(taskId); + } + + /** + * @notice Check if a task exists and is unset. Such task status is equivalent to + * the "initialized" task status in Classic Poco workflow. + * In order for the task to exist, its index should be: + * 0 <= index < deal.botSize. + * @param taskStatus The status of the task. + * @param taskIndex The index of the task. + * @param botSize The size of the Bag-of-Task in the deal. + */ + function requireTaskExistsAndUnset( + IexecLibCore_v5.TaskStatusEnum taskStatus, + uint256 taskIndex, + uint16 botSize + ) private pure { + // If deal not found then index < 0. + require(taskIndex < botSize, "PocoBoost: Unknown task"); + /*** + * @dev The calling method (A) must call this current method (B), then + * it must update task to a higher status in (A), to prevent an account + * to trigger (A) multiple times. Without that precaution, the contract + * could be drained by calling (A) multiple times. + */ + require( + taskStatus == IexecLibCore_v5.TaskStatusEnum.UNSET, + "PocoBoost: Task status not unset" + ); + } +} diff --git a/contracts/modules/delegates/IexecPocoCommonDelegate.sol b/contracts/modules/delegates/IexecPocoCommonDelegate.sol new file mode 100644 index 000000000..4f7eef766 --- /dev/null +++ b/contracts/modules/delegates/IexecPocoCommonDelegate.sol @@ -0,0 +1,55 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {Math} from "@openzeppelin/contracts-v5/utils/math/Math.sol"; + +import {IexecLibOrders_v5} from "../../libs/IexecLibOrders_v5.sol"; +import {DelegateBase} from "../DelegateBase.v8.sol"; + +contract IexecPocoCommonDelegate is DelegateBase { + using Math for uint256; + using IexecLibOrders_v5 for IexecLibOrders_v5.AppOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.DatasetOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.WorkerpoolOrder; + using IexecLibOrders_v5 for IexecLibOrders_v5.RequestOrder; + + /** + * @notice Internal function to compute the deal volume considering the minimum + * remaining volume across all provided orders. This ensures that the deal volume + * does not exceed the available volume of any individual order. + * + * @param appOrderVolume The volume of the app order. + * @param appOrderTypedDataHash The typed data hash of the app order. + * @param hasDataset Indicates if there is a dataset order. + * @param datasetOrderVolume The volume of the dataset order. + * @param datasetOrderTypedDataHash The typed data hash of the dataset order. + * @param workerpoolOrderVolume The volume of the workerpool order. + * @param workerpoolOrderTypedDataHash The typed data hash of the workerpool order. + * @param requestOrderVolume The volume of the request order. + * @param requestOrderTypedDataHash The typed data hash of the request order. + * @return The minimum volume available across all orders. + */ + function _computeDealVolume( + uint256 appOrderVolume, + bytes32 appOrderTypedDataHash, + bool hasDataset, + uint256 datasetOrderVolume, + bytes32 datasetOrderTypedDataHash, + uint256 workerpoolOrderVolume, + bytes32 workerpoolOrderTypedDataHash, + uint256 requestOrderVolume, + bytes32 requestOrderTypedDataHash + ) internal view returns (uint256) { + return + (appOrderVolume - m_consumed[appOrderTypedDataHash]) + .min( + hasDataset + ? datasetOrderVolume - m_consumed[datasetOrderTypedDataHash] + : type(uint256).max + ) + .min(workerpoolOrderVolume - m_consumed[workerpoolOrderTypedDataHash]) + .min(requestOrderVolume - m_consumed[requestOrderTypedDataHash]); + } +} diff --git a/contracts/modules/delegates/SignatureVerifier.v8.sol b/contracts/modules/delegates/SignatureVerifier.v8.sol new file mode 100644 index 000000000..bf91b909b --- /dev/null +++ b/contracts/modules/delegates/SignatureVerifier.v8.sol @@ -0,0 +1,150 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IERC1271} from "@openzeppelin/contracts-v5/interfaces/IERC1271.sol"; +import {ECDSA} from "@openzeppelin/contracts-v5/utils/cryptography/ECDSA.sol"; +import {MessageHashUtils} from "@openzeppelin/contracts-v5/utils/cryptography/MessageHashUtils.sol"; +import {IERC734} from "../../external/interfaces/IERC734.sol"; +import {DelegateBase} from "../DelegateBase.v8.sol"; + +contract SignatureVerifier is DelegateBase { + using ECDSA for bytes32; + + /** + * Hash a Typed Data using the configured domain. + * @param structHash The original structure hash. + */ + function _toTypedDataHash(bytes32 structHash) internal view returns (bytes32) { + return MessageHashUtils.toTypedDataHash(EIP712DOMAIN_SEPARATOR, structHash); + } + + /** + * @notice Verify that an Ethereum Signed Message is signed by a particular account. + * @param account The expected signer account. + * @param message The original message that was signed. + * @param signature The signature to be verified. + */ + function _verifySignatureOfEthSignedMessage( + address account, + bytes memory message, + bytes calldata signature + ) internal view returns (bool) { + return + _verifySignature( + account, + MessageHashUtils.toEthSignedMessageHash(keccak256(message)), + signature + ); + } + + /** + * @notice Verify that a message is signed by an EOA or an ERC1271 smart contract. + * + * It supports short signatures. + * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] + * & https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4915 + * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v5.0.0/contracts/utils/cryptography/ECDSA.sol#L112 + * + * @param account The expected signer account. + * @param messageHash The message hash that was signed. + * @param signature The signature to be verified. + */ + function _verifySignature( + address account, + bytes32 messageHash, + bytes calldata signature + ) internal view returns (bool) { + // When the account is a smart contract, delegate signature verification. + if (account.code.length > 0) { + try IERC1271(account).isValidSignature(messageHash, signature) returns (bytes4 result) { + return result == IERC1271.isValidSignature.selector; + } catch {} + return false; + } + // When the account is an EoA, check signature validity. + address recoveredAddress = address(0); // Initialize local variable + if (signature.length == 65) { + //slither-disable-next-line unused-return + (recoveredAddress, , ) = messageHash.tryRecover(signature); + } else if (signature.length == 64) { + //slither-disable-next-line unused-return + (recoveredAddress, , ) = messageHash.tryRecover( // short signature + bytes32(signature[:32]), + bytes32(signature[32:]) + ); + } else { + revert("invalid-signature-format"); + } + return recoveredAddress == account; + } + + /** + * @notice Verify that a message hash is presigned by a particular account. + * @param account The expected presigner account. + * @param messageHash The message hash that was presigned. + */ + function _verifyPresignature( + address account, + bytes32 messageHash + ) internal view returns (bool) { + return account != address(0) && account == m_presigned[messageHash]; + } + + /** + * @notice Verify that a message hash is signed or presigned by a particular account. + * @param account The expected signer or presigner account. + * @param messageHash The message hash that was signed or presigned. + * @param signature The signature to be verified. Not required for a presignature. + */ + function _verifySignatureOrPresignature( + address account, + bytes32 messageHash, + bytes calldata signature + ) internal view returns (bool) { + return + _verifyPresignature(account, messageHash) || + _verifySignature(account, messageHash, signature); + } + + /** + * @notice + * This function makes an external call to an untrusted contract. It has to + * be carefully called to avoid creating re-entrancy vulnerabilities. Calls to this function + * has to be done before updating state variables. + * + * @notice Verify that an account is authorized based on a given restriction. + * The given restriction can be: + * (1) `0x`: No restriction, accept any address; + * (2) `0x`: Only accept the exact same address; + * (3) `0x`: Accept any address in a group (having + * the given `GROUPMEMBER` purpose) inside an ERC734 Key Manager identity + * contract. + * @param restriction A simple address or an ERC734 identity contract + * that might whitelist a given address in a group. + * @param account An address to be checked. + */ + function _isAccountAuthorizedByRestriction( + address restriction, + address account + ) internal view returns (bool) { + if ( + restriction == address(0) || // No restriction + restriction == account // Simple address restriction + ) { + return true; + } + if (restriction.code.length > 0) { + try + IERC734(restriction).keyHasPurpose( // ERC734 identity contract restriction + bytes32(uint256(uint160(account))), + GROUPMEMBER_PURPOSE + ) + returns (bool success) { + return success; + } catch {} + } + return false; + } +} diff --git a/contracts/modules/interfaces/IexecOrderManagement.v8.sol b/contracts/modules/interfaces/IexecOrderManagement.v8.sol new file mode 100644 index 000000000..b8c9fdfe5 --- /dev/null +++ b/contracts/modules/interfaces/IexecOrderManagement.v8.sol @@ -0,0 +1,25 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IexecLibOrders_v5} from "../../libs/IexecLibOrders_v5.sol"; + +interface IexecOrderManagement { + event SignedAppOrder(bytes32 appHash); + event SignedDatasetOrder(bytes32 datasetHash); + event SignedWorkerpoolOrder(bytes32 workerpoolHash); + event SignedRequestOrder(bytes32 requestHash); + event ClosedAppOrder(bytes32 appHash); + event ClosedDatasetOrder(bytes32 datasetHash); + event ClosedWorkerpoolOrder(bytes32 workerpoolHash); + event ClosedRequestOrder(bytes32 requestHash); + + function manageAppOrder(IexecLibOrders_v5.AppOrderOperation calldata) external; + + function manageDatasetOrder(IexecLibOrders_v5.DatasetOrderOperation calldata) external; + + function manageWorkerpoolOrder(IexecLibOrders_v5.WorkerpoolOrderOperation calldata) external; + + function manageRequestOrder(IexecLibOrders_v5.RequestOrderOperation calldata) external; +} diff --git a/contracts/modules/interfaces/IexecPoco1.sol b/contracts/modules/interfaces/IexecPoco1.sol index 9849e4130..47827c53e 100644 --- a/contracts/modules/interfaces/IexecPoco1.sol +++ b/contracts/modules/interfaces/IexecPoco1.sol @@ -1,39 +1,49 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH // SPDX-License-Identifier: Apache-2.0 -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "../../libs/IexecLibOrders_v5.sol"; +interface IexecPoco1 { + event Reward(address owner, uint256 amount, bytes32 ref); + event Seize(address owner, uint256 amount, bytes32 ref); + event Lock(address owner, uint256 amount); + event Unlock(address owner, uint256 amount); + + event OrdersMatched( + bytes32 dealid, + bytes32 appHash, + bytes32 datasetHash, + bytes32 workerpoolHash, + bytes32 requestHash, + uint256 volume + ); + event SchedulerNotice(address indexed workerpool, bytes32 dealid); + event DealSponsored(bytes32 dealId, address sponsor); + + function verifySignature(address, bytes32, bytes calldata) external view returns (bool); + + function verifyPresignature(address, bytes32) external view returns (bool); -interface IexecPoco1 -{ - event Reward(address owner, uint256 amount, bytes32 ref); - event Seize (address owner, uint256 amount, bytes32 ref); - event Lock (address owner, uint256 amount); - event Unlock(address owner, uint256 amount); + function verifyPresignatureOrSignature( + address, + bytes32, + bytes calldata + ) external view returns (bool); - event OrdersMatched (bytes32 dealid, bytes32 appHash, bytes32 datasetHash, bytes32 workerpoolHash, bytes32 requestHash, uint256 volume); - event SchedulerNotice(address indexed workerpool, bytes32 dealid); + function matchOrders( + IexecLibOrders_v5.AppOrder calldata, + IexecLibOrders_v5.DatasetOrder calldata, + IexecLibOrders_v5.WorkerpoolOrder calldata, + IexecLibOrders_v5.RequestOrder calldata + ) external returns (bytes32); - function verifySignature(address,bytes32,bytes calldata) external view returns (bool); - function verifyPresignature(address,bytes32) external view returns (bool); - function verifyPresignatureOrSignature(address,bytes32,bytes calldata) external view returns (bool); - function matchOrders(IexecLibOrders_v5.AppOrder calldata,IexecLibOrders_v5.DatasetOrder calldata,IexecLibOrders_v5.WorkerpoolOrder calldata,IexecLibOrders_v5.RequestOrder calldata) external returns (bytes32); + function sponsorMatchOrders( + IexecLibOrders_v5.AppOrder calldata, + IexecLibOrders_v5.DatasetOrder calldata, + IexecLibOrders_v5.WorkerpoolOrder calldata, + IexecLibOrders_v5.RequestOrder calldata + ) external returns (bytes32); } diff --git a/contracts/modules/interfaces/IexecPoco1.v8.sol b/contracts/modules/interfaces/IexecPoco1.v8.sol new file mode 100644 index 000000000..73d70352e --- /dev/null +++ b/contracts/modules/interfaces/IexecPoco1.v8.sol @@ -0,0 +1,43 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IexecLibOrders_v5} from "../../libs/IexecLibOrders_v5.sol"; + +interface IexecPoco1 { + event SchedulerNotice(address indexed workerpool, bytes32 dealid); + event OrdersMatched( + bytes32 dealid, + bytes32 appHash, + bytes32 datasetHash, + bytes32 workerpoolHash, + bytes32 requestHash, + uint256 volume + ); + event DealSponsored(bytes32 dealId, address sponsor); + + function verifySignature(address, bytes32, bytes calldata) external view returns (bool); + + function verifyPresignature(address, bytes32) external view returns (bool); + + function verifyPresignatureOrSignature( + address, + bytes32, + bytes calldata + ) external view returns (bool); + + function matchOrders( + IexecLibOrders_v5.AppOrder calldata, + IexecLibOrders_v5.DatasetOrder calldata, + IexecLibOrders_v5.WorkerpoolOrder calldata, + IexecLibOrders_v5.RequestOrder calldata + ) external returns (bytes32); + + function sponsorMatchOrders( + IexecLibOrders_v5.AppOrder calldata, + IexecLibOrders_v5.DatasetOrder calldata, + IexecLibOrders_v5.WorkerpoolOrder calldata, + IexecLibOrders_v5.RequestOrder calldata + ) external returns (bytes32); +} diff --git a/contracts/modules/interfaces/IexecPoco2.sol b/contracts/modules/interfaces/IexecPoco2.sol index 269420e21..b39b88822 100644 --- a/contracts/modules/interfaces/IexecPoco2.sol +++ b/contracts/modules/interfaces/IexecPoco2.sol @@ -1,51 +1,61 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH // SPDX-License-Identifier: Apache-2.0 -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; +interface IexecPoco2 { + event Reward(address owner, uint256 amount, bytes32 ref); + event Seize(address owner, uint256 amount, bytes32 ref); + event Lock(address owner, uint256 amount); + event Unlock(address owner, uint256 amount); + + event AccurateContribution(address indexed worker, bytes32 indexed taskid); + event FaultyContribution(address indexed worker, bytes32 indexed taskid); + + event TaskInitialize(bytes32 indexed taskid, address indexed workerpool); + event TaskContribute(bytes32 indexed taskid, address indexed worker, bytes32 hash); + event TaskConsensus(bytes32 indexed taskid, bytes32 consensus); + event TaskReveal(bytes32 indexed taskid, address indexed worker, bytes32 digest); + event TaskFinalize(bytes32 indexed taskid, bytes results); + event TaskClaimed(bytes32 indexed taskid); + event TaskReopen(bytes32 indexed taskid); + + function initialize(bytes32, uint256) external returns (bytes32); + + function claim(bytes32) external; + + function contribute( + bytes32, + bytes32, + bytes32, + address, + bytes calldata, + bytes calldata + ) external; + + function contributeAndFinalize( + bytes32, + bytes32, + bytes calldata, + bytes calldata, + address, + bytes calldata, + bytes calldata + ) external; // Expansion - result separation + + function reveal(bytes32, bytes32) external; + + function reopen(bytes32) external; + + function finalize(bytes32, bytes calldata, bytes calldata) external; + + function initializeArray(bytes32[] calldata, uint256[] calldata) external returns (bool); + + function claimArray(bytes32[] calldata) external returns (bool); -interface IexecPoco2 -{ - event Reward(address owner, uint256 amount, bytes32 ref); - event Seize (address owner, uint256 amount, bytes32 ref); - event Lock (address owner, uint256 amount); - event Unlock(address owner, uint256 amount); - - event AccurateContribution(address indexed worker, bytes32 indexed taskid); - event FaultyContribution (address indexed worker, bytes32 indexed taskid); - - event TaskInitialize(bytes32 indexed taskid, address indexed workerpool); - event TaskContribute(bytes32 indexed taskid, address indexed worker, bytes32 hash); - event TaskConsensus (bytes32 indexed taskid, bytes32 consensus); - event TaskReveal (bytes32 indexed taskid, address indexed worker, bytes32 digest); - event TaskFinalize (bytes32 indexed taskid, bytes results); - event TaskClaimed (bytes32 indexed taskid); - event TaskReopen (bytes32 indexed taskid); - - function initialize(bytes32,uint256) external returns (bytes32); - function claim(bytes32) external; - function contribute(bytes32,bytes32,bytes32,address,bytes calldata,bytes calldata) external; - function contributeAndFinalize(bytes32,bytes32,bytes calldata,bytes calldata,address,bytes calldata,bytes calldata) external; // Expansion - result separation - function reveal(bytes32,bytes32) external; - function reopen(bytes32) external; - function finalize(bytes32,bytes calldata,bytes calldata) external; - function initializeArray(bytes32[] calldata,uint256[] calldata) external returns (bool); - function claimArray(bytes32[] calldata) external returns (bool); - function initializeAndClaimArray(bytes32[] calldata,uint256[] calldata) external returns (bool); + function initializeAndClaimArray( + bytes32[] calldata, + uint256[] calldata + ) external returns (bool); } diff --git a/contracts/modules/interfaces/IexecPoco2.v8.sol b/contracts/modules/interfaces/IexecPoco2.v8.sol new file mode 100644 index 000000000..f08e2ba37 --- /dev/null +++ b/contracts/modules/interfaces/IexecPoco2.v8.sol @@ -0,0 +1,61 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +interface IexecPoco2 { + event TaskInitialize(bytes32 indexed taskId, address indexed workerpool); + event TaskContribute(bytes32 indexed taskId, address indexed worker, bytes32 hash); + event TaskConsensus(bytes32 indexed taskId, bytes32 consensus); + event TaskReveal(bytes32 indexed taskId, address indexed worker, bytes32 digest); + event AccurateContribution(address indexed worker, bytes32 indexed taskId); + event FaultyContribution(address indexed worker, bytes32 indexed taskId); + event TaskReopen(bytes32 indexed taskId); + event TaskFinalize(bytes32 indexed taskId, bytes results); + event TaskClaimed(bytes32 indexed taskId); + + function initialize(bytes32 dealId, uint256 index) external returns (bytes32); + + function initializeArray( + bytes32[] calldata dealIds, + uint256[] calldata indexes + ) external returns (bool); + + function initializeAndClaimArray( + bytes32[] calldata dealIds, + uint256[] calldata indexes + ) external returns (bool); + + function contribute( + bytes32 taskId, + bytes32 resultHash, + bytes32 resultSeal, + address enclaveChallenge, + bytes calldata enclaveSign, + bytes calldata authorizationSign + ) external; + + function contributeAndFinalize( + bytes32 taskId, + bytes32 resultDigest, + bytes calldata results, + bytes calldata resultsCallback, // Expansion - result separation + address enclaveChallenge, + bytes calldata enclaveSign, + bytes calldata authorizationSign + ) external; + + function reveal(bytes32 taskId, bytes32 resultDigest) external; + + function reopen(bytes32 taskId) external; + + function finalize( + bytes32 taskId, + bytes calldata results, + bytes calldata resultsCallback + ) external; + + function claim(bytes32 taskId) external; + + function claimArray(bytes32[] calldata taskIds) external returns (bool); +} diff --git a/contracts/modules/interfaces/IexecPocoAccessors.sol b/contracts/modules/interfaces/IexecPocoAccessors.sol new file mode 100644 index 000000000..7907cc1eb --- /dev/null +++ b/contracts/modules/interfaces/IexecPocoAccessors.sol @@ -0,0 +1,20 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IexecLibCore_v5} from "../../libs/IexecLibCore_v5.sol"; +import {IexecLibOrders_v5} from "../../libs/IexecLibOrders_v5.sol"; + +interface IexecPocoAccessors { + function viewDeal(bytes32 id) external view returns (IexecLibCore_v5.Deal memory); + + function viewTask(bytes32 id) external view returns (IexecLibCore_v5.Task memory); + + function computeDealVolume( + IexecLibOrders_v5.AppOrder calldata appOrder, + IexecLibOrders_v5.DatasetOrder calldata datasetOrder, + IexecLibOrders_v5.WorkerpoolOrder calldata workerpoolOrder, + IexecLibOrders_v5.RequestOrder calldata requestOrder + ) external view returns (uint256); +} diff --git a/contracts/modules/interfaces/IexecPocoBoost.sol b/contracts/modules/interfaces/IexecPocoBoost.sol new file mode 100644 index 000000000..ab0dc65dc --- /dev/null +++ b/contracts/modules/interfaces/IexecPocoBoost.sol @@ -0,0 +1,104 @@ +// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IexecLibOrders_v5} from "../../libs/IexecLibOrders_v5.sol"; + +/** + * @title Interface definition of the PoCo Boost module. + */ +interface IexecPocoBoost { + /** + * @notice Emitted when a set of compatible orders are matched and a new deal is created. + * The event is watched by all workerpools, more precisely schedulers. Each scheduler + * responds only to events with their own workerpool address. This triggers the + * offchain computation process. + * @dev This event has to be different from "SchedulerNotice" of Poco Classic so schedulers + * are able to distinguish deals (Classic vs Boost). + * @param workerpool address of the target workerpool. + * @param dealId id of the deal created by match orders operation + * @param app address of the application to run. + * @param dataset address of the dataset to use. Can be address(0) for deals without dataset. + * @param category size of the deal (duration in time). + * @param tag type of the deal. Must be TEE tag for Boost module. + * @param params requester input of the execution. + * @param beneficiary address of the execution beneficiary. Used later for result encryption. + */ + event SchedulerNoticeBoost( + address indexed workerpool, + bytes32 dealId, + address app, + address dataset, + uint256 category, + bytes32 tag, + string params, + address beneficiary + ); + + /** + * @notice Emitted when a set of compatible orders are matched and a new deal is created. + * An event that is watched by different actors especially the offchain marketplace + * to update remaining volumes of available orders. + * Note: This is the same event as Poco Classic for cross-compatibility purposes. No need + * to use a new different event name. + * @param dealid id of the deal created by match orders operation. + * @param appHash hash of the app order. + * @param datasetHash hash of the dataset order. Can be empty for deals without a dataset. + * @param workerpoolHash hash of the workerpool order. + * @param requestHash hash of the request order. + * @param volume consumed volume. It should be the minimum volume of all orders. + */ + event OrdersMatched( + bytes32 dealid, + bytes32 appHash, + bytes32 datasetHash, + bytes32 workerpoolHash, + bytes32 requestHash, + uint256 volume + ); + + /** + * @notice Emitted when a worker pushes the result of a computed task in Boost mode. + * It serves as a notification of task completion and result submission. + * @param dealId id of the deal created by match orders operation. + * @param index index of the task in the deal. + * @param results bytes of the result. + */ + event ResultPushedBoost(bytes32 dealId, uint256 index, bytes results); + + /** + * @notice Emitted when a task is claimed. Workerpool funds are seized. Requester is refunded. + * @dev The same event as PoCo classic for cross-compatibility purposes. + * @param taskid id of the task to be claimed. + */ + event TaskClaimed(bytes32 indexed taskid); + + event DealSponsoredBoost(bytes32 dealId, address sponsor); + + function matchOrdersBoost( + IexecLibOrders_v5.AppOrder calldata appOrder, + IexecLibOrders_v5.DatasetOrder calldata datasetOrder, + IexecLibOrders_v5.WorkerpoolOrder calldata workerpoolOrder, + IexecLibOrders_v5.RequestOrder calldata requestOrder + ) external returns (bytes32); + + function sponsorMatchOrdersBoost( + IexecLibOrders_v5.AppOrder calldata appOrder, + IexecLibOrders_v5.DatasetOrder calldata datasetOrder, + IexecLibOrders_v5.WorkerpoolOrder calldata workerpoolOrder, + IexecLibOrders_v5.RequestOrder calldata requestOrder + ) external returns (bytes32); + + function pushResultBoost( + bytes32 dealId, + uint256 index, + bytes calldata results, + bytes calldata resultsCallback, + bytes calldata authorizationSign, + address enclaveChallenge, + bytes calldata enclaveSign + ) external; + + function claimBoost(bytes32 dealId, uint256 index) external; +} diff --git a/contracts/modules/interfaces/IexecPocoBoostAccessors.sol b/contracts/modules/interfaces/IexecPocoBoostAccessors.sol new file mode 100644 index 000000000..5928ff723 --- /dev/null +++ b/contracts/modules/interfaces/IexecPocoBoostAccessors.sol @@ -0,0 +1,10 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IexecLibCore_v5} from "../../libs/IexecLibCore_v5.sol"; + +interface IexecPocoBoostAccessors { + function viewDealBoost(bytes32 id) external view returns (IexecLibCore_v5.DealBoost memory); +} diff --git a/contracts/registries/IRegistry.sol b/contracts/registries/IRegistry.sol index 2c25c2fda..02c899d0a 100644 --- a/contracts/registries/IRegistry.sol +++ b/contracts/registries/IRegistry.sol @@ -20,8 +20,7 @@ pragma solidity ^0.6.0; import "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol"; - -abstract contract IRegistry is IERC721Enumerable +interface IRegistry is IERC721Enumerable { - function isRegistered(address _entry) external virtual view returns (bool); + function isRegistered(address _entry) external view returns (bool); } diff --git a/contracts/registries/workerpools/IWorkerpool.v8.sol b/contracts/registries/workerpools/IWorkerpool.v8.sol new file mode 100644 index 000000000..2ed7c9d58 --- /dev/null +++ b/contracts/registries/workerpools/IWorkerpool.v8.sol @@ -0,0 +1,10 @@ +// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +interface IWorkerpool { + function m_schedulerRewardRatioPolicy() external returns (uint256); + + function m_workerStakeRatioPolicy() external returns (uint256); +} diff --git a/contracts/tools/testing/ERC1271Mock.sol b/contracts/tools/testing/ERC1271Mock.sol new file mode 100644 index 000000000..a20d91430 --- /dev/null +++ b/contracts/tools/testing/ERC1271Mock.sol @@ -0,0 +1,20 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts-v5/interfaces/IERC1271.sol"; + +contract ERC1271Mock is IERC1271 { + function isValidSignature( + bytes32, // message hash + bytes calldata signature + ) external pure override returns (bytes4 magicValue) { + if (bytes32(signature) == keccak256("valid-signature")) { + return magicValue = IERC1271.isValidSignature.selector; + } else if (bytes32(signature) == keccak256("invalid-signature")) { + return magicValue = bytes4(0); + } + revert("ERC1271Mock: invalid signature"); + } +} diff --git a/contracts/tools/testing/GasWasterClient.sol b/contracts/tools/testing/GasWasterClient.sol new file mode 100644 index 000000000..cbd923234 --- /dev/null +++ b/contracts/tools/testing/GasWasterClient.sol @@ -0,0 +1,21 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +/** + * @title Gas Waster Client + * @notice This client is for testing purposes only. It simulates a callback + * consumer client which tries to consume as much gas as available. + */ +contract GasWasterClient { + event GotResult(bytes32 indexed id, bytes result); + uint256 public counter; + + function receiveResult(bytes32 id, bytes calldata result) external { + for (uint i; i < 1000; i++) { + counter++; + } + emit GotResult(id, result); + } +} diff --git a/contracts/tools/testing/IexecEscrowTestContract.sol b/contracts/tools/testing/IexecEscrowTestContract.sol new file mode 100644 index 000000000..961abcf0b --- /dev/null +++ b/contracts/tools/testing/IexecEscrowTestContract.sol @@ -0,0 +1,28 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IexecEscrow} from "../../modules/delegates/IexecEscrow.v8.sol"; + +/** + * @notice a wrapper contract to make internal functions of + * IexecEscrow.v8 testable. + */ +contract IexecEscrowTestContract is IexecEscrow { + function lock_(address account, uint256 value) external { + lock(account, value); + } + + function unlock_(address account, uint256 value) external { + unlock(account, value); + } + + function reward_(address account, uint256 value, bytes32 ref) external { + reward(account, value, ref); + } + + function seize_(address account, uint256 value, bytes32 ref) external { + seize(account, value, ref); + } +} diff --git a/contracts/tools/testing/IexecPocoBoostCompositeDelegate.sol b/contracts/tools/testing/IexecPocoBoostCompositeDelegate.sol new file mode 100644 index 000000000..4b465850d --- /dev/null +++ b/contracts/tools/testing/IexecPocoBoostCompositeDelegate.sol @@ -0,0 +1,17 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IexecPocoAccessorsDelegate} from "../../modules/delegates/IexecPocoAccessorsDelegate.sol"; +import {IexecPocoBoostAccessorsDelegate} from "../../modules/delegates/IexecPocoBoostAccessorsDelegate.sol"; +import {IexecPocoBoostDelegate} from "../../modules/delegates/IexecPocoBoostDelegate.sol"; + +/** + * @notice This contract is dedicated to unit testing. + */ +contract IexecPocoBoostCompositeDelegate is + IexecPocoAccessorsDelegate, + IexecPocoBoostAccessorsDelegate, + IexecPocoBoostDelegate +{} diff --git a/contracts/tools/testing/IexecPocoCompositeDelegate.sol b/contracts/tools/testing/IexecPocoCompositeDelegate.sol new file mode 100644 index 000000000..9fd3868d2 --- /dev/null +++ b/contracts/tools/testing/IexecPocoCompositeDelegate.sol @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IexecPocoAccessorsDelegate} from "../../modules/delegates/IexecPocoAccessorsDelegate.sol"; +import {IexecPoco1Delegate} from "../../modules/delegates/IexecPoco1Delegate.sol"; + +/** + * @notice This contract is dedicated to unit testing. + */ +contract IexecPocoCompositeDelegate is IexecPoco1Delegate, IexecPocoAccessorsDelegate {} diff --git a/contracts/tools/testing/OwnableMock.sol b/contracts/tools/testing/OwnableMock.sol new file mode 100644 index 000000000..7e396ff65 --- /dev/null +++ b/contracts/tools/testing/OwnableMock.sol @@ -0,0 +1,10 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts-v5/access/Ownable.sol"; + +contract OwnableMock is Ownable { + constructor() Ownable(msg.sender) {} +} diff --git a/contracts/tools/testing/slither/Slither.sol b/contracts/tools/testing/slither/Slither.sol new file mode 100644 index 000000000..18f086949 --- /dev/null +++ b/contracts/tools/testing/slither/Slither.sol @@ -0,0 +1,18 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IexecPocoAccessorsDelegate} from "../../../modules/delegates/IexecPocoAccessorsDelegate.sol"; +import {IexecPoco1Delegate} from "../../../modules/delegates/IexecPoco1Delegate.sol"; +import {IexecPoco2Delegate} from "../../../modules/delegates/IexecPoco2Delegate.sol"; + +/** + * @notice This contract is dedicated to slither analysis. + * + * @dev This contract aggregates multiple delegate contracts into a single entry point + * to facilitate static analysis using Slither. + */ +//slither-disable-start unused-state +contract Slither is IexecPocoAccessorsDelegate, IexecPoco1Delegate, IexecPoco2Delegate {} +//slither-disable-end unused-state diff --git a/contracts/tools/testing/slither/SlitherBoost.sol b/contracts/tools/testing/slither/SlitherBoost.sol new file mode 100644 index 000000000..94b466937 --- /dev/null +++ b/contracts/tools/testing/slither/SlitherBoost.sol @@ -0,0 +1,17 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import {IexecPocoBoostAccessorsDelegate} from "../../../modules/delegates/IexecPocoBoostAccessorsDelegate.sol"; +import {IexecPocoBoostDelegate} from "../../../modules/delegates/IexecPocoBoostDelegate.sol"; + +/** + * @notice This contract is dedicated to slither analysis. + * + * @dev This contract aggregates multiple delegate contracts into a single entry point + * to facilitate static analysis using Slither. + */ +//slither-disable-start unused-state +contract SlitherBoost is IexecPocoBoostDelegate, IexecPocoBoostAccessorsDelegate {} +//slither-disable-end unused-state diff --git a/deploy/0_deploy.ts b/deploy/0_deploy.ts new file mode 100644 index 000000000..f9cd8d2c6 --- /dev/null +++ b/deploy/0_deploy.ts @@ -0,0 +1,283 @@ +// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import fs from 'fs'; +import hre, { ethers } from 'hardhat'; +import path from 'path'; +import { getFunctionSignatures } from '../migrations/utils/getFunctionSignatures'; +import { + AppRegistry__factory, + DatasetRegistry__factory, + ENSIntegrationDelegate__factory, + ERC1538Proxy__factory, + ERC1538Query, + ERC1538QueryDelegate__factory, + ERC1538Query__factory, + ERC1538Update, + ERC1538UpdateDelegate__factory, + ERC1538Update__factory, + IexecAccessorsABILegacyDelegate__factory, + IexecAccessorsDelegate__factory, + IexecAccessors__factory, + IexecCategoryManagerDelegate__factory, + IexecCategoryManager__factory, + IexecERC20Delegate__factory, + IexecEscrowNativeDelegate__factory, + IexecEscrowTokenDelegate__factory, + IexecLibOrders_v5__factory, + IexecMaintenanceDelegate__factory, + IexecMaintenanceExtraDelegate__factory, + IexecOrderManagementDelegate__factory, + IexecPoco1Delegate__factory, + IexecPoco2Delegate__factory, + IexecPocoAccessorsDelegate__factory, + IexecPocoBoostAccessorsDelegate__factory, + IexecPocoBoostDelegate__factory, + IexecRelayDelegate__factory, + RLC__factory, + WorkerpoolRegistry__factory, +} from '../typechain'; +import { Ownable__factory } from '../typechain/factories/@openzeppelin/contracts/access'; +import { FactoryDeployerHelper } from '../utils/FactoryDeployerHelper'; +import { getBaseNameFromContractFactory } from '../utils/deploy-tools'; +import { Category } from '../utils/poco-tools'; +const CONFIG = require('../config/config.json'); + +/** + * @dev Deploying contracts with `npx hardhat deploy` task brought by + * `hardhat-deploy` plugin. + * Previous deployments made with `npx hardhat run scripts/deploy.ts` used to + * hang at the end of deployments (terminal did not return at the end). + * + * Note: + * The`hardhat-deploy` plugin is currently being under used compared to all + * features available in it. + */ +module.exports = async function () { + console.log('Deploying PoCo..'); + const chainId = (await ethers.provider.getNetwork()).chainId; + const [owner] = await hre.ethers.getSigners(); + const deploymentOptions = CONFIG.chains[chainId] || CONFIG.chains.default; + const salt = process.env.SALT || deploymentOptions.v5.salt || ethers.constants.HashZero; + const factoryDeployer = new FactoryDeployerHelper(owner, salt); + // Deploy RLC + const isTokenMode = deploymentOptions.asset == 'Token'; + let rlcInstanceAddress = isTokenMode + ? await getOrDeployRlc(deploymentOptions.token, owner) // token + : ethers.constants.AddressZero; // native + console.log(`RLC: ${rlcInstanceAddress}`); + // Deploy ERC1538 proxy contracts + const erc1538UpdateAddress = await factoryDeployer.deployWithFactory( + new ERC1538UpdateDelegate__factory(), + ); + const transferOwnershipCall = await Ownable__factory.connect( + ethers.constants.AddressZero, // any is fine + owner, // any is fine + ) + .populateTransaction.transferOwnership(owner.address) + .then((tx) => tx.data) + .catch(() => { + throw new Error('Failed to prepare transferOwnership data'); + }); + const erc1538ProxyAddress = await factoryDeployer.deployWithFactory( + new ERC1538Proxy__factory(), + [erc1538UpdateAddress], + transferOwnershipCall, + ); + // Save addresses of deployed PoCo contracts for later use + saveDeployedAddress('ERC1538Proxy', erc1538ProxyAddress); + const erc1538: ERC1538Update = ERC1538Update__factory.connect(erc1538ProxyAddress, owner); + console.log(`IexecInstance found at address: ${erc1538.address}`); + // Deploy library & modules + const iexecLibOrdersAddress = await factoryDeployer.deployWithFactory( + new IexecLibOrders_v5__factory(), + ); + const iexecLibOrders = { + ['contracts/libs/IexecLibOrders_v5.sol:IexecLibOrders_v5']: iexecLibOrdersAddress, + }; + const modules = [ + new ERC1538QueryDelegate__factory(), + new IexecAccessorsDelegate__factory(), + new IexecAccessorsABILegacyDelegate__factory(), + new IexecCategoryManagerDelegate__factory(), + new IexecERC20Delegate__factory(), + isTokenMode + ? new IexecEscrowTokenDelegate__factory() + : new IexecEscrowNativeDelegate__factory(), + new IexecMaintenanceDelegate__factory(iexecLibOrders), + new IexecOrderManagementDelegate__factory(iexecLibOrders), + new IexecPoco1Delegate__factory(iexecLibOrders), + new IexecPoco2Delegate__factory(), + new IexecRelayDelegate__factory(), + new ENSIntegrationDelegate__factory(), + new IexecMaintenanceExtraDelegate__factory(), + new IexecPocoAccessorsDelegate__factory(iexecLibOrders), + new IexecPocoBoostDelegate__factory(iexecLibOrders), + new IexecPocoBoostAccessorsDelegate__factory(), + ]; + for (const module of modules) { + const address = await factoryDeployer.deployWithFactory(module); + await linkContractToProxy(erc1538, address, module); + } + // Verify linking on ERC1538Proxy + const erc1538QueryInstance: ERC1538Query = ERC1538Query__factory.connect( + erc1538ProxyAddress, + owner, + ); + const functionCount = await erc1538QueryInstance.totalFunctions(); + console.log(`The deployed ERC1538Proxy now supports ${functionCount} functions:`); + for (let i = 0; i < functionCount.toNumber(); i++) { + const [method, , contract] = await erc1538QueryInstance.functionByIndex(i); + console.log(`[${i}] ${contract} ${method}`); + } + const appRegistryAddress = await factoryDeployer.deployWithFactory( + new AppRegistry__factory(), + [], + transferOwnershipCall, + ); + const datasetRegistryAddress = await factoryDeployer.deployWithFactory( + new DatasetRegistry__factory(), + [], + transferOwnershipCall, + ); + const workerpoolRegistryAddress = await factoryDeployer.deployWithFactory( + new WorkerpoolRegistry__factory(), + [], + transferOwnershipCall, + ); + + const appRegistryInstance = AppRegistry__factory.connect(appRegistryAddress, owner); + const datasetRegistryInstance = DatasetRegistry__factory.connect(datasetRegistryAddress, owner); + const workerpoolRegistryInstance = WorkerpoolRegistry__factory.connect( + workerpoolRegistryAddress, + owner, + ); + // Base URI configuration from config.json + const baseURIApp = CONFIG.registriesBaseUri.app; + const baseURIDataset = CONFIG.registriesBaseUri.dataset; + const baseURIWorkerpool = CONFIG.registriesBaseUri.workerpool; + // Check if registries have been initialized and set base URIs + if (!(await appRegistryInstance.initialized())) { + await appRegistryInstance + .initialize(deploymentOptions.v3.AppRegistry || ethers.constants.AddressZero) + .then((tx) => tx.wait()); + await appRegistryInstance.setBaseURI(`${baseURIApp}/${chainId}/`).then((tx) => tx.wait()); + } + if (!(await datasetRegistryInstance.initialized())) { + await datasetRegistryInstance + .initialize(deploymentOptions.v3.DatasetRegistry || ethers.constants.AddressZero) + .then((tx) => tx.wait()); + await datasetRegistryInstance + .setBaseURI(`${baseURIDataset}/${chainId}/`) + .then((tx) => tx.wait()); + } + if (!(await workerpoolRegistryInstance.initialized())) { + await workerpoolRegistryInstance + .initialize(deploymentOptions.v3.WorkerpoolRegistry || ethers.constants.AddressZero) + .then((tx) => tx.wait()); + await workerpoolRegistryInstance + .setBaseURI(`${baseURIWorkerpool}/${chainId}/`) + .then((tx) => tx.wait()); + } + + // Set main configuration + const iexecAccessorsInstance = IexecAccessors__factory.connect(erc1538ProxyAddress, owner); + const iexecInitialized = + (await iexecAccessorsInstance.eip712domain_separator()) != ethers.constants.HashZero; + if (!iexecInitialized) { + await IexecMaintenanceDelegate__factory.connect(erc1538ProxyAddress, owner) + .configure( + rlcInstanceAddress, + 'Staked RLC', + 'SRLC', + 9, // TODO: generic ? + appRegistryAddress, + datasetRegistryAddress, + workerpoolRegistryAddress, + ethers.constants.AddressZero, + ) + .then((tx) => tx.wait()); + } + // Set categories + const catCountBefore = await iexecAccessorsInstance.countCategory(); + const categories = CONFIG.categories as Category[]; + for (let i = catCountBefore.toNumber(); i < categories.length; i++) { + const category = categories[i]; + await IexecCategoryManager__factory.connect(erc1538ProxyAddress, owner) + .createCategory( + category.name, + JSON.stringify(category.description), + category.workClockTimeRef, + ) + .then((tx) => tx.wait()); + } + const catCountAfter = await iexecAccessorsInstance.countCategory(); + console.log(`countCategory is now: ${catCountAfter} (was ${catCountBefore})`); + for (let i = 0; i < catCountAfter.toNumber(); i++) { + console.log(`Category ${i}: ${await iexecAccessorsInstance.viewCategory(i)}`); + } +}; + +async function getOrDeployRlc(token: string, owner: SignerWithAddress) { + return token // token + ? token + : await new RLC__factory() + .connect(owner) + .deploy() + .then((contract) => { + contract.deployed(); + return contract.address; + }); +} + +/** + * Link a contract to an ERC1538 proxy. + * @param proxy contract to ERC1538 proxy. + * @param contractAddress The contract address to link to the proxy. + * @param contractFactory The contract factory to link to the proxy. + */ +async function linkContractToProxy( + proxy: ERC1538Update, + contractAddress: string, + contractFactory: any, +) { + const contractName = getBaseNameFromContractFactory(contractFactory); + await proxy + .updateContract( + contractAddress, + // TODO: Use contractFactory.interface.functions when moving to ethers@v6 + // https://github.com/ethers-io/ethers.js/issues/1069 + getFunctionSignatures(contractFactory.constructor.abi), + 'Linking ' + contractName, + ) + .then((tx) => tx.wait()) + .catch(() => { + throw new Error(`Failed to link ${contractName}`); + }); +} + +// TODO [optional]: Use hardhat-deploy to save addresses automatically +// https://github.com/wighawag/hardhat-deploy/tree/master#hardhat-deploy-in-a-nutshell +/** + * Save addresses of deployed contracts (since hardhat does not do it for us). + * @param contractName contract name to deploy + * @param deployedAddress address where contract where deployed + */ +function saveDeployedAddress(contractName: string, deployedAddress: string) { + const chainId = hre.network.config.chainId || 0; + const BUILD_DIR = '../build'; + fs.writeFileSync( + path.resolve(__dirname, BUILD_DIR, `${contractName}.json`), + JSON.stringify({ + networks: { + [chainId]: { + address: deployedAddress, + }, + }, + }), + ); + console.log(`Saved deployment at ${deployedAddress} for ${contractName}`); +} + +module.exports.tags = ['IexecPocoBoostDelegate']; diff --git a/deploy/1_deploy-ens.ts b/deploy/1_deploy-ens.ts new file mode 100644 index 000000000..a8f1c934a --- /dev/null +++ b/deploy/1_deploy-ens.ts @@ -0,0 +1,141 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import hre, { deployments, ethers } from 'hardhat'; +import { + ENS, + ENSIntegration__factory, + ENSRegistry__factory, + FIFSRegistrar, + FIFSRegistrar__factory, + IexecAccessors__factory, + PublicResolver, + PublicResolver__factory, + ReverseRegistrar, + ReverseRegistrar__factory, +} from '../typechain'; +import { deploy } from '../utils/deploy-tools'; + +module.exports = async function () { + console.log('Deploying and configuring ENS..'); + const chainId = (await ethers.provider.getNetwork()).chainId; + if (chainId < 1000) { + // skip ENS setup for mainnet and testnet + console.log('Skipping ENS for public networks'); + return; + } + const [owner] = await hre.ethers.getSigners(); + const erc1538ProxyAddress = (await deployments.get('ERC1538Proxy')).address; + const iexecAccessorsInstance = IexecAccessors__factory.connect(erc1538ProxyAddress, owner); + const appRegistryAddress = await iexecAccessorsInstance.appregistry(); + const datasetRegistryAddress = await iexecAccessorsInstance.datasetregistry(); + const workerpoolRegistryAddress = await iexecAccessorsInstance.workerpoolregistry(); + const ens = (await deploy(new ENSRegistry__factory(), owner, [])) as ENS; + const resolver = (await deploy(new PublicResolver__factory(), owner, [ + ens.address, + ])) as PublicResolver; + const reverseRegistrar = (await deploy(new ReverseRegistrar__factory(), owner, [ + ens.address, + resolver.address, + ])) as ReverseRegistrar; + const registrars: { [name: string]: FIFSRegistrar } = {}; + // root registrar + await registerDomain(''); + await registrars[''].register(labelhash('reverse'), owner.address).then((tx) => tx.wait()); + await ens + .setSubnodeOwner( + ethers.utils.namehash('reverse'), + labelhash('addr'), + reverseRegistrar.address, + ) + .then((tx) => tx.wait()); + await registerDomain('eth'); + await registerDomain('iexec', 'eth'); + await registerDomain('v5', 'iexec.eth'); + await registerDomain('users', 'iexec.eth'); + await registerDomain('apps', 'iexec.eth'); + await registerDomain('datasets', 'iexec.eth'); + await registerDomain('pools', 'iexec.eth'); + await registerAddress('admin', 'iexec.eth', owner.address); + await registerAddress('rlc', 'iexec.eth', await iexecAccessorsInstance.token()); + await registerAddress('core', 'v5.iexec.eth', erc1538ProxyAddress); + await registerAddress('apps', 'v5.iexec.eth', appRegistryAddress); + await registerAddress('datasets', 'v5.iexec.eth', datasetRegistryAddress); + await registerAddress('workerpools', 'v5.iexec.eth', workerpoolRegistryAddress); + await reverseRegistrar.setName('admin.iexec.eth').then((tx) => tx.wait()); + await setReverseName(erc1538ProxyAddress, 'core.v5.iexec.eth'); + await setReverseName(appRegistryAddress, 'apps.v5.iexec.eth'); + await setReverseName(datasetRegistryAddress, 'datasets.v5.iexec.eth'); + await setReverseName(workerpoolRegistryAddress, 'workerpools.v5.iexec.eth'); + + /** + * Register domain on ENS. + */ + async function registerDomain(label: string, domain: string = '') { + const name = domain ? `${label}.${domain}` : `${label}`; + const labelHash = label ? labelhash(label) : ethers.constants.HashZero; + const nameHash = name ? ethers.utils.namehash(name) : ethers.constants.HashZero; + const existingRegistrarAddress = await ens.owner(nameHash); + let registrar; + if ((await ethers.provider.getCode(existingRegistrarAddress)) == '0x') { + registrar = (await deploy( + new FIFSRegistrar__factory(), + owner, + [ens.address, nameHash], + { quiet: true }, + )) as FIFSRegistrar; + if (!!name) { + await registrars[domain] + .register(labelHash, registrar.address) + .then((tx) => tx.wait()); + } else { + await ens.setOwner(nameHash, registrar.address).then((tx) => tx.wait()); + } + } else { + registrar = FIFSRegistrar__factory.connect(existingRegistrarAddress, ethers.provider); + } + registrars[name] = registrar; + console.log(`FIFSRegistrar for domain ${name}: ${registrars[name].address}`); + return registrar; + } + + /** + * Register address on ENS. + */ + async function registerAddress(label: string, domain: string, address: string) { + const name = `${label}.${domain}`; + const labelHash = labelhash(label); + const nameHash = ethers.utils.namehash(name); + // register as subdomain + await registrars[domain] + .connect(owner) + .register(labelHash, owner.address) + .then((tx) => tx.wait()); + // link to ens (resolver & addr) + await ens + .connect(owner) + .setResolver(nameHash, resolver.address) + .then((tx) => tx.wait()); + await resolver + .connect(owner) + ['setAddr(bytes32,uint256,bytes)'](nameHash, 60, address) + .then((tx) => tx.wait()); + } + + /** + * Set ENS reverse name of contract. + */ + async function setReverseName(contractAddress: string, name: string) { + await ENSIntegration__factory.connect(contractAddress, owner) + .setName(ens.address, name) + .then((tx) => tx.wait()); + } + + /** + * Hash a label for the ENS. + * See: https://docs.ens.domains/resolution/names#labelhash + */ + function labelhash(label: string) { + return ethers.utils.id(label.toLowerCase()); + } +}; diff --git a/deployments/bellecour/.chainId b/deployments/bellecour/.chainId new file mode 100644 index 000000000..fa59ff276 --- /dev/null +++ b/deployments/bellecour/.chainId @@ -0,0 +1 @@ +134 \ No newline at end of file diff --git a/deployments/bellecour/IexecOrderManagementDelegate.json b/deployments/bellecour/IexecOrderManagementDelegate.json new file mode 100644 index 000000000..8f533a968 --- /dev/null +++ b/deployments/bellecour/IexecOrderManagementDelegate.json @@ -0,0 +1,538 @@ +{ + "address": "0xDF63F026779E31AcD1DB4626b39Ea5148f7B9AA4", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "appHash", + "type": "bytes32" + } + ], + "name": "ClosedAppOrder", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "datasetHash", + "type": "bytes32" + } + ], + "name": "ClosedDatasetOrder", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "requestHash", + "type": "bytes32" + } + ], + "name": "ClosedRequestOrder", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "workerpoolHash", + "type": "bytes32" + } + ], + "name": "ClosedWorkerpoolOrder", + "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": false, + "internalType": "bytes32", + "name": "appHash", + "type": "bytes32" + } + ], + "name": "SignedAppOrder", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "datasetHash", + "type": "bytes32" + } + ], + "name": "SignedDatasetOrder", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "requestHash", + "type": "bytes32" + } + ], + "name": "SignedRequestOrder", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "workerpoolHash", + "type": "bytes32" + } + ], + "name": "SignedWorkerpoolOrder", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "app", + "type": "address" + }, + { + "internalType": "uint256", + "name": "appprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "datasetrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "workerpoolrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.AppOrder", + "name": "order", + "type": "tuple" + }, + { + "internalType": "enum IexecLibOrders_v5.OrderOperationEnum", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.AppOrderOperation", + "name": "_apporderoperation", + "type": "tuple" + } + ], + "name": "manageAppOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "dataset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "datasetprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "apprestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "workerpoolrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.DatasetOrder", + "name": "order", + "type": "tuple" + }, + { + "internalType": "enum IexecLibOrders_v5.OrderOperationEnum", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.DatasetOrderOperation", + "name": "_datasetorderoperation", + "type": "tuple" + } + ], + "name": "manageDatasetOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "app", + "type": "address" + }, + { + "internalType": "uint256", + "name": "appmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "dataset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "datasetmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "workerpool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "workerpoolmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trust", + "type": "uint256" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "callback", + "type": "address" + }, + { + "internalType": "string", + "name": "params", + "type": "string" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.RequestOrder", + "name": "order", + "type": "tuple" + }, + { + "internalType": "enum IexecLibOrders_v5.OrderOperationEnum", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.RequestOrderOperation", + "name": "_requestorderoperation", + "type": "tuple" + } + ], + "name": "manageRequestOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "workerpool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "workerpoolprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trust", + "type": "uint256" + }, + { + "internalType": "address", + "name": "apprestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "datasetrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.WorkerpoolOrder", + "name": "order", + "type": "tuple" + }, + { + "internalType": "enum IexecLibOrders_v5.OrderOperationEnum", + "name": "operation", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.WorkerpoolOrderOperation", + "name": "_workerpoolorderoperation", + "type": "tuple" + } + ], + "name": "manageWorkerpoolOrder", + "outputs": [], + "stateMutability": "nonpayable", + "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": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "numDeployments": 1, + "bytecode": "0x6080604052346200002657620000146200002b565b604051611be3620002668239611be390f35b600080fd5b6200003562000037565b565b62000035620000463362000050565b620000356200012c565b62000035906200003590620000ab565b6200007362000070620000709290565b90565b6001600160a01b031690565b620000709062000060565b620000959062000073565b9052565b6020810192916200003591906200008a565b6000620000b8816200007f565b90620000c48262000073565b620000cf8462000073565b14620000e357506200003591905062000203565b50604051620001049250631e4fbdf760e01b81529182916004830162000099565b0390fd5b6200011262000136565b62000035620000356200012660006200007f565b62000203565b6200003562000108565b6200014062000197565b339062000158620001518362000073565b9162000073565b03620001615750565b60405163118cdaa760e01b815290819062000104906004830162000099565b620000709062000073565b62000070905462000180565b6200007060006200018b565b620000709062000073906001600160a01b031682565b6200007090620001a3565b6200007090620001b9565b90620001e362000070620001ff92620001c4565b82546001600160a01b0319166001600160a01b03919091161790565b9055565b6200020f60006200018b565b906200021d816000620001cf565b620002546200024d7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e093620001c4565b91620001c4565b916200025f60405190565b600090a356fe6080604052600436101561001257600080fd5b60003560e01c80634b74710614610082578063715018a61461007d5780637e34a077146100785780638da5cb5b146100735780638dd971d51461006e578063b2b07e66146100695763f2fde38b03610095576101d3565b610188565b610170565b610131565b610107565b6100ef565b6100c3565b908160609103126100955790565b600080fd5b9060208282031261009557813567ffffffffffffffff8111610095576100c09201610087565b90565b34610095576100db6100d636600461009a565b610ba8565b604051005b0390f35b600091031261009557565b34610095576100ff3660046100e4565b6100db610223565b34610095576100db61011a36600461009a565b611006565b6001600160a01b031690565b9052565b565b34610095576101413660046100e4565b6100e06101566000546001600160a01b031690565b604051918291826001600160a01b03909116815260200190565b34610095576100db61018336600461009a565b611559565b34610095576100db61019b36600461009a565b6108a3565b6001600160a01b0381165b0361009557565b9050359061012f826101a0565b90602082820312610095576100c0916101b2565b34610095576100db6101e63660046101bf565b6102d8565b6101f361022b565b61012f610211565b61011f6100c06100c09290565b6100c0906101fb565b61012f61021e6000610208565b610337565b61012f6101eb565b6000546001600160a01b0316339061024b825b916001600160a01b031690565b036102535750565b60405163118cdaa760e01b81526001600160a01b03919091166004820152602490fd5b61012f9061028261022b565b600061028d81610208565b906001600160a01b0382166001600160a01b038416146102b3575061012f919050610337565b50604051631e4fbdf760e01b81526001600160a01b0391909116600482015260249150fd5b61012f90610276565b906001600160a01b03905b9181191691161790565b6100c09061011f906001600160a01b031682565b6100c0906102f6565b6100c09061030a565b9061032c6100c061033392610313565b82546102e1565b9055565b6000546001600160a01b03169061034f81600061031c565b61038261037c7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e093610313565b91610313565b9161038c60405190565b600090a3565b90359061011e193682900301821215610095570190565b356100c0816101a0565b634e487b7160e01b600052604160045260246000fd5b90601f01601f1916810190811067ffffffffffffffff8211176103eb57604052565b6103b3565b9050519061012f826101a0565b90602082820312610095576100c0916103f0565b6040513d6000823e3d90fd5b9061012f61042a60405190565b92836103c9565b806101ab565b9050359061012f82610431565b67ffffffffffffffff81116103eb57602090601f01601f19160190565b0190565b90826000939282370152565b9092919261048661048182610444565b61041d565b938185526020850190828401116100955761012f92610465565b9080601f83011215610095578160206100c093359101610471565b91909161012081840312610095576104d461012061041d565b9260006104e182846101b2565b9085015260206104f382828501610437565b90850152604061050582828501610437565b90850152606061051782828501610437565b908501526080610529828285016101b2565b9085015260a061053b828285016101b2565b9085015260c061054d828285016101b2565b9085015260e061055f82828501610437565b9085015261010082013567ffffffffffffffff81116100955761058292016104a0565b610100830152565b6002111561009557565b9050359061012f8261058a565b919091606081840312610095576105b8606061041d565b92813567ffffffffffffffff811161009557816105d69184016104bb565b845260206105e682848301610594565b90850152604082013567ffffffffffffffff81116100955761060892016104a0565b6040830152565b6100c09036906105a1565b9050519061012f82610431565b90602082820312610095576100c09161061a565b60005b83811061064e5750506000910152565b818101518382015260200161063e565b61067f61068860209361046193610673815190565b80835293849260200190565b9586910161063b565b601f01601f191690565b80516001600160a01b031682526100c091610120810191610100906106bc60208201516020850152565b6106cb60408201516040850152565b6106da60608201516060850152565b6080818101516001600160a01b03169084015260a0818101516001600160a01b03169084015260c0818101516001600160a01b03169084015261072260e082015160e0850152565b01519061010081840391015261065e565b634e487b7160e01b600052602160045260246000fd5b6002111561075357565b610733565b9061012f82610749565b6100c090610758565b61012b90610762565b805160608084526100c093916040916107909190840190610692565b926107a36020820151602085019061076b565b015190604081840391015261065e565b60208082526100c092910190610774565b903590601e193682900301821215610095570180359067ffffffffffffffff8211610095576020019136829003831361009557565b1561080057565b60405162461bcd60e51b815260206004820152601b60248201527f696e76616c69642d73656e6465722d6f722d7369676e617475726500000000006044820152606490fd5b6100c09036906104bb565b60208082526100c092910190610692565b356100c08161058a565b356100c081610431565b90600019906102ec565b6100c06100c06100c09290565b9061089c6100c06103339261087f565b8254610875565b6108e0908060206108c86108c38060006108bd8680610392565b016103a9565b610313565b638da5cb5b906108d760405190565b95869260e01b90565b825260049082905afa928315610abf57600093610b78575b506109023361011f565b6001600160a01b038416148015610ac4575b61093461092f610972936109296020946107f9565b85610392565b610845565b73e8b04c85c47fcec0e9ee30d4034e2997f6519123610967637c0d54d361095a60405190565b9586948593849360e01b90565b835260048301610850565b03915af48015610abf5761098e91600091610a91575b50611750565b916020820161099c81610861565b906000916109b26109ac84610758565b91610758565b03610a1157505060008381526011602052604090206109d1925061031c565b610a0c7f50933cf5a9c44d5ed66b895deb27212aa33d811b46a7b41093e047e213c0bcab916109ff60405190565b9182918290815260200190565b0390a1565b610a1c919250610861565b610a296109ac6001610758565b14610a3357505050565b6040610a4a83610a5093610a639550810190610392565b0161086b565b600083815260126020526040902061088c565b610a0c7f7343f75be43aba524f85326508cd975d016ef7884676377366c69a7c32e30668916109ff60405190565b610ab2915060203d8111610ab8575b610aaa81836103c9565b810190610627565b38610988565b503d610aa0565b610411565b50610b12906020610ad48461060f565b73e8b04c85c47fcec0e9ee30d4034e2997f6519123610b07636cf30b8b610afa60405190565b9687948593849360e01b90565b8352600483016107b3565b03915af4918215610abf5761092f602092610929610b55610b416109729761093496600091610b615750611750565b610b4e60408a018a6107c4565b918b611829565b94505093505050610914565b610ab29150883d8111610ab857610aaa81836103c9565b610b9a91935060203d8111610ba1575b610b9281836103c9565b8101906103fd565b91386108f8565b503d610b88565b610bc2908060206108c86108c38060006108bd8680610392565b825260049082905afa928315610abf57600093610d8f575b50610be43361011f565b6001600160a01b038416148015610d1e575b610c0b61092f610c31936109296020946107f9565b73e8b04c85c47fcec0e9ee30d4034e2997f65191236109676311b2eee261095a60405190565b03915af48015610abf57610c4c91600091610a915750611750565b9160208201610c5a81610861565b90600091610c6a6109ac84610758565b03610cb75750506000838152601160205260409020610c89925061031c565b610a0c7f79ce85909be2c590a728d1634ce6ec8a7cbf815260bacc05387890a313da8130916109ff60405190565b610cc2919250610861565b610ccf6109ac6001610758565b14610cd957505050565b6040610a4a83610a5093610cf09550810190610392565b610a0c7fcf52e3228bc482a6656d8ab56c09888b1c5bf6aaadba0185e96a34836f2bb1d4916109ff60405190565b50610d54906020610d2e8461060f565b73e8b04c85c47fcec0e9ee30d4034e2997f6519123610b07634118eb98610afa60405190565b03915af4918215610abf5761092f602092610929610d83610b41610c3197610c0b96600091610b615750611750565b94505093505050610bf6565b610da891935060203d8111610ba157610b9281836103c9565b9138610bda565b90359061015e193682900301821215610095570190565b9190916101608184031261009557610ddf61016061041d565b926000610dec82846101b2565b908501526020610dfe82828501610437565b908501526040610e1082828501610437565b908501526060610e2282828501610437565b908501526080610e3482828501610437565b9085015260a0610e4682828501610437565b9085015260c0610e58828285016101b2565b9085015260e0610e6a828285016101b2565b90850152610100610e7d828285016101b2565b90850152610120610e9082828501610437565b9085015261014082013567ffffffffffffffff811161009557610eb392016104a0565b610140830152565b91909160608184031261009557610ed2606061041d565b92813567ffffffffffffffff811161009557816105d6918401610dc6565b6100c0903690610ebb565b80516001600160a01b031682526100c09161016081019161014090610f2560208201516020850152565b610f3460408201516040850152565b610f4360608201516060850152565b610f5260808201516080850152565b610f6160a082015160a0850152565b60c0818101516001600160a01b03169084015260e0818101516001600160a01b031690840152610100818101516001600160a01b031690840152610fac610120820151610120850152565b01519061014081840391015261065e565b805160608084526100c093916040916107909190840190610efb565b60208082526100c092910190610fbd565b6100c0903690610dc6565b60208082526100c092910190610efb565b611020908060206108c86108c38060006108bd8680610daf565b825260049082905afa928315610abf5760009361120e575b506110423361011f565b6001600160a01b038416148015611192575b61107461106f6110a5936110696020946107f9565b85610daf565b610fea565b73e8b04c85c47fcec0e9ee30d4034e2997f651912361109a63fed985fe61095a60405190565b835260048301610ff5565b03915af48015610abf576110c091600091610a915750611750565b91602082016110ce81610861565b906000916110de6109ac84610758565b0361112b57505060008381526011602052604090206110fd925061031c565b610a0c7f3a61aabf2ab04790d082ff1e332853b2f66944c2e951a146121f80272812a476916109ff60405190565b611136919250610861565b6111436109ac6001610758565b1461114d57505050565b6040610a4a83610a50936111649550810190610daf565b610a0c7f145ad51e4496173bca15e24e7eb46f9ab3a10eea0497e2801a3a6806c06113a3916109ff60405190565b506111d39060206111a284610ef0565b73e8b04c85c47fcec0e9ee30d4034e2997f65191236111c8635b559f6a610afa60405190565b835260048301610fd9565b03915af4918215610abf5761106f602092611069611202610b416110a59761107496600091610b615750611750565b94505093505050611054565b61122791935060203d8111610ba157610b9281836103c9565b9138611038565b9035906101fe193682900301821215610095570190565b919091610200818403126100955761125e61020061041d565b92600061126b82846101b2565b90850152602061127d82828501610437565b90850152604061128f828285016101b2565b9085015260606112a182828501610437565b9085015260806112b3828285016101b2565b9085015260a06112c582828501610437565b9085015260c06112d7828285016101b2565b9085015260e06112e982828501610437565b908501526101006112fc82828501610437565b9085015261012061130f82828501610437565b9085015261014061132282828501610437565b90850152610160611335828285016101b2565b90850152610180611348828285016101b2565b908501526101a082013567ffffffffffffffff8111610095578161136d9184016104a0565b6101a08501526101c061138282828501610437565b908501526101e082013567ffffffffffffffff8111610095576113a592016104a0565b6101e0830152565b919091606081840312610095576113c4606061041d565b92813567ffffffffffffffff811161009557816105d6918401611245565b6100c09036906113ad565b80516001600160a01b031682526100c0916101e06114ed610200830161141860208601516020860152565b6040858101516001600160a01b03169085015261143a60608601516060860152565b6080858101516001600160a01b03169085015261145c60a086015160a0860152565b60c0858101516001600160a01b03169085015261147e60e086015160e0860152565b61148f610100860151610100860152565b6114a0610120860151610120860152565b6114b1610140860151610140860152565b610160858101516001600160a01b031690850152610180858101516001600160a01b0316908501526101a08501518482036101a086015261065e565b926114ff6101c08201516101c0850152565b0151906101e081840391015261065e565b805160608084526100c0939160409161079091908401906113ed565b60208082526100c092910190611510565b6100c0903690611245565b60208082526100c0929101906113ed565b8061156960c06108bd838061122e565b916115733361011f565b6001600160a01b0384161480156116c3575b6115a56115a06115d69361159a6020946107f9565b8561122e565b61153d565b73e8b04c85c47fcec0e9ee30d4034e2997f65191236115cb638ac03f3361095a60405190565b835260048301611548565b03915af48015610abf576115f191600091610a915750611750565b91602082016115ff81610861565b9060009161160f6109ac84610758565b0361165c575050600083815260116020526040902061162e925061031c565b610a0c7f3b0ac04165536d6b11d04220f998c840bd6e439d59c5d8721bba8a4e1fb9ebfd916109ff60405190565b611667919250610861565b6116746109ac6001610758565b1461167e57505050565b60e0610a4a83610a5093611695955081019061122e565b610a0c7f582f43f2a741cbe708aae3b8d38a4efc3d09d7e81919697b3ca693f4c444cc05916109ff60405190565b506117049060206116d3846113e2565b73e8b04c85c47fcec0e9ee30d4034e2997f65191236116f96320aabe53610afa60405190565b83526004830161152c565b03915af4918215610abf576115a060209261159a611733610b416115d6976115a596600091610b615750611750565b94505093505050611585565b6100c09081565b6100c0905461173f565b6100c09061175e6010611746565b6042916040519161190160f01b8352600283015260228201522090565b6001600160e01b031981166101ab565b9050519061012f8261177b565b90602082820312610095576100c09161178b565b9190610688816117c3816104619560209181520190565b8095610465565b9081526040602082018190526100c0939101916117ac565b90939293848311610095578411610095578101920390565b359060208110611808575090565b61181a90600019906020036008021b90565b1690565b6100c0913691610471565b9290916000843b61184061183c8361087f565b9190565b1161192d5761184e81610208565b508261185a604161087f565b81036118915750508261187861023e9361187e9361188d965061181e565b906119ce565b5050926001600160a01b031690565b1490565b919390916118a261183c604061087f565b036118e85761188d936118e26118d561023e9561187e95816020956118db6118d56118cc8961087f565b809585856117e2565b906117fa565b96506117e2565b91611a77565b60405162461bcd60e51b815260206004820152601860248201527f696e76616c69642d7369676e61747572652d666f726d617400000000000000006044820152606490fd5b93916119656119456108c38560209697959750610313565b91611970631626ba7e9161195860405190565b9788968795869560e01b90565b8552600485016117ca565b03915afa6000918161199e575b50611986575090565b630b135d3f60e11b91506001600160e01b0319161490565b6119c091925060203d81116119c7575b6119b881836103c9565b810190611798565b903861197d565b503d6119ae565b91906000926119db825190565b6119e861183c604161087f565b03611a1c57611a159293506119fb600090565b506020820151906060604084015193015160001a90611af3565b9192909190565b509150611a296000610208565b90611a3c611a376002945190565b61087f565b91929190565b6100c09061087f565b611a586100c06100c09290565b60ff1690565b6100c090611a7261183c6100c09460ff1690565b901c90565b611a15929190611ac0611abb611ab1611aa1611a996001600160ff1b0361087f565b871696611a42565b611aab60ff611a4b565b90611a5e565b610461601b61087f565b611a4b565b90611af3565b611aef61012f94610608606094989795611ae5608086019a6000870152565b60ff166020850152565b0152565b9091611afe84611a42565b611b2a61183c7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a061087f565b11611b995790611b4c60209460009493611b4360405190565b94859485611ac6565b838052039060015afa15610abf57600051600091611b6983610208565b6001600160a01b0381166001600160a01b03841614611b8c5750611a3c8361087f565b9150611a3c60019361087f565b505050611ba66000610208565b916003919056fea264697066735822122048adc3e7241a9316be75a81495e143f3d355f6668e4b80b9028792dd60a11f2e64736f6c63430008150033" +} \ No newline at end of file diff --git a/deployments/bellecour/IexecPoco1Delegate.json b/deployments/bellecour/IexecPoco1Delegate.json new file mode 100644 index 000000000..7537dac23 --- /dev/null +++ b/deployments/bellecour/IexecPoco1Delegate.json @@ -0,0 +1,891 @@ +{ + "address": "0x1eE1cceF893DF6c4D3FC4eCaF315F09183f3048c", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "dealId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "sponsor", + "type": "address" + } + ], + "name": "DealSponsored", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Lock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "dealid", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "appHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "datasetHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "workerpoolHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "requestHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "volume", + "type": "uint256" + } + ], + "name": "OrdersMatched", + "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": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "ref", + "type": "bytes32" + } + ], + "name": "Reward", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "workerpool", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "dealid", + "type": "bytes32" + } + ], + "name": "SchedulerNotice", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "ref", + "type": "bytes32" + } + ], + "name": "Seize", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Unlock", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "app", + "type": "address" + }, + { + "internalType": "uint256", + "name": "appprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "datasetrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "workerpoolrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.AppOrder", + "name": "_apporder", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "dataset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "datasetprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "apprestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "workerpoolrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.DatasetOrder", + "name": "_datasetorder", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "workerpool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "workerpoolprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trust", + "type": "uint256" + }, + { + "internalType": "address", + "name": "apprestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "datasetrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.WorkerpoolOrder", + "name": "_workerpoolorder", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "app", + "type": "address" + }, + { + "internalType": "uint256", + "name": "appmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "dataset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "datasetmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "workerpool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "workerpoolmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trust", + "type": "uint256" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "callback", + "type": "address" + }, + { + "internalType": "string", + "name": "params", + "type": "string" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.RequestOrder", + "name": "_requestorder", + "type": "tuple" + } + ], + "name": "matchOrders", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "app", + "type": "address" + }, + { + "internalType": "uint256", + "name": "appprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "datasetrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "workerpoolrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.AppOrder", + "name": "_apporder", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "dataset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "datasetprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "apprestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "workerpoolrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.DatasetOrder", + "name": "_datasetorder", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "workerpool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "workerpoolprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trust", + "type": "uint256" + }, + { + "internalType": "address", + "name": "apprestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "datasetrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.WorkerpoolOrder", + "name": "_workerpoolorder", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "app", + "type": "address" + }, + { + "internalType": "uint256", + "name": "appmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "dataset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "datasetmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "workerpool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "workerpoolmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trust", + "type": "uint256" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "callback", + "type": "address" + }, + { + "internalType": "string", + "name": "params", + "type": "string" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.RequestOrder", + "name": "_requestorder", + "type": "tuple" + } + ], + "name": "sponsorMatchOrders", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_identity", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + } + ], + "name": "verifyPresignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_identity", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_signature", + "type": "bytes" + } + ], + "name": "verifyPresignatureOrSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_identity", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_signature", + "type": "bytes" + } + ], + "name": "verifySignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "numDeployments": 1, + "bytecode": "0x6080604052346200002657620000146200002b565b6040516130eb6200026e82396130eb90f35b600080fd5b6200003562000037565b565b6200003562000035620000356200004e3362000058565b6200003562000134565b62000035906200003590620000b3565b6200007b62000078620000789290565b90565b6001600160a01b031690565b620000789062000068565b6200009d906200007b565b9052565b60208101929162000035919062000092565b6000620000c08162000087565b90620000cc826200007b565b620000d7846200007b565b14620000eb5750620000359190506200020b565b506040516200010c9250631e4fbdf760e01b815291829160048301620000a1565b0390fd5b6200011a6200013e565b62000035620000356200012e600062000087565b6200020b565b6200003562000110565b620001486200019f565b33906200016062000159836200007b565b916200007b565b03620001695750565b60405163118cdaa760e01b81529081906200010c9060048301620000a1565b62000078906200007b565b62000078905462000188565b62000078600062000193565b62000078906200007b906001600160a01b031682565b6200007890620001ab565b6200007890620001c1565b90620001eb620000786200020792620001cc565b82546001600160a01b0319166001600160a01b03919091161790565b9055565b62000217600062000193565b9062000225816000620001d7565b6200025c620002557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e093620001cc565b91620001cc565b916200026760405190565b600090a356fe6080604052600436101561001257600080fd5b60003560e01c80630175199814610092578063156194d41461008d5780632f39153314610088578063715018a6146100835780638da5cb5b1461007e578063bf36994e14610079578063c87b582a146100745763f2fde38b036100b857610362565b610332565b6102f0565b6102b1565b610294565b61026a565b61023a565b610153565b6001600160a01b031690565b90565b6001600160a01b0381165b036100b857565b600080fd5b905035906100ca826100a6565b565b806100b1565b905035906100ca826100cc565b909182601f830112156100b8578135916001600160401b0383116100b85760200192600183028401116100b857565b916060838303126100b85761012382846100bd565b9261013183602083016100d2565b9260408201356001600160401b0381116100b85761014f92016100df565b9091565b346100b85761018461017261016936600461010e565b9291909161053d565b60405191829182901515815260200190565b0390f35b90816101209103126100b85790565b90816101609103126100b85790565b90816102009103126100b85790565b906080828203126100b85781356001600160401b0381116100b857816101dc918401610188565b9260208301356001600160401b0381116100b857826101fc918501610188565b9260408101356001600160401b0381116100b8578361021c918301610197565b9260608201356001600160401b0381116100b8576100a392016101a6565b346100b8576101846102596102503660046101b5565b92919091610569565b6040515b9182918290815260200190565b346100b8576101846102596102803660046101b5565b9291909161058a565b60009103126100b857565b346100b8576102a4366004610289565b6102ac6103b2565b604051005b346100b8576102c1366004610289565b6101846102d66000546001600160a01b031690565b604051918291826001600160a01b03909116815260200190565b346100b85761018461017261030636600461010e565b92919091610553565b91906040838203126100b8576100a39061032981856100bd565b936020016100d2565b346100b85761018461017261034836600461030f565b90610549565b906020828203126100b8576100a3916100bd565b346100b8576102ac61037536600461034e565b610481565b6103826103ba565b6100ca6103a0565b6100976100a36100a39290565b6100a39061038a565b6100ca6103ad6000610397565b6104e0565b6100ca61037a565b6000546001600160a01b031633906103da825b916001600160a01b031690565b036103e25750565b610413906103ef60405190565b63118cdaa760e01b8152918291600483016001600160a01b03909116815260200190565b0390fd5b6100ca906104236103ba565b61042d6000610397565b6001600160a01b0381166001600160a01b0383161461045057506100ca906104e0565b6104139061045d60405190565b631e4fbdf760e01b8152918291600483016001600160a01b03909116815260200190565b6100ca90610417565b906001600160a01b03905b9181191691161790565b6100a390610097906001600160a01b031682565b6100a39061049f565b6100a3906104b3565b906104d56100a36104dc926104bc565b825461048a565b9055565b6000546001600160a01b0316906104f88160006104c5565b61052b6105257f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0936104bc565b916104bc565b9161053560405190565b80805b0390a3565b6100a393929190612ba4565b6100a39190612f20565b6100a393929190612f68565b356100a3816100a6565b916100a39391610577600090565b5061058460c0840161055f565b9361196e565b9092610599923394859361196e565b906105e57f81eec3d5401bb1693dbef61f0800bc16602905d6677d691c1262d6f08456e9a0916105c860405190565b8481526001600160a01b0390911660208201529081906040820190565b0390a190565b356100a3816100cc565b0190565b1561060057565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078303000000000000000006044820152606490fd5b1561064c57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078303100000000000000006044820152606490fd5b1561069857565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078303200000000000000006044820152606490fd5b156106e457565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078303300000000000000006044820152606490fd5b1561073057565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078303400000000000000006044820152606490fd5b1561077c57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078303500000000000000006044820152606490fd5b6100a36100a36100a39290565b156107d557565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078303600000000000000006044820152606490fd5b634e487b7160e01b600052603260045260246000fd5b61084361083d6100a39290565b60f81b90565b6001600160f81b03191690565b1561085757565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078303700000000000000006044820152606490fd5b156108a357565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078313000000000000000006044820152606490fd5b156108ef57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078313100000000000000006044820152606490fd5b1561093b57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078313200000000000000006044820152606490fd5b1561098757565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078313300000000000000006044820152606490fd5b156109d357565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078313400000000000000006044820152606490fd5b15610a1f57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078313500000000000000006044820152606490fd5b15610a6b57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078313600000000000000006044820152606490fd5b15610ab757565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078313700000000000000006044820152606490fd5b15610b0357565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078313800000000000000006044820152606490fd5b15610b4f57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078313900000000000000006044820152606490fd5b15610b9b57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078316100000000000000006044820152606490fd5b15610be757565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078316200000000000000006044820152606490fd5b634e487b7160e01b600052604160045260246000fd5b90601f01601f191681019081106001600160401b03821117610c6357604052565b610c2c565b906100ca610c7560405190565b9283610c42565b6100a3610100610c68565b610c8f610c7c565b906000825260208080808080808089016000815201600081520160008152016000815201600081520160008152016000905250565b6100a3610c87565b6001600160401b038111610c6357602090601f01601f19160190565b90826000939282370152565b90929192610d09610d0482610ccc565b610c68565b938185526020850190828401116100b8576100ca92610ce8565b9080601f830112156100b8578160206100a393359101610cf4565b919091610120818403126100b857610d57610120610c68565b926000610d6482846100bd565b908501526020610d76828285016100d2565b908501526040610d88828285016100d2565b908501526060610d9a828285016100d2565b908501526080610dac828285016100bd565b9085015260a0610dbe828285016100bd565b9085015260c0610dd0828285016100bd565b9085015260e0610de2828285016100d2565b908501526101008201356001600160401b0381116100b857610e049201610d23565b610100830152565b6100a3903690610d3e565b905051906100ca826100cc565b906020828203126100b8576100a391610e17565b60005b838110610e4b5750506000910152565b8181015183820152602001610e3b565b610e7c610e856020936105f593610e70815190565b80835293849260200190565b95869101610e38565b601f01601f191690565b80516001600160a01b031682526100a39161012081019161010090610eb960208201516020850152565b610ec860408201516040850152565b610ed760608201516060850152565b6080818101516001600160a01b03169084015260a0818101516001600160a01b03169084015260c0818101516001600160a01b031690840152610f1f60e082015160e0850152565b015190610100818403910152610e5b565b60208082526100a392910190610e8f565b6040513d6000823e3d90fd5b905051906100ca826100a6565b906020828203126100b8576100a391610f4d565b8015156100b1565b905051906100ca82610f6e565b906020828203126100b8576100a391610f76565b15610f9e57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078323000000000000000006044820152606490fd5b903590601e1936829003018212156100b857018035906001600160401b0382116100b857602001913682900383136100b857565b1561101e57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078323100000000000000006044820152606490fd5b1561106a57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078333000000000000000006044820152606490fd5b156110b657565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078333100000000000000006044820152606490fd5b919091610160818403126100b857611114610160610c68565b92600061112182846100bd565b908501526020611133828285016100d2565b908501526040611145828285016100d2565b908501526060611157828285016100d2565b908501526080611169828285016100d2565b9085015260a061117b828285016100d2565b9085015260c061118d828285016100bd565b9085015260e061119f828285016100bd565b908501526101006111b2828285016100bd565b908501526101206111c5828285016100d2565b908501526101408201356001600160401b0381116100b8576111e79201610d23565b610140830152565b6100a39036906110fb565b80516001600160a01b031682526100a3916101608101916101409061122460208201516020850152565b61123360408201516040850152565b61124260608201516060850152565b61125160808201516080850152565b61126060a082015160a0850152565b60c0818101516001600160a01b03169084015260e0818101516001600160a01b031690840152610100818101516001600160a01b0316908401526112ab610120820151610120850152565b015190610140818403910152610e5b565b60208082526100a3929101906111fa565b156112d457565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078343000000000000000006044820152606490fd5b1561132057565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078343100000000000000006044820152606490fd5b919091610200818403126100b85761137e610200610c68565b92600061138b82846100bd565b90850152602061139d828285016100d2565b9085015260406113af828285016100bd565b9085015260606113c1828285016100d2565b9085015260806113d3828285016100bd565b9085015260a06113e5828285016100d2565b9085015260c06113f7828285016100bd565b9085015260e0611409828285016100d2565b9085015261010061141c828285016100d2565b9085015261012061142f828285016100d2565b90850152610140611442828285016100d2565b90850152610160611455828285016100bd565b90850152610180611468828285016100bd565b908501526101a08201356001600160401b0381116100b8578161148c918401610d23565b6101a08501526101c06114a1828285016100d2565b908501526101e08201356001600160401b0381116100b8576114c39201610d23565b6101e0830152565b6100a3903690611365565b80516001600160a01b031682526100a3916101e06115d6610200830161150160208601516020860152565b6040858101516001600160a01b03169085015261152360608601516060860152565b6080858101516001600160a01b03169085015261154560a086015160a0860152565b60c0858101516001600160a01b03169085015261156760e086015160e0860152565b611578610100860151610100860152565b611589610120860151610120860152565b61159a610140860151610140860152565b610160858101516001600160a01b031690850152610180858101516001600160a01b0316908501526101a08501518482036101a0860152610e5b565b926115e86101c08201516101c0850152565b0151906101e0818403910152610e5b565b60208082526100a3929101906114d6565b1561161157565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078353000000000000000006044820152606490fd5b1561165d57565b60405162461bcd60e51b815260206004820152601860248201527f694578656356352d6d617463684f72646572732d3078363000000000000000006044820152606490fd5b905b600052602052604060002090565b6100a39081565b6100a390546116b2565b01918252565b9060001990610495565b906116e36100a36104dc926107c1565b82546116c9565b906116e36100a36104dc9290565b634e487b7160e01b600052602260045260246000fd5b906001600283049216801561172e575b602083101461172957565b6116f8565b91607f169161171e565b9160001960089290920291821b911b610495565b919061175d6100a36104dc936107c1565b908354611738565b6100ca9160009161174c565b81811061177c575050565b8061178a6000600193611765565b01611771565b9190601f811161179f57505050565b6117b16100ca93600052602060002090565b906020601f8401819004830193106117d3575b6020601f909101040190611771565b90915081906117c4565b91906001600160401b038211610c6357611801826117fb855461170e565b85611790565b600090601f831160011461183c576104dc929160009183611831575b5050600019600883021c1916906002021790565b01359050388061181d565b601f1983169161185185600052602060002090565b92815b81811061188e57509160029391856001969410611875575b50505002019055565b0135600019601f84166008021c1916905538808061186c565b91936020600181928787013581550195019201611854565b906100ca92916117dd565b634e487b7160e01b600052601160045260246000fd5b818102929181159184041417156118da57565b6118b1565b634e487b7160e01b600052601260045260246000fd5b906118ff565b9190565b90811561190a570490565b6118df565b919082018092116118da57565b6100a3601e6107c1565b919461196361196a9298979561195c60a0966119556100ca9a61194e60c08a019e60008b0152565b6020890152565b6040870152565b6060850152565b6080830152565b0152565b909360608201939261197f856105eb565b61198b606088016105eb565b1761199961010086016105eb565b956119a761012087016105eb565b6119b3608085016105eb565b146119bd906105f9565b6119ca61012087016105eb565b601a54116119d790610645565b6119e461014087016105eb565b6119f060a085016105eb565b10156119fb90610691565b611a07602087016105eb565b611a13602087016105eb565b1115611a1e906106dd565b611a2a606087016105eb565b611a3660208a016105eb565b1115611a4190610729565b611a4d60a087016105eb565b611a59602085016105eb565b1115611a6490610775565b611a70606084016105eb565b1987831716611a7f60006107c1565b14611a89906107ce565b611a92906105eb565b81871718611aa0601f6107c1565b602081101561279657611ade91901a60f81b611abc6001610830565b16611ad8611aca6000610830565b916001600160f81b03191690565b14610850565b611aff611aea8661055f565b611af96103cd6100978861055f565b1461089c565b611b23611b0e6040870161055f565b611b1d6103cd6100978b61055f565b146108e8565b611b49611b44611b356080880161055f565b611b3e8561055f565b90612fc6565b610934565b611b69611b64611b5b6080870161055f565b611b3e8a61055f565b610980565b611b80611b7b611b3560a0870161055f565b6109cc565b611ba3611b9e611b9260c0870161055f565b611b3e60c0890161055f565b610a18565b611bc3611bbe611bb560808a0161055f565b611b3e8761055f565b610a64565b611bda611bd5611b3560a08a0161055f565b610ab0565b611bf1611bec611b9260c08a0161055f565b610afc565b611c08611c03611bb560c0850161055f565b610b48565b611c1f611c1a611b5b60e0850161055f565b610b94565b611c37611c32611b92610100850161055f565b610be0565b611c3f610cc4565b95611c65611c4c8961055f565b611c5c6103cd6100976000610397565b141560e0890152565b611c6e85610e0c565b6020611c8f637c0d54d3611c9a611c8460405190565b948593849360e01b90565b835260048301610f30565b038173e8b04c85c47fcec0e9ee30d4034e2997f65191235af490811561255057611cd491611cd091600091612588575b50612acb565b8852565b611ce6611ce1808761055f565b6104bc565b6020611cf160405190565b638da5cb5b60e01b815291829060049082905afa801561255057611d2891600091612778575b506001600160a01b03166020890152565b611d7d6020611d42611ce16005546001600160a01b031690565b611d4b8861055f565b90611d5560405190565b9384928391829163c3c5a54760e01b8352600483016001600160a01b03909116815260200190565b03915afa801561255057611d999160009161275a575b50610f97565b611dd1611dcc611db360208a01516001600160a01b031690565b895190611dc46101008a018a610fe3565b929091612f68565b611017565b60e0870151612602575b611de4836111ef565b6020611dfa63fed985fe611e05611c8460405190565b8352600483016112bc565b038173e8b04c85c47fcec0e9ee30d4034e2997f65191235af490811561255057611e4191611e3a916000916125885750612acb565b6080890152565b611e4e611ce1808561055f565b6020611e5960405190565b638da5cb5b60e01b815291829060049082905afa801561255057611e90916000916125d4575b506001600160a01b031660a0890152565b611eb36020611eaa611ce16007546001600160a01b031690565b611d4b8661055f565b03915afa801561255057611ecf916000916125a6575b506112cd565b611f02611efd611ee960a08a01516001600160a01b031690565b60808a015190611dc4610140880188610fe3565b611319565b611f0b866114cb565b6020611f21638ac03f33611f2c611c8460405190565b8352600483016115f9565b038173e8b04c85c47fcec0e9ee30d4034e2997f65191235af4801561255057611f5c916000916125885750612acb565b60c0880152611f6d60c0870161055f565b60c0880151611f806101e0890189610fe3565b91611f8a93612f68565b611f939061160a565b611f9f604086016105eb565b87518888611fb060e0830151151590565b611fbc60408e016105eb565b604084015190611fce60408b016105eb565b92611fda608087015190565b9460e001611fe7906105eb565b60c09096015196611ff798612a33565b9561200260006107c1565b871161200d90611656565b60c088015161201d8160126116a2565b612026906116b9565b9061203060405190565b6020808201928352909283929161204b916105f582856116c3565b90810382520361205b9082610c42565b805190602001209861206e8a60136116a2565b966120788161055f565b61208290896104c5565b60208a01516001600160a01b031661209d9060018a016104c5565b6020016120a9906105eb565b6120b690600289016116d3565b60608901516001600160a01b03166120d190600489016104c5565b6120da8161055f565b6120e790600389016104c5565b60e089015115156000149361220b936121b6926122159661257557612111602061211a92016105eb565b60058b016116d3565b61212f6121268861055f565b60068b016104c5565b61214f61214660a08d01516001600160a01b031690565b60078b016104c5565b61216761215e602089016105eb565b60088b016116d3565b61219361218a61217a61014087016105eb565b61218460016107c1565b9061279b565b60098b016116d3565b6121ac6121a361012086016105eb565b600a8b016116d3565b17600b88016116ea565b6121ce6121c560c0830161055f565b600c88016104c5565b6121e76121de610160830161055f565b600d88016104c5565b6122006121f7610180830161055f565b600e88016104c5565b6101a0810190610fe3565b90600f86016118a6565b61222242601085016116d3565b61224b61224261223d61223660c089015190565b60126116a2565b6116b9565b601185016116d3565b61225884601285016116d3565b61228e612267602083016105eb565b6020612276611ce1808661055f565b63b55e75af9061228560405190565b94859260e01b90565b825260049082906000905af1918215612550576122e5936122df6122d66122c6611ce196611ce1966000968792612555575b506118c7565b6122d060646107c1565b906118f5565b601389016116d3565b0161055f565b60206122f060405190565b6310ec738d60e31b815291829060049082906000905af1928315612550576124346000936123f16123e38861236761223d61223660c08e6123426124829e60069d8f91612522575b5060148d016116d3565b61234f8960158d016104c5565b61237e61236c878f61223d6122366123679287015190565b61190f565b828f015161237990612236565b6116d3565b6123b86123aa61239561223d612236604086015190565b60e0840151600090156125195750889061190f565b612379612236604085015190565b6123de6123d08761236761223d612236608087015190565b612379612236608085015190565b015190565b61237961223660c08c015190565b61242e8761242961241b61240960028a8901016116b9565b612415600589016116b9565b9061190f565b6124156002898901016116b9565b6118c7565b906127d4565b61247361244d600184840101546001600160a01b031690565b61242e876124296122c66124656002898901016116b9565b61246d61191c565b906118c7565b0101546001600160a01b031690565b6124ac7f692ad61076dceddd0f1a861f737553dd61fc8501cf4190d29c4e90af6607f765916104bc565b906124b660405190565b858152602090a281516105e56124cd604085015190565b926124e460c06124de608088015190565b96015190565b7fd811b592ed0899225773e8933d8df64bd0b62761a9d7aad4ed5b22735f4610a49561250f60405190565b9586958987611926565b612415906107c1565b612543915060203d8111612549575b61253b8183610c42565b810190610e24565b38612338565b503d612531565b610f41565b61256e91925060203d81116125495761253b8183610c42565b90386122c0565b5061211a61258360006107c1565b612111565b6125a0915060203d81116125495761253b8183610c42565b38611cca565b6125c7915060203d81116125cd575b6125bf8183610c42565b810190610f83565b38611ec9565b503d6125b5565b6125f5915060203d81116125fb575b6125ed8183610c42565b810190610f5a565b38611e7f565b503d6125e3565b61260b88610e0c565b6020611c8f6311b2eee2612621611c8460405190565b038173e8b04c85c47fcec0e9ee30d4034e2997f65191235af49081156125505761265d91612656916000916125885750612acb565b6040890152565b61266a611ce1808a61055f565b602061267560405190565b638da5cb5b60e01b815291829060049082905afa9081156125505760009161273c575b506001600160a01b0316606088019081526126cc60206126c3611ce16006546001600160a01b031690565b611d4b8c61055f565b03915afa801561255057612719926126f3612700926127149460009161271e575b50611063565b516001600160a01b031690565b60408a015190611dc46101008d018d610fe3565b6110af565b611ddb565b612736915060203d81116125cd576125bf8183610c42565b386126ed565b612754915060203d81116125fb576125ed8183610c42565b38612698565b612772915060203d81116125cd576125bf8183610c42565b38611d93565b612790915060203d81116125fb576125ed8183610c42565b38611d17565b61081a565b90808211156127a8575090565b905090565b906116a4906104bc565b6001600160a01b0390911681526040810192916100ca9160200152565b906127e8816127e2306104bc565b8461295e565b6128096127f683600e6127ad565b61280383612367836116b9565b906116d3565b7f625fed9875dada8643f2418b838ae0bc78d9a148a18eee4ee1979ff0f3f5d4279161284061283760405190565b928392836127b7565b0390a1565b1561284c57565b60405162461bcd60e51b815260206004820152602860248201527f4965786563457363726f773a205472616e736665722066726f6d20656d707479604482015267206164647265737360c01b6064820152608490fd5b156128a957565b60405162461bcd60e51b815260206004820152602660248201527f4965786563457363726f773a205472616e7366657220746f20656d707479206160448201526564647265737360d01b6064820152608490fd5b1561290457565b60405162461bcd60e51b815260206004820152602c60248201527f4965786563457363726f773a205472616e7366657220616d6f756e742065786360448201526b656564732062616c616e636560a01b6064820152608490fd5b61299d61298c61296e6000610397565b6100976001600160a01b0382166001600160a01b0386161415612845565b6001600160a01b03841614156128a2565b6129e66129d983600d6129d46129ca886129ba61223d89866127ad565b6129c6818311156128fd565b0390565b61237987846127ad565b6127ad565b612803856105f5836116b9565b610538612a1c612a167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef936104bc565b936104bc565b9361025d60405190565b919082039182116118da57565b9694979195939093612a43600090565b50601297612a528996876116a2565b612a5b906116b9565b612a6491612a26565b966000146100a399612a9d61223d612aa9612aa39b612a9d9a61223d9a612ab099612aa398612ab65761223d612a9d91612aa3946116a2565b90612a26565b90612abe565b948c6116a2565b956116a2565b505050600019905b90808210156127a8575090565b6100a390612ad960106116b9565b6042916040519161190160f01b8352600283015260228201522090565b6001600160e01b031981166100b1565b905051906100ca82612af6565b906020828203126100b8576100a391612b06565b9190610e8581612b3e816105f59560209181520190565b8095610ce8565b9081526040602082018190526100a393910191612b27565b909392938483116100b85784116100b8578101920390565b359060208110612b83575090565b612b9590600019906020036008021b90565b1690565b6100a3913691610cf4565b9290916000843b612bb76118fb836107c1565b11612c9f57612bc581610397565b5082612bd160416107c1565b8103612c06575050612c0292612bed6103cd93612bf393612b99565b90612d3e565b5050926001600160a01b031690565b1490565b612c176118fb6040969394966107c1565b03612c5a57612c0293612c54612c4885612bf3956103cd97612c4e612c48612c3f60206107c1565b8094848a612b5d565b90612b75565b95612b5d565b91612de7565b60405162461bcd60e51b815260206004820152601860248201527f696e76616c69642d7369676e61747572652d666f726d617400000000000000006044820152606490fd5b9391612cd5612cb5611ce16020959694966104bc565b91612ce0631626ba7e91612cc860405190565b9788968795869560e01b90565b855260048501612b45565b03915afa60009181612d0e575b50612cf6575090565b630b135d3f60e11b91506001600160e01b0319161490565b612d3091925060203d8111612d37575b612d288183610c42565b810190612b13565b9038612ced565b503d612d1e565b9190600092612d4b825190565b612d586118fb60416107c1565b03612d8c57612d85929350612d6b600090565b506020820151906060604084015193015160001a90612e66565b9192909190565b509150612d996000610397565b90612dac612da76002945190565b6107c1565b91929190565b6100a3906107c1565b612dc86100a36100a39290565b60ff1690565b6100a390612de26118fb6100a39460ff1690565b901c90565b612d85929190612e30612e2b612e21612e11612e096001600160ff1b036107c1565b871696612db2565b612e1b60ff612dbb565b90612dce565b6105f5601b6107c1565b612dbb565b90612e66565b61196a6100ca94612e5f606094989795612e55608086019a6000870152565b60ff166020850152565b6040830152565b9091612e7184612db2565b612e9d6118fb7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a06107c1565b11612f0c5790612ebf60209460009493612eb660405190565b94859485612e36565b838052039060015afa1561255057600051600091612edc83610397565b6001600160a01b0381166001600160a01b03841614612eff5750612dac836107c1565b9150612dac6001936107c1565b505050612f196000610397565b9160039190565b612f2d6100976000610397565b6001600160a01b03821614159182612f4457505090565b612c02919250610097612f5b6103cd9260116116a2565b546001600160a01b031690565b929190612f758185612f20565b938415612f84575b5050505090565b612f8e9450612ba4565b38808080612f7d565b6100a39081906001600160a01b031681565b6100a360046107c1565b9081526040810192916100ca9160200152565b90600091612fd661009784610397565b6001600160a01b03821614801561309a575b61309257803b612ffa6118fb856107c1565b1161300457505090565b613012611ce16020926104bc565b61302b612da761302663d202158d956104b3565b612f97565b90613051613037612fa9565b9461305c61304460405190565b9687958694859460e01b90565b845260048401612fb3565b03915afa60009181613072575b506127a8575090565b61308b91925060203d81116125cd576125bf8183610c42565b9038613069565b505050600190565b506001600160a01b0382166001600160a01b03821614612fe856fea26469706673582212205b23c32c4209e6967187780ba87a48d84f2294ff0b151858336a4de445d0549f64736f6c63430008150033" +} \ No newline at end of file diff --git a/deployments/bellecour/IexecPoco2Delegate.json b/deployments/bellecour/IexecPoco2Delegate.json new file mode 100644 index 000000000..934401047 --- /dev/null +++ b/deployments/bellecour/IexecPoco2Delegate.json @@ -0,0 +1,609 @@ +{ + "address": "0x7eCf076343FBe296Da2D39f20B2a01AaBB68CC27", + "abi": [ + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "worker", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "name": "AccurateContribution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "worker", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "name": "FaultyContribution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Lock", + "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": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "ref", + "type": "bytes32" + } + ], + "name": "Reward", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "ref", + "type": "bytes32" + } + ], + "name": "Seize", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "name": "TaskClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "consensus", + "type": "bytes32" + } + ], + "name": "TaskConsensus", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "worker", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "TaskContribute", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "results", + "type": "bytes" + } + ], + "name": "TaskFinalize", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "workerpool", + "type": "address" + } + ], + "name": "TaskInitialize", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + } + ], + "name": "TaskReopen", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "taskId", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "worker", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "digest", + "type": "bytes32" + } + ], + "name": "TaskReveal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Unlock", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskid", + "type": "bytes32" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_taskid", + "type": "bytes32[]" + } + ], + "name": "claimArray", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskid", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_resultHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_resultSeal", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_enclaveChallenge", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_enclaveSign", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "_authorizationSign", + "type": "bytes" + } + ], + "name": "contribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskid", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_resultDigest", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_results", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "_resultsCallback", + "type": "bytes" + }, + { + "internalType": "address", + "name": "_enclaveChallenge", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_enclaveSign", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "_authorizationSign", + "type": "bytes" + } + ], + "name": "contributeAndFinalize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskid", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_results", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "_resultsCallback", + "type": "bytes" + } + ], + "name": "finalize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_dealid", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "idx", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_dealid", + "type": "bytes32[]" + }, + { + "internalType": "uint256[]", + "name": "_idx", + "type": "uint256[]" + } + ], + "name": "initializeAndClaimArray", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "_dealid", + "type": "bytes32[]" + }, + { + "internalType": "uint256[]", + "name": "_idx", + "type": "uint256[]" + } + ], + "name": "initializeArray", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "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": "_taskid", + "type": "bytes32" + } + ], + "name": "reopen", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_taskid", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_resultDigest", + "type": "bytes32" + } + ], + "name": "reveal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "numDeployments": 1, + "bytecode": "0x6080604052346200002657620000146200002b565b604051613adb6200026a8239613adb90f35b600080fd5b6200003562000037565b565b62000035620000356200004a3362000054565b6200003562000130565b62000035906200003590620000af565b6200007762000074620000749290565b90565b6001600160a01b031690565b620000749062000064565b620000999062000077565b9052565b6020810192916200003591906200008e565b6000620000bc8162000083565b90620000c88262000077565b620000d38462000077565b14620000e757506200003591905062000207565b50604051620001089250631e4fbdf760e01b8152918291600483016200009d565b0390fd5b620001166200013a565b62000035620000356200012a600062000083565b62000207565b620000356200010c565b620001446200019b565b33906200015c620001558362000077565b9162000077565b03620001655750565b60405163118cdaa760e01b81529081906200010890600483016200009d565b620000749062000077565b62000074905462000184565b6200007460006200018f565b620000749062000077906001600160a01b031682565b6200007490620001a7565b6200007490620001bd565b90620001e7620000746200020392620001c8565b82546001600160a01b0319166001600160a01b03919091161790565b9055565b6200021360006200018f565b9062000221816000620001d3565b62000258620002517f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e093620001c8565b91620001c8565b916200026360405190565b600090a356fe6101c0604052600436101561001357600080fd5b60003560e01c806334623484146100e35780635b36c66b146100de5780635facd761146100d9578063715018a6146100d45780638da5cb5b146100cf5780638fc375e5146100ca578063b504681d146100c5578063bd66528a146100c0578063f2fde38b146100bb578063f6c68e10146100b6578063f722cb32146100b1578063fa055d7e146100ac5763fc334e8c036100f15761058d565b610571565b610525565b61050d565b6104f5565b6104c9565b610484565b6103f1565b61035e565b610346565b610316565b610233565b6101e1565b805b036100f157565b600080fd5b90503590610103826100e8565b565b6001600160a01b031690565b90565b6001600160a01b0381166100ea565b9050359061010382610114565b909182601f830112156100f1578135916001600160401b0383116100f15760200192600183028401116100f157565b60c0818303126100f15761017382826100f6565b9261018183602084016100f6565b9261018f81604085016100f6565b9261019d8260608301610123565b9260808201356001600160401b0381116100f157836101bd918401610130565b92909360a08201356001600160401b0381116100f1576101dd9201610130565b9091565b346100f1576102036101f436600461015f565b96959095949194939293610f81565b604051005b0390f35b91906040838203126100f1576101119061022681856100f6565b936020016100f6565b9052565b346100f15761020861024f61024936600461020c565b90610c4d565b6040515b9182918290815260200190565b909160e0828403126100f15761027683836100f6565b9261028481602085016100f6565b9260408101356001600160401b0381116100f157826102a4918301610130565b92909360608301356001600160401b0381116100f157826102c6918501610130565b9290936102d68260808301610123565b9260a08201356001600160401b0381116100f157836102f6918401610130565b92909360c08201356001600160401b0381116100f1576101dd9201610130565b346100f157610203610329366004610260565b99989098979197969296959395611aa3565b60009103126100f157565b346100f15761035636600461033b565b6102036105de565b346100f15761036e36600461033b565b6102086103836000546001600160a01b031690565b604051918291826001600160a01b03909116815260200190565b6060818303126100f1576103b182826100f6565b9260208201356001600160401b0381116100f157836103d1918401610130565b92909360408201356001600160401b0381116100f1576101dd9201610130565b346100f15761020361040436600461039d565b93929092612942565b909182601f830112156100f1578135916001600160401b0383116100f15760200192602083028401116100f157565b90916040828403126100f15781356001600160401b0381116100f1578361046491840161040d565b92909360208201356001600160401b0381116100f1576101dd920161040d565b346100f1576102086104a361049a36600461043c565b92919091613594565b60405191829182901515815260200190565b906020828203126100f157610111916100f6565b346100f1576102036104dc3660046104b5565b61294f565b906020828203126100f15761011191610123565b346100f1576102036105083660046104e1565b6106ad565b346100f1576102036105203660046104b5565b612753565b346100f1576102086104a361053b36600461043c565b92919093929181936136348461359f565b906020828203126100f15781356001600160401b0381116100f1576101dd920161040d565b346100f1576102086104a361058736600461054c565b906135fd565b346100f1576102036105a036600461020c565b90612353565b6105ae6105e6565b6101036105cc565b6101056101116101119290565b610111906105b6565b6101036105d960006105c3565b61070c565b6101036105a6565b6000546001600160a01b03163390610606825b916001600160a01b031690565b0361060e5750565b61063f9061061b60405190565b63118cdaa760e01b8152918291600483016001600160a01b03909116815260200190565b0390fd5b6101039061064f6105e6565b61065960006105c3565b6001600160a01b0381166001600160a01b0383161461067c57506101039061070c565b61063f9061068960405190565b631e4fbdf760e01b8152918291600483016001600160a01b03909116815260200190565b61010390610643565b906001600160a01b03905b9181191691161790565b61011190610105906001600160a01b031682565b610111906106cb565b610111906106df565b90610701610111610708926106e8565b82546106b6565b9055565b6000546001600160a01b0316906107248160006106f1565b6107576107517f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0936106e8565b916106e8565b9161076160405190565b80805b0390a3565b905b600052602052604060002090565b6101119081565b6101119054610779565b634e487b7160e01b600052604160045260246000fd5b90601f01601f191681019081106001600160401b038211176107c157604052565b61078a565b906101036107d360405190565b92836107a0565b61011160606107c6565b9061010361084460026107f56107da565b9461081761080a82546001600160a01b031690565b6001600160a01b03168752565b61083e61082e60018301546001600160a01b031690565b6001600160a01b03166020880152565b01610780565b6040840152565b634e487b7160e01b600052602260045260246000fd5b9060016002830492168015610881575b602083101461087c57565b61084b565b91607f1691610871565b805460009392916108a861089e83610861565b8085529360200190565b91600181169081156108fa57506001146108c157505050565b6108d49192939450600052602060002090565b916000925b8184106108e65750500190565b8054848401526020909301926001016108d9565b92949550505060ff1916825215156020020190565b906101119161088b565b906101036109339261092a60405190565b9384809261090f565b03836107a0565b6101116102006107c6565b90610103610ae3601561095661093a565b94610967610963826107e4565b8752565b61097d610976600383016107e4565b6020880152565b61099361098c600683016107e4565b6040880152565b6109a96109a260098301610780565b6060880152565b6109bf6109b8600a8301610780565b6080880152565b6109d56109ce600b8301610780565b60a0880152565b6109fc6109ec600c8301546001600160a01b031690565b6001600160a01b031660c0880152565b610a23610a13600d8301546001600160a01b031690565b6001600160a01b031660e0880152565b610a4b610a3a600e8301546001600160a01b031690565b6001600160a01b0316610100880152565b610a62610a5a600f8301610919565b610120880152565b610a79610a7160108301610780565b610140880152565b610a90610a8860118301610780565b610160880152565b610aa7610a9f60128301610780565b610180880152565b610abe610ab660138301610780565b6101a0880152565b610ad5610acd60148301610780565b6101c0880152565b01546001600160a01b031690565b6001600160a01b03166101e0840152565b61011190610945565b156100f157565b634e487b7160e01b600052601160045260246000fd5b9190610b25565b9290565b8201809211610b3057565b610b04565b01918252565b0190565b610111905b60ff1690565b6101119054610b3f565b634e487b7160e01b600052602160045260246000fd5b60051115610b7457565b610b54565b9061010382610b6a565b9060ff906106c1565b61011190610b79565b90610ba561011161070892610b8c565b8254610b83565b90600019906106c1565b90610bc46101116107089290565b8254610bac565b6101116101116101119290565b90610bc461011161070892610bcb565b634e487b7160e01b600052603260045260246000fd5b8054821015610c2157610c18600391600052602060002090565b91020190600090565b610be8565b6101116007610bcb565b81810292918115918404141715610b3057565b610111600a610bcb565b90610e04906040610c67610c62856013610769565b610af4565b610ca6610c9f610111610c926101608501610c8e610c86610111835190565b891015610afd565b5190565b6101808501515b90610b1a565b8410610afd565b610df4610cb260405190565b610cdd8160208101610cd1888b83602081610b35610b3b938396959052565b908103825203826107a0565b610cef610ce8825190565b9160200190565b2095610dd9610d02610111896014610769565b610d50610d0e82610b4a565b97610d2d600099610d27610d218c610b79565b91610b79565b14610afd565b610d47600195610d3f878c8701610b95565b868501610bb6565b60028301610bd8565b6006610dd2610d776002610d70601a610d6a60808c015190565b90610bfe565b5001610780565b610d85600385019182610bd8565b610c99610dca610dc46101408b01610c8e610dbb610da1835190565b610c99610dad89610780565b610db5610c26565b90610c30565b60048a01610bd8565b92610780565b610db5610c43565b9101610bd8565b610de281610bcb565b90610dee886015610769565b01610bd8565b015101516001600160a01b031690565b7f252992fb0468d68d6a5784ec03214f0d0a362083f2d7ebd157af43b017a22e0690610e2f83610751565b91610e3960405190565b600090a390565b9061076b906106e8565b60041115610b7457565b9061010382610e4a565b610e71610e6b6101119290565b60f81b90565b6001600160f81b03191690565b61022f906001600160a01b031660601b90565b60149392610ea98583610b35602095610b3b97610e7e565b018092610e7e565b61011190610e54565b90610ba561011161070892610eb1565b8054821015610c2157610c18600191600052602060002090565b916001600160a01b0360089290920291821b911b6106c1565b9190610f0e610111610708936106e8565b908354610ee4565b90815491680100000000000000008310156107c15782610f3e91600161010395018155610eca565b90610efd565b634e487b7160e01b600052601260045260246000fd5b90610f64565b9190565b908115610f6f570490565b610f44565b91908203918211610b3057565b949296919695939095610f98610111876014610769565b91610fa4876016610769565b94610fb3610111338098610e40565b96610fce610c626013610fc860018901610780565b90610769565b95610fe8610fdb87610b4a565b610d27610d216001610b79565b611000610ff760048801610780565b42905b11610afd565b61101f61100c8a610b4a565b610d276110196000610e54565b91610e54565b61102960006105c3565b916001600160a01b0383166001600160a01b03871614158081156112d1575b6111a56101039f8f978f9061125b9f9e9b8f6112559f60019f8f61124a9f8f6112259f936111e59f6111d69f986111b29f6111ad9f9961114c6101119f8f6111629f9861115c9f6101a09f9b8f9b6111579f8f906111529f600a9f610b3b9e61112f978f60039f9661110b6111439d611110966111159a6110cb6101059a610afd565b806112ab575b1561129457506018546001600160a01b0316925b6110ff6110f160405190565b958693602085019384610e91565b908103825203836107a0565b613672565b610afd565b6001600160a01b038b1614918215611260575b5050610afd565b61113a600186610eba565b60018501610bb6565b60028301610bb6565b016106f1565b610f16565b015190565b8c611621565b7f3fdb8d7797562d49a81078dbf7fa1771958ea452f8b13d1148383bd9506aecfb8161118d8d6106e8565b9161119b8c61025360405190565b0390a36015610769565b976017610e40565b610780565b6111d06111ca6003926111c484610bcb565b90610f5a565b91610bcb565b906113f0565b6111df87610bcb565b90610f74565b966004610dd261121f6111ff6111ad60008a019788610769565b61121a8c61121561120f8d610bcb565b846113f0565b610c30565b610f74565b99611428565b6112458961123f8861123a6111ad8487610769565b610b1a565b92610769565b610bd8565b019161123a83610780565b90610bd8565b612b3d565b60405161128d93506112878160208101610cd18b8a83602081610b35610b3b938396959052565b8b613672565b3880611128565b60400151602001516001600160a01b0316926110e5565b506018546001600160a01b03166112ca6001600160a01b038c166105f9565b14156110d1565b509396999895906112e660a08a95979a015190565b936112f1601f610bcb565b956020871015610c21576101039f8f978f9061125b9f8f6112559f9660019f8f61124a9f8f6112259f966111e59f6111d69f6111b29f6111ad9f996111a59f6101119f8f6111629f9861115c9f6101a09f8f9e6111579f8f9e6111529f600a9f610b3b9e60039d8f6101059461110b61114c9f9d611115996111439f6110cb61112f9f611383906111109b1a60f81b90565b61138d6001610e5e565b166113a961139b6000610e5e565b916001600160f81b03191690565b149f50509f5050505050509f509c5050509f50509e509f509f50509f509f5050509f509f509e9f509f5050509c9e509c509f509b9d509450509395999c9d509f5050611048565b90808211156113fd575090565b905090565b610b446101116101119290565b61011190611423610f606101119460ff1690565b901c90565b60009061143482610bcb565b91608061144961144382611402565b8461140f565b8481116115e6575b5050604061146161144382611402565b61146a83610bcb565b81116115cc575b5050602061148161144382611402565b61148a83610bcb565b81116115b2575b505060106114a161144382611402565b6114aa83610bcb565b8111611598575b505060086114c161144382611402565b6114ca83610bcb565b811161157e575b505060046114e161144382611402565b6114ea83610bcb565b8111611564575b5050600261150161144382611402565b61150a83610bcb565b811161154a575b5050611534610f6061152e60019461152886611402565b9061140f565b92610bcb565b1161153d575090565b90610b3b61011192610bcb565b61155c9294919350610b3b9093610bcb565b913880611511565b6115769294919350610b3b9093610bcb565b9138806114f1565b6115909294919350610b3b9093610bcb565b9138806114d1565b6115aa9294919350610b3b9093610bcb565b9138806114b1565b6115c49294919350610b3b9093610bcb565b913880611491565b6115de9294919350610b3b9093610bcb565b913880611471565b6115f89294919350610b3b9093610bcb565b913880611451565b6001600160a01b0390911681526040810192916101039160200152565b0152565b906116358161162f306106e8565b846117a5565b61165061164383600e610e40565b6112558361123a83610780565b7f625fed9875dada8643f2418b838ae0bc78d9a148a18eee4ee1979ff0f3f5d4279161168761167e60405190565b92839283611600565b0390a1565b1561169357565b60405162461bcd60e51b815260206004820152602860248201527f4965786563457363726f773a205472616e736665722066726f6d20656d707479604482015267206164647265737360c01b6064820152608490fd5b156116f057565b60405162461bcd60e51b815260206004820152602660248201527f4965786563457363726f773a205472616e7366657220746f20656d707479206160448201526564647265737360d01b6064820152608490fd5b1561174b57565b60405162461bcd60e51b815260206004820152602c60248201527f4965786563457363726f773a205472616e7366657220616d6f756e742065786360448201526b656564732062616c616e636560a01b6064820152608490fd5b6117e46117d36117b560006105c3565b6101056001600160a01b0382166001600160a01b038616141561168c565b6001600160a01b03841614156116e9565b61182d61182083600d61181b611811886118016111ad8986610e40565b61180d81831115611744565b0390565b6112458784610e40565b610e40565b61125585610b3b83610780565b61076461186361185d7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef936106e8565b936106e8565b9361025360405190565b60209392610b35601483610b358895610b3b97610e7e565b6001600160401b0381116107c157602090601f01601f19160190565b90826000939282370152565b909291926118c26118bd82611885565b6107c6565b938185526020850190828401116100f157610103926118a1565b6101119136916118ad565b6101116002610bcb565b9160001960089290920291821b911b6106c1565b919061191661011161070893610bcb565b9083546118f1565b61010391600091611905565b818110611935575050565b80611943600060019361191e565b0161192a565b9190601f811161195857505050565b61196a61010393600052602060002090565b906020601f84018190048301931061198c575b6020601f90910104019061192a565b909150819061197d565b91906001600160401b0382116107c1576119ba826119b48554610861565b85611949565b600090601f83116001146119f5576107089291600091836119ea575b5050600019600883021c1916906002021790565b0135905038806119d6565b601f19831691611a0a85600052602060002090565b92815b818110611a4757509160029391856001969410611a2e575b50505002019055565b0135600019601f84166008021c19169055388080611a25565b91936020600181928787013581550195019201611a0d565b906101039291611996565b9190611a8881611a8181610b3b9560209181520190565b80956118a1565b601f01601f191690565b602080825261011193910191611a6a565b999794939291909998959698610120526101005260e052610180526101a05261014052611ad861011160146101205190610769565b92611afb610111611aee60166101205190610769565b3360a05260a05190610e40565b60c052611b12610c626013610fc860018801610780565b91611b1f610fdb86610b4a565b611b2e610ff760048701610780565b611b49611b3c600a87015490565b610d27610f606000610bcb565b611b64611b57606085015190565b610d27610f606001610bcb565b604051611b898160208101610cd18b6101205183602081610b35610b3b938396959052565b611b94610ce8825190565b2061016052604051611bb58160208101610cd18b6101205160a0518461186d565b611bc0610ce8825190565b206080526101008301516001600160a01b031692611bde60006105c3565b93611bf16001600160a01b0386166105f9565b1480611fee575b8015611fc5575b611c0890610afd565b6001600160a01b0384166001600160a01b0386161415808115611f32575b95611ca8611d9c99611c8f611d929a98610105611110611d289a611d1f9a611d199a60019f9a611c58611d119c610afd565b80611f0c575b15611ef657506018546001600160a01b03165b6040519061110b828c6110ff60208301916101205160a05184610e91565b6001600160a01b03841614908115611eb8575b50610afd565b611ceb600291611cbd83600060c05101610eba565b611ce08960c0510193611cd36101605186610bb6565b60c0510160805190610bb6565b600360c051016106f1565b611d0a611d016003926111ad8460008b01610b95565b60078801610bb6565b8501610780565b610db56118e7565b42610b1a565b60058301610bd8565b611d4a611d3483610bcb565b611d418160088501610bd8565b60098301610bd8565b611d5785600b8301610bb6565b611d6c600c820160e051906101005190611a5f565b611d82600e82016101a051906101805190611a5f565b61083e600a820160a05190610f16565b610120519061201d565b611da861012051613383565b7f3fdb8d7797562d49a81078dbf7fa1771958ea452f8b13d1148383bd9506aecfb611dd36101205190565b80928192611de260a0516106e8565b938491611dee60405190565b610160518152602090a3817ff6d49bf3e05d33a4bc497d3c793fb5756388bb96b947cf51bb60aaecb0e022e3611e2360405190565b610160518152602090a2611e5b7f4b1763d473ac8fa80b4432ba90047e1b92444d8fabc55e6a002d9b1a316d79599161025360405190565b0390a37f78ce8a8bc0fcb704e8ba3b3dbb36aa88002df8038128b4af2f27ef65db665044611e8860405190565b80611e9960e0516101005183611a92565b0390a2610103611eaf6101a051610180516118dc565b610120516134b4565b604051611ef0925090611ee582602081016110ff6080516101605183602081610b35610b3b938396959052565b610140519185613672565b38611ca2565b60400151602001516001600160a01b0316611c71565b506018546001600160a01b0316611f2b6001600160a01b0388166105f9565b1415611c5e565b50959394929091611f4460a084015190565b93611f4f601f610bcb565b936020851015610c2157611d9c99611c8f600199610105611110611d1998611d1198611d929f97611ca898611c58611d289f611d1f9f90611f91911a60f81b90565b611f9b6001610e5e565b16611fa961139b6000610e5e565b149b9f50509a509a509a509a9c505050989a5050995050611c26565b50611c08611fd96101a051610180516118dc565b611fe4610ce8825190565b2089149050611bff565b506101a051612000610f606000610bcb565b14611bf8565b610111601e610bcb565b610111633b9aca00610bcb565b612028906013610769565b60028101919061203783610780565b90826003820192600284019061204c82610780565b61205591610b1a565b93600684019083600283019661206a88610780565b61207391610b1a565b9661207d90610780565b612085612006565b61208e91610c30565b9860649961209b8b610bcb565b6120a491610f5a565b97826120ba60158a01546001600160a01b031690565b916120c49261230a565b6120cd90610780565b9360009687956120dc87610bcb565b109660019661212998612208575b5050506120f681610780565b612102610f6089610bcb565b11806121e4575b6121b7575b505050019261212484546001600160a01b031690565b612241565b7399c2268479b93fde36232351229815df80837e239161215061152e6111ad85600e610e40565b821161215e575b5050505050565b61219b846121946121a89461218f6121876121ad9a6111c46111ca612181610c43565b86610c30565b6111d0612010565b612234565b809561230a565b546001600160a01b031690565b6122c5565b3880808080612157565b6121d66121d0866121dc9501546001600160a01b031690565b91610780565b906122c5565b38868161210e565b50828701546001600160a01b03166122016105f96101058a6105c3565b1415612109565b61222c92016121d660026122258a8401546001600160a01b031690565b9201610780565b3882886120ea565b90808210156113fd575090565b906122558183612250306106e8565b6117a5565b61227061226383600e610e40565b6112558361121a83610780565b7f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f19161168761167e60405190565b6001600160a01b03909116815260608101939261010392909160409161161d906020830152565b6122d38282612250306106e8565b6116877fc2aca55aa696938c7e95842e8939ca0fbb2120a3eeb8948cdcee2b70da5666729361230160405190565b9384938461229e565b61232561231882600e610e40565b6112558461121a83610780565b6116877f1bccc549c38561cd5b57f0db11ceb8dde1b0b6ee05ab5e155b51c7c5ba64becb9361230160405190565b61235e816014610769565b908261236b826016610769565b9233938461237891610e40565b61238182610b4a565b60029061238d82610b79565b9061239790610b79565b146123a190610afd565b6123ad60058401610780565b42106123b890610afd565b8190806123c483610b4a565b936001946123d186610e54565b906123db90610e54565b146123e590610afd565b8481016123f181610780565b6123fd60078901610780565b1461240790610afd565b61241090610780565b60405160208082018b8152829161242c908c610b3b8285610b35565b90810382520361243c90826107a0565b805190602001201461244d90610afd565b0161245790610780565b604051806020810161246b898b8d8461186d565b90810382520361247b90826107a0565b805190602001201461248c90610afd565b61249591610eba565b60088201906124a382610780565b906124ad90610bcb565b6124b691610b1a565b6124bf91610bd8565b600b01906124cc91610bb6565b7f4b1763d473ac8fa80b4432ba90047e1b92444d8fabc55e6a002d9b1a316d795990916124f8906106e8565b9261250260405190565b9081528060208101610764565b61010390612548335b610d276105f9610105600160066125396013610fc88461083e8c6014610769565b0101546001600160a01b031690565b612574565b6000198114610b305760010190565b610111916008021c610105565b90610111915461255c565b90612583610111836014610769565b9161259d61259084610b4a565b610d27610d216002610b79565b6125a960068401610780565b926125b94294610ffa610f608790565b60058101936125cd610f60610b2187610780565b11158061272e575b6125de90610afd565b60006125e981610bcb565b600a83016125f8610111825490565b82101561267257906126166126108261264c94610eca565b90612569565b60168461262c600161083e8561181b8c87610769565b61263e610f6061011160078b01610780565b14612651575b50505061254d565b6125e9565b61266461266a9361181b8a600395610769565b01610eba565b388084612644565b505061124591610dee6009926126fb9596976112456126956101118a6015610769565b6126f560018201946126ca816126aa88610780565b94019661125560078b01956111df6111ad6126c489610780565b8c610769565b6126e36126d682610bcb565b809b8198610fc887610780565b6126f06001828a01610b95565b610bcb565b90610bb6565b7f3afe0f24796ce653c6ab1f3e7aba5ce564eece5e82aee724aff28253e829f07b905b9061272860405190565b600090a2565b506125de61273e60088301610780565b61274b610f606000610bcb565b1490506125d5565b6101039061250f565b610103949392919061276d33612518565b9261010394916128b0936128668661286161278c610111836014610769565b6111ad8888600e60139461284d61281a6101006127b3610c62600186019a610fc88c610780565b6127bf61259086610b4a565b61280c6127ce60068701610780565b6127dd4291610ffa610f608490565b60088701906127eb82610780565b6127fd610f6061011160098c01610780565b149182156128fe575050610afd565b01516001600160a01b031690565b60009061282c6105f9610105846105c3565b14806128ea575b80156128b6575b61284390610afd565b6003908301610b95565b61285b8a8c600c8401611a5f565b01611a5f565b61201d565b61286f86612f68565b7f78ce8a8bc0fcb704e8ba3b3dbb36aa88002df8038128b4af2f27ef65db6650449086926128a861289f60405190565b92839283611a92565b0390a26118dc565b906134b4565b506128436128c487876118dc565b6128cf610ce8825190565b206128e2610f60610111600b8801610780565b14905061283a565b50856128f8610f6083610bcb565b14612833565b612909919250610780565b612916610f606000610bcb565b119081612926575b503880611128565b905061293a610f60610b2160058a01610780565b11153861291e565b906101039493929161275c565b61295d610111826014610769565b806129aa61296a82610b4a565b9160019261297a610d2185610b79565b148015612a56575b61298b90610afd565b6129a261299a60068601610780565b421015610afd565b600490610b95565b808201916129c0846129bb85610780565b612a78565b816129cb6000610bcb565b905b6129fe575b5050505061271e7fcbc308b5f91040d2659a5201858344b0b583cd2f9e18e8470c2fa052c5b21ff89190565b600a820190612a0e610111835490565b811015612a5057612a45612a2861261083612a4a95610eca565b612a3f601361083e612a398a610780565b82610769565b90612241565b61254d565b826129cd565b506129d2565b5061298b612a6382610b4a565b612a70610d216002610b79565b149050612982565b81612b1861010393612a91610c626101e0956013610769565b612b136020612ab5612aa860406000860151015190565b8483015160400151610c99565b612b04612acc6040860192610c9960408551015190565b612124612af3612ae9612ae160408751015190565b610db5612006565b6111c46064610bcb565b9a8b9701516001600160a01b031690565b5101516001600160a01b031690565b61230a565b612b387399c2268479b93fde36232351229815df80837e239183836122c5565b611621565b612b4b610111826014610769565b612b59610111836015610769565b90612b70600961083e6013610fc860018601610780565b91612ba6610f60610111612b976001612b90886112156111ad8d8a610769565b9501610780565b610db56001976111df89610bcb565b11612bb2575b50505050565b6000612bbd81610bcb565b9283815b612c59575b5050612c189291610dee612c0f600993612be36002828601610b95565b612bf08960078601610bb6565b6126f0612c0642610c99611d1160038901610780565b60058601610bd8565b60088301610bd8565b612c4d612c437ff6d49bf3e05d33a4bc497d3c793fb5756388bb96b947cf51bb60aaecb0e022e39290565b9261025360405190565b0390a238808080612bac565b600a8401612c68610111825490565b821015612cff5761261082612c7c92610eca565b8360169188612c938661083e8461181b8589610769565b8b149384612cd0575b50505050612cb5575b612caf829161254d565b90612bc1565b93612caf612cc78392610c9984610bcb565b95915050612ca5565b612ce99450612ce3929161181b91610769565b01610b4a565b612cf561101984610e54565b1483388881612c9c565b50612bc6565b9061022f90610b79565b90612d34612d28612d1e845490565b8084529260200190565b92600052602060002090565b9060005b818110612d455750505090565b909192612d7a612d73600192612d6287546001600160a01b031690565b6001600160a01b0316815260200190565b9460010190565b929101612d38565b9061011191612d0f565b9061010361093392612d9d60405190565b93848092612d82565b80546000939291612db961089e83610861565b91600181169081156108fa5750600114612dd257505050565b612de59192939450600052602060002090565b916000925b818410612df75750500190565b805484840152602090930192600101612dea565b9061011191612da6565b9061010361093392612e2660405190565b93848092612e0b565b6101116101e06107c6565b90610103612f3d600e612e4b612e2f565b94612e5e612e5882610b4a565b87612d05565b612e6d61097660018301610780565b612e7c61098c60028301610780565b612e8b6109a260038301610780565b612e9a6109b860048301610780565b612ea96109ce60058301610780565b612ebf612eb860068301610780565b60c0880152565b612ed5612ece60078301610780565b60e0880152565b612eec612ee460088301610780565b610100880152565b612efb610a5a60098301610780565b612f0a610a71600a8301612d8c565b612f19610a88600b8301610780565b612f28610a9f600c8301612e15565b612f37610ab6600d8301610780565b01612e15565b6101c0840152565b61011190612e3a565b90612f57825190565b811015610c21576020809102010190565b90612f7c612f77836014610769565b612f45565b91612f90610c626013610fc8602087015190565b906000612f9c81610bcb565b916040840194612fae60408751015190565b96845b6101408201612fc261011182515190565b87101561304d57610111612fea612fdd89612ff59451612f4e565b516001600160a01b031690565b61181b876016610769565b613000868201610b4a565b61300d6110196002610e54565b036130315761302b91610c9960046130259301610780565b9561254d565b94612fb1565b50949761304761302b91610c996101a08a015190565b9861254d565b5091909692945094929461308060646111c46111ca61307a6130716101c08a015190565b61121a85610bcb565b8c610c30565b9061308a87610bcb565b61014089019061309c61011183515190565b811015613248576130b1612fdd828451612f4e565b91856130c56101118561181b8d6016610769565b6130d08c8201610b4a565b8b8b6002926130e161101985610e54565b036131bd575050506004016130f590610780565b90613100918761326c565b9b8c61310b91610f74565b9b896131196101a08b015190565b6131239086612241565b61312d91856122c5565b51519060019161313c83610bcb565b10926131529261014094613159575b505061254d565b905061308a565b61317d9061124583613177601793610c996111ca6111ad8588610e40565b92610e40565b6131a77f9703f4589802246c80b822e63697180da799e363cd1b6fd9465a5e5574d53492916106e8565b8a916131b260405190565b600090a3388061314b565b6101a0015161014097613152979650945061320a93506131de91908561230a565b611245836131776017936131f56111ad8487610e40565b906132046111ca600392610bcb565b9161326c565b6132347ff868788948d55240774fdbad06555105ef20bbc70d1b7eccda982b65e11e79bb916106e8565b8a9161323f60405190565b600090a361254d565b505097949550505061010394506121a891506020905101516001600160a01b031690565b818102929160009190600019818309858082109103039460009261328f84610bcb565b871461337457868611156133625761011196866132d8946001936132eb9850099083821190039203956132c58161180d87610bcb565b8116908180928192049804950304010290565b17916132eb6132ef826132eb6003610bcb565b0290565b61180d6111ca61335c61334d61333e61332f61332060029761331089610bcb565b186132eb8b820261180d8b610bcb565b6132eb8a820261180d8a610bcb565b6132eb89820261180d89610bcb565b6132eb88820261180d88610bcb565b6132eb87820261180d87610bcb565b80950290565b60405163227bc15360e01b8152600490fd5b50925050506101119250610f5a565b610103906133a7610c6261339b612f77846014610769565b60200151601390610fc8565b6121a860206133e060408401936111c46111ca6133c660408851015190565b610db56133d76101c0606496015190565b61121a86610bcb565b92612b04856133f58661121a60408651015190565b95336122c5565b60005b83811061340f5750506000910152565b81810151838201526020016133ff565b613440611a88602093610b3b93613434815190565b80835293849260200190565b958691016133fc565b9081526040602082018190526101119291019061341f565b9061346e6118bd83611885565b918252565b3d1561348d576134823d613461565b903d6000602084013e565b606090565b634e487b7160e01b600052600160045260246000fd5b156134af57565b613492565b6134ce600e610ad56013610fc8600161083e876014610769565b906000926134de610105856105c3565b6001600160a01b038416036134f35750505050565b8380936135386135036019610780565b9461352961351060405190565b635dd8085560e01b602082015295869260248401613449565b602082018103825203846107a0565b60208301925193f150613549613473565b506135715a61356b610f606101116135616019610780565b6111c4603f610bcb565b116134a8565b38808080612bac565b9190811015610c21576020020190565b35610111816100e8565b9193929181936135a5845b86610d27565b6135af6000610bcb565b855b8110156135f1576135ea816135e4896102496135d9848b6135de6135d96135b19a8e8e61357a565b61358a565b9461357a565b5061254d565b90506135af565b50945050505050600190565b90919061360a6000610bcb565b8381101561362c5780612a456104dc6135d961362794888761357a565b61360a565b506001925050565b61363e6000610bcb565b855b8110156135f15761366b81612a456104dc8a6102496135d9858c6135de6135d96136409b8f8f61357a565b905061363e565b6136bf610111949392613683600090565b5061368f610ce8825190565b207f19457468657265756d205369676e6564204d6573736167653a0a333200000000600052601c52603c60002090565b90613756565b6001600160e01b031981166100ea565b90505190610103826136c5565b906020828203126100f157610111916136d5565b90815260406020820181905261011193910191611a6a565b6040513d6000823e3d90fd5b909392938483116100f15784116100f1578101920390565b359060208110613740575090565b61375290600019906020036008021b90565b1690565b9290916000843b613769610f6083610bcb565b1161385157613777816105c3565b50826137836041610bcb565b81036137b85750506137b49261379f6105f9936137a5936118dc565b906138f5565b5050926001600160a01b031690565b1490565b6137c9610f60604096939496610bcb565b0361380c576137b4936138066137fa856137a5956105f9976138006137fa6137f16020610bcb565b8094848a61371a565b90613732565b9561371a565b9161396d565b60405162461bcd60e51b815260206004820152601860248201527f696e76616c69642d7369676e61747572652d666f726d617400000000000000006044820152606490fd5b939161388c61386c6138676020959694966106e8565b6106e8565b91613897631626ba7e9161387f60405190565b9788968795869560e01b90565b8552600485016136f6565b03915afa600091816138c5575b506138ad575090565b630b135d3f60e11b91506001600160e01b0319161490565b6138e791925060203d81116138ee575b6138df81836107a0565b8101906136e2565b90386138a4565b503d6138d5565b9190600092613902825190565b61390f610f606041610bcb565b036139435761393c929350613922600090565b506020820151906060604084015193015160001a906139e6565b9192909190565b50915061395060006105c3565b9061395e6126f06002945190565b91929190565b61011190610bcb565b61393c9291906139b06139ab6139a161399761398f6001600160ff1b03610bcb565b871696613964565b61152860ff611402565b610b3b601b610bcb565b611402565b906139e6565b61161d610103946139df6060949897956139d5608086019a6000870152565b60ff166020850152565b6040830152565b90916139f184613964565b613a1d610f607f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0610bcb565b11613a915790613a3f60209460009493613a3660405190565b948594856139b6565b838052039060015afa15613a8c57600051600091613a5c836105c3565b6001600160a01b0381166001600160a01b03841614613a7f575061395e83610bcb565b915061395e600193610bcb565b61370e565b505050613a9e60006105c3565b916003919056fea2646970667358221220de73d2d34d626cb73741cf65ba460385cce0269eaf006e1c3862e89562bd596164736f6c63430008150033" +} \ No newline at end of file diff --git a/deployments/bellecour/IexecPocoAccessorsDelegate.json b/deployments/bellecour/IexecPocoAccessorsDelegate.json new file mode 100644 index 000000000..6fa36c872 --- /dev/null +++ b/deployments/bellecour/IexecPocoAccessorsDelegate.json @@ -0,0 +1,596 @@ +{ + "address": "0xa1d371eF7bf36e89Db41276543ACf91Ec50Dd261", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "app", + "type": "address" + }, + { + "internalType": "uint256", + "name": "appprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "datasetrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "workerpoolrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.AppOrder", + "name": "appOrder", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "dataset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "datasetprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "apprestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "workerpoolrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.DatasetOrder", + "name": "datasetOrder", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "workerpool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "workerpoolprice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trust", + "type": "uint256" + }, + { + "internalType": "address", + "name": "apprestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "datasetrestrict", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterrestrict", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.WorkerpoolOrder", + "name": "workerpoolOrder", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "app", + "type": "address" + }, + { + "internalType": "uint256", + "name": "appmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "dataset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "datasetmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "workerpool", + "type": "address" + }, + { + "internalType": "uint256", + "name": "workerpoolmaxprice", + "type": "uint256" + }, + { + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "volume", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "trust", + "type": "uint256" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "callback", + "type": "address" + }, + { + "internalType": "string", + "name": "params", + "type": "string" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "sign", + "type": "bytes" + } + ], + "internalType": "struct IexecLibOrders_v5.RequestOrder", + "name": "requestOrder", + "type": "tuple" + } + ], + "name": "computeDealVolume", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "viewDeal", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "pointer", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "internalType": "struct IexecLibCore_v5.Resource", + "name": "app", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "pointer", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "internalType": "struct IexecLibCore_v5.Resource", + "name": "dataset", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "pointer", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "internalType": "struct IexecLibCore_v5.Resource", + "name": "workerpool", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "trust", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "category", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "tag", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "requester", + "type": "address" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "internalType": "address", + "name": "callback", + "type": "address" + }, + { + "internalType": "string", + "name": "params", + "type": "string" + }, + { + "internalType": "uint256", + "name": "startTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "botFirst", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "botSize", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "workerStake", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "schedulerRewardRatio", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sponsor", + "type": "address" + } + ], + "internalType": "struct IexecLibCore_v5.Deal", + "name": "deal", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "viewTask", + "outputs": [ + { + "components": [ + { + "internalType": "enum IexecLibCore_v5.TaskStatusEnum", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "dealid", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "idx", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeref", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "contributionDeadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "revealDeadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "finalDeadline", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "consensusValue", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "revealCounter", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "winnerCounter", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "contributors", + "type": "address[]" + }, + { + "internalType": "bytes32", + "name": "resultDigest", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "results", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "resultsTimestamp", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "resultsCallback", + "type": "bytes" + } + ], + "internalType": "struct IexecLibCore_v5.Task", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "numDeployments": 1, + "bytecode": "0x6080604052346200002657620000146200002b565b6040516119126200026a823961191290f35b600080fd5b6200003562000037565b565b62000035620000356200004a3362000054565b6200003562000130565b62000035906200003590620000af565b6200007762000074620000749290565b90565b6001600160a01b031690565b620000749062000064565b620000999062000077565b9052565b6020810192916200003591906200008e565b6000620000bc8162000083565b90620000c88262000077565b620000d38462000077565b14620000e757506200003591905062000207565b50604051620001089250631e4fbdf760e01b8152918291600483016200009d565b0390fd5b620001166200013a565b62000035620000356200012a600062000083565b62000207565b620000356200010c565b620001446200019b565b33906200015c620001558362000077565b9162000077565b03620001655750565b60405163118cdaa760e01b81529081906200010890600483016200009d565b620000749062000077565b62000074905462000184565b6200007460006200018f565b620000749062000077906001600160a01b031682565b6200007490620001a7565b6200007490620001bd565b90620001e7620000746200020392620001c8565b82546001600160a01b0319166001600160a01b03919091161790565b9055565b6200021360006200018f565b9062000221816000620001d3565b62000258620002517f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e093620001c8565b91620001c8565b916200026360405190565b600090a356fe6080604052600436101561001257600080fd5b60003560e01c806366517ca614610072578063715018a61461006d5780638da5cb5b14610068578063adccf0d514610063578063b74861b21461005e5763f2fde38b0361008657610610565b6105b9565b610422565b6101a2565b610179565b61013b565b90816101209103126100865790565b600080fd5b90816101609103126100865790565b90816102009103126100865790565b9060808282031261008657813567ffffffffffffffff811161008657816100d1918401610077565b92602083013567ffffffffffffffff811161008657826100f2918501610077565b92604081013567ffffffffffffffff8111610086578361011391830161008b565b92606082013567ffffffffffffffff811161008657610132920161009a565b90565b9052565b565b346100865761016a61015a6101513660046100a9565b929190916115cc565b6040519182918290815260200190565b0390f35b600091031261008657565b346100865761018936600461016e565b610191610660565b604051005b6001600160a01b031690565b34610086576101b236600461016e565b61016a6101c76000546001600160a01b031690565b604051918291826001600160a01b03909116815260200190565b805b0361008657565b90503590610139826101e1565b9060208282031261008657610132916101ea565b634e487b7160e01b600052602160045260246000fd5b6005111561022b57565b61020b565b9061013982610221565b61013290610230565b6101359061023a565b0190565b9061027061026961025f845190565b8084529260200190565b9260200190565b9060005b8181106102815750505090565b9091926102a76102a060019286516001600160a01b0316815260200190565b9460200190565b929101610274565b60005b8381106102c25750506000910152565b81810151838201526020016102b2565b6102f36102fc60209361024c936102e7815190565b80835293849260200190565b958691016102af565b601f01601f191690565b610132916101c06103ee6103c96101e0840161032a60008701516000870190610243565b61033960208701516020870152565b61034860408701516040870152565b61035760608701516060870152565b61036660808701516080870152565b61037560a087015160a0870152565b61038460c087015160c0870152565b61039360e087015160e0870152565b6103a4610100870151610100870152565b6103b5610120870151610120870152565b610140860151858203610140870152610250565b6103da610160860151610160860152565b6101808501518482036101808601526102d2565b926104006101a08201516101a0850152565b0151906101c08184039101526102d2565b602080825261013292910190610306565b346100865761016a61043d6104383660046101f7565b610eec565b60405191829182610411565b80516001600160a01b03168252610139919060409081906020818101516001600160a01b0316908501520151910152565b90610132906102a06101e06105426102c0840161049f60008801516000870190610449565b6104b160208801516060870190610449565b6104c3604088015160c0870190610449565b6104d36060880151610120870152565b6104e36080880151610140870152565b6104f360a0880151610160870152565b60c08701516001600160a01b031661018086015260e08701516001600160a01b03166101a08601526101008701516001600160a01b03166101c0860152610120870151858203848701526102d2565b94610554610140820151610200860152565b610565610160820151610220860152565b610576610180820151610240860152565b6105876101a0820151610260860152565b6105986101c0820151610280860152565b01516001600160a01b0316910152565b60208082526101329291019061047a565b346100865761016a6105d46105cf3660046101f7565b610c0b565b604051918291826105a8565b6001600160a01b0381166101e3565b90503590610139826105e0565b9060208282031261008657610132916105ef565b34610086576101916106233660046105fc565b610715565b610630610668565b61013961064e565b6101966101326101329290565b61013290610638565b61013961065b6000610645565b610774565b610139610628565b6000546001600160a01b03163390610688825b916001600160a01b031690565b036106905750565b60405163118cdaa760e01b81526001600160a01b03919091166004820152602490fd5b610139906106bf610668565b60006106ca81610645565b906001600160a01b0382166001600160a01b038416146106f05750610139919050610774565b50604051631e4fbdf760e01b81526001600160a01b0391909116600482015260249150fd5b610139906106b3565b61013290610196906001600160a01b031682565b6101329061071e565b61013290610732565b906107546101326107709261073b565b82546001600160a01b0319166001600160a01b03919091161790565b9055565b6000546001600160a01b03169061078c816000610744565b6107bf6107b97f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09361073b565b9161073b565b916107c960405190565b600090a3565b634e487b7160e01b600052604160045260246000fd5b90601f01601f1916810190811067ffffffffffffffff82111761080757604052565b6107cf565b9061013961081960405190565b92836107e5565b61013261020061080c565b610132606061080c565b61083d61082b565b600080825260208201819052604082015290565b610132610835565b610861610820565b9061086a610851565b825260208201610878610851565b8152602001610885610851565b815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160009052565b610132610859565b6101329081565b61013290546108ec565b9061013961095d600261090e61082b565b9461093061092382546001600160a01b031690565b6001600160a01b03168752565b61095761094760018301546001600160a01b031690565b6001600160a01b03166020880152565b016108f3565b6040840152565b634e487b7160e01b600052602260045260246000fd5b906001600283049216801561099a575b602083101461099557565b610964565b91607f169161098a565b805460009392916109c16109b78361097a565b8085529360200190565b9160018116908115610a1357506001146109da57505050565b6109ed9192939450600052602060002090565b916000925b8184106109ff5750500190565b8054848401526020909301926001016109f2565b92949550505060ff1916825215156020020190565b90610132916109a4565b90610139610a4c92610a4360405190565b93848092610a28565b03836107e5565b90610139610bf16015610a64610820565b94610a75610a71826108fd565b8752565b610a8b610a84600383016108fd565b6020880152565b610aa1610a9a600683016108fd565b6040880152565b610ab7610ab0600983016108f3565b6060880152565b610acd610ac6600a83016108f3565b6080880152565b610ae3610adc600b83016108f3565b60a0880152565b610b0a610afa600c8301546001600160a01b031690565b6001600160a01b031660c0880152565b610b31610b21600d8301546001600160a01b031690565b6001600160a01b031660e0880152565b610b59610b48600e8301546001600160a01b031690565b6001600160a01b0316610100880152565b610b70610b68600f8301610a32565b610120880152565b610b87610b7f601083016108f3565b610140880152565b610b9e610b96601183016108f3565b610160880152565b610bb5610bad601283016108f3565b610180880152565b610bcc610bc4601383016108f3565b6101a0880152565b610be3610bdb601483016108f3565b6101c0880152565b01546001600160a01b031690565b6001600160a01b03166101e0840152565b61013290610a53565b610c2c61013291610c1a6108e4565b50601390600052602052604060002090565b610c02565b6101326101e061080c565b610c44610c31565b9060008252602082016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016060815260200160008152602001606081526020016000815260200160609052565b610132610c3c565b9061013590610230565b90610cdb610ccf61025f845490565b92600052602060002090565b9060005b818110610cec5750505090565b909192610d21610d1a600192610d0987546001600160a01b031690565b6001600160a01b0316815260200190565b9460010190565b929101610cdf565b9061013291610cc0565b90610139610a4c92610d4460405190565b93848092610d29565b80546000939291610d606109b78361097a565b9160018116908115610a135750600114610d7957505050565b610d8c9192939450600052602060002090565b916000925b818410610d9e5750500190565b805484840152602090930192600101610d91565b9061013291610d4d565b90610139610a4c92610dcd60405190565b93848092610db2565b90610139610edb600e610de7610c31565b94610dfc610df6825460ff1690565b87610cb6565b610e0b610a84600183016108f3565b610e1a610a9a600283016108f3565b610e29610ab0600383016108f3565b610e38610ac6600483016108f3565b610e47610adc600583016108f3565b610e5d610e56600683016108f3565b60c0880152565b610e73610e6c600783016108f3565b60e0880152565b610e8a610e82600883016108f3565b610100880152565b610e99610b68600983016108f3565b610ea8610b7f600a8301610d33565b610eb7610b96600b83016108f3565b610ec6610bad600c8301610dbc565b610ed5610bc4600d83016108f3565b01610dbc565b6101c0840152565b61013290610dd6565b610f0d61013291610efb610cae565b50601490600052602052604060002090565b610ee3565b35610132816101e1565b67ffffffffffffffff811161080757602090601f01601f19160190565b90826000939282370152565b90929192610f5a610f5582610f1c565b61080c565b938185526020850190828401116100865761013992610f39565b9080601f830112156100865781602061013293359101610f45565b9190916101208184031261008657610fa861012061080c565b926000610fb582846105ef565b908501526020610fc7828285016101ea565b908501526040610fd9828285016101ea565b908501526060610feb828285016101ea565b908501526080610ffd828285016105ef565b9085015260a061100f828285016105ef565b9085015260c0611021828285016105ef565b9085015260e0611033828285016101ea565b9085015261010082013567ffffffffffffffff8111610086576110569201610f74565b610100830152565b610132903690610f8f565b90505190610139826101e1565b906020828203126100865761013291611069565b80516001600160a01b0316825261013291610120810191610100906110b460208201516020850152565b6110c360408201516040850152565b6110d260608201516060850152565b6080818101516001600160a01b03169084015260a0818101516001600160a01b03169084015260c0818101516001600160a01b03169084015261111a60e082015160e0850152565b0151906101008184039101526102d2565b60208082526101329291019061108a565b6040513d6000823e3d90fd5b35610132816105e0565b919091610160818403126100865761116b61016061080c565b92600061117882846105ef565b90850152602061118a828285016101ea565b90850152604061119c828285016101ea565b9085015260606111ae828285016101ea565b9085015260806111c0828285016101ea565b9085015260a06111d2828285016101ea565b9085015260c06111e4828285016105ef565b9085015260e06111f6828285016105ef565b90850152610100611209828285016105ef565b9085015261012061121c828285016101ea565b9085015261014082013567ffffffffffffffff81116100865761123f9201610f74565b610140830152565b610132903690611152565b80516001600160a01b03168252610132916101608101916101409061127c60208201516020850152565b61128b60408201516040850152565b61129a60608201516060850152565b6112a960808201516080850152565b6112b860a082015160a0850152565b60c0818101516001600160a01b03169084015260e0818101516001600160a01b031690840152610100818101516001600160a01b031690840152611303610120820151610120850152565b0151906101408184039101526102d2565b602080825261013292910190611252565b919091610200818403126100865761133e61020061080c565b92600061134b82846105ef565b90850152602061135d828285016101ea565b90850152604061136f828285016105ef565b908501526060611381828285016101ea565b908501526080611393828285016105ef565b9085015260a06113a5828285016101ea565b9085015260c06113b7828285016105ef565b9085015260e06113c9828285016101ea565b908501526101006113dc828285016101ea565b908501526101206113ef828285016101ea565b90850152610140611402828285016101ea565b90850152610160611415828285016105ef565b90850152610180611428828285016105ef565b908501526101a082013567ffffffffffffffff8111610086578161144d918401610f74565b6101a08501526101c0611462828285016101ea565b908501526101e082013567ffffffffffffffff8111610086576114859201610f74565b6101e0830152565b610132903690611325565b80516001600160a01b03168252610132916101e061159861020083016114c360208601516020860152565b6040858101516001600160a01b0316908501526114e560608601516060860152565b6080858101516001600160a01b03169085015261150760a086015160a0860152565b60c0858101516001600160a01b03169085015261152960e086015160e0860152565b61153a610100860151610100860152565b61154b610120860151610120860152565b61155c610140860151610140860152565b610160858101516001600160a01b031690850152610180858101516001600160a01b0316908501526101a08501518482036101a08601526102d2565b926115aa6101c08201516101c0850152565b0151906101e08184039101526102d2565b602080825261013292910190611498565b909290916115e56115df60408501610f12565b9361105e565b9073e8b04c85c47fcec0e9ee30d4034e2997f651912391602061161d637c0d54d361162861161260405190565b948593849360e01b90565b83526004830161112b565b0381865af480156117a25761164591600091611774575b506118b1565b9461164f81611148565b61165f61067b6101966000610645565b14159061167761167160408301610f12565b9161105e565b602061161d6311b2eee261168d61161260405190565b0381885af480156117a2576116a99160009161177457506118b1565b916116bf6116b960408601610f12565b94611247565b9760206116e163fed985fe6116ec6116d660405190565b9c8d93849360e01b90565b835260048301611314565b0381895af480156117a25761170e60209161174e9b6000916117a757506118b1565b9661172461171e60e08b01610f12565b9961148d565b90611743638ac03f3361173660405190565b9d8e948593849360e01b90565b8352600483016115bb565b03915af49889156117a2576101329961176e9160009161177457506118b1565b976117e6565b611795915060203d811161179b575b61178d81836107e5565b810190611076565b3861163f565b503d611783565b61113c565b6117959150833d811161179b5761178d81836107e5565b634e487b7160e01b600052601160045260246000fd5b919082039182116117e157565b6117be565b96949791959390936117f6600090565b506012978895611810908790600052602052604060002090565b611819906108f3565b611822916117d4565b966000146101329961186a6118656118766118709b61186a9a6118659a61188799611870986118975761186561186a916118709490600052602052604060002090565b6108f3565b906117d4565b9061189f565b948c90600052602052604060002090565b9590600052602052604060002090565b505050600019905b90808210156118ac575090565b919050565b610132906118bf60106108f3565b6042916040519161190160f01b835260028301526022820152209056fea26469706673582212203bfa0078c1402541a85a3b72aa74031e300309c71dc8a02d64ddb78c5b54af1064736f6c63430008150033" +} \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..335d9efbc --- /dev/null +++ b/docs/README.md @@ -0,0 +1,26 @@ +# UMLs + +## Contracts and Actors Architecture +[![Contracts and Actors Architecture](https://tinyurl.com/2l3942fk)](https://tinyurl.com/2l3942fk) + +## Workflows + +### Nominal +[![Nominal workflow sequence](https://tinyurl.com/2nb5oau3)](https://tinyurl.com/2nb5oau3) + +### Nominal+TEE +[![Nominal workflow sequence w/ TEE](https://tinyurl.com/2jwzqrgx)](https://tinyurl.com/2jwzqrgx) + +### Boost +[![Boost workflow sequence](https://tinyurl.com/2oofk7yf)](https://tinyurl.com/2oofk7yf) + +### Nominal vs Boost vs Nominal TEE: From Match to Finalize + +* Nominal +[![Nominal](https://tinyurl.com/2o4xu745)](https://tinyurl.com/2o4xu745) + +* Boost +[![Boost](https://tinyurl.com/2mmsokrr)](https://tinyurl.com/2mmsokrr) + +* Nominal TEE +[![Nominal TEE](https://tinyurl.com/2zubyfvw)](https://tinyurl.com/2zubyfvw) diff --git a/docs/Statuses.md b/docs/Statuses.md new file mode 100644 index 000000000..8023d1b90 --- /dev/null +++ b/docs/Statuses.md @@ -0,0 +1,38 @@ +## Task statuses + +Flows: +- Nominal +- "Contribute and finalize" +- Boost + +```mermaid +flowchart TB + UNSET --> |if deadline and claim| FAILED + UNSET --> |if matchOrder and initialize| ACTIVE + ACTIVE["ACTIVE
(waiting for contributions)"] --> |if weigh of contributions > requested trust| REVEALING + ACTIVE --> |if deadline and claim| FAILED + REVEALING["REVEALING
(waiting for reveals)"] --> |if deadline and claim| FAILED + REVEALING --> |if deadline and claim| FAILED + REVEALING --> |if no reveal and reopen| ACTIVE + REVEALING --> |if enough reveal and after finalize| COMPLETED + ACTIVE --> |if trust = 1 and contributeAndFinalize| COMPLETED + linkStyle 8 stroke:orange + UNSET --> |if trust = 1, boost_matchOrder
and boost_pushResult| COMPLETED + linkStyle 9 stroke:green +``` +## Contributions statuses + +- Nominal and "contribute and finalize" flows + +```mermaid +flowchart TB + UNSET --> |if active task and contribute| CONTRIBUTED + CONTRIBUTED --> |if not part of the consensus| REJECTED + CONTRIBUTED --> |if inside consensus| PROVED + UNSET --> |if trust = 1 and contributeAndFinalize| PROVED + linkStyle 3 stroke:orange +``` + +- Boost flow + +No contributions statuses in Boost flow. diff --git a/docs/solidity/index.md b/docs/solidity/index.md new file mode 100644 index 000000000..0e6864cba --- /dev/null +++ b/docs/solidity/index.md @@ -0,0 +1,1212 @@ +# Solidity API + +## IexecLibCore_v5 + +### Account + +Tools + +```solidity +struct Account { + uint256 stake; + uint256 locked; +} +``` + +### Category + +```solidity +struct Category { + string name; + string description; + uint256 workClockTimeRef; +} +``` + +### Resource + +Clerk - Deals + +```solidity +struct Resource { + address pointer; + address owner; + uint256 price; +} +``` + +### Deal + +```solidity +struct Deal { + struct IexecLibCore_v5.Resource app; + struct IexecLibCore_v5.Resource dataset; + struct IexecLibCore_v5.Resource workerpool; + uint256 trust; + uint256 category; + bytes32 tag; + address requester; + address beneficiary; + address callback; + string params; + uint256 startTime; + uint256 botFirst; + uint256 botSize; + uint256 workerStake; + uint256 schedulerRewardRatio; + address sponsor; +} +``` + +### DealBoost + +Simplified deals for PoCo Boost module. + +```solidity +struct DealBoost { + address appOwner; + uint96 appPrice; + address datasetOwner; + uint96 datasetPrice; + address workerpoolOwner; + uint96 workerpoolPrice; + address requester; + uint96 workerReward; + address callback; + uint40 deadline; + uint16 botFirst; + uint16 botSize; + bytes3 shortTag; + address sponsor; +} +``` + +### TaskStatusEnum + +Tasks + +```solidity +enum TaskStatusEnum { + UNSET, + ACTIVE, + REVEALING, + COMPLETED, + FAILED +} +``` + +### Task + +```solidity +struct Task { + enum IexecLibCore_v5.TaskStatusEnum status; + bytes32 dealid; + uint256 idx; + uint256 timeref; + uint256 contributionDeadline; + uint256 revealDeadline; + uint256 finalDeadline; + bytes32 consensusValue; + uint256 revealCounter; + uint256 winnerCounter; + address[] contributors; + bytes32 resultDigest; + bytes results; + uint256 resultsTimestamp; + bytes resultsCallback; +} +``` + +### Consensus + +Consensus + +```solidity +struct Consensus { + mapping(bytes32 => uint256) group; + uint256 total; +} +``` + +### ContributionStatusEnum + +Consensus + +```solidity +enum ContributionStatusEnum { + UNSET, + CONTRIBUTED, + PROVED, + REJECTED +} +``` + +### Contribution + +```solidity +struct Contribution { + enum IexecLibCore_v5.ContributionStatusEnum status; + bytes32 resultHash; + bytes32 resultSeal; + address enclaveChallenge; + uint256 weight; +} +``` + +## IexecLibOrders_v5 + +### EIP712DOMAIN_TYPEHASH + +```solidity +bytes32 EIP712DOMAIN_TYPEHASH +``` + +### APPORDER_TYPEHASH + +```solidity +bytes32 APPORDER_TYPEHASH +``` + +### DATASETORDER_TYPEHASH + +```solidity +bytes32 DATASETORDER_TYPEHASH +``` + +### WORKERPOOLORDER_TYPEHASH + +```solidity +bytes32 WORKERPOOLORDER_TYPEHASH +``` + +### REQUESTORDER_TYPEHASH + +```solidity +bytes32 REQUESTORDER_TYPEHASH +``` + +### APPORDEROPERATION_TYPEHASH + +```solidity +bytes32 APPORDEROPERATION_TYPEHASH +``` + +### DATASETORDEROPERATION_TYPEHASH + +```solidity +bytes32 DATASETORDEROPERATION_TYPEHASH +``` + +### WORKERPOOLORDEROPERATION_TYPEHASH + +```solidity +bytes32 WORKERPOOLORDEROPERATION_TYPEHASH +``` + +### REQUESTORDEROPERATION_TYPEHASH + +```solidity +bytes32 REQUESTORDEROPERATION_TYPEHASH +``` + +### OrderOperationEnum + +```solidity +enum OrderOperationEnum { + SIGN, + CLOSE +} +``` + +### EIP712Domain + +```solidity +struct EIP712Domain { + string name; + string version; + uint256 chainId; + address verifyingContract; +} +``` + +### AppOrder + +```solidity +struct AppOrder { + address app; + uint256 appprice; + uint256 volume; + bytes32 tag; + address datasetrestrict; + address workerpoolrestrict; + address requesterrestrict; + bytes32 salt; + bytes sign; +} +``` + +### DatasetOrder + +```solidity +struct DatasetOrder { + address dataset; + uint256 datasetprice; + uint256 volume; + bytes32 tag; + address apprestrict; + address workerpoolrestrict; + address requesterrestrict; + bytes32 salt; + bytes sign; +} +``` + +### WorkerpoolOrder + +```solidity +struct WorkerpoolOrder { + address workerpool; + uint256 workerpoolprice; + uint256 volume; + bytes32 tag; + uint256 category; + uint256 trust; + address apprestrict; + address datasetrestrict; + address requesterrestrict; + bytes32 salt; + bytes sign; +} +``` + +### RequestOrder + +```solidity +struct RequestOrder { + address app; + uint256 appmaxprice; + address dataset; + uint256 datasetmaxprice; + address workerpool; + uint256 workerpoolmaxprice; + address requester; + uint256 volume; + bytes32 tag; + uint256 category; + uint256 trust; + address beneficiary; + address callback; + string params; + bytes32 salt; + bytes sign; +} +``` + +### AppOrderOperation + +```solidity +struct AppOrderOperation { + struct IexecLibOrders_v5.AppOrder order; + enum IexecLibOrders_v5.OrderOperationEnum operation; + bytes sign; +} +``` + +### DatasetOrderOperation + +```solidity +struct DatasetOrderOperation { + struct IexecLibOrders_v5.DatasetOrder order; + enum IexecLibOrders_v5.OrderOperationEnum operation; + bytes sign; +} +``` + +### WorkerpoolOrderOperation + +```solidity +struct WorkerpoolOrderOperation { + struct IexecLibOrders_v5.WorkerpoolOrder order; + enum IexecLibOrders_v5.OrderOperationEnum operation; + bytes sign; +} +``` + +### RequestOrderOperation + +```solidity +struct RequestOrderOperation { + struct IexecLibOrders_v5.RequestOrder order; + enum IexecLibOrders_v5.OrderOperationEnum operation; + bytes sign; +} +``` + +### hash + +```solidity +function hash(struct IexecLibOrders_v5.EIP712Domain _domain) public pure returns (bytes32 domainhash) +``` + +### hash + +```solidity +function hash(struct IexecLibOrders_v5.AppOrder _apporder) public pure returns (bytes32 apphash) +``` + +### hash + +```solidity +function hash(struct IexecLibOrders_v5.DatasetOrder _datasetorder) public pure returns (bytes32 datasethash) +``` + +### hash + +```solidity +function hash(struct IexecLibOrders_v5.WorkerpoolOrder _workerpoolorder) public pure returns (bytes32 workerpoolhash) +``` + +### hash + +```solidity +function hash(struct IexecLibOrders_v5.RequestOrder _requestorder) public pure returns (bytes32 requesthash) +``` + +### hash + +```solidity +function hash(struct IexecLibOrders_v5.AppOrderOperation _apporderoperation) public pure returns (bytes32) +``` + +### hash + +```solidity +function hash(struct IexecLibOrders_v5.DatasetOrderOperation _datasetorderoperation) public pure returns (bytes32) +``` + +### hash + +```solidity +function hash(struct IexecLibOrders_v5.WorkerpoolOrderOperation _workerpoolorderoperation) public pure returns (bytes32) +``` + +### hash + +```solidity +function hash(struct IexecLibOrders_v5.RequestOrderOperation _requestorderoperation) public pure returns (bytes32) +``` + +## DelegateBase + +_Every module must inherit from this contract._ + +## IexecOrderManagementDelegate + +### manageAppOrder + +```solidity +function manageAppOrder(struct IexecLibOrders_v5.AppOrderOperation _apporderoperation) external +``` + +### manageDatasetOrder + +```solidity +function manageDatasetOrder(struct IexecLibOrders_v5.DatasetOrderOperation _datasetorderoperation) external +``` + +### manageWorkerpoolOrder + +```solidity +function manageWorkerpoolOrder(struct IexecLibOrders_v5.WorkerpoolOrderOperation _workerpoolorderoperation) external +``` + +### manageRequestOrder + +```solidity +function manageRequestOrder(struct IexecLibOrders_v5.RequestOrderOperation _requestorderoperation) external +``` + +## IexecEscrow + +### Transfer + +```solidity +event Transfer(address from, address to, uint256 value) +``` + +### Lock + +```solidity +event Lock(address owner, uint256 amount) +``` + +### Unlock + +```solidity +event Unlock(address owner, uint256 amount) +``` + +### Reward + +```solidity +event Reward(address owner, uint256 amount, bytes32 ref) +``` + +### Seize + +```solidity +event Seize(address owner, uint256 amount, bytes32 ref) +``` + +## Matching + +```solidity +struct Matching { + bytes32 apporderHash; + address appOwner; + bytes32 datasetorderHash; + address datasetOwner; + bytes32 workerpoolorderHash; + address workerpoolOwner; + bytes32 requestorderHash; + bool hasDataset; +} +``` + +## IexecPoco1Delegate + +### verifySignature + +```solidity +function verifySignature(address _identity, bytes32 _hash, bytes _signature) external view returns (bool) +``` + +### verifyPresignature + +```solidity +function verifyPresignature(address _identity, bytes32 _hash) external view returns (bool) +``` + +### verifyPresignatureOrSignature + +```solidity +function verifyPresignatureOrSignature(address _identity, bytes32 _hash, bytes _signature) external view returns (bool) +``` + +### matchOrders + +```solidity +function matchOrders(struct IexecLibOrders_v5.AppOrder _apporder, struct IexecLibOrders_v5.DatasetOrder _datasetorder, struct IexecLibOrders_v5.WorkerpoolOrder _workerpoolorder, struct IexecLibOrders_v5.RequestOrder _requestorder) external returns (bytes32) +``` + +Match orders. The requester gets debited. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _apporder | struct IexecLibOrders_v5.AppOrder | The app order. | +| _datasetorder | struct IexecLibOrders_v5.DatasetOrder | The dataset order. | +| _workerpoolorder | struct IexecLibOrders_v5.WorkerpoolOrder | The workerpool order. | +| _requestorder | struct IexecLibOrders_v5.RequestOrder | The requester order. | + +### sponsorMatchOrders + +```solidity +function sponsorMatchOrders(struct IexecLibOrders_v5.AppOrder _apporder, struct IexecLibOrders_v5.DatasetOrder _datasetorder, struct IexecLibOrders_v5.WorkerpoolOrder _workerpoolorder, struct IexecLibOrders_v5.RequestOrder _requestorder) external returns (bytes32) +``` + +Sponsor match orders for a requester. +Unlike the standard `matchOrders(..)` hook where the requester pays for +the deal, this current hook makes it possible for any `msg.sender` to pay for +a third party requester. + +Be aware that anyone seeing a valid request order on the network +(via an off-chain public marketplace, via a `sponsorMatchOrders(..)` +pending transaction in the mempool or by any other means) might decide +to call the standard `matchOrders(..)` hook which will result in the +requester being debited instead. Therefore, such a front run would result +in a loss of some of the requester funds deposited in the iExec account +(a loss value equivalent to the price of the deal). + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| _apporder | struct IexecLibOrders_v5.AppOrder | The app order. | +| _datasetorder | struct IexecLibOrders_v5.DatasetOrder | The dataset order. | +| _workerpoolorder | struct IexecLibOrders_v5.WorkerpoolOrder | The workerpool order. | +| _requestorder | struct IexecLibOrders_v5.RequestOrder | The requester order. | + +## IexecPoco2Delegate + +### initialize + +```solidity +function initialize(bytes32 _dealid, uint256 idx) public returns (bytes32) +``` + +### contribute + +```solidity +function contribute(bytes32 _taskid, bytes32 _resultHash, bytes32 _resultSeal, address _enclaveChallenge, bytes _enclaveSign, bytes _authorizationSign) external +``` + +### contributeAndFinalize + +```solidity +function contributeAndFinalize(bytes32 _taskid, bytes32 _resultDigest, bytes _results, bytes _resultsCallback, address _enclaveChallenge, bytes _enclaveSign, bytes _authorizationSign) external +``` + +### reveal + +```solidity +function reveal(bytes32 _taskid, bytes32 _resultDigest) external +``` + +### reopen + +```solidity +function reopen(bytes32 _taskid) external +``` + +### finalize + +```solidity +function finalize(bytes32 _taskid, bytes _results, bytes _resultsCallback) external +``` + +### claim + +```solidity +function claim(bytes32 _taskid) public +``` + +### initializeArray + +```solidity +function initializeArray(bytes32[] _dealid, uint256[] _idx) external returns (bool) +``` + +### claimArray + +```solidity +function claimArray(bytes32[] _taskid) external returns (bool) +``` + +### initializeAndClaimArray + +```solidity +function initializeAndClaimArray(bytes32[] _dealid, uint256[] _idx) external returns (bool) +``` + +## IexecPocoAccessorsDelegate + +### viewDeal + +```solidity +function viewDeal(bytes32 id) external view returns (struct IexecLibCore_v5.Deal deal) +``` + +Get a deal created by PoCo module. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| id | bytes32 | The ID of the deal. | + +### viewTask + +```solidity +function viewTask(bytes32 id) external view returns (struct IexecLibCore_v5.Task) +``` + +Get task created in Classic mode. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| id | bytes32 | id of the task | + +### computeDealVolume + +```solidity +function computeDealVolume(struct IexecLibOrders_v5.AppOrder appOrder, struct IexecLibOrders_v5.DatasetOrder datasetOrder, struct IexecLibOrders_v5.WorkerpoolOrder workerpoolOrder, struct IexecLibOrders_v5.RequestOrder requestOrder) external view returns (uint256) +``` + +Computes the volume of the "not yet created" deal based on the provided orders. +This function should only be used if the deal is not yet created. +For existing deals, use the deal accessors instead. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| appOrder | struct IexecLibOrders_v5.AppOrder | The application order. | +| datasetOrder | struct IexecLibOrders_v5.DatasetOrder | The dataset order. | +| workerpoolOrder | struct IexecLibOrders_v5.WorkerpoolOrder | The workerpool order. | +| requestOrder | struct IexecLibOrders_v5.RequestOrder | The request order. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | uint256 | The computed deal volume. | + +## IexecPocoCommonDelegate + +## IexecPocoBoostAccessorsDelegate + +Access to PoCo Boost tasks must be done with PoCo Classic `IexecAccessors`. + +### viewDealBoost + +```solidity +function viewDealBoost(bytes32 id) external view returns (struct IexecLibCore_v5.DealBoost deal) +``` + +Get a deal created by PoCo Boost module. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| id | bytes32 | The ID of the deal. | + +## IexecPocoBoostDelegate + +Works for deals with requested trust = 0. + +### matchOrdersBoost + +```solidity +function matchOrdersBoost(struct IexecLibOrders_v5.AppOrder appOrder, struct IexecLibOrders_v5.DatasetOrder datasetOrder, struct IexecLibOrders_v5.WorkerpoolOrder workerpoolOrder, struct IexecLibOrders_v5.RequestOrder requestOrder) external returns (bytes32) +``` + +This boost match orders is only compatible with trust <= 1. +The requester gets debited. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| appOrder | struct IexecLibOrders_v5.AppOrder | The order signed by the application developer. | +| datasetOrder | struct IexecLibOrders_v5.DatasetOrder | The order signed by the dataset provider. | +| workerpoolOrder | struct IexecLibOrders_v5.WorkerpoolOrder | The order signed by the workerpool manager. | +| requestOrder | struct IexecLibOrders_v5.RequestOrder | The order signed by the requester. | + +#### Return Values + +| Name | Type | Description | +| ---- | ---- | ----------- | +| [0] | bytes32 | The ID of the deal. | + +### sponsorMatchOrdersBoost + +```solidity +function sponsorMatchOrdersBoost(struct IexecLibOrders_v5.AppOrder appOrder, struct IexecLibOrders_v5.DatasetOrder datasetOrder, struct IexecLibOrders_v5.WorkerpoolOrder workerpoolOrder, struct IexecLibOrders_v5.RequestOrder requestOrder) external returns (bytes32) +``` + +Sponsor match orders boost for a requester. +Unlike the standard `matchOrdersBoost(..)` hook where the requester pays for +the deal, this current hook makes it possible for any `msg.sender` to pay for +a third party requester. + +Be aware that anyone seeing a valid request order on the network +(via an off-chain public marketplace, via a `sponsorMatchOrdersBoost(..)` +pending transaction in the mempool or by any other means) might decide +to call the standard `matchOrdersBoost(..)` hook which will result in the +requester being debited instead. Therefore, such a front run would result +in a loss of some of the requester funds deposited in the iExec account +(a loss value equivalent to the price of the deal). + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| appOrder | struct IexecLibOrders_v5.AppOrder | The app order. | +| datasetOrder | struct IexecLibOrders_v5.DatasetOrder | The dataset order. | +| workerpoolOrder | struct IexecLibOrders_v5.WorkerpoolOrder | The workerpool order. | +| requestOrder | struct IexecLibOrders_v5.RequestOrder | The requester order. | + +### pushResultBoost + +```solidity +function pushResultBoost(bytes32 dealId, uint256 index, bytes results, bytes resultsCallback, bytes authorizationSign, address enclaveChallenge, bytes enclaveSign) external +``` + +Accept results of a task computed by a worker during Boost workflow. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| dealId | bytes32 | The id of the target deal. | +| index | uint256 | The index of the target task of the deal. | +| results | bytes | The results of the task computed by the worker. | +| resultsCallback | bytes | The results of the task computed by the worker that will be forwarded as call data to the callback address set by the requester. | +| authorizationSign | bytes | The authorization signed by the scheduler. authorizing the worker to push a result. | +| enclaveChallenge | address | The enclave address which can produce enclave signature. | +| enclaveSign | bytes | The signature generated from the enclave. | + +### claimBoost + +```solidity +function claimBoost(bytes32 dealId, uint256 index) external +``` + +Claim task to get a refund if task is not completed after deadline. + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| dealId | bytes32 | The ID of the deal. | +| index | uint256 | The index of the task. | + +## DelegateBase + +## ENSIntegrationDelegate + +### setName + +```solidity +function setName(address _ens, string _name) external +``` + +## IexecAccessorsDelegate + +### name + +```solidity +function name() external view returns (string) +``` + +### symbol + +```solidity +function symbol() external view returns (string) +``` + +### decimals + +```solidity +function decimals() external view returns (uint8) +``` + +### totalSupply + +```solidity +function totalSupply() external view returns (uint256) +``` + +### balanceOf + +```solidity +function balanceOf(address account) external view returns (uint256) +``` + +### frozenOf + +```solidity +function frozenOf(address account) external view returns (uint256) +``` + +### allowance + +```solidity +function allowance(address account, address spender) external view returns (uint256) +``` + +### viewAccount + +```solidity +function viewAccount(address account) external view returns (struct IexecLibCore_v5.Account) +``` + +### token + +```solidity +function token() external view returns (address) +``` + +### viewDeal + +```solidity +function viewDeal(bytes32 _id) external view returns (struct IexecLibCore_v5.Deal deal) +``` + +### viewConsumed + +```solidity +function viewConsumed(bytes32 _id) external view returns (uint256 consumed) +``` + +### viewPresigned + +```solidity +function viewPresigned(bytes32 _id) external view returns (address signer) +``` + +### viewTask + +```solidity +function viewTask(bytes32 _taskid) external view returns (struct IexecLibCore_v5.Task) +``` + +### viewContribution + +```solidity +function viewContribution(bytes32 _taskid, address _worker) external view returns (struct IexecLibCore_v5.Contribution) +``` + +### viewScore + +```solidity +function viewScore(address _worker) external view returns (uint256) +``` + +### resultFor + +```solidity +function resultFor(bytes32 id) external view returns (bytes) +``` + +### viewCategory + +```solidity +function viewCategory(uint256 _catid) external view returns (struct IexecLibCore_v5.Category category) +``` + +### countCategory + +```solidity +function countCategory() external view returns (uint256 count) +``` + +### appregistry + +```solidity +function appregistry() external view returns (contract IRegistry) +``` + +### datasetregistry + +```solidity +function datasetregistry() external view returns (contract IRegistry) +``` + +### workerpoolregistry + +```solidity +function workerpoolregistry() external view returns (contract IRegistry) +``` + +### teebroker + +```solidity +function teebroker() external view returns (address) +``` + +### callbackgas + +```solidity +function callbackgas() external view returns (uint256) +``` + +### contribution_deadline_ratio + +```solidity +function contribution_deadline_ratio() external view returns (uint256) +``` + +### reveal_deadline_ratio + +```solidity +function reveal_deadline_ratio() external view returns (uint256) +``` + +### final_deadline_ratio + +```solidity +function final_deadline_ratio() external view returns (uint256) +``` + +### workerpool_stake_ratio + +```solidity +function workerpool_stake_ratio() external view returns (uint256) +``` + +### kitty_ratio + +```solidity +function kitty_ratio() external view returns (uint256) +``` + +### kitty_min + +```solidity +function kitty_min() external view returns (uint256) +``` + +### kitty_address + +```solidity +function kitty_address() external view returns (address) +``` + +### groupmember_purpose + +```solidity +function groupmember_purpose() external view returns (uint256) +``` + +### eip712domain_separator + +```solidity +function eip712domain_separator() external view returns (bytes32) +``` + +## IexecCategoryManagerDelegate + +### createCategory + +```solidity +function createCategory(string name, string description, uint256 workClockTimeRef) external returns (uint256) +``` + +Methods + +## IexecERC20Core + +### Transfer + +```solidity +event Transfer(address from, address to, uint256 value) +``` + +### Approval + +```solidity +event Approval(address owner, address spender, uint256 value) +``` + +## IexecERC20Delegate + +### transfer + +```solidity +function transfer(address recipient, uint256 amount) external returns (bool) +``` + +### approve + +```solidity +function approve(address spender, uint256 value) external returns (bool) +``` + +### approveAndCall + +```solidity +function approveAndCall(address spender, uint256 value, bytes extraData) external returns (bool) +``` + +### transferFrom + +```solidity +function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) +``` + +### increaseAllowance + +```solidity +function increaseAllowance(address spender, uint256 addedValue) external returns (bool) +``` + +### decreaseAllowance + +```solidity +function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) +``` + +## IexecEscrowNativeDelegate + +### receive + +```solidity +receive() external payable +``` + +### fallback + +```solidity +fallback() external payable +``` + +### deposit + +```solidity +function deposit() external payable returns (bool) +``` + +### depositFor + +```solidity +function depositFor(address target) external payable returns (bool) +``` + +### depositForArray + +```solidity +function depositForArray(uint256[] amounts, address[] targets) external payable returns (bool) +``` + +### withdraw + +```solidity +function withdraw(uint256 amount) external returns (bool) +``` + +### withdrawTo + +```solidity +function withdrawTo(uint256 amount, address target) external returns (bool) +``` + +### recover + +```solidity +function recover() external returns (uint256) +``` + +## IexecEscrowTokenDelegate + +### receive + +```solidity +receive() external payable +``` + +### fallback + +```solidity +fallback() external payable +``` + +### deposit + +```solidity +function deposit(uint256 amount) external returns (bool) +``` + +### depositFor + +```solidity +function depositFor(uint256 amount, address target) external returns (bool) +``` + +### depositForArray + +```solidity +function depositForArray(uint256[] amounts, address[] targets) external returns (bool) +``` + +### withdraw + +```solidity +function withdraw(uint256 amount) external returns (bool) +``` + +### withdrawTo + +```solidity +function withdrawTo(uint256 amount, address target) external returns (bool) +``` + +### recover + +```solidity +function recover() external returns (uint256) +``` + +### receiveApproval + +```solidity +function receiveApproval(address sender, uint256 amount, address token, bytes) external returns (bool) +``` + +## IexecMaintenanceDelegate + +### configure + +```solidity +function configure(address _token, string _name, string _symbol, uint8 _decimal, address _appregistryAddress, address _datasetregistryAddress, address _workerpoolregistryAddress, address _v3_iexecHubAddress) external +``` + +### domain + +```solidity +function domain() external view returns (struct IexecLibOrders_v5.EIP712Domain) +``` + +### updateDomainSeparator + +```solidity +function updateDomainSeparator() external +``` + +### importScore + +```solidity +function importScore(address _worker) external +``` + +### setTeeBroker + +```solidity +function setTeeBroker(address _teebroker) external +``` + +### setCallbackGas + +```solidity +function setCallbackGas(uint256 _callbackgas) external +``` + +## IexecMaintenanceExtraDelegate + +### changeRegistries + +```solidity +function changeRegistries(address _appregistryAddress, address _datasetregistryAddress, address _workerpoolregistryAddress) external +``` + +## IexecRelayDelegate + +### broadcastAppOrder + +```solidity +function broadcastAppOrder(struct IexecLibOrders_v5.AppOrder _apporder) external +``` + +### broadcastDatasetOrder + +```solidity +function broadcastDatasetOrder(struct IexecLibOrders_v5.DatasetOrder _datasetorder) external +``` + +### broadcastWorkerpoolOrder + +```solidity +function broadcastWorkerpoolOrder(struct IexecLibOrders_v5.WorkerpoolOrder _workerpoolorder) external +``` + +### broadcastRequestOrder + +```solidity +function broadcastRequestOrder(struct IexecLibOrders_v5.RequestOrder _requestorder) external +``` + diff --git a/docs/solidity/templates/contract.hbs b/docs/solidity/templates/contract.hbs new file mode 100644 index 000000000..d9e0b8541 --- /dev/null +++ b/docs/solidity/templates/contract.hbs @@ -0,0 +1,14 @@ +{{!-- + Template to exclude internal functions. + See https://github.com/OpenZeppelin/solidity-docgen/issues/419. +--}} +{{>common}} + +{{#each items}} +{{#unless (eq visibility "internal")}} +{{#hsection}} +{{>item}} +{{/hsection}} +{{/unless}} + +{{/each}} diff --git a/docs/uml/architecture-ODB.puml b/docs/uml/architecture-ODB.puml new file mode 100644 index 000000000..f9677198e --- /dev/null +++ b/docs/uml/architecture-ODB.puml @@ -0,0 +1,55 @@ +@startuml +:iExecSCUser: as "User" +:AppProvider: as "Application Developer" +:DatasetProvider: as "Dataset Owner" +:WorkerpoolAdmin: as "Workerpool Admin" +:WorkerAdmin: as "Worker" +:Requester: +:Anyone: +cloud { + [IexecRelay] + [IexecOrderManagement] +} +component [IexecRelay] +iExecSCUser -up-> [IexecRelay]: broadcast order +component [Marketplace] +[IexecRelay] -down-> [IexecRelay]: emit BroadcastOrder +AppProvider -up-> [IexecOrderManagement]: presign apporder +DatasetProvider -up-> [IexecOrderManagement]: presign datasetorder +WorkerpoolAdmin -up-> [IexecOrderManagement]: presign workerpoolorder +Requester -up-> [IexecOrderManagement]: presign requestorder +AppProvider -down-> [Marketplace]: publish apporder +DatasetProvider -down-> [Marketplace]: publish datasetorder +WorkerpoolAdmin -down-> [Marketplace]: publish workerpoolorder +Requester -down-> [Marketplace]: publish requestorder +Anyone -up-> [Marketplace]: read order +cloud { + [IexecPoCo1] + [IexecPoCo2] + [RLC Token] +} +component [IexecPoCo1] +component [IexecPoCo2] +component [RLC Token] +[IexecPoCo2] <-right-> [IexecPoCo1] +[IexecPoCo1] <-right-> [RLC Token] +Anyone -down-> [IexecPoCo1]: match orders +[IexecPoCo1] -up-> [Marketplace]: notify match +[IexecPoCo1] -up-> [iexec-scheduler]: notify new deal +[iexec-scheduler] -up-> [IexecPoCo2]: initialize/finalize +[iexec-worker] -up-> [IexecPoCo2]: commit/reveal +component [AppRegistry] +component [PublicStorage] +component [iexec-scheduler] +component [iexec-worker] +component [ResultRepository] +AppProvider -down-> AppRegistry: push application +DatasetProvider -down-> PublicStorage: push dataset +WorkerpoolAdmin -down-> [iexec-scheduler]: manage +[WorkerAdmin] -right-> [iexec-worker]: manage +[iexec-worker] -right-> [iexec-scheduler]: request new tasks +[iexec-worker] -up-> [AppRegistry]: pull application +[iexec-worker] -up-> [PublicStorage]: pull dataset +[iexec-worker] -down-> [ResultRepository]: push result +[iexec-scheduler] -right-> [ResultRepository]: check result uploaded +@enduml diff --git a/docs/uml/boost-workflow-ODB.puml b/docs/uml/boost-workflow-ODB.puml new file mode 100644 index 000000000..497166cd0 --- /dev/null +++ b/docs/uml/boost-workflow-ODB.puml @@ -0,0 +1,9 @@ +@startuml + +!include workflow-ODB-0-actors.puml + +!include workflow-ODB-1-publish-orders.puml + +!include workflow-ODB-2b-match2finalize-boost.puml + +@enduml diff --git a/docs/uml/class-uml-IexecEscrows.svg b/docs/uml/class-uml-IexecEscrows.svg new file mode 100644 index 000000000..66497f2f4 --- /dev/null +++ b/docs/uml/class-uml-IexecEscrows.svg @@ -0,0 +1,842 @@ + + + + + + +UmlClassDiagram + + + +11 + +<<Abstract>> +Store +contracts/Store.v8.sol + +Internal: +   m_appregistry: IRegistry +   m_datasetregistry: IRegistry +   m_workerpoolregistry: IRegistry +   m_baseToken: IERC20 +   m_name: string +   m_symbol: string +   m_decimals: uint8 +   m_totalSupply: uint256 +   m_balances: mapping(address=>uint256) +   m_frozens: mapping(address=>uint256) +   m_allowances: mapping(address=>mapping(address=>uint256)) +   CONTRIBUTION_DEADLINE_RATIO: uint256 +   REVEAL_DEADLINE_RATIO: uint256 +   FINAL_DEADLINE_RATIO: uint256 +   WORKERPOOL_STAKE_RATIO: uint256 +   KITTY_RATIO: uint256 +   KITTY_MIN: uint256 +   KITTY_ADDRESS: address +   GROUPMEMBER_PURPOSE: uint256 +   EIP712DOMAIN_SEPARATOR: bytes32 +   m_presigned: mapping(bytes32=>address) +   m_consumed: mapping(bytes32=>uint256) +   m_deals: mapping(bytes32=>IexecLibCore_v5.Deal) +   m_tasks: mapping(bytes32=>IexecLibCore_v5.Task) +   m_consensus: mapping(bytes32=>IexecLibCore_v5.Consensus) +   m_contributions: mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)) +   m_workerScores: mapping(address=>uint256) +   m_teebroker: address +   m_callbackgas: uint256 +   m_categories: IexecLibCore_v5.Category[] +   m_v3_iexecHub: address +   m_v3_scoreImported: mapping(address=>bool) +   m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) + + + +10 + +<<Interface>> +IRegistry +contracts/Store.v8.sol + +External: +     isRegistered(_entry: address): bool + + + +11->10 + + + + + +9 + +<<Abstract>> +ERC1538Store +contracts/Store.v8.sol + +Internal: +   m_funcs: LibMap2_bytes4_address_bytes.map + + + +11->9 + + + + + +12 + +<<Library>> +IexecLibCore_v5 +contracts/libs/IexecLibCore_v5.sol + + + +11->12 + + + + + +5 + +<<Library>> +LibSet_bytes4 +contracts/Store.v8.sol + + + +6 + +<<Struct>> +set +contracts/Store.v8.sol + +values: bytes4[] +indexes: mapping(bytes4=>uint256) + + + +6->5 + + + + + +7 + +<<Library>> +LibMap2_bytes4_address_bytes +contracts/Store.v8.sol + + + +8 + +<<Struct>> +map +contracts/Store.v8.sol + +keyset: LibSet_bytes4.set +values1: mapping(bytes4=>address) +values2: mapping(bytes4=>bytes) + + + +8->5 + + + + + +8->7 + + + + + +9->7 + + + + + +23 + +<<Library>> +IexecLibOrders_v5 +contracts/libs/IexecLibOrders_v5.sol + +Public: +   EIP712DOMAIN_TYPEHASH: bytes32 +   APPORDER_TYPEHASH: bytes32 +   DATASETORDER_TYPEHASH: bytes32 +   WORKERPOOLORDER_TYPEHASH: bytes32 +   REQUESTORDER_TYPEHASH: bytes32 +   APPORDEROPERATION_TYPEHASH: bytes32 +   DATASETORDEROPERATION_TYPEHASH: bytes32 +   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 +   REQUESTORDEROPERATION_TYPEHASH: bytes32 + +Public: +    hash(_domain: EIP712Domain): (domainhash: bytes32) +    hash(_apporder: AppOrder): (apphash: bytes32) +    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) +    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) +    hash(_requestorder: RequestOrder): (requesthash: bytes32) +    hash(_apporderoperation: AppOrderOperation): bytes32 +    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 +    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 +    hash(_requestorderoperation: RequestOrderOperation): bytes32 + + + +25 + +<<Struct>> +EIP712Domain +contracts/libs/IexecLibOrders_v5.sol + +name: string +version: string +chainId: uint256 +verifyingContract: address + + + +23->25 + + + + + +26 + +<<Struct>> +AppOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appprice: uint256 +volume: uint256 +tag: bytes32 +datasetrestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +23->26 + + + + + +27 + +<<Struct>> +DatasetOrder +contracts/libs/IexecLibOrders_v5.sol + +dataset: address +datasetprice: uint256 +volume: uint256 +tag: bytes32 +apprestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +23->27 + + + + + +28 + +<<Struct>> +WorkerpoolOrder +contracts/libs/IexecLibOrders_v5.sol + +workerpool: address +workerpoolprice: uint256 +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +apprestrict: address +datasetrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +23->28 + + + + + +29 + +<<Struct>> +RequestOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appmaxprice: uint256 +dataset: address +datasetmaxprice: uint256 +workerpool: address +workerpoolmaxprice: uint256 +requester: address +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +beneficiary: address +callback: address +params: string +salt: bytes32 +sign: bytes + + + +23->29 + + + + + +30 + +<<Struct>> +AppOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: AppOrder +operation: OrderOperationEnum +sign: bytes + + + +23->30 + + + + + +31 + +<<Struct>> +DatasetOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: DatasetOrder +operation: OrderOperationEnum +sign: bytes + + + +23->31 + + + + + +32 + +<<Struct>> +WorkerpoolOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: WorkerpoolOrder +operation: OrderOperationEnum +sign: bytes + + + +23->32 + + + + + +33 + +<<Struct>> +RequestOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: RequestOrder +operation: OrderOperationEnum +sign: bytes + + + +23->33 + + + + + +24 + +<<Enum>> +OrderOperationEnum +contracts/libs/IexecLibOrders_v5.sol + +SIGN: 0 +CLOSE: 1 + + + +24->23 + + + + + +25->23 + + + + + +26->23 + + + + + +27->23 + + + + + +28->23 + + + + + +29->23 + + + + + +30->23 + + + + + +30->24 + + + + + +30->26 + + + + + +31->23 + + + + + +31->24 + + + + + +31->27 + + + + + +32->23 + + + + + +32->24 + + + + + +32->28 + + + + + +33->23 + + + + + +33->24 + + + + + +33->29 + + + + + +35 + +<<Abstract>> +DelegateBase +contracts/modules/DelegateBase.v8.sol + +Public: +    constructor() + + + +35->11 + + + + + +47 + +IexecERC20Core +contracts/modules/delegates/IexecERC20Core.sol + +Internal: +    _transferUnchecked(sender: address, recipient: address, amount: uint256) +    _transfer(sender: address, recipient: address, amount: uint256) +    _mint(account: address, amount: uint256) +    _burn(account: address, amount: uint256) +    _approve(owner: address, spender: address, amount: uint256) +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) +    <<event>> Approval(owner: address, spender: address, value: uint256) + + + +49 + +IexecEscrow +contracts/modules/delegates/IexecEscrow.v8.sol + +Private: +    _transfer(from: address, to: address, value: uint256) +Internal: +    lock(account: address, value: uint256) +    unlock(account: address, value: uint256) +    reward(account: address, value: uint256, ref: bytes32) +    seize(account: address, value: uint256, ref: bytes32) +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) + + + +49->35 + + + + + +50 + +IexecEscrowNativeDelegate +contracts/modules/delegates/IexecEscrowNativeDelegate.sol + +Internal: +   nRLCtoWei: uint256 + +Internal: +    _deposit(target: address) +    _withdraw(to: address, value: uint256) +External: +    <<payable>> null() +    <<payable>> null() +    <<payable>> deposit(): bool +    <<payable>> depositFor(target: address): bool +    <<payable>> depositForArray(amounts: uint256[], targets: address[]): bool +    withdraw(amount: uint256): bool +    withdrawTo(amount: uint256, target: address): bool +    recover(): uint256 <<onlyOwner>> + + + +50->47 + + + + + +73 + +<<Interface>> +IexecEscrowNative +contracts/modules/interfaces/IexecEscrowNative.sol + +External: +     null() +     null() +     deposit(): bool +     depositFor(address): bool +     depositForArray(uint256[], address[]): bool +     withdraw(uint256): bool +     withdrawTo(uint256, address): bool +     recover(): uint256 + + + +50->73 + + + + + +51 + +IexecEscrowTokenDelegate +contracts/modules/delegates/IexecEscrowTokenDelegate.sol + +Internal: +    _deposit(from: address, amount: uint256) +    _withdraw(to: address, amount: uint256) +External: +    <<payable>> null() +    <<payable>> null() +    deposit(amount: uint256): bool +    depositFor(amount: uint256, target: address): bool +    depositForArray(amounts: uint256[], targets: address[]): bool +    withdraw(amount: uint256): bool +    withdrawTo(amount: uint256, target: address): bool +    recover(): uint256 <<onlyOwner>> +    receiveApproval(sender: address, amount: uint256, token: address, bytes): bool + + + +51->47 + + + + + +74 + +<<Interface>> +IexecEscrowToken +contracts/modules/interfaces/IexecEscrowToken.sol + +External: +     null() +     null() +     deposit(uint256): bool +     depositFor(uint256, address): bool +     depositForArray(uint256[], address[]): bool +     withdraw(uint256): bool +     withdrawTo(uint256, address): bool +     recover(): uint256 + + + +51->74 + + + + + +88 + +<<Interface>> +IexecTokenSpender +contracts/modules/interfaces/IexecTokenSpender.sol + +External: +     receiveApproval(address, uint256, address, bytes): bool + + + +51->88 + + + + + +52 + +IexecEscrowTokenSwapDelegate +contracts/modules/delegates/IexecEscrowTokenSwapDelegate.sol + +Internal: +   router: IUniswapV2Router02 + +Internal: +    _eth2token(): address[] +    _token2eth(): address[] +    _deposit(target: address, value: uint256, minimum: uint256) +    _request(target: address, value: uint256, amount: uint256) +    _withdraw(target: address, amount: uint256, minimum: uint256) +External: +    <<payable>> null() +    <<payable>> null() +    <<payable>> depositEth() +    <<payable>> depositEthFor(target: address) +    <<payable>> safeDepositEth(minimum: uint256) +    <<payable>> safeDepositEthFor(minimum: uint256, target: address) +    <<payable>> requestToken(amount: uint256) +    <<payable>> requestTokenFor(amount: uint256, target: address) +    UniswapV2Router(): IUniswapV2Router02 +    estimateDepositEthSent(eth: uint256): (token: uint256) +    estimateDepositTokenWanted(token: uint256): (eth: uint256) +    estimateWithdrawTokenSent(token: uint256): (eth: uint256) +    estimateWithdrawEthWanted(eth: uint256): (token: uint256) +    withdrawEth(amount: uint256) +    withdrawEthTo(amount: uint256, target: address) +    safeWithdrawEth(amount: uint256, minimum: uint256) +    safeWithdrawEthTo(amount: uint256, minimum: uint256, target: address) +Public: +    <<payable>> matchOrdersWithEth(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32 + + + +52->23 + + + + + +52->47 + + + + + +64 + +SignatureVerifier +contracts/modules/delegates/SignatureVerifier.sol + +Internal: +    _toEthSignedMessage(_msgHash: bytes32): bytes +    _toEthTypedStruct(_structHash: bytes32, _domainHash: bytes32): bytes +    _recover(_hash: bytes32, _sign: bytes): address +    _isContract(account: address): bool +    _addrToKey(_addr: address): bytes32 +    _checkIdentity(_identity: address, _candidate: address, _purpose: uint256): (valid: bool) +    _checkPresignature(_identity: address, _hash: bytes32): bool +    _checkSignature(_identity: address, _hash: bytes32, _signature: bytes): bool +    _checkSignature(_identity: address, _predicat: bytes, _signature: bytes): bool +    _checkPresignatureOrSignature(_identity: address, _hash: bytes32, _signature: bytes): bool +    _checkPresignatureOrSignature(_identity: address, _predicat: bytes, _signature: bytes): bool + + + +52->64 + + + + + +75 + +<<Interface>> +IexecEscrowTokenSwap +contracts/modules/interfaces/IexecEscrowTokenSwap.sol + +External: +     null() +     null() +     UniswapV2Router(): IUniswapV2Router02 +     estimateDepositEthSent(uint256): uint256 +     estimateDepositTokenWanted(uint256): uint256 +     estimateWithdrawTokenSent(uint256): uint256 +     estimateWithdrawEthWanted(uint256): uint256 +     depositEth() +     depositEthFor(address) +     safeDepositEth(uint256) +     safeDepositEthFor(uint256, address) +     requestToken(uint256) +     requestTokenFor(uint256, address) +     withdrawEth(uint256) +     withdrawEthTo(uint256, address) +     safeWithdrawEth(uint256, uint256) +     safeWithdrawEthTo(uint256, uint256, address) +     matchOrdersWithEth(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 + + + +52->75 + + + + + +80 + +<<Interface>> +IexecPoco1 +contracts/modules/interfaces/IexecPoco1.sol + +External: +     verifySignature(address, bytes32, bytes): bool +     verifyPresignature(address, bytes32): bool +     verifyPresignatureOrSignature(address, bytes32, bytes): bool +     matchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +Public: +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) +    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) +    <<event>> SchedulerNotice(workerpool: address, dealid: bytes32) + + + +52->80 + + + + + +75->23 + + + + + +80->23 + + + + + diff --git a/docs/uml/class-uml-IexecPocoBoostDelegate.svg b/docs/uml/class-uml-IexecPocoBoostDelegate.svg new file mode 100644 index 000000000..9dd630560 --- /dev/null +++ b/docs/uml/class-uml-IexecPocoBoostDelegate.svg @@ -0,0 +1,784 @@ + + + + + + +UmlClassDiagram + + + +5 + +<<Library>> +LibSet_bytes4 +contracts/Store.v8.sol + + + +6 + +<<Struct>> +set +contracts/Store.v8.sol + +values: bytes4[] +indexes: mapping(bytes4=>uint256) + + + +6->5 + + + + + +7 + +<<Library>> +LibMap2_bytes4_address_bytes +contracts/Store.v8.sol + + + +8 + +<<Struct>> +map +contracts/Store.v8.sol + +keyset: LibSet_bytes4.set +values1: mapping(bytes4=>address) +values2: mapping(bytes4=>bytes) + + + +8->5 + + + + + +8->7 + + + + + +9 + +<<Abstract>> +ERC1538Store +contracts/Store.v8.sol + +Internal: +   m_funcs: LibMap2_bytes4_address_bytes.map + + + +9->7 + + + + + +10 + +<<Interface>> +IRegistry +contracts/Store.v8.sol + +External: +     isRegistered(_entry: address): bool + + + +11 + +<<Abstract>> +Store +contracts/Store.v8.sol + +Internal: +   m_appregistry: IRegistry +   m_datasetregistry: IRegistry +   m_workerpoolregistry: IRegistry +   m_baseToken: IERC20 +   m_name: string +   m_symbol: string +   m_decimals: uint8 +   m_totalSupply: uint256 +   m_balances: mapping(address=>uint256) +   m_frozens: mapping(address=>uint256) +   m_allowances: mapping(address=>mapping(address=>uint256)) +   CONTRIBUTION_DEADLINE_RATIO: uint256 +   REVEAL_DEADLINE_RATIO: uint256 +   FINAL_DEADLINE_RATIO: uint256 +   WORKERPOOL_STAKE_RATIO: uint256 +   KITTY_RATIO: uint256 +   KITTY_MIN: uint256 +   KITTY_ADDRESS: address +   GROUPMEMBER_PURPOSE: uint256 +   EIP712DOMAIN_SEPARATOR: bytes32 +   m_presigned: mapping(bytes32=>address) +   m_consumed: mapping(bytes32=>uint256) +   m_deals: mapping(bytes32=>IexecLibCore_v5.Deal) +   m_tasks: mapping(bytes32=>IexecLibCore_v5.Task) +   m_consensus: mapping(bytes32=>IexecLibCore_v5.Consensus) +   m_contributions: mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)) +   m_workerScores: mapping(address=>uint256) +   m_teebroker: address +   m_callbackgas: uint256 +   m_categories: IexecLibCore_v5.Category[] +   m_v3_iexecHub: address +   m_v3_scoreImported: mapping(address=>bool) +   m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) + + + +11->9 + + + + + +11->10 + + + + + +12 + +<<Library>> +IexecLibCore_v5 +contracts/libs/IexecLibCore_v5.sol + + + +11->12 + + + + + +42 + +<<Interface>> +IOracleConsumer +contracts/external/interfaces/IOracleConsumer.sol + +External: +     receiveResult(taskId: bytes32, resultsCallback: bytes) + + + +23 + +<<Library>> +IexecLibOrders_v5 +contracts/libs/IexecLibOrders_v5.sol + +Public: +   EIP712DOMAIN_TYPEHASH: bytes32 +   APPORDER_TYPEHASH: bytes32 +   DATASETORDER_TYPEHASH: bytes32 +   WORKERPOOLORDER_TYPEHASH: bytes32 +   REQUESTORDER_TYPEHASH: bytes32 +   APPORDEROPERATION_TYPEHASH: bytes32 +   DATASETORDEROPERATION_TYPEHASH: bytes32 +   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 +   REQUESTORDEROPERATION_TYPEHASH: bytes32 + +Public: +    hash(_domain: EIP712Domain): (domainhash: bytes32) +    hash(_apporder: AppOrder): (apphash: bytes32) +    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) +    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) +    hash(_requestorder: RequestOrder): (requesthash: bytes32) +    hash(_apporderoperation: AppOrderOperation): bytes32 +    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 +    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 +    hash(_requestorderoperation: RequestOrderOperation): bytes32 + + + +25 + +<<Struct>> +EIP712Domain +contracts/libs/IexecLibOrders_v5.sol + +name: string +version: string +chainId: uint256 +verifyingContract: address + + + +23->25 + + + + + +26 + +<<Struct>> +AppOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appprice: uint256 +volume: uint256 +tag: bytes32 +datasetrestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +23->26 + + + + + +27 + +<<Struct>> +DatasetOrder +contracts/libs/IexecLibOrders_v5.sol + +dataset: address +datasetprice: uint256 +volume: uint256 +tag: bytes32 +apprestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +23->27 + + + + + +28 + +<<Struct>> +WorkerpoolOrder +contracts/libs/IexecLibOrders_v5.sol + +workerpool: address +workerpoolprice: uint256 +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +apprestrict: address +datasetrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +23->28 + + + + + +29 + +<<Struct>> +RequestOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appmaxprice: uint256 +dataset: address +datasetmaxprice: uint256 +workerpool: address +workerpoolmaxprice: uint256 +requester: address +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +beneficiary: address +callback: address +params: string +salt: bytes32 +sign: bytes + + + +23->29 + + + + + +30 + +<<Struct>> +AppOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: AppOrder +operation: OrderOperationEnum +sign: bytes + + + +23->30 + + + + + +31 + +<<Struct>> +DatasetOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: DatasetOrder +operation: OrderOperationEnum +sign: bytes + + + +23->31 + + + + + +32 + +<<Struct>> +WorkerpoolOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: WorkerpoolOrder +operation: OrderOperationEnum +sign: bytes + + + +23->32 + + + + + +33 + +<<Struct>> +RequestOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: RequestOrder +operation: OrderOperationEnum +sign: bytes + + + +23->33 + + + + + +24 + +<<Enum>> +OrderOperationEnum +contracts/libs/IexecLibOrders_v5.sol + +SIGN: 0 +CLOSE: 1 + + + +24->23 + + + + + +25->23 + + + + + +26->23 + + + + + +27->23 + + + + + +28->23 + + + + + +29->23 + + + + + +30->23 + + + + + +30->24 + + + + + +30->26 + + + + + +31->23 + + + + + +31->24 + + + + + +31->27 + + + + + +32->23 + + + + + +32->24 + + + + + +32->28 + + + + + +33->23 + + + + + +33->24 + + + + + +33->29 + + + + + +35 + +<<Abstract>> +DelegateBase +contracts/modules/DelegateBase.v8.sol + +Public: +    constructor() + + + +35->11 + + + + + +49 + +IexecEscrow +contracts/modules/delegates/IexecEscrow.v8.sol + +Private: +    _transfer(from: address, to: address, value: uint256) +Internal: +    lock(account: address, value: uint256) +    unlock(account: address, value: uint256) +    reward(account: address, value: uint256, ref: bytes32) +    seize(account: address, value: uint256, ref: bytes32) +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) + + + +49->35 + + + + + +61 + +IexecPocoBoostDelegate +contracts/modules/delegates/IexecPocoBoostDelegate.sol + +Private: +    _matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder, sponsor: address): bytes32 +    requireTaskExistsAndUnset(taskStatus: IexecLibCore_v5.TaskStatusEnum, taskIndex: uint256, botSize: uint16) +External: +    matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +    sponsorMatchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +    pushResultBoost(dealId: bytes32, index: uint256, results: bytes, resultsCallback: bytes, authorizationSign: bytes, enclaveChallenge: address, enclaveSign: bytes) +    claimBoost(dealId: bytes32, index: uint256) + + + +61->42 + + + + + +61->12 + + + + + +61->12 + + + + + +61->12 + + + + + +61->12 + + + + + +61->23 + + + + + +61->23 + + + + + +61->23 + + + + + +61->23 + + + + + +61->23 + + + + + +61->35 + + + + + +61->49 + + + + + +62 + +IexecPocoCommonDelegate +contracts/modules/delegates/IexecPocoCommonDelegate.sol + +Internal: +    _computeDealVolume(appOrderVolume: uint256, appOrderTypedDataHash: bytes32, hasDataset: bool, datasetOrderVolume: uint256, datasetOrderTypedDataHash: bytes32, workerpoolOrderVolume: uint256, workerpoolOrderTypedDataHash: bytes32, requestOrderVolume: uint256, requestOrderTypedDataHash: bytes32): uint256 + + + +61->62 + + + + + +65 + +SignatureVerifier +contracts/modules/delegates/SignatureVerifier.v8.sol + +Internal: +    _toTypedDataHash(structHash: bytes32): bytes32 +    _verifySignatureOfEthSignedMessage(account: address, message: bytes, signature: bytes): bool +    _verifySignature(account: address, messageHash: bytes32, signature: bytes): bool +    _verifyPresignature(account: address, messageHash: bytes32): bool +    _verifySignatureOrPresignature(account: address, messageHash: bytes32, signature: bytes): bool +    _isAccountAuthorizedByRestriction(restriction: address, account: address): bool + + + +61->65 + + + + + +85 + +<<Interface>> +IexecPocoBoost +contracts/modules/interfaces/IexecPocoBoost.sol + +External: +     matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +     sponsorMatchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +     pushResultBoost(dealId: bytes32, index: uint256, results: bytes, resultsCallback: bytes, authorizationSign: bytes, enclaveChallenge: address, enclaveSign: bytes) +     claimBoost(dealId: bytes32, index: uint256) +Public: +    <<event>> SchedulerNoticeBoost(workerpool: address, dealId: bytes32, app: address, dataset: address, category: uint256, tag: bytes32, params: string, beneficiary: address) +    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) +    <<event>> ResultPushedBoost(dealId: bytes32, index: uint256, results: bytes) +    <<event>> TaskClaimed(taskid: bytes32) +    <<event>> DealSponsoredBoost(dealId: bytes32, sponsor: address) + + + +61->85 + + + + + +93 + +<<Interface>> +IWorkerpool +contracts/registries/workerpools/IWorkerpool.v8.sol + +External: +     m_schedulerRewardRatioPolicy(): uint256 +     m_workerStakeRatioPolicy(): uint256 + + + +61->93 + + + + + +62->23 + + + + + +62->35 + + + + + +65->35 + + + + + +85->23 + + + + + +85->23 + + + + + +85->23 + + + + + +85->23 + + + + + +85->23 + + + + + diff --git a/docs/uml/class-uml-IexecPocoDelegates.svg b/docs/uml/class-uml-IexecPocoDelegates.svg new file mode 100644 index 000000000..5794a6596 --- /dev/null +++ b/docs/uml/class-uml-IexecPocoDelegates.svg @@ -0,0 +1,890 @@ + + + + + + +UmlClassDiagram + + + +5 + +<<Library>> +LibSet_bytes4 +contracts/Store.v8.sol + + + +6 + +<<Struct>> +set +contracts/Store.v8.sol + +values: bytes4[] +indexes: mapping(bytes4=>uint256) + + + +6->5 + + + + + +7 + +<<Library>> +LibMap2_bytes4_address_bytes +contracts/Store.v8.sol + + + +8 + +<<Struct>> +map +contracts/Store.v8.sol + +keyset: LibSet_bytes4.set +values1: mapping(bytes4=>address) +values2: mapping(bytes4=>bytes) + + + +8->5 + + + + + +8->7 + + + + + +9 + +<<Abstract>> +ERC1538Store +contracts/Store.v8.sol + +Internal: +   m_funcs: LibMap2_bytes4_address_bytes.map + + + +9->7 + + + + + +10 + +<<Interface>> +IRegistry +contracts/Store.v8.sol + +External: +     isRegistered(_entry: address): bool + + + +11 + +<<Abstract>> +Store +contracts/Store.v8.sol + +Internal: +   m_appregistry: IRegistry +   m_datasetregistry: IRegistry +   m_workerpoolregistry: IRegistry +   m_baseToken: IERC20 +   m_name: string +   m_symbol: string +   m_decimals: uint8 +   m_totalSupply: uint256 +   m_balances: mapping(address=>uint256) +   m_frozens: mapping(address=>uint256) +   m_allowances: mapping(address=>mapping(address=>uint256)) +   CONTRIBUTION_DEADLINE_RATIO: uint256 +   REVEAL_DEADLINE_RATIO: uint256 +   FINAL_DEADLINE_RATIO: uint256 +   WORKERPOOL_STAKE_RATIO: uint256 +   KITTY_RATIO: uint256 +   KITTY_MIN: uint256 +   KITTY_ADDRESS: address +   GROUPMEMBER_PURPOSE: uint256 +   EIP712DOMAIN_SEPARATOR: bytes32 +   m_presigned: mapping(bytes32=>address) +   m_consumed: mapping(bytes32=>uint256) +   m_deals: mapping(bytes32=>IexecLibCore_v5.Deal) +   m_tasks: mapping(bytes32=>IexecLibCore_v5.Task) +   m_consensus: mapping(bytes32=>IexecLibCore_v5.Consensus) +   m_contributions: mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)) +   m_workerScores: mapping(address=>uint256) +   m_teebroker: address +   m_callbackgas: uint256 +   m_categories: IexecLibCore_v5.Category[] +   m_v3_iexecHub: address +   m_v3_scoreImported: mapping(address=>bool) +   m_dealsBoost: mapping(bytes32=>IexecLibCore_v5.DealBoost) + + + +11->9 + + + + + +11->10 + + + + + +12 + +<<Library>> +IexecLibCore_v5 +contracts/libs/IexecLibCore_v5.sol + + + +11->12 + + + + + +23 + +<<Library>> +IexecLibOrders_v5 +contracts/libs/IexecLibOrders_v5.sol + +Public: +   EIP712DOMAIN_TYPEHASH: bytes32 +   APPORDER_TYPEHASH: bytes32 +   DATASETORDER_TYPEHASH: bytes32 +   WORKERPOOLORDER_TYPEHASH: bytes32 +   REQUESTORDER_TYPEHASH: bytes32 +   APPORDEROPERATION_TYPEHASH: bytes32 +   DATASETORDEROPERATION_TYPEHASH: bytes32 +   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 +   REQUESTORDEROPERATION_TYPEHASH: bytes32 + +Public: +    hash(_domain: EIP712Domain): (domainhash: bytes32) +    hash(_apporder: AppOrder): (apphash: bytes32) +    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) +    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) +    hash(_requestorder: RequestOrder): (requesthash: bytes32) +    hash(_apporderoperation: AppOrderOperation): bytes32 +    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 +    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 +    hash(_requestorderoperation: RequestOrderOperation): bytes32 + + + +25 + +<<Struct>> +EIP712Domain +contracts/libs/IexecLibOrders_v5.sol + +name: string +version: string +chainId: uint256 +verifyingContract: address + + + +23->25 + + + + + +26 + +<<Struct>> +AppOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appprice: uint256 +volume: uint256 +tag: bytes32 +datasetrestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +23->26 + + + + + +27 + +<<Struct>> +DatasetOrder +contracts/libs/IexecLibOrders_v5.sol + +dataset: address +datasetprice: uint256 +volume: uint256 +tag: bytes32 +apprestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +23->27 + + + + + +28 + +<<Struct>> +WorkerpoolOrder +contracts/libs/IexecLibOrders_v5.sol + +workerpool: address +workerpoolprice: uint256 +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +apprestrict: address +datasetrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +23->28 + + + + + +29 + +<<Struct>> +RequestOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appmaxprice: uint256 +dataset: address +datasetmaxprice: uint256 +workerpool: address +workerpoolmaxprice: uint256 +requester: address +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +beneficiary: address +callback: address +params: string +salt: bytes32 +sign: bytes + + + +23->29 + + + + + +30 + +<<Struct>> +AppOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: AppOrder +operation: OrderOperationEnum +sign: bytes + + + +23->30 + + + + + +31 + +<<Struct>> +DatasetOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: DatasetOrder +operation: OrderOperationEnum +sign: bytes + + + +23->31 + + + + + +32 + +<<Struct>> +WorkerpoolOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: WorkerpoolOrder +operation: OrderOperationEnum +sign: bytes + + + +23->32 + + + + + +33 + +<<Struct>> +RequestOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: RequestOrder +operation: OrderOperationEnum +sign: bytes + + + +23->33 + + + + + +24 + +<<Enum>> +OrderOperationEnum +contracts/libs/IexecLibOrders_v5.sol + +SIGN: 0 +CLOSE: 1 + + + +24->23 + + + + + +25->23 + + + + + +26->23 + + + + + +27->23 + + + + + +28->23 + + + + + +29->23 + + + + + +30->23 + + + + + +30->24 + + + + + +30->26 + + + + + +31->23 + + + + + +31->24 + + + + + +31->27 + + + + + +32->23 + + + + + +32->24 + + + + + +32->28 + + + + + +33->23 + + + + + +33->24 + + + + + +33->29 + + + + + +35 + +<<Abstract>> +DelegateBase +contracts/modules/DelegateBase.v8.sol + +Public: +    constructor() + + + +35->11 + + + + + +49 + +IexecEscrow +contracts/modules/delegates/IexecEscrow.v8.sol + +Private: +    _transfer(from: address, to: address, value: uint256) +Internal: +    lock(account: address, value: uint256) +    unlock(account: address, value: uint256) +    reward(account: address, value: uint256, ref: bytes32) +    seize(account: address, value: uint256, ref: bytes32) +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) + + + +49->35 + + + + + +56 + +<<Struct>> +Matching +contracts/modules/delegates/IexecPoco1Delegate.sol + +apporderHash: bytes32 +appOwner: address +datasetorderHash: bytes32 +datasetOwner: address +workerpoolorderHash: bytes32 +workerpoolOwner: address +requestorderHash: bytes32 +hasDataset: bool + + + +57 + +IexecPoco1Delegate +contracts/modules/delegates/IexecPoco1Delegate.sol + +Private: +    _matchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder, _sponsor: address): bytes32 +External: +    verifySignature(_identity: address, _hash: bytes32, _signature: bytes): bool +    verifyPresignature(_identity: address, _hash: bytes32): bool +    verifyPresignatureOrSignature(_identity: address, _hash: bytes32, _signature: bytes): bool +    sponsorMatchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32 +Public: +    matchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32 + + + +57->12 + + + + + +57->12 + + + + + +57->23 + + + + + +57->23 + + + + + +57->23 + + + + + +57->23 + + + + + +57->23 + + + + + +57->35 + + + + + +57->49 + + + + + +57->56 + + + + + +62 + +IexecPocoCommonDelegate +contracts/modules/delegates/IexecPocoCommonDelegate.sol + +Internal: +    _computeDealVolume(appOrderVolume: uint256, appOrderTypedDataHash: bytes32, hasDataset: bool, datasetOrderVolume: uint256, datasetOrderTypedDataHash: bytes32, workerpoolOrderVolume: uint256, workerpoolOrderTypedDataHash: bytes32, requestOrderVolume: uint256, requestOrderTypedDataHash: bytes32): uint256 + + + +57->62 + + + + + +65 + +SignatureVerifier +contracts/modules/delegates/SignatureVerifier.v8.sol + +Internal: +    _toTypedDataHash(structHash: bytes32): bytes32 +    _verifySignatureOfEthSignedMessage(account: address, message: bytes, signature: bytes): bool +    _verifySignature(account: address, messageHash: bytes32, signature: bytes): bool +    _verifyPresignature(account: address, messageHash: bytes32): bool +    _verifySignatureOrPresignature(account: address, messageHash: bytes32, signature: bytes): bool +    _isAccountAuthorizedByRestriction(restriction: address, account: address): bool + + + +57->65 + + + + + +81 + +<<Interface>> +IexecPoco1 +contracts/modules/interfaces/IexecPoco1.v8.sol + +External: +     verifySignature(address, bytes32, bytes): bool +     verifyPresignature(address, bytes32): bool +     verifyPresignatureOrSignature(address, bytes32, bytes): bool +     matchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +     sponsorMatchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +Public: +    <<event>> SchedulerNotice(workerpool: address, dealid: bytes32) +    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) +    <<event>> DealSponsored(dealId: bytes32, sponsor: address) + + + +57->81 + + + + + +93 + +<<Interface>> +IWorkerpool +contracts/registries/workerpools/IWorkerpool.v8.sol + +External: +     m_schedulerRewardRatioPolicy(): uint256 +     m_workerStakeRatioPolicy(): uint256 + + + +57->93 + + + + + +58 + +IexecPoco2Delegate +contracts/modules/delegates/IexecPoco2Delegate.sol + +Internal: +    successWork(_dealid: bytes32, _taskid: bytes32) +    failedWork(_dealid: bytes32, _taskid: bytes32) +    checkConsensus(_taskid: bytes32, _consensus: bytes32) +    distributeRewards(_taskid: bytes32) +    distributeRewardsFast(_taskid: bytes32) +    executeCallback(_taskid: bytes32, _resultsCallback: bytes) +External: +    reveal(_taskid: bytes32, _resultDigest: bytes32) +    reopen(_taskid: bytes32) <<onlyScheduler>> +    finalize(_taskid: bytes32, _results: bytes, _resultsCallback: bytes) <<onlyScheduler>> +    initializeArray(_dealid: bytes32[], _idx: uint256[]): bool +    claimArray(_taskid: bytes32[]): bool +    initializeAndClaimArray(_dealid: bytes32[], _idx: uint256[]): bool +Public: +    <<modifier>> onlyScheduler(_taskId: bytes32) +    initialize(_dealid: bytes32, idx: uint256): bytes32 +    contribute(_taskid: bytes32, _resultHash: bytes32, _resultSeal: bytes32, _enclaveChallenge: address, _enclaveSign: bytes, _authorizationSign: bytes) +    contributeAndFinalize(_taskid: bytes32, _resultDigest: bytes32, _results: bytes, _resultsCallback: bytes, _enclaveChallenge: address, _enclaveSign: bytes, _authorizationSign: bytes) +    claim(_taskid: bytes32) + + + +58->12 + + + + + +58->12 + + + + + +58->12 + + + + + +58->12 + + + + + +58->12 + + + + + +58->35 + + + + + +58->49 + + + + + +58->65 + + + + + +83 + +<<Interface>> +IexecPoco2 +contracts/modules/interfaces/IexecPoco2.v8.sol + +External: +     initialize(dealId: bytes32, index: uint256): bytes32 +     initializeArray(dealIds: bytes32[], indexes: uint256[]): bool +     initializeAndClaimArray(dealIds: bytes32[], indexes: uint256[]): bool +     contribute(taskId: bytes32, resultHash: bytes32, resultSeal: bytes32, enclaveChallenge: address, enclaveSign: bytes, authorizationSign: bytes) +     contributeAndFinalize(taskId: bytes32, resultDigest: bytes32, results: bytes, resultsCallback: bytes, enclaveChallenge: address, enclaveSign: bytes, authorizationSign: bytes) +     reveal(taskId: bytes32, resultDigest: bytes32) +     reopen(taskId: bytes32) +     finalize(taskId: bytes32, results: bytes, resultsCallback: bytes) +     claim(taskId: bytes32) +     claimArray(taskIds: bytes32[]): bool +Public: +    <<event>> TaskInitialize(taskId: bytes32, workerpool: address) +    <<event>> TaskContribute(taskId: bytes32, worker: address, hash: bytes32) +    <<event>> TaskConsensus(taskId: bytes32, consensus: bytes32) +    <<event>> TaskReveal(taskId: bytes32, worker: address, digest: bytes32) +    <<event>> AccurateContribution(worker: address, taskId: bytes32) +    <<event>> FaultyContribution(worker: address, taskId: bytes32) +    <<event>> TaskReopen(taskId: bytes32) +    <<event>> TaskFinalize(taskId: bytes32, results: bytes) +    <<event>> TaskClaimed(taskId: bytes32) + + + +58->83 + + + + + +62->23 + + + + + +62->35 + + + + + +65->35 + + + + + +81->23 + + + + + +81->23 + + + + + +81->23 + + + + + +81->23 + + + + + +81->23 + + + + + diff --git a/docs/uml/class-uml-dir-libs.svg b/docs/uml/class-uml-dir-libs.svg new file mode 100644 index 000000000..7c94b1faf --- /dev/null +++ b/docs/uml/class-uml-dir-libs.svg @@ -0,0 +1,603 @@ + + + + + + +UmlClassDiagram + + + +0 + +<<Library>> +IexecLibCore_v5 +contracts/libs/IexecLibCore_v5.sol + + + +1 + +<<Struct>> +Account +contracts/libs/IexecLibCore_v5.sol + +stake: uint256 +locked: uint256 + + + +1->0 + + + + + +2 + +<<Struct>> +Category +contracts/libs/IexecLibCore_v5.sol + +name: string +description: string +workClockTimeRef: uint256 + + + +2->0 + + + + + +3 + +<<Struct>> +Resource +contracts/libs/IexecLibCore_v5.sol + +pointer: address +owner: address +price: uint256 + + + +3->0 + + + + + +4 + +<<Struct>> +Deal +contracts/libs/IexecLibCore_v5.sol + +app: Resource +dataset: Resource +workerpool: Resource +trust: uint256 +category: uint256 +tag: bytes32 +requester: address +beneficiary: address +callback: address +params: string +startTime: uint256 +botFirst: uint256 +botSize: uint256 +workerStake: uint256 +schedulerRewardRatio: uint256 +sponsor: address + + + +4->0 + + + + + +4->3 + + + + + +5 + +<<Struct>> +DealBoost +contracts/libs/IexecLibCore_v5.sol + +appOwner: address +appPrice: uint96 +datasetOwner: address +datasetPrice: uint96 +workerpoolOwner: address +workerpoolPrice: uint96 +requester: address +workerReward: uint96 +callback: address +deadline: uint40 +botFirst: uint16 +botSize: uint16 +shortTag: bytes3 +sponsor: address + + + +5->0 + + + + + +6 + +<<Enum>> +TaskStatusEnum +contracts/libs/IexecLibCore_v5.sol + +UNSET: 0 +ACTIVE: 1 +REVEALING: 2 +COMPLETED: 3 +FAILED: 4 + + + +6->0 + + + + + +7 + +<<Struct>> +Task +contracts/libs/IexecLibCore_v5.sol + +status: TaskStatusEnum +dealid: bytes32 +idx: uint256 +timeref: uint256 +contributionDeadline: uint256 +revealDeadline: uint256 +finalDeadline: uint256 +consensusValue: bytes32 +revealCounter: uint256 +winnerCounter: uint256 +contributors: address[] +resultDigest: bytes32 +results: bytes +resultsTimestamp: uint256 +resultsCallback: bytes + + + +7->0 + + + + + +7->6 + + + + + +8 + +<<Struct>> +Consensus +contracts/libs/IexecLibCore_v5.sol + +group: mapping(bytes32=>uint256) +total: uint256 + + + +8->0 + + + + + +9 + +<<Enum>> +ContributionStatusEnum +contracts/libs/IexecLibCore_v5.sol + +UNSET: 0 +CONTRIBUTED: 1 +PROVED: 2 +REJECTED: 3 + + + +9->0 + + + + + +10 + +<<Struct>> +Contribution +contracts/libs/IexecLibCore_v5.sol + +status: ContributionStatusEnum +resultHash: bytes32 +resultSeal: bytes32 +enclaveChallenge: address +weight: uint256 + + + +10->0 + + + + + +10->9 + + + + + +11 + +<<Library>> +IexecLibOrders_v5 +contracts/libs/IexecLibOrders_v5.sol + +Public: +   EIP712DOMAIN_TYPEHASH: bytes32 +   APPORDER_TYPEHASH: bytes32 +   DATASETORDER_TYPEHASH: bytes32 +   WORKERPOOLORDER_TYPEHASH: bytes32 +   REQUESTORDER_TYPEHASH: bytes32 +   APPORDEROPERATION_TYPEHASH: bytes32 +   DATASETORDEROPERATION_TYPEHASH: bytes32 +   WORKERPOOLORDEROPERATION_TYPEHASH: bytes32 +   REQUESTORDEROPERATION_TYPEHASH: bytes32 + +Public: +    hash(_domain: EIP712Domain): (domainhash: bytes32) +    hash(_apporder: AppOrder): (apphash: bytes32) +    hash(_datasetorder: DatasetOrder): (datasethash: bytes32) +    hash(_workerpoolorder: WorkerpoolOrder): (workerpoolhash: bytes32) +    hash(_requestorder: RequestOrder): (requesthash: bytes32) +    hash(_apporderoperation: AppOrderOperation): bytes32 +    hash(_datasetorderoperation: DatasetOrderOperation): bytes32 +    hash(_workerpoolorderoperation: WorkerpoolOrderOperation): bytes32 +    hash(_requestorderoperation: RequestOrderOperation): bytes32 + + + +13 + +<<Struct>> +EIP712Domain +contracts/libs/IexecLibOrders_v5.sol + +name: string +version: string +chainId: uint256 +verifyingContract: address + + + +11->13 + + + + + +14 + +<<Struct>> +AppOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appprice: uint256 +volume: uint256 +tag: bytes32 +datasetrestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +11->14 + + + + + +15 + +<<Struct>> +DatasetOrder +contracts/libs/IexecLibOrders_v5.sol + +dataset: address +datasetprice: uint256 +volume: uint256 +tag: bytes32 +apprestrict: address +workerpoolrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +11->15 + + + + + +16 + +<<Struct>> +WorkerpoolOrder +contracts/libs/IexecLibOrders_v5.sol + +workerpool: address +workerpoolprice: uint256 +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +apprestrict: address +datasetrestrict: address +requesterrestrict: address +salt: bytes32 +sign: bytes + + + +11->16 + + + + + +17 + +<<Struct>> +RequestOrder +contracts/libs/IexecLibOrders_v5.sol + +app: address +appmaxprice: uint256 +dataset: address +datasetmaxprice: uint256 +workerpool: address +workerpoolmaxprice: uint256 +requester: address +volume: uint256 +tag: bytes32 +category: uint256 +trust: uint256 +beneficiary: address +callback: address +params: string +salt: bytes32 +sign: bytes + + + +11->17 + + + + + +18 + +<<Struct>> +AppOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: AppOrder +operation: OrderOperationEnum +sign: bytes + + + +11->18 + + + + + +19 + +<<Struct>> +DatasetOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: DatasetOrder +operation: OrderOperationEnum +sign: bytes + + + +11->19 + + + + + +20 + +<<Struct>> +WorkerpoolOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: WorkerpoolOrder +operation: OrderOperationEnum +sign: bytes + + + +11->20 + + + + + +21 + +<<Struct>> +RequestOrderOperation +contracts/libs/IexecLibOrders_v5.sol + +order: RequestOrder +operation: OrderOperationEnum +sign: bytes + + + +11->21 + + + + + +12 + +<<Enum>> +OrderOperationEnum +contracts/libs/IexecLibOrders_v5.sol + +SIGN: 0 +CLOSE: 1 + + + +12->11 + + + + + +13->11 + + + + + +14->11 + + + + + +15->11 + + + + + +16->11 + + + + + +17->11 + + + + + +18->11 + + + + + +18->12 + + + + + +18->14 + + + + + +19->11 + + + + + +19->12 + + + + + +19->15 + + + + + +20->11 + + + + + +20->12 + + + + + +20->16 + + + + + +21->11 + + + + + +21->12 + + + + + +21->17 + + + + + diff --git a/docs/uml/class-uml-dir-modules.svg b/docs/uml/class-uml-dir-modules.svg new file mode 100644 index 000000000..652121387 --- /dev/null +++ b/docs/uml/class-uml-dir-modules.svg @@ -0,0 +1,1241 @@ + + + + + + +UmlClassDiagram + + + +0 + +<<Abstract>> +DelegateBase +contracts/modules/DelegateBase.sol + + + +1 + +<<Abstract>> +DelegateBase +contracts/modules/DelegateBase.v8.sol + +Public: +    constructor() + + + +2 + +ENSIntegrationDelegate +contracts/modules/delegates/ENSIntegrationDelegate.sol + +External: +    setName(_ens: address, _name: string) <<onlyOwner>> + + + +2->0 + + + + + +25 + +<<Interface>> +ENSIntegration +contracts/modules/interfaces/ENSIntegration.sol + +External: +     setName(ens: address, name: string) + + + +2->25 + + + + + +3 + +IexecAccessorsABILegacyDelegate +contracts/modules/delegates/IexecAccessorsABILegacyDelegate.sol + +External: +    viewDealABILegacy_pt1(_id: bytes32): (address, address, uint256, address, address, uint256, address, address, uint256) +    viewDealABILegacy_pt2(_id: bytes32): (uint256, bytes32, address, address, address, string) +    viewConfigABILegacy(_id: bytes32): (uint256, uint256, uint256, uint256, uint256, uint256) +    viewAccountABILegacy(account: address): (uint256, uint256) +    viewTaskABILegacy(_taskid: bytes32): (IexecLibCore_v5.TaskStatusEnum, bytes32, uint256, uint256, uint256, uint256, uint256, bytes32, uint256, uint256, address[], bytes) +    viewContributionABILegacy(_taskid: bytes32, _worker: address): (IexecLibCore_v5.ContributionStatusEnum, bytes32, bytes32, address) +    viewCategoryABILegacy(_catid: uint256): (string, string, uint256) + + + +3->0 + + + + + +28 + +<<Interface>> +IexecAccessorsABILegacy +contracts/modules/interfaces/IexecAccessorsABILegacy.sol + +External: +     viewAccountABILegacy(_user: address): (uint256, uint256) +     viewDealABILegacy_pt1(_id: bytes32): (address, address, uint256, address, address, uint256, address, address, uint256) +     viewDealABILegacy_pt2(_id: bytes32): (uint256, bytes32, address, address, address, string) +     viewTaskABILegacy(_taskid: bytes32): (IexecLibCore_v5.TaskStatusEnum, bytes32, uint256, uint256, uint256, uint256, uint256, bytes32, uint256, uint256, address[], bytes) +     viewContributionABILegacy(_taskid: bytes32, _worker: address): (IexecLibCore_v5.ContributionStatusEnum, bytes32, bytes32, address) +     viewCategoryABILegacy(_catid: uint256): (string, string, uint256) +     viewConfigABILegacy(_id: bytes32): (uint256, uint256, uint256, uint256, uint256, uint256) + + + +3->28 + + + + + +4 + +IexecAccessorsDelegate +contracts/modules/delegates/IexecAccessorsDelegate.sol + +External: +    name(): string +    symbol(): string +    decimals(): uint8 +    totalSupply(): uint256 +    balanceOf(account: address): uint256 +    frozenOf(account: address): uint256 +    allowance(account: address, spender: address): uint256 +    viewAccount(account: address): IexecLibCore_v5.Account +    token(): address +    viewDeal(_id: bytes32): (deal: IexecLibCore_v5.Deal) +    viewConsumed(_id: bytes32): (consumed: uint256) +    viewPresigned(_id: bytes32): (signer: address) +    viewTask(_taskid: bytes32): IexecLibCore_v5.Task +    viewContribution(_taskid: bytes32, _worker: address): IexecLibCore_v5.Contribution +    viewScore(_worker: address): uint256 +    resultFor(id: bytes32): bytes +    viewCategory(_catid: uint256): (category: IexecLibCore_v5.Category) +    countCategory(): (count: uint256) +    appregistry(): IRegistry +    datasetregistry(): IRegistry +    workerpoolregistry(): IRegistry +    teebroker(): address +    callbackgas(): uint256 +    contribution_deadline_ratio(): uint256 +    reveal_deadline_ratio(): uint256 +    final_deadline_ratio(): uint256 +    workerpool_stake_ratio(): uint256 +    kitty_ratio(): uint256 +    kitty_min(): uint256 +    kitty_address(): address +    groupmember_purpose(): uint256 +    eip712domain_separator(): bytes32 + + + +4->0 + + + + + +27 + +<<Interface>> +IexecAccessors +contracts/modules/interfaces/IexecAccessors.sol + +External: +     name(): string +     symbol(): string +     decimals(): uint8 +     totalSupply(): uint256 +     balanceOf(address): uint256 +     frozenOf(address): uint256 +     allowance(address, address): uint256 +     viewAccount(address): IexecLibCore_v5.Account +     token(): address +     viewDeal(bytes32): IexecLibCore_v5.Deal +     viewConsumed(bytes32): uint256 +     viewPresigned(bytes32): address +     viewTask(bytes32): IexecLibCore_v5.Task +     viewContribution(bytes32, address): IexecLibCore_v5.Contribution +     viewScore(address): uint256 +     viewCategory(uint256): IexecLibCore_v5.Category +     countCategory(): uint256 +     appregistry(): IRegistry +     datasetregistry(): IRegistry +     workerpoolregistry(): IRegistry +     teebroker(): address +     callbackgas(): uint256 +     contribution_deadline_ratio(): uint256 +     reveal_deadline_ratio(): uint256 +     final_deadline_ratio(): uint256 +     workerpool_stake_ratio(): uint256 +     kitty_ratio(): uint256 +     kitty_min(): uint256 +     kitty_address(): address +     groupmember_purpose(): uint256 +     eip712domain_separator(): bytes32 + + + +4->27 + + + + + +5 + +IexecCategoryManagerDelegate +contracts/modules/delegates/IexecCategoryManagerDelegate.sol + +External: +    createCategory(name: string, description: string, workClockTimeRef: uint256): uint256 <<onlyOwner>> + + + +5->0 + + + + + +29 + +<<Interface>> +IexecCategoryManager +contracts/modules/interfaces/IexecCategoryManager.sol + +External: +     createCategory(string, string, uint256): uint256 +Public: +    <<event>> CreateCategory(catid: uint256, name: string, description: string, workClockTimeRef: uint256) + + + +5->29 + + + + + +6 + +IexecERC20Core +contracts/modules/delegates/IexecERC20Core.sol + +Internal: +    _transferUnchecked(sender: address, recipient: address, amount: uint256) +    _transfer(sender: address, recipient: address, amount: uint256) +    _mint(account: address, amount: uint256) +    _burn(account: address, amount: uint256) +    _approve(owner: address, spender: address, amount: uint256) +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) +    <<event>> Approval(owner: address, spender: address, value: uint256) + + + +6->0 + + + + + +7 + +IexecERC20Delegate +contracts/modules/delegates/IexecERC20Delegate.sol + +External: +    transfer(recipient: address, amount: uint256): bool +    approve(spender: address, value: uint256): bool +    approveAndCall(spender: address, value: uint256, extraData: bytes): bool +    transferFrom(sender: address, recipient: address, amount: uint256): bool +    increaseAllowance(spender: address, addedValue: uint256): bool +    decreaseAllowance(spender: address, subtractedValue: uint256): bool + + + +7->0 + + + + + +7->6 + + + + + +30 + +<<Interface>> +IexecERC20 +contracts/modules/interfaces/IexecERC20.sol + +External: +     transfer(address, uint256): bool +     approve(address, uint256): bool +     transferFrom(address, address, uint256): bool +     increaseAllowance(address, uint256): bool +     decreaseAllowance(address, uint256): bool +     approveAndCall(address, uint256, bytes): bool +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) +    <<event>> Approval(owner: address, spender: address, value: uint256) + + + +7->30 + + + + + +47 + +<<Interface>> +IexecTokenSpender +contracts/modules/interfaces/IexecTokenSpender.sol + +External: +     receiveApproval(address, uint256, address, bytes): bool + + + +7->47 + + + + + +8 + +IexecEscrow +contracts/modules/delegates/IexecEscrow.v8.sol + +Private: +    _transfer(from: address, to: address, value: uint256) +Internal: +    lock(account: address, value: uint256) +    unlock(account: address, value: uint256) +    reward(account: address, value: uint256, ref: bytes32) +    seize(account: address, value: uint256, ref: bytes32) +Public: +    <<event>> Transfer(from: address, to: address, value: uint256) +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) + + + +8->1 + + + + + +9 + +IexecEscrowNativeDelegate +contracts/modules/delegates/IexecEscrowNativeDelegate.sol + +Internal: +   nRLCtoWei: uint256 + +Internal: +    _deposit(target: address) +    _withdraw(to: address, value: uint256) +External: +    <<payable>> null() +    <<payable>> null() +    <<payable>> deposit(): bool +    <<payable>> depositFor(target: address): bool +    <<payable>> depositForArray(amounts: uint256[], targets: address[]): bool +    withdraw(amount: uint256): bool +    withdrawTo(amount: uint256, target: address): bool +    recover(): uint256 <<onlyOwner>> + + + +9->0 + + + + + +9->6 + + + + + +32 + +<<Interface>> +IexecEscrowNative +contracts/modules/interfaces/IexecEscrowNative.sol + +External: +     null() +     null() +     deposit(): bool +     depositFor(address): bool +     depositForArray(uint256[], address[]): bool +     withdraw(uint256): bool +     withdrawTo(uint256, address): bool +     recover(): uint256 + + + +9->32 + + + + + +10 + +IexecEscrowTokenDelegate +contracts/modules/delegates/IexecEscrowTokenDelegate.sol + +Internal: +    _deposit(from: address, amount: uint256) +    _withdraw(to: address, amount: uint256) +External: +    <<payable>> null() +    <<payable>> null() +    deposit(amount: uint256): bool +    depositFor(amount: uint256, target: address): bool +    depositForArray(amounts: uint256[], targets: address[]): bool +    withdraw(amount: uint256): bool +    withdrawTo(amount: uint256, target: address): bool +    recover(): uint256 <<onlyOwner>> +    receiveApproval(sender: address, amount: uint256, token: address, bytes): bool + + + +10->0 + + + + + +10->6 + + + + + +33 + +<<Interface>> +IexecEscrowToken +contracts/modules/interfaces/IexecEscrowToken.sol + +External: +     null() +     null() +     deposit(uint256): bool +     depositFor(uint256, address): bool +     depositForArray(uint256[], address[]): bool +     withdraw(uint256): bool +     withdrawTo(uint256, address): bool +     recover(): uint256 + + + +10->33 + + + + + +10->47 + + + + + +11 + +IexecEscrowTokenSwapDelegate +contracts/modules/delegates/IexecEscrowTokenSwapDelegate.sol + +Internal: +   router: IUniswapV2Router02 + +Internal: +    _eth2token(): address[] +    _token2eth(): address[] +    _deposit(target: address, value: uint256, minimum: uint256) +    _request(target: address, value: uint256, amount: uint256) +    _withdraw(target: address, amount: uint256, minimum: uint256) +External: +    <<payable>> null() +    <<payable>> null() +    <<payable>> depositEth() +    <<payable>> depositEthFor(target: address) +    <<payable>> safeDepositEth(minimum: uint256) +    <<payable>> safeDepositEthFor(minimum: uint256, target: address) +    <<payable>> requestToken(amount: uint256) +    <<payable>> requestTokenFor(amount: uint256, target: address) +    UniswapV2Router(): IUniswapV2Router02 +    estimateDepositEthSent(eth: uint256): (token: uint256) +    estimateDepositTokenWanted(token: uint256): (eth: uint256) +    estimateWithdrawTokenSent(token: uint256): (eth: uint256) +    estimateWithdrawEthWanted(eth: uint256): (token: uint256) +    withdrawEth(amount: uint256) +    withdrawEthTo(amount: uint256, target: address) +    safeWithdrawEth(amount: uint256, minimum: uint256) +    safeWithdrawEthTo(amount: uint256, minimum: uint256, target: address) +Public: +    <<payable>> matchOrdersWithEth(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32 + + + +11->0 + + + + + +11->6 + + + + + +23 + +SignatureVerifier +contracts/modules/delegates/SignatureVerifier.sol + +Internal: +    _toEthSignedMessage(_msgHash: bytes32): bytes +    _toEthTypedStruct(_structHash: bytes32, _domainHash: bytes32): bytes +    _recover(_hash: bytes32, _sign: bytes): address +    _isContract(account: address): bool +    _addrToKey(_addr: address): bytes32 +    _checkIdentity(_identity: address, _candidate: address, _purpose: uint256): (valid: bool) +    _checkPresignature(_identity: address, _hash: bytes32): bool +    _checkSignature(_identity: address, _hash: bytes32, _signature: bytes): bool +    _checkSignature(_identity: address, _predicat: bytes, _signature: bytes): bool +    _checkPresignatureOrSignature(_identity: address, _hash: bytes32, _signature: bytes): bool +    _checkPresignatureOrSignature(_identity: address, _predicat: bytes, _signature: bytes): bool + + + +11->23 + + + + + +34 + +<<Interface>> +IexecEscrowTokenSwap +contracts/modules/interfaces/IexecEscrowTokenSwap.sol + +External: +     null() +     null() +     UniswapV2Router(): IUniswapV2Router02 +     estimateDepositEthSent(uint256): uint256 +     estimateDepositTokenWanted(uint256): uint256 +     estimateWithdrawTokenSent(uint256): uint256 +     estimateWithdrawEthWanted(uint256): uint256 +     depositEth() +     depositEthFor(address) +     safeDepositEth(uint256) +     safeDepositEthFor(uint256, address) +     requestToken(uint256) +     requestTokenFor(uint256, address) +     withdrawEth(uint256) +     withdrawEthTo(uint256, address) +     safeWithdrawEth(uint256, uint256) +     safeWithdrawEthTo(uint256, uint256, address) +     matchOrdersWithEth(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 + + + +11->34 + + + + + +39 + +<<Interface>> +IexecPoco1 +contracts/modules/interfaces/IexecPoco1.sol + +External: +     verifySignature(address, bytes32, bytes): bool +     verifyPresignature(address, bytes32): bool +     verifyPresignatureOrSignature(address, bytes32, bytes): bool +     matchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +Public: +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) +    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) +    <<event>> SchedulerNotice(workerpool: address, dealid: bytes32) + + + +11->39 + + + + + +12 + +IexecMaintenanceDelegate +contracts/modules/delegates/IexecMaintenanceDelegate.sol + +Internal: +    _chainId(): (id: uint256) +    _domain(): IexecLibOrders_v5.EIP712Domain +External: +    configure(_token: address, _name: string, _symbol: string, _decimal: uint8, _appregistryAddress: address, _datasetregistryAddress: address, _workerpoolregistryAddress: address, _v3_iexecHubAddress: address) <<onlyOwner>> +    domain(): IexecLibOrders_v5.EIP712Domain +    updateDomainSeparator() +    importScore(_worker: address) +    setTeeBroker(_teebroker: address) <<onlyOwner>> +    setCallbackGas(_callbackgas: uint256) <<onlyOwner>> + + + +12->0 + + + + + +35 + +<<Interface>> +IexecMaintenance +contracts/modules/interfaces/IexecMaintenance.sol + +External: +     configure(address, string, string, uint8, address, address, address, address) +     domain(): IexecLibOrders_v5.EIP712Domain +     updateDomainSeparator() +     importScore(address) +     setTeeBroker(address) +     setCallbackGas(uint256) + + + +12->35 + + + + + +13 + +IexecMaintenanceExtraDelegate +contracts/modules/delegates/IexecMaintenanceExtraDelegate.sol + +External: +    changeRegistries(_appregistryAddress: address, _datasetregistryAddress: address, _workerpoolregistryAddress: address) <<onlyOwner>> + + + +13->0 + + + + + +36 + +<<Interface>> +IexecMaintenanceExtra +contracts/modules/interfaces/IexecMaintenanceExtra.sol + +External: +     changeRegistries(address, address, address) + + + +13->36 + + + + + +14 + +IexecOrderManagementDelegate +contracts/modules/delegates/IexecOrderManagementDelegate.sol + +Public: +    manageAppOrder(_apporderoperation: IexecLibOrders_v5.AppOrderOperation) +    manageDatasetOrder(_datasetorderoperation: IexecLibOrders_v5.DatasetOrderOperation) +    manageWorkerpoolOrder(_workerpoolorderoperation: IexecLibOrders_v5.WorkerpoolOrderOperation) +    manageRequestOrder(_requestorderoperation: IexecLibOrders_v5.RequestOrderOperation) + + + +14->1 + + + + + +24 + +SignatureVerifier +contracts/modules/delegates/SignatureVerifier.v8.sol + +Internal: +    _toTypedDataHash(structHash: bytes32): bytes32 +    _verifySignatureOfEthSignedMessage(account: address, message: bytes, signature: bytes): bool +    _verifySignature(account: address, messageHash: bytes32, signature: bytes): bool +    _verifyPresignature(account: address, messageHash: bytes32): bool +    _verifySignatureOrPresignature(account: address, messageHash: bytes32, signature: bytes): bool +    _isAccountAuthorizedByRestriction(restriction: address, account: address): bool + + + +14->24 + + + + + +38 + +<<Interface>> +IexecOrderManagement +contracts/modules/interfaces/IexecOrderManagement.v8.sol + +External: +     manageAppOrder(IexecLibOrders_v5.AppOrderOperation) +     manageDatasetOrder(IexecLibOrders_v5.DatasetOrderOperation) +     manageWorkerpoolOrder(IexecLibOrders_v5.WorkerpoolOrderOperation) +     manageRequestOrder(IexecLibOrders_v5.RequestOrderOperation) +Public: +    <<event>> SignedAppOrder(appHash: bytes32) +    <<event>> SignedDatasetOrder(datasetHash: bytes32) +    <<event>> SignedWorkerpoolOrder(workerpoolHash: bytes32) +    <<event>> SignedRequestOrder(requestHash: bytes32) +    <<event>> ClosedAppOrder(appHash: bytes32) +    <<event>> ClosedDatasetOrder(datasetHash: bytes32) +    <<event>> ClosedWorkerpoolOrder(workerpoolHash: bytes32) +    <<event>> ClosedRequestOrder(requestHash: bytes32) + + + +14->38 + + + + + +15 + +<<Struct>> +Matching +contracts/modules/delegates/IexecPoco1Delegate.sol + +apporderHash: bytes32 +appOwner: address +datasetorderHash: bytes32 +datasetOwner: address +workerpoolorderHash: bytes32 +workerpoolOwner: address +requestorderHash: bytes32 +hasDataset: bool + + + +16 + +IexecPoco1Delegate +contracts/modules/delegates/IexecPoco1Delegate.sol + +Private: +    _matchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder, _sponsor: address): bytes32 +External: +    verifySignature(_identity: address, _hash: bytes32, _signature: bytes): bool +    verifyPresignature(_identity: address, _hash: bytes32): bool +    verifyPresignatureOrSignature(_identity: address, _hash: bytes32, _signature: bytes): bool +    sponsorMatchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32 +Public: +    matchOrders(_apporder: IexecLibOrders_v5.AppOrder, _datasetorder: IexecLibOrders_v5.DatasetOrder, _workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder, _requestorder: IexecLibOrders_v5.RequestOrder): bytes32 + + + +16->1 + + + + + +16->8 + + + + + +16->15 + + + + + +21 + +IexecPocoCommonDelegate +contracts/modules/delegates/IexecPocoCommonDelegate.sol + +Internal: +    _computeDealVolume(appOrderVolume: uint256, appOrderTypedDataHash: bytes32, hasDataset: bool, datasetOrderVolume: uint256, datasetOrderTypedDataHash: bytes32, workerpoolOrderVolume: uint256, workerpoolOrderTypedDataHash: bytes32, requestOrderVolume: uint256, requestOrderTypedDataHash: bytes32): uint256 + + + +16->21 + + + + + +16->24 + + + + + +40 + +<<Interface>> +IexecPoco1 +contracts/modules/interfaces/IexecPoco1.v8.sol + +External: +     verifySignature(address, bytes32, bytes): bool +     verifyPresignature(address, bytes32): bool +     verifyPresignatureOrSignature(address, bytes32, bytes): bool +     matchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +     sponsorMatchOrders(IexecLibOrders_v5.AppOrder, IexecLibOrders_v5.DatasetOrder, IexecLibOrders_v5.WorkerpoolOrder, IexecLibOrders_v5.RequestOrder): bytes32 +Public: +    <<event>> SchedulerNotice(workerpool: address, dealid: bytes32) +    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) +    <<event>> DealSponsored(dealId: bytes32, sponsor: address) + + + +16->40 + + + + + +17 + +IexecPoco2Delegate +contracts/modules/delegates/IexecPoco2Delegate.sol + +Internal: +    successWork(_dealid: bytes32, _taskid: bytes32) +    failedWork(_dealid: bytes32, _taskid: bytes32) +    checkConsensus(_taskid: bytes32, _consensus: bytes32) +    distributeRewards(_taskid: bytes32) +    distributeRewardsFast(_taskid: bytes32) +    executeCallback(_taskid: bytes32, _resultsCallback: bytes) +External: +    reveal(_taskid: bytes32, _resultDigest: bytes32) +    reopen(_taskid: bytes32) <<onlyScheduler>> +    finalize(_taskid: bytes32, _results: bytes, _resultsCallback: bytes) <<onlyScheduler>> +    initializeArray(_dealid: bytes32[], _idx: uint256[]): bool +    claimArray(_taskid: bytes32[]): bool +    initializeAndClaimArray(_dealid: bytes32[], _idx: uint256[]): bool +Public: +    <<modifier>> onlyScheduler(_taskId: bytes32) +    initialize(_dealid: bytes32, idx: uint256): bytes32 +    contribute(_taskid: bytes32, _resultHash: bytes32, _resultSeal: bytes32, _enclaveChallenge: address, _enclaveSign: bytes, _authorizationSign: bytes) +    contributeAndFinalize(_taskid: bytes32, _resultDigest: bytes32, _results: bytes, _resultsCallback: bytes, _enclaveChallenge: address, _enclaveSign: bytes, _authorizationSign: bytes) +    claim(_taskid: bytes32) + + + +17->1 + + + + + +17->8 + + + + + +17->24 + + + + + +42 + +<<Interface>> +IexecPoco2 +contracts/modules/interfaces/IexecPoco2.v8.sol + +External: +     initialize(dealId: bytes32, index: uint256): bytes32 +     initializeArray(dealIds: bytes32[], indexes: uint256[]): bool +     initializeAndClaimArray(dealIds: bytes32[], indexes: uint256[]): bool +     contribute(taskId: bytes32, resultHash: bytes32, resultSeal: bytes32, enclaveChallenge: address, enclaveSign: bytes, authorizationSign: bytes) +     contributeAndFinalize(taskId: bytes32, resultDigest: bytes32, results: bytes, resultsCallback: bytes, enclaveChallenge: address, enclaveSign: bytes, authorizationSign: bytes) +     reveal(taskId: bytes32, resultDigest: bytes32) +     reopen(taskId: bytes32) +     finalize(taskId: bytes32, results: bytes, resultsCallback: bytes) +     claim(taskId: bytes32) +     claimArray(taskIds: bytes32[]): bool +Public: +    <<event>> TaskInitialize(taskId: bytes32, workerpool: address) +    <<event>> TaskContribute(taskId: bytes32, worker: address, hash: bytes32) +    <<event>> TaskConsensus(taskId: bytes32, consensus: bytes32) +    <<event>> TaskReveal(taskId: bytes32, worker: address, digest: bytes32) +    <<event>> AccurateContribution(worker: address, taskId: bytes32) +    <<event>> FaultyContribution(worker: address, taskId: bytes32) +    <<event>> TaskReopen(taskId: bytes32) +    <<event>> TaskFinalize(taskId: bytes32, results: bytes) +    <<event>> TaskClaimed(taskId: bytes32) + + + +17->42 + + + + + +18 + +IexecPocoAccessorsDelegate +contracts/modules/delegates/IexecPocoAccessorsDelegate.sol + +External: +    viewDeal(id: bytes32): (deal: IexecLibCore_v5.Deal) +    viewTask(id: bytes32): IexecLibCore_v5.Task +    computeDealVolume(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): uint256 + + + +18->1 + + + + + +18->21 + + + + + +18->24 + + + + + +43 + +<<Interface>> +IexecPocoAccessors +contracts/modules/interfaces/IexecPocoAccessors.sol + +External: +     viewDeal(id: bytes32): IexecLibCore_v5.Deal +     viewTask(id: bytes32): IexecLibCore_v5.Task +     computeDealVolume(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): uint256 + + + +18->43 + + + + + +19 + +IexecPocoBoostAccessorsDelegate +contracts/modules/delegates/IexecPocoBoostAccessorsDelegate.sol + +External: +    viewDealBoost(id: bytes32): (deal: IexecLibCore_v5.DealBoost) + + + +19->1 + + + + + +45 + +<<Interface>> +IexecPocoBoostAccessors +contracts/modules/interfaces/IexecPocoBoostAccessors.sol + +External: +     viewDealBoost(id: bytes32): IexecLibCore_v5.DealBoost + + + +19->45 + + + + + +20 + +IexecPocoBoostDelegate +contracts/modules/delegates/IexecPocoBoostDelegate.sol + +Private: +    _matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder, sponsor: address): bytes32 +    requireTaskExistsAndUnset(taskStatus: IexecLibCore_v5.TaskStatusEnum, taskIndex: uint256, botSize: uint16) +External: +    matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +    sponsorMatchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +    pushResultBoost(dealId: bytes32, index: uint256, results: bytes, resultsCallback: bytes, authorizationSign: bytes, enclaveChallenge: address, enclaveSign: bytes) +    claimBoost(dealId: bytes32, index: uint256) + + + +20->1 + + + + + +20->8 + + + + + +20->21 + + + + + +20->24 + + + + + +44 + +<<Interface>> +IexecPocoBoost +contracts/modules/interfaces/IexecPocoBoost.sol + +External: +     matchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +     sponsorMatchOrdersBoost(appOrder: IexecLibOrders_v5.AppOrder, datasetOrder: IexecLibOrders_v5.DatasetOrder, workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrder, requestOrder: IexecLibOrders_v5.RequestOrder): bytes32 +     pushResultBoost(dealId: bytes32, index: uint256, results: bytes, resultsCallback: bytes, authorizationSign: bytes, enclaveChallenge: address, enclaveSign: bytes) +     claimBoost(dealId: bytes32, index: uint256) +Public: +    <<event>> SchedulerNoticeBoost(workerpool: address, dealId: bytes32, app: address, dataset: address, category: uint256, tag: bytes32, params: string, beneficiary: address) +    <<event>> OrdersMatched(dealid: bytes32, appHash: bytes32, datasetHash: bytes32, workerpoolHash: bytes32, requestHash: bytes32, volume: uint256) +    <<event>> ResultPushedBoost(dealId: bytes32, index: uint256, results: bytes) +    <<event>> TaskClaimed(taskid: bytes32) +    <<event>> DealSponsoredBoost(dealId: bytes32, sponsor: address) + + + +20->44 + + + + + +21->1 + + + + + +22 + +IexecRelayDelegate +contracts/modules/delegates/IexecRelayDelegate.sol + +External: +    broadcastAppOrder(_apporder: IexecLibOrders_v5.AppOrder) +    broadcastDatasetOrder(_datasetorder: IexecLibOrders_v5.DatasetOrder) +    broadcastWorkerpoolOrder(_workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder) +    broadcastRequestOrder(_requestorder: IexecLibOrders_v5.RequestOrder) + + + +22->0 + + + + + +46 + +<<Interface>> +IexecRelay +contracts/modules/interfaces/IexecRelay.sol + +External: +     broadcastAppOrder(IexecLibOrders_v5.AppOrder) +     broadcastDatasetOrder(IexecLibOrders_v5.DatasetOrder) +     broadcastWorkerpoolOrder(IexecLibOrders_v5.WorkerpoolOrder) +     broadcastRequestOrder(IexecLibOrders_v5.RequestOrder) +Public: +    <<event>> BroadcastAppOrder(apporder: IexecLibOrders_v5.AppOrder) +    <<event>> BroadcastDatasetOrder(datasetorder: IexecLibOrders_v5.DatasetOrder) +    <<event>> BroadcastWorkerpoolOrder(workerpoolorder: IexecLibOrders_v5.WorkerpoolOrder) +    <<event>> BroadcastRequestOrder(requestorder: IexecLibOrders_v5.RequestOrder) + + + +22->46 + + + + + +23->0 + + + + + +24->1 + + + + + +26 + +<<Interface>> +IOwnable +contracts/modules/interfaces/IOwnable.sol + +External: +     owner(): address +     renounceOwnership() +     transferOwnership(address) +Public: +    <<event>> OwnershipTransferred(previousOwner: address, newOwner: address) + + + +31 + +<<Interface>> +IexecERC20Common +contracts/modules/interfaces/IexecERC20Common.sol + +Public: +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) + + + +37 + +<<Interface>> +IexecOrderManagement +contracts/modules/interfaces/IexecOrderManagement.sol + +External: +     manageAppOrder(IexecLibOrders_v5.AppOrderOperation) +     manageDatasetOrder(IexecLibOrders_v5.DatasetOrderOperation) +     manageWorkerpoolOrder(IexecLibOrders_v5.WorkerpoolOrderOperation) +     manageRequestOrder(IexecLibOrders_v5.RequestOrderOperation) +Public: +    <<event>> SignedAppOrder(appHash: bytes32) +    <<event>> SignedDatasetOrder(datasetHash: bytes32) +    <<event>> SignedWorkerpoolOrder(workerpoolHash: bytes32) +    <<event>> SignedRequestOrder(requestHash: bytes32) +    <<event>> ClosedAppOrder(appHash: bytes32) +    <<event>> ClosedDatasetOrder(datasetHash: bytes32) +    <<event>> ClosedWorkerpoolOrder(workerpoolHash: bytes32) +    <<event>> ClosedRequestOrder(requestHash: bytes32) + + + +41 + +<<Interface>> +IexecPoco2 +contracts/modules/interfaces/IexecPoco2.sol + +External: +     initialize(bytes32, uint256): bytes32 +     claim(bytes32) +     contribute(bytes32, bytes32, bytes32, address, bytes, bytes) +     contributeAndFinalize(bytes32, bytes32, bytes, bytes, address, bytes, bytes) +     reveal(bytes32, bytes32) +     reopen(bytes32) +     finalize(bytes32, bytes, bytes) +     initializeArray(bytes32[], uint256[]): bool +     claimArray(bytes32[]): bool +     initializeAndClaimArray(bytes32[], uint256[]): bool +Public: +    <<event>> Reward(owner: address, amount: uint256, ref: bytes32) +    <<event>> Seize(owner: address, amount: uint256, ref: bytes32) +    <<event>> Lock(owner: address, amount: uint256) +    <<event>> Unlock(owner: address, amount: uint256) +    <<event>> AccurateContribution(worker: address, taskid: bytes32) +    <<event>> FaultyContribution(worker: address, taskid: bytes32) +    <<event>> TaskInitialize(taskid: bytes32, workerpool: address) +    <<event>> TaskContribute(taskid: bytes32, worker: address, hash: bytes32) +    <<event>> TaskConsensus(taskid: bytes32, consensus: bytes32) +    <<event>> TaskReveal(taskid: bytes32, worker: address, digest: bytes32) +    <<event>> TaskFinalize(taskid: bytes32, results: bytes) +    <<event>> TaskClaimed(taskid: bytes32) +    <<event>> TaskReopen(taskid: bytes32) + + + diff --git a/docs/uml/class-uml-dir-registries.svg b/docs/uml/class-uml-dir-registries.svg new file mode 100644 index 000000000..a45f247bd --- /dev/null +++ b/docs/uml/class-uml-dir-registries.svg @@ -0,0 +1,242 @@ + + + + + + +UmlClassDiagram + + + +0 + +<<Interface>> +IRegistry +contracts/registries/IRegistry.sol + +External: +     isRegistered(_entry: address): bool + + + +1 + +<<Abstract>> +Registry +contracts/registries/Registry.sol + +Public: +   master: address +   proxyCode: bytes +   proxyCodeHash: bytes32 +   previous: IRegistry +   initialized: bool + +Internal: +    _mintCreate(_owner: address, _args: bytes): uint256 +    _mintPredict(_owner: address, _args: bytes): uint256 +External: +    initialize(_previous: address) <<onlyOwner>> +    setName(_ens: address, _name: string) <<onlyOwner>> +    setBaseURI(_baseURI: string) <<onlyOwner>> +    isRegistered(_entry: address): bool +Public: +    constructor(_master: address, _name: string, _symbol: string) + + + +1->0 + + + + + +2 + +<<Abstract>> +RegistryEntry +contracts/registries/RegistryEntry.sol + +Public: +   registry: IRegistry + +Internal: +    _initialize(_registry: address) +External: +    setName(_ens: address, _name: string) <<onlyOwner>> +Public: +    <<modifier>> onlyOwner() +    owner(): address + + + +2->0 + + + + + +3 + +App +contracts/registries/apps/App.sol + +Public: +   m_appName: string +   m_appType: string +   m_appMultiaddr: bytes +   m_appChecksum: bytes32 +   m_appMREnclave: bytes + +Public: +    initialize(_appName: string, _appType: string, _appMultiaddr: bytes, _appChecksum: bytes32, _appMREnclave: bytes) + + + +3->2 + + + + + +4 + +AppRegistry +contracts/registries/apps/AppRegistry.sol + +Internal: +    encodeInitializer(_appName: string, _appType: string, _appMultiaddr: bytes, _appChecksum: bytes32, _appMREnclave: bytes): bytes +External: +    createApp(_appOwner: address, _appName: string, _appType: string, _appMultiaddr: bytes, _appChecksum: bytes32, _appMREnclave: bytes): App +    predictApp(_appOwner: address, _appName: string, _appType: string, _appMultiaddr: bytes, _appChecksum: bytes32, _appMREnclave: bytes): App +Public: +    constructor() + + + +4->1 + + + + + +4->3 + + + + + +5 + +Dataset +contracts/registries/datasets/Dataset.sol + +Public: +   m_datasetName: string +   m_datasetMultiaddr: bytes +   m_datasetChecksum: bytes32 + +Public: +    initialize(_datasetName: string, _datasetMultiaddr: bytes, _datasetChecksum: bytes32) + + + +5->2 + + + + + +6 + +DatasetRegistry +contracts/registries/datasets/DatasetRegistry.sol + +Internal: +    encodeInitializer(_datasetName: string, _datasetMultiaddr: bytes, _datasetChecksum: bytes32): bytes +External: +    createDataset(_datasetOwner: address, _datasetName: string, _datasetMultiaddr: bytes, _datasetChecksum: bytes32): Dataset +    predictDataset(_datasetOwner: address, _datasetName: string, _datasetMultiaddr: bytes, _datasetChecksum: bytes32): Dataset +Public: +    constructor() + + + +6->1 + + + + + +6->5 + + + + + +7 + +<<Interface>> +IWorkerpool +contracts/registries/workerpools/IWorkerpool.v8.sol + +External: +     m_schedulerRewardRatioPolicy(): uint256 +     m_workerStakeRatioPolicy(): uint256 + + + +8 + +Workerpool +contracts/registries/workerpools/Workerpool.sol + +Public: +   m_workerpoolDescription: string +   m_workerStakeRatioPolicy: uint256 +   m_schedulerRewardRatioPolicy: uint256 + +External: +    changePolicy(_newWorkerStakeRatioPolicy: uint256, _newSchedulerRewardRatioPolicy: uint256) <<onlyOwner>> +Public: +    <<event>> PolicyUpdate(oldWorkerStakeRatioPolicy: uint256, newWorkerStakeRatioPolicy: uint256, oldSchedulerRewardRatioPolicy: uint256, newSchedulerRewardRatioPolicy: uint256) +    initialize(_workerpoolDescription: string) + + + +8->2 + + + + + +9 + +WorkerpoolRegistry +contracts/registries/workerpools/WorkerpoolRegistry.sol + +Internal: +    encodeInitializer(_workerpoolDescription: string): bytes +External: +    createWorkerpool(_workerpoolOwner: address, _workerpoolDescription: string): Workerpool +    predictWorkerpool(_workerpoolOwner: address, _workerpoolDescription: string): Workerpool +Public: +    constructor() + + + +9->1 + + + + + +9->8 + + + + + diff --git a/docs/uml/nominalworkflow-ODB+TEE.puml b/docs/uml/nominalworkflow-ODB+TEE.puml new file mode 100644 index 000000000..80deea442 --- /dev/null +++ b/docs/uml/nominalworkflow-ODB+TEE.puml @@ -0,0 +1,56 @@ +@startuml +scale 2000 width + + +!include workflow-ODB-0-actors.puml + +box "Repository" + participant Results +end box + +== Ressources deployment == +activate App +App -> App : push application +App --> IexecPoco2 : register application +deactivate App + +activate Dataset +Dataset -> Dataset : generate encryption key (Kd) +Dataset -> Dataset : encrypt Dataset with Kd +Dataset -> Dataset : push dataset +Dataset --> IexecPoco2 : register dataset +Dataset -[#red]> SMS: push Kd +group for each application + Dataset -> App : get application signature + Dataset -> Dataset : authorize application in datasetorder +end +Dataset -> Dataset : sign datasetorder +Dataset --> Marketplace : publish datasetorder +deactivate Dataset + +activate Requester +Requester -> Requester : generate encryption key (Kr) +Requester -[#red]> SMS: push Kr +deactivate Requester + +== Brokering == + +activate App +App -> App : sign apporder +App --> Marketplace : publish apporder +deactivate App + +activate Scheduler +Scheduler -> Scheduler : checks availability +Scheduler -> Scheduler : sign workerpoolorder +Scheduler --> Marketplace : publish workerpoolorder +deactivate Scheduler + +activate Requester +Requester -> Requester : sign requestorder +Requester --> Marketplace : publish requestorder +deactivate Requester + +!include workflow-ODB-2c-match2finalize-nominal-tee.puml + +@enduml diff --git a/docs/uml/nominalworkflow-ODB.puml b/docs/uml/nominalworkflow-ODB.puml new file mode 100644 index 000000000..435d40854 --- /dev/null +++ b/docs/uml/nominalworkflow-ODB.puml @@ -0,0 +1,9 @@ +@startuml + +!include workflow-ODB-0-actors.puml + +!include workflow-ODB-1-publish-orders.puml + +!include workflow-ODB-2a-match2finalize-nominal.puml + +@enduml diff --git a/docs/uml/storage-IexecPocoBoostDelegate.svg b/docs/uml/storage-IexecPocoBoostDelegate.svg new file mode 100644 index 000000000..1666eab41 --- /dev/null +++ b/docs/uml/storage-IexecPocoBoostDelegate.svg @@ -0,0 +1,245 @@ + + + + + + +StorageDiagram + + + +5 + +IexecPocoBoostDelegate <<Contract>> + +slot + +0 + +1-4 + +5 + +6 + +7 + +8 + +9 + +10 + +11 + +12 + +13 + +14 + +15 + +16 + +17 + +18 + +19 + +20 + +21 + +22 + +23 + +24 + +25 + +26 + +27 + +28 + +29 + +type: <inherited contract>.variable (bytes) + +unallocated (12) + +address: Ownable._owner (20) + +LibMap2_bytes4_address_bytes.map: ERC1538Store.m_funcs (128) + +unallocated (12) + +IRegistry: Store.m_appregistry (20) + +unallocated (12) + +IRegistry: Store.m_datasetregistry (20) + +unallocated (12) + +IRegistry: Store.m_workerpoolregistry (20) + +unallocated (12) + +IERC20: Store.m_baseToken (20) + +string: Store.m_name (32) + +string: Store.m_symbol (32) + +unallocated (31) + +uint8: Store.m_decimals (1) + +uint256: Store.m_totalSupply (32) + +mapping(address=>uint256): Store.m_balances (32) + +mapping(address=>uint256): Store.m_frozens (32) + +mapping(address=>mapping(address=>uint256)): Store.m_allowances (32) + +bytes32: Store.EIP712DOMAIN_SEPARATOR (32) + +mapping(bytes32=>address): Store.m_presigned (32) + +mapping(bytes32=>uint256): Store.m_consumed (32) + +mapping(bytes32=>IexecLibCore_v5.Deal): Store.m_deals (32) + +mapping(bytes32=>IexecLibCore_v5.Task): Store.m_tasks (32) + +mapping(bytes32=>IexecLibCore_v5.Consensus): Store.m_consensus (32) + +mapping(bytes32=>mapping(address=>IexecLibCore_v5.Contribution)): Store.m_contributions (32) + +mapping(address=>uint256): Store.m_workerScores (32) + +unallocated (12) + +address: Store.m_teebroker (20) + +uint256: Store.m_callbackgas (32) + +IexecLibCore_v5.Category[]: Store.m_categories (32) + +unallocated (12) + +address: Store.m_v3_iexecHub (20) + +mapping(address=>bool): Store.m_v3_scoreImported (32) + +mapping(bytes32=>IexecLibCore_v5.DealBoost): Store.m_dealsBoost (32) + + + +3 + +LibMap2_bytes4_address_bytes.map <<Struct>> + +slot + +1-2 + +3 + +4 + +type: variable (bytes) + +LibSet_bytes4.set: map.keyset (64) + +mapping(bytes4=>address): map.values1 (32) + +mapping(bytes4=>bytes): map.values2 (32) + + + +5:8->3 + + + + + +4 + +IexecLibCore_v5.Category[]: m_categories <<Array>> +0x057c384a7d1c54f3a1b2e5e67b2617b8224fdfd1ea7234eea573a6ff665ff63e + +offset + +0 + +type: variable (bytes) + +unallocated (12) + +IexecLibCore_v5.Category (20) + + + +5:31->4 + + + + + +1 + +bytes4[]: values <<Array>> +0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6 + +offset + +0 + +type: variable (bytes) + +unallocated (28) + +bytes4 (4) + + + +2 + +LibSet_bytes4.set <<Struct>> + +slot + +1 + +2 + +type: variable (bytes) + +bytes4[]: set.values (32) + +mapping(bytes4=>uint256): set.indexes (32) + + + +2:3->1 + + + + + +3:5->2 + + + + + diff --git a/docs/uml/workflow-ODB-0-actors.puml b/docs/uml/workflow-ODB-0-actors.puml new file mode 100644 index 000000000..e3cd8124d --- /dev/null +++ b/docs/uml/workflow-ODB-0-actors.puml @@ -0,0 +1,32 @@ +@startuml + +box "Off chain actors" #TECHNOLOGY + participant "App/Owner" as App + participant "Dataset/Owner" as Dataset + participant Requester + participant anyone +end box +box "Off chain marketplace" #LightSalmon + participant Marketplace +end box + +box "Smart contracts" #LightBlue + participant IexecPoco1 + participant IexecPoco2 +end box + +box "Off chain workerpool & TEE services" #Bisque + participant Scheduler + participant Worker + participant SMS +end box + +box "Users" + +end box + +skinparam sequenceGroupBodyBackgroundColor transparent + +autonumber + +@enduml diff --git a/docs/uml/workflow-ODB-1-publish-orders.puml b/docs/uml/workflow-ODB-1-publish-orders.puml new file mode 100644 index 000000000..a5125a30e --- /dev/null +++ b/docs/uml/workflow-ODB-1-publish-orders.puml @@ -0,0 +1,26 @@ +@startuml + +activate Marketplace + +activate App +App -> App : sign apporder +App --> Marketplace : publish apporder +deactivate App + +activate Dataset +Dataset -> Dataset : sign datasetorder +Dataset --> Marketplace : publish datasetorder +deactivate Dataset + +activate Scheduler +Scheduler -> Scheduler : checks availability +Scheduler -> Scheduler : sign workerpoolorder +Scheduler --> Marketplace : publish workerpoolorder +deactivate Scheduler + +activate Requester +Requester -> Requester : sign requestorder +Requester --> Marketplace : publish requestorder +deactivate Requester + +@enduml diff --git a/docs/uml/workflow-ODB-2a-match2finalize-nominal.puml b/docs/uml/workflow-ODB-2a-match2finalize-nominal.puml new file mode 100644 index 000000000..445faf339 --- /dev/null +++ b/docs/uml/workflow-ODB-2a-match2finalize-nominal.puml @@ -0,0 +1,75 @@ +@startuml + +activate anyone +anyone --> Marketplace : read orders +activate IexecPoco1 + +group Brokering + anyone --> IexecPoco1 : matchOrders() + activate IexecPoco1 #lightgrey + deactivate anyone + IexecPoco1 <--> IexecPoco1 : emit OrdersMatched() + IexecPoco1 <--> IexecPoco1 : emit SchedulerNotice() +end + +IexecPoco1 o-> Marketplace : watch OrdersMatched() +deactivate Marketplace +activate Scheduler +IexecPoco1 o-> Scheduler : watch SchedulerNotice() +deactivate IexecPoco1 + +loop for all task in bag + + activate IexecPoco2 + Scheduler --> IexecPoco2 : initialize() + activate IexecPoco2 #lightgrey + deactivate Scheduler + IexecPoco2 <--> IexecPoco2 : emit TaskInitialize() + activate Scheduler + IexecPoco2 o-> Scheduler : watch TaskInitialize() + deactivate IexecPoco2 + + group workorder processing + Scheduler -> Scheduler : randomly choose worker + Scheduler -> Scheduler : build signed authorization + activate Worker + Scheduler --> Worker : send signed authorization + + group Worker execution + Worker <--> App : getApp + Worker <--> Dataset : getDataset + Worker -> Worker : execute the asked work โ†’ Results //(raw dataset or uri)// + Worker -> Worker : resultDigest = hash(Results) //(overwriten by iexecConsensus)// + Worker -> Worker : resultHash = hash(taskid | ResultDigest) //(vote)// + Worker -> Worker : resultSeal = hash(address | taskid | ResultDigest) //(proof of knowledge)// + Worker --> IexecPoco2 : contribute() + activate IexecPoco2 #lightgrey + IexecPoco2 <--> IexecPoco2 : emit TaskContribute() + IexecPoco2 o-> Scheduler : watch TaskContribute() + IexecPoco2 <--> IexecPoco2 : emit TaskConsensus() + IexecPoco2 o-> Worker : watch TaskConsensus() + deactivate IexecPoco2 + Worker -> Worker : value to reveal is resultDigest + Worker --> IexecPoco2 : reveal() + activate IexecPoco2 #lightgrey + IexecPoco2 <--> IexecPoco2 : emit TaskReveal() + end + + deactivate Worker + + IexecPoco2 o-> Scheduler : watch TaskReveal() + deactivate IexecPoco2 + Scheduler --> IexecPoco2 : finalize() + activate IexecPoco2 #lightgrey + deactivate Scheduler + IexecPoco2 --> IexecPoco1 : notify + note over IexecPoco1 : RLC reward/seize for actors + deactivate IexecPoco1 + IexecPoco2 <--> IexecPoco2 : emit TaskFinalize() + deactivate IexecPoco2 + deactivate IexecPoco2 + + end +end + +@enduml diff --git a/docs/uml/workflow-ODB-2b-match2finalize-boost.puml b/docs/uml/workflow-ODB-2b-match2finalize-boost.puml new file mode 100644 index 000000000..7400dfe7d --- /dev/null +++ b/docs/uml/workflow-ODB-2b-match2finalize-boost.puml @@ -0,0 +1,51 @@ +@startuml + +activate anyone +anyone --> Marketplace : read orders +activate IexecPoco1 + +group Brokering + anyone --> IexecPoco1 : boost_matchOrder() + activate IexecPoco1 #lightgrey + deactivate anyone + IexecPoco1 <--> IexecPoco1 : emit OrdersMatched() + IexecPoco1 <--> IexecPoco1 : emit SchedulerNotice() +end + +IexecPoco1 o-> Marketplace : watch OrdersMatched() +deactivate Marketplace +activate Scheduler +IexecPoco1 o-> Scheduler : watch SchedulerNotice() +deactivate IexecPoco1 + +loop for all task in bag + + group workorder processing + Scheduler -> Scheduler : randomly choose worker + Scheduler -> Scheduler : build signed authorization + activate Worker + Scheduler --> Worker : send signed authorization + + group Worker execution + Worker <--> App : getApp + Worker <--> Dataset : getDataset + Worker -> Worker : execute the asked work โ†’ Results //(raw dataset or uri)// + Worker -> Worker : resultDigest = hash(Results) //(overwriten by iexecConsensus)// + Worker -> Worker : resultHash = hash(taskid | ResultDigest) //(vote)// + Worker --> IexecPoco2 : boost_pushResult() + activate IexecPoco2 #lightgrey + end + + deactivate Worker + + IexecPoco2 --> IexecPoco1 : notify + note over IexecPoco1 : RLC reward/seize for actors + deactivate IexecPoco1 + IexecPoco2 <--> IexecPoco2 : emit TaskFinalize() + IexecPoco2 o-> Scheduler : watch TaskFinalize() + deactivate IexecPoco2 + + end +end + +@enduml diff --git a/docs/uml/workflow-ODB-2c-match2finalize-nominal-tee.puml b/docs/uml/workflow-ODB-2c-match2finalize-nominal-tee.puml new file mode 100644 index 000000000..54da3389b --- /dev/null +++ b/docs/uml/workflow-ODB-2c-match2finalize-nominal-tee.puml @@ -0,0 +1,80 @@ +@startuml + +== Matching & Execution == +group Order matching + anyone --> Marketplace : read orders + activate anyone + activate IexecPoco1 + anyone --> IexecPoco1 : matchOrders() + deactivate anyone + activate IexecPoco1 #lightgrey + IexecPoco1 <--> IexecPoco1 : emit OrdersMatched() + IexecPoco1 <--> IexecPoco1 : emit SchedulerNotice() +end + +IexecPoco1 o-> Marketplace : watch OrdersMatched() +IexecPoco1 o-> Scheduler : watch SchedulerNotice() +activate Scheduler +deactivate IexecPoco1 + +loop for all task in bag + Scheduler -> Scheduler : instanciate task + activate IexecPoco2 + Scheduler --> IexecPoco2 : initialize() + deactivate Scheduler + activate IexecPoco2 #lightgrey + IexecPoco2 <--> IexecPoco2 : emit TaskInitialize() + IexecPoco2 o-> Scheduler : watch TaskInitialize() + activate Scheduler + deactivate IexecPoco2 + Scheduler -[#red]> SMS : get address of signing key (Ke) for application (Generate key pair if needed) + Scheduler -> Scheduler : randomly choose worker + Scheduler -> Scheduler : build signed authorization + group Worker execution + Scheduler --> Worker : send signed authorization + SMS location + activate Worker + Worker -> App : get app + Worker -> Worker : spinup enclave + activate Worker #lightgrey + Worker -> Dataset : get dataset + group Enclave execution + Worker -[#red]> SMS : request secrets + activate SMS #lightgrey + SMS -> IexecPoco2: verify in deal that enclave is authorized (by owners of secrets) to access secrets + SMS --> Worker: get Kd, Kr & Ke + deactivate SMS + Worker -> Worker : decrypt dataset with Kd + Worker -> Worker : compute task โ†’ Results //(raw dataset or uri)// + Worker -> Worker : encrypt Results with Kr + Worker -> Worker : resultDigest = hash(E(Results) or E(/iexec/consensus.iexec)) + Worker -> Worker : resultHash = hash(taskid | ResultDigest) //(vote)// + Worker -> Worker : resultSeal = hash(address | taskid | ResultDigest) //(proof of knowledge)// + Worker -> Worker : sign Hash and Seal with Ke + end + Worker --> IexecPoco2 : contribute() + activate IexecPoco2 #lightgrey + IexecPoco2 <--> IexecPoco2 : emit TaskContribute() + IexecPoco2 o-> Scheduler : watch TaskContribute() + IexecPoco2 <--> IexecPoco2 : emit TaskConsensus() + IexecPoco2 o-> Worker : watch TaskConsensus() + deactivate IexecPoco2 + Worker -> Worker : value to reveal is resultDigest + Worker --> IexecPoco2 : reveal() + Worker -> Results : push encrypted results + deactivate Worker + activate IexecPoco2 #lightgrey + IexecPoco2 <--> IexecPoco2 : emit TaskReveal() + end + IexecPoco2 o-> Scheduler : watch TaskReveal() + deactivate IexecPoco2 + Scheduler --> IexecPoco2 : finalize() + deactivate Scheduler + activate IexecPoco2 #lightgrey + IexecPoco2 --> IexecPoco1 : notify + note over IexecPoco1 : RLC reward/seize for actors + deactivate IexecPoco1 + IexecPoco2 <--> IexecPoco2 : emit TaskFinalize() + deactivate IexecPoco2 + deactivate IexecPoco2 +end +@enduml diff --git a/hardhat.config.ts b/hardhat.config.ts new file mode 100644 index 000000000..7515e25a8 --- /dev/null +++ b/hardhat.config.ts @@ -0,0 +1,250 @@ +import '@nomicfoundation/hardhat-toolbox'; +import '@nomiclabs/hardhat-truffle5'; +import * as fs from 'fs'; +import 'hardhat-dependency-compiler'; +import 'hardhat-deploy'; +import { HardhatUserConfig, task } from 'hardhat/config'; +import { + HARDHAT_NETWORK_MNEMONIC, + defaultHardhatNetworkParams, + defaultLocalhostNetworkParams, +} from 'hardhat/internal/core/config/default-config'; +import 'solidity-docgen'; +import chainConfig from './config/config.json'; + +const isNativeChainType = chainConfig.chains.default.asset == 'Native'; +const isLocalFork = process.env.LOCAL_FORK == 'true'; +const bellecourBlockscoutUrl = + process.env.BLOCKSCOUT_VERSION == 'v5' + ? 'https://blockscout.bellecour.iex.ec' + : 'https://blockscout-v6.bellecour.iex.ec'; // Use Blockscout v6 by default +const settings = { + optimizer: { + enabled: true, + runs: 200, + }, + outputSelection: { '*': { '*': ['storageLayout'] } }, +}; + +const v8Settings = { + ...settings, + /** + * Enable Intermediate Representation (IR) to reduce `Stack too deep` occurrences + * at compile time (e.g.: too many local variables in `matchOrdersBoost`). + * https://hardhat.org/hardhat-runner/docs/reference/solidity-support#support-for-ir-based-codegen + */ + viaIR: true, + optimizer: { + ...settings.optimizer, + details: { + yul: true, + yulDetails: { + optimizerSteps: 'u', + }, + }, + }, + /** + * @dev The 0.8.20 compiler switches the default target EVM version to Shanghai. + * At this time, the iExec Bellecour blockchain does not support new OPCODES + * brought by the Shanghai fork, hence the target must be lowered. + */ + evmVersion: 'berlin', +}; + +/** + * @dev Native mode. As close as possible to the iExec Bellecour blockchain. + * @note Any fresh version of Hardhat uses for its default + * hardhat network a configuration from a recent Ethereum + * fork. EIPs brought by such recent fork are not necessarily + * supported by the iExec Bellecour blockchain. + */ +const bellecourNetworkConfig = { + hardfork: 'berlin', // No EIP-1559 before London fork + gasPrice: 0, + blockGasLimit: 6_700_000, +}; + +const config: HardhatUserConfig = { + solidity: { + compilers: [ + { version: '0.8.21', settings: v8Settings }, // PoCo Boost (and ENS contracts >=0.8.4) + { version: '0.6.12', settings }, // PoCo contracts + { version: '0.4.11', settings }, // RLC contracts + ], + }, + networks: { + hardhat: { + accounts: { + mnemonic: process.env.MNEMONIC || HARDHAT_NETWORK_MNEMONIC, + }, + ...((isNativeChainType || isLocalFork) && bellecourNetworkConfig), + ...(isLocalFork && { + forking: { + url: 'https://bellecour.iex.ec', + }, + chainId: 134, + }), + }, + 'external-hardhat': { + ...defaultHardhatNetworkParams, + ...defaultLocalhostNetworkParams, + accounts: { + mnemonic: process.env.MNEMONIC || HARDHAT_NETWORK_MNEMONIC, + }, + ...((isNativeChainType || isLocalFork) && bellecourNetworkConfig), + ...(isLocalFork && { + accounts: 'remote', // Override defaults accounts for impersonation + chainId: 134, + }), + }, + 'dev-native': { + chainId: 65535, + url: process.env.DEV_NODE || 'http://localhost:8545', + accounts: { + mnemonic: process.env.MNEMONIC || '', + }, + gasPrice: 0, // Get closer to Bellecour network + }, + 'dev-token': { + chainId: 65535, + url: process.env.DEV_NODE || 'http://localhost:8545', + accounts: { + mnemonic: process.env.MNEMONIC || '', + }, + // When deploying on a blockchain with EIP-1559 enabled and + // force-sealing disabled, deployment gets stuck if gasPrice is + // not manually set. Other approaches might be considered here. + gasPrice: 8_000_000_000, // 8 Gwei + }, + // live networks + mainnet: { + chainId: 1, + url: process.env.MAINNET_NODE || '', + accounts: { + mnemonic: process.env.PROD_MNEMONIC || '', + }, + }, + goerli: { + chainId: 5, + url: process.env.GOERLI_NODE || '', + accounts: { + mnemonic: process.env.MNEMONIC || '', + }, + }, + viviani: { + chainId: 133, + url: 'https://viviani.iex.ec', + accounts: { + mnemonic: process.env.MNEMONIC || '', + }, + gasPrice: 0, + gas: 6700000, + }, + bellecour: { + chainId: 134, + url: 'https://bellecour.iex.ec', + accounts: [ + process.env.PROD_PRIVATE_KEY || + '0x0000000000000000000000000000000000000000000000000000000000000000', + ], + hardfork: 'berlin', // No EIP-1559 before London fork + gasPrice: 0, + gas: 6700000, + verify: { + etherscan: { + apiUrl: bellecourBlockscoutUrl, + apiKey: '<>', + }, + }, + }, + }, + etherscan: { + apiKey: { + mainnet: process.env.ETHERSCAN_API_KEY || '', + viviani: 'nothing', // a non-empty string is needed by the plugin. + bellecour: 'nothing', // a non-empty string is needed by the plugin. + }, + customChains: [ + { + network: 'viviani', + chainId: 133, + urls: { + apiURL: 'https://blockscout.viviani.iex.ec/api', + browserURL: 'https://blockscout.viviani.iex.ec/', + }, + }, + { + network: 'bellecour', + chainId: 134, + urls: { + apiURL: `${bellecourBlockscoutUrl}/api`, + browserURL: bellecourBlockscoutUrl, + }, + }, + ], + }, + typechain: { + outDir: 'typechain', + }, + dependencyCompiler: { + paths: [ + 'rlc-faucet-contract/contracts/RLC.sol', + '@iexec/solidity/contracts/ERC1538/ERC1538Modules/ERC1538Update.sol', + '@iexec/solidity/contracts/ERC1538/ERC1538Modules/ERC1538Query.sol', + '@iexec/solidity/contracts/ERC1538/ERC1538Proxy/ERC1538Proxy.sol', + // ENS + '@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol', + '@ensdomains/ens-contracts/contracts/registry/FIFSRegistrar.sol', + '@ensdomains/ens-contracts/contracts/registry/ReverseRegistrar.sol', + '@ensdomains/ens-contracts/contracts/resolvers/PublicResolver.sol', + // Used as mock or fake in UTs + '@openzeppelin/contracts-v5/interfaces/IERC1271.sol', + // Used in deployment + '@amxx/factory/contracts/v6/GenericFactory.sol', + ], + keep: true, // Slither requires compiled dependencies + }, + docgen: { + outputDir: 'docs/solidity', + templates: 'docs/solidity/templates', + exclude: [ + 'external', + 'modules/delegates/IexecAccessorsABILegacyDelegate.sol', // not relevant + 'modules/delegates/IexecEscrowTokenSwapDelegate.sol', // not relevant + 'modules/delegates/SignatureVerifier.sol', // contains only internal/private + 'modules/delegates/SignatureVerifier.v8.sol', + 'modules/interfaces', // interesting for events but too much doc duplication if enabled + 'registries', // ignore them for now + 'tools', + 'IexecInterfaceNativeABILegacy.sol', // ignore interfaces + 'IexecInterfaceTokenABILegacy.sol', + 'IexecInterfaceNative.sol', + 'IexecInterfaceToken.sol', + 'Store.sol', // almost empty + 'Store.v8.sol', + ], + }, + mocha: { timeout: 50000 }, +}; + +/** + * Ignore doc generation of contracts compiled with solc@0.4 (unsupported by docgen). + */ +task('docgen').setAction(async (taskArgs, hre, runSuper) => { + const ignoredSuffix = '.docgen-ignored'; + const ignoredPaths: string[] = []; + for (const path of await hre.artifacts.getBuildInfoPaths()) { + const solcVersion: string = JSON.parse(fs.readFileSync(path, 'utf8')).solcVersion; + if (solcVersion.startsWith('0.4')) { + fs.renameSync(path, path + ignoredSuffix); // mark as docgen ignored + ignoredPaths.push(path); + } + } + await runSuper(taskArgs).finally(() => { + for (const path of ignoredPaths) { + fs.renameSync(path + ignoredSuffix, path); // restore build info as before + } + }); +}); + +export default config; diff --git a/makefile b/makefile deleted file mode 100644 index e25f56aee..000000000 --- a/makefile +++ /dev/null @@ -1,18 +0,0 @@ -# MINIFICATION -JQN = jqn -PATH_MAIN = ./build/contracts/ -PATH_MIN = ./build/contracts-min/ -OBJECTS = $(patsubst $(PATH_MAIN)%.json, %, $(wildcard $(PATH_MAIN)*.json)) - -.PHONY: minify - -all: - @echo "Usage: make [minify]" - -minify: $(OBJECTS) - -$(OBJECTS): % : $(PATH_MAIN)%.json makefile - @mkdir -p $(PATH_MIN) - @echo -n "Minification of $@.json ..." - @cat $< | $(JQN) 'pick(["abi","networks"])' --color=false -j > $(PATH_MIN)/$@.json - @echo " done" diff --git a/migrations/1001_fillwallets.js b/migrations/1001_fillwallets.js deleted file mode 100644 index e41339b71..000000000 --- a/migrations/1001_fillwallets.js +++ /dev/null @@ -1,66 +0,0 @@ -// CONFIG -const CONFIG = require("../config/config.json"); -const ACCOUNTS = require("../config/accounts.json"); -// Token -const RLC = artifacts.require("rlc-faucet-contract/RLC"); -// ERC1538 core & delegates -const ERC1538Proxy = artifacts.require("@iexec/solidity/ERC1538Proxy"); -// Interface -const IexecInterfaceToken = artifacts.require("IexecInterfaceToken"); -const IexecInterfaceNative = artifacts.require("IexecInterfaceNative"); - -/***************************************************************************** - * Main * - *****************************************************************************/ -module.exports = async function (deployer, network, accounts) { - console.log("# web3 version:", web3.version); - const chainid = await web3.eth.net.getId(); - const chaintype = await web3.eth.net.getNetworkType(); - console.log("Chainid is:", chainid); - console.log("Chaintype is:", chaintype); - console.log("Deployer is:", accounts[0]); - - const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; - - //only for standard private chains - if (chainid > 1000 && !process.env.KYC) { - let IexecInterfaceInstance; - const IexecProxyInstance = await ERC1538Proxy.deployed(); - const totalAmount = ACCOUNTS.reduce( - (acc, { amount }) => acc.add(web3.utils.toBN(amount)), - web3.utils.toBN(0) - ); - - // deposit - console.log("Depositing " + totalAmount); - switch (deploymentOptions.asset) { - case "Token": - IexecInterfaceInstance = await IexecInterfaceToken.at( - IexecProxyInstance.address - ); - const RLCInstance = await RLC.deployed(); - await RLCInstance.approveAndCall( - IexecInterfaceInstance.address, - totalAmount, - "0x" - ); - break; - case "Native": - IexecInterfaceInstance = await IexecInterfaceNative.at( - IexecProxyInstance.address - ); - await IexecInterfaceInstance.deposit({ - from: accounts[0], - value: totalAmount.mul(web3.utils.toBN(10 ** 9)), - }); - break; - } - - // all transfers - for (account of ACCOUNTS) { - const { address, amount } = account - console.log("Transferring for address " + address + ": " + amount); - await IexecInterfaceInstance.transfer(address, amount); - } - } -}; diff --git a/migrations/1_initial_migration.js b/migrations/1_initial_migration.js index 5ad2d09a8..b71efe29d 100644 --- a/migrations/1_initial_migration.js +++ b/migrations/1_initial_migration.js @@ -1,21 +1,9 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 -var Migrations = artifacts.require("Migrations"); +const deployer = require('../scripts/hardhat-truffle-utils'); +var Migrations = artifacts.require('Migrations'); -module.exports = function(deployer) { - deployer.deploy(Migrations); +module.exports = async function () { + await deployer.deploy(Migrations); }; diff --git a/migrations/3_deploy_token.js b/migrations/3_deploy_token.js index f984e48b2..30c774d02 100644 --- a/migrations/3_deploy_token.js +++ b/migrations/3_deploy_token.js @@ -1,69 +1,35 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const deployer = require('../scripts/hardhat-truffle-utils'); // CONFIG -const CONFIG = require('../config/config.json') +const CONFIG = require('../config/config.json'); // Token -var RLC = artifacts.require('rlc-faucet-contract/RLC') -var ERLCTokenSwap = artifacts.require('@iexec/erlc/ERLCTokenSwap') +var RLC = artifacts.require('rlc-faucet-contract/RLC'); /***************************************************************************** * Main * *****************************************************************************/ -module.exports = async function(deployer, network, accounts) -{ - console.log('# web3 version:', web3.version); - const chainid = await web3.eth.net.getId(); - const chaintype = await web3.eth.net.getNetworkType(); - console.log('Chainid is:', chainid); - console.log('Chaintype is:', chaintype); - console.log('Deployer is:', accounts[0]); +module.exports = async function (accounts) { + console.log('# web3 version:', web3.version); + const chainid = await web3.eth.net.getId(); + const chaintype = await web3.eth.net.getNetworkType(); + console.log('Chainid is:', chainid); + console.log('Chaintype is:', chaintype); + console.log('Deployer is:', accounts[0]); - const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; - deploymentOptions.v5.usekyc = !!process.env.KYC; + const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; - switch (deploymentOptions.asset) - { - case 'Token': - if (deploymentOptions.token) - { - RLC.address = deploymentOptions.token; - } - else - { - RLC.isDeployed() || await deployer.deploy(RLC); - } - if (deploymentOptions.v5.usekyc) - { - if (deploymentOptions.etoken) - { - ERLCTokenSwap.address = deploymentOptions.etoken; - } - else - { - ERLCTokenSwap.isDeployed() || await deployer.deploy(ERLCTokenSwap, (await RLC.deployed()).address, 'iExec ERLC Token', 'ERLC', 0, [ accounts[0] ], []); - } - } - break; + switch (deploymentOptions.asset) { + case 'Token': + if (deploymentOptions.token) { + RLC.setAsDeployed(await RLC.at(deploymentOptions.token)); + } else { + RLC.isDeployed() || (await deployer.deploy(RLC)); + } + break; - case 'Native': - if (deploymentOptions.v5.usekyc) - { - throw 'ERROR: KYC is not supported in native mode.' - } - break; - } + case 'Native': + break; + } }; diff --git a/migrations/4_deploy_core.js b/migrations/4_deploy_core.js index 1817e3dd3..7d360154e 100644 --- a/migrations/4_deploy_core.js +++ b/migrations/4_deploy_core.js @@ -1,261 +1,243 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 -const assert = require('assert') +const deployer = require('../scripts/hardhat-truffle-utils'); +const assert = require('assert'); // CONFIG -const CONFIG = require('../config/config.json') +const CONFIG = require('../config/config.json'); // FactoryDeployer -const { TruffleDeployer: Deployer } = require('../utils/FactoryDeployer') +const { TruffleDeployer: Deployer } = require('../utils/FactoryDeployer'); +const { getFunctionSignatures } = require('./utils/getFunctionSignatures'); // Token -var RLC = artifacts.require('rlc-faucet-contract/RLC') -var ERLCTokenSwap = artifacts.require('@iexec/erlc/ERLCTokenSwap') +var RLC = artifacts.require('rlc-faucet-contract/RLC'); // ERC1538 core & delegates -var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy') -var ERC1538Update = artifacts.require('@iexec/solidity/ERC1538UpdateDelegate') -var ERC1538Query = artifacts.require('@iexec/solidity/ERC1538QueryDelegate') +var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy'); +var ERC1538Update = artifacts.require('@iexec/solidity/ERC1538UpdateDelegate'); +var ERC1538Query = artifacts.require('@iexec/solidity/ERC1538QueryDelegate'); // Libraries -var IexecLibOrders = artifacts.require('IexecLibOrders_v5') +var IexecLibOrders = artifacts.require('IexecLibOrders_v5'); // Interface -var IexecInterfaceNative = artifacts.require('IexecInterfaceNative') -var IexecInterfaceToken = artifacts.require('IexecInterfaceToken') +var IexecInterfaceNative = artifacts.require('IexecInterfaceNative'); +var IexecInterfaceToken = artifacts.require('IexecInterfaceToken'); // Delegates -var IexecAccessors = artifacts.require('IexecAccessorsDelegate') -var IexecAccessorsABILegacy = artifacts.require('IexecAccessorsABILegacyDelegate') -var IexecCategoryManager = artifacts.require('IexecCategoryManagerDelegate') -var IexecERC20 = artifacts.require('IexecERC20Delegate') -var IexecERC20KYC = artifacts.require('IexecERC20DelegateKYC') -var IexecEscrowNative = artifacts.require('IexecEscrowNativeDelegate') -var IexecEscrowToken = artifacts.require('IexecEscrowTokenDelegate') -var IexecEscrowTokenKYC = artifacts.require('IexecEscrowTokenDelegateKYC') -var IexecEscrowTokenSwap = artifacts.require('IexecEscrowTokenSwapDelegate') -var IexecMaintenance = artifacts.require('IexecMaintenanceDelegate') -var IexecMaintenanceExtra = artifacts.require('IexecMaintenanceExtraDelegate') -var IexecOrderManagement = artifacts.require('IexecOrderManagementDelegate') -var IexecPoco1 = artifacts.require('IexecPoco1Delegate') -var IexecPoco1KYC = artifacts.require('IexecPoco1DelegateKYC') -var IexecPoco2 = artifacts.require('IexecPoco2Delegate') -var IexecPoco2KYC = artifacts.require('IexecPoco2DelegateKYC') -var IexecRelay = artifacts.require('IexecRelayDelegate') -var ENSIntegration = artifacts.require('ENSIntegrationDelegate') +var IexecAccessors = artifacts.require('IexecAccessorsDelegate'); +var IexecAccessorsABILegacy = artifacts.require('IexecAccessorsABILegacyDelegate'); +var IexecCategoryManager = artifacts.require('IexecCategoryManagerDelegate'); +var IexecERC20 = artifacts.require('IexecERC20Delegate'); +var IexecEscrowNative = artifacts.require('IexecEscrowNativeDelegate'); +var IexecEscrowToken = artifacts.require('IexecEscrowTokenDelegate'); +var IexecEscrowTokenSwap = artifacts.require('IexecEscrowTokenSwapDelegate'); +var IexecMaintenance = artifacts.require('IexecMaintenanceDelegate'); +var IexecMaintenanceExtra = artifacts.require('IexecMaintenanceExtraDelegate'); +var IexecOrderManagement = artifacts.require('IexecOrderManagementDelegate'); +var IexecPoco1 = artifacts.require('IexecPoco1Delegate'); +var IexecPoco2 = artifacts.require('IexecPoco2Delegate'); +var IexecRelay = artifacts.require('IexecRelayDelegate'); +var ENSIntegration = artifacts.require('ENSIntegrationDelegate'); // Other contracts -var AppRegistry = artifacts.require('AppRegistry') -var DatasetRegistry = artifacts.require('DatasetRegistry') -var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry') +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); const BYTES32_ZERO = '0x0000000000000000000000000000000000000000000000000000000000000000'; const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000'; -/***************************************************************************** - * Tools * - *****************************************************************************/ -function getSerializedObject(entry) -{ - return (entry.type == 'tuple') - ? `(${entry.components.map(getSerializedObject).join(',')})` - : entry.type; -} - -function getFunctionSignatures(abi) -{ - return [ - ...abi - .filter(entry => entry.type == 'receive') - .map(entry => 'receive;'), - ...abi - .filter(entry => entry.type == 'fallback') - .map(entry => 'fallback;'), - ...abi - .filter(entry => entry.type == 'function') - .map(entry => `${entry.name}(${entry.inputs.map(getSerializedObject).join(',')});`), - ].filter(Boolean).join(''); -} - /***************************************************************************** * Main * *****************************************************************************/ -module.exports = async function(deployer, network, accounts) -{ - console.log('# web3 version:', web3.version); - const chainid = await web3.eth.net.getId(); - const chaintype = await web3.eth.net.getNetworkType(); - console.log('Chainid is:', chainid); - console.log('Chaintype is:', chaintype); - console.log('Deployer is:', accounts[0]); - - /* ------------------------- Existing deployment ------------------------- */ - const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; - deploymentOptions.v5.usekyc = !!process.env.KYC; - - const factoryDeployer = deploymentOptions.v5.usefactory && new Deployer(web3, accounts[0]); - const salt = process.env.SALT || deploymentOptions.v5.salt; - const libraries = [ IexecLibOrders ]; - - /* ------------------------ Deploy & link library ------------------------ */ - if (deploymentOptions.v5.usefactory) - { - for (library of libraries) { - await factoryDeployer.deploy(library); - } - } - else - { - await deployer.deploy(IexecLibOrders); - await deployer.link(IexecLibOrders, IexecPoco1); - await deployer.link(IexecLibOrders, IexecMaintenance); - await deployer.link(IexecLibOrders, IexecOrderManagement); - } - - /* ---------------------------- Modules list ----------------------------- */ - contracts = [ - ERC1538Update, - ERC1538Query, - IexecAccessors, - IexecAccessorsABILegacy, - IexecCategoryManager, - deploymentOptions.v5.usekyc ? IexecERC20KYC : IexecERC20, - deploymentOptions.asset == 'Native' && IexecEscrowNative, - deploymentOptions.asset == 'Token' && deploymentOptions.v5.usekyc && IexecEscrowTokenKYC, - deploymentOptions.asset == 'Token' && !deploymentOptions.v5.usekyc && IexecEscrowToken, - deploymentOptions.asset == 'Token' && !deploymentOptions.v5.usekyc && deploymentOptions.uniswap && IexecEscrowTokenSwap, - IexecMaintenance, - IexecOrderManagement, - deploymentOptions.v5.usekyc ? IexecPoco1KYC : IexecPoco1, - deploymentOptions.v5.usekyc ? IexecPoco2KYC : IexecPoco2, - IexecRelay, - ENSIntegration, - chainid != 1 && IexecMaintenanceExtra, - ] - .filter(Boolean); - - /* --------------------------- Deploy modules ---------------------------- */ - for (module of contracts) { - deploymentOptions.v5.usefactory ? await factoryDeployer.deploy(module, { libraries }) : await deployer.deploy(module); - } - - /* ---------------------------- Deploy proxy ----------------------------- */ - if (deploymentOptions.v5.usefactory) - { - await factoryDeployer.deploy( - ERC1538Proxy, - (await ERC1538Update.deployed()).address, - { - call: web3.eth.abi.encodeFunctionCall(ERC1538Proxy._json.abi.find(e => e.name == 'transferOwnership'), [ accounts[0] ]), - salt: process.env.PROXY_SALT || salt - } - ); - } - else - { - await deployer.deploy(ERC1538Proxy, (await ERC1538Update.deployed()).address); - } - ERC1538 = await ERC1538Update.at((await ERC1538Proxy.deployed()).address); - console.log(`IexecInstance deployed at address: ${ERC1538.address}`); - - /* --------------------------- Setup modules ---------------------------- */ - for (module of contracts.filter(module => module != ERC1538Update)) { - console.log(`ERC1538 link: ${module.contractName}`); - await ERC1538.updateContract( - (await module.deployed()).address, - getFunctionSignatures(module.abi), - 'Linking ' + module.contractName - ); - } - - /* --------------------------- Configure Stack --------------------------- */ - IexecInterfaceInstance = await IexecInterfaceToken.at(ERC1538.address); - - if (deploymentOptions.v5.AppRegistry) AppRegistry.address = deploymentOptions.v5.AppRegistry; - if (deploymentOptions.v5.DatasetRegistry) DatasetRegistry.address = deploymentOptions.v5.DatasetRegistry; - if (deploymentOptions.v5.WorkerpoolRegistry) WorkerpoolRegistry.address = deploymentOptions.v5.WorkerpoolRegistry; - if (deploymentOptions.v5.usefactory) - { - AppRegistry.isDeployed() || await factoryDeployer.deploy(AppRegistry, { call: web3.eth.abi.encodeFunctionCall( AppRegistry._json.abi.find(e => e.name == 'transferOwnership'), [ accounts[0] ]), salt }); - DatasetRegistry.isDeployed() || await factoryDeployer.deploy(DatasetRegistry, { call: web3.eth.abi.encodeFunctionCall( DatasetRegistry._json.abi.find(e => e.name == 'transferOwnership'), [ accounts[0] ]), salt }); - WorkerpoolRegistry.isDeployed() || await factoryDeployer.deploy(WorkerpoolRegistry, { call: web3.eth.abi.encodeFunctionCall(WorkerpoolRegistry._json.abi.find(e => e.name == 'transferOwnership'), [ accounts[0] ]), salt }); - } - else - { - AppRegistry.isDeployed() || await deployer.deploy(AppRegistry); - DatasetRegistry.isDeployed() || await deployer.deploy(DatasetRegistry); - WorkerpoolRegistry.isDeployed() || await deployer.deploy(WorkerpoolRegistry); - } - - switch (deploymentOptions.asset) - { - case 'Token': - if (deploymentOptions.v5.usekyc) - { - TokenInstance = await ERLCTokenSwap.deployed(); - } - else - { - TokenInstance = await RLC.deployed(); - } - break; - - case 'Native': - TokenInstance = { address: ADDRESS_ZERO } - break; - } - - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - console.log(`AppRegistry deployed at address: ${AppRegistryInstance.address}`); - console.log(`DatasetRegistry deployed at address: ${DatasetRegistryInstance.address}`); - console.log(`WorkerpoolRegistry deployed at address: ${WorkerpoolRegistryInstance.address}`); - console.log(`Using token: ${TokenInstance.address}`); - - const AppRegistryInitialized = await AppRegistryInstance.initialized(); - const DatasetRegistryInitialized = await DatasetRegistryInstance.initialized(); - const WorkerpoolRegistryInitialized = await WorkerpoolRegistryInstance.initialized(); - const IexecInterfaceInitialized = await IexecInterfaceInstance.eip712domain_separator() != BYTES32_ZERO; - - !AppRegistryInitialized && await AppRegistryInstance.initialize(deploymentOptions.v3.AppRegistry || ADDRESS_ZERO); - !DatasetRegistryInitialized && await DatasetRegistryInstance.initialize(deploymentOptions.v3.DatasetRegistry || ADDRESS_ZERO); - !WorkerpoolRegistryInitialized && await WorkerpoolRegistryInstance.initialize(deploymentOptions.v3.WorkerpoolRegistry || ADDRESS_ZERO); - !AppRegistryInitialized && await AppRegistryInstance.setBaseURI(`https://nfts-metadata.iex.ec/app/${chainid}/`); - !DatasetRegistryInitialized && await DatasetRegistryInstance.setBaseURI(`https://nfts-metadata.iex.ec/dataset/${chainid}/`); - !WorkerpoolRegistryInitialized && await WorkerpoolRegistryInstance.setBaseURI(`https://nfts-metadata.iex.ec/workerpool/${chainid}/`); - !IexecInterfaceInitialized && await IexecInterfaceInstance.configure( - TokenInstance.address, - deploymentOptions.v5.usekyc ? 'Staked eRLC' : 'Staked RLC', - deploymentOptions.v5.usekyc ? 'SeRLC' : 'SRLC', - 9, // TODO: generic ? - AppRegistryInstance.address, - DatasetRegistryInstance.address, - WorkerpoolRegistryInstance.address, - ADDRESS_ZERO - ); - - /* ----------------------------- Categories ------------------------------ */ - - const catCountBefore = await IexecInterfaceInstance.countCategory() - await CONFIG.categories.slice(catCountBefore.toNumber()).reduce( - async (promise, category) => { - await promise; - await IexecInterfaceInstance.createCategory(category.name, JSON.stringify(category.description), category.workClockTimeRef); - }, - Promise.resolve() - ); - - const catCountAfter = await IexecInterfaceInstance.countCategory(); - console.log(`countCategory is now: ${catCountAfter}`); - (await Promise.all( - Array(catCountAfter.toNumber()).fill().map((_, i) => IexecInterfaceInstance.viewCategory(i)) - )) - .forEach((category, i) => console.log([ 'category', i, ':', ...category ].join(' '))); +module.exports = async function (accounts) { + console.log('# web3 version:', web3.version); + const chainid = await web3.eth.net.getId(); + const chaintype = await web3.eth.net.getNetworkType(); + console.log('Chainid is:', chainid); + console.log('Chaintype is:', chaintype); + console.log('Deployer is:', accounts[0]); + + /* ------------------------- Existing deployment ------------------------- */ + const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; + + const factoryDeployer = deploymentOptions.v5.usefactory && new Deployer(web3, accounts[0]); + const salt = process.env.SALT || deploymentOptions.v5.salt; + const libraries = [IexecLibOrders]; + + /* ------------------------ Deploy & link library ------------------------ */ + if (deploymentOptions.v5.usefactory) { + for (library of libraries) { + await factoryDeployer.deploy(library); + } + } else { + const iexecLibOrders = await deployer.deploy(IexecLibOrders); + await deployer.link(iexecLibOrders, IexecPoco1); + await deployer.link(iexecLibOrders, IexecMaintenance); + await deployer.link(iexecLibOrders, IexecOrderManagement); + } + + /* ---------------------------- Modules list ----------------------------- */ + contracts = [ + ERC1538Update, + ERC1538Query, + IexecAccessors, + IexecAccessorsABILegacy, + IexecCategoryManager, + IexecERC20, + deploymentOptions.asset == 'Native' && IexecEscrowNative, + deploymentOptions.asset == 'Token' && IexecEscrowToken, + deploymentOptions.asset == 'Token' && deploymentOptions.uniswap && IexecEscrowTokenSwap, + IexecMaintenance, + IexecOrderManagement, + IexecPoco1, + IexecPoco2, + IexecRelay, + ENSIntegration, + chainid != 1 && IexecMaintenanceExtra, + ].filter(Boolean); + + /* --------------------------- Deploy modules ---------------------------- */ + for (module of contracts) { + deploymentOptions.v5.usefactory + ? await factoryDeployer.deploy(module, { libraries }) + : await deployer.deploy(module); + } + + /* ---------------------------- Deploy proxy ----------------------------- */ + if (deploymentOptions.v5.usefactory) { + await factoryDeployer.deploy(ERC1538Proxy, (await ERC1538Update.deployed()).address, { + call: web3.eth.abi.encodeFunctionCall( + ERC1538Proxy._json.abi.find((e) => e.name == 'transferOwnership'), + [accounts[0]], + ), + salt: process.env.PROXY_SALT || salt, + }); + } else { + await deployer.deploy(ERC1538Proxy, (await ERC1538Update.deployed()).address); + } + ERC1538 = await ERC1538Update.at((await ERC1538Proxy.deployed()).address); + console.log(`IexecInstance deployed at address: ${ERC1538.address}`); + + /* --------------------------- Setup modules ---------------------------- */ + for (module of contracts.filter((module) => module != ERC1538Update)) { + console.log(`ERC1538 link: ${module.contractName}`); + await ERC1538.updateContract( + (await module.deployed()).address, + getFunctionSignatures(module.abi), + 'Linking ' + module.contractName, + ); + } + + /* --------------------------- Configure Stack --------------------------- */ + IexecInterfaceInstance = await IexecInterfaceToken.at(ERC1538.address); + + if (deploymentOptions.v5.AppRegistry) AppRegistry.address = deploymentOptions.v5.AppRegistry; + if (deploymentOptions.v5.DatasetRegistry) + DatasetRegistry.address = deploymentOptions.v5.DatasetRegistry; + if (deploymentOptions.v5.WorkerpoolRegistry) + WorkerpoolRegistry.address = deploymentOptions.v5.WorkerpoolRegistry; + if (deploymentOptions.v5.usefactory) { + AppRegistry.isDeployed() || + (await factoryDeployer.deploy(AppRegistry, { + call: web3.eth.abi.encodeFunctionCall( + AppRegistry._json.abi.find((e) => e.name == 'transferOwnership'), + [accounts[0]], + ), + salt, + })); + DatasetRegistry.isDeployed() || + (await factoryDeployer.deploy(DatasetRegistry, { + call: web3.eth.abi.encodeFunctionCall( + DatasetRegistry._json.abi.find((e) => e.name == 'transferOwnership'), + [accounts[0]], + ), + salt, + })); + WorkerpoolRegistry.isDeployed() || + (await factoryDeployer.deploy(WorkerpoolRegistry, { + call: web3.eth.abi.encodeFunctionCall( + WorkerpoolRegistry._json.abi.find((e) => e.name == 'transferOwnership'), + [accounts[0]], + ), + salt, + })); + } else { + AppRegistry.isDeployed() || (await deployer.deploy(AppRegistry)); + DatasetRegistry.isDeployed() || (await deployer.deploy(DatasetRegistry)); + WorkerpoolRegistry.isDeployed() || (await deployer.deploy(WorkerpoolRegistry)); + } + + switch (deploymentOptions.asset) { + case 'Token': + TokenInstance = await RLC.deployed(); + break; + + case 'Native': + TokenInstance = { address: ADDRESS_ZERO }; + break; + } + + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + console.log(`AppRegistry deployed at address: ${AppRegistryInstance.address}`); + console.log(`DatasetRegistry deployed at address: ${DatasetRegistryInstance.address}`); + console.log(`WorkerpoolRegistry deployed at address: ${WorkerpoolRegistryInstance.address}`); + console.log(`Using token: ${TokenInstance.address}`); + + const AppRegistryInitialized = await AppRegistryInstance.initialized(); + const DatasetRegistryInitialized = await DatasetRegistryInstance.initialized(); + const WorkerpoolRegistryInitialized = await WorkerpoolRegistryInstance.initialized(); + const IexecInterfaceInitialized = + (await IexecInterfaceInstance.eip712domain_separator()) != BYTES32_ZERO; + + !AppRegistryInitialized && + (await AppRegistryInstance.initialize(deploymentOptions.v3.AppRegistry || ADDRESS_ZERO)); + !DatasetRegistryInitialized && + (await DatasetRegistryInstance.initialize( + deploymentOptions.v3.DatasetRegistry || ADDRESS_ZERO, + )); + !WorkerpoolRegistryInitialized && + (await WorkerpoolRegistryInstance.initialize( + deploymentOptions.v3.WorkerpoolRegistry || ADDRESS_ZERO, + )); + !AppRegistryInitialized && + (await AppRegistryInstance.setBaseURI(`https://nfts-metadata.iex.ec/app/${chainid}/`)); + !DatasetRegistryInitialized && + (await DatasetRegistryInstance.setBaseURI( + `https://nfts-metadata.iex.ec/dataset/${chainid}/`, + )); + !WorkerpoolRegistryInitialized && + (await WorkerpoolRegistryInstance.setBaseURI( + `https://nfts-metadata.iex.ec/workerpool/${chainid}/`, + )); + !IexecInterfaceInitialized && + (await IexecInterfaceInstance.configure( + TokenInstance.address, + 'Staked RLC', + 'SRLC', + 9, // TODO: generic ? + AppRegistryInstance.address, + DatasetRegistryInstance.address, + WorkerpoolRegistryInstance.address, + ADDRESS_ZERO, + )); + + /* ----------------------------- Categories ------------------------------ */ + + const catCountBefore = await IexecInterfaceInstance.countCategory(); + await CONFIG.categories.slice(catCountBefore.toNumber()).reduce(async (promise, category) => { + await promise; + await IexecInterfaceInstance.createCategory( + category.name, + JSON.stringify(category.description), + category.workClockTimeRef, + ); + }, Promise.resolve()); + + const catCountAfter = await IexecInterfaceInstance.countCategory(); + console.log(`countCategory is now: ${catCountAfter}`); + ( + await Promise.all( + Array(catCountAfter.toNumber()) + .fill() + .map((_, i) => IexecInterfaceInstance.viewCategory(i)), + ) + ).forEach((category, i) => console.log(['category', i, ':', ...category].join(' '))); }; diff --git a/migrations/5_deploy_ens.js b/migrations/5_deploy_ens.js index af3458326..f6c9d9ec5 100644 --- a/migrations/5_deploy_ens.js +++ b/migrations/5_deploy_ens.js @@ -1,171 +1,179 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -const assert = require('assert') +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +const deployer = require('../scripts/hardhat-truffle-utils'); +const assert = require('assert'); // CONFIG -const CONFIG = require('../config/config.json') +const CONFIG = require('../config/config.json'); // ENS -var ENSRegistry = artifacts.require('@ensdomains/ens/ENSRegistry') -var FIFSRegistrar = artifacts.require('@ensdomains/ens/FIFSRegistrar') -var ReverseRegistrar = artifacts.require('@ensdomains/ens/ReverseRegistrar.sol') -var PublicResolver = artifacts.require('@ensdomains/resolver/PublicResolver') +var ENSRegistry = artifacts.require('@ensdomains/ens-contracts/contracts/registry/ENSRegistry'); +var FIFSRegistrar = artifacts.require('@ensdomains/ens-contracts/contracts/registry/FIFSRegistrar'); +var ReverseRegistrar = artifacts.require( + '@ensdomains/ens-contracts/contracts/registry/ReverseRegistrar', +); +var PublicResolver = artifacts.require( + '@ensdomains/ens-contracts/contracts/resolvers/PublicResolver', +); // Core -var RLC = artifacts.require('rlc-faucet-contract/RLC') -var ERLCTokenSwap = artifacts.require('@iexec/erlc/ERLCTokenSwap') -var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy') -var IexecInterfaceNative = artifacts.require('IexecInterfaceNative') -var IexecInterfaceToken = artifacts.require('IexecInterfaceToken') -var AppRegistry = artifacts.require('AppRegistry') -var DatasetRegistry = artifacts.require('DatasetRegistry') -var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry') +var RLC = artifacts.require('rlc-faucet-contract/RLC'); +var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy'); +var IexecInterfaceNative = artifacts.require('IexecInterfaceNative'); +var IexecInterfaceToken = artifacts.require('IexecInterfaceToken'); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); /***************************************************************************** * Main * *****************************************************************************/ -module.exports = async function(deployer, network, accounts) -{ - console.log('# web3 version:', web3.version); - const chainid = await web3.eth.net.getId(); - const chaintype = await web3.eth.net.getNetworkType(); - console.log('Chainid is:', chainid); - console.log('Chaintype is:', chaintype); - console.log('Deployer is:', accounts[0]); - - /* ------------------------- Existing deployment ------------------------- */ - const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; - deploymentOptions.v5.usekyc = !!process.env.KYC; - - /* ----------------------------- Deploy ENS ------------------------------ */ - if (chainid > 1000) // skip for mainnet and testnet use - { - var ens = null; - var resolver = null; - var registrars = {}; - - function labelhash(label) - { - return web3.utils.keccak256(label.toLowerCase()); - } - - function compose(labelHash, rootHash) - { - return web3.utils.keccak256(web3.eth.abi.encodeParameters([ 'bytes32', 'bytes32' ], [ rootHash, labelHash ])); - } - - function namehash(domain) - { - return domain.split('.').reverse().reduce((hash, label) => compose(labelhash(label), hash), '0x0'); - } - - async function bootstrap() - { - // ens registry - ENSRegistry.isDeployed() || await deployer.deploy(ENSRegistry); - ens = await ENSRegistry.deployed(); - console.log(`ENSRegistry deployed at address: ${ens.address}`); - // resolver - PublicResolver.isDeployed() || await deployer.deploy(PublicResolver, ens.address); - resolver = await PublicResolver.deployed(); - console.log(`PublicResolver deployed at address: ${resolver.address}`); - // root registrar - await registerDomain(''); - } - - async function setReverseRegistrar() - { - ReverseRegistrar.isDeployed() || await deployer.deploy(ReverseRegistrar, ens.address, resolver.address); - reverseregistrar = await ReverseRegistrar.deployed(); - - await registrars[''].register(labelhash('reverse'), accounts[0], { from: accounts[0] }); - await ens.setSubnodeOwner(namehash('reverse'), labelhash('addr'), reverseregistrar.address); - } - - async function registerDomain(label, domain='') - { - const name = domain ? `${label}.${domain}` : `${label}`; - const labelHash = label ? labelhash(label) : '0x0'; - const nameHash = name ? namehash(name) : '0x0'; - const owner = await ens.owner(nameHash); - if (await web3.eth.getCode(owner) == '0x') - { - registrars[name] = await FIFSRegistrar.new(ens.address, nameHash, { from: accounts[0] }); - if (!!name) - { - await registrars[domain].register(labelHash, registrars[name].address, { from: accounts[0] }); - } - else - { - await ens.setOwner(nameHash, registrars[name].address, { from: accounts[0] }); - } - } - else - { - registrars[name] = await FIFSRegistrar.at(owner); - } - console.log(`FIFSRegistrar for domain ${name} deployed at address: ${registrars[name].address}`); - return registrars[name]; - } - - async function registerAddress(label, domain, address) - { - const name = `${label}.${domain}`; - const labelHash = labelhash(label); - const nameHash = namehash(name); - // register as subdomain - await registrars[domain].register(labelHash, accounts[0], { from: accounts[0] }); - // link to ens (resolver & addr) - await ens.setResolver(nameHash, resolver.address, { from: accounts[0] }); - await resolver.setAddr(nameHash, 60, address, { from: accounts[0] }); - } - - await bootstrap(); - await setReverseRegistrar(); - await registerDomain('eth'); - await registerDomain('iexec', 'eth'); - await registerDomain('v5', 'iexec.eth'); - await registerDomain('users', 'iexec.eth'); - await registerDomain('apps', 'iexec.eth'); - await registerDomain('datasets', 'iexec.eth'); - await registerDomain('pools', 'iexec.eth'); - - /* ------------------------- Fetching contracts -------------------------- */ - switch (deploymentOptions.asset) - { - case 'Token': IexecInterfaceInstance = await IexecInterfaceToken.at((await ERC1538Proxy.deployed()).address); break; - case 'Native': IexecInterfaceInstance = await IexecInterfaceNative.at((await ERC1538Proxy.deployed()).address); break; - } - - const RLCInstance = deploymentOptions.asset == 'Token' && await RLC.deployed(); - const ERLCInstance = deploymentOptions.asset == 'Token' && deploymentOptions.v5.usekyc && await ERLCTokenSwap.deployed(); - const AppRegistryInstance = await AppRegistry.deployed(); - const DatasetRegistryInstance = await DatasetRegistry.deployed(); - const WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - - await registerAddress('admin', 'iexec.eth', accounts[0]); - RLCInstance && await registerAddress('rlc', 'iexec.eth', RLCInstance.address ); - ERLCInstance && await registerAddress('erlc', 'iexec.eth', ERLCInstance.address ); - IexecInterfaceInstance && await registerAddress('core', 'v5.iexec.eth', IexecInterfaceInstance.address ); - AppRegistryInstance && await registerAddress('apps', 'v5.iexec.eth', AppRegistryInstance.address ); - DatasetRegistryInstance && await registerAddress('datasets', 'v5.iexec.eth', DatasetRegistryInstance.address ); - WorkerpoolRegistryInstance && await registerAddress('workerpools', 'v5.iexec.eth', WorkerpoolRegistryInstance.address); - await reverseregistrar.setName('admin.iexec.eth', { from: accounts[0] }); - IexecInterfaceInstance && await IexecInterfaceInstance.setName(ens.address, 'core.v5.iexec.eth' ); - AppRegistryInstance && await AppRegistryInstance.setName(ens.address, 'apps.v5.iexec.eth' ); - DatasetRegistryInstance && await DatasetRegistryInstance.setName(ens.address, 'datasets.v5.iexec.eth' ); - WorkerpoolRegistryInstance && await WorkerpoolRegistryInstance.setName(ens.address, 'workerpools.v5.iexec.eth'); - - } +module.exports = async function (accounts) { + console.log('# web3 version:', web3.version); + const chainid = await web3.eth.net.getId(); + const chaintype = await web3.eth.net.getNetworkType(); + console.log('Chainid is:', chainid); + console.log('Chaintype is:', chaintype); + console.log('Deployer is:', accounts[0]); + + /* ------------------------- Existing deployment ------------------------- */ + const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; + + /* ----------------------------- Deploy ENS ------------------------------ */ + if (chainid > 1000) { + // skip for mainnet and testnet use + var ens = null; + var resolver = null; + var registrars = {}; + + function labelhash(label) { + return web3.utils.keccak256(label.toLowerCase()); + } + + function compose(labelHash, rootHash) { + return web3.utils.keccak256( + web3.eth.abi.encodeParameters(['bytes32', 'bytes32'], [rootHash, labelHash]), + ); + } + + function namehash(domain) { + return domain + .split('.') + .reverse() + .reduce((hash, label) => compose(labelhash(label), hash), '0x0'); + } + + async function bootstrap() { + // ens registry + ENSRegistry.isDeployed() || (await deployer.deploy(ENSRegistry)); + ens = await ENSRegistry.deployed(); + console.log(`ENSRegistry deployed at address: ${ens.address}`); + // resolver + PublicResolver.isDeployed() || (await deployer.deploy(PublicResolver, ens.address)); + resolver = await PublicResolver.deployed(); + console.log(`PublicResolver deployed at address: ${resolver.address}`); + // root registrar + await registerDomain(''); + } + + async function setReverseRegistrar() { + ReverseRegistrar.isDeployed() || + (await deployer.deploy(ReverseRegistrar, ens.address, resolver.address)); + reverseregistrar = await ReverseRegistrar.deployed(); + + await registrars[''].register(labelhash('reverse'), accounts[0], { from: accounts[0] }); + await ens.setSubnodeOwner( + namehash('reverse'), + labelhash('addr'), + reverseregistrar.address, + ); + } + + async function registerDomain(label, domain = '') { + const name = domain ? `${label}.${domain}` : `${label}`; + const labelHash = label ? labelhash(label) : '0x0'; + const nameHash = name ? namehash(name) : '0x0'; + const owner = await ens.owner(nameHash); + if ((await web3.eth.getCode(owner)) == '0x') { + registrars[name] = await FIFSRegistrar.new(ens.address, nameHash, { + from: accounts[0], + }); + if (!!name) { + await registrars[domain].register(labelHash, registrars[name].address, { + from: accounts[0], + }); + } else { + await ens.setOwner(nameHash, registrars[name].address, { from: accounts[0] }); + } + } else { + registrars[name] = await FIFSRegistrar.at(owner); + } + console.log( + `FIFSRegistrar for domain ${name} deployed at address: ${registrars[name].address}`, + ); + return registrars[name]; + } + + async function registerAddress(label, domain, address) { + const name = `${label}.${domain}`; + const labelHash = labelhash(label); + const nameHash = namehash(name); + // register as subdomain + await registrars[domain].register(labelHash, accounts[0], { from: accounts[0] }); + // link to ens (resolver & addr) + await ens.setResolver(nameHash, resolver.address, { from: accounts[0] }); + await resolver.setAddr(nameHash, 60, address, { from: accounts[0] }); + } + + await bootstrap(); + await setReverseRegistrar(); + await registerDomain('eth'); + await registerDomain('iexec', 'eth'); + await registerDomain('v5', 'iexec.eth'); + await registerDomain('users', 'iexec.eth'); + await registerDomain('apps', 'iexec.eth'); + await registerDomain('datasets', 'iexec.eth'); + await registerDomain('pools', 'iexec.eth'); + + /* ------------------------- Fetching contracts -------------------------- */ + switch (deploymentOptions.asset) { + case 'Token': + IexecInterfaceInstance = await IexecInterfaceToken.at( + (await ERC1538Proxy.deployed()).address, + ); + break; + case 'Native': + IexecInterfaceInstance = await IexecInterfaceNative.at( + (await ERC1538Proxy.deployed()).address, + ); + break; + } + + const RLCInstance = deploymentOptions.asset == 'Token' && (await RLC.deployed()); + const AppRegistryInstance = await AppRegistry.deployed(); + const DatasetRegistryInstance = await DatasetRegistry.deployed(); + const WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + + await registerAddress('admin', 'iexec.eth', accounts[0]); + RLCInstance && (await registerAddress('rlc', 'iexec.eth', RLCInstance.address)); + IexecInterfaceInstance && + (await registerAddress('core', 'v5.iexec.eth', IexecInterfaceInstance.address)); + AppRegistryInstance && + (await registerAddress('apps', 'v5.iexec.eth', AppRegistryInstance.address)); + DatasetRegistryInstance && + (await registerAddress('datasets', 'v5.iexec.eth', DatasetRegistryInstance.address)); + WorkerpoolRegistryInstance && + (await registerAddress( + 'workerpools', + 'v5.iexec.eth', + WorkerpoolRegistryInstance.address, + )); + await reverseregistrar.setName('admin.iexec.eth', { from: accounts[0] }); + IexecInterfaceInstance && + (await IexecInterfaceInstance.setName(ens.address, 'core.v5.iexec.eth')); + AppRegistryInstance && + (await AppRegistryInstance.setName(ens.address, 'apps.v5.iexec.eth')); + DatasetRegistryInstance && + (await DatasetRegistryInstance.setName(ens.address, 'datasets.v5.iexec.eth')); + WorkerpoolRegistryInstance && + (await WorkerpoolRegistryInstance.setName(ens.address, 'workerpools.v5.iexec.eth')); + } }; diff --git a/migrations/6_whitelisting.js b/migrations/6_whitelisting.js deleted file mode 100644 index bd83c9659..000000000 --- a/migrations/6_whitelisting.js +++ /dev/null @@ -1,51 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// CONFIG -const CONFIG = require('../config/config.json') -// Token -var RLC = artifacts.require('rlc-faucet-contract/RLC') -var ERLCTokenSwap = artifacts.require('@iexec/erlc/ERLCTokenSwap') -var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy') - -/***************************************************************************** - * Main * - *****************************************************************************/ -module.exports = async function(deployer, network, accounts) -{ - console.log('# web3 version:', web3.version); - const chainid = await web3.eth.net.getId(); - const chaintype = await web3.eth.net.getNetworkType(); - console.log('Chainid is:', chainid); - console.log('Chaintype is:', chaintype); - console.log('Deployer is:', accounts[0]); - - const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; - deploymentOptions.v5.usekyc = !!process.env.KYC; - - if (deploymentOptions.v5.usekyc && chainid > 1000) // skip for mainnet and testnet use - { - const rlc = await RLC.deployed(); - const erlc = await ERLCTokenSwap.deployed(); - const core = await ERC1538Proxy.deployed(); - const supply = await rlc.totalSupply(); - const KYC_ADMIN_ROLE = await erlc.KYC_ADMIN_ROLE(); - - await erlc.grantRole(KYC_ADMIN_ROLE, accounts[0]); - await erlc.grantKYC([ core.address, ...accounts ]); - await rlc.approveAndCall(erlc.address, supply.div(web3.utils.toBN(2)), '0x'); - } -}; diff --git a/migrations/999_functions.js b/migrations/999_functions.js index 1b41f8f21..d2836b552 100644 --- a/migrations/999_functions.js +++ b/migrations/999_functions.js @@ -1,34 +1,23 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 // ERC1538 core & delegates -var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy') -var ERC1538Query = artifacts.require('@iexec/solidity/ERC1538QueryDelegate') +var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy'); +var ERC1538Query = artifacts.require('@iexec/solidity/ERC1538QueryDelegate'); /***************************************************************************** * Main * *****************************************************************************/ -module.exports = async function(deployer, network, accounts) -{ - const ERC1538QueryInstace = await ERC1538Query.at((await ERC1538Proxy.deployed()).address); - const functionCount = await ERC1538QueryInstace.totalFunctions(); +module.exports = async function () { + const ERC1538QueryInstace = await ERC1538Query.at((await ERC1538Proxy.deployed()).address); + const functionCount = await ERC1538QueryInstace.totalFunctions(); - console.log(`The deployed ERC1538Proxy supports ${functionCount} functions:`); - (await Promise.all( - Array(functionCount.toNumber()).fill().map((_, i) => ERC1538QueryInstace.functionByIndex(i)) - )) - .forEach((details, i) => console.log(`[${i}] ${details.delegate} ${details.signature}`)); + console.log(`The deployed ERC1538Proxy supports ${functionCount} functions:`); + ( + await Promise.all( + Array(functionCount.toNumber()) + .fill() + .map((_, i) => ERC1538QueryInstace.functionByIndex(i)), + ) + ).forEach((details, i) => console.log(`[${i}] ${details.delegate} ${details.signature}`)); }; diff --git a/migrations/utils/getFunctionSignatures.d.ts b/migrations/utils/getFunctionSignatures.d.ts new file mode 100644 index 000000000..6def47725 --- /dev/null +++ b/migrations/utils/getFunctionSignatures.d.ts @@ -0,0 +1,4 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +export function getFunctionSignatures(abi: any[]): string; diff --git a/migrations/utils/getFunctionSignatures.js b/migrations/utils/getFunctionSignatures.js new file mode 100644 index 000000000..de5f6a02c --- /dev/null +++ b/migrations/utils/getFunctionSignatures.js @@ -0,0 +1,25 @@ +// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +const { TruffleDeployer: Deployer } = require('../../utils/FactoryDeployer'); + +/***************************************************************************** + * Tools * + *****************************************************************************/ +function getSerializedObject(entry) { + return entry.type == 'tuple' + ? `(${entry.components.map(getSerializedObject).join(',')})` + : entry.type; +} +function getFunctionSignatures(abi) { + return [ + ...abi.filter((entry) => entry.type == 'receive').map((entry) => 'receive;'), + ...abi.filter((entry) => entry.type == 'fallback').map((entry) => 'fallback;'), + ...abi + .filter((entry) => entry.type == 'function') + .map((entry) => `${entry.name}(${entry.inputs.map(getSerializedObject).join(',')});`), + ] + .filter(Boolean) + .join(''); +} +exports.getFunctionSignatures = getFunctionSignatures; diff --git a/package-lock.json b/package-lock.json index d55669a32..89100c823 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,402 +1,166 @@ { "name": "@iexec/poco", - "version": "5.3.2", - "lockfileVersion": 1, + "version": "5.5.0", + "lockfileVersion": 2, "requires": true, - "dependencies": { - "@apollo/protobufjs": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@apollo/protobufjs/-/protobufjs-1.2.2.tgz", - "integrity": "sha512-vF+zxhPiLtkwxONs6YanSt1EpwpGilThpneExUN5K3tCymuxNnVq2yojTvnpRjv2QfsEIt/n7ozPIIzBLwGIDQ==", - "dev": true, - "optional": true, - "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.0", - "@types/node": "^10.1.0", - "long": "^4.0.0" - }, + "packages": { + "": { + "name": "@iexec/poco", + "version": "5.5.0", + "license": "Apache-2.0", "dependencies": { - "@types/node": { - "version": "10.17.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", - "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", - "dev": true, - "optional": true - } - } - }, - "@apollographql/apollo-tools": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/@apollographql/apollo-tools/-/apollo-tools-0.5.3.tgz", - "integrity": "sha512-VcsXHfTFoCodDAgJZxN04GdFK1kqOhZQnQY/9Fa147P+I8xfvOSz5d+lKAPB+hwSgBNyd7ncAKGIs4+utbL+yA==", - "dev": true, - "optional": true - }, - "@apollographql/graphql-playground-html": { - "version": "1.6.29", - "resolved": "https://registry.npmjs.org/@apollographql/graphql-playground-html/-/graphql-playground-html-1.6.29.tgz", - "integrity": "sha512-xCcXpoz52rI4ksJSdOCxeOCn2DLocxwHf9dVT/Q90Pte1LX+LY+91SFtJF3KXVHH8kEin+g1KKCQPKBjZJfWNA==", - "dev": true, - "optional": true, - "requires": { - "xss": "^1.0.8" - } - }, - "@babel/code-frame": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", - "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.14.5" - } - }, - "@babel/compat-data": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz", - "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==", + "@iexec/interface": "3.0.35-8", + "@iexec/solidity": "^0.1.1", + "@openzeppelin/contracts": "3.3.0", + "@openzeppelin/contracts-v5": "npm:@openzeppelin/contracts@^5.0.2", + "@uniswap/v2-periphery": "1.1.0-beta.0", + "rlc-faucet-contract": "1.0.10" + }, + "devDependencies": { + "@amxx/factory": "^1.0.0", + "@defi-wonderland/smock": "^2.3.5", + "@ensdomains/ens-contracts": "^0.0.3", + "@nomicfoundation/hardhat-network-helpers": "^1.0.11", + "@nomicfoundation/hardhat-toolbox": "^2.0.2", + "@nomiclabs/hardhat-truffle5": "^2.0.7", + "@nomiclabs/hardhat-web3": "^2.0.0", + "@openzeppelin/test-helpers": "^0.5.16", + "@openzeppelin/upgrades-core": "^1.37.1", + "hardhat": "^2.14.1", + "hardhat-dependency-compiler": "^1.2.1", + "hardhat-deploy": "^0.11.43", + "husky": "^9.1.6", + "lint-staged": "^15.2.10", + "mocha": "^10.7.3", + "prettier": "^3.3.3", + "prettier-plugin-organize-imports": "^4.0.0", + "prettier-plugin-solidity": "^1.4.1", + "puml-for-markdown": "^1.2.1", + "sol2uml": "^2.5.19", + "solidity-docgen": "^0.6.0-beta.36", + "web3": "^1.10.4", + "zx": "^8.1.6" + } + }, + "node_modules/@aduh95/viz.js": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@aduh95/viz.js/-/viz.js-3.7.0.tgz", + "integrity": "sha512-20Pk2Z98fbPLkECcrZSJszKos/OgtvJJR3NcbVfgCJ6EQjDNzW2P1BKqImOz3tJ952dvO2DWEhcLhQ1Wz1e9ng==", + "dev": true + }, + "node_modules/@amxx/factory": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@amxx/factory/-/factory-1.0.0.tgz", + "integrity": "sha512-GXos8f4vKWPcphVyF2RU+/4rGvlov2idZSPNzXyIEmkzwLuxa+waTOUjHCvN7cmG0vXM7tyjawXUN1fdgiLvxA==", "dev": true }, - "@babel/generator": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.9.tgz", - "integrity": "sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ==", - "dev": true, - "requires": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz", - "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==", + "node_modules/@babel/runtime": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.6.tgz", + "integrity": "sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg==", "dev": true, - "requires": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.17.5", - "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==", - "dev": true - } - } - }, - "@babel/helper-define-polyfill-provider": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", - "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", - "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" + "regenerator-runtime": "^0.13.4" }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "@babel/helper-environment-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", - "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-function-name": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", - "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", - "dev": true, - "requires": { - "@babel/template": "^7.16.7", - "@babel/types": "^7.17.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", - "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", - "dev": true - }, - "@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.7" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz", - "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", - "dev": true - }, - "@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "engines": { + "node": ">=6.9.0" } }, - "@babel/parser": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.9.tgz", - "integrity": "sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg==", + "node_modules/@chainsafe/as-sha256": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz", + "integrity": "sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==", "dev": true }, - "@babel/plugin-transform-runtime": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.17.0.tgz", - "integrity": "sha512-fr7zPWnKXNc1xoHfrIU9mN/4XKX4VLZ45Q+oMhfsYIaHvg7mHgmhfOy/ckRWqDK7XF3QDigRpkh5DKq6+clE8A==", + "node_modules/@chainsafe/persistent-merkle-tree": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz", + "integrity": "sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==", "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "babel-plugin-polyfill-corejs2": "^0.3.0", - "babel-plugin-polyfill-corejs3": "^0.5.0", - "babel-plugin-polyfill-regenerator": "^0.3.0", - "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==", - "dev": true - } + "@chainsafe/as-sha256": "^0.3.1" } }, - "@babel/runtime": { - "version": "7.14.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.6.tgz", - "integrity": "sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg==", + "node_modules/@chainsafe/ssz": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.9.4.tgz", + "integrity": "sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==", "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" + "dependencies": { + "@chainsafe/as-sha256": "^0.3.1", + "@chainsafe/persistent-merkle-tree": "^0.4.2", + "case": "^1.6.3" } }, - "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" - }, + "peer": true, "dependencies": { - "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.16.7" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.9.tgz", - "integrity": "sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - } + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" } }, - "@babel/traverse": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.9.tgz", - "integrity": "sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw==", + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.9", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.9", - "@babel/types": "^7.17.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, + "peer": true, "dependencies": { - "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.16.7" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", - "dev": true - }, - "@babel/highlight": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.9.tgz", - "integrity": "sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "@babel/types": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz", - "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==", + "node_modules/@defi-wonderland/smock": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@defi-wonderland/smock/-/smock-2.3.5.tgz", + "integrity": "sha512-klANj1hUpc3cd2ShXdVH/bEGwxJd+LxOngkF5gLcIbg6b37RCgMPMmR/94/hgL62F8bfWtuNKsQD7K+c6M5fWQ==", "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.16.7", - "to-fast-properties": "^2.0.0" - }, "dependencies": { - "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", - "dev": true - } + "@nomicfoundation/ethereumjs-evm": "^1.0.0-rc.3", + "@nomicfoundation/ethereumjs-util": "^8.0.0-rc.3", + "@nomicfoundation/ethereumjs-vm": "^6.0.0-rc.3", + "diff": "^5.0.0", + "lodash.isequal": "^4.5.0", + "lodash.isequalwith": "^4.4.0", + "rxjs": "^7.2.0", + "semver": "^7.3.5" + }, + "peerDependencies": { + "@ethersproject/abi": "^5", + "@ethersproject/abstract-provider": "^5", + "@ethersproject/abstract-signer": "^5", + "@nomiclabs/hardhat-ethers": "^2", + "ethers": "^5", + "hardhat": "^2" } }, - "@consento/sync-randombytes": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@consento/sync-randombytes/-/sync-randombytes-1.0.5.tgz", - "integrity": "sha512-mPJ2XvrTLQGEdhleDuSIkWtVWnvmhREOC1FjorV1nlK49t/52Z9X1d618gTj6nlQghRLiYvcd8oL4vZ2YZuDIQ==", + "node_modules/@defi-wonderland/smock/node_modules/semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", "dev": true, - "optional": true, - "requires": { - "buffer": "^5.4.3", - "seedrandom": "^3.0.5" - }, "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "optional": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - } + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "@ensdomains/address-encoder": { + "node_modules/@ensdomains/address-encoder": { "version": "0.1.9", "resolved": "https://registry.npmjs.org/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz", "integrity": "sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg==", "dev": true, - "requires": { + "dependencies": { "bech32": "^1.1.3", "blakejs": "^1.1.0", "bn.js": "^4.11.8", @@ -406,12 +170,19 @@ "ripemd160": "^2.0.2" } }, - "@ensdomains/ens": { + "node_modules/@ensdomains/buffer": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/@ensdomains/buffer/-/buffer-0.0.10.tgz", + "integrity": "sha512-EOFqiWnN36EyyBAgHFTsabFcFICUALt41SiDm/4pAw4V36R4lD4wHcnZcqCYki9m1fMaeWGHrdqxmrMa8iiSTQ==", + "dev": true + }, + "node_modules/@ensdomains/ens": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/@ensdomains/ens/-/ens-0.4.5.tgz", "integrity": "sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw==", + "deprecated": "Please use @ensdomains/ens-contracts", "dev": true, - "requires": { + "dependencies": { "bluebird": "^3.5.2", "eth-ens-namehash": "^2.0.8", "solc": "^0.4.20", @@ -419,12 +190,28 @@ "web3-utils": "^1.0.0-beta.31" } }, - "@ensdomains/ensjs": { + "node_modules/@ensdomains/ens-contracts": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@ensdomains/ens-contracts/-/ens-contracts-0.0.3.tgz", + "integrity": "sha512-da67JjAFjl8gLDDAqYQs5PSvth9usBcD7clXiXpfvJTMJnZnR+c/cG6xrkVgL4qEP7jmI+iEoj0y29qFtupy2w==", + "dev": true, + "dependencies": { + "@ensdomains/buffer": "^0.0.10", + "@openzeppelin/contracts": "^4.1.0" + } + }, + "node_modules/@ensdomains/ens-contracts/node_modules/@openzeppelin/contracts": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.3.tgz", + "integrity": "sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg==", + "dev": true + }, + "node_modules/@ensdomains/ensjs": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/@ensdomains/ensjs/-/ensjs-2.1.0.tgz", "integrity": "sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog==", "dev": true, - "requires": { + "dependencies": { "@babel/runtime": "^7.4.4", "@ensdomains/address-encoder": "^0.1.7", "@ensdomains/ens": "0.4.5", @@ -433,2295 +220,1892 @@ "eth-ens-namehash": "^2.0.8", "ethers": "^5.0.13", "js-sha3": "^0.8.0" - }, - "dependencies": { - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true - } } }, - "@ensdomains/resolver": { + "node_modules/@ensdomains/ensjs/node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "node_modules/@ensdomains/resolver": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/@ensdomains/resolver/-/resolver-0.2.4.tgz", "integrity": "sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA==", + "deprecated": "Please use @ensdomains/ens-contracts", "dev": true }, - "@ethereumjs/common": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.4.0.tgz", - "integrity": "sha512-UdkhFWzWcJCZVsj1O/H8/oqj/0RVYjLc1OhPjBrQdALAkQHpCp8xXI4WLnuGTADqTdJZww0NtgwG+TRPkXt27w==", + "node_modules/@ethereumjs/common": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.5.0.tgz", + "integrity": "sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg==", "dev": true, - "requires": { + "dependencies": { "crc-32": "^1.2.0", - "ethereumjs-util": "^7.1.0" + "ethereumjs-util": "^7.1.1" } }, - "@ethereumjs/tx": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.0.tgz", - "integrity": "sha512-yTwEj2lVzSMgE6Hjw9Oa1DZks/nKTWM8Wn4ykDNapBPua2f4nXO3qKnni86O6lgDj5fVNRqbDsD0yy7/XNGDEA==", + "node_modules/@ethereumjs/rlp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", + "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", "dev": true, - "requires": { - "@ethereumjs/common": "^2.4.0", - "ethereumjs-util": "^7.1.0" + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=14" } }, - "@ethersproject/abi": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.6.1.tgz", - "integrity": "sha512-0cqssYh6FXjlwKWBmLm3+zH2BNARoS5u/hxbz+LpQmcDB3w0W553h2btWui1/uZp2GBM/SI3KniTuMcYyHpA5w==", + "node_modules/@ethereumjs/tx": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.2.tgz", + "integrity": "sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog==", "dev": true, - "requires": { - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/hash": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" + "dependencies": { + "@ethereumjs/common": "^2.5.0", + "ethereumjs-util": "^7.1.2" + } + }, + "node_modules/@ethereumjs/util": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", + "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", + "dev": true, + "dependencies": { + "@ethereumjs/rlp": "^4.0.1", + "ethereum-cryptography": "^2.0.0", + "micro-ftch": "^0.3.1" }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@ethereumjs/util/node_modules/ethereum-cryptography": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", + "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", + "dev": true, "dependencies": { - "@ethersproject/abstract-provider": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz", - "integrity": "sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/networks": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "@ethersproject/web": "^5.6.0" - } - }, - "@ethersproject/abstract-signer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.6.0.tgz", - "integrity": "sha512-WOqnG0NJKtI8n0wWZPReHtaLkDByPL67tn4nBaDAhmVq8sjHTPbCdz4DRhVu/cfTOvfy9w3iq5QZ7BX7zw56BQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0" - } - }, - "@ethersproject/address": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.6.0.tgz", - "integrity": "sha512-6nvhYXjbXsHPS+30sHZ+U4VMagFC/9zAk6Gd/h3S21YW4+yfb0WfRtaAIZ4kfM4rrVwqiy284LP0GtL5HXGLxQ==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/rlp": "^5.6.0" - } - }, - "@ethersproject/base64": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.6.0.tgz", - "integrity": "sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0" - } + "@noble/curves": "1.1.0", + "@noble/hashes": "1.3.1", + "@scure/bip32": "1.3.1", + "@scure/bip39": "1.2.1" + } + }, + "node_modules/@ethersproject/abi": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", + "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "@ethersproject/bignumber": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.6.0.tgz", - "integrity": "sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "bn.js": "^4.11.9" - } - }, - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/constants": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.6.0.tgz", - "integrity": "sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0" - } - }, - "@ethersproject/hash": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.6.0.tgz", - "integrity": "sha512-fFd+k9gtczqlr0/BruWLAu7UAOas1uRRJvOR84uDf4lNZ+bTkGl366qvniUZHKtlqxBRU65MkOobkmvmpHU+jA==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.6.0", - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } - }, - "@ethersproject/keccak256": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.6.0.tgz", - "integrity": "sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "js-sha3": "0.8.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true - }, - "@ethersproject/networks": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.2.tgz", - "integrity": "sha512-9uEzaJY7j5wpYGTojGp8U89mSsgQLc40PCMJLMCnFXTs7nhBveZ0t7dbqWUNrepWTszDbFkYD6WlL8DKx5huHA==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/properties": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.6.0.tgz", - "integrity": "sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/rlp": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.6.0.tgz", - "integrity": "sha512-dz9WR1xpcTL+9DtOT/aDO+YyxSSdO8YIS0jyZwHHSlAmnxA6cKU3TrTd4Xc/bHayctxTgGLYNuVVoiXE4tTq1g==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/signing-key": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.6.0.tgz", - "integrity": "sha512-S+njkhowmLeUu/r7ir8n78OUKx63kBdMCPssePS89So1TH4hZqnWFsThEd/GiXYp9qMxVrydf7KdM9MTGPFukA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } - }, - "@ethersproject/strings": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.6.0.tgz", - "integrity": "sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/transactions": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.6.0.tgz", - "integrity": "sha512-4HX+VOhNjXHZyGzER6E/LVI2i6lf9ejYeWD6l4g50AdmimyuStKc39kvKf1bXWQMg7QNVh+uC7dYwtaZ02IXeg==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/rlp": "^5.6.0", - "@ethersproject/signing-key": "^5.6.0" - } - }, - "@ethersproject/web": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.6.0.tgz", - "integrity": "sha512-G/XHj0hV1FxI2teHRfCGvfBUHFmU+YOSbCxlAMqJklxSa7QMiHFQfAxvwY2PFqgvdkxEKwRNr/eCjfAPEm2Ctg==", - "dev": true, - "requires": { - "@ethersproject/base64": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-provider": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", + "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0" + } + }, + "node_modules/@ethersproject/abstract-signer": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", + "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "node_modules/@ethersproject/address": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", + "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/rlp": "^5.7.0" + } + }, + "node_modules/@ethersproject/base64": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", + "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0" + } + }, + "node_modules/@ethersproject/basex": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", + "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/properties": "^5.7.0" } }, - "@ethersproject/abstract-provider": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.4.0.tgz", - "integrity": "sha512-vPBR7HKUBY0lpdllIn7tLIzNN7DrVnhCLKSzY0l8WAwxz686m/aL7ASDzrVxV93GJtIub6N2t4dfZ29CkPOxgA==", + "node_modules/@ethersproject/bignumber": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", + "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.4.0", - "@ethersproject/bytes": "^5.4.0", - "@ethersproject/logger": "^5.4.0", - "@ethersproject/networks": "^5.4.0", - "@ethersproject/properties": "^5.4.0", - "@ethersproject/transactions": "^5.4.0", - "@ethersproject/web": "^5.4.0" + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" } }, - "@ethersproject/abstract-signer": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.4.0.tgz", - "integrity": "sha512-AieQAzt05HJZS2bMofpuxMEp81AHufA5D6M4ScKwtolj041nrfIbIi8ciNW7+F59VYxXq+V4c3d568Q6l2m8ew==", + "node_modules/@ethersproject/bignumber/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/@ethersproject/bytes": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", + "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.4.0", - "@ethersproject/bignumber": "^5.4.0", - "@ethersproject/bytes": "^5.4.0", - "@ethersproject/logger": "^5.4.0", - "@ethersproject/properties": "^5.4.0" + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" } }, - "@ethersproject/address": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.4.0.tgz", - "integrity": "sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q==", + "node_modules/@ethersproject/constants": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", + "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.4.0", - "@ethersproject/bytes": "^5.4.0", - "@ethersproject/keccak256": "^5.4.0", - "@ethersproject/logger": "^5.4.0", - "@ethersproject/rlp": "^5.4.0" + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0" } }, - "@ethersproject/base64": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.4.0.tgz", - "integrity": "sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ==", + "node_modules/@ethersproject/contracts": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz", + "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==", "dev": true, - "requires": { - "@ethersproject/bytes": "^5.4.0" + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0" + } + }, + "node_modules/@ethersproject/hash": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", + "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/hdnode": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", + "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/json-wallets": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", + "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" } }, - "@ethersproject/basex": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.6.0.tgz", - "integrity": "sha512-qN4T+hQd/Md32MoJpc69rOwLYRUXwjTlhHDIeUkUmiN/JyWkkLLMoG0TqvSQKNqZOMgN5stbUYN6ILC+eD7MEQ==", + "node_modules/@ethersproject/keccak256": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", + "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/properties": "^5.6.0" - }, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "dependencies": { - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } + "@ethersproject/bytes": "^5.7.0", + "js-sha3": "0.8.0" + } + }, + "node_modules/@ethersproject/keccak256/node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "node_modules/@ethersproject/logger": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", + "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ] + }, + "node_modules/@ethersproject/networks": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", + "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "@ethersproject/properties": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.6.0.tgz", - "integrity": "sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" } }, - "@ethersproject/bignumber": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.4.0.tgz", - "integrity": "sha512-OXUu9f9hO3vGRIPxU40cignXZVaYyfx6j9NNMjebKdnaCL3anCLSSy8/b8d03vY6dh7duCC0kW72GEC4tZer2w==", + "node_modules/@ethersproject/pbkdf2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz", + "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==", "dev": true, - "requires": { - "@ethersproject/bytes": "^5.4.0", - "@ethersproject/logger": "^5.4.0", - "bn.js": "^4.11.9" + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/sha2": "^5.7.0" } }, - "@ethersproject/bytes": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.4.0.tgz", - "integrity": "sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA==", + "node_modules/@ethersproject/properties": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", + "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", "dev": true, - "requires": { - "@ethersproject/logger": "^5.4.0" + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/logger": "^5.7.0" } }, - "@ethersproject/constants": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.4.0.tgz", - "integrity": "sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q==", + "node_modules/@ethersproject/providers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz", + "integrity": "sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==", "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.4.0" + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0", + "bech32": "1.1.4", + "ws": "7.4.6" } }, - "@ethersproject/contracts": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.6.0.tgz", - "integrity": "sha512-74Ge7iqTDom0NX+mux8KbRUeJgu1eHZ3iv6utv++sLJG80FVuU9HnHeKVPfjd9s3woFhaFoQGf3B3iH/FrQmgw==", + "node_modules/@ethersproject/random": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", + "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", "dev": true, - "requires": { - "@ethersproject/abi": "^5.6.0", - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/abstract-signer": "^5.6.0", - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/transactions": "^5.6.0" - }, - "dependencies": { - "@ethersproject/abstract-provider": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz", - "integrity": "sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/networks": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "@ethersproject/web": "^5.6.0" - } - }, - "@ethersproject/abstract-signer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.6.0.tgz", - "integrity": "sha512-WOqnG0NJKtI8n0wWZPReHtaLkDByPL67tn4nBaDAhmVq8sjHTPbCdz4DRhVu/cfTOvfy9w3iq5QZ7BX7zw56BQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0" - } - }, - "@ethersproject/address": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.6.0.tgz", - "integrity": "sha512-6nvhYXjbXsHPS+30sHZ+U4VMagFC/9zAk6Gd/h3S21YW4+yfb0WfRtaAIZ4kfM4rrVwqiy284LP0GtL5HXGLxQ==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/rlp": "^5.6.0" - } - }, - "@ethersproject/base64": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.6.0.tgz", - "integrity": "sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0" - } - }, - "@ethersproject/bignumber": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.6.0.tgz", - "integrity": "sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "bn.js": "^4.11.9" - } - }, - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/constants": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.6.0.tgz", - "integrity": "sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0" - } - }, - "@ethersproject/keccak256": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.6.0.tgz", - "integrity": "sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "js-sha3": "0.8.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true - }, - "@ethersproject/networks": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.2.tgz", - "integrity": "sha512-9uEzaJY7j5wpYGTojGp8U89mSsgQLc40PCMJLMCnFXTs7nhBveZ0t7dbqWUNrepWTszDbFkYD6WlL8DKx5huHA==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/properties": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.6.0.tgz", - "integrity": "sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/rlp": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.6.0.tgz", - "integrity": "sha512-dz9WR1xpcTL+9DtOT/aDO+YyxSSdO8YIS0jyZwHHSlAmnxA6cKU3TrTd4Xc/bHayctxTgGLYNuVVoiXE4tTq1g==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/signing-key": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.6.0.tgz", - "integrity": "sha512-S+njkhowmLeUu/r7ir8n78OUKx63kBdMCPssePS89So1TH4hZqnWFsThEd/GiXYp9qMxVrydf7KdM9MTGPFukA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "@ethersproject/strings": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.6.0.tgz", - "integrity": "sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/rlp": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", + "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "@ethersproject/transactions": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.6.0.tgz", - "integrity": "sha512-4HX+VOhNjXHZyGzER6E/LVI2i6lf9ejYeWD6l4g50AdmimyuStKc39kvKf1bXWQMg7QNVh+uC7dYwtaZ02IXeg==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/rlp": "^5.6.0", - "@ethersproject/signing-key": "^5.6.0" - } + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/sha2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", + "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "@ethersproject/web": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.6.0.tgz", - "integrity": "sha512-G/XHj0hV1FxI2teHRfCGvfBUHFmU+YOSbCxlAMqJklxSa7QMiHFQfAxvwY2PFqgvdkxEKwRNr/eCjfAPEm2Ctg==", - "dev": true, - "requires": { - "@ethersproject/base64": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "hash.js": "1.1.7" + } + }, + "node_modules/@ethersproject/signing-key": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", + "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "1.1.7" } }, - "@ethersproject/hash": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.4.0.tgz", - "integrity": "sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA==", + "node_modules/@ethersproject/signing-key/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/@ethersproject/solidity": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", + "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.4.0", - "@ethersproject/address": "^5.4.0", - "@ethersproject/bignumber": "^5.4.0", - "@ethersproject/bytes": "^5.4.0", - "@ethersproject/keccak256": "^5.4.0", - "@ethersproject/logger": "^5.4.0", - "@ethersproject/properties": "^5.4.0", - "@ethersproject/strings": "^5.4.0" + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/strings": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", + "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" } }, - "@ethersproject/hdnode": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.6.0.tgz", - "integrity": "sha512-61g3Jp3nwDqJcL/p4nugSyLrpl/+ChXIOtCEM8UDmWeB3JCAt5FoLdOMXQc3WWkc0oM2C0aAn6GFqqMcS/mHTw==", + "node_modules/@ethersproject/transactions": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", + "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.6.0", - "@ethersproject/basex": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/pbkdf2": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/sha2": "^5.6.0", - "@ethersproject/signing-key": "^5.6.0", - "@ethersproject/strings": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "@ethersproject/wordlists": "^5.6.0" - }, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], "dependencies": { - "@ethersproject/abstract-provider": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz", - "integrity": "sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/networks": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "@ethersproject/web": "^5.6.0" - } + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0" + } + }, + "node_modules/@ethersproject/units": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz", + "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } + }, + "node_modules/@ethersproject/wallet": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz", + "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "@ethersproject/abstract-signer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.6.0.tgz", - "integrity": "sha512-WOqnG0NJKtI8n0wWZPReHtaLkDByPL67tn4nBaDAhmVq8sjHTPbCdz4DRhVu/cfTOvfy9w3iq5QZ7BX7zw56BQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0" - } + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/json-wallets": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "node_modules/@ethersproject/web": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", + "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "@ethersproject/address": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.6.0.tgz", - "integrity": "sha512-6nvhYXjbXsHPS+30sHZ+U4VMagFC/9zAk6Gd/h3S21YW4+yfb0WfRtaAIZ4kfM4rrVwqiy284LP0GtL5HXGLxQ==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/rlp": "^5.6.0" - } - }, - "@ethersproject/base64": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.6.0.tgz", - "integrity": "sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0" - } - }, - "@ethersproject/bignumber": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.6.0.tgz", - "integrity": "sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "bn.js": "^4.11.9" - } - }, - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/constants": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.6.0.tgz", - "integrity": "sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0" - } - }, - "@ethersproject/keccak256": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.6.0.tgz", - "integrity": "sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "js-sha3": "0.8.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true - }, - "@ethersproject/networks": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.2.tgz", - "integrity": "sha512-9uEzaJY7j5wpYGTojGp8U89mSsgQLc40PCMJLMCnFXTs7nhBveZ0t7dbqWUNrepWTszDbFkYD6WlL8DKx5huHA==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/properties": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.6.0.tgz", - "integrity": "sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/rlp": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.6.0.tgz", - "integrity": "sha512-dz9WR1xpcTL+9DtOT/aDO+YyxSSdO8YIS0jyZwHHSlAmnxA6cKU3TrTd4Xc/bHayctxTgGLYNuVVoiXE4tTq1g==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/signing-key": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.6.0.tgz", - "integrity": "sha512-S+njkhowmLeUu/r7ir8n78OUKx63kBdMCPssePS89So1TH4hZqnWFsThEd/GiXYp9qMxVrydf7KdM9MTGPFukA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } - }, - "@ethersproject/strings": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.6.0.tgz", - "integrity": "sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/transactions": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.6.0.tgz", - "integrity": "sha512-4HX+VOhNjXHZyGzER6E/LVI2i6lf9ejYeWD6l4g50AdmimyuStKc39kvKf1bXWQMg7QNVh+uC7dYwtaZ02IXeg==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/rlp": "^5.6.0", - "@ethersproject/signing-key": "^5.6.0" - } - }, - "@ethersproject/web": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.6.0.tgz", - "integrity": "sha512-G/XHj0hV1FxI2teHRfCGvfBUHFmU+YOSbCxlAMqJklxSa7QMiHFQfAxvwY2PFqgvdkxEKwRNr/eCjfAPEm2Ctg==", - "dev": true, - "requires": { - "@ethersproject/base64": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" + } + }, + "node_modules/@ethersproject/wordlists": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz", + "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" } + ], + "dependencies": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" } }, - "@ethersproject/json-wallets": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.6.0.tgz", - "integrity": "sha512-fmh86jViB9r0ibWXTQipxpAGMiuxoqUf78oqJDlCAJXgnJF024hOOX7qVgqsjtbeoxmcLwpPsXNU0WEe/16qPQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.6.0", - "@ethersproject/address": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/hdnode": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/pbkdf2": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/random": "^5.6.0", - "@ethersproject/strings": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "aes-js": "3.0.0", - "scrypt-js": "3.0.1" - }, + "node_modules/@iexec/interface": { + "version": "3.0.35-8", + "resolved": "https://registry.npmjs.org/@iexec/interface/-/interface-3.0.35-8.tgz", + "integrity": "sha512-JkO9bpfpTBCOtJz/TEPzFTLlgamv7fll8RUpwC+8P6UWlGGwCe/IvgAeUZzIJ/syXaAhC0KZ7/03BEiee3f8fg==" + }, + "node_modules/@iexec/solidity": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@iexec/solidity/-/solidity-0.1.1.tgz", + "integrity": "sha512-XLCihhVxsA77Ug9tVnz0uiUAzVdpZGlkSzfoUTLUfYDxUr+iwXJ6zvsBKomnAvvLsRJ0lb4qiBmSMpGtZ9am4w==", "dependencies": { - "@ethersproject/abstract-provider": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz", - "integrity": "sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/networks": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "@ethersproject/web": "^5.6.0" - } - }, - "@ethersproject/abstract-signer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.6.0.tgz", - "integrity": "sha512-WOqnG0NJKtI8n0wWZPReHtaLkDByPL67tn4nBaDAhmVq8sjHTPbCdz4DRhVu/cfTOvfy9w3iq5QZ7BX7zw56BQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0" - } - }, - "@ethersproject/address": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.6.0.tgz", - "integrity": "sha512-6nvhYXjbXsHPS+30sHZ+U4VMagFC/9zAk6Gd/h3S21YW4+yfb0WfRtaAIZ4kfM4rrVwqiy284LP0GtL5HXGLxQ==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/rlp": "^5.6.0" - } - }, - "@ethersproject/base64": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.6.0.tgz", - "integrity": "sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0" - } - }, - "@ethersproject/bignumber": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.6.0.tgz", - "integrity": "sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "bn.js": "^4.11.9" - } - }, - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/constants": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.6.0.tgz", - "integrity": "sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0" - } - }, - "@ethersproject/keccak256": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.6.0.tgz", - "integrity": "sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "js-sha3": "0.8.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true - }, - "@ethersproject/networks": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.2.tgz", - "integrity": "sha512-9uEzaJY7j5wpYGTojGp8U89mSsgQLc40PCMJLMCnFXTs7nhBveZ0t7dbqWUNrepWTszDbFkYD6WlL8DKx5huHA==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/properties": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.6.0.tgz", - "integrity": "sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/rlp": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.6.0.tgz", - "integrity": "sha512-dz9WR1xpcTL+9DtOT/aDO+YyxSSdO8YIS0jyZwHHSlAmnxA6cKU3TrTd4Xc/bHayctxTgGLYNuVVoiXE4tTq1g==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/signing-key": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.6.0.tgz", - "integrity": "sha512-S+njkhowmLeUu/r7ir8n78OUKx63kBdMCPssePS89So1TH4hZqnWFsThEd/GiXYp9qMxVrydf7KdM9MTGPFukA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } - }, - "@ethersproject/strings": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.6.0.tgz", - "integrity": "sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/transactions": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.6.0.tgz", - "integrity": "sha512-4HX+VOhNjXHZyGzER6E/LVI2i6lf9ejYeWD6l4g50AdmimyuStKc39kvKf1bXWQMg7QNVh+uC7dYwtaZ02IXeg==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/rlp": "^5.6.0", - "@ethersproject/signing-key": "^5.6.0" - } - }, - "@ethersproject/web": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.6.0.tgz", - "integrity": "sha512-G/XHj0hV1FxI2teHRfCGvfBUHFmU+YOSbCxlAMqJklxSa7QMiHFQfAxvwY2PFqgvdkxEKwRNr/eCjfAPEm2Ctg==", - "dev": true, - "requires": { - "@ethersproject/base64": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } + "@openzeppelin/contracts": "3.2.0", + "solstruct": "0.1.0" + } + }, + "node_modules/@iexec/solidity/node_modules/@openzeppelin/contracts": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.2.0.tgz", + "integrity": "sha512-bUOmkSoPkjnUyMiKo6RYnb0VHBk5D9KKDAgNLzF41aqAM3TeE0yGdFF5dVRcV60pZdJLlyFT/jjXIZCWyyEzAQ==" + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true, + "peer": true + }, + "node_modules/@morgan-stanley/ts-mocking-bird": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@morgan-stanley/ts-mocking-bird/-/ts-mocking-bird-0.6.4.tgz", + "integrity": "sha512-57VJIflP8eR2xXa9cD1LUawh+Gh+BVQfVu0n6GALyg/AqV/Nz25kDRvws3i9kIe1PTrbsZZOYpsYp6bXPd6nVA==", + "dev": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.16", + "uuid": "^7.0.3" + }, + "peerDependencies": { + "jasmine": "2.x || 3.x || 4.x", + "jest": "26.x || 27.x || 28.x", + "typescript": ">=4.2" + }, + "peerDependenciesMeta": { + "jasmine": { + "optional": true }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true + "jest": { + "optional": true } } }, - "@ethersproject/keccak256": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.4.0.tgz", - "integrity": "sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A==", + "node_modules/@morgan-stanley/ts-mocking-bird/node_modules/uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", "dev": true, - "requires": { - "@ethersproject/bytes": "^5.4.0", - "js-sha3": "0.5.7" + "peer": true, + "bin": { + "uuid": "dist/bin/uuid" } }, - "@ethersproject/logger": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.4.0.tgz", - "integrity": "sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ==", - "dev": true + "node_modules/@noble/curves": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", + "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.3.1" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } }, - "@ethersproject/networks": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.4.1.tgz", - "integrity": "sha512-8SvowCKz9Uf4xC5DTKI8+il8lWqOr78kmiqAVLYT9lzB8aSmJHQMD1GSuJI0CW4hMAnzocpGpZLgiMdzsNSPig==", + "node_modules/@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", "dev": true, - "requires": { - "@ethersproject/logger": "^5.4.0" + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "@ethersproject/pbkdf2": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.6.0.tgz", - "integrity": "sha512-Wu1AxTgJo3T3H6MIu/eejLFok9TYoSdgwRr5oGY1LTLfmGesDoSx05pemsbrPT2gG4cQME+baTSCp5sEo2erZQ==", + "node_modules/@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/sha2": "^5.6.0" + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nomicfoundation/ethereumjs-block": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-4.2.2.tgz", + "integrity": "sha512-atjpt4gc6ZGZUPHBAQaUJsm1l/VCo7FmyQ780tMGO8QStjLdhz09dXynmhwVTy5YbRr0FOh/uX3QaEM0yIB2Zg==", + "dev": true, "dependencies": { - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-trie": "5.0.5", + "@nomicfoundation/ethereumjs-tx": "4.1.2", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "ethereum-cryptography": "0.1.3" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-blockchain": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-6.2.2.tgz", + "integrity": "sha512-6AIB2MoTEPZJLl6IRKcbd8mUmaBAQ/NMe3O7OsAOIiDjMNPPH5KaUQiLfbVlegT4wKIg/GOsFH7XlH2KDVoJNg==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-block": "4.2.2", + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-ethash": "2.0.5", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-trie": "5.0.5", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "abstract-level": "^1.0.3", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "level": "^8.0.0", + "lru-cache": "^5.1.1", + "memory-level": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-blockchain/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "@ethersproject/properties": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.4.0.tgz", - "integrity": "sha512-7jczalGVRAJ+XSRvNA6D5sAwT4gavLq3OXPuV/74o3Rd2wuzSL035IMpIMgei4CYyBdialJMrTqkOnzccLHn4A==", + "node_modules/@nomicfoundation/ethereumjs-blockchain/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "requires": { - "@ethersproject/logger": "^5.4.0" + "dependencies": { + "yallist": "^3.0.2" } }, - "@ethersproject/providers": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.6.4.tgz", - "integrity": "sha512-WAdknnaZ52hpHV3qPiJmKx401BLpup47h36Axxgre9zT+doa/4GC/Ne48ICPxTm0BqndpToHjpLP1ZnaxyE+vw==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/abstract-signer": "^5.6.0", - "@ethersproject/address": "^5.6.0", - "@ethersproject/basex": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/hash": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/networks": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/random": "^5.6.0", - "@ethersproject/rlp": "^5.6.0", - "@ethersproject/sha2": "^5.6.0", - "@ethersproject/strings": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "@ethersproject/web": "^5.6.0", - "bech32": "1.1.4", - "ws": "7.4.6" + "node_modules/@nomicfoundation/ethereumjs-blockchain/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@nomicfoundation/ethereumjs-blockchain/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/@nomicfoundation/ethereumjs-common": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-3.1.2.tgz", + "integrity": "sha512-JAEBpIua62dyObHM9KI2b4wHZcRQYYge9gxiygTWa3lNCr2zo+K0TbypDpgiNij5MCGNWP1eboNfNfx1a3vkvA==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-util": "8.0.6", + "crc-32": "^1.2.0" + } + }, + "node_modules/@nomicfoundation/ethereumjs-ethash": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-2.0.5.tgz", + "integrity": "sha512-xlLdcICGgAYyYmnI3r1t0R5fKGBJNDQSOQxXNjVO99JmxJIdXR5MgPo5CSJO1RpyzKOgzi3uIFn8agv564dZEQ==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-block": "4.2.2", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "abstract-level": "^1.0.3", + "bigint-crypto-utils": "^3.0.23", + "ethereum-cryptography": "0.1.3" }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-evm": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-1.3.2.tgz", + "integrity": "sha512-I00d4MwXuobyoqdPe/12dxUQxTYzX8OckSaWsMcWAfQhgVDvBx6ffPyP/w1aL0NW7MjyerySPcSVfDJAMHjilw==", + "dev": true, "dependencies": { - "@ethersproject/abstract-provider": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz", - "integrity": "sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/networks": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "@ethersproject/web": "^5.6.0" - } - }, - "@ethersproject/abstract-signer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.6.0.tgz", - "integrity": "sha512-WOqnG0NJKtI8n0wWZPReHtaLkDByPL67tn4nBaDAhmVq8sjHTPbCdz4DRhVu/cfTOvfy9w3iq5QZ7BX7zw56BQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0" - } - }, - "@ethersproject/address": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.6.0.tgz", - "integrity": "sha512-6nvhYXjbXsHPS+30sHZ+U4VMagFC/9zAk6Gd/h3S21YW4+yfb0WfRtaAIZ4kfM4rrVwqiy284LP0GtL5HXGLxQ==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/rlp": "^5.6.0" - } - }, - "@ethersproject/base64": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.6.0.tgz", - "integrity": "sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0" - } - }, - "@ethersproject/bignumber": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.6.0.tgz", - "integrity": "sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "bn.js": "^4.11.9" - } - }, - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/constants": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.6.0.tgz", - "integrity": "sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0" - } - }, - "@ethersproject/hash": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.6.0.tgz", - "integrity": "sha512-fFd+k9gtczqlr0/BruWLAu7UAOas1uRRJvOR84uDf4lNZ+bTkGl366qvniUZHKtlqxBRU65MkOobkmvmpHU+jA==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.6.0", - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } - }, - "@ethersproject/keccak256": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.6.0.tgz", - "integrity": "sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "js-sha3": "0.8.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true - }, - "@ethersproject/networks": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.2.tgz", - "integrity": "sha512-9uEzaJY7j5wpYGTojGp8U89mSsgQLc40PCMJLMCnFXTs7nhBveZ0t7dbqWUNrepWTszDbFkYD6WlL8DKx5huHA==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/properties": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.6.0.tgz", - "integrity": "sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/rlp": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.6.0.tgz", - "integrity": "sha512-dz9WR1xpcTL+9DtOT/aDO+YyxSSdO8YIS0jyZwHHSlAmnxA6cKU3TrTd4Xc/bHayctxTgGLYNuVVoiXE4tTq1g==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/signing-key": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.6.0.tgz", - "integrity": "sha512-S+njkhowmLeUu/r7ir8n78OUKx63kBdMCPssePS89So1TH4hZqnWFsThEd/GiXYp9qMxVrydf7KdM9MTGPFukA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } - }, - "@ethersproject/strings": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.6.0.tgz", - "integrity": "sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/transactions": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.6.0.tgz", - "integrity": "sha512-4HX+VOhNjXHZyGzER6E/LVI2i6lf9ejYeWD6l4g50AdmimyuStKc39kvKf1bXWQMg7QNVh+uC7dYwtaZ02IXeg==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/rlp": "^5.6.0", - "@ethersproject/signing-key": "^5.6.0" - } - }, - "@ethersproject/web": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.6.0.tgz", - "integrity": "sha512-G/XHj0hV1FxI2teHRfCGvfBUHFmU+YOSbCxlAMqJklxSa7QMiHFQfAxvwY2PFqgvdkxEKwRNr/eCjfAPEm2Ctg==", - "dev": true, - "requires": { - "@ethersproject/base64": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "@types/async-eventemitter": "^0.2.1", + "async-eventemitter": "^0.2.4", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "mcl-wasm": "^0.7.1", + "rustbn.js": "~0.2.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-evm/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "@ethersproject/random": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.6.0.tgz", - "integrity": "sha512-si0PLcLjq+NG/XHSZz90asNf+YfKEqJGVdxoEkSukzbnBgC8rydbgbUgBbBGLeHN4kAJwUFEKsu3sCXT93YMsw==", + "node_modules/@nomicfoundation/ethereumjs-evm/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@nomicfoundation/ethereumjs-rlp": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-4.0.3.tgz", + "integrity": "sha512-DZMzB/lqPK78T6MluyXqtlRmOMcsZbTTbbEyAjo0ncaff2mqu/k8a79PBcyvpgAhWD/R59Fjq/x3ro5Lof0AtA==", "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0" + "bin": { + "rlp": "bin/rlp" }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-statemanager": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-1.0.5.tgz", + "integrity": "sha512-CAhzpzTR5toh/qOJIZUUOnWekUXuRqkkzaGAQrVcF457VhtCmr+ddZjjK50KNZ524c1XP8cISguEVNqJ6ij1sA==", + "dev": true, "dependencies": { - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true - } + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-trie": "5.0.5", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "functional-red-black-tree": "^1.0.1" } }, - "@ethersproject/rlp": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.4.0.tgz", - "integrity": "sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg==", + "node_modules/@nomicfoundation/ethereumjs-statemanager/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "requires": { - "@ethersproject/bytes": "^5.4.0", - "@ethersproject/logger": "^5.4.0" + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "@ethersproject/sha2": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.6.0.tgz", - "integrity": "sha512-1tNWCPFLu1n3JM9t4/kytz35DkuF9MxqkGGEHNauEbaARdm2fafnOyw1s0tIQDPKF/7bkP1u3dbrmjpn5CelyA==", + "node_modules/@nomicfoundation/ethereumjs-statemanager/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@nomicfoundation/ethereumjs-trie": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-5.0.5.tgz", + "integrity": "sha512-+8sNZrXkzvA1NH5F4kz5RSYl1I6iaRz7mAZRsyxOm0IVY4UaP43Ofvfp/TwOalFunurQrYB5pRO40+8FBcxFMA==", "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "hash.js": "1.1.7" + "dependencies": { + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "ethereum-cryptography": "0.1.3", + "readable-stream": "^3.6.0" }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-tx": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-4.1.2.tgz", + "integrity": "sha512-emJBJZpmTdUa09cqxQqHaysbBI9Od353ZazeH7WgPb35miMgNY6mb7/3vBA98N5lUW/rgkiItjX0KZfIzihSoQ==", + "dev": true, "dependencies": { - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true - } + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "ethereum-cryptography": "0.1.3" + }, + "engines": { + "node": ">=14" } }, - "@ethersproject/signing-key": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.4.0.tgz", - "integrity": "sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A==", + "node_modules/@nomicfoundation/ethereumjs-util": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-8.0.6.tgz", + "integrity": "sha512-jOQfF44laa7xRfbfLXojdlcpkvxeHrE2Xu7tSeITsWFgoII163MzjOwFEzSNozHYieFysyoEMhCdP+NY5ikstw==", "dev": true, - "requires": { - "@ethersproject/bytes": "^5.4.0", - "@ethersproject/logger": "^5.4.0", - "@ethersproject/properties": "^5.4.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.7" + "dependencies": { + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "ethereum-cryptography": "0.1.3" + }, + "engines": { + "node": ">=14" } }, - "@ethersproject/solidity": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.6.0.tgz", - "integrity": "sha512-YwF52vTNd50kjDzqKaoNNbC/r9kMDPq3YzDWmsjFTRBcIF1y4JCQJ8gB30wsTfHbaxgxelI5BfxQSxD/PbJOww==", + "node_modules/@nomicfoundation/ethereumjs-vm": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-6.4.2.tgz", + "integrity": "sha512-PRTyxZMP6kx+OdAzBhuH1LD2Yw+hrSpaytftvaK//thDy2OI07S0nrTdbrdk7b8ZVPAc9H9oTwFBl3/wJ3w15g==", "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/sha2": "^5.6.0", - "@ethersproject/strings": "^5.6.0" + "dependencies": { + "@nomicfoundation/ethereumjs-block": "4.2.2", + "@nomicfoundation/ethereumjs-blockchain": "6.2.2", + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-evm": "1.3.2", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-statemanager": "1.0.5", + "@nomicfoundation/ethereumjs-trie": "5.0.5", + "@nomicfoundation/ethereumjs-tx": "4.1.2", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "@types/async-eventemitter": "^0.2.1", + "async-eventemitter": "^0.2.4", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "functional-red-black-tree": "^1.0.1", + "mcl-wasm": "^0.7.1", + "rustbn.js": "~0.2.0" }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@nomicfoundation/ethereumjs-vm/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "dependencies": { - "@ethersproject/bignumber": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.6.0.tgz", - "integrity": "sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "bn.js": "^4.11.9" - } - }, - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/constants": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.6.0.tgz", - "integrity": "sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0" - } - }, - "@ethersproject/keccak256": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.6.0.tgz", - "integrity": "sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "js-sha3": "0.8.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true - }, - "@ethersproject/strings": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.6.0.tgz", - "integrity": "sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "@ethersproject/strings": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.4.0.tgz", - "integrity": "sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA==", + "node_modules/@nomicfoundation/ethereumjs-vm/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@nomicfoundation/hardhat-chai-matchers": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-1.0.6.tgz", + "integrity": "sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ==", "dev": true, - "requires": { - "@ethersproject/bytes": "^5.4.0", - "@ethersproject/constants": "^5.4.0", - "@ethersproject/logger": "^5.4.0" + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.1.2", + "@types/chai-as-promised": "^7.1.3", + "chai-as-promised": "^7.1.1", + "deep-eql": "^4.0.1", + "ordinal": "^1.0.3" + }, + "peerDependencies": { + "@nomiclabs/hardhat-ethers": "^2.0.0", + "chai": "^4.2.0", + "ethers": "^5.0.0", + "hardhat": "^2.9.4" } }, - "@ethersproject/transactions": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.4.0.tgz", - "integrity": "sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ==", + "node_modules/@nomicfoundation/hardhat-chai-matchers/node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, - "requires": { - "@ethersproject/address": "^5.4.0", - "@ethersproject/bignumber": "^5.4.0", - "@ethersproject/bytes": "^5.4.0", - "@ethersproject/constants": "^5.4.0", - "@ethersproject/keccak256": "^5.4.0", - "@ethersproject/logger": "^5.4.0", - "@ethersproject/properties": "^5.4.0", - "@ethersproject/rlp": "^5.4.0", - "@ethersproject/signing-key": "^5.4.0" + "peer": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" } }, - "@ethersproject/units": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.6.0.tgz", - "integrity": "sha512-tig9x0Qmh8qbo1w8/6tmtyrm/QQRviBh389EQ+d8fP4wDsBrJBf08oZfoiz1/uenKK9M78yAP4PoR7SsVoTjsw==", + "node_modules/@nomicfoundation/hardhat-network-helpers": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.11.tgz", + "integrity": "sha512-uGPL7QSKvxrHRU69dx8jzoBvuztlLCtyFsbgfXIwIjnO3dqZRz2GNMHJoO3C3dIiUNM6jdNF4AUnoQKDscdYrA==", "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/logger": "^5.6.0" + "dependencies": { + "ethereumjs-util": "^7.1.4" }, + "peerDependencies": { + "hardhat": "^2.9.5" + } + }, + "node_modules/@nomicfoundation/hardhat-toolbox": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.2.tgz", + "integrity": "sha512-vnN1AzxbvpSx9pfdRHbUzTRIXpMLPXnUlkW855VaDk6N1pwRaQ2gNzEmFAABk4lWf11E00PKwFd/q27HuwYrYg==", + "dev": true, + "peerDependencies": { + "@ethersproject/abi": "^5.4.7", + "@ethersproject/providers": "^5.4.7", + "@nomicfoundation/hardhat-chai-matchers": "^1.0.0", + "@nomicfoundation/hardhat-network-helpers": "^1.0.0", + "@nomiclabs/hardhat-ethers": "^2.0.0", + "@nomiclabs/hardhat-etherscan": "^3.0.0", + "@typechain/ethers-v5": "^10.1.0", + "@typechain/hardhat": "^6.1.2", + "@types/chai": "^4.2.0", + "@types/mocha": ">=9.1.0", + "@types/node": ">=12.0.0", + "chai": "^4.2.0", + "ethers": "^5.4.7", + "hardhat": "^2.11.0", + "hardhat-gas-reporter": "^1.0.8", + "solidity-coverage": "^0.8.1", + "ts-node": ">=8.0.0", + "typechain": "^8.1.0", + "typescript": ">=4.5.0" + } + }, + "node_modules/@nomicfoundation/slang": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang/-/slang-0.17.0.tgz", + "integrity": "sha512-1GlkGRcGpVnjFw9Z1vvDKOKo2mzparFt7qrl2pDxWp+jrVtlvej98yCMX52pVyrYE7ZeOSZFnx/DtsSgoukStQ==", + "dev": true, "dependencies": { - "@ethersproject/bignumber": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.6.0.tgz", - "integrity": "sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "bn.js": "^4.11.9" - } - }, - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/constants": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.6.0.tgz", - "integrity": "sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true - } + "@nomicfoundation/slang-darwin-arm64": "0.17.0", + "@nomicfoundation/slang-darwin-x64": "0.17.0", + "@nomicfoundation/slang-linux-arm64-gnu": "0.17.0", + "@nomicfoundation/slang-linux-arm64-musl": "0.17.0", + "@nomicfoundation/slang-linux-x64-gnu": "0.17.0", + "@nomicfoundation/slang-linux-x64-musl": "0.17.0", + "@nomicfoundation/slang-win32-arm64-msvc": "0.17.0", + "@nomicfoundation/slang-win32-ia32-msvc": "0.17.0", + "@nomicfoundation/slang-win32-x64-msvc": "0.17.0" + }, + "engines": { + "node": ">= 10" } }, - "@ethersproject/wallet": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.6.0.tgz", - "integrity": "sha512-qMlSdOSTyp0MBeE+r7SUhr1jjDlC1zAXB8VD84hCnpijPQiSNbxr6GdiLXxpUs8UKzkDiNYYC5DRI3MZr+n+tg==", + "node_modules/@nomicfoundation/slang-darwin-arm64": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-darwin-arm64/-/slang-darwin-arm64-0.17.0.tgz", + "integrity": "sha512-O0q94EUtoWy9A5kOTOa9/khtxXDYnLqmuda9pQELurSiwbQEVCPQL8kb34VbOW+ifdre66JM/05Xw9JWhIZ9sA==", "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/abstract-signer": "^5.6.0", - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/hash": "^5.6.0", - "@ethersproject/hdnode": "^5.6.0", - "@ethersproject/json-wallets": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/random": "^5.6.0", - "@ethersproject/signing-key": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "@ethersproject/wordlists": "^5.6.0" + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/slang-darwin-x64": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-darwin-x64/-/slang-darwin-x64-0.17.0.tgz", + "integrity": "sha512-IaDbHzvT08sBK2HyGzonWhq1uu8IxdjmTqAWHr25Oh/PYnamdi8u4qchZXXYKz/DHLoYN3vIpBXoqLQIomhD/g==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/slang-linux-arm64-gnu": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-arm64-gnu/-/slang-linux-arm64-gnu-0.17.0.tgz", + "integrity": "sha512-Lj4anvOsQZxs1SycG8VyT2Rl2oqIhyLSUCgGepTt3CiJ/bM+8r8bLJIgh8vKkki4BWz49YsYIgaJB2IPv8FFTw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/slang-linux-arm64-musl": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-arm64-musl/-/slang-linux-arm64-musl-0.17.0.tgz", + "integrity": "sha512-/xkTCa9d5SIWUBQE3BmLqDFfJRr4yUBwbl4ynPiGUpRXrD69cs6pWKkwjwz/FdBpXqVo36I+zY95qzoTj/YhOA==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/slang-linux-x64-gnu": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-x64-gnu/-/slang-linux-x64-gnu-0.17.0.tgz", + "integrity": "sha512-oe5IO5vntOqYvTd67deCHPIWuSuWm6aYtT2/0Kqz2/VLtGz4ClEulBSRwfnNzBVtw2nksWipE1w8BzhImI7Syg==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/slang-linux-x64-musl": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-x64-musl/-/slang-linux-x64-musl-0.17.0.tgz", + "integrity": "sha512-PpYCI5K/kgLAMXaPY0V4VST5gCDprEOh7z/47tbI8kJQumI5odjsj/Cs8MpTo7/uRH6flKYbVNgUzcocWVYrAQ==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/slang-win32-arm64-msvc": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-win32-arm64-msvc/-/slang-win32-arm64-msvc-0.17.0.tgz", + "integrity": "sha512-u/Mkf7OjokdBilP7QOJj6QYJU4/mjkbKnTX21wLyCIzeVWS7yafRPYpBycKIBj2pRRZ6ceAY5EqRpb0aiCq+0Q==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/slang-win32-ia32-msvc": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-win32-ia32-msvc/-/slang-win32-ia32-msvc-0.17.0.tgz", + "integrity": "sha512-XJBVQfNnZQUv0tP2JSJ573S+pmgrLWgqSZOGaMllnB/TL1gRci4Z7dYRJUF2s82GlRJE+FHSI2Ro6JISKmlXCg==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/slang-win32-x64-msvc": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-win32-x64-msvc/-/slang-win32-x64-msvc-0.17.0.tgz", + "integrity": "sha512-zPGsAeiTfqfPNYHD8BfrahQmYzA78ZraoHKTGraq/1xwJwzBK4bu/NtvVA4pJjBV+B4L6DCxVhSbpn40q26JQA==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz", + "integrity": "sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg==", + "dev": true, + "engines": { + "node": ">= 12" }, - "dependencies": { - "@ethersproject/abstract-provider": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz", - "integrity": "sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/networks": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "@ethersproject/web": "^5.6.0" - } - }, - "@ethersproject/abstract-signer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.6.0.tgz", - "integrity": "sha512-WOqnG0NJKtI8n0wWZPReHtaLkDByPL67tn4nBaDAhmVq8sjHTPbCdz4DRhVu/cfTOvfy9w3iq5QZ7BX7zw56BQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0" - } - }, - "@ethersproject/address": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.6.0.tgz", - "integrity": "sha512-6nvhYXjbXsHPS+30sHZ+U4VMagFC/9zAk6Gd/h3S21YW4+yfb0WfRtaAIZ4kfM4rrVwqiy284LP0GtL5HXGLxQ==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/rlp": "^5.6.0" - } - }, - "@ethersproject/base64": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.6.0.tgz", - "integrity": "sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0" - } - }, - "@ethersproject/bignumber": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.6.0.tgz", - "integrity": "sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "bn.js": "^4.11.9" - } - }, - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/constants": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.6.0.tgz", - "integrity": "sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0" - } - }, - "@ethersproject/hash": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.6.0.tgz", - "integrity": "sha512-fFd+k9gtczqlr0/BruWLAu7UAOas1uRRJvOR84uDf4lNZ+bTkGl366qvniUZHKtlqxBRU65MkOobkmvmpHU+jA==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.6.0", - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } - }, - "@ethersproject/keccak256": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.6.0.tgz", - "integrity": "sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "js-sha3": "0.8.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true - }, - "@ethersproject/networks": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.2.tgz", - "integrity": "sha512-9uEzaJY7j5wpYGTojGp8U89mSsgQLc40PCMJLMCnFXTs7nhBveZ0t7dbqWUNrepWTszDbFkYD6WlL8DKx5huHA==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/properties": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.6.0.tgz", - "integrity": "sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/rlp": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.6.0.tgz", - "integrity": "sha512-dz9WR1xpcTL+9DtOT/aDO+YyxSSdO8YIS0jyZwHHSlAmnxA6cKU3TrTd4Xc/bHayctxTgGLYNuVVoiXE4tTq1g==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/signing-key": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.6.0.tgz", - "integrity": "sha512-S+njkhowmLeUu/r7ir8n78OUKx63kBdMCPssePS89So1TH4hZqnWFsThEd/GiXYp9qMxVrydf7KdM9MTGPFukA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } - }, - "@ethersproject/strings": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.6.0.tgz", - "integrity": "sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/transactions": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.6.0.tgz", - "integrity": "sha512-4HX+VOhNjXHZyGzER6E/LVI2i6lf9ejYeWD6l4g50AdmimyuStKc39kvKf1bXWQMg7QNVh+uC7dYwtaZ02IXeg==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/rlp": "^5.6.0", - "@ethersproject/signing-key": "^5.6.0" - } - }, - "@ethersproject/web": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.6.0.tgz", - "integrity": "sha512-G/XHj0hV1FxI2teHRfCGvfBUHFmU+YOSbCxlAMqJklxSa7QMiHFQfAxvwY2PFqgvdkxEKwRNr/eCjfAPEm2Ctg==", - "dev": true, - "requires": { - "@ethersproject/base64": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true - } + "optionalDependencies": { + "@nomicfoundation/solidity-analyzer-darwin-arm64": "0.1.1", + "@nomicfoundation/solidity-analyzer-darwin-x64": "0.1.1", + "@nomicfoundation/solidity-analyzer-freebsd-x64": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-x64-musl": "0.1.1", + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": "0.1.1", + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": "0.1.1", + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "0.1.1" + } + }, + "node_modules/@nomicfoundation/solidity-analyzer-darwin-arm64": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz", + "integrity": "sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" } }, - "@ethersproject/web": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.4.0.tgz", - "integrity": "sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og==", + "node_modules/@nomicfoundation/solidity-analyzer-darwin-x64": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.1.tgz", + "integrity": "sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA==", + "cpu": [ + "x64" + ], "dev": true, - "requires": { - "@ethersproject/base64": "^5.4.0", - "@ethersproject/bytes": "^5.4.0", - "@ethersproject/logger": "^5.4.0", - "@ethersproject/properties": "^5.4.0", - "@ethersproject/strings": "^5.4.0" + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" } }, - "@ethersproject/wordlists": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.6.0.tgz", - "integrity": "sha512-q0bxNBfIX3fUuAo9OmjlEYxP40IB8ABgb7HjEZCL5IKubzV3j30CWi2rqQbjTS2HfoyQbfINoKcTVWP4ejwR7Q==", + "node_modules/@nomicfoundation/solidity-analyzer-freebsd-x64": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.1.tgz", + "integrity": "sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA==", + "cpu": [ + "x64" + ], "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/hash": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - }, - "dependencies": { - "@ethersproject/abstract-provider": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz", - "integrity": "sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/networks": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "@ethersproject/web": "^5.6.0" - } - }, - "@ethersproject/abstract-signer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.6.0.tgz", - "integrity": "sha512-WOqnG0NJKtI8n0wWZPReHtaLkDByPL67tn4nBaDAhmVq8sjHTPbCdz4DRhVu/cfTOvfy9w3iq5QZ7BX7zw56BQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0" - } - }, - "@ethersproject/address": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.6.0.tgz", - "integrity": "sha512-6nvhYXjbXsHPS+30sHZ+U4VMagFC/9zAk6Gd/h3S21YW4+yfb0WfRtaAIZ4kfM4rrVwqiy284LP0GtL5HXGLxQ==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/rlp": "^5.6.0" - } - }, - "@ethersproject/base64": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.6.0.tgz", - "integrity": "sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0" - } - }, - "@ethersproject/bignumber": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.6.0.tgz", - "integrity": "sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "bn.js": "^4.11.9" - } - }, - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/constants": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.6.0.tgz", - "integrity": "sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0" - } - }, - "@ethersproject/hash": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.6.0.tgz", - "integrity": "sha512-fFd+k9gtczqlr0/BruWLAu7UAOas1uRRJvOR84uDf4lNZ+bTkGl366qvniUZHKtlqxBRU65MkOobkmvmpHU+jA==", - "dev": true, - "requires": { - "@ethersproject/abstract-signer": "^5.6.0", - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } - }, - "@ethersproject/keccak256": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.6.0.tgz", - "integrity": "sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "js-sha3": "0.8.0" - } - }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", - "dev": true - }, - "@ethersproject/networks": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.2.tgz", - "integrity": "sha512-9uEzaJY7j5wpYGTojGp8U89mSsgQLc40PCMJLMCnFXTs7nhBveZ0t7dbqWUNrepWTszDbFkYD6WlL8DKx5huHA==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/properties": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.6.0.tgz", - "integrity": "sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/rlp": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.6.0.tgz", - "integrity": "sha512-dz9WR1xpcTL+9DtOT/aDO+YyxSSdO8YIS0jyZwHHSlAmnxA6cKU3TrTd4Xc/bHayctxTgGLYNuVVoiXE4tTq1g==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/signing-key": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.6.0.tgz", - "integrity": "sha512-S+njkhowmLeUu/r7ir8n78OUKx63kBdMCPssePS89So1TH4hZqnWFsThEd/GiXYp9qMxVrydf7KdM9MTGPFukA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } - }, - "@ethersproject/strings": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.6.0.tgz", - "integrity": "sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/transactions": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.6.0.tgz", - "integrity": "sha512-4HX+VOhNjXHZyGzER6E/LVI2i6lf9ejYeWD6l4g50AdmimyuStKc39kvKf1bXWQMg7QNVh+uC7dYwtaZ02IXeg==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/rlp": "^5.6.0", - "@ethersproject/signing-key": "^5.6.0" - } - }, - "@ethersproject/web": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.6.0.tgz", - "integrity": "sha512-G/XHj0hV1FxI2teHRfCGvfBUHFmU+YOSbCxlAMqJklxSa7QMiHFQfAxvwY2PFqgvdkxEKwRNr/eCjfAPEm2Ctg==", - "dev": true, - "requires": { - "@ethersproject/base64": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true - } + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" } }, - "@graphql-tools/batch-execute": { - "version": "8.4.6", - "resolved": "https://registry.npmjs.org/@graphql-tools/batch-execute/-/batch-execute-8.4.6.tgz", - "integrity": "sha512-8O42fReZMssrA4HCkpK68RlRQz/QAvLfOkz+/6dDX2X7VgZtRx3VvFiJd2hFaGdNbLzklBWXF9E6hJdJGkEO5g==", + "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-gnu": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.1.tgz", + "integrity": "sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg==", + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "requires": { - "@graphql-tools/utils": "8.6.9", - "dataloader": "2.1.0", - "tslib": "~2.3.0", - "value-or-promise": "1.0.11" + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "@graphql-tools/delegate": { - "version": "8.7.7", - "resolved": "https://registry.npmjs.org/@graphql-tools/delegate/-/delegate-8.7.7.tgz", - "integrity": "sha512-Yb9UHG+Upm0M+5FgtWipXM0/Q8Vuuh1Ieod7hFDmAwHGHbmwG0YpcS/NMdxrQAZYWnli9EdnSPgDAFnWLFN+ZQ==", + "node_modules/@nomicfoundation/solidity-analyzer-linux-arm64-musl": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.1.tgz", + "integrity": "sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w==", + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "requires": { - "@graphql-tools/batch-execute": "8.4.6", - "@graphql-tools/schema": "8.3.10", - "@graphql-tools/utils": "8.6.9", - "dataloader": "2.1.0", - "graphql-executor": "0.0.23", - "tslib": "~2.3.0", - "value-or-promise": "1.0.11" + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "@graphql-tools/merge": { - "version": "8.2.10", - "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.2.10.tgz", - "integrity": "sha512-wpg22seOTNfkIO8jFAgo8w1BsT3IS2OTMpkCNf+dvcKSP09SVidYCOliyWHgjDCmpCrvvSjOX855NUKDx/Biew==", + "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-gnu": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.1.tgz", + "integrity": "sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA==", + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "requires": { - "@graphql-tools/utils": "8.6.9", - "tslib": "~2.3.0" + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "@graphql-tools/mock": { - "version": "8.6.8", - "resolved": "https://registry.npmjs.org/@graphql-tools/mock/-/mock-8.6.8.tgz", - "integrity": "sha512-zBZApp8dDAovWKZ0rkZ4CwDT8Z+B35pIyRjeHkxvtKt5XyEAabEwkuSYMyFdsghDWwhMD/VAZ/6DXtA62Hnf+A==", + "node_modules/@nomicfoundation/solidity-analyzer-linux-x64-musl": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.1.tgz", + "integrity": "sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w==", + "cpu": [ + "x64" + ], "dev": true, "optional": true, - "requires": { - "@graphql-tools/schema": "8.3.10", - "@graphql-tools/utils": "8.6.9", - "fast-json-stable-stringify": "^2.1.0", - "tslib": "~2.3.0" + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "@graphql-tools/schema": { - "version": "8.3.10", - "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.3.10.tgz", - "integrity": "sha512-tfhjSTi3OzheDrVzG7rkPZg2BbQjmZRLM2vvQoM2b1TnUwgUIbpAgcnf+AWDLRsoCOWlezeLgij1BLeAR0Q0jg==", + "node_modules/@nomicfoundation/solidity-analyzer-win32-arm64-msvc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.1.tgz", + "integrity": "sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg==", + "cpu": [ + "arm64" + ], "dev": true, "optional": true, - "requires": { - "@graphql-tools/merge": "8.2.10", - "@graphql-tools/utils": "8.6.9", - "tslib": "~2.3.0", - "value-or-promise": "1.0.11" + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" } }, - "@graphql-tools/utils": { - "version": "8.6.9", - "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.9.tgz", - "integrity": "sha512-Z1X4d4GCT81+8CSt6SgU4t1w1UAUsAIRb67mI90k/zAs+ArkB95iE3bWXuJCUmd1+r8DGGtmUNOArtd6wkt+OQ==", + "node_modules/@nomicfoundation/solidity-analyzer-win32-ia32-msvc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.1.tgz", + "integrity": "sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ==", + "cpu": [ + "ia32" + ], "dev": true, "optional": true, - "requires": { - "tslib": "~2.3.0" + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" } }, - "@iexec/erlc": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@iexec/erlc/-/erlc-1.0.0.tgz", - "integrity": "sha512-DkgdBbTnHuqryWNX+Epi3xcTOwQOuX+gMwVEiLZqHc0rgjIxtzvvmYJ9U8PXaJJNjIr07MHt7BMclEz9qQTIXg==", - "requires": { - "@openzeppelin/contracts": "^3.3.0" + "node_modules/@nomicfoundation/solidity-analyzer-win32-x64-msvc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.1.tgz", + "integrity": "sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" } }, - "@iexec/interface": { - "version": "3.0.35-8", - "resolved": "https://registry.npmjs.org/@iexec/interface/-/interface-3.0.35-8.tgz", - "integrity": "sha512-JkO9bpfpTBCOtJz/TEPzFTLlgamv7fll8RUpwC+8P6UWlGGwCe/IvgAeUZzIJ/syXaAhC0KZ7/03BEiee3f8fg==" - }, - "@iexec/solidity": { - "version": "0.1.0-legacy", - "resolved": "https://registry.npmjs.org/@iexec/solidity/-/solidity-0.1.0-legacy.tgz", - "integrity": "sha512-q5jsNoyouZ1hFWRFQIfDexDPdcf5fH4Hbfb83aKWYb/WNisyFWZJF1F6gDMLVCXFbzjZRkHhPf2Wkzomwjc6Sw==", - "requires": { - "@openzeppelin/contracts": "3.0.0-rc.0", - "solstruct": "0.0.13" - }, - "dependencies": { - "@openzeppelin/contracts": { - "version": "3.0.0-rc.0", - "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.0.0-rc.0.tgz", - "integrity": "sha512-Ts7h4/5tNiRN2iiH10Mp+6CgmK/PETDHYIJ/tpUrXgGjWR51T/Dr8kxa41GeHHhmAsuo+CkcuG9L4di6qth/Mw==" - } + "node_modules/@nomiclabs/hardhat-ethers": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz", + "integrity": "sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg==", + "dev": true, + "peer": true, + "peerDependencies": { + "ethers": "^5.0.0", + "hardhat": "^2.0.0" } }, - "@improbable-eng/grpc-web": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.13.0.tgz", - "integrity": "sha512-vaxxT+Qwb7GPqDQrBV4vAAfH0HywgOLw6xGIKXd9Q8hcV63CQhmS3p4+pZ9/wVvt4Ph3ZDK9fdC983b9aGMUFg==", + "node_modules/@nomiclabs/hardhat-etherscan": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.7.tgz", + "integrity": "sha512-tZ3TvSgpvsQ6B6OGmo1/Au6u8BrAkvs1mIC/eURA3xgIfznUZBhmpne8hv7BXUzw9xNL3fXdpOYgOQlVMTcoHQ==", "dev": true, - "optional": true, - "requires": { - "browser-headers": "^0.4.0" + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.1.2", + "@ethersproject/address": "^5.0.2", + "cbor": "^8.1.0", + "chalk": "^2.4.2", + "debug": "^4.1.1", + "fs-extra": "^7.0.1", + "lodash": "^4.17.11", + "semver": "^6.3.0", + "table": "^6.8.0", + "undici": "^5.14.0" + }, + "peerDependencies": { + "hardhat": "^2.0.4" } }, - "@josephg/resolvable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@josephg/resolvable/-/resolvable-1.0.1.tgz", - "integrity": "sha512-CtzORUwWTTOTqfVtHaKRJ0I1kNQd1bpn3sUh8I3nJDVY+5/M/Oe1DnEWzPQvqq/xPIIkzzzIP7mfCoAjFRvDhg==", + "node_modules/@nomiclabs/hardhat-etherscan/node_modules/cbor": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", + "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", "dev": true, - "optional": true + "peer": true, + "dependencies": { + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=12.19" + } }, - "@ledgerhq/devices": { - "version": "5.51.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-5.51.1.tgz", - "integrity": "sha512-4w+P0VkbjzEXC7kv8T1GJ/9AVaP9I6uasMZ/JcdwZBS3qwvKo5A5z9uGhP5c7TvItzcmPb44b5Mw2kT+WjUuAA==", + "node_modules/@nomiclabs/hardhat-etherscan/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "optional": true, - "requires": { - "@ledgerhq/errors": "^5.50.0", - "@ledgerhq/logs": "^5.50.0", - "rxjs": "6", - "semver": "^7.3.5" - }, + "peer": true, "dependencies": { - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "optional": true, - "requires": { - "lru-cache": "^6.0.0" - } + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "@ledgerhq/errors": { - "version": "5.50.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-5.50.0.tgz", - "integrity": "sha512-gu6aJ/BHuRlpU7kgVpy2vcYk6atjB4iauP2ymF7Gk0ez0Y/6VSMVSJvubeEQN+IV60+OBK0JgeIZG7OiHaw8ow==", - "dev": true, - "optional": true - }, - "@ledgerhq/hw-transport": { - "version": "5.51.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-5.51.1.tgz", - "integrity": "sha512-6wDYdbWrw9VwHIcoDnqWBaDFyviyjZWv6H9vz9Vyhe4Qd7TIFmbTl/eWs6hZvtZBza9K8y7zD8ChHwRI4s9tSw==", + "node_modules/@nomiclabs/hardhat-etherscan/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "dev": true, - "optional": true, - "requires": { - "@ledgerhq/devices": "^5.51.1", - "@ledgerhq/errors": "^5.50.0", - "events": "^3.3.0" + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" } }, - "@ledgerhq/hw-transport-webusb": { - "version": "5.53.1", - "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-5.53.1.tgz", - "integrity": "sha512-A/f+xcrkIAZiJrvPpDvsrjxQX4cI2kbdiunQkwsYmOG3Bp4z89ZnsBiC7YBst4n2/g+QgTg0/KPVtODU5djooQ==", + "node_modules/@nomiclabs/hardhat-etherscan/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, - "optional": true, - "requires": { - "@ledgerhq/devices": "^5.51.1", - "@ledgerhq/errors": "^5.50.0", - "@ledgerhq/hw-transport": "^5.51.1", - "@ledgerhq/logs": "^5.50.0" + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" } }, - "@ledgerhq/logs": { - "version": "5.50.0", - "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-5.50.0.tgz", - "integrity": "sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA==", + "node_modules/@nomiclabs/hardhat-etherscan/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true, - "optional": true - }, - "@metamask/safe-event-emitter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz", - "integrity": "sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==", - "dev": true + "peer": true }, - "@multiformats/base-x": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@multiformats/base-x/-/base-x-4.0.1.tgz", - "integrity": "sha512-eMk0b9ReBbV23xXU693TAIrLyeO5iTgBZGSJfpqriG8UkYvr/hC9u9pyMlAakDNHWmbhMZCDs6KQO0jzKD8OTw==", + "node_modules/@nomiclabs/hardhat-etherscan/node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", "dev": true, - "optional": true + "peer": true, + "engines": { + "node": ">=12.19" + } }, - "@noble/hashes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.0.0.tgz", - "integrity": "sha512-DZVbtY62kc3kkBtMHqwCOfXrT/hnoORy5BJ4+HU1IR59X0KWAOqsfzQPcUl/lQLlG7qXbe/fZ3r/emxtAl+sqg==", - "dev": true + "node_modules/@nomiclabs/hardhat-etherscan/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "peer": true, + "bin": { + "semver": "bin/semver.js" + } }, - "@noble/secp256k1": { - "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.5.5.tgz", - "integrity": "sha512-sZ1W6gQzYnu45wPrWx8D3kwI2/U29VYTx9OjbDAd7jwRItJ0cSTMPRL/C8AWZFn9kWFLQGqEXVEE86w4Z8LpIQ==", - "dev": true + "node_modules/@nomiclabs/hardhat-truffle5": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-truffle5/-/hardhat-truffle5-2.0.7.tgz", + "integrity": "sha512-Pw8451IUZp1bTp0QqCHCYfCHs66sCnyxPcaorapu9mfOV9xnZsVaFdtutnhNEiXdiZwbed7LFKpRsde4BjFwig==", + "dev": true, + "dependencies": { + "@nomiclabs/truffle-contract": "^4.2.23", + "@types/chai": "^4.2.0", + "chai": "^4.2.0", + "ethereumjs-util": "^7.1.4", + "fs-extra": "^7.0.1" + }, + "peerDependencies": { + "@nomiclabs/hardhat-web3": "^2.0.0", + "hardhat": "^2.6.4", + "web3": "^1.0.0-beta.36" + } }, - "@nodefactory/filsnap-adapter": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@nodefactory/filsnap-adapter/-/filsnap-adapter-0.2.2.tgz", - "integrity": "sha512-nbaYMwVopOXN2bWOdDY3il6gGL9qMuCmMN4WPuoxzJjSnAMJNqEeSe6MNNJ/fYBLipZcJfAtirNXRrFLFN+Tvw==", + "node_modules/@nomiclabs/hardhat-truffle5/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "dev": true, - "optional": true + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } }, - "@nodefactory/filsnap-types": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@nodefactory/filsnap-types/-/filsnap-types-0.2.2.tgz", - "integrity": "sha512-XT1tE2vrYF2D0tSNNekgjqKRpqPQn4W72eKul9dDCul/8ykouhqnVTyjFHYvBhlBWE0PK3nmG7i83QvhgGSiMw==", + "node_modules/@nomiclabs/hardhat-truffle5/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, - "optional": true + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "node_modules/@nomiclabs/hardhat-web3": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-web3/-/hardhat-web3-2.0.0.tgz", + "integrity": "sha512-zt4xN+D+fKl3wW2YlTX3k9APR3XZgPkxJYf36AcliJn3oujnKEVRZaHu0PhgLjO+gR+F/kiYayo9fgd2L8970Q==", "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "dependencies": { + "@types/bignumber.js": "^5.0.0" + }, + "peerDependencies": { + "hardhat": "^2.0.0", + "web3": "^1.0.0-beta.36" } }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true + "node_modules/@nomiclabs/truffle-contract": { + "version": "4.5.10", + "resolved": "https://registry.npmjs.org/@nomiclabs/truffle-contract/-/truffle-contract-4.5.10.tgz", + "integrity": "sha512-nF/6InFV+0hUvutyFgsdOMCoYlr//2fJbRER4itxYtQtc4/O1biTwZIKRu+5l2J5Sq6LU2WX7vZHtDgQdhWxIQ==", + "dev": true, + "dependencies": { + "@ensdomains/ensjs": "^2.0.1", + "@truffle/blockchain-utils": "^0.1.3", + "@truffle/contract-schema": "^3.4.7", + "@truffle/debug-utils": "^6.0.22", + "@truffle/error": "^0.1.0", + "@truffle/interface-adapter": "^0.5.16", + "bignumber.js": "^7.2.1", + "ethereum-ens": "^0.8.0", + "ethers": "^4.0.0-beta.1", + "source-map-support": "^0.5.19" + }, + "peerDependencies": { + "web3": "^1.2.1", + "web3-core-helpers": "^1.2.1", + "web3-core-promievent": "^1.2.1", + "web3-eth-abi": "^1.2.1", + "web3-utils": "^1.2.1" + } }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@nomiclabs/truffle-contract/node_modules/ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "dependencies": { + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" } }, - "@openzeppelin/contract-loader": { + "node_modules/@nomiclabs/truffle-contract/node_modules/hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/@nomiclabs/truffle-contract/node_modules/scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "node_modules/@nomiclabs/truffle-contract/node_modules/setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", + "dev": true + }, + "node_modules/@openzeppelin/contract-loader": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/@openzeppelin/contract-loader/-/contract-loader-0.6.3.tgz", "integrity": "sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg==", "dev": true, - "requires": { + "dependencies": { "find-up": "^4.1.0", "fs-extra": "^8.1.0" + } + }, + "node_modules/@openzeppelin/contract-loader/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@openzeppelin/contract-loader/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" } }, - "@openzeppelin/contracts": { + "node_modules/@openzeppelin/contract-loader/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@openzeppelin/contract-loader/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@openzeppelin/contracts": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.3.0.tgz", "integrity": "sha512-AemZEsQYtUp1WRkcmZm1div5ORfTpLquLaziCIrSagjxyKdmObxuaY1yjQ5SHFMctR8rLwp706NXTbiIRJg7pw==" }, - "@openzeppelin/test-helpers": { - "version": "0.5.15", - "resolved": "https://registry.npmjs.org/@openzeppelin/test-helpers/-/test-helpers-0.5.15.tgz", - "integrity": "sha512-10fS0kyOjc/UObo9iEWPNbC6MCeiQ7z97LDOJBj68g+AAs5pIGEI2h3V6G9TYTIq8VxOdwMQbfjKrx7Y3YZJtA==", + "node_modules/@openzeppelin/contracts-v5": { + "name": "@openzeppelin/contracts", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.0.2.tgz", + "integrity": "sha512-ytPc6eLGcHHnapAZ9S+5qsdomhjo6QBHTDRRBFfTxXIpsicMhVPouPgmUPebZZZGX7vt9USA+Z+0M0dSVtSUEA==" + }, + "node_modules/@openzeppelin/test-helpers": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/@openzeppelin/test-helpers/-/test-helpers-0.5.16.tgz", + "integrity": "sha512-T1EvspSfH1qQO/sgGlskLfYVBbqzJR23SZzYl/6B2JnT4EhThcI85UpvDk0BkLWKaDScQTabGHt4GzHW+3SfZg==", "dev": true, - "requires": { + "dependencies": { "@openzeppelin/contract-loader": "^0.6.2", "@truffle/contract": "^4.0.35", "ansi-colors": "^3.2.3", @@ -2734,13821 +2118,27645 @@ "web3-utils": "^1.2.5" } }, - "@protobufjs/aspromise": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", - "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=", + "node_modules/@openzeppelin/upgrades-core": { + "version": "1.37.1", + "resolved": "https://registry.npmjs.org/@openzeppelin/upgrades-core/-/upgrades-core-1.37.1.tgz", + "integrity": "sha512-dMQPDoMn1OUZXsCHT1thnAmkZ14v0FNlst5Ej8MIfujOv0k74kUok5XeuNF42fYewnNUYMkkz3PhXU1OIwSeyg==", "dev": true, - "optional": true + "dependencies": { + "@nomicfoundation/slang": "^0.17.0", + "cbor": "^9.0.0", + "chalk": "^4.1.0", + "compare-versions": "^6.0.0", + "debug": "^4.1.1", + "ethereumjs-util": "^7.0.3", + "minimatch": "^9.0.5", + "minimist": "^1.2.7", + "proper-lockfile": "^4.1.1", + "solidity-ast": "^0.4.51" + }, + "bin": { + "openzeppelin-upgrades-core": "dist/cli/cli.js" + } }, - "@protobufjs/base64": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", - "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==", + "node_modules/@openzeppelin/upgrades-core/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "optional": true + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } }, - "@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "node_modules/@openzeppelin/upgrades-core/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "optional": true + "dependencies": { + "balanced-match": "^1.0.0" + } }, - "@protobufjs/eventemitter": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", - "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=", + "node_modules/@openzeppelin/upgrades-core/node_modules/cbor": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-9.0.1.tgz", + "integrity": "sha512-/TQOWyamDxvVIv+DY9cOLNuABkoyz8K/F3QE56539pGVYohx0+MEA1f4lChFTX79dBTBS7R1PF6ovH7G+VtBfQ==", "dev": true, - "optional": true + "dependencies": { + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=16" + } }, - "@protobufjs/fetch": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", - "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "node_modules/@openzeppelin/upgrades-core/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "optional": true, - "requires": { - "@protobufjs/aspromise": "^1.1.1", - "@protobufjs/inquire": "^1.1.0" + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "@protobufjs/float": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", - "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=", + "node_modules/@openzeppelin/upgrades-core/node_modules/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==", "dev": true, - "optional": true + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } }, - "@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=", + "node_modules/@openzeppelin/upgrades-core/node_modules/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==", + "dev": true + }, + "node_modules/@openzeppelin/upgrades-core/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "optional": true + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } }, - "@protobufjs/path": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", - "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=", + "node_modules/@openzeppelin/upgrades-core/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "optional": true + "engines": { + "node": ">=8" + } }, - "@protobufjs/pool": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", - "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=", + "node_modules/@openzeppelin/upgrades-core/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, - "optional": true + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, - "@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=", + "node_modules/@openzeppelin/upgrades-core/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@openzeppelin/upgrades-core/node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", "dev": true, - "optional": true + "engines": { + "node": ">=12.19" + } }, - "@redux-saga/core": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@redux-saga/core/-/core-1.1.3.tgz", - "integrity": "sha512-8tInBftak8TPzE6X13ABmEtRJGjtK17w7VUs7qV17S8hCO5S3+aUTWZ/DBsBJPdE8Z5jOPwYALyvofgq1Ws+kg==", + "node_modules/@openzeppelin/upgrades-core/node_modules/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": { - "@babel/runtime": "^7.6.3", - "@redux-saga/deferred": "^1.1.2", - "@redux-saga/delay-p": "^1.1.2", - "@redux-saga/is": "^1.1.2", - "@redux-saga/symbols": "^1.1.2", - "@redux-saga/types": "^1.1.0", - "redux": "^4.0.4", - "typescript-tuple": "^2.2.1" + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@scure/base": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.8.tgz", + "integrity": "sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==", + "dev": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz", + "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.1.0", + "@noble/hashes": "~1.3.1", + "@scure/base": "~1.1.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", + "dev": true, "dependencies": { - "redux": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz", - "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", - "dev": true, - "requires": { - "@babel/runtime": "^7.9.2" - } - } + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "@redux-saga/deferred": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@redux-saga/deferred/-/deferred-1.1.2.tgz", - "integrity": "sha512-908rDLHFN2UUzt2jb4uOzj6afpjgJe3MjICaUNO3bvkV/kN/cNeI9PMr8BsFXB/MR8WTAZQq/PlTq8Kww3TBSQ==", + "node_modules/@sentry/core": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz", + "integrity": "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==", + "dev": true, + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/core/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "@redux-saga/delay-p": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@redux-saga/delay-p/-/delay-p-1.1.2.tgz", - "integrity": "sha512-ojc+1IoC6OP65Ts5+ZHbEYdrohmIw1j9P7HS9MOJezqMYtCDgpkoqB5enAAZrNtnbSL6gVCWPHaoaTY5KeO0/g==", + "node_modules/@sentry/hub": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz", + "integrity": "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==", "dev": true, - "requires": { - "@redux-saga/symbols": "^1.1.2" + "dependencies": { + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" } }, - "@redux-saga/is": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@redux-saga/is/-/is-1.1.2.tgz", - "integrity": "sha512-OLbunKVsCVNTKEf2cH4TYyNbbPgvmZ52iaxBD4I1fTif4+MTXMa4/Z07L83zW/hTCXwpSZvXogqMqLfex2Tg6w==", + "node_modules/@sentry/hub/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@sentry/minimal": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz", + "integrity": "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==", "dev": true, - "requires": { - "@redux-saga/symbols": "^1.1.2", - "@redux-saga/types": "^1.1.0" + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" } }, - "@redux-saga/symbols": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@redux-saga/symbols/-/symbols-1.1.2.tgz", - "integrity": "sha512-EfdGnF423glv3uMwLsGAtE6bg+R9MdqlHEzExnfagXPrIiuxwr3bdiAwz3gi+PsrQ3yBlaBpfGLtDG8rf3LgQQ==", + "node_modules/@sentry/minimal/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "@redux-saga/types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@redux-saga/types/-/types-1.1.0.tgz", - "integrity": "sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg==", + "node_modules/@sentry/node": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz", + "integrity": "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==", + "dev": true, + "dependencies": { + "@sentry/core": "5.30.0", + "@sentry/hub": "5.30.0", + "@sentry/tracing": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", + "lru_map": "^0.3.3", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@sentry/node/node_modules/cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@sentry/node/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "@repeaterjs/repeater": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@repeaterjs/repeater/-/repeater-3.0.4.tgz", - "integrity": "sha512-AW8PKd6iX3vAZ0vA43nOUOnbq/X5ihgU+mSXXqunMkeQADGiqw/PY0JNeYtD5sr0PAy51YPgAPbDoeapv9r8WA==", + "node_modules/@sentry/tracing": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz", + "integrity": "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==", "dev": true, - "optional": true + "dependencies": { + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" + } }, - "@scure/base": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.0.0.tgz", - "integrity": "sha512-gIVaYhUsy+9s58m/ETjSJVKHhKTBMmcRb9cEV5/5dwvfDlfORjKrFsDeDHWRrm6RjcPvCLZFwGJjAjLj1gg4HA==", + "node_modules/@sentry/tracing/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "@scure/bip32": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.0.1.tgz", - "integrity": "sha512-AU88KKTpQ+YpTLoicZ/qhFhRRIo96/tlb+8YmDDHR9yiKVjSsFZiefJO4wjS2PMTkz5/oIcw84uAq/8pleQURA==", + "node_modules/@sentry/types": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", + "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", "dev": true, - "requires": { - "@noble/hashes": "~1.0.0", - "@noble/secp256k1": "~1.5.2", - "@scure/base": "~1.0.0" + "engines": { + "node": ">=6" } }, - "@scure/bip39": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.0.0.tgz", - "integrity": "sha512-HrtcikLbd58PWOkl02k9V6nXWQyoa7A0+Ek9VF7z17DDk9XZAFUcIdqfh0jJXLypmizc5/8P6OxoUeKliiWv4w==", + "node_modules/@sentry/utils": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", + "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", "dev": true, - "requires": { - "@noble/hashes": "~1.0.0", - "@scure/base": "~1.0.0" + "dependencies": { + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=6" } }, - "@sindresorhus/is": { + "node_modules/@sentry/utils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@sindresorhus/is": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "@solidity-parser/parser": { + "node_modules/@solidity-parser/parser": { "version": "0.14.1", "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.1.tgz", "integrity": "sha512-eLjj2L6AuQjBB6s/ibwCAc0DwrR5Ge+ys+wgWo+bviU7fV2nTMQhU63CGaDKXg9iTmMxwhkyoggdIR7ZGRfMgw==", "dev": true, - "requires": { + "peer": true, + "dependencies": { "antlr4ts": "^0.5.0-alpha.4" } }, - "@szmarczak/http-timer": { + "node_modules/@szmarczak/http-timer": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", "dev": true, - "requires": { + "dependencies": { "defer-to-connect": "^1.0.1" + }, + "engines": { + "node": ">=6" } }, - "@textile/buckets": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@textile/buckets/-/buckets-6.2.4.tgz", - "integrity": "sha512-wyu2PMXUUs4YvDM/dEJiy8+CVM+3dTuqCVm1fBvwyYLTdjislegJjFxpHZMpZQMWK/aQfCdeZ4i3x/UJ8fCq5g==", + "node_modules/@truffle/blockchain-utils": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.3.tgz", + "integrity": "sha512-K21Wf10u6VmS12/f9OrLN98f1RCqzrmuM2zlsly4b7BF/Xdh55Iq/jNSOnsNUJa+6Iaqqz6zeidquCYu9nTFng==", + "dev": true + }, + "node_modules/@truffle/codec": { + "version": "0.14.17", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.14.17.tgz", + "integrity": "sha512-kD4dD86huLeaBEq5R8D1zleJEu6NsXbyYLdXl1V1TKdiO8odw5CBC6Y/+wdu5d3t1dyEYrTbhn1dqknZa52pmw==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.13.0", - "@repeaterjs/repeater": "^3.0.4", - "@textile/buckets-grpc": "2.6.18", - "@textile/context": "^0.12.2", - "@textile/crypto": "^4.2.1", - "@textile/grpc-authentication": "^3.4.5", - "@textile/grpc-connection": "^2.5.4", - "@textile/grpc-transport": "^0.5.2", - "@textile/hub-grpc": "2.6.18", - "@textile/hub-threads-client": "^5.5.4", - "@textile/security": "^0.9.1", - "@textile/threads-id": "^0.6.1", - "abort-controller": "^3.0.0", - "cids": "^1.1.4", - "it-drain": "^1.0.3", - "loglevel": "^1.6.8", - "native-abort-controller": "^1.0.3", - "paramap-it": "^0.1.1" - }, "dependencies": { - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - } - }, - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1" - } - }, - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", - "dev": true, - "optional": true, - "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - } - }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - } - } - }, - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true - } + "@truffle/abi-utils": "^0.3.9", + "@truffle/compile-common": "^0.9.4", + "big.js": "^6.0.3", + "bn.js": "^5.1.3", + "cbor": "^5.2.0", + "debug": "^4.3.1", + "lodash": "^4.17.21", + "semver": "7.3.7", + "utf8": "^3.0.0", + "web3-utils": "1.8.2" } }, - "@textile/buckets-grpc": { - "version": "2.6.18", - "resolved": "https://registry.npmjs.org/@textile/buckets-grpc/-/buckets-grpc-2.6.18.tgz", - "integrity": "sha512-oc1J5M9q+UPPWnf/RoMfaeITOjsgP1FzDg1iO+oZb8Mjol4VpChB+C/yePKISImjYupMgmFdlzf37chKBjZVQw==", + "node_modules/@truffle/codec/node_modules/@truffle/abi-utils": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@truffle/abi-utils/-/abi-utils-0.3.9.tgz", + "integrity": "sha512-G5dqgwRHx5zwlXjz3QT8OJVfB2cOqWwD6DwKso0KttUt/zejhCjnkKq72rSgyeLMkz7wBB9ERLOsupLBILM8MA==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.14.1", - "@types/google-protobuf": "^3.15.5", - "google-protobuf": "^3.19.4" - }, "dependencies": { - "@improbable-eng/grpc-web": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.14.1.tgz", - "integrity": "sha512-XaIYuunepPxoiGVLLHmlnVminUGzBTnXr8Wv7khzmLWbNw4TCwJKX09GSMJlKhu/TRk6gms0ySFxewaETSBqgw==", - "dev": true, - "optional": true, - "requires": { - "browser-headers": "^0.4.1" - } - } + "change-case": "3.0.2", + "fast-check": "3.1.1", + "web3-utils": "1.8.2" } }, - "@textile/context": { - "version": "0.12.2", - "resolved": "https://registry.npmjs.org/@textile/context/-/context-0.12.2.tgz", - "integrity": "sha512-io5rjca4rjCvy39LHTHUXEdPhrhxtDhov05eqi4xftqm/ID4DbLmIsDJJpJqgk8T8/n9mU4cHSFfKbn1dhxHQw==", + "node_modules/@truffle/codec/node_modules/@truffle/compile-common": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@truffle/compile-common/-/compile-common-0.9.4.tgz", + "integrity": "sha512-mnqJB/hLiPHNf+WKwt/2MH6lv34xSG/SFCib7+ckAklutUqVLeFo8EwQxinuHNkU7LY0C+YgZXhK1WTCO5YRJQ==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.13.0", - "@textile/security": "^0.9.1" + "dependencies": { + "@truffle/error": "^0.2.0", + "colors": "1.4.0" } }, - "@textile/crypto": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@textile/crypto/-/crypto-4.2.1.tgz", - "integrity": "sha512-7qxFLrXiSq5Tf3Wh3Oh6JKJMitF/6N3/AJyma6UAA8iQnAZBF98ShWz9tR59a3dvmGTc9MlyplOm16edbccscg==", + "node_modules/@truffle/codec/node_modules/@truffle/error": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.0.tgz", + "integrity": "sha512-Fe0/z4WWb7IP2gBnv3l6zqP87Y0kSMs7oiSLakKJq17q3GUunrHSdioKuNspdggxkXIBhEQLhi8C+LJdwmHKWQ==", + "dev": true + }, + "node_modules/@truffle/codec/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/@truffle/codec/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "optional": true, - "requires": { - "@types/ed2curve": "^0.2.2", - "ed2curve": "^0.3.0", - "fastestsmallesttextencoderdecoder": "^1.0.22", - "multibase": "^3.1.0", - "tweetnacl": "^1.0.3" - }, "dependencies": { - "multibase": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-3.1.2.tgz", - "integrity": "sha512-bpklWHs70LO3smJUHOjcnzGceJJvn9ui0Vau6Za0B/GBepaXswmW8Ufea0uD9pROf/qCQ4N4lZ3sf3U+SNf0tw==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1", - "web-encoding": "^1.0.6" - } - }, - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "dev": true, + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { "optional": true } } }, - "@textile/grpc-authentication": { - "version": "3.4.5", - "resolved": "https://registry.npmjs.org/@textile/grpc-authentication/-/grpc-authentication-3.4.5.tgz", - "integrity": "sha512-6K2SIJxhFUuNeq11pfRKPP70FXHuG6qBdx2jJgKqi0QPnKbyzQQrpS0cVGSPqHf66lq3dmqTTeefmlBGw9l6+w==", + "node_modules/@truffle/codec/node_modules/fast-check": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.1.1.tgz", + "integrity": "sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA==", "dev": true, - "optional": true, - "requires": { - "@textile/context": "^0.12.2", - "@textile/crypto": "^4.2.1", - "@textile/grpc-connection": "^2.5.4", - "@textile/hub-threads-client": "^5.5.4", - "@textile/security": "^0.9.1" + "dependencies": { + "pure-rand": "^5.0.1" + }, + "engines": { + "node": ">=8.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" } }, - "@textile/grpc-connection": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/@textile/grpc-connection/-/grpc-connection-2.5.4.tgz", - "integrity": "sha512-EIIJkO1PA7nRBw3b4NSFp2JV+FcHvvk2uyRs50hE1GVcIZ1GrXS8iEqw3uuJH3le7RoKvh3hsURhNqUd+81vNg==", + "node_modules/@truffle/codec/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@truffle/codec/node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.12.0", - "@textile/context": "^0.12.2", - "@textile/grpc-transport": "^0.5.2" - }, "dependencies": { - "@improbable-eng/grpc-web": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.12.0.tgz", - "integrity": "sha512-uJjgMPngreRTYPBuo6gswMj1gK39Wbqre/RgE0XnSDXJRg6ST7ZhuS53dFE6Vc2CX4jxgl+cO+0B3op8LA4Q0Q==", - "dev": true, - "optional": true, - "requires": { - "browser-headers": "^0.4.0" - } - } + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "@textile/grpc-powergate-client": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/@textile/grpc-powergate-client/-/grpc-powergate-client-2.6.2.tgz", - "integrity": "sha512-ODe22lveqPiSkBsxnhLIRKQzZVwvyqDVx6WBPQJZI4yxrja5SDOq6/yH2Dtmqyfxg8BOobFvn+tid3wexRZjnQ==", + "node_modules/@truffle/contract": { + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.5.6.tgz", + "integrity": "sha512-Io+hwP4FRgsKz29hOCu2NTpu8b6mOT0urcjPgFpvRK2pUCl/E8WmggX3uyKtcntxXjtw/8tGFqGqSwHCiUcpLw==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.14.0", - "@types/google-protobuf": "^3.15.2", - "google-protobuf": "^3.17.3" - }, "dependencies": { - "@improbable-eng/grpc-web": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.14.1.tgz", - "integrity": "sha512-XaIYuunepPxoiGVLLHmlnVminUGzBTnXr8Wv7khzmLWbNw4TCwJKX09GSMJlKhu/TRk6gms0ySFxewaETSBqgw==", - "dev": true, - "optional": true, - "requires": { - "browser-headers": "^0.4.1" - } - } + "@ensdomains/ensjs": "^2.0.1", + "@truffle/blockchain-utils": "^0.1.3", + "@truffle/contract-schema": "^3.4.7", + "@truffle/debug-utils": "^6.0.18", + "@truffle/error": "^0.1.0", + "@truffle/interface-adapter": "^0.5.14", + "bignumber.js": "^7.2.1", + "debug": "^4.3.1", + "ethers": "^4.0.32", + "web3": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-promievent": "1.5.3", + "web3-eth-abi": "1.5.3", + "web3-utils": "1.5.3" } }, - "@textile/grpc-transport": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@textile/grpc-transport/-/grpc-transport-0.5.2.tgz", - "integrity": "sha512-XEC+Ubs7/pibZU2AHDJLeCEAVNtgEWmEXBXYJubpp4SVviuGUyd4h+zvqLw4FiIBGtlxx1u//cmzANhL0Ew7Rw==", + "node_modules/@truffle/contract-schema": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/@truffle/contract-schema/-/contract-schema-3.4.7.tgz", + "integrity": "sha512-vbOHMq/a8rVPh+cFMBDDGPqqiKrXXOc+f1kB4znfh3ewOX8rJxZhGJvdMm3WNMJHR5RstqDV7ZIZ7ePwtSXH8Q==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.13.0", - "@types/ws": "^7.2.6", - "isomorphic-ws": "^4.0.1", - "loglevel": "^1.6.6", - "ws": "^7.2.1" + "dependencies": { + "ajv": "^6.10.0", + "debug": "^4.3.1" } }, - "@textile/hub": { - "version": "6.3.4", - "resolved": "https://registry.npmjs.org/@textile/hub/-/hub-6.3.4.tgz", - "integrity": "sha512-/F+rfE+zPg3cLwX7/KuHAZrm9Tt0S++wgc1jiipb7NViGeZhRz1p6JHcEy3+g+MDvyMTSITO6phKmtUMHKItKg==", + "node_modules/@truffle/contract-schema/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "optional": true, - "requires": { - "@textile/buckets": "^6.2.4", - "@textile/crypto": "^4.2.1", - "@textile/grpc-authentication": "^3.4.5", - "@textile/hub-filecoin": "^2.2.4", - "@textile/hub-grpc": "2.6.18", - "@textile/hub-threads-client": "^5.5.4", - "@textile/security": "^0.9.1", - "@textile/threads-id": "^0.6.1", - "@textile/users": "^6.2.4", - "loglevel": "^1.6.8", - "multihashes": "3.1.2" - }, "dependencies": { - "multibase": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-3.1.2.tgz", - "integrity": "sha512-bpklWHs70LO3smJUHOjcnzGceJJvn9ui0Vau6Za0B/GBepaXswmW8Ufea0uD9pROf/qCQ4N4lZ3sf3U+SNf0tw==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1", - "web-encoding": "^1.0.6" - } - }, - "multihashes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-3.1.2.tgz", - "integrity": "sha512-AP4IoV/YzkNrfbQKZE3OMPibrmy350OmCd6cJkwyM8oExaXIlOY4UnOOVSQtAEuq/LR01XfXKCESidzZvSwHCQ==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^3.1.0", - "uint8arrays": "^2.0.5", - "varint": "^6.0.0" - } - }, - "uint8arrays": { - "version": "2.1.10", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-2.1.10.tgz", - "integrity": "sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { "optional": true } } }, - "@textile/hub-filecoin": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@textile/hub-filecoin/-/hub-filecoin-2.2.4.tgz", - "integrity": "sha512-h3N6jcRkqJemAO5Bcl9c6gTFN9q2vNOdrc/256pTOM6BsPGMMVn8QU97rZ7YSP7XusyxiRu1+NLDzbPxmP2xdA==", + "node_modules/@truffle/contract-schema/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@truffle/contract/node_modules/@ethersproject/abi": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", + "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.12.0", - "@textile/context": "^0.12.2", - "@textile/crypto": "^4.2.1", - "@textile/grpc-authentication": "^3.4.5", - "@textile/grpc-connection": "^2.5.4", - "@textile/grpc-powergate-client": "^2.6.2", - "@textile/hub-grpc": "2.6.18", - "@textile/security": "^0.9.1", - "event-iterator": "^2.0.0", - "loglevel": "^1.6.8" - }, "dependencies": { - "@improbable-eng/grpc-web": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.12.0.tgz", - "integrity": "sha512-uJjgMPngreRTYPBuo6gswMj1gK39Wbqre/RgE0XnSDXJRg6ST7ZhuS53dFE6Vc2CX4jxgl+cO+0B3op8LA4Q0Q==", - "dev": true, - "optional": true, - "requires": { - "browser-headers": "^0.4.0" - } - }, - "event-iterator": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-2.0.0.tgz", - "integrity": "sha512-KGft0ldl31BZVV//jj+IAIGCxkvvUkkON+ScH6zfoX+l+omX6001ggyRSpI0Io2Hlro0ThXotswCtfzS8UkIiQ==", - "dev": true, + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" + } + }, + "node_modules/@truffle/contract/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { "optional": true } } }, - "@textile/hub-grpc": { - "version": "2.6.18", - "resolved": "https://registry.npmjs.org/@textile/hub-grpc/-/hub-grpc-2.6.18.tgz", - "integrity": "sha512-Gne0CpqBywfOeTd3OW0OQUxnJfxK/K1NYQqwl8vMEPncp4uk68YnKNHsvWK2077Ar2VfGsWJayFtyBKbQ6cOcQ==", + "node_modules/@truffle/contract/node_modules/ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.14.1", - "@types/google-protobuf": "^3.15.5", - "google-protobuf": "^3.19.4" - }, "dependencies": { - "@improbable-eng/grpc-web": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.14.1.tgz", - "integrity": "sha512-XaIYuunepPxoiGVLLHmlnVminUGzBTnXr8Wv7khzmLWbNw4TCwJKX09GSMJlKhu/TRk6gms0ySFxewaETSBqgw==", - "dev": true, - "optional": true, - "requires": { - "browser-headers": "^0.4.1" - } - } + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" } }, - "@textile/hub-threads-client": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/@textile/hub-threads-client/-/hub-threads-client-5.5.4.tgz", - "integrity": "sha512-dHgRd4Wsu1ywId2Q88FZWtkbG4iuZms6co0X7/Lld7eDL0YlrVmb8/lHEhhJqCmJq3vTUxVwviHM8kLrEHwvIw==", + "node_modules/@truffle/contract/node_modules/hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.13.0", - "@textile/context": "^0.12.2", - "@textile/hub-grpc": "2.6.18", - "@textile/security": "^0.9.1", - "@textile/threads-client": "^2.3.4", - "@textile/threads-id": "^0.6.1", - "@textile/users-grpc": "2.6.18", - "loglevel": "^1.7.0" + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" } }, - "@textile/multiaddr": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@textile/multiaddr/-/multiaddr-0.6.1.tgz", - "integrity": "sha512-OQK/kXYhtUA8yN41xltCxCiCO98Pkk8yMgUdhPDAhogvptvX4k9g6Rg0Yob18uBwN58AYUg075V//SWSK1kUCQ==", + "node_modules/@truffle/contract/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@truffle/contract/node_modules/scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "node_modules/@truffle/contract/node_modules/setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", + "dev": true + }, + "node_modules/@truffle/contract/node_modules/web3": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.5.3.tgz", + "integrity": "sha512-eyBg/1K44flfv0hPjXfKvNwcUfIVDI4NX48qHQe6wd7C8nPSdbWqo9vLy6ksZIt9NLa90HjI8HsGYgnMSUxn6w==", "dev": true, - "optional": true, - "requires": { - "@textile/threads-id": "^0.6.1", - "multiaddr": "^8.1.2", - "varint": "^6.0.0" - }, + "hasInstallScript": true, "dependencies": { - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true - } + "web3-bzz": "1.5.3", + "web3-core": "1.5.3", + "web3-eth": "1.5.3", + "web3-eth-personal": "1.5.3", + "web3-net": "1.5.3", + "web3-shh": "1.5.3", + "web3-utils": "1.5.3" + }, + "engines": { + "node": ">=8.0.0" } }, - "@textile/security": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/@textile/security/-/security-0.9.1.tgz", - "integrity": "sha512-pmiSOUezV/udTMoQsvyEZwZFfN0tMo6dOAof4VBqyFdDZZV6doeI5zTDpqSJZTg69n0swfWxsHw96ZWQIoWvsw==", + "node_modules/@truffle/contract/node_modules/web3-bzz": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.5.3.tgz", + "integrity": "sha512-SlIkAqG0eS6cBS9Q2eBOTI1XFzqh83RqGJWnyrNZMDxUwsTVHL+zNnaPShVPvrWQA1Ub5b0bx1Kc5+qJVxsTJg==", "dev": true, - "optional": true, - "requires": { - "@consento/sync-randombytes": "^1.0.5", - "fast-sha256": "^1.3.0", - "fastestsmallesttextencoderdecoder": "^1.0.22", - "multibase": "^3.1.0" - }, + "hasInstallScript": true, "dependencies": { - "multibase": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-3.1.2.tgz", - "integrity": "sha512-bpklWHs70LO3smJUHOjcnzGceJJvn9ui0Vau6Za0B/GBepaXswmW8Ufea0uD9pROf/qCQ4N4lZ3sf3U+SNf0tw==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1", - "web-encoding": "^1.0.6" - } - } + "@types/node": "^12.12.6", + "got": "9.6.0", + "swarm-js": "^0.1.40" + }, + "engines": { + "node": ">=8.0.0" } }, - "@textile/threads-client": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/@textile/threads-client/-/threads-client-2.3.4.tgz", - "integrity": "sha512-y89bpIuGDzkPqNpwGBu9Ky20g/IAEj0H62RDx7k4q66FsKJ2aSV+Jp7a4l0J+nxnqOpwUwennndlynmKzmTnnw==", + "node_modules/@truffle/contract/node_modules/web3-core": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.5.3.tgz", + "integrity": "sha512-ACTbu8COCu+0eUNmd9pG7Q9EVsNkAg2w3Y7SqhDr+zjTgbSHZV01jXKlapm9z+G3AN/BziV3zGwudClJ4u4xXQ==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.13.0", - "@textile/context": "^0.12.2", - "@textile/crypto": "^4.2.1", - "@textile/grpc-transport": "^0.5.2", - "@textile/multiaddr": "^0.6.1", - "@textile/security": "^0.9.1", - "@textile/threads-client-grpc": "^1.1.5", - "@textile/threads-id": "^0.6.1", - "@types/to-json-schema": "^0.2.0", - "fastestsmallesttextencoderdecoder": "^1.0.22", - "to-json-schema": "^0.2.5" + "dependencies": { + "@types/bn.js": "^4.11.5", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.5.3", + "web3-core-method": "1.5.3", + "web3-core-requestmanager": "1.5.3", + "web3-utils": "1.5.3" + }, + "engines": { + "node": ">=8.0.0" } }, - "@textile/threads-client-grpc": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@textile/threads-client-grpc/-/threads-client-grpc-1.1.5.tgz", - "integrity": "sha512-gJw3Eso9hdwAB+LbCDAWnzp3/uS6ahs9a+gYmA+xBxeYL4PfTP/3X01G6dJz8oZ9/pHcw1cxodH16dXn4INT5g==", + "node_modules/@truffle/contract/node_modules/web3-core-helpers": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.5.3.tgz", + "integrity": "sha512-Ip1IjB3S8vN7Kf1PPjK41U5gskmMk6IJQlxIVuS8/1U7n/o0jC8krqtpRwiMfAgYyw3TXwBFtxSRTvJtnLyXZw==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.14.1", - "@types/google-protobuf": "^3.15.5", - "google-protobuf": "^3.19.4" - }, "dependencies": { - "@improbable-eng/grpc-web": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.14.1.tgz", - "integrity": "sha512-XaIYuunepPxoiGVLLHmlnVminUGzBTnXr8Wv7khzmLWbNw4TCwJKX09GSMJlKhu/TRk6gms0ySFxewaETSBqgw==", - "dev": true, - "optional": true, - "requires": { - "browser-headers": "^0.4.1" - } - } + "web3-eth-iban": "1.5.3", + "web3-utils": "1.5.3" + }, + "engines": { + "node": ">=8.0.0" } }, - "@textile/threads-id": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@textile/threads-id/-/threads-id-0.6.1.tgz", - "integrity": "sha512-KwhbLjZ/eEquPorGgHFotw4g0bkKLTsqQmnsIxFeo+6C1mz40PQu4IOvJwohHr5GL6wedjlobry4Jj+uI3N+0w==", + "node_modules/@truffle/contract/node_modules/web3-core-method": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.5.3.tgz", + "integrity": "sha512-8wJrwQ2qD9ibWieF9oHXwrJsUGrv3XAtEkNeyvyNMpktNTIjxJ2jaFGQUuLiyUrMubD18XXgLk4JS6PJU4Loeg==", "dev": true, - "optional": true, - "requires": { - "@consento/sync-randombytes": "^1.0.4", - "multibase": "^3.1.0", - "varint": "^6.0.0" + "dependencies": { + "@ethereumjs/common": "^2.4.0", + "@ethersproject/transactions": "^5.0.0-beta.135", + "web3-core-helpers": "1.5.3", + "web3-core-promievent": "1.5.3", + "web3-core-subscriptions": "1.5.3", + "web3-utils": "1.5.3" }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/contract/node_modules/web3-core-promievent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.5.3.tgz", + "integrity": "sha512-CFfgqvk3Vk6PIAxtLLuX+pOMozxkKCY+/GdGr7weMh033mDXEPvwyVjoSRO1PqIKj668/hMGQsVoIgbyxkJ9Mg==", + "dev": true, "dependencies": { - "multibase": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-3.1.2.tgz", - "integrity": "sha512-bpklWHs70LO3smJUHOjcnzGceJJvn9ui0Vau6Za0B/GBepaXswmW8Ufea0uD9pROf/qCQ4N4lZ3sf3U+SNf0tw==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1", - "web-encoding": "^1.0.6" - } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true - } + "eventemitter3": "4.0.4" + }, + "engines": { + "node": ">=8.0.0" } }, - "@textile/users": { - "version": "6.2.4", - "resolved": "https://registry.npmjs.org/@textile/users/-/users-6.2.4.tgz", - "integrity": "sha512-NnCoRgVlQV14JatsSWe1k3ffPzLWSzkSwGJQjKwYJy8Cs1WRkwGDMddYJmg2B1P5rrZj/Zbu4krlEGVvFELncg==", + "node_modules/@truffle/contract/node_modules/web3-core-requestmanager": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.5.3.tgz", + "integrity": "sha512-9k/Bze2rs8ONix5IZR+hYdMNQv+ark2Ek2kVcrFgWO+LdLgZui/rn8FikPunjE+ub7x7pJaKCgVRbYFXjo3ZWg==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.13.0", - "@textile/buckets-grpc": "2.6.18", - "@textile/context": "^0.12.2", - "@textile/crypto": "^4.2.1", - "@textile/grpc-authentication": "^3.4.5", - "@textile/grpc-connection": "^2.5.4", - "@textile/grpc-transport": "^0.5.2", - "@textile/hub-grpc": "2.6.18", - "@textile/hub-threads-client": "^5.5.4", - "@textile/security": "^0.9.1", - "@textile/threads-id": "^0.6.1", - "@textile/users-grpc": "2.6.18", - "event-iterator": "^2.0.0", - "loglevel": "^1.7.0" - }, - "dependencies": { - "event-iterator": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-2.0.0.tgz", - "integrity": "sha512-KGft0ldl31BZVV//jj+IAIGCxkvvUkkON+ScH6zfoX+l+omX6001ggyRSpI0Io2Hlro0ThXotswCtfzS8UkIiQ==", - "dev": true, - "optional": true - } + "dependencies": { + "util": "^0.12.0", + "web3-core-helpers": "1.5.3", + "web3-providers-http": "1.5.3", + "web3-providers-ipc": "1.5.3", + "web3-providers-ws": "1.5.3" + }, + "engines": { + "node": ">=8.0.0" } }, - "@textile/users-grpc": { - "version": "2.6.18", - "resolved": "https://registry.npmjs.org/@textile/users-grpc/-/users-grpc-2.6.18.tgz", - "integrity": "sha512-n/0Vki1RzJZvJ66M6HwAaw/giygoenPH/gElGcZeqPePtnRWC4ZrhOcGo+Nx3LjjejTu8TjvjW9cwA0/0P8IQw==", + "node_modules/@truffle/contract/node_modules/web3-core-subscriptions": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.5.3.tgz", + "integrity": "sha512-L2m9vG1iRN6thvmv/HQwO2YLhOQlmZU8dpLG6GSo9FBN14Uch868Swk0dYVr3rFSYjZ/GETevSXU+O+vhCummA==", "dev": true, - "optional": true, - "requires": { - "@improbable-eng/grpc-web": "^0.14.1", - "@types/google-protobuf": "^3.15.5", - "google-protobuf": "^3.19.4" + "dependencies": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.5.3" }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/contract/node_modules/web3-core/node_modules/bignumber.js": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", + "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/@truffle/contract/node_modules/web3-eth": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.5.3.tgz", + "integrity": "sha512-saFurA1L23Bd7MEf7cBli6/jRdMhD4X/NaMiO2mdMMCXlPujoudlIJf+VWpRWJpsbDFdu7XJ2WHkmBYT5R3p1Q==", + "dev": true, "dependencies": { - "@improbable-eng/grpc-web": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.14.1.tgz", - "integrity": "sha512-XaIYuunepPxoiGVLLHmlnVminUGzBTnXr8Wv7khzmLWbNw4TCwJKX09GSMJlKhu/TRk6gms0ySFxewaETSBqgw==", - "dev": true, - "optional": true, - "requires": { - "browser-headers": "^0.4.1" - } - } + "web3-core": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-method": "1.5.3", + "web3-core-subscriptions": "1.5.3", + "web3-eth-abi": "1.5.3", + "web3-eth-accounts": "1.5.3", + "web3-eth-contract": "1.5.3", + "web3-eth-ens": "1.5.3", + "web3-eth-iban": "1.5.3", + "web3-eth-personal": "1.5.3", + "web3-net": "1.5.3", + "web3-utils": "1.5.3" + }, + "engines": { + "node": ">=8.0.0" } }, - "@truffle/abi-utils": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/@truffle/abi-utils/-/abi-utils-0.2.13.tgz", - "integrity": "sha512-WzjyNvx+naXmG/XKF+xLI+tJZLUlPGkd29rY4xBCiY9m/xWk0ZUL6gvVvnRr3leLJkBweJUSBiGUW770V8hHOg==", + "node_modules/@truffle/contract/node_modules/web3-eth-abi": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.5.3.tgz", + "integrity": "sha512-i/qhuFsoNrnV130CSRYX/z4SlCfSQ4mHntti5yTmmQpt70xZKYZ57BsU0R29ueSQ9/P+aQrL2t2rqkQkAloUxg==", "dev": true, - "requires": { - "change-case": "3.0.2", - "faker": "5.5.3", - "fast-check": "^2.12.1" + "dependencies": { + "@ethersproject/abi": "5.0.7", + "web3-utils": "1.5.3" + }, + "engines": { + "node": ">=8.0.0" } }, - "@truffle/blockchain-utils": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.3.tgz", - "integrity": "sha512-K21Wf10u6VmS12/f9OrLN98f1RCqzrmuM2zlsly4b7BF/Xdh55Iq/jNSOnsNUJa+6Iaqqz6zeidquCYu9nTFng==", + "node_modules/@truffle/contract/node_modules/web3-eth-accounts": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.5.3.tgz", + "integrity": "sha512-pdGhXgeBaEJENMvRT6W9cmji3Zz/46ugFSvmnLLw79qi5EH7XJhKISNVb41eWCrs4am5GhI67GLx5d2s2a72iw==", + "dev": true, + "dependencies": { + "@ethereumjs/common": "^2.3.0", + "@ethereumjs/tx": "^3.2.1", + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.8", + "ethereumjs-util": "^7.0.10", + "scrypt-js": "^3.0.1", + "uuid": "3.3.2", + "web3-core": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-method": "1.5.3", + "web3-utils": "1.5.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/contract/node_modules/web3-eth-accounts/node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", "dev": true }, - "@truffle/code-utils": { - "version": "1.2.34", - "resolved": "https://registry.npmjs.org/@truffle/code-utils/-/code-utils-1.2.34.tgz", - "integrity": "sha512-Ie+PTdJIvK90voInSvn7WEdAsXd1VUw0TsX2225OMGVyYRWiQdX0K6Vfkib7RSZvdUEaURFAaHo5r57l2RacWg==", + "node_modules/@truffle/contract/node_modules/web3-eth-accounts/node_modules/uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", "dev": true, - "requires": { - "cbor": "^5.1.0" + "bin": { + "uuid": "bin/uuid" } }, - "@truffle/codec": { - "version": "0.12.8", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.8.tgz", - "integrity": "sha512-JwzZ8NPTgvbs86bd/nW8ooE46OT94VUKnSRn4KEUx1gGTIhpt7HZfFKSEMZYHbxk2wzpQopJ2zRy70B0LevtQQ==", + "node_modules/@truffle/contract/node_modules/web3-eth-contract": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.5.3.tgz", + "integrity": "sha512-Gdlt1L6cdHe83k7SdV6xhqCytVtOZkjD0kY/15x441AuuJ4JLubCHuqu69k2Dr3tWifHYVys/vG8QE/W16syGg==", "dev": true, - "requires": { - "@truffle/abi-utils": "^0.2.13", - "@truffle/compile-common": "^0.7.31", - "big.js": "^6.0.3", - "bn.js": "^5.1.3", - "cbor": "^5.1.0", - "debug": "^4.3.1", - "lodash": "^4.17.21", - "semver": "^7.3.4", - "utf8": "^3.0.0", + "dependencies": { + "@types/bn.js": "^4.11.5", + "web3-core": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-method": "1.5.3", + "web3-core-promievent": "1.5.3", + "web3-core-subscriptions": "1.5.3", + "web3-eth-abi": "1.5.3", "web3-utils": "1.5.3" }, - "dependencies": { - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - } + "engines": { + "node": ">=8.0.0" } }, - "@truffle/compile-common": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/@truffle/compile-common/-/compile-common-0.7.31.tgz", - "integrity": "sha512-BGhWPd6NoI4VZfYBg+RgrCyLaxxq40vDOp6Ouofa1NQdN6LSPwlqWf0JWvPIKFNRp+TA9aWRHGmZntYyE94OZg==", + "node_modules/@truffle/contract/node_modules/web3-eth-ens": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.5.3.tgz", + "integrity": "sha512-QmGFFtTGElg0E+3xfCIFhiUF+1imFi9eg/cdsRMUZU4F1+MZCC/ee+IAelYLfNTGsEslCqfAusliKOT9DdGGnw==", "dev": true, - "requires": { - "@truffle/error": "^0.1.0", - "colors": "1.4.0" + "dependencies": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "web3-core": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-promievent": "1.5.3", + "web3-eth-abi": "1.5.3", + "web3-eth-contract": "1.5.3", + "web3-utils": "1.5.3" }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/contract/node_modules/web3-eth-iban": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.5.3.tgz", + "integrity": "sha512-vMzmGqolYZvRHwP9P4Nf6G8uYM5aTLlQu2a34vz78p0KlDC+eV1th3+90Qeaupa28EG7OO0IT1F0BejiIauOPw==", + "dev": true, "dependencies": { - "@truffle/error": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.1.0.tgz", - "integrity": "sha512-RbUfp5VreNhsa2Q4YbBjz18rOQI909pG32bghl1hulO7IpvcqTS+C3Ge5cNbiWQ1WGzy1wIeKLW0tmQtHFB7qg==", - "dev": true - } + "bn.js": "^4.11.9", + "web3-utils": "1.5.3" + }, + "engines": { + "node": ">=8.0.0" } }, - "@truffle/config": { - "version": "1.3.27", - "resolved": "https://registry.npmjs.org/@truffle/config/-/config-1.3.27.tgz", - "integrity": "sha512-QZWHM/OUrVbGQJqRSMUaXXmC8276OOB1BiXPYE1SrU5Mp7QnWlw7N/57BOlwsdnJHpc+ZQGMvJatB7S1WKvdbA==", + "node_modules/@truffle/contract/node_modules/web3-eth-personal": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.5.3.tgz", + "integrity": "sha512-JzibJafR7ak/Icas8uvos3BmUNrZw1vShuNR5Cxjo+vteOC8XMqz1Vr7RH65B4bmlfb3bm9xLxetUHO894+Sew==", "dev": true, - "optional": true, - "requires": { - "@truffle/error": "^0.1.0", - "@truffle/events": "^0.1.6", - "@truffle/provider": "^0.2.53", - "conf": "^10.0.2", - "find-up": "^2.1.0", - "lodash": "^4.17.21", - "original-require": "^1.0.1" + "dependencies": { + "@types/node": "^12.12.6", + "web3-core": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-method": "1.5.3", + "web3-net": "1.5.3", + "web3-utils": "1.5.3" }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/contract/node_modules/web3-net": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.5.3.tgz", + "integrity": "sha512-0W/xHIPvgVXPSdLu0iZYnpcrgNnhzHMC888uMlGP5+qMCt8VuflUZHy7tYXae9Mzsg1kxaJAS5lHVNyeNw4CoQ==", + "dev": true, "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "optional": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "optional": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "optional": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "optional": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "optional": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "optional": true - } + "web3-core": "1.5.3", + "web3-core-method": "1.5.3", + "web3-utils": "1.5.3" + }, + "engines": { + "node": ">=8.0.0" } }, - "@truffle/contract": { - "version": "4.5.6", - "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.5.6.tgz", - "integrity": "sha512-Io+hwP4FRgsKz29hOCu2NTpu8b6mOT0urcjPgFpvRK2pUCl/E8WmggX3uyKtcntxXjtw/8tGFqGqSwHCiUcpLw==", + "node_modules/@truffle/contract/node_modules/web3-providers-http": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.5.3.tgz", + "integrity": "sha512-5DpUyWGHtDAr2RYmBu34Fu+4gJuBAuNx2POeiJIooUtJ+Mu6pIx4XkONWH6V+Ez87tZAVAsFOkJRTYuzMr3rPw==", "dev": true, - "requires": { - "@ensdomains/ensjs": "^2.0.1", - "@truffle/blockchain-utils": "^0.1.3", - "@truffle/contract-schema": "^3.4.7", - "@truffle/debug-utils": "^6.0.18", - "@truffle/error": "^0.1.0", - "@truffle/interface-adapter": "^0.5.14", - "bignumber.js": "^7.2.1", - "debug": "^4.3.1", - "ethers": "^4.0.32", - "web3": "1.5.3", + "dependencies": { "web3-core-helpers": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-utils": "1.5.3" + "xhr2-cookies": "1.1.0" }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/contract/node_modules/web3-providers-ipc": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.5.3.tgz", + "integrity": "sha512-JmeAptugVpmXI39LGxUSAymx0NOFdgpuI1hGQfIhbEAcd4sv7fhfd5D+ZU4oLHbRI8IFr4qfGU0uhR8BXhDzlg==", + "dev": true, "dependencies": { - "@ethersproject/abi": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", - "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/strings": "^5.0.4" - } - }, - "@truffle/error": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.1.0.tgz", - "integrity": "sha512-RbUfp5VreNhsa2Q4YbBjz18rOQI909pG32bghl1hulO7IpvcqTS+C3Ge5cNbiWQ1WGzy1wIeKLW0tmQtHFB7qg==", - "dev": true - }, - "@truffle/interface-adapter": { - "version": "0.5.14", - "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.14.tgz", - "integrity": "sha512-bUM2W5cNgDlxBLEiE3Rg47A0cqL4fNw7a2DgjtxMxCayZLXUA5gf1orLjcYq54a0kOLGh7B7sfgfP3TQINlylw==", - "dev": true, - "requires": { - "bn.js": "^5.1.3", - "ethers": "^4.0.32", - "web3": "1.5.3" - } - }, - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", - "dev": true, - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", - "dev": true - }, - "web3": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.5.3.tgz", - "integrity": "sha512-eyBg/1K44flfv0hPjXfKvNwcUfIVDI4NX48qHQe6wd7C8nPSdbWqo9vLy6ksZIt9NLa90HjI8HsGYgnMSUxn6w==", - "dev": true, - "requires": { - "web3-bzz": "1.5.3", - "web3-core": "1.5.3", - "web3-eth": "1.5.3", - "web3-eth-personal": "1.5.3", - "web3-net": "1.5.3", - "web3-shh": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-bzz": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.5.3.tgz", - "integrity": "sha512-SlIkAqG0eS6cBS9Q2eBOTI1XFzqh83RqGJWnyrNZMDxUwsTVHL+zNnaPShVPvrWQA1Ub5b0bx1Kc5+qJVxsTJg==", - "dev": true, - "requires": { - "@types/node": "^12.12.6", - "got": "9.6.0", - "swarm-js": "^0.1.40" - } - }, - "web3-core": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.5.3.tgz", - "integrity": "sha512-ACTbu8COCu+0eUNmd9pG7Q9EVsNkAg2w3Y7SqhDr+zjTgbSHZV01jXKlapm9z+G3AN/BziV3zGwudClJ4u4xXQ==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.5", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-requestmanager": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "bignumber.js": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", - "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", - "dev": true - } - } - }, - "web3-core-helpers": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.5.3.tgz", - "integrity": "sha512-Ip1IjB3S8vN7Kf1PPjK41U5gskmMk6IJQlxIVuS8/1U7n/o0jC8krqtpRwiMfAgYyw3TXwBFtxSRTvJtnLyXZw==", - "dev": true, - "requires": { - "web3-eth-iban": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-core-method": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.5.3.tgz", - "integrity": "sha512-8wJrwQ2qD9ibWieF9oHXwrJsUGrv3XAtEkNeyvyNMpktNTIjxJ2jaFGQUuLiyUrMubD18XXgLk4JS6PJU4Loeg==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.4.0", - "@ethersproject/transactions": "^5.0.0-beta.135", - "web3-core-helpers": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-core-promievent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.5.3.tgz", - "integrity": "sha512-CFfgqvk3Vk6PIAxtLLuX+pOMozxkKCY+/GdGr7weMh033mDXEPvwyVjoSRO1PqIKj668/hMGQsVoIgbyxkJ9Mg==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4" - } - }, - "web3-core-requestmanager": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.5.3.tgz", - "integrity": "sha512-9k/Bze2rs8ONix5IZR+hYdMNQv+ark2Ek2kVcrFgWO+LdLgZui/rn8FikPunjE+ub7x7pJaKCgVRbYFXjo3ZWg==", - "dev": true, - "requires": { - "util": "^0.12.0", - "web3-core-helpers": "1.5.3", - "web3-providers-http": "1.5.3", - "web3-providers-ipc": "1.5.3", - "web3-providers-ws": "1.5.3" - } - }, - "web3-core-subscriptions": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.5.3.tgz", - "integrity": "sha512-L2m9vG1iRN6thvmv/HQwO2YLhOQlmZU8dpLG6GSo9FBN14Uch868Swk0dYVr3rFSYjZ/GETevSXU+O+vhCummA==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.5.3" - } - }, - "web3-eth": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.5.3.tgz", - "integrity": "sha512-saFurA1L23Bd7MEf7cBli6/jRdMhD4X/NaMiO2mdMMCXlPujoudlIJf+VWpRWJpsbDFdu7XJ2WHkmBYT5R3p1Q==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-eth-accounts": "1.5.3", - "web3-eth-contract": "1.5.3", - "web3-eth-ens": "1.5.3", - "web3-eth-iban": "1.5.3", - "web3-eth-personal": "1.5.3", - "web3-net": "1.5.3", - "web3-utils": "1.5.3" - } + "oboe": "2.1.5", + "web3-core-helpers": "1.5.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/contract/node_modules/web3-providers-ws": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.5.3.tgz", + "integrity": "sha512-6DhTw4Q7nm5CFYEUHOJM0gAb3xFx+9gWpVveg3YxJ/ybR1BUvEWo3bLgIJJtX56cYX0WyY6DS35a7f0LOI1kVg==", + "dev": true, + "dependencies": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.5.3", + "websocket": "^1.0.32" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/contract/node_modules/web3-shh": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.5.3.tgz", + "integrity": "sha512-COfEXfsqoV/BkcsNLRxQqnWc1Teb8/9GxdGag5GtPC5gQC/vsN+7hYVJUwNxY9LtJPKYTij2DHHnx6UkITng+Q==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "web3-core": "1.5.3", + "web3-core-method": "1.5.3", + "web3-core-subscriptions": "1.5.3", + "web3-net": "1.5.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/contract/node_modules/web3-utils": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", + "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.9", + "eth-lib": "0.2.8", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/debug-utils": { + "version": "6.0.48", + "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.48.tgz", + "integrity": "sha512-HdK/7eH5EFrcTPeZVEgKaKkkzuZ4xsrH8yw+EoLEsScLsOEuQeKynY61NctjuU93voATWrYmV99Sfb/MRq2i2g==", + "dev": true, + "dependencies": { + "@truffle/codec": "^0.14.17", + "@trufflesuite/chromafi": "^3.0.0", + "bn.js": "^5.1.3", + "chalk": "^2.4.2", + "debug": "^4.3.1", + "highlightjs-solidity": "^2.0.6" + } + }, + "node_modules/@truffle/debug-utils/node_modules/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, + "node_modules/@truffle/debug-utils/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@truffle/debug-utils/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@truffle/error": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.1.0.tgz", + "integrity": "sha512-RbUfp5VreNhsa2Q4YbBjz18rOQI909pG32bghl1hulO7IpvcqTS+C3Ge5cNbiWQ1WGzy1wIeKLW0tmQtHFB7qg==", + "dev": true + }, + "node_modules/@truffle/interface-adapter": { + "version": "0.5.32", + "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.32.tgz", + "integrity": "sha512-7Hgmdb4nJUcWtq4vvgWY7Mr2RLOTOp5FZaWyMiFmjkcEEhDlezm2QstALWAXgT0W6q7tDmDBpw3vTIFenRhHBA==", + "dev": true, + "dependencies": { + "bn.js": "^5.1.3", + "ethers": "^4.0.32", + "web3": "1.8.2" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "dev": true, + "dependencies": { + "defer-to-connect": "^2.0.1" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/@types/bn.js": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/bignumber.js": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", + "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/@truffle/interface-adapter/node_modules/cacheable-request": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", + "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "dev": true, + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "dev": true, + "dependencies": { + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/ethers/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/@truffle/interface-adapter/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/got": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", + "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^4.6.0", + "@szmarczak/http-timer": "^5.0.1", + "@types/cacheable-request": "^6.0.2", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^6.0.4", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "form-data-encoder": "1.7.1", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/@truffle/interface-adapter/node_modules/keyv": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", + "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/lowercase-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "dev": true, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "dev": true, + "dependencies": { + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/responselike/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "node_modules/@truffle/interface-adapter/node_modules/setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", + "dev": true + }, + "node_modules/@truffle/interface-adapter/node_modules/web3": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.8.2.tgz", + "integrity": "sha512-92h0GdEHW9wqDICQQKyG4foZBYi0OQkyg4CRml2F7XBl/NG+fu9o6J19kzfFXzSBoA4DnJXbyRgj/RHZv5LRiw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "web3-bzz": "1.8.2", + "web3-core": "1.8.2", + "web3-eth": "1.8.2", + "web3-eth-personal": "1.8.2", + "web3-net": "1.8.2", + "web3-shh": "1.8.2", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-bzz": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.8.2.tgz", + "integrity": "sha512-1EEnxjPnFnvNWw3XeeKuTR8PBxYd0+XWzvaLK7OJC/Go9O8llLGxrxICbKV+8cgIE0sDRBxiYx02X+6OhoAQ9w==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@types/node": "^12.12.6", + "got": "12.1.0", + "swarm-js": "^0.1.40" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-core": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.8.2.tgz", + "integrity": "sha512-DJTVEAYcNqxkqruJE+Rxp3CIv0y5AZMwPHQmOkz/cz+MM75SIzMTc0AUdXzGyTS8xMF8h3YWMQGgGEy8SBf1PQ==", + "dev": true, + "dependencies": { + "@types/bn.js": "^5.1.0", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.8.2", + "web3-core-method": "1.8.2", + "web3-core-requestmanager": "1.8.2", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-core-helpers": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.8.2.tgz", + "integrity": "sha512-6B1eLlq9JFrfealZBomd1fmlq1o4A09vrCVQSa51ANoib/jllT3atZrRDr0zt1rfI7TSZTZBXdN/aTdeN99DWw==", + "dev": true, + "dependencies": { + "web3-eth-iban": "1.8.2", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-core-method": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.8.2.tgz", + "integrity": "sha512-1qnr5mw5wVyULzLOrk4B+ryO3gfGjGd/fx8NR+J2xCGLf1e6OSjxT9vbfuQ3fErk/NjSTWWreieYWLMhaogcRA==", + "dev": true, + "dependencies": { + "@ethersproject/transactions": "^5.6.2", + "web3-core-helpers": "1.8.2", + "web3-core-promievent": "1.8.2", + "web3-core-subscriptions": "1.8.2", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-core-promievent": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.8.2.tgz", + "integrity": "sha512-nvkJWDVgoOSsolJldN33tKW6bKKRJX3MCPDYMwP5SUFOA/mCzDEoI88N0JFofDTXkh1k7gOqp1pvwi9heuaxGg==", + "dev": true, + "dependencies": { + "eventemitter3": "4.0.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-core-requestmanager": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.8.2.tgz", + "integrity": "sha512-p1d090RYs5Mu7DK1yyc3GCBVZB/03rBtFhYFoS2EruGzOWs/5Q0grgtpwS/DScdRAm8wB8mYEBhY/RKJWF6B2g==", + "dev": true, + "dependencies": { + "util": "^0.12.5", + "web3-core-helpers": "1.8.2", + "web3-providers-http": "1.8.2", + "web3-providers-ipc": "1.8.2", + "web3-providers-ws": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-core-subscriptions": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.8.2.tgz", + "integrity": "sha512-vXQogHDmAIQcKpXvGiMddBUeP9lnKgYF64+yQJhPNE5PnWr1sAibXuIPV7mIPihpFr/n/DORRj6Wh1pUv9zaTw==", + "dev": true, + "dependencies": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-eth": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.8.2.tgz", + "integrity": "sha512-JoTiWWc4F4TInpbvDUGb0WgDYJsFhuIjJlinc5ByjWD88Gvh+GKLsRjjFdbqe5YtwIGT4NymwoC5LQd1K6u/QQ==", + "dev": true, + "dependencies": { + "web3-core": "1.8.2", + "web3-core-helpers": "1.8.2", + "web3-core-method": "1.8.2", + "web3-core-subscriptions": "1.8.2", + "web3-eth-abi": "1.8.2", + "web3-eth-accounts": "1.8.2", + "web3-eth-contract": "1.8.2", + "web3-eth-ens": "1.8.2", + "web3-eth-iban": "1.8.2", + "web3-eth-personal": "1.8.2", + "web3-net": "1.8.2", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-abi": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.8.2.tgz", + "integrity": "sha512-Om9g3kaRNjqiNPAgKwGT16y+ZwtBzRe4ZJFGjLiSs6v5I7TPNF+rRMWuKnR6jq0azQZDj6rblvKFMA49/k48Og==", + "dev": true, + "dependencies": { + "@ethersproject/abi": "^5.6.3", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-accounts": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.8.2.tgz", + "integrity": "sha512-c367Ij63VCz9YdyjiHHWLFtN85l6QghgwMQH2B1eM/p9Y5lTlTX7t/Eg/8+f1yoIStXbk2w/PYM2lk+IkbqdLA==", + "dev": true, + "dependencies": { + "@ethereumjs/common": "2.5.0", + "@ethereumjs/tx": "3.3.2", + "eth-lib": "0.2.8", + "ethereumjs-util": "^7.1.5", + "scrypt-js": "^3.0.1", + "uuid": "^9.0.0", + "web3-core": "1.8.2", + "web3-core-helpers": "1.8.2", + "web3-core-method": "1.8.2", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-accounts/node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-accounts/node_modules/uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-contract": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.8.2.tgz", + "integrity": "sha512-ID5A25tHTSBNwOPjiXSVzxruz006ULRIDbzWTYIFTp7NJ7vXu/kynKK2ag/ObuTqBpMbobP8nXcA9b5EDkIdQA==", + "dev": true, + "dependencies": { + "@types/bn.js": "^5.1.0", + "web3-core": "1.8.2", + "web3-core-helpers": "1.8.2", + "web3-core-method": "1.8.2", + "web3-core-promievent": "1.8.2", + "web3-core-subscriptions": "1.8.2", + "web3-eth-abi": "1.8.2", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-ens": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.8.2.tgz", + "integrity": "sha512-PWph7C/CnqdWuu1+SH4U4zdrK4t2HNt0I4XzPYFdv9ugE8EuojselioPQXsVGvjql+Nt3jDLvQvggPqlMbvwRw==", + "dev": true, + "dependencies": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "web3-core": "1.8.2", + "web3-core-helpers": "1.8.2", + "web3-core-promievent": "1.8.2", + "web3-eth-abi": "1.8.2", + "web3-eth-contract": "1.8.2", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-iban": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.8.2.tgz", + "integrity": "sha512-h3vNblDWkWMuYx93Q27TAJz6lhzpP93EiC3+45D6xoz983p6si773vntoQ+H+5aZhwglBtoiBzdh7PSSOnP/xQ==", + "dev": true, + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-eth-personal": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.8.2.tgz", + "integrity": "sha512-Vg4HfwCr7doiUF/RC+Jz0wT4+cYaXcOWMAW2AHIjHX6Z7Xwa8nrURIeQgeEE62qcEHAzajyAdB1u6bJyTfuCXw==", + "dev": true, + "dependencies": { + "@types/node": "^12.12.6", + "web3-core": "1.8.2", + "web3-core-helpers": "1.8.2", + "web3-core-method": "1.8.2", + "web3-net": "1.8.2", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-net": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.8.2.tgz", + "integrity": "sha512-1itkDMGmbgb83Dg9nporFes9/fxsU7smJ3oRXlFkg4ZHn8YJyP1MSQFPJWWwSc+GrcCFt4O5IrUTvEkHqE3xag==", + "dev": true, + "dependencies": { + "web3-core": "1.8.2", + "web3-core-method": "1.8.2", + "web3-utils": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-providers-http": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.8.2.tgz", + "integrity": "sha512-2xY94IIEQd16+b+vIBF4IC1p7GVaz9q4EUFscvMUjtEq4ru4Atdzjs9GP+jmcoo49p70II0UV3bqQcz0TQfVyQ==", + "dev": true, + "dependencies": { + "abortcontroller-polyfill": "^1.7.3", + "cross-fetch": "^3.1.4", + "es6-promise": "^4.2.8", + "web3-core-helpers": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-providers-ipc": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.8.2.tgz", + "integrity": "sha512-p6fqKVGFg+WiXGHWnB1hu43PbvPkDHTz4RgoEzbXugv5rtv5zfYLqm8Ba6lrJOS5ks9kGKR21a0y3NzE3u7V4w==", + "dev": true, + "dependencies": { + "oboe": "2.1.5", + "web3-core-helpers": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-providers-ws": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.8.2.tgz", + "integrity": "sha512-3s/4K+wHgbiN+Zrp9YjMq2eqAF6QGABw7wFftPdx+m5hWImV27/MoIx57c6HffNRqZXmCHnfWWFCNHHsi7wXnA==", + "dev": true, + "dependencies": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.8.2", + "websocket": "^1.0.32" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@truffle/interface-adapter/node_modules/web3-shh": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.8.2.tgz", + "integrity": "sha512-uZ+3MAoNcaJsXXNCDnizKJ5viBNeHOFYsCbFhV755Uu52FswzTOw6DtE7yK9nYXMtIhiSgi7nwl1RYzP8pystw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "web3-core": "1.8.2", + "web3-core-method": "1.8.2", + "web3-core-subscriptions": "1.8.2", + "web3-net": "1.8.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@trufflesuite/chromafi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz", + "integrity": "sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ==", + "dev": true, + "dependencies": { + "camelcase": "^4.1.0", + "chalk": "^2.3.2", + "cheerio": "^1.0.0-rc.2", + "detect-indent": "^5.0.0", + "highlight.js": "^10.4.1", + "lodash.merge": "^4.6.2", + "strip-ansi": "^4.0.0", + "strip-indent": "^2.0.0" + } + }, + "node_modules/@trufflesuite/chromafi/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@trufflesuite/chromafi/node_modules/camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@trufflesuite/chromafi/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true, + "peer": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "peer": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "peer": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", + "dev": true, + "peer": true + }, + "node_modules/@typechain/ethers-v5": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-10.2.0.tgz", + "integrity": "sha512-ikaq0N/w9fABM+G01OFmU3U3dNnyRwEahkdvi9mqy1a3XwKiPZaF/lu54OcNaEWnpvEYyhhS0N7buCtLQqC92w==", + "dev": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.15", + "ts-essentials": "^7.0.1" + }, + "peerDependencies": { + "@ethersproject/abi": "^5.0.0", + "@ethersproject/bytes": "^5.0.0", + "@ethersproject/providers": "^5.0.0", + "ethers": "^5.1.3", + "typechain": "^8.1.1", + "typescript": ">=4.3.0" + } + }, + "node_modules/@typechain/hardhat": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-6.1.5.tgz", + "integrity": "sha512-lg7LW4qDZpxFMknp3Xool61Fg6Lays8F8TXdFGBG+MxyYcYU5795P1U2XdStuzGq9S2Dzdgh+1jGww9wvZ6r4Q==", + "dev": true, + "peer": true, + "dependencies": { + "fs-extra": "^9.1.0" + }, + "peerDependencies": { + "@ethersproject/abi": "^5.4.7", + "@ethersproject/providers": "^5.4.7", + "@typechain/ethers-v5": "^10.2.0", + "ethers": "^5.4.7", + "hardhat": "^2.9.9", + "typechain": "^8.1.1" + } + }, + "node_modules/@typechain/hardhat/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "peer": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typechain/hardhat/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "peer": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/@typechain/hardhat/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/@types/async-eventemitter": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@types/async-eventemitter/-/async-eventemitter-0.2.1.tgz", + "integrity": "sha512-M2P4Ng26QbAeITiH7w1d7OxtldgfAe0wobpyJzVK/XOb0cUGKU2R4pfAhqcJBXAe2ife5ZOhSv4wk7p+ffURtg==", + "dev": true + }, + "node_modules/@types/bignumber.js": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-5.0.0.tgz", + "integrity": "sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA==", + "deprecated": "This is a stub types definition for bignumber.js (https://github.com/MikeMcl/bignumber.js/). bignumber.js provides its own type definitions, so you don't need @types/bignumber.js installed!", + "dev": true, + "dependencies": { + "bignumber.js": "*" + } + }, + "node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "dev": true, + "dependencies": { + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" + } + }, + "node_modules/@types/chai": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", + "dev": true + }, + "node_modules/@types/chai-as-promised": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", + "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", + "dev": true, + "peer": true, + "dependencies": { + "@types/chai": "*" + } + }, + "node_modules/@types/concat-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/debug": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", + "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==", + "dev": true, + "dependencies": { + "@types/ms": "*" + } + }, + "node_modules/@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", + "dev": true, + "peer": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/fs-extra": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", + "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", + "dev": true, + "optional": true, + "dependencies": { + "@types/jsonfile": "*", + "@types/node": "*" + } + }, + "node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "node_modules/@types/http-cache-semantics": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", + "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", + "dev": true + }, + "node_modules/@types/jsonfile": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", + "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", + "dev": true, + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", + "dev": true + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true, + "peer": true + }, + "node_modules/@types/mocha": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", + "dev": true, + "peer": true + }, + "node_modules/@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "12.20.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.16.tgz", + "integrity": "sha512-6CLxw83vQf6DKqXxMPwl8qpF8I7THFZuIwLt4TnNsumxkp1VsRZWT8txQxncT/Rl2UojTsFzWgDG4FRMwafrlA==", + "dev": true + }, + "node_modules/@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/prettier": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.2.tgz", + "integrity": "sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==", + "dev": true, + "peer": true + }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "node_modules/@types/readable-stream": { + "version": "2.3.15", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", + "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "safe-buffer": "~5.1.1" + } + }, + "node_modules/@types/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/@types/responselike": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", + "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "dev": true, + "optional": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@uniswap/lib": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@uniswap/lib/-/lib-1.1.1.tgz", + "integrity": "sha512-2yK7sLpKIT91TiS5sewHtOa7YuM8IuBXVl4GZv2jZFys4D2sY7K5vZh6MqD25TPA95Od+0YzCVq6cTF2IKrOmg==", + "engines": { + "node": ">=10" + } + }, + "node_modules/@uniswap/v2-core": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.0.tgz", + "integrity": "sha512-BJiXrBGnN8mti7saW49MXwxDBRFiWemGetE58q8zgfnPPzQKq55ADltEILqOt6VFZ22kVeVKbF8gVd8aY3l7pA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/@uniswap/v2-periphery": { + "version": "1.1.0-beta.0", + "resolved": "https://registry.npmjs.org/@uniswap/v2-periphery/-/v2-periphery-1.1.0-beta.0.tgz", + "integrity": "sha512-6dkwAMKza8nzqYiXEr2D86dgW3TTavUvCR0w2Tu33bAbM8Ah43LKAzH7oKKPRT5VJQaMi1jtkGs1E8JPor1n5g==", + "dependencies": { + "@uniswap/lib": "1.1.1", + "@uniswap/v2-core": "1.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true, + "peer": true + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/abortcontroller-polyfill": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", + "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==", + "dev": true + }, + "node_modules/abstract-level": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", + "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", + "dev": true, + "dependencies": { + "buffer": "^6.0.3", + "catering": "^2.1.0", + "is-buffer": "^2.0.5", + "level-supports": "^4.0.0", + "level-transcoder": "^1.0.1", + "module-error": "^1.0.1", + "queue-microtask": "^1.2.3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "dev": true, + "dependencies": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/address": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", + "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.12.0" + } + }, + "node_modules/adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", + "dev": true, + "engines": { + "node": ">=0.3.0" + } + }, + "node_modules/aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=", + "dev": true + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/agent-base/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/agent-base/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, + "optional": true, + "peer": true, + "engines": { + "node": ">=0.4.2" + } + }, + "node_modules/ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/antlr4ts": { + "version": "0.5.0-alpha.4", + "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", + "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", + "dev": true + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "peer": true + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "peer": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array.prototype.findlast": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.3.tgz", + "integrity": "sha512-kcBubumjciBg4JKp5KTKtI7ec7tRefPk88yjkWJwaVKYd9QfTaxcsOxoMNKd7iBr447zCfDV0z1kOF47umv42g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.reduce": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz", + "integrity": "sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==", + "dev": true, + "peer": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true, + "peer": true + }, + "node_modules/asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/async-eventemitter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", + "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", + "dev": true, + "dependencies": { + "async": "^2.4.0" + } + }, + "node_modules/async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "node_modules/axios": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios-debug-log": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/axios-debug-log/-/axios-debug-log-1.0.0.tgz", + "integrity": "sha512-ZjMaEBEij9w+Vbk2Uc3XflchTT7j9rZdYD/snN+XQ5FRDq1QjZNhh0Izb3KSyarU5vTkiCvJyg1xDiQBHZZB9w==", + "dev": true, + "dependencies": { + "@types/debug": "^4.0.0", + "debug": "^4.0.0" + }, + "peerDependencies": { + "axios": ">=1.0.0" + } + }, + "node_modules/axios-debug-log/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/axios-debug-log/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-eth-abi": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.5.3.tgz", - "integrity": "sha512-i/qhuFsoNrnV130CSRYX/z4SlCfSQ4mHntti5yTmmQpt70xZKYZ57BsU0R29ueSQ9/P+aQrL2t2rqkQkAloUxg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.0.7", - "web3-utils": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-eth-accounts": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.5.3.tgz", - "integrity": "sha512-pdGhXgeBaEJENMvRT6W9cmji3Zz/46ugFSvmnLLw79qi5EH7XJhKISNVb41eWCrs4am5GhI67GLx5d2s2a72iw==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.3.0", - "@ethereumjs/tx": "^3.2.1", - "crypto-browserify": "3.12.0", - "eth-lib": "0.2.8", - "ethereumjs-util": "^7.0.10", - "scrypt-js": "^3.0.1", - "uuid": "3.3.2", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - } - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", + "dev": true + }, + "node_modules/bent": { + "version": "7.3.12", + "resolved": "https://registry.npmjs.org/bent/-/bent-7.3.12.tgz", + "integrity": "sha512-T3yrKnVGB63zRuoco/7Ybl7BwwGZR0lceoVG5XmQyMIH9s19SV5m+a8qam4if0zQuAmOQTyPTPmsQBdAorGK3w==", + "dev": true, + "dependencies": { + "bytesish": "^0.4.1", + "caseless": "~0.12.0", + "is-stream": "^2.0.0" + } + }, + "node_modules/bent/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/big-integer": { + "version": "1.6.36", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz", + "integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==", + "dev": true, + "engines": { + "node": "*" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/bigjs" + } + }, + "node_modules/bigint-crypto-utils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/bigint-crypto-utils/-/bigint-crypto-utils-3.2.2.tgz", + "integrity": "sha512-U1RbE3aX9ayCUVcIPHuPDPKcK3SFOXf93J1UK/iHlJuQB7bhagPIX06/CLpLEsDThJ7KA4Dhrnzynl+d2weTiw==", + "dev": true, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/bignumber.js": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-eth-contract": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.5.3.tgz", - "integrity": "sha512-Gdlt1L6cdHe83k7SdV6xhqCytVtOZkjD0kY/15x441AuuJ4JLubCHuqu69k2Dr3tWifHYVys/vG8QE/W16syGg==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.5", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-utils": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-eth-ens": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.5.3.tgz", - "integrity": "sha512-QmGFFtTGElg0E+3xfCIFhiUF+1imFi9eg/cdsRMUZU4F1+MZCC/ee+IAelYLfNTGsEslCqfAusliKOT9DdGGnw==", - "dev": true, - "requires": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-eth-contract": "1.5.3", - "web3-utils": "1.5.3" - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/blakejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", + "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==", + "dev": true + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "dev": true, + "dependencies": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "node_modules/browser-level": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-1.0.1.tgz", + "integrity": "sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==", + "dev": true, + "dependencies": { + "abstract-level": "^1.0.2", + "catering": "^2.1.1", + "module-error": "^1.0.2", + "run-parallel-limit": "^1.1.0" + } + }, + "node_modules/browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, + "dependencies": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/browserify-rsa/node_modules/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, + "node_modules/browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, + "dependencies": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + } + }, + "node_modules/browserify-sign/node_modules/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, + "node_modules/bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "dev": true, + "dependencies": { + "base-x": "^3.0.2" + } + }, + "node_modules/bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "dev": true, + "dependencies": { + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-eth-iban": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.5.3.tgz", - "integrity": "sha512-vMzmGqolYZvRHwP9P4Nf6G8uYM5aTLlQu2a34vz78p0KlDC+eV1th3+90Qeaupa28EG7OO0IT1F0BejiIauOPw==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "web3-utils": "1.5.3" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-eth-personal": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.5.3.tgz", - "integrity": "sha512-JzibJafR7ak/Icas8uvos3BmUNrZw1vShuNR5Cxjo+vteOC8XMqz1Vr7RH65B4bmlfb3bm9xLxetUHO894+Sew==", - "dev": true, - "requires": { - "@types/node": "^12.12.6", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-net": "1.5.3", - "web3-utils": "1.5.3" - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "node_modules/buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=", + "dev": true + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "node_modules/bufferutil": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz", + "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.2.0" + } + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dev": true, + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/bytesish": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/bytesish/-/bytesish-0.4.4.tgz", + "integrity": "sha512-i4uu6M4zuMUiyfZN4RU2+i9+peJh//pXhd9x1oSe1LBkZ3LEbCoygu8W0bXTukU1Jme2txKuotpCZRaC3FLxcQ==", + "dev": true + }, + "node_modules/cacheable-lookup": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz", + "integrity": "sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==", + "dev": true, + "engines": { + "node": ">=10.6.0" + } + }, + "node_modules/cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "dependencies": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "node_modules/camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/case": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", + "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "node_modules/catering": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", + "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cbor": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-5.2.0.tgz", + "integrity": "sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==", + "dev": true, + "dependencies": { + "bignumber.js": "^9.0.1", + "nofilter": "^1.0.4" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/cbor/node_modules/bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "dev": true, + "peer": true, + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 5" + } + }, + "node_modules/chai-bn": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/chai-bn/-/chai-bn-0.2.2.tgz", + "integrity": "sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg==", + "dev": true, + "peerDependencies": { + "bn.js": "^4.11.0", + "chai": "^4.0.0" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/change-case": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.0.2.tgz", + "integrity": "sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==", + "dev": true, + "dependencies": { + "camel-case": "^3.0.0", + "constant-case": "^2.0.0", + "dot-case": "^2.1.0", + "header-case": "^1.0.0", + "is-lower-case": "^1.1.0", + "is-upper-case": "^1.1.0", + "lower-case": "^1.1.1", + "lower-case-first": "^1.0.0", + "no-case": "^2.3.2", + "param-case": "^2.1.0", + "pascal-case": "^2.0.0", + "path-case": "^2.1.0", + "sentence-case": "^2.1.0", + "snake-case": "^2.1.0", + "swap-case": "^1.1.0", + "title-case": "^2.1.0", + "upper-case": "^1.1.1", + "upper-case-first": "^1.1.0" + } + }, + "node_modules/charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "dev": true, + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + }, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.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" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "node_modules/cids": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", + "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", + "deprecated": "This module has been superseded by the multiformats module", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "class-is": "^1.1.0", + "multibase": "~0.6.0", + "multicodec": "^1.0.0", + "multihashes": "~0.4.15" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=3.0.0" + } + }, + "node_modules/cids/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-net": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.5.3.tgz", - "integrity": "sha512-0W/xHIPvgVXPSdLu0iZYnpcrgNnhzHMC888uMlGP5+qMCt8VuflUZHy7tYXae9Mzsg1kxaJAS5lHVNyeNw4CoQ==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-method": "1.5.3", - "web3-utils": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-providers-http": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.5.3.tgz", - "integrity": "sha512-5DpUyWGHtDAr2RYmBu34Fu+4gJuBAuNx2POeiJIooUtJ+Mu6pIx4XkONWH6V+Ez87tZAVAsFOkJRTYuzMr3rPw==", - "dev": true, - "requires": { - "web3-core-helpers": "1.5.3", - "xhr2-cookies": "1.1.0" - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/cids/node_modules/multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "deprecated": "This module has been superseded by the multiformats module", + "dev": true, + "dependencies": { + "buffer": "^5.6.0", + "varint": "^5.0.0" + } + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/class-is": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", + "dev": true + }, + "node_modules/classic-level": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", + "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "abstract-level": "^1.0.2", + "catering": "^2.1.0", + "module-error": "^1.0.1", + "napi-macros": "^2.2.2", + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", + "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.61", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "dev": true, + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", + "dev": true, + "peer": true, + "dependencies": { + "object-assign": "^4.1.0", + "string-width": "^2.1.1" + }, + "engines": { + "node": ">=6" + }, + "optionalDependencies": { + "colors": "^1.1.2" + } + }, + "node_modules/cli-table3/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-table3/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-table3/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "peer": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-table3/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cli-truncate/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true + }, + "node_modules/cli-truncate/node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "node_modules/clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "dev": true + }, + "node_modules/command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", + "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^4.0.2", + "chalk": "^2.4.2", + "table-layout": "^1.0.2", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-usage/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true, + "engines": { + "node": ">=18" + } + }, + "node_modules/compare-versions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "peer": true, + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/concat-stream/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "peer": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/concat-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "peer": true + }, + "node_modules/concat-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "peer": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/constant-case": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz", + "integrity": "sha1-QXV2TTidP6nI7NKRhu1gBSQ7akY=", + "dev": true, + "dependencies": { + "snake-case": "^2.1.0", + "upper-case": "^1.1.1" + } + }, + "node_modules/content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dev": true, + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-disposition/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/content-hash": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", + "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "dev": true, + "dependencies": { + "cids": "^0.7.1", + "multicodec": "^0.5.5", + "multihashes": "^0.4.15" + } + }, + "node_modules/content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/convert-svg-core": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/convert-svg-core/-/convert-svg-core-0.6.4.tgz", + "integrity": "sha512-8mS0n7otc1lljTte4z7nDhihEakKCRq4w5ivMnIGeOZuD/OV/eDZNNEgGLV1ET3p+rMbnrZnX4lAcsf14WzD5w==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/neocotic" }, - "web3-providers-ipc": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.5.3.tgz", - "integrity": "sha512-JmeAptugVpmXI39LGxUSAymx0NOFdgpuI1hGQfIhbEAcd4sv7fhfd5D+ZU4oLHbRI8IFr4qfGU0uhR8BXhDzlg==", - "dev": true, - "requires": { - "oboe": "2.1.5", - "web3-core-helpers": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/neocotic" + } + ], + "dependencies": { + "chalk": "^4.1.2", + "cheerio": "^1.0.0-rc.11", + "commander": "^9.2.0", + "file-url": "^3.0.0", + "get-stdin": "^8.0.0", + "glob": "^8.0.1", + "lodash.omit": "^4.5.0", + "lodash.pick": "^4.4.0", + "pollock": "^0.2.0", + "puppeteer": "^13.7.0", + "tmp": "^0.2.1" + }, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/convert-svg-core/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/convert-svg-core/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/convert-svg-core/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/convert-svg-core/node_modules/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==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/convert-svg-core/node_modules/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==", + "dev": true + }, + "node_modules/convert-svg-core/node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/convert-svg-core/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/convert-svg-core/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/convert-svg-core/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/convert-svg-core/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/convert-svg-core/node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/convert-svg-core/node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/convert-svg-core/node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/convert-svg-core/node_modules/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, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/convert-svg-core/node_modules/tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "dependencies": { + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=8.17.0" + } + }, + "node_modules/convert-svg-to-png": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/convert-svg-to-png/-/convert-svg-to-png-0.6.4.tgz", + "integrity": "sha512-zHNTuVedkyuhMl+f+HMm2L7+TKDYCKFAqAmDqUr0dN7/xtgYe76PPAydjlFzeLbzEpGtEfhaA15q+ejpLaVo3g==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/neocotic" }, - "web3-providers-ws": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.5.3.tgz", - "integrity": "sha512-6DhTw4Q7nm5CFYEUHOJM0gAb3xFx+9gWpVveg3YxJ/ybR1BUvEWo3bLgIJJtX56cYX0WyY6DS35a7f0LOI1kVg==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.5.3", - "websocket": "^1.0.32" - } + { + "type": "patreon", + "url": "https://www.patreon.com/neocotic" + } + ], + "dependencies": { + "convert-svg-core": "^0.6.4" + }, + "bin": { + "convert-svg-to-png": "bin/convert-svg-to-png" + }, + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", + "dev": true + }, + "node_modules/cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/crc-32": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", + "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", + "dev": true, + "dependencies": { + "exit-on-epipe": "~1.0.1", + "printj": "~1.1.0" + }, + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "peer": true + }, + "node_modules/cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "dev": true, + "dependencies": { + "node-fetch": "2.6.7" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/crypto-addr-codec": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz", + "integrity": "sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg==", + "dev": true, + "dependencies": { + "base-x": "^3.0.8", + "big-integer": "1.6.36", + "blakejs": "^1.1.0", + "bs58": "^4.0.1", + "ripemd160-min": "0.0.6", + "safe-buffer": "^5.2.0", + "sha3": "^2.1.1" + } + }, + "node_modules/crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/death": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", + "integrity": "sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg=", + "dev": true, + "peer": true + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true, + "peer": true + }, + "node_modules/defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, + "node_modules/define-data-property": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", + "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "node_modules/detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/detect-port": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", + "integrity": "sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ==", + "dev": true, + "peer": true, + "dependencies": { + "address": "^1.0.1", + "debug": "^2.6.0" + }, + "bin": { + "detect": "bin/detect-port", + "detect-port": "bin/detect-port" + }, + "engines": { + "node": ">= 4.2.1" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.981744", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", + "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", + "dev": true + }, + "node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/diff-match-patch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz", + "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==", + "dev": true + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/difflib": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", + "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", + "dev": true, + "peer": true, + "dependencies": { + "heap": ">= 0.2.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "peer": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dir-glob/node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", + "dev": true + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "dev": true, + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", + "dev": true, + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dot-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz", + "integrity": "sha1-NNzzf1Co6TwrO8qLt/uRVcfaO+4=", + "dev": true, + "dependencies": { + "no-case": "^2.2.0" + } + }, + "node_modules/duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "node_modules/elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/encode-utf8": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz", + "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==", + "dev": true + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, + "node_modules/encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/enquirer/node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", + "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.1", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true, + "peer": true + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "dev": true + }, + "node_modules/es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "peer": true, + "dependencies": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=0.12.0" + }, + "optionalDependencies": { + "source-map": "~0.2.0" + } + }, + "node_modules/escodegen/node_modules/estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/escodegen/node_modules/source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "amdefine": ">=0.0.4" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true, + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "dev": true, + "dependencies": { + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" + } + }, + "node_modules/eth-gas-reporter": { + "version": "0.2.25", + "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz", + "integrity": "sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ==", + "dev": true, + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.0.0-beta.146", + "@solidity-parser/parser": "^0.14.0", + "cli-table3": "^0.5.0", + "colors": "1.4.0", + "ethereum-cryptography": "^1.0.3", + "ethers": "^4.0.40", + "fs-readdir-recursive": "^1.1.0", + "lodash": "^4.17.14", + "markdown-table": "^1.1.3", + "mocha": "^7.1.1", + "req-cwd": "^2.0.0", + "request": "^2.88.0", + "request-promise-native": "^1.0.5", + "sha1": "^1.1.1", + "sync-request": "^6.0.0" + }, + "peerDependencies": { + "@codechecks/client": "^0.1.0" + }, + "peerDependenciesMeta": { + "@codechecks/client": { + "optional": true + } + } + }, + "node_modules/eth-gas-reporter/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "peer": true, + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "peer": true, + "dependencies": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "peer": true, + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.1" + } + }, + "node_modules/eth-gas-reporter/node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "peer": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/cliui/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "peer": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "dev": true, + "peer": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eth-gas-reporter/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/eth-gas-reporter/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eth-gas-reporter/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "dev": true, + "peer": true, + "dependencies": { + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, + "node_modules/eth-gas-reporter/node_modules/ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "dev": true, + "peer": true, + "dependencies": { + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "peer": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, + "peer": true, + "dependencies": { + "is-buffer": "~2.0.3" + }, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/eth-gas-reporter/node_modules/fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "deprecated": "\"Please update to latest v2.3 or v2.2\"", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "peer": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/eth-gas-reporter/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eth-gas-reporter/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eth-gas-reporter/node_modules/hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "peer": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eth-gas-reporter/node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "peer": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eth-gas-reporter/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "peer": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "peer": true, + "dependencies": { + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eth-gas-reporter/node_modules/mocha": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", + "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/eth-gas-reporter/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "peer": true, + "dependencies": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/eth-gas-reporter/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "peer": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eth-gas-reporter/node_modules/readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "peer": true, + "dependencies": { + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/eth-gas-reporter/node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "peer": true, + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/eth-gas-reporter/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/wrap-ansi/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "peer": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true, + "peer": true + }, + "node_modules/eth-gas-reporter/node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "peer": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/eth-gas-reporter/node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "peer": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "node_modules/eth-gas-reporter/node_modules/yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "peer": true, + "dependencies": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-gas-reporter/node_modules/yargs/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "peer": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "node_modules/ethereum-bloom-filters": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", + "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", + "dev": true, + "dependencies": { + "js-sha3": "^0.8.0" + } + }, + "node_modules/ethereum-bloom-filters/node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/ethereum-ens": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/ethereum-ens/-/ethereum-ens-0.8.0.tgz", + "integrity": "sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg==", + "dev": true, + "dependencies": { + "bluebird": "^3.4.7", + "eth-ens-namehash": "^2.0.0", + "js-sha3": "^0.5.7", + "pako": "^1.0.4", + "underscore": "^1.8.3", + "web3": "^1.0.0-beta.34" + } + }, + "node_modules/ethereumjs-abi": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + } + }, + "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, + "dependencies": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + }, + "node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dev": true, + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ethereumjs-util/node_modules/@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/ethereumjs-util/node_modules/bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, + "node_modules/ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" }, - "web3-shh": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.5.3.tgz", - "integrity": "sha512-COfEXfsqoV/BkcsNLRxQqnWc1Teb8/9GxdGag5GtPC5gQC/vsN+7hYVJUwNxY9LtJPKYTij2DHHnx6UkITng+Q==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-net": "1.5.3" - } + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, + "node_modules/ethjs-abi": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", + "integrity": "sha1-4KepOn6BFjqUR3utVu3lJKtt5TM=", + "dev": true, + "dependencies": { + "bn.js": "4.11.6", + "js-sha3": "0.5.5", + "number-to-bn": "1.7.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/ethjs-abi/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + }, + "node_modules/ethjs-abi/node_modules/js-sha3": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", + "integrity": "sha1-uvDA6MVK1ZA0R9+Wreekobynmko=", + "dev": true + }, + "node_modules/ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "dev": true, + "dependencies": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/ethjs-unit/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + }, + "node_modules/ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "dev": true, + "dependencies": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", + "dev": true + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/exit-on-epipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dev": true, + "dependencies": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dev": true, + "dependencies": { + "type": "^2.0.0" + } + }, + "node_modules/ext/node_modules/type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==", + "dev": true + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" + }, + "bin": { + "extract-zip": "cli.js" + }, + "engines": { + "node": ">= 10.17.0" + }, + "optionalDependencies": { + "@types/yauzl": "^2.9.1" + } + }, + "node_modules/extract-zip/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/extract-zip/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/extract-zip/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true, + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true, + "peer": true + }, + "node_modules/fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "peer": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "dependencies": { + "pend": "~1.2.0" + } + }, + "node_modules/file-url": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/file-url/-/file-url-3.0.0.tgz", + "integrity": "sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "dependencies": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true, + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fmix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fmix/-/fmix-0.1.0.tgz", + "integrity": "sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w==", + "dev": true, + "dependencies": { + "imul": "^1.0.0" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/form-data-encoder": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", + "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==", + "dev": true + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fp-ts": { + "version": "1.19.3", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", + "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", + "dev": true + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "node_modules/fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "node_modules/fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dev": true, + "dependencies": { + "minipass": "^2.6.0" + } + }, + "node_modules/fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true, + "peer": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", + "dev": true + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/ghost-testrpc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", + "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", + "dev": true, + "peer": true, + "dependencies": { + "chalk": "^2.4.2", + "node-emoji": "^1.10.0" + }, + "bin": { + "testrpc-sc": "index.js" + } + }, + "node_modules/gitignore-globs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/gitignore-globs/-/gitignore-globs-0.1.1.tgz", + "integrity": "sha512-GAeT2xnAfU9513pjJ3etkKSxa7rBbLOvZRPJvQ2sfZBNx2zHR6HuX9ZHHU8id8CwgGF+bmss7Jct4VDNLsKZwg==", + "dev": true + }, + "node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "dev": true, + "dependencies": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "peer": true, + "dependencies": { + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "peer": true, + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "dev": true, + "peer": true, + "dependencies": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/got/node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, + "node_modules/growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4.x" + } + }, + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dev": true, + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/hardhat": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.14.1.tgz", + "integrity": "sha512-H3Qp/UKyQGmPDDBSfMoSyH18rRnac90rsb0LNer+sKe6at6rxLe4D5j+M+1icqZQF02iLPjNRwc/PA8OPf757A==", + "dev": true, + "dependencies": { + "@ethersproject/abi": "^5.1.2", + "@metamask/eth-sig-util": "^4.0.0", + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-blockchain": "7.0.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-evm": "2.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-statemanager": "2.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "@nomicfoundation/ethereumjs-vm": "7.0.1", + "@nomicfoundation/solidity-analyzer": "^0.1.0", + "@sentry/node": "^5.18.1", + "@types/bn.js": "^5.1.0", + "@types/lru-cache": "^5.1.0", + "abort-controller": "^3.0.0", + "adm-zip": "^0.4.16", + "aggregate-error": "^3.0.0", + "ansi-escapes": "^4.3.0", + "chalk": "^2.4.2", + "chokidar": "^3.4.0", + "ci-info": "^2.0.0", + "debug": "^4.1.1", + "enquirer": "^2.3.0", + "env-paths": "^2.2.0", + "ethereum-cryptography": "^1.0.3", + "ethereumjs-abi": "^0.6.8", + "find-up": "^2.1.0", + "fp-ts": "1.19.3", + "fs-extra": "^7.0.1", + "glob": "7.2.0", + "immutable": "^4.0.0-rc.12", + "io-ts": "1.10.4", + "keccak": "^3.0.2", + "lodash": "^4.17.11", + "mnemonist": "^0.38.0", + "mocha": "^10.0.0", + "p-map": "^4.0.0", + "qs": "^6.7.0", + "raw-body": "^2.4.1", + "resolve": "1.17.0", + "semver": "^6.3.0", + "solc": "0.7.3", + "source-map-support": "^0.5.13", + "stacktrace-parser": "^0.1.10", + "tsort": "0.0.1", + "undici": "^5.14.0", + "uuid": "^8.3.2", + "ws": "^7.4.6" + }, + "bin": { + "hardhat": "internal/cli/bootstrap.js" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "ts-node": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } + "typescript": { + "optional": true + } + } + }, + "node_modules/hardhat-dependency-compiler": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/hardhat-dependency-compiler/-/hardhat-dependency-compiler-1.2.1.tgz", + "integrity": "sha512-xG5iwbspTtxOEiP5UsPngEYQ1Hg+fjTjliapIjdTQmwGkCPofrsDhQDV2O/dopcYzcR68nTx2X8xTewYHgA2rQ==", + "dev": true, + "engines": { + "node": ">=14.14.0" + }, + "peerDependencies": { + "hardhat": "^2.0.0" + } + }, + "node_modules/hardhat-deploy": { + "version": "0.11.43", + "resolved": "https://registry.npmjs.org/hardhat-deploy/-/hardhat-deploy-0.11.43.tgz", + "integrity": "sha512-D760CjDtinwjOCpKOvdyRtIJYLQIYXmhfgkFe+AkxlYM9bPZ/T4tZ/xIB2tR89ZT+z0hF1YuZFBXIL3/G/9T5g==", + "dev": true, + "dependencies": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/contracts": "^5.7.0", + "@ethersproject/providers": "^5.7.2", + "@ethersproject/solidity": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wallet": "^5.7.0", + "@types/qs": "^6.9.7", + "axios": "^0.21.1", + "chalk": "^4.1.2", + "chokidar": "^3.5.2", + "debug": "^4.3.2", + "enquirer": "^2.3.6", + "ethers": "^5.7.0", + "form-data": "^4.0.0", + "fs-extra": "^10.0.0", + "match-all": "^1.2.6", + "murmur-128": "^0.2.1", + "qs": "^6.9.4", + "zksync-web3": "^0.14.3" + } + }, + "node_modules/hardhat-deploy/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/hardhat-deploy/node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/hardhat-deploy/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/hardhat-deploy/node_modules/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==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/hardhat-deploy/node_modules/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==", + "dev": true + }, + "node_modules/hardhat-deploy/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/hardhat-deploy/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/hardhat-deploy/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/hardhat-deploy/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hardhat-deploy/node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/hardhat-deploy/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/hardhat-deploy/node_modules/qs": { + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hardhat-deploy/node_modules/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, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/hardhat-deploy/node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/hardhat-gas-reporter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", + "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", + "dev": true, + "peer": true, + "dependencies": { + "array-uniq": "1.0.3", + "eth-gas-reporter": "^0.2.25", + "sha1": "^1.1.1" + }, + "peerDependencies": { + "hardhat": "^2.0.2" + } + }, + "node_modules/hardhat/node_modules/@chainsafe/persistent-merkle-tree": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz", + "integrity": "sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==", + "dev": true, + "dependencies": { + "@chainsafe/as-sha256": "^0.3.1" + } + }, + "node_modules/hardhat/node_modules/@metamask/eth-sig-util": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz", + "integrity": "sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==", + "dev": true, + "dependencies": { + "ethereumjs-abi": "^0.6.8", + "ethereumjs-util": "^6.2.1", + "ethjs-util": "^0.1.6", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/hardhat/node_modules/@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-block": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz", + "integrity": "sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "ethereum-cryptography": "0.1.3", + "ethers": "^5.7.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-block/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-blockchain": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz", + "integrity": "sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-ethash": "3.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "abstract-level": "^1.0.3", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "level": "^8.0.0", + "lru-cache": "^5.1.1", + "memory-level": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-blockchain/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-common": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz", + "integrity": "sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-util": "9.0.1", + "crc-32": "^1.2.0" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-ethash": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz", + "integrity": "sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "abstract-level": "^1.0.3", + "bigint-crypto-utils": "^3.0.23", + "ethereum-cryptography": "0.1.3" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-ethash/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-evm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz", + "integrity": "sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ==", + "dev": true, + "dependencies": { + "@ethersproject/providers": "^5.7.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "mcl-wasm": "^0.7.1", + "rustbn.js": "~0.2.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-evm/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-rlp": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz", + "integrity": "sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ==", + "dev": true, + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-statemanager": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz", + "integrity": "sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "ethers": "^5.7.1", + "js-sdsl": "^4.1.4" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-statemanager/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-trie": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz", + "integrity": "sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "@types/readable-stream": "^2.3.13", + "ethereum-cryptography": "0.1.3", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-trie/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-tx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz", + "integrity": "sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w==", + "dev": true, + "dependencies": { + "@chainsafe/ssz": "^0.9.2", + "@ethersproject/providers": "^5.7.2", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "ethereum-cryptography": "0.1.3" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-tx/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-util": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz", + "integrity": "sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA==", + "dev": true, + "dependencies": { + "@chainsafe/ssz": "^0.10.0", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "ethereum-cryptography": "0.1.3" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-util/node_modules/@chainsafe/ssz": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.10.2.tgz", + "integrity": "sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==", + "dev": true, + "dependencies": { + "@chainsafe/as-sha256": "^0.3.1", + "@chainsafe/persistent-merkle-tree": "^0.5.0" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-util/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-vm": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz", + "integrity": "sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ==", + "dev": true, + "dependencies": { + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-blockchain": "7.0.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-evm": "2.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-statemanager": "2.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "mcl-wasm": "^0.7.1", + "rustbn.js": "~0.2.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/hardhat/node_modules/@nomicfoundation/ethereumjs-vm/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/hardhat/node_modules/@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/hardhat/node_modules/@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" + } + }, + "node_modules/hardhat/node_modules/@types/bn.js": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/hardhat/node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/hardhat/node_modules/commander": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", + "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", + "dev": true + }, + "node_modules/hardhat/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "@truffle/contract-schema": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/@truffle/contract-schema/-/contract-schema-3.4.7.tgz", - "integrity": "sha512-vbOHMq/a8rVPh+cFMBDDGPqqiKrXXOc+f1kB4znfh3ewOX8rJxZhGJvdMm3WNMJHR5RstqDV7ZIZ7ePwtSXH8Q==", + "node_modules/hardhat/node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/hardhat/node_modules/ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, + "node_modules/hardhat/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, + "dependencies": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + }, + "node_modules/hardhat/node_modules/ethereumjs-util/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/hardhat/node_modules/ethereumjs-util/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "node_modules/hardhat/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", "dev": true, - "requires": { - "ajv": "^6.10.0", - "debug": "^4.3.1" + "dependencies": { + "locate-path": "^2.0.0" }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hardhat/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" } }, - "@truffle/db": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@truffle/db/-/db-1.0.3.tgz", - "integrity": "sha512-Lrkg/ovO+ZvOB0mU1o89HNRq5ec83cV+aR9O7xxMgyJNgF7TyTgrXMHLvlLaJvvGG7RPxSMCN9S3w/m6Blo/Bw==", + "node_modules/hardhat/node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", "dev": true, - "optional": true, - "requires": { - "@graphql-tools/delegate": "^8.4.3", - "@graphql-tools/schema": "^8.3.1", - "@truffle/abi-utils": "^0.2.13", - "@truffle/code-utils": "^1.2.34", - "@truffle/config": "^1.3.27", - "abstract-leveldown": "^7.2.0", - "apollo-server": "^3.6.3", - "debug": "^4.3.1", - "fs-extra": "^9.1.0", - "graphql": "^15.3.0", - "graphql-tag": "^2.11.0", - "json-stable-stringify": "^1.0.1", - "pascal-case": "^2.0.1", - "pluralize": "^8.0.0", - "pouchdb": "7.2.2", - "pouchdb-adapter-memory": "^7.1.1", - "pouchdb-adapter-node-websql": "^7.0.0", - "pouchdb-debug": "^7.1.1", - "pouchdb-find": "^7.0.0", - "web3-utils": "1.5.3" + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/hardhat/node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "node_modules/hardhat/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/hardhat/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "dev": true, "dependencies": { - "abstract-leveldown": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz", - "integrity": "sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^6.0.3", - "catering": "^2.0.0", - "is-buffer": "^2.0.5", - "level-concat-iterator": "^3.0.0", - "level-supports": "^2.0.1", - "queue-microtask": "^1.2.3" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.1.2" - } - }, - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "optional": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true, - "optional": true - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "optional": true - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "@truffle/db-loader": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/@truffle/db-loader/-/db-loader-0.1.13.tgz", - "integrity": "sha512-6U81PHSyPp+dgb8ydtdXcpmVxQrvnfWgP81Xu5mzO9//TRK2gjpByC5lTeIqPOB/I3IDgdnnXivSSrNplb/cmA==", + "node_modules/hardhat/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, - "requires": { - "@truffle/db": "^1.0.3" + "dependencies": { + "yallist": "^3.0.2" } }, - "@truffle/debug-utils": { - "version": "6.0.18", - "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.18.tgz", - "integrity": "sha512-O8uDq/0wwt860L3W8Ke2vTGttINEZDyUbFDGWl4LIbZhgSO3fwKLbuTs12pXMndunxeXDpsCCEppK74FhCt22g==", + "node_modules/hardhat/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/hardhat/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, - "requires": { - "@truffle/codec": "^0.12.8", - "@trufflesuite/chromafi": "^3.0.0", - "bn.js": "^5.1.3", - "chalk": "^2.4.2", - "debug": "^4.3.1", - "highlightjs-solidity": "^2.0.5" + "dependencies": { + "p-try": "^1.0.0" }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hardhat/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "dev": true, "dependencies": { - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hardhat/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/hardhat/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/hardhat/node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/hardhat/node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hardhat/node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hardhat/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/hardhat/node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "node_modules/hardhat/node_modules/solc": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", + "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", + "dev": true, + "dependencies": { + "command-exists": "^1.2.8", + "commander": "3.0.2", + "follow-redirects": "^1.12.1", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solcjs" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/hardhat/node_modules/solc/node_modules/fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "node_modules/hardhat/node_modules/solc/node_modules/jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/hardhat/node_modules/solc/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/hardhat/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/hardhat/node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/hardhat/node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "dev": true + }, + "node_modules/hardhat/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" } }, - "@truffle/debugger": { - "version": "10.0.7", - "resolved": "https://registry.npmjs.org/@truffle/debugger/-/debugger-10.0.7.tgz", - "integrity": "sha512-t8lByT0faJ1s68sS2BybM6jMrbnzw0SAJnbXCo9+/U5HB0ioL5pNQDSukx/sxYXGDbRhaHXmb1P1DJJI0lSbgA==", + "node_modules/hardhat/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, - "requires": { - "@truffle/abi-utils": "^0.2.13", - "@truffle/codec": "^0.12.9", - "@truffle/source-map-utils": "^1.3.81", - "bn.js": "^5.1.3", - "debug": "^4.3.1", - "json-pointer": "^0.6.1", - "json-stable-stringify": "^1.0.1", - "lodash": "^4.17.21", - "redux": "^3.7.2", - "redux-saga": "1.0.0", - "reselect-tree": "^1.3.5", - "semver": "^7.3.4", - "web3": "1.5.3", - "web3-eth-abi": "1.5.3" - }, "dependencies": { - "@ethersproject/abi": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", - "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/strings": "^5.0.4" - } - }, - "@truffle/codec": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.9.tgz", - "integrity": "sha512-lk89f7MXOVDAUZ7stjkG2zK5MvYsxxaTR5m2LcbulMcS5KetBNj5COKQaDoIIfY79a8Bjrlvl5pLhmP/Drb9mw==", - "dev": true, - "requires": { - "@truffle/abi-utils": "^0.2.13", - "@truffle/compile-common": "^0.7.31", - "big.js": "^6.0.3", - "bn.js": "^5.1.3", - "cbor": "^5.1.0", - "debug": "^4.3.1", - "lodash": "^4.17.21", - "semver": "^7.3.4", - "utf8": "^3.0.0", - "web3-utils": "1.5.3" - } - }, - "bignumber.js": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", - "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", - "dev": true - }, - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "web3": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.5.3.tgz", - "integrity": "sha512-eyBg/1K44flfv0hPjXfKvNwcUfIVDI4NX48qHQe6wd7C8nPSdbWqo9vLy6ksZIt9NLa90HjI8HsGYgnMSUxn6w==", - "dev": true, - "requires": { - "web3-bzz": "1.5.3", - "web3-core": "1.5.3", - "web3-eth": "1.5.3", - "web3-eth-personal": "1.5.3", - "web3-net": "1.5.3", - "web3-shh": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-bzz": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.5.3.tgz", - "integrity": "sha512-SlIkAqG0eS6cBS9Q2eBOTI1XFzqh83RqGJWnyrNZMDxUwsTVHL+zNnaPShVPvrWQA1Ub5b0bx1Kc5+qJVxsTJg==", - "dev": true, - "requires": { - "@types/node": "^12.12.6", - "got": "9.6.0", - "swarm-js": "^0.1.40" - } - }, - "web3-core": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.5.3.tgz", - "integrity": "sha512-ACTbu8COCu+0eUNmd9pG7Q9EVsNkAg2w3Y7SqhDr+zjTgbSHZV01jXKlapm9z+G3AN/BziV3zGwudClJ4u4xXQ==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.5", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-requestmanager": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-core-helpers": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.5.3.tgz", - "integrity": "sha512-Ip1IjB3S8vN7Kf1PPjK41U5gskmMk6IJQlxIVuS8/1U7n/o0jC8krqtpRwiMfAgYyw3TXwBFtxSRTvJtnLyXZw==", - "dev": true, - "requires": { - "web3-eth-iban": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-core-method": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.5.3.tgz", - "integrity": "sha512-8wJrwQ2qD9ibWieF9oHXwrJsUGrv3XAtEkNeyvyNMpktNTIjxJ2jaFGQUuLiyUrMubD18XXgLk4JS6PJU4Loeg==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.4.0", - "@ethersproject/transactions": "^5.0.0-beta.135", - "web3-core-helpers": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-core-promievent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.5.3.tgz", - "integrity": "sha512-CFfgqvk3Vk6PIAxtLLuX+pOMozxkKCY+/GdGr7weMh033mDXEPvwyVjoSRO1PqIKj668/hMGQsVoIgbyxkJ9Mg==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4" - } - }, - "web3-core-requestmanager": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.5.3.tgz", - "integrity": "sha512-9k/Bze2rs8ONix5IZR+hYdMNQv+ark2Ek2kVcrFgWO+LdLgZui/rn8FikPunjE+ub7x7pJaKCgVRbYFXjo3ZWg==", - "dev": true, - "requires": { - "util": "^0.12.0", - "web3-core-helpers": "1.5.3", - "web3-providers-http": "1.5.3", - "web3-providers-ipc": "1.5.3", - "web3-providers-ws": "1.5.3" - } - }, - "web3-core-subscriptions": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.5.3.tgz", - "integrity": "sha512-L2m9vG1iRN6thvmv/HQwO2YLhOQlmZU8dpLG6GSo9FBN14Uch868Swk0dYVr3rFSYjZ/GETevSXU+O+vhCummA==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.5.3" - } - }, - "web3-eth": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.5.3.tgz", - "integrity": "sha512-saFurA1L23Bd7MEf7cBli6/jRdMhD4X/NaMiO2mdMMCXlPujoudlIJf+VWpRWJpsbDFdu7XJ2WHkmBYT5R3p1Q==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-eth-accounts": "1.5.3", - "web3-eth-contract": "1.5.3", - "web3-eth-ens": "1.5.3", - "web3-eth-iban": "1.5.3", - "web3-eth-personal": "1.5.3", - "web3-net": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-eth-abi": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.5.3.tgz", - "integrity": "sha512-i/qhuFsoNrnV130CSRYX/z4SlCfSQ4mHntti5yTmmQpt70xZKYZ57BsU0R29ueSQ9/P+aQrL2t2rqkQkAloUxg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.0.7", - "web3-utils": "1.5.3" - } - }, - "web3-eth-accounts": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.5.3.tgz", - "integrity": "sha512-pdGhXgeBaEJENMvRT6W9cmji3Zz/46ugFSvmnLLw79qi5EH7XJhKISNVb41eWCrs4am5GhI67GLx5d2s2a72iw==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.3.0", - "@ethereumjs/tx": "^3.2.1", - "crypto-browserify": "3.12.0", - "eth-lib": "0.2.8", - "ethereumjs-util": "^7.0.10", - "scrypt-js": "^3.0.1", - "uuid": "3.3.2", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-eth-contract": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.5.3.tgz", - "integrity": "sha512-Gdlt1L6cdHe83k7SdV6xhqCytVtOZkjD0kY/15x441AuuJ4JLubCHuqu69k2Dr3tWifHYVys/vG8QE/W16syGg==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.5", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-eth-ens": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.5.3.tgz", - "integrity": "sha512-QmGFFtTGElg0E+3xfCIFhiUF+1imFi9eg/cdsRMUZU4F1+MZCC/ee+IAelYLfNTGsEslCqfAusliKOT9DdGGnw==", - "dev": true, - "requires": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-eth-contract": "1.5.3", - "web3-utils": "1.5.3" - } + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "dev": true, + "dependencies": { + "has-symbol-support-x": "^1.4.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } + }, + "node_modules/header-case": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz", + "integrity": "sha1-lTWXMZfBRLCWE81l0xfvGZY70C0=", + "dev": true, + "dependencies": { + "no-case": "^2.2.0", + "upper-case": "^1.1.3" + } + }, + "node_modules/heap": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", + "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", + "dev": true, + "peer": true + }, + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/highlightjs-solidity": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz", + "integrity": "sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg==", + "dev": true + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" + } + }, + "node_modules/http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "dev": true, + "peer": true, + "dependencies": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, + "node_modules/http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "dev": true, + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-errors/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "node_modules/http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=", + "dev": true + }, + "node_modules/http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/node": "^10.0.3" + } + }, + "node_modules/http-response-object/node_modules/@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", + "dev": true, + "peer": true + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/http2-wrapper": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", + "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", + "dev": true, + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/https-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/husky": { + "version": "9.1.6", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz", + "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==", + "dev": true, + "bin": { + "husky": "bin.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", + "dev": true, + "dependencies": { + "punycode": "2.1.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-eth-iban": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.5.3.tgz", - "integrity": "sha512-vMzmGqolYZvRHwP9P4Nf6G8uYM5aTLlQu2a34vz78p0KlDC+eV1th3+90Qeaupa28EG7OO0IT1F0BejiIauOPw==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "web3-utils": "1.5.3" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-eth-personal": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.5.3.tgz", - "integrity": "sha512-JzibJafR7ak/Icas8uvos3BmUNrZw1vShuNR5Cxjo+vteOC8XMqz1Vr7RH65B4bmlfb3bm9xLxetUHO894+Sew==", - "dev": true, - "requires": { - "@types/node": "^12.12.6", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-net": "1.5.3", - "web3-utils": "1.5.3" - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/immutable": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", + "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==", + "dev": true + }, + "node_modules/imul": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/imul/-/imul-1.0.1.tgz", + "integrity": "sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "peer": true + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/io-ts": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", + "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", + "dev": true, + "dependencies": { + "fp-ts": "^1.0.0" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-net": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.5.3.tgz", - "integrity": "sha512-0W/xHIPvgVXPSdLu0iZYnpcrgNnhzHMC888uMlGP5+qMCt8VuflUZHy7tYXae9Mzsg1kxaJAS5lHVNyeNw4CoQ==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-method": "1.5.3", - "web3-utils": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-providers-http": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.5.3.tgz", - "integrity": "sha512-5DpUyWGHtDAr2RYmBu34Fu+4gJuBAuNx2POeiJIooUtJ+Mu6pIx4XkONWH6V+Ez87tZAVAsFOkJRTYuzMr3rPw==", - "dev": true, - "requires": { - "web3-core-helpers": "1.5.3", - "xhr2-cookies": "1.1.0" - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", + "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", + "dev": true + }, + "node_modules/is-generator-function": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.9.tgz", + "integrity": "sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "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, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=", + "dev": true, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/is-lower-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", + "integrity": "sha1-fhR75HaNxGbbO/shzGCzHmrWk5M=", + "dev": true, + "dependencies": { + "lower-case": "^1.1.0" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-upper-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", + "integrity": "sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8=", + "dev": true, + "dependencies": { + "upper-case": "^1.1.0" + } + }, + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "peer": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "node_modules/isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true, + "dependencies": { + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/js-graph-algorithms": { + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.18.tgz", + "integrity": "sha512-Gu1wtWzXBzGeye/j9BuyplGHscwqKRZodp/0M1vyBc19RJpblSwKGu099KwwaTx9cRIV+Qupk8xUMfEiGfFqSA==", + "dev": true, + "bin": { + "js-graphs": "src/jsgraphs.js" + } + }, + "node_modules/js-sdsl": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", + "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "peer": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/js-yaml/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "node_modules/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "node_modules/jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonschema": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", + "integrity": "sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw==", + "dev": true, + "peer": true, + "engines": { + "node": "*" + } + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dev": true, + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/keccak": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.3.tgz", + "integrity": "sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.0" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.9" + } + }, + "node_modules/lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "dependencies": { + "invert-kv": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/level": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", + "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==", + "dev": true, + "dependencies": { + "browser-level": "^1.0.1", + "classic-level": "^1.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/level" + } + }, + "node_modules/level-supports": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", + "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/level-transcoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", + "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", + "dev": true, + "dependencies": { + "buffer": "^6.0.3", + "module-error": "^1.0.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lilconfig": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lint-staged": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.10.tgz", + "integrity": "sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==", + "dev": true, + "dependencies": { + "chalk": "~5.3.0", + "commander": "~12.1.0", + "debug": "~4.3.6", + "execa": "~8.0.1", + "lilconfig": "~3.1.2", + "listr2": "~8.2.4", + "micromatch": "~4.0.8", + "pidtree": "~0.6.0", + "string-argv": "~0.3.2", + "yaml": "~2.5.0" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/lint-staged/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/lint-staged/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/lint-staged/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/listr2": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.4.tgz", + "integrity": "sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==", + "dev": true, + "dependencies": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/listr2/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/listr2/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/listr2/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true + }, + "node_modules/listr2/node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true + }, + "node_modules/listr2/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/listr2/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true, + "peer": true + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "dev": true + }, + "node_modules/lodash.isequalwith": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.isequalwith/-/lodash.isequalwith-4.4.0.tgz", + "integrity": "sha512-dcZON0IalGBpRmJBmMkaoV7d3I80R2O+FrzsZyHdNSFrANq/cgDqKQNmAHE8UEj4+QYWwwhkQOVdLHiAopzlsQ==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.omit": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", + "integrity": "sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg==", + "dev": true + }, + "node_modules/lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==", + "dev": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", + "dev": true, + "peer": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/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==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/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==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/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, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", + "dev": true, + "dependencies": { + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-escapes": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", + "dev": true, + "dependencies": { + "environment": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/log-update/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-update/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "dependencies": { + "get-east-asian-width": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.0" + } + }, + "node_modules/lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "node_modules/lower-case-first": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz", + "integrity": "sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E=", + "dev": true, + "dependencies": { + "lower-case": "^1.1.2" + } + }, + "node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.2" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "peer": true + }, + "node_modules/markdown-table": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", + "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", + "dev": true, + "peer": true + }, + "node_modules/match-all": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/match-all/-/match-all-1.2.6.tgz", + "integrity": "sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ==", + "dev": true + }, + "node_modules/mcl-wasm": { + "version": "0.7.9", + "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz", + "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==", + "dev": true, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + } + }, + "node_modules/memory-level": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz", + "integrity": "sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==", + "dev": true, + "dependencies": { + "abstract-level": "^1.0.0", + "functional-red-black-tree": "^1.0.1", + "module-error": "^1.0.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "dev": true, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micro-ftch": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "dev": true + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", + "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.31", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", + "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "dev": true, + "dependencies": { + "mime-db": "1.48.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "dev": true, + "dependencies": { + "dom-walk": "^0.1.0" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "node_modules/minipass/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "dev": true, + "dependencies": { + "minipass": "^2.9.0" + } + }, + "node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "node_modules/mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "deprecated": "This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.", + "dev": true, + "dependencies": { + "mkdirp": "*" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mnemonist": { + "version": "0.38.5", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", + "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", + "dev": true, + "dependencies": { + "obliterator": "^2.0.0" + } + }, + "node_modules/mocha": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", + "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/mocha/node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/mocha/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/mocha/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/mocha/node_modules/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==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/mocha/node_modules/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==", + "dev": true + }, + "node_modules/mocha/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/mocha/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mocha/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/mocha/node_modules/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==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/mocha/node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/mock-fs": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", + "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", + "dev": true + }, + "node_modules/module-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", + "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/multibase": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", + "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", + "deprecated": "This module has been superseded by the multiformats module", + "dev": true, + "dependencies": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "node_modules/multibase/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-providers-ipc": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.5.3.tgz", - "integrity": "sha512-JmeAptugVpmXI39LGxUSAymx0NOFdgpuI1hGQfIhbEAcd4sv7fhfd5D+ZU4oLHbRI8IFr4qfGU0uhR8BXhDzlg==", - "dev": true, - "requires": { - "oboe": "2.1.5", - "web3-core-helpers": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-providers-ws": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.5.3.tgz", - "integrity": "sha512-6DhTw4Q7nm5CFYEUHOJM0gAb3xFx+9gWpVveg3YxJ/ybR1BUvEWo3bLgIJJtX56cYX0WyY6DS35a7f0LOI1kVg==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.5.3", - "websocket": "^1.0.32" - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/multicodec": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", + "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", + "deprecated": "This module has been superseded by the multiformats module", + "dev": true, + "dependencies": { + "varint": "^5.0.0" + } + }, + "node_modules/multihashes": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", + "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "dev": true, + "dependencies": { + "buffer": "^5.5.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" + } + }, + "node_modules/multihashes/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-shh": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.5.3.tgz", - "integrity": "sha512-COfEXfsqoV/BkcsNLRxQqnWc1Teb8/9GxdGag5GtPC5gQC/vsN+7hYVJUwNxY9LtJPKYTij2DHHnx6UkITng+Q==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-net": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/multihashes/node_modules/multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "deprecated": "This module has been superseded by the multiformats module", + "dev": true, + "dependencies": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + }, + "node_modules/murmur-128": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/murmur-128/-/murmur-128-0.2.1.tgz", + "integrity": "sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg==", + "dev": true, + "dependencies": { + "encode-utf8": "^1.0.2", + "fmix": "^0.1.0", + "imul": "^1.0.0" + } + }, + "node_modules/nano-base32": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/nano-base32/-/nano-base32-1.0.1.tgz", + "integrity": "sha1-ulSMh578+5DaHE2eCX20pGySVe8=", + "dev": true + }, + "node_modules/nano-json-stream-parser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=", + "dev": true + }, + "node_modules/napi-macros": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", + "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", + "dev": true + }, + "node_modules/negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, + "node_modules/no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "dependencies": { + "lower-case": "^1.1.1" + } + }, + "node_modules/node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "dev": true + }, + "node_modules/node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "dev": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", + "dev": true, + "peer": true, + "dependencies": { + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + } + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true } } }, - "@truffle/error": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.1.0.tgz", - "integrity": "sha512-RbUfp5VreNhsa2Q4YbBjz18rOQI909pG32bghl1hulO7IpvcqTS+C3Ge5cNbiWQ1WGzy1wIeKLW0tmQtHFB7qg==", + "node_modules/node-gyp-build": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", + "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", + "dev": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/nofilter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz", + "integrity": "sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "peer": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "dev": true, + "dependencies": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/number-to-bn/node_modules/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.getownpropertydescriptors": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz", + "integrity": "sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==", + "dev": true, + "peer": true, + "dependencies": { + "array.prototype.reduce": "^1.0.5", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.21.2", + "safe-array-concat": "^1.0.0" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/obliterator": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", + "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==", + "dev": true + }, + "node_modules/oboe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", + "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", + "dev": true, + "dependencies": { + "http-https": "^1.0.0" + } + }, + "node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "peer": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ordinal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", + "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", + "dev": true, + "peer": true + }, + "node_modules/os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "dependencies": { + "lcid": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, + "dependencies": { + "p-finally": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "node_modules/param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true, + "dependencies": { + "no-case": "^2.2.0" + } + }, + "node_modules/parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, + "dependencies": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", + "dev": true, + "peer": true + }, + "node_modules/parse-headers": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", + "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==", "dev": true }, - "@truffle/events": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@truffle/events/-/events-0.1.6.tgz", - "integrity": "sha512-x36fB83En+K91Uoiv47qZ3leeo3AhVFh9i/wtgHQxDXzOdSjKR7bD8Y4lZua2MABg9Kg5Z4r8iWrPfeWLeqJmg==", + "node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, - "optional": true, - "requires": { - "@truffle/spinners": "^0.2.0", - "emittery": "^0.4.1", - "web3-utils": "1.5.3" + "dependencies": { + "error-ex": "^1.2.0" }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "dev": true, "dependencies": { - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "optional": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } - } + "entities": "^4.4.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" } }, - "@truffle/hdwallet-provider": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-2.0.7.tgz", - "integrity": "sha512-ddkVUPfBjbxtlvhO7hc2DbqSZ+PrICgI44EIWZwFg5v6Zam+qPVLnfrEnXSVoJzw4j+usFzTIxvpiid+AzKdLw==", + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", "dev": true, - "requires": { - "@ethereumjs/common": "^2.4.0", - "@ethereumjs/tx": "^3.3.0", - "eth-sig-util": "^3.0.1", - "ethereum-cryptography": "1.0.3", - "ethereum-protocol": "^1.0.1", - "ethereumjs-util": "^6.1.0", - "ethereumjs-wallet": "^1.0.1", - "web3-provider-engine": "16.0.3" + "dependencies": { + "domhandler": "^5.0.2", + "parse5": "^7.0.0" }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/pascal-case": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz", + "integrity": "sha1-LVeNNFX2YNpl7KGO+VtODekSdh4=", + "dev": true, "dependencies": { - "eth-sig-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.1.tgz", - "integrity": "sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==", - "dev": true, - "requires": { - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^5.1.1", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.0" - }, - "dependencies": { - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - }, - "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - } - } - }, - "ethereum-cryptography": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.0.3.tgz", - "integrity": "sha512-NQLTW0x0CosoVb/n79x/TRHtfvS3hgNUPTUSCu0vM+9k6IIhHFFrAOJReneexjZsoZxMjJHnJn4lrE8EbnSyqQ==", - "dev": true, - "requires": { - "@noble/hashes": "1.0.0", - "@noble/secp256k1": "1.5.5", - "@scure/bip32": "1.0.1", - "@scure/bip39": "1.0.0" - } - }, - "ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - }, - "dependencies": { - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", - "dev": true, - "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" - } - } - } + "camel-case": "^3.0.0", + "upper-case-first": "^1.1.0" + } + }, + "node_modules/path-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", + "integrity": "sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU=", + "dev": true, + "dependencies": { + "no-case": "^2.2.0" + } + }, + "node_modules/path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "dependencies": { + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "node_modules/path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dev": true, + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true, + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "dependencies": { + "pinkie": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/plantuml-encoder": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/plantuml-encoder/-/plantuml-encoder-1.4.0.tgz", + "integrity": "sha512-sxMwpDw/ySY1WB2CE3+IdMuEcWibJ72DDOsXLkSmEaSzwEUaYBT6DWgOfBiHGCux4q433X6+OEFWjlVqp7gL6g==", + "dev": true + }, + "node_modules/pollock": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/pollock/-/pollock-0.2.1.tgz", + "integrity": "sha512-2Xy6LImSXm0ANKv9BKSVuCa6Z4ACbK7oUrl9gtUgqLkekL7n9C0mlWsOGYYuGbCG8xT0x3Q4F31C3ZMyVQjwsg==", + "dev": true + }, + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-organize-imports": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-4.0.0.tgz", + "integrity": "sha512-vnKSdgv9aOlqKeEFGhf9SCBsTyzDSyScy1k7E0R1Uo4L0cTcOV7c1XQaT7jfXIOc/p08WLBfN2QUQA9zDSZMxA==", + "dev": true, + "peerDependencies": { + "@vue/language-plugin-pug": "^2.0.24", + "prettier": ">=2.0", + "typescript": ">=2.9", + "vue-tsc": "^2.0.24" + }, + "peerDependenciesMeta": { + "@vue/language-plugin-pug": { + "optional": true }, - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "dev": true + "vue-tsc": { + "optional": true } } }, - "@truffle/interface-adapter": { - "version": "0.5.15", - "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.15.tgz", - "integrity": "sha512-e6kSlSfn7XovKrrQ4lLUjog/cvwAelRNZLk7sfJ9pigZ+NRTlFmtrcWGUYgNIGuhAb48wYiRBEnkFIpqKGTtBw==", + "node_modules/prettier-plugin-solidity": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.4.1.tgz", + "integrity": "sha512-Mq8EtfacVZ/0+uDKTtHZGW3Aa7vEbX/BNx63hmVg6YTiTXSiuKP0amj0G6pGwjmLaOfymWh3QgXEZkjQbU8QRg==", "dev": true, - "requires": { - "bn.js": "^5.1.3", - "ethers": "^4.0.32", - "web3": "1.5.3" - }, "dependencies": { - "@ethersproject/abi": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", - "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/strings": "^5.0.4" - } - }, - "bignumber.js": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", - "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", - "dev": true - }, - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - }, - "ethers": { - "version": "4.0.49", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", - "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", - "dev": true, - "requires": { - "aes-js": "3.0.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.3", - "js-sha3": "0.5.7", - "scrypt-js": "2.0.4", - "setimmediate": "1.0.4", - "uuid": "2.0.1", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.0" - } - }, - "scrypt-js": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", - "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", - "dev": true - }, - "setimmediate": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", - "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", - "dev": true - }, - "web3": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.5.3.tgz", - "integrity": "sha512-eyBg/1K44flfv0hPjXfKvNwcUfIVDI4NX48qHQe6wd7C8nPSdbWqo9vLy6ksZIt9NLa90HjI8HsGYgnMSUxn6w==", - "dev": true, - "requires": { - "web3-bzz": "1.5.3", - "web3-core": "1.5.3", - "web3-eth": "1.5.3", - "web3-eth-personal": "1.5.3", - "web3-net": "1.5.3", - "web3-shh": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-bzz": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.5.3.tgz", - "integrity": "sha512-SlIkAqG0eS6cBS9Q2eBOTI1XFzqh83RqGJWnyrNZMDxUwsTVHL+zNnaPShVPvrWQA1Ub5b0bx1Kc5+qJVxsTJg==", - "dev": true, - "requires": { - "@types/node": "^12.12.6", - "got": "9.6.0", - "swarm-js": "^0.1.40" - } - }, - "web3-core": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.5.3.tgz", - "integrity": "sha512-ACTbu8COCu+0eUNmd9pG7Q9EVsNkAg2w3Y7SqhDr+zjTgbSHZV01jXKlapm9z+G3AN/BziV3zGwudClJ4u4xXQ==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.5", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-requestmanager": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-core-helpers": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.5.3.tgz", - "integrity": "sha512-Ip1IjB3S8vN7Kf1PPjK41U5gskmMk6IJQlxIVuS8/1U7n/o0jC8krqtpRwiMfAgYyw3TXwBFtxSRTvJtnLyXZw==", - "dev": true, - "requires": { - "web3-eth-iban": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-core-method": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.5.3.tgz", - "integrity": "sha512-8wJrwQ2qD9ibWieF9oHXwrJsUGrv3XAtEkNeyvyNMpktNTIjxJ2jaFGQUuLiyUrMubD18XXgLk4JS6PJU4Loeg==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.4.0", - "@ethersproject/transactions": "^5.0.0-beta.135", - "web3-core-helpers": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-core-promievent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.5.3.tgz", - "integrity": "sha512-CFfgqvk3Vk6PIAxtLLuX+pOMozxkKCY+/GdGr7weMh033mDXEPvwyVjoSRO1PqIKj668/hMGQsVoIgbyxkJ9Mg==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4" - } - }, - "web3-core-requestmanager": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.5.3.tgz", - "integrity": "sha512-9k/Bze2rs8ONix5IZR+hYdMNQv+ark2Ek2kVcrFgWO+LdLgZui/rn8FikPunjE+ub7x7pJaKCgVRbYFXjo3ZWg==", - "dev": true, - "requires": { - "util": "^0.12.0", - "web3-core-helpers": "1.5.3", - "web3-providers-http": "1.5.3", - "web3-providers-ipc": "1.5.3", - "web3-providers-ws": "1.5.3" - } - }, - "web3-core-subscriptions": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.5.3.tgz", - "integrity": "sha512-L2m9vG1iRN6thvmv/HQwO2YLhOQlmZU8dpLG6GSo9FBN14Uch868Swk0dYVr3rFSYjZ/GETevSXU+O+vhCummA==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.5.3" - } - }, - "web3-eth": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.5.3.tgz", - "integrity": "sha512-saFurA1L23Bd7MEf7cBli6/jRdMhD4X/NaMiO2mdMMCXlPujoudlIJf+VWpRWJpsbDFdu7XJ2WHkmBYT5R3p1Q==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-eth-accounts": "1.5.3", - "web3-eth-contract": "1.5.3", - "web3-eth-ens": "1.5.3", - "web3-eth-iban": "1.5.3", - "web3-eth-personal": "1.5.3", - "web3-net": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-eth-abi": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.5.3.tgz", - "integrity": "sha512-i/qhuFsoNrnV130CSRYX/z4SlCfSQ4mHntti5yTmmQpt70xZKYZ57BsU0R29ueSQ9/P+aQrL2t2rqkQkAloUxg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.0.7", - "web3-utils": "1.5.3" - } + "@solidity-parser/parser": "^0.18.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "prettier": ">=2.3.0" + } + }, + "node_modules/prettier-plugin-solidity/node_modules/@solidity-parser/parser": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.18.0.tgz", + "integrity": "sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==", + "dev": true + }, + "node_modules/prettier-plugin-solidity/node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/printj": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", + "integrity": "sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==", + "dev": true, + "bin": { + "printj": "bin/printj.njs" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "peer": true + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "dev": true, + "peer": true, + "dependencies": { + "asap": "~2.0.6" + } + }, + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/puml-for-markdown": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/puml-for-markdown/-/puml-for-markdown-1.2.1.tgz", + "integrity": "sha512-zDlnWjNBlTF8LKaI9wxOQPCbqZoObgIn14cTzAHRwkY2At2wIdbqnvPAqAs6ONlZ/9ATPvQ2LPL2ZZy6c7o0ug==", + "dev": true, + "dependencies": { + "bent": "7.3.12", + "bluebird": "3.7.2", + "commander": "8.2.0", + "gitignore-globs": "0.1.1", + "glob": "7.2.0", + "lodash": "4.17.21", + "plantuml-encoder": "1.4.0", + "tinyurl": "1.1.7" + }, + "bin": { + "puml-for-markdown": "bin/index.js" + } + }, + "node_modules/puml-for-markdown/node_modules/commander": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.2.0.tgz", + "integrity": "sha512-LLKxDvHeL91/8MIyTAD5BFMNtoIwztGPMiM/7Bl8rIPmHCZXRxmSWr91h57dpOpnQ6jIUqEWdXE/uBYMfiVZDA==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", + "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/puppeteer": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.7.0.tgz", + "integrity": "sha512-U1uufzBjz3+PkpCxFrWzh4OrMIdIb2ztzCu0YEPfRHjHswcSwHZswnK+WdsOQJsRV8WeTg3jLhJR4D867+fjsA==", + "deprecated": "< 19.4.0 is no longer supported", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "cross-fetch": "3.1.5", + "debug": "4.3.4", + "devtools-protocol": "0.0.981744", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.1", + "pkg-dir": "4.2.0", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.5.0" + }, + "engines": { + "node": ">=10.18.1" + } + }, + "node_modules/puppeteer/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/puppeteer/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/puppeteer/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/puppeteer/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/puppeteer/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/puppeteer/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/puppeteer/node_modules/ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true }, - "web3-eth-accounts": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.5.3.tgz", - "integrity": "sha512-pdGhXgeBaEJENMvRT6W9cmji3Zz/46ugFSvmnLLw79qi5EH7XJhKISNVb41eWCrs4am5GhI67GLx5d2s2a72iw==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.3.0", - "@ethereumjs/tx": "^3.2.1", - "crypto-browserify": "3.12.0", - "eth-lib": "0.2.8", - "ethereumjs-util": "^7.0.10", - "scrypt-js": "^3.0.1", - "uuid": "3.3.2", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-utils": "1.5.3" - }, - "dependencies": { - "scrypt-js": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", - "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - } - } + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/pure-rand": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.1.tgz", + "integrity": "sha512-ksWccjmXOHU2gJBnH0cK1lSYdvSZ0zLoCMSz/nTGh6hDvCSgcRxDyIcOBD6KNxFz3xhMPm/T267Tbe2JRymKEQ==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + }, + "node_modules/qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/query-string": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz", + "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==", + "dev": true, + "dependencies": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-eth-contract": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.5.3.tgz", - "integrity": "sha512-Gdlt1L6cdHe83k7SdV6xhqCytVtOZkjD0kY/15x441AuuJ4JLubCHuqu69k2Dr3tWifHYVys/vG8QE/W16syGg==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.5", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-utils": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-eth-ens": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.5.3.tgz", - "integrity": "sha512-QmGFFtTGElg0E+3xfCIFhiUF+1imFi9eg/cdsRMUZU4F1+MZCC/ee+IAelYLfNTGsEslCqfAusliKOT9DdGGnw==", - "dev": true, - "requires": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-eth-contract": "1.5.3", - "web3-utils": "1.5.3" - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "dev": true, + "dependencies": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "dependencies": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "peer": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/recursive-readdir": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz", + "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==", + "dev": true, + "peer": true, + "dependencies": { + "minimatch": "3.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "dev": true + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/req-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", + "integrity": "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==", + "dev": true, + "peer": true, + "dependencies": { + "req-from": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/req-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", + "integrity": "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==", + "dev": true, + "peer": true, + "dependencies": { + "resolve-from": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/req-from/node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dev": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dev": true, + "peer": true, + "dependencies": { + "lodash": "^4.17.19" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", + "dev": true, + "peer": true, + "dependencies": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "engines": { + "node": ">=0.12.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request/node_modules/qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true + }, + "node_modules/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "dependencies": { + "lowercase-keys": "^1.0.0" + } + }, + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "peer": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/ripemd160-min": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/ripemd160-min/-/ripemd160-min-0.0.6.tgz", + "integrity": "sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/rlc-faucet-contract": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/rlc-faucet-contract/-/rlc-faucet-contract-1.0.10.tgz", + "integrity": "sha512-pGQyIMcLIUQraCTNIcA4B9FY1g2vJHB8qWg3qbwjA1YUj1490LStKDlA4YlPwPgO/a0NWg0UHD7R9ki3DMGACQ==" + }, + "node_modules/rlp": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.6.tgz", + "integrity": "sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.1" + }, + "bin": { + "rlp": "bin/rlp" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-eth-iban": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.5.3.tgz", - "integrity": "sha512-vMzmGqolYZvRHwP9P4Nf6G8uYM5aTLlQu2a34vz78p0KlDC+eV1th3+90Qeaupa28EG7OO0IT1F0BejiIauOPw==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "web3-utils": "1.5.3" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-eth-personal": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.5.3.tgz", - "integrity": "sha512-JzibJafR7ak/Icas8uvos3BmUNrZw1vShuNR5Cxjo+vteOC8XMqz1Vr7RH65B4bmlfb3bm9xLxetUHO894+Sew==", - "dev": true, - "requires": { - "@types/node": "^12.12.6", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-net": "1.5.3", - "web3-utils": "1.5.3" - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peer": true, + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/run-parallel-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", + "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-net": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.5.3.tgz", - "integrity": "sha512-0W/xHIPvgVXPSdLu0iZYnpcrgNnhzHMC888uMlGP5+qMCt8VuflUZHy7tYXae9Mzsg1kxaJAS5lHVNyeNw4CoQ==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-method": "1.5.3", - "web3-utils": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-providers-http": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.5.3.tgz", - "integrity": "sha512-5DpUyWGHtDAr2RYmBu34Fu+4gJuBAuNx2POeiJIooUtJ+Mu6pIx4XkONWH6V+Ez87tZAVAsFOkJRTYuzMr3rPw==", - "dev": true, - "requires": { - "web3-core-helpers": "1.5.3", - "xhr2-cookies": "1.1.0" - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rustbn.js": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", + "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==", + "dev": true + }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-providers-ipc": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.5.3.tgz", - "integrity": "sha512-JmeAptugVpmXI39LGxUSAymx0NOFdgpuI1hGQfIhbEAcd4sv7fhfd5D+ZU4oLHbRI8IFr4qfGU0uhR8BXhDzlg==", - "dev": true, - "requires": { - "oboe": "2.1.5", - "web3-core-helpers": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-providers-ws": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.5.3.tgz", - "integrity": "sha512-6DhTw4Q7nm5CFYEUHOJM0gAb3xFx+9gWpVveg3YxJ/ybR1BUvEWo3bLgIJJtX56cYX0WyY6DS35a7f0LOI1kVg==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.5.3", - "websocket": "^1.0.32" - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sc-istanbul": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", + "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", + "dev": true, + "peer": true, + "dependencies": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "istanbul": "lib/cli.js" + } + }, + "node_modules/sc-istanbul/node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true, + "peer": true + }, + "node_modules/sc-istanbul/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "peer": true, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/sc-istanbul/node_modules/resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true, + "peer": true + }, + "node_modules/scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true + }, + "node_modules/secp256k1": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", + "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "elliptic": "^6.5.2", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "node_modules/sentence-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz", + "integrity": "sha1-H24t2jnBaL+S0T+G1KkYkz9mftQ=", + "dev": true, + "dependencies": { + "no-case": "^2.2.0", + "upper-case-first": "^1.1.2" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "dev": true, + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/servify": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/servify/-/servify-0.1.12.tgz", + "integrity": "sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw==", + "dev": true, + "dependencies": { + "body-parser": "^1.16.0", + "cors": "^2.8.1", + "express": "^4.14.0", + "request": "^2.79.0", + "xhr": "^2.3.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "node_modules/setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", + "dev": true + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/sha1": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", + "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", + "dev": true, + "peer": true, + "dependencies": { + "charenc": ">= 0.0.1", + "crypt": ">= 0.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/sha3": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", + "integrity": "sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==", + "dev": true, + "dependencies": { + "buffer": "6.0.3" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "dev": true, + "peer": true, + "dependencies": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + }, + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-shh": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.5.3.tgz", - "integrity": "sha512-COfEXfsqoV/BkcsNLRxQqnWc1Teb8/9GxdGag5GtPC5gQC/vsN+7hYVJUwNxY9LtJPKYTij2DHHnx6UkITng+Q==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-net": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/simple-get": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-2.8.2.tgz", + "integrity": "sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw==", + "dev": true, + "dependencies": { + "decompress-response": "^3.3.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/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==", + "dev": true, + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/slice-ansi/node_modules/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==", + "dev": true, + "peer": true + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/snake-case": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz", + "integrity": "sha1-Qb2xtz8w7GagTU4srRt2OH1NbZ8=", + "dev": true, + "dependencies": { + "no-case": "^2.2.0" + } + }, + "node_modules/sol2uml": { + "version": "2.5.19", + "resolved": "https://registry.npmjs.org/sol2uml/-/sol2uml-2.5.19.tgz", + "integrity": "sha512-edip2A4LEehh0rJah/j2dHpD8rsNGHc61INQOPo+dvY3MDm/xOUoykGsw6RMPXq8/uOZY+tCWIcZyIdW91aawg==", + "dev": true, + "dependencies": { + "@aduh95/viz.js": "^3.7.0", + "@solidity-parser/parser": "^0.16.1", + "axios": "^1.6.0", + "axios-debug-log": "^1.0.0", + "cli-color": "^2.0.3", + "commander": "^11.1.0", + "convert-svg-to-png": "^0.6.4", + "debug": "^4.3.4", + "diff-match-patch": "^1.0.5", + "ethers": "^5.7.2", + "js-graph-algorithms": "^1.0.18", + "klaw": "^4.1.0" + }, + "bin": { + "sol2uml": "lib/sol2uml.js" + } + }, + "node_modules/sol2uml/node_modules/@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", + "dev": true, + "dependencies": { + "antlr4ts": "^0.5.0-alpha.4" + } + }, + "node_modules/sol2uml/node_modules/commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "dev": true, + "engines": { + "node": ">=16" + } + }, + "node_modules/sol2uml/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true } } }, - "@truffle/preserve": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@truffle/preserve/-/preserve-0.2.7.tgz", - "integrity": "sha512-A5pRuFre9IR2m2BB1JMF9CItgUSwR2eRhqHU2ltvPjWHNxbGAo4tMZat+124hed6zDBUduYsjmV5Yr5wo7kF8g==", + "node_modules/sol2uml/node_modules/klaw": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-4.1.0.tgz", + "integrity": "sha512-1zGZ9MF9H22UnkpVeuaGKOjfA2t6WrfdrJmGjy16ykcjnKQDmHVX+KI477rpbGevz/5FD4MC3xf1oxylBgcaQw==", + "dev": true, + "engines": { + "node": ">=14.14.0" + } + }, + "node_modules/sol2uml/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/solc": { + "version": "0.4.26", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz", + "integrity": "sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA==", + "dev": true, + "dependencies": { + "fs-extra": "^0.30.0", + "memorystream": "^0.3.1", + "require-from-string": "^1.1.0", + "semver": "^5.3.0", + "yargs": "^4.7.1" + }, + "bin": { + "solcjs": "solcjs" + } + }, + "node_modules/solidity-ast": { + "version": "0.4.52", + "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.52.tgz", + "integrity": "sha512-iOya9BSiB9jhM8Vf40n8lGELGzwrUc57rl5BhfNtJ5cvAaMvRcNlHeAMNvqJJyjoUnczqRbHqdivEqK89du3Cw==", + "dev": true, + "dependencies": { + "array.prototype.findlast": "^1.2.2" + } + }, + "node_modules/solidity-coverage": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.2.tgz", + "integrity": "sha512-cv2bWb7lOXPE9/SSleDO6czkFiMHgP4NXPj+iW9W7iEKLBk7Cj0AGBiNmGX3V1totl9wjPrT0gHmABZKZt65rQ==", + "dev": true, + "peer": true, + "dependencies": { + "@ethersproject/abi": "^5.0.9", + "@solidity-parser/parser": "^0.14.1", + "chalk": "^2.4.2", + "death": "^1.1.0", + "detect-port": "^1.3.0", + "difflib": "^0.2.4", + "fs-extra": "^8.1.0", + "ghost-testrpc": "^0.0.2", + "global-modules": "^2.0.0", + "globby": "^10.0.1", + "jsonschema": "^1.2.4", + "lodash": "^4.17.15", + "mocha": "7.1.2", + "node-emoji": "^1.10.0", + "pify": "^4.0.1", + "recursive-readdir": "^2.2.2", + "sc-istanbul": "^0.4.5", + "semver": "^7.3.4", + "shelljs": "^0.8.3", + "web3-utils": "^1.3.6" + }, + "bin": { + "solidity-coverage": "plugins/bin.js" + }, + "peerDependencies": { + "hardhat": "^2.11.0" + } + }, + "node_modules/solidity-coverage/node_modules/ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "peer": true, + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.1" + } + }, + "node_modules/solidity-coverage/node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "peer": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/solidity-coverage/node_modules/cliui/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, - "optional": true, - "requires": { - "spinnies": "^0.5.1" + "peer": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" } }, - "@truffle/preserve-fs": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@truffle/preserve-fs/-/preserve-fs-0.2.7.tgz", - "integrity": "sha512-f4zHbIN86tFo6Q7L/xhvew+0tzjgY+CSYXvDtiWInqw5knjVg8O+G58rQrRTA6fqD312mQfJRVZRbyrxkKO/2Q==", + "node_modules/solidity-coverage/node_modules/debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", "dev": true, - "optional": true, - "requires": { - "@truffle/preserve": "^0.2.7" + "peer": true, + "dependencies": { + "ms": "^2.1.1" } }, - "@truffle/preserve-to-buckets": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@truffle/preserve-to-buckets/-/preserve-to-buckets-0.2.8.tgz", - "integrity": "sha512-Ryd7Kx4+G64tkUs51ajw13dgyzaQ2Z/UwiEE+ZTmJsG075S/KrPDAtqgPdjYOuiSOE9/jLJ/3c9Tly1ptr2txw==", + "node_modules/solidity-coverage/node_modules/diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true, - "optional": true, - "requires": { - "@textile/hub": "^6.0.2", - "@truffle/preserve": "^0.2.7", - "cids": "^1.1.5", - "ipfs-http-client": "^48.2.2", - "isomorphic-ws": "^4.0.1", - "iter-tools": "^7.0.2", - "ws": "^7.2.0" + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/solidity-coverage/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true, + "peer": true + }, + "node_modules/solidity-coverage/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "peer": true, "dependencies": { - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - } - }, - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1" - } - }, - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", - "dev": true, - "optional": true, - "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - } - }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - } - } - }, - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true - } + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, + "peer": true, + "dependencies": { + "is-buffer": "~2.0.3" + }, + "bin": { + "flat": "cli.js" } }, - "@truffle/preserve-to-filecoin": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/@truffle/preserve-to-filecoin/-/preserve-to-filecoin-0.2.9.tgz", - "integrity": "sha512-oDIg9l2uGtJ/64uylXmtFBaVvAxbl3DDii5E9y3UHVdmTxkAG2JmYNjiB4FNzAOvIMrm+HP7tRhH9WujLBjt3w==", + "node_modules/solidity-coverage/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, + "peer": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/solidity-coverage/node_modules/fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "deprecated": "\"Please update to latest v2.3 or v2.2\"", + "dev": true, + "hasInstallScript": true, "optional": true, - "requires": { - "@truffle/preserve": "^0.2.7", - "@trufflesuite/filecoin.js": "^0.0.4", - "cids": "^1.1.5", - "delay": "^5.0.0" + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/solidity-coverage/node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "peer": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/solidity-coverage/node_modules/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, + "engines": { + "node": "*" + } + }, + "node_modules/solidity-coverage/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "peer": true, "dependencies": { - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - } - }, - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1" - } - }, - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", - "dev": true, - "optional": true, - "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - } - }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - } - } - }, - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true - } + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/solidity-coverage/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/solidity-coverage/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "peer": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "peer": true, + "dependencies": { + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/solidity-coverage/node_modules/mocha": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", + "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/solidity-coverage/node_modules/ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true, + "peer": true + }, + "node_modules/solidity-coverage/node_modules/object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "peer": true, + "dependencies": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/solidity-coverage/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "peer": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/solidity-coverage/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "peer": true, + "dependencies": { + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/solidity-coverage/node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true, + "peer": true + }, + "node_modules/solidity-coverage/node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "peer": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/solidity-coverage/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "dev": true, + "peer": true + }, + "node_modules/solidity-coverage/node_modules/wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "peer": true, + "dependencies": { + "string-width": "^1.0.2 || 2" + } + }, + "node_modules/solidity-coverage/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/wrap-ansi/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "peer": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-coverage/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true, + "peer": true + }, + "node_modules/solidity-coverage/node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "peer": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/solidity-coverage/node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "peer": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } }, - "@truffle/preserve-to-ipfs": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@truffle/preserve-to-ipfs/-/preserve-to-ipfs-0.2.8.tgz", - "integrity": "sha512-Wyz9aVfx+b2YQpeb0cPnOGRgLHyjFUJXMSJa+cJhlsRHyBPgaK1HFAMhXqCYIEm8vLGT+hu9K2DWIjXc1an91w==", + "node_modules/solidity-coverage/node_modules/yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", "dev": true, - "optional": true, - "requires": { - "@truffle/preserve": "^0.2.7", - "ipfs-http-client": "^48.2.2", - "iter-tools": "^7.0.2" + "peer": true, + "dependencies": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + }, + "engines": { + "node": ">=6" } }, - "@truffle/provider": { - "version": "0.2.53", - "resolved": "https://registry.npmjs.org/@truffle/provider/-/provider-0.2.53.tgz", - "integrity": "sha512-hd/0hYL4FcSXKH8PRZCC/p3YFbHokAZFs01xq/G7g5S/XpDVAgdfq9LeNKA6H+S8t8vlOMeLBTE1Z/6agSHdaQ==", + "node_modules/solidity-coverage/node_modules/yargs/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, - "requires": { - "@truffle/error": "^0.1.0", - "@truffle/interface-adapter": "^0.5.15", - "web3": "1.5.3" + "peer": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" }, + "engines": { + "node": ">=6" + } + }, + "node_modules/solidity-docgen": { + "version": "0.6.0-beta.36", + "resolved": "https://registry.npmjs.org/solidity-docgen/-/solidity-docgen-0.6.0-beta.36.tgz", + "integrity": "sha512-f/I5G2iJgU1h0XrrjRD0hHMr7C10u276vYvm//rw1TzFcYQ4xTOyAoi9oNAHRU0JU4mY9eTuxdVc2zahdMuhaQ==", + "dev": true, "dependencies": { - "@ethersproject/abi": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", - "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", - "dev": true, - "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/strings": "^5.0.4" - } - }, - "bignumber.js": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", - "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", - "dev": true - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "web3": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.5.3.tgz", - "integrity": "sha512-eyBg/1K44flfv0hPjXfKvNwcUfIVDI4NX48qHQe6wd7C8nPSdbWqo9vLy6ksZIt9NLa90HjI8HsGYgnMSUxn6w==", - "dev": true, - "requires": { - "web3-bzz": "1.5.3", - "web3-core": "1.5.3", - "web3-eth": "1.5.3", - "web3-eth-personal": "1.5.3", - "web3-net": "1.5.3", - "web3-shh": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-bzz": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.5.3.tgz", - "integrity": "sha512-SlIkAqG0eS6cBS9Q2eBOTI1XFzqh83RqGJWnyrNZMDxUwsTVHL+zNnaPShVPvrWQA1Ub5b0bx1Kc5+qJVxsTJg==", - "dev": true, - "requires": { - "@types/node": "^12.12.6", - "got": "9.6.0", - "swarm-js": "^0.1.40" - } - }, - "web3-core": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.5.3.tgz", - "integrity": "sha512-ACTbu8COCu+0eUNmd9pG7Q9EVsNkAg2w3Y7SqhDr+zjTgbSHZV01jXKlapm9z+G3AN/BziV3zGwudClJ4u4xXQ==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.5", - "@types/node": "^12.12.6", - "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-requestmanager": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-core-helpers": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.5.3.tgz", - "integrity": "sha512-Ip1IjB3S8vN7Kf1PPjK41U5gskmMk6IJQlxIVuS8/1U7n/o0jC8krqtpRwiMfAgYyw3TXwBFtxSRTvJtnLyXZw==", - "dev": true, - "requires": { - "web3-eth-iban": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-core-method": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.5.3.tgz", - "integrity": "sha512-8wJrwQ2qD9ibWieF9oHXwrJsUGrv3XAtEkNeyvyNMpktNTIjxJ2jaFGQUuLiyUrMubD18XXgLk4JS6PJU4Loeg==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.4.0", - "@ethersproject/transactions": "^5.0.0-beta.135", - "web3-core-helpers": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-core-promievent": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.5.3.tgz", - "integrity": "sha512-CFfgqvk3Vk6PIAxtLLuX+pOMozxkKCY+/GdGr7weMh033mDXEPvwyVjoSRO1PqIKj668/hMGQsVoIgbyxkJ9Mg==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4" - } - }, - "web3-core-requestmanager": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.5.3.tgz", - "integrity": "sha512-9k/Bze2rs8ONix5IZR+hYdMNQv+ark2Ek2kVcrFgWO+LdLgZui/rn8FikPunjE+ub7x7pJaKCgVRbYFXjo3ZWg==", - "dev": true, - "requires": { - "util": "^0.12.0", - "web3-core-helpers": "1.5.3", - "web3-providers-http": "1.5.3", - "web3-providers-ipc": "1.5.3", - "web3-providers-ws": "1.5.3" - } - }, - "web3-core-subscriptions": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.5.3.tgz", - "integrity": "sha512-L2m9vG1iRN6thvmv/HQwO2YLhOQlmZU8dpLG6GSo9FBN14Uch868Swk0dYVr3rFSYjZ/GETevSXU+O+vhCummA==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.5.3" - } - }, - "web3-eth": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.5.3.tgz", - "integrity": "sha512-saFurA1L23Bd7MEf7cBli6/jRdMhD4X/NaMiO2mdMMCXlPujoudlIJf+VWpRWJpsbDFdu7XJ2WHkmBYT5R3p1Q==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-eth-accounts": "1.5.3", - "web3-eth-contract": "1.5.3", - "web3-eth-ens": "1.5.3", - "web3-eth-iban": "1.5.3", - "web3-eth-personal": "1.5.3", - "web3-net": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-eth-abi": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.5.3.tgz", - "integrity": "sha512-i/qhuFsoNrnV130CSRYX/z4SlCfSQ4mHntti5yTmmQpt70xZKYZ57BsU0R29ueSQ9/P+aQrL2t2rqkQkAloUxg==", - "dev": true, - "requires": { - "@ethersproject/abi": "5.0.7", - "web3-utils": "1.5.3" - } - }, - "web3-eth-accounts": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.5.3.tgz", - "integrity": "sha512-pdGhXgeBaEJENMvRT6W9cmji3Zz/46ugFSvmnLLw79qi5EH7XJhKISNVb41eWCrs4am5GhI67GLx5d2s2a72iw==", - "dev": true, - "requires": { - "@ethereumjs/common": "^2.3.0", - "@ethereumjs/tx": "^3.2.1", - "crypto-browserify": "3.12.0", - "eth-lib": "0.2.8", - "ethereumjs-util": "^7.0.10", - "scrypt-js": "^3.0.1", - "uuid": "3.3.2", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-eth-contract": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.5.3.tgz", - "integrity": "sha512-Gdlt1L6cdHe83k7SdV6xhqCytVtOZkjD0kY/15x441AuuJ4JLubCHuqu69k2Dr3tWifHYVys/vG8QE/W16syGg==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.5", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-eth-ens": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.5.3.tgz", - "integrity": "sha512-QmGFFtTGElg0E+3xfCIFhiUF+1imFi9eg/cdsRMUZU4F1+MZCC/ee+IAelYLfNTGsEslCqfAusliKOT9DdGGnw==", - "dev": true, - "requires": { - "content-hash": "^2.5.2", - "eth-ens-namehash": "2.0.8", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-promievent": "1.5.3", - "web3-eth-abi": "1.5.3", - "web3-eth-contract": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-eth-iban": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.5.3.tgz", - "integrity": "sha512-vMzmGqolYZvRHwP9P4Nf6G8uYM5aTLlQu2a34vz78p0KlDC+eV1th3+90Qeaupa28EG7OO0IT1F0BejiIauOPw==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "web3-utils": "1.5.3" - } - }, - "web3-eth-personal": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.5.3.tgz", - "integrity": "sha512-JzibJafR7ak/Icas8uvos3BmUNrZw1vShuNR5Cxjo+vteOC8XMqz1Vr7RH65B4bmlfb3bm9xLxetUHO894+Sew==", - "dev": true, - "requires": { - "@types/node": "^12.12.6", - "web3-core": "1.5.3", - "web3-core-helpers": "1.5.3", - "web3-core-method": "1.5.3", - "web3-net": "1.5.3", - "web3-utils": "1.5.3" - } - }, - "web3-net": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.5.3.tgz", - "integrity": "sha512-0W/xHIPvgVXPSdLu0iZYnpcrgNnhzHMC888uMlGP5+qMCt8VuflUZHy7tYXae9Mzsg1kxaJAS5lHVNyeNw4CoQ==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-method": "1.5.3", - "web3-utils": "1.5.3" - } + "handlebars": "^4.7.7", + "solidity-ast": "^0.4.38" + }, + "peerDependencies": { + "hardhat": "^2.8.0" + } + }, + "node_modules/solstruct": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/solstruct/-/solstruct-0.1.0.tgz", + "integrity": "sha512-7XiFF2g3R08tsfhhZfKbKheNC0A5lsdAxk5R2HVPzT/kwenTh8AUzmQoc10xw+zXO813KRRLK3t65KqgUE2T4w==" + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", + "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true, + "peer": true + }, + "node_modules/sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stacktrace-parser": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", + "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", + "dev": true, + "dependencies": { + "type-fest": "^0.7.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/stacktrace-parser/node_modules/type-fest": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", + "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/strict-uri-encode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true, + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-format": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz", + "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==", + "dev": true, + "peer": true + }, + "node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "dependencies": { + "is-utf8": "^0.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "dev": true, + "dependencies": { + "is-hex-prefixed": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, + "node_modules/strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^1.0.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/swap-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz", + "integrity": "sha1-w5IDpFhzhfrTyFCgvRvK+ggZdOM=", + "dev": true, + "dependencies": { + "lower-case": "^1.1.1", + "upper-case": "^1.1.1" + } + }, + "node_modules/swarm-js": { + "version": "0.1.40", + "resolved": "https://registry.npmjs.org/swarm-js/-/swarm-js-0.1.40.tgz", + "integrity": "sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA==", + "dev": true, + "dependencies": { + "bluebird": "^3.5.0", + "buffer": "^5.0.5", + "eth-lib": "^0.1.26", + "fs-extra": "^4.0.2", + "got": "^7.1.0", + "mime-types": "^2.1.16", + "mkdirp-promise": "^5.0.1", + "mock-fs": "^4.1.0", + "setimmediate": "^1.0.5", + "tar": "^4.0.2", + "xhr-request": "^1.0.1" + } + }, + "node_modules/swarm-js/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-providers-http": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.5.3.tgz", - "integrity": "sha512-5DpUyWGHtDAr2RYmBu34Fu+4gJuBAuNx2POeiJIooUtJ+Mu6pIx4XkONWH6V+Ez87tZAVAsFOkJRTYuzMr3rPw==", - "dev": true, - "requires": { - "web3-core-helpers": "1.5.3", - "xhr2-cookies": "1.1.0" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-providers-ipc": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.5.3.tgz", - "integrity": "sha512-JmeAptugVpmXI39LGxUSAymx0NOFdgpuI1hGQfIhbEAcd4sv7fhfd5D+ZU4oLHbRI8IFr4qfGU0uhR8BXhDzlg==", - "dev": true, - "requires": { - "oboe": "2.1.5", - "web3-core-helpers": "1.5.3" - } + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/swarm-js/node_modules/eth-lib": { + "version": "0.1.29", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", + "integrity": "sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "nano-json-stream-parser": "^0.1.2", + "servify": "^0.1.12", + "ws": "^3.0.0", + "xhr-request-promise": "^0.1.2" + } + }, + "node_modules/swarm-js/node_modules/fs-extra": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "node_modules/swarm-js/node_modules/got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "dependencies": { + "decompress-response": "^3.2.0", + "duplexer3": "^0.1.4", + "get-stream": "^3.0.0", + "is-plain-obj": "^1.1.0", + "is-retry-allowed": "^1.0.0", + "is-stream": "^1.0.0", + "isurl": "^1.0.0-alpha5", + "lowercase-keys": "^1.0.0", + "p-cancelable": "^0.3.0", + "p-timeout": "^1.1.1", + "safe-buffer": "^5.0.1", + "timed-out": "^4.0.0", + "url-parse-lax": "^1.0.0", + "url-to-options": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/swarm-js/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/swarm-js/node_modules/p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/swarm-js/node_modules/prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/swarm-js/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/swarm-js/node_modules/url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "dependencies": { + "prepend-http": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/swarm-js/node_modules/ws": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz", + "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==", + "dev": true, + "dependencies": { + "async-limiter": "~1.0.0", + "safe-buffer": "~5.1.0", + "ultron": "~1.1.0" + } + }, + "node_modules/sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "dev": true, + "peer": true, + "dependencies": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "dev": true, + "peer": true, + "dependencies": { + "get-port": "^3.1.0" + } + }, + "node_modules/table": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "dev": true, + "peer": true, + "dependencies": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table-layout": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "dev": true, + "peer": true, + "dependencies": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table-layout/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "peer": true + }, + "node_modules/table/node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/table/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/table/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "4.4.19", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", + "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", + "dev": true, + "dependencies": { + "chownr": "^1.1.4", + "fs-minipass": "^1.2.7", + "minipass": "^2.9.0", + "minizlib": "^1.3.3", + "mkdirp": "^0.5.5", + "safe-buffer": "^5.2.1", + "yallist": "^3.1.1" + }, + "engines": { + "node": ">=4.5" + } + }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/testrpc": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/testrpc/-/testrpc-0.0.1.tgz", + "integrity": "sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA==", + "deprecated": "testrpc has been renamed to ganache-cli, please use this package from now on.", + "dev": true + }, + "node_modules/then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/then-request/node_modules/@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", + "dev": true, + "peer": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, + "node_modules/timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, + "node_modules/tinyurl": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/tinyurl/-/tinyurl-1.1.7.tgz", + "integrity": "sha512-NCnyDkBTByS/pLH/Vrx/DPL8EciAUDoAvruaM/WnQLfX6Uame3D1nuWNy2Z9CXw7rcsok0tjuonRLolhmyz5rg==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true + }, + "node_modules/title-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", + "integrity": "sha1-PhJyFtpY0rxb7PE3q5Ha46fNj6o=", + "dev": true, + "dependencies": { + "no-case": "^2.2.0", + "upper-case": "^1.0.3" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/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==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tough-cookie/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, + "node_modules/ts-command-line-args": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.0.tgz", + "integrity": "sha512-Ff7Xt04WWCjj/cmPO9eWTJX3qpBZWuPWyQYG1vnxJao+alWWYjwJBc5aYz3h5p5dE08A6AnpkgiCtP/0KXXBYw==", + "dev": true, + "peer": true, + "dependencies": { + "@morgan-stanley/ts-mocking-bird": "^0.6.2", + "chalk": "^4.1.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.0", + "string-format": "^2.0.0" + }, + "bin": { + "write-markdown": "dist/write-markdown.js" + } + }, + "node_modules/ts-command-line-args/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ts-command-line-args/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ts-command-line-args/node_modules/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==", + "dev": true, + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ts-command-line-args/node_modules/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==", + "dev": true, + "peer": true + }, + "node_modules/ts-command-line-args/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-command-line-args/node_modules/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, + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-essentials": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", + "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", + "dev": true, + "peer": true, + "peerDependencies": { + "typescript": ">=3.7.0" + } + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true }, - "web3-providers-ws": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.5.3.tgz", - "integrity": "sha512-6DhTw4Q7nm5CFYEUHOJM0gAb3xFx+9gWpVveg3YxJ/ybR1BUvEWo3bLgIJJtX56cYX0WyY6DS35a7f0LOI1kVg==", - "dev": true, - "requires": { - "eventemitter3": "4.0.4", - "web3-core-helpers": "1.5.3", - "websocket": "^1.0.32" - } + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tslib": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", + "dev": true + }, + "node_modules/tsort": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", + "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", + "dev": true + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "node_modules/tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==", + "dev": true + }, + "node_modules/type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typechain": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.1.1.tgz", + "integrity": "sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ==", + "dev": true, + "peer": true, + "dependencies": { + "@types/prettier": "^2.1.1", + "debug": "^4.3.1", + "fs-extra": "^7.0.0", + "glob": "7.1.7", + "js-sha3": "^0.8.0", + "lodash": "^4.17.15", + "mkdirp": "^1.0.4", + "prettier": "^2.3.1", + "ts-command-line-args": "^2.2.0", + "ts-essentials": "^7.0.1" + }, + "bin": { + "typechain": "dist/cli/cli.js" + }, + "peerDependencies": { + "typescript": ">=4.3.0" + } + }, + "node_modules/typechain/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "peer": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/typechain/node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/typechain/node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typechain/node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true, + "peer": true + }, + "node_modules/typechain/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "peer": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/typechain/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "peer": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/typechain/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "peer": true + }, + "node_modules/typechain/node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true, + "peer": true + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typescript": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/uglify-js": { + "version": "3.15.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.4.tgz", + "integrity": "sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/ultron": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", + "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og==", + "dev": true + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/unbzip2-stream/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "web3-shh": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.5.3.tgz", - "integrity": "sha512-COfEXfsqoV/BkcsNLRxQqnWc1Teb8/9GxdGag5GtPC5gQC/vsN+7hYVJUwNxY9LtJPKYTij2DHHnx6UkITng+Q==", - "dev": true, - "requires": { - "web3-core": "1.5.3", - "web3-core-method": "1.5.3", - "web3-core-subscriptions": "1.5.3", - "web3-net": "1.5.3" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - } + { + "type": "consulting", + "url": "https://feross.org/support" } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/underscore": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==", + "dev": true + }, + "node_modules/undici": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.0.tgz", + "integrity": "sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA==", + "dev": true, + "dependencies": { + "busboy": "^1.6.0" + }, + "engines": { + "node": ">=14.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "optional": true + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "node_modules/upper-case-first": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz", + "integrity": "sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU=", + "dev": true, + "dependencies": { + "upper-case": "^1.1.1" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "dependencies": { + "prepend-http": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/url-set-query": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", + "integrity": "sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=", + "dev": true + }, + "node_modules/url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/utf-8-validate": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.5.tgz", + "integrity": "sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.2.0" + } + }, + "node_modules/utf8": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz", + "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", + "dev": true + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "peer": true + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/varint": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", + "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", + "dev": true + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/web3": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.4.tgz", + "integrity": "sha512-kgJvQZjkmjOEKimx/tJQsqWfRDPTTcBfYPa9XletxuHLpHcXdx67w8EFn5AW3eVxCutE9dTVHgGa9VYe8vgsEA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "web3-bzz": "1.10.4", + "web3-core": "1.10.4", + "web3-eth": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-shh": "1.10.4", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-bzz": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.4.tgz", + "integrity": "sha512-ZZ/X4sJ0Uh2teU9lAGNS8EjveEppoHNQiKlOXAjedsrdWuaMErBPdLQjXfcrYvN6WM6Su9PMsAxf3FXXZ+HwQw==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@types/node": "^12.12.6", + "got": "12.1.0", + "swarm-js": "^0.1.40" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-bzz/node_modules/@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/web3-bzz/node_modules/@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "dev": true, + "dependencies": { + "defer-to-connect": "^2.0.1" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/web3-bzz/node_modules/cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "dev": true, + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/web3-bzz/node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/web3-bzz/node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/web3-bzz/node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/web3-bzz/node_modules/defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/web3-bzz/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/web3-bzz/node_modules/got": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", + "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^4.6.0", + "@szmarczak/http-timer": "^5.0.1", + "@types/cacheable-request": "^6.0.2", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^6.0.4", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "form-data-encoder": "1.7.1", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^2.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sindresorhus/got?sponsor=1" + } + }, + "node_modules/web3-bzz/node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/web3-bzz/node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/web3-bzz/node_modules/lowercase-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/web3-bzz/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/web3-bzz/node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/web3-bzz/node_modules/p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "dev": true, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/web3-bzz/node_modules/responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "dev": true, + "dependencies": { + "lowercase-keys": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/web3-bzz/node_modules/responselike/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/web3-core": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.4.tgz", + "integrity": "sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww==", + "dev": true, + "dependencies": { + "@types/bn.js": "^5.1.1", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-requestmanager": "1.10.4", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-helpers": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.4.tgz", + "integrity": "sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g==", + "dev": true, + "dependencies": { + "web3-eth-iban": "1.10.4", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-helpers/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core-helpers/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core-helpers/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core-helpers/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core-helpers/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-core-helpers/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/web3-core-helpers/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-method": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.4.tgz", + "integrity": "sha512-uZTb7flr+Xl6LaDsyTeE2L1TylokCJwTDrIVfIfnrGmnwLc6bmTWCCrm71sSrQ0hqs6vp/MKbQYIYqUN0J8WyA==", + "dev": true, + "dependencies": { + "@ethersproject/transactions": "^5.6.2", + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-method/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core-method/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core-method/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core-method/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core-method/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-core-method/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/web3-core-method/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-promievent": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.4.tgz", + "integrity": "sha512-2de5WnJQ72YcIhYwV/jHLc4/cWJnznuoGTJGD29ncFQHAfwW/MItHFSVKPPA5v8AhJe+r6y4Y12EKvZKjQVBvQ==", + "dev": true, + "dependencies": { + "eventemitter3": "4.0.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-requestmanager": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.4.tgz", + "integrity": "sha512-vqP6pKH8RrhT/2MoaU+DY/OsYK9h7HmEBNCdoMj+4ZwujQtw/Mq2JifjwsJ7gits7Q+HWJwx8q6WmQoVZAWugg==", + "dev": true, + "dependencies": { + "util": "^0.12.5", + "web3-core-helpers": "1.10.4", + "web3-providers-http": "1.10.4", + "web3-providers-ipc": "1.10.4", + "web3-providers-ws": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core-subscriptions": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.4.tgz", + "integrity": "sha512-o0lSQo/N/f7/L76C0HV63+S54loXiE9fUPfHFcTtpJRQNDBVsSDdWRdePbWwR206XlsBqD5VHApck1//jEafTw==", + "dev": true, + "dependencies": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-core/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-core/node_modules/@types/bn.js": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/web3-core/node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/web3-core/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-core/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/web3-core/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.4.tgz", + "integrity": "sha512-Sql2kYKmgt+T/cgvg7b9ce24uLS7xbFrxE4kuuor1zSCGrjhTJ5rRNG8gTJUkAJGKJc7KgnWmgW+cOfMBPUDSA==", + "dev": true, + "dependencies": { + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-accounts": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-eth-ens": "1.10.4", + "web3-eth-iban": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-abi": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.4.tgz", + "integrity": "sha512-cZ0q65eJIkd/jyOlQPDjr8X4fU6CRL1eWgdLwbWEpo++MPU/2P4PFk5ZLAdye9T5Sdp+MomePPJ/gHjLMj2VfQ==", + "dev": true, + "dependencies": { + "@ethersproject/abi": "^5.6.3", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-abi/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-abi/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-abi/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-abi/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-abi/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-eth-abi/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/web3-eth-abi/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-accounts": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.4.tgz", + "integrity": "sha512-ysy5sVTg9snYS7tJjxVoQAH6DTOTkRGR8emEVCWNGLGiB9txj+qDvSeT0izjurS/g7D5xlMAgrEHLK1Vi6I3yg==", + "dev": true, + "dependencies": { + "@ethereumjs/common": "2.6.5", + "@ethereumjs/tx": "3.5.2", + "@ethereumjs/util": "^8.1.0", + "eth-lib": "0.2.8", + "scrypt-js": "^3.0.1", + "uuid": "^9.0.0", + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-accounts/node_modules/@ethereumjs/common": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz", + "integrity": "sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==", + "dev": true, + "dependencies": { + "crc-32": "^1.2.0", + "ethereumjs-util": "^7.1.5" + } + }, + "node_modules/web3-eth-accounts/node_modules/@ethereumjs/tx": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.5.2.tgz", + "integrity": "sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw==", + "dev": true, + "dependencies": { + "@ethereumjs/common": "^2.6.4", + "ethereumjs-util": "^7.1.5" + } + }, + "node_modules/web3-eth-accounts/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-accounts/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-accounts/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-accounts/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-accounts/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-eth-accounts/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/web3-eth-accounts/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/web3-eth-accounts/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-contract": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.4.tgz", + "integrity": "sha512-Q8PfolOJ4eV9TvnTj1TGdZ4RarpSLmHnUnzVxZ/6/NiTfe4maJz99R0ISgwZkntLhLRtw0C7LRJuklzGYCNN3A==", + "dev": true, + "dependencies": { + "@types/bn.js": "^5.1.1", + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-contract/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-contract/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-contract/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-contract/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-contract/node_modules/@types/bn.js": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/web3-eth-contract/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-eth-contract/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/web3-eth-contract/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-ens": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.4.tgz", + "integrity": "sha512-LLrvxuFeVooRVZ9e5T6OWKVflHPFgrVjJ/jtisRWcmI7KN/b64+D/wJzXqgmp6CNsMQcE7rpmf4CQmJCrTdsgg==", + "dev": true, + "dependencies": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-ens/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-ens/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-ens/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-ens/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-ens/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-eth-ens/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/web3-eth-ens/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-iban": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.4.tgz", + "integrity": "sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw==", + "dev": true, + "dependencies": { + "bn.js": "^5.2.1", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-iban/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-iban/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-iban/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-iban/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-iban/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-eth-iban/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/web3-eth-iban/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-personal": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.4.tgz", + "integrity": "sha512-BRa/hs6jU1hKHz+AC/YkM71RP3f0Yci1dPk4paOic53R4ZZG4MgwKRkJhgt3/GPuPliwS46f/i5A7fEGBT4F9w==", + "dev": true, + "dependencies": { + "@types/node": "^12.12.6", + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth-personal/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-personal/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-personal/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-personal/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth-personal/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-eth-personal/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/web3-eth-personal/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-eth/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-eth/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-eth/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/web3-eth/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-net": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.4.tgz", + "integrity": "sha512-mKINnhOOnZ4koA+yV2OT5s5ztVjIx7IY9a03w6s+yao/BUn+Luuty0/keNemZxTr1E8Ehvtn28vbOtW7Ids+Ow==", + "dev": true, + "dependencies": { + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-net/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-net/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-net/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-net/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3-net/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3-net/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" } }, - "@truffle/source-map-utils": { - "version": "1.3.81", - "resolved": "https://registry.npmjs.org/@truffle/source-map-utils/-/source-map-utils-1.3.81.tgz", - "integrity": "sha512-avxqyIWt6LV2plCpwh9RWoAi8jgEdKbB22HpyUwOlC+zvyckAJsUjwys5y1QGT0zCSMPbs2KhuI+9t9dALVcJA==", + "node_modules/web3-net/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", "dev": true, - "requires": { - "@truffle/code-utils": "^1.2.34", - "@truffle/codec": "^0.12.9", - "debug": "^4.3.1", - "json-pointer": "^0.6.1", - "node-interval-tree": "^1.3.3", - "web3-utils": "1.5.3" + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-providers-http": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.4.tgz", + "integrity": "sha512-m2P5Idc8hdiO0l60O6DSCPw0kw64Zgi0pMjbEFRmxKIck2Py57RQMu4bxvkxJwkF06SlGaEQF8rFZBmuX7aagQ==", + "dev": true, "dependencies": { - "@truffle/codec": { - "version": "0.12.9", - "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.12.9.tgz", - "integrity": "sha512-lk89f7MXOVDAUZ7stjkG2zK5MvYsxxaTR5m2LcbulMcS5KetBNj5COKQaDoIIfY79a8Bjrlvl5pLhmP/Drb9mw==", - "dev": true, - "requires": { - "@truffle/abi-utils": "^0.2.13", - "@truffle/compile-common": "^0.7.31", - "big.js": "^6.0.3", - "bn.js": "^5.1.3", - "cbor": "^5.1.0", - "debug": "^4.3.1", - "lodash": "^4.17.21", - "semver": "^7.3.4", - "utf8": "^3.0.0", - "web3-utils": "1.5.3" - } - }, - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "web3-utils": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", - "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", - "ethereum-bloom-filters": "^1.0.6", - "ethjs-unit": "0.1.6", - "number-to-bn": "1.7.0", - "randombytes": "^2.1.0", - "utf8": "3.0.0" - }, - "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } + "abortcontroller-polyfill": "^1.7.5", + "cross-fetch": "^4.0.0", + "es6-promise": "^4.2.8", + "web3-core-helpers": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-providers-http/node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dev": true, + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/web3-providers-http/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true } } }, - "@truffle/spinners": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@truffle/spinners/-/spinners-0.2.0.tgz", - "integrity": "sha512-rX0qA7GRDzN2ILClUIifMrVzF9EMR9b23CNasJkBgLBvqp1xKwdMbHG3IwUTYelGQtnGQmZ4UZQsBdDb6wf1Tw==", + "node_modules/web3-providers-ipc": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.4.tgz", + "integrity": "sha512-YRF/bpQk9z3WwjT+A6FI/GmWRCASgd+gC0si7f9zbBWLXjwzYAKG73bQBaFRAHex1hl4CVcM5WUMaQXf3Opeuw==", "dev": true, - "optional": true, - "requires": { - "@trufflesuite/spinnies": "^0.1.0" + "dependencies": { + "oboe": "2.1.5", + "web3-core-helpers": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" } }, - "@trufflesuite/chromafi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz", - "integrity": "sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ==", + "node_modules/web3-providers-ws": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.4.tgz", + "integrity": "sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA==", "dev": true, - "requires": { - "camelcase": "^4.1.0", - "chalk": "^2.3.2", - "cheerio": "^1.0.0-rc.2", - "detect-indent": "^5.0.0", - "highlight.js": "^10.4.1", - "lodash.merge": "^4.6.2", - "strip-ansi": "^4.0.0", - "strip-indent": "^2.0.0" + "dependencies": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.10.4", + "websocket": "^1.0.32" }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-shh": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.4.tgz", + "integrity": "sha512-cOH6iFFM71lCNwSQrC3niqDXagMqrdfFW85hC9PFUrAr3PUrIem8TNstTc3xna2bwZeWG6OBy99xSIhBvyIACw==", + "dev": true, + "hasInstallScript": true, "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-net": "1.10.4" + }, + "engines": { + "node": ">=8.0.0" } }, - "@trufflesuite/filecoin.js": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@trufflesuite/filecoin.js/-/filecoin.js-0.0.4.tgz", - "integrity": "sha512-LYk6Pc2uujLrPgtXSqL6kh/dZsfw8Q4/h5EHfGczj9BuxLyDezAmPFs1lMq4DdA18OgYVXDbqSOCwDww7oGHsw==", + "node_modules/web3-utils": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.8.2.tgz", + "integrity": "sha512-v7j6xhfLQfY7xQDrUP0BKbaNrmZ2/+egbqP9q3KYmOiPpnvAfol+32slgL0WX/5n8VPvKCK5EZ1HGrAVICSToA==", "dev": true, - "optional": true, - "requires": { - "@ledgerhq/hw-transport-webusb": "^5.22.0", - "@nodefactory/filsnap-adapter": "^0.2.1", - "@nodefactory/filsnap-types": "^0.2.1", - "@zondax/filecoin-signing-tools": "github:trufflesuite/filecoin-signing-tools-js", - "bignumber.js": "^9.0.0", - "bitcore-lib": "^8.22.2", - "bitcore-mnemonic": "^8.22.2", - "btoa-lite": "^1.0.0", - "events": "^3.2.0", - "isomorphic-ws": "^4.0.1", - "node-fetch": "^2.6.0", - "rpc-websockets": "^7.4.17", - "scrypt-async": "^2.0.1", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.1", - "websocket": "^1.0.31", - "ws": "^7.3.1" + "dependencies": { + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereumjs-util": "^7.1.0", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/web3-utils/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "dependencies": { + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true, + "engines": { + "node": ">= 16" }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, "dependencies": { - "bignumber.js": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", - "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", - "dev": true, - "optional": true - }, - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "dev": true, - "optional": true - } + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "dependencies": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/web3/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/web3/node_modules/ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "dependencies": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "node_modules/web3/node_modules/web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + }, + "node_modules/websocket": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/websocket/-/websocket-1.0.34.tgz", + "integrity": "sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ==", + "dev": true, + "dependencies": { + "bufferutil": "^4.0.1", + "debug": "^2.2.0", + "es5-ext": "^0.10.50", + "typedarray-to-buffer": "^3.1.5", + "utf-8-validate": "^5.0.2", + "yaeti": "^0.0.6" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "@trufflesuite/spinnies": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@trufflesuite/spinnies/-/spinnies-0.1.0.tgz", - "integrity": "sha512-22rVi7rECyAg9vsopa9jR84xQ9kSbjRxCYI9SPbHx4jjfRQODDzmVZtXLobUuXEQZYLgP1pXBtgY5kReb72E2g==", + "node_modules/which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "node_modules/which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.2", - "cli-cursor": "^3.1.0", - "strip-ansi": "^6.0.0" - }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "optional": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "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==", - "dev": true, - "optional": true, - "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==", - "dev": true, - "optional": 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==", - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "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, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "@types/accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==", + "node_modules/window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", "dev": true, - "optional": true, - "requires": { - "@types/node": "*" + "bin": { + "window-size": "cli.js" + }, + "engines": { + "node": ">= 0.10.0" } }, - "@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true, - "requires": { - "@types/node": "*" + "peer": true, + "engines": { + "node": ">=0.10.0" } }, - "@types/body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "node_modules/wordwrapjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", + "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", "dev": true, - "optional": true, - "requires": { - "@types/connect": "*", - "@types/node": "*" + "peer": true, + "dependencies": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + }, + "engines": { + "node": ">=8.0.0" } }, - "@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "node_modules/wordwrapjs/node_modules/typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", "dev": true, - "optional": true, - "requires": { - "@types/node": "*" + "peer": true, + "engines": { + "node": ">=8" } }, - "@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", + "node_modules/workerpool": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "dev": true, - "optional": true + "dependencies": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } }, - "@types/ed2curve": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@types/ed2curve/-/ed2curve-0.2.2.tgz", - "integrity": "sha512-G1sTX5xo91ydevQPINbL2nfgVAj/s1ZiqZxC8OCWduwu+edoNGUm5JXtTkg9F3LsBZbRI46/0HES4CPUE2wc9g==", + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "dev": true, - "optional": true, - "requires": { - "tweetnacl": "^1.0.0" + "engines": { + "node": ">=8.3.0" }, - "dependencies": { - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "dev": true, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { "optional": true } } }, - "@types/express": { - "version": "4.17.13", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", - "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==", + "node_modules/xhr": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.6.0.tgz", + "integrity": "sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA==", "dev": true, - "optional": true, - "requires": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.18", - "@types/qs": "*", - "@types/serve-static": "*" + "dependencies": { + "global": "~4.4.0", + "is-function": "^1.0.1", + "parse-headers": "^2.0.0", + "xtend": "^4.0.0" } }, - "@types/express-serve-static-core": { - "version": "4.17.28", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz", - "integrity": "sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==", + "node_modules/xhr-request": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr-request/-/xhr-request-1.1.0.tgz", + "integrity": "sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA==", "dev": true, - "optional": true, - "requires": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*" + "dependencies": { + "buffer-to-arraybuffer": "^0.0.5", + "object-assign": "^4.1.1", + "query-string": "^5.0.1", + "simple-get": "^2.7.0", + "timed-out": "^4.0.1", + "url-set-query": "^1.0.0", + "xhr": "^2.0.4" } }, - "@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "node_modules/xhr-request-promise": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz", + "integrity": "sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg==", "dev": true, - "requires": { - "@types/minimatch": "*", - "@types/node": "*" + "dependencies": { + "xhr-request": "^1.1.0" } }, - "@types/google-protobuf": { - "version": "3.15.5", - "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.5.tgz", - "integrity": "sha512-6bgv24B+A2bo9AfzReeg5StdiijKzwwnRflA8RLd1V4Yv995LeTmo0z69/MPbBDFSiZWdZHQygLo/ccXhMEDgw==", - "dev": true, - "optional": true - }, - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "node_modules/xhr2-cookies": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz", + "integrity": "sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg=", "dev": true, - "optional": true + "dependencies": { + "cookiejar": "^2.1.1" + } }, - "@types/long": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", - "integrity": "sha512-5tXH6Bx/kNGd3MgffdmP4dy2Z+G4eaXw0SE81Tq3BNadtnMR5/ySMzX4SLEzHJzSmPNn4HIdpQsBvXMUykr58w==", + "node_modules/xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=", "dev": true, - "optional": true + "engines": { + "node": ">=0.4.0" + } }, - "@types/mime": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", - "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true, - "optional": true + "engines": { + "node": ">=0.4" + } }, - "@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "node_modules/y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", "dev": true }, - "@types/node": { - "version": "12.20.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.16.tgz", - "integrity": "sha512-6CLxw83vQf6DKqXxMPwl8qpF8I7THFZuIwLt4TnNsumxkp1VsRZWT8txQxncT/Rl2UojTsFzWgDG4FRMwafrlA==", - "dev": true + "node_modules/yaeti": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", + "integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=", + "dev": true, + "engines": { + "node": ">=0.10.32" + } }, - "@types/parse-json": { + "node_modules/yallist": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "@types/pbkdf2": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", - "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", + "node_modules/yaml": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", + "dev": true, + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/yargs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "dev": true, + "dependencies": { + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "lodash.assign": "^4.0.3", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.1", + "which-module": "^1.0.0", + "window-size": "^0.2.0", + "y18n": "^3.2.1", + "yargs-parser": "^2.4.1" + } + }, + "node_modules/yargs-parser": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", "dev": true, - "requires": { - "@types/node": "*" + "dependencies": { + "camelcase": "^3.0.0", + "lodash.assign": "^4.0.6" } }, - "@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "optional": true + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } }, - "@types/range-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", - "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "optional": true + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "@types/secp256k1": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", - "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", "dev": true, - "requires": { - "@types/node": "*" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "@types/serve-static": { - "version": "1.13.10", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz", - "integrity": "sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==", + "node_modules/yargs-unparser/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "optional": true, - "requires": { - "@types/mime": "^1", - "@types/node": "*" + "engines": { + "node": ">=8" } }, - "@types/to-json-schema": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@types/to-json-schema/-/to-json-schema-0.2.1.tgz", - "integrity": "sha512-DlvjodmdSrih054SrUqgS3bIZ93allrfbzjFUFmUhAtC60O+B/doLfgB8stafkEFyrU/zXWtPlX/V1H94iKv/A==", + "node_modules/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, - "optional": true, - "requires": { - "@types/json-schema": "*" + "dependencies": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" } }, - "@types/ws": { - "version": "7.4.7", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", - "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, - "optional": true, - "requires": { - "@types/node": "*" + "peer": true, + "engines": { + "node": ">=6" } }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "@uniswap/lib": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@uniswap/lib/-/lib-1.1.1.tgz", - "integrity": "sha512-2yK7sLpKIT91TiS5sewHtOa7YuM8IuBXVl4GZv2jZFys4D2sY7K5vZh6MqD25TPA95Od+0YzCVq6cTF2IKrOmg==" + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "@uniswap/v2-core": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.0.tgz", - "integrity": "sha512-BJiXrBGnN8mti7saW49MXwxDBRFiWemGetE58q8zgfnPPzQKq55ADltEILqOt6VFZ22kVeVKbF8gVd8aY3l7pA==" + "node_modules/zksync-web3": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/zksync-web3/-/zksync-web3-0.14.3.tgz", + "integrity": "sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ==", + "dev": true, + "peerDependencies": { + "ethers": "^5.7.0" + } }, - "@uniswap/v2-periphery": { - "version": "1.1.0-beta.0", - "resolved": "https://registry.npmjs.org/@uniswap/v2-periphery/-/v2-periphery-1.1.0-beta.0.tgz", - "integrity": "sha512-6dkwAMKza8nzqYiXEr2D86dgW3TTavUvCR0w2Tu33bAbM8Ah43LKAzH7oKKPRT5VJQaMi1jtkGs1E8JPor1n5g==", - "requires": { - "@uniswap/lib": "1.1.1", - "@uniswap/v2-core": "1.0.0" + "node_modules/zx": { + "version": "8.1.6", + "resolved": "https://registry.npmjs.org/zx/-/zx-8.1.6.tgz", + "integrity": "sha512-SYAriWG+i2CFqMOJcF8QayI8wprlMYQsrmP6tFD7rSPnDLcImNSW7n/8crOYvNVrB2EFgz8LAQk23U1+Y7WrKA==", + "dev": true, + "bin": { + "zx": "build/cli.js" + }, + "engines": { + "node": ">= 12.17.0" + }, + "optionalDependencies": { + "@types/fs-extra": ">=11", + "@types/node": ">=20" } }, - "@zondax/filecoin-signing-tools": { - "version": "github:trufflesuite/filecoin-signing-tools-js#2786fdb8a2b71bd1c7789c0701da41bb644a098f", - "from": "github:trufflesuite/filecoin-signing-tools-js", + "node_modules/zx/node_modules/@types/node": { + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", "dev": true, "optional": true, - "requires": { - "axios": "0.26.1", - "base32-decode": "^1.0.0", - "base32-encode": "^1.1.1", - "bip32": "^2.0.5", - "bip39": "^3.0.2", - "blakejs": "^1.1.0", - "bn.js": "^5.1.2", - "ipld-dag-cbor": "^0.17.0", - "leb128": "0.0.5", - "secp256k1": "^4.0.1" - }, "dependencies": { - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true, - "optional": true - } + "undici-types": "~5.26.4" } + } + }, + "dependencies": { + "@aduh95/viz.js": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@aduh95/viz.js/-/viz.js-3.7.0.tgz", + "integrity": "sha512-20Pk2Z98fbPLkECcrZSJszKos/OgtvJJR3NcbVfgCJ6EQjDNzW2P1BKqImOz3tJ952dvO2DWEhcLhQ1Wz1e9ng==", + "dev": true }, - "@zxing/text-encoding": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", - "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", - "dev": true, - "optional": true + "@amxx/factory": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@amxx/factory/-/factory-1.0.0.tgz", + "integrity": "sha512-GXos8f4vKWPcphVyF2RU+/4rGvlov2idZSPNzXyIEmkzwLuxa+waTOUjHCvN7cmG0vXM7tyjawXUN1fdgiLvxA==", + "dev": true }, - "abab": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", - "integrity": "sha1-X6rZwsB/YN12dw9xzwJbYqY8/U4=", + "@babel/runtime": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.6.tgz", + "integrity": "sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg==", "dev": true, - "optional": true + "requires": { + "regenerator-runtime": "^0.13.4" + } }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "@chainsafe/as-sha256": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz", + "integrity": "sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg==", "dev": true }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "@chainsafe/persistent-merkle-tree": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz", + "integrity": "sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ==", "dev": true, - "optional": true, "requires": { - "event-target-shim": "^5.0.0" + "@chainsafe/as-sha256": "^0.3.1" } }, - "abstract-leveldown": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", - "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "@chainsafe/ssz": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.9.4.tgz", + "integrity": "sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ==", "dev": true, "requires": { - "xtend": "~4.0.0" + "@chainsafe/as-sha256": "^0.3.1", + "@chainsafe/persistent-merkle-tree": "^0.4.2", + "case": "^1.6.3" } }, - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, + "peer": true, "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" + "@jridgewell/trace-mapping": "0.3.9" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } } }, - "acorn": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", - "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=", + "@defi-wonderland/smock": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@defi-wonderland/smock/-/smock-2.3.5.tgz", + "integrity": "sha512-klANj1hUpc3cd2ShXdVH/bEGwxJd+LxOngkF5gLcIbg6b37RCgMPMmR/94/hgL62F8bfWtuNKsQD7K+c6M5fWQ==", "dev": true, - "optional": true + "requires": { + "@nomicfoundation/ethereumjs-evm": "^1.0.0-rc.3", + "@nomicfoundation/ethereumjs-util": "^8.0.0-rc.3", + "@nomicfoundation/ethereumjs-vm": "^6.0.0-rc.3", + "diff": "^5.0.0", + "lodash.isequal": "^4.5.0", + "lodash.isequalwith": "^4.4.0", + "rxjs": "^7.2.0", + "semver": "^7.3.5" + }, + "dependencies": { + "semver": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } }, - "acorn-globals": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", - "integrity": "sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=", + "@ensdomains/address-encoder": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz", + "integrity": "sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg==", "dev": true, - "optional": true, "requires": { - "acorn": "^2.1.0" + "bech32": "^1.1.3", + "blakejs": "^1.1.0", + "bn.js": "^4.11.8", + "bs58": "^4.0.1", + "crypto-addr-codec": "^0.1.7", + "nano-base32": "^1.0.1", + "ripemd160": "^2.0.2" } }, - "address": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", - "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", - "dev": true - }, - "aes-js": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", - "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=", + "@ensdomains/buffer": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/@ensdomains/buffer/-/buffer-0.0.10.tgz", + "integrity": "sha512-EOFqiWnN36EyyBAgHFTsabFcFICUALt41SiDm/4pAw4V36R4lD4wHcnZcqCYki9m1fMaeWGHrdqxmrMa8iiSTQ==", "dev": true }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "@ensdomains/ens": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/@ensdomains/ens/-/ens-0.4.5.tgz", + "integrity": "sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw==", "dev": true, "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "bluebird": "^3.5.2", + "eth-ens-namehash": "^2.0.8", + "solc": "^0.4.20", + "testrpc": "0.0.1", + "web3-utils": "^1.0.0-beta.31" } }, - "ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "@ensdomains/ens-contracts": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/@ensdomains/ens-contracts/-/ens-contracts-0.0.3.tgz", + "integrity": "sha512-da67JjAFjl8gLDDAqYQs5PSvth9usBcD7clXiXpfvJTMJnZnR+c/cG6xrkVgL4qEP7jmI+iEoj0y29qFtupy2w==", "dev": true, - "optional": true, "requires": { - "ajv": "^8.0.0" + "@ensdomains/buffer": "^0.0.10", + "@openzeppelin/contracts": "^4.1.0" }, "dependencies": { - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", - "dev": true, - "optional": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "optional": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "optional": true + "@openzeppelin/contracts": { + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.3.tgz", + "integrity": "sha512-bQHV8R9Me8IaJoJ2vPG4rXcL7seB7YVuskr4f+f5RyOStSZetwzkWtoqDMl5erkBJy0lDRUnIR2WIkPiC0GJlg==", + "dev": true } } }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "@ensdomains/ensjs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@ensdomains/ensjs/-/ensjs-2.1.0.tgz", + "integrity": "sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog==", "dev": true, - "optional": true - }, - "ansi-colors": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", - "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", - "dev": true + "requires": { + "@babel/runtime": "^7.4.4", + "@ensdomains/address-encoder": "^0.1.7", + "@ensdomains/ens": "0.4.5", + "@ensdomains/resolver": "0.2.4", + "content-hash": "^2.5.2", + "eth-ens-namehash": "^2.0.8", + "ethers": "^5.0.13", + "js-sha3": "^0.8.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + } + } }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "@ensdomains/resolver": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@ensdomains/resolver/-/resolver-0.2.4.tgz", + "integrity": "sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA==", "dev": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "@ethereumjs/common": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.5.0.tgz", + "integrity": "sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "crc-32": "^1.2.0", + "ethereumjs-util": "^7.1.1" } }, - "antlr4ts": { - "version": "0.5.0-alpha.4", - "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", - "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", + "@ethereumjs/rlp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", + "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", "dev": true }, - "any-signal": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/any-signal/-/any-signal-2.1.2.tgz", - "integrity": "sha512-B+rDnWasMi/eWcajPcCWSlYc7muXOrcYrqgyzcdKisl2H/WTlQ0gip1KyQfr0ZlxJdsuWCj/LWwQm7fhyhRfIQ==", + "@ethereumjs/tx": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.3.2.tgz", + "integrity": "sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog==", "dev": true, - "optional": true, "requires": { - "abort-controller": "^3.0.0", - "native-abort-controller": "^1.0.3" + "@ethereumjs/common": "^2.5.0", + "ethereumjs-util": "^7.1.2" } }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "@ethereumjs/util": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", + "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", "dev": true, "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "@ethereumjs/rlp": "^4.0.1", + "ethereum-cryptography": "^2.0.0", + "micro-ftch": "^0.3.1" + }, + "dependencies": { + "ethereum-cryptography": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz", + "integrity": "sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug==", + "dev": true, + "requires": { + "@noble/curves": "1.1.0", + "@noble/hashes": "1.3.1", + "@scure/bip32": "1.3.1", + "@scure/bip39": "1.2.1" + } + } } }, - "apollo-datasource": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/apollo-datasource/-/apollo-datasource-3.3.1.tgz", - "integrity": "sha512-Z3a8rEUXVPIZ1p8xrFL8bcNhWmhOmovgDArvwIwmJOBnh093ZpRfO+ESJEDAN4KswmyzCLDAwjsW4zQOONdRUw==", + "@ethersproject/abi": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", + "integrity": "sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==", "dev": true, - "optional": true, "requires": { - "apollo-server-caching": "^3.3.0", - "apollo-server-env": "^4.2.1" + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" } }, - "apollo-reporting-protobuf": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/apollo-reporting-protobuf/-/apollo-reporting-protobuf-3.3.1.tgz", - "integrity": "sha512-tyvj3Vj71TCh6c8PtdHOLgHHBSJ05DF/A/Po3q8yfHTBkOPcOJZE/GGN/PT/pwKg7HHxKcAeHDw7+xciVvGx0w==", + "@ethersproject/abstract-provider": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz", + "integrity": "sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==", "dev": true, - "optional": true, "requires": { - "@apollo/protobufjs": "1.2.2" + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0" } }, - "apollo-server": { - "version": "3.6.7", - "resolved": "https://registry.npmjs.org/apollo-server/-/apollo-server-3.6.7.tgz", - "integrity": "sha512-WERZqaVCkZJMoOc9y692NribgNtKbHDjOwiAmgXI2WBlON2oUvCwgxPvsMg+bXVpQx4itrMyj31a2N6BeKmbmQ==", + "@ethersproject/abstract-signer": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz", + "integrity": "sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==", "dev": true, - "optional": true, "requires": { - "apollo-server-core": "^3.6.7", - "apollo-server-express": "^3.6.7", - "express": "^4.17.1" + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0" } }, - "apollo-server-caching": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/apollo-server-caching/-/apollo-server-caching-3.3.0.tgz", - "integrity": "sha512-Wgcb0ArjZ5DjQ7ID+tvxUcZ7Yxdbk5l1MxZL8D8gkyjooOkhPNzjRVQ7ubPoXqO54PrOMOTm1ejVhsF+AfIirQ==", + "@ethersproject/address": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.7.0.tgz", + "integrity": "sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==", "dev": true, - "optional": true, "requires": { - "lru-cache": "^6.0.0" + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/rlp": "^5.7.0" } }, - "apollo-server-core": { - "version": "3.6.7", - "resolved": "https://registry.npmjs.org/apollo-server-core/-/apollo-server-core-3.6.7.tgz", - "integrity": "sha512-OnZ9vu7LrYy2rvEu+nbgqucw6VyTSIPAEjK87c4rkzlVOxpwtGUaQ4FMWD9zBIj7yLq9q22b638E8LdYoaTAjQ==", + "@ethersproject/base64": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.7.0.tgz", + "integrity": "sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==", + "dev": true, + "requires": { + "@ethersproject/bytes": "^5.7.0" + } + }, + "@ethersproject/basex": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.7.0.tgz", + "integrity": "sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==", + "dev": true, + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/properties": "^5.7.0" + } + }, + "@ethersproject/bignumber": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.7.0.tgz", + "integrity": "sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==", "dev": true, - "optional": true, "requires": { - "@apollographql/apollo-tools": "^0.5.3", - "@apollographql/graphql-playground-html": "1.6.29", - "@graphql-tools/mock": "^8.1.2", - "@graphql-tools/schema": "^8.0.0", - "@josephg/resolvable": "^1.0.0", - "apollo-datasource": "^3.3.1", - "apollo-reporting-protobuf": "^3.3.1", - "apollo-server-caching": "^3.3.0", - "apollo-server-env": "^4.2.1", - "apollo-server-errors": "^3.3.1", - "apollo-server-plugin-base": "^3.5.2", - "apollo-server-types": "^3.5.2", - "async-retry": "^1.2.1", - "fast-json-stable-stringify": "^2.1.0", - "graphql-tag": "^2.11.0", - "lodash.sortby": "^4.7.0", - "loglevel": "^1.6.8", - "lru-cache": "^6.0.0", - "sha.js": "^2.4.11", - "uuid": "^8.0.0" + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "bn.js": "^5.2.1" }, "dependencies": { - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "optional": true + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true } } }, - "apollo-server-env": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/apollo-server-env/-/apollo-server-env-4.2.1.tgz", - "integrity": "sha512-vm/7c7ld+zFMxibzqZ7SSa5tBENc4B0uye9LTfjJwGoQFY5xsUPH5FpO5j0bMUDZ8YYNbrF9SNtzc5Cngcr90g==", + "@ethersproject/bytes": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.7.0.tgz", + "integrity": "sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==", "dev": true, - "optional": true, "requires": { - "node-fetch": "^2.6.7" + "@ethersproject/logger": "^5.7.0" } }, - "apollo-server-errors": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/apollo-server-errors/-/apollo-server-errors-3.3.1.tgz", - "integrity": "sha512-xnZJ5QWs6FixHICXHxUfm+ZWqqxrNuPlQ+kj5m6RtEgIpekOPssH/SD9gf2B4HuWV0QozorrygwZnux8POvyPA==", + "@ethersproject/constants": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.7.0.tgz", + "integrity": "sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==", "dev": true, - "optional": true + "requires": { + "@ethersproject/bignumber": "^5.7.0" + } }, - "apollo-server-express": { - "version": "3.6.7", - "resolved": "https://registry.npmjs.org/apollo-server-express/-/apollo-server-express-3.6.7.tgz", - "integrity": "sha512-B4gH5j8t3XxTCIa9bl7Iq/F3YFzMxX/LV4Sc+L/3xkHm648u576G5Lkskl8HsoTGSzzyeVcVsPDoYHiBjCAN0Q==", + "@ethersproject/contracts": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.7.0.tgz", + "integrity": "sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==", "dev": true, - "optional": true, "requires": { - "@types/accepts": "^1.3.5", - "@types/body-parser": "1.19.2", - "@types/cors": "2.8.12", - "@types/express": "4.17.13", - "@types/express-serve-static-core": "4.17.28", - "accepts": "^1.3.5", - "apollo-server-core": "^3.6.7", - "apollo-server-types": "^3.5.2", - "body-parser": "^1.19.0", - "cors": "^2.8.5", - "parseurl": "^1.3.3" + "@ethersproject/abi": "^5.7.0", + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/transactions": "^5.7.0" } }, - "apollo-server-plugin-base": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/apollo-server-plugin-base/-/apollo-server-plugin-base-3.5.2.tgz", - "integrity": "sha512-SwIf1waDmNDb0kmn57QR++InwK6Iv/X2slpm/aFIoqFBe91r6uJfakJvQZuh8dLEgk68gxqFsT8zHRpxBclE+g==", + "@ethersproject/hash": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.7.0.tgz", + "integrity": "sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==", "dev": true, - "optional": true, "requires": { - "apollo-server-types": "^3.5.2" + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" } }, - "apollo-server-types": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/apollo-server-types/-/apollo-server-types-3.5.2.tgz", - "integrity": "sha512-vhcbIWsBkoNibABOym4AAPBoNDjokhjUQokKYdwZMeqrb850PMQdNJFrGyXT5onP408Ghv4O8PfgBuPQmeJhVQ==", + "@ethersproject/hdnode": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.7.0.tgz", + "integrity": "sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==", "dev": true, - "optional": true, "requires": { - "apollo-reporting-protobuf": "^3.3.1", - "apollo-server-caching": "^3.3.0", - "apollo-server-env": "^4.2.1" + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" } }, - "app-module-path": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", - "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=", - "dev": true - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true, - "optional": true + "@ethersproject/json-wallets": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz", + "integrity": "sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==", + "dev": true, + "requires": { + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/pbkdf2": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "aes-js": "3.0.0", + "scrypt-js": "3.0.1" + } }, - "are-we-there-yet": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", - "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "@ethersproject/keccak256": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.7.0.tgz", + "integrity": "sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==", "dev": true, - "optional": true, "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "@ethersproject/bytes": "^5.7.0", + "js-sha3": "0.8.0" }, "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true, - "optional": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true } } }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "@ethersproject/logger": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.7.0.tgz", + "integrity": "sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==", + "dev": true + }, + "@ethersproject/networks": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.7.1.tgz", + "integrity": "sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "@ethersproject/logger": "^5.7.0" } }, - "argsarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/argsarray/-/argsarray-0.0.1.tgz", - "integrity": "sha1-bnIHtOzbObCviDA/pa4ivajfYcs=", + "@ethersproject/pbkdf2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz", + "integrity": "sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==", "dev": true, - "optional": true + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/sha2": "^5.7.0" + } }, - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true + "@ethersproject/properties": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.7.0.tgz", + "integrity": "sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==", + "dev": true, + "requires": { + "@ethersproject/logger": "^5.7.0" + } }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true + "@ethersproject/providers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.7.2.tgz", + "integrity": "sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==", + "dev": true, + "requires": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/base64": "^5.7.0", + "@ethersproject/basex": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/networks": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/web": "^5.7.0", + "bech32": "1.1.4", + "ws": "7.4.6" + } }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "@ethersproject/random": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.7.0.tgz", + "integrity": "sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==", "dev": true, "requires": { - "safer-buffer": "~2.1.0" + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" } }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "@ethersproject/rlp": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.7.0.tgz", + "integrity": "sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0" } }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "@ethersproject/sha2": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.7.0.tgz", + "integrity": "sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==", + "dev": true, + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "hash.js": "1.1.7" + } }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true + "@ethersproject/signing-key": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.7.0.tgz", + "integrity": "sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==", + "dev": true, + "requires": { + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "bn.js": "^5.2.1", + "elliptic": "6.5.4", + "hash.js": "1.1.7" + }, + "dependencies": { + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + } + } }, - "async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "@ethersproject/solidity": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.7.0.tgz", + "integrity": "sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==", "dev": true, "requires": { - "lodash": "^4.17.14" + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/sha2": "^5.7.0", + "@ethersproject/strings": "^5.7.0" } }, - "async-eventemitter": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", - "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", + "@ethersproject/strings": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.7.0.tgz", + "integrity": "sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==", "dev": true, "requires": { - "async": "^2.4.0" + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" } }, - "async-limiter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", - "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", - "dev": true + "@ethersproject/transactions": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.7.0.tgz", + "integrity": "sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==", + "dev": true, + "requires": { + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/rlp": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0" + } + }, + "@ethersproject/units": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.7.0.tgz", + "integrity": "sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==", + "dev": true, + "requires": { + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/logger": "^5.7.0" + } }, - "async-mutex": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.2.6.tgz", - "integrity": "sha512-Hs4R+4SPgamu6rSGW8C7cV9gaWUKEHykfzCCvIRuaVv636Ju10ZdeUbvb4TBEW0INuq2DHZqXbK4Nd3yG4RaRw==", + "@ethersproject/wallet": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.7.0.tgz", + "integrity": "sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==", + "dev": true, + "requires": { + "@ethersproject/abstract-provider": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/hdnode": "^5.7.0", + "@ethersproject/json-wallets": "^5.7.0", + "@ethersproject/keccak256": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/random": "^5.7.0", + "@ethersproject/signing-key": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wordlists": "^5.7.0" + } + }, + "@ethersproject/web": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.7.1.tgz", + "integrity": "sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==", "dev": true, "requires": { - "tslib": "^2.0.0" + "@ethersproject/base64": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" } }, - "async-retry": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz", - "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==", + "@ethersproject/wordlists": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.7.0.tgz", + "integrity": "sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==", "dev": true, - "optional": true, "requires": { - "retry": "0.13.1" + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/hash": "^5.7.0", + "@ethersproject/logger": "^5.7.0", + "@ethersproject/properties": "^5.7.0", + "@ethersproject/strings": "^5.7.0" } }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "@iexec/interface": { + "version": "3.0.35-8", + "resolved": "https://registry.npmjs.org/@iexec/interface/-/interface-3.0.35-8.tgz", + "integrity": "sha512-JkO9bpfpTBCOtJz/TEPzFTLlgamv7fll8RUpwC+8P6UWlGGwCe/IvgAeUZzIJ/syXaAhC0KZ7/03BEiee3f8fg==" + }, + "@iexec/solidity": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@iexec/solidity/-/solidity-0.1.1.tgz", + "integrity": "sha512-XLCihhVxsA77Ug9tVnz0uiUAzVdpZGlkSzfoUTLUfYDxUr+iwXJ6zvsBKomnAvvLsRJ0lb4qiBmSMpGtZ9am4w==", + "requires": { + "@openzeppelin/contracts": "3.2.0", + "solstruct": "0.1.0" + }, + "dependencies": { + "@openzeppelin/contracts": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.2.0.tgz", + "integrity": "sha512-bUOmkSoPkjnUyMiKo6RYnb0VHBk5D9KKDAgNLzF41aqAM3TeE0yGdFF5dVRcV60pZdJLlyFT/jjXIZCWyyEzAQ==" + } + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "peer": true }, - "at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true, - "optional": true + "peer": true }, - "atomically": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/atomically/-/atomically-1.7.0.tgz", - "integrity": "sha512-Xcz9l0z7y9yQ9rdDaxlmaI4uJHf/T8g9hOEzJcsEqX2SjCj4J20uK7+ldkDHMbpJDK76wF7xEIgxc/vSlsfw5w==", + "@morgan-stanley/ts-mocking-bird": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@morgan-stanley/ts-mocking-bird/-/ts-mocking-bird-0.6.4.tgz", + "integrity": "sha512-57VJIflP8eR2xXa9cD1LUawh+Gh+BVQfVu0n6GALyg/AqV/Nz25kDRvws3i9kIe1PTrbsZZOYpsYp6bXPd6nVA==", "dev": true, - "optional": true + "peer": true, + "requires": { + "lodash": "^4.17.16", + "uuid": "^7.0.3" + }, + "dependencies": { + "uuid": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", + "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "dev": true, + "peer": true + } + } }, - "available-typed-arrays": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz", - "integrity": "sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA==", - "dev": true + "@noble/curves": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz", + "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==", + "dev": true, + "requires": { + "@noble/hashes": "1.3.1" + } }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "@noble/hashes": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz", + "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==", "dev": true }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "@noble/secp256k1": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", + "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", "dev": true }, - "axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, + "peer": true, "requires": { - "follow-redirects": "^1.14.8" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" } }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "peer": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, + "peer": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@nomicfoundation/ethereumjs-block": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-4.2.2.tgz", + "integrity": "sha512-atjpt4gc6ZGZUPHBAQaUJsm1l/VCo7FmyQ780tMGO8QStjLdhz09dXynmhwVTy5YbRr0FOh/uX3QaEM0yIB2Zg==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-trie": "5.0.5", + "@nomicfoundation/ethereumjs-tx": "4.1.2", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "ethereum-cryptography": "0.1.3" + } + }, + "@nomicfoundation/ethereumjs-blockchain": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-6.2.2.tgz", + "integrity": "sha512-6AIB2MoTEPZJLl6IRKcbd8mUmaBAQ/NMe3O7OsAOIiDjMNPPH5KaUQiLfbVlegT4wKIg/GOsFH7XlH2KDVoJNg==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-block": "4.2.2", + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-ethash": "2.0.5", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-trie": "5.0.5", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "abstract-level": "^1.0.3", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "level": "^8.0.0", + "lru-cache": "^5.1.1", + "memory-level": "^1.0.0" }, "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" + "yallist": "^3.0.2" } }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "@nomicfoundation/ethereumjs-common": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-3.1.2.tgz", + "integrity": "sha512-JAEBpIua62dyObHM9KI2b4wHZcRQYYge9gxiygTWa3lNCr2zo+K0TbypDpgiNij5MCGNWP1eboNfNfx1a3vkvA==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-util": "8.0.6", + "crc-32": "^1.2.0" + } + }, + "@nomicfoundation/ethereumjs-ethash": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-2.0.5.tgz", + "integrity": "sha512-xlLdcICGgAYyYmnI3r1t0R5fKGBJNDQSOQxXNjVO99JmxJIdXR5MgPo5CSJO1RpyzKOgzi3uIFn8agv564dZEQ==", "dev": true, "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" + "@nomicfoundation/ethereumjs-block": "4.2.2", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "abstract-level": "^1.0.3", + "bigint-crypto-utils": "^3.0.23", + "ethereum-cryptography": "0.1.3" + } + }, + "@nomicfoundation/ethereumjs-evm": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-1.3.2.tgz", + "integrity": "sha512-I00d4MwXuobyoqdPe/12dxUQxTYzX8OckSaWsMcWAfQhgVDvBx6ffPyP/w1aL0NW7MjyerySPcSVfDJAMHjilw==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "@types/async-eventemitter": "^0.2.1", + "async-eventemitter": "^0.2.4", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "mcl-wasm": "^0.7.1", + "rustbn.js": "~0.2.0" }, "dependencies": { - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "repeating": "^2.0.0" + "ms": "2.1.2" } }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } + "@nomicfoundation/ethereumjs-rlp": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-4.0.3.tgz", + "integrity": "sha512-DZMzB/lqPK78T6MluyXqtlRmOMcsZbTTbbEyAjo0ncaff2mqu/k8a79PBcyvpgAhWD/R59Fjq/x3ro5Lof0AtA==", + "dev": true }, - "babel-plugin-polyfill-corejs2": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", - "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", + "@nomicfoundation/ethereumjs-statemanager": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-1.0.5.tgz", + "integrity": "sha512-CAhzpzTR5toh/qOJIZUUOnWekUXuRqkkzaGAQrVcF457VhtCmr+ddZjjK50KNZ524c1XP8cISguEVNqJ6ij1sA==", "dev": true, "requires": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.3.1", - "semver": "^6.1.1" + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-trie": "5.0.5", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "functional-red-black-tree": "^1.0.1" }, "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, - "babel-plugin-polyfill-corejs3": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz", - "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==", + "@nomicfoundation/ethereumjs-trie": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-5.0.5.tgz", + "integrity": "sha512-+8sNZrXkzvA1NH5F4kz5RSYl1I6iaRz7mAZRsyxOm0IVY4UaP43Ofvfp/TwOalFunurQrYB5pRO40+8FBcxFMA==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.1", - "core-js-compat": "^3.21.0" + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "ethereum-cryptography": "0.1.3", + "readable-stream": "^3.6.0" } }, - "babel-plugin-polyfill-regenerator": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", - "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", + "@nomicfoundation/ethereumjs-tx": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-4.1.2.tgz", + "integrity": "sha512-emJBJZpmTdUa09cqxQqHaysbBI9Od353ZazeH7WgPb35miMgNY6mb7/3vBA98N5lUW/rgkiItjX0KZfIzihSoQ==", "dev": true, "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.1" + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "ethereum-cryptography": "0.1.3" } }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "@nomicfoundation/ethereumjs-util": { + "version": "8.0.6", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-8.0.6.tgz", + "integrity": "sha512-jOQfF44laa7xRfbfLXojdlcpkvxeHrE2Xu7tSeITsWFgoII163MzjOwFEzSNozHYieFysyoEMhCdP+NY5ikstw==", "dev": true, "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - } + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "ethereum-cryptography": "0.1.3" } }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "@nomicfoundation/ethereumjs-vm": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-6.4.2.tgz", + "integrity": "sha512-PRTyxZMP6kx+OdAzBhuH1LD2Yw+hrSpaytftvaK//thDy2OI07S0nrTdbrdk7b8ZVPAc9H9oTwFBl3/wJ3w15g==", "dev": true, "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" + "@nomicfoundation/ethereumjs-block": "4.2.2", + "@nomicfoundation/ethereumjs-blockchain": "6.2.2", + "@nomicfoundation/ethereumjs-common": "3.1.2", + "@nomicfoundation/ethereumjs-evm": "1.3.2", + "@nomicfoundation/ethereumjs-rlp": "4.0.3", + "@nomicfoundation/ethereumjs-statemanager": "1.0.5", + "@nomicfoundation/ethereumjs-trie": "5.0.5", + "@nomicfoundation/ethereumjs-tx": "4.1.2", + "@nomicfoundation/ethereumjs-util": "8.0.6", + "@types/async-eventemitter": "^0.2.1", + "async-eventemitter": "^0.2.4", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "functional-red-black-tree": "^1.0.1", + "mcl-wasm": "^0.7.1", + "rustbn.js": "~0.2.0" }, "dependencies": { - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "@nomicfoundation/hardhat-chai-matchers": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-1.0.6.tgz", + "integrity": "sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ==", "dev": true, + "peer": true, "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" + "@ethersproject/abi": "^5.1.2", + "@types/chai-as-promised": "^7.1.3", + "chai-as-promised": "^7.1.1", + "deep-eql": "^4.0.1", + "ordinal": "^1.0.3" }, "dependencies": { - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", - "dev": true + "deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dev": true, + "peer": true, + "requires": { + "type-detect": "^4.0.0" + } } } }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "backoff": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz", - "integrity": "sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=", - "dev": true, - "requires": { - "precond": "0.2" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base-x": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", - "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", + "@nomicfoundation/hardhat-network-helpers": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.11.tgz", + "integrity": "sha512-uGPL7QSKvxrHRU69dx8jzoBvuztlLCtyFsbgfXIwIjnO3dqZRz2GNMHJoO3C3dIiUNM6jdNF4AUnoQKDscdYrA==", "dev": true, "requires": { - "safe-buffer": "^5.0.1" + "ethereumjs-util": "^7.1.4" } }, - "base32-decode": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base32-decode/-/base32-decode-1.0.0.tgz", - "integrity": "sha512-KNWUX/R7wKenwE/G/qFMzGScOgVntOmbE27vvc6GrniDGYb6a5+qWcuoXl8WIOQL7q0TpK7nZDm1Y04Yi3Yn5g==", + "@nomicfoundation/hardhat-toolbox": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.2.tgz", + "integrity": "sha512-vnN1AzxbvpSx9pfdRHbUzTRIXpMLPXnUlkW855VaDk6N1pwRaQ2gNzEmFAABk4lWf11E00PKwFd/q27HuwYrYg==", "dev": true, - "optional": true + "requires": {} }, - "base32-encode": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/base32-encode/-/base32-encode-1.2.0.tgz", - "integrity": "sha512-cHFU8XeRyx0GgmoWi5qHMCVRiqU6J3MHWxVgun7jggCBUpVzm1Ir7M9dYr2whjSNc3tFeXfQ/oZjQu/4u55h9A==", + "@nomicfoundation/slang": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang/-/slang-0.17.0.tgz", + "integrity": "sha512-1GlkGRcGpVnjFw9Z1vvDKOKo2mzparFt7qrl2pDxWp+jrVtlvej98yCMX52pVyrYE7ZeOSZFnx/DtsSgoukStQ==", "dev": true, - "optional": true, "requires": { - "to-data-view": "^1.1.0" + "@nomicfoundation/slang-darwin-arm64": "0.17.0", + "@nomicfoundation/slang-darwin-x64": "0.17.0", + "@nomicfoundation/slang-linux-arm64-gnu": "0.17.0", + "@nomicfoundation/slang-linux-arm64-musl": "0.17.0", + "@nomicfoundation/slang-linux-x64-gnu": "0.17.0", + "@nomicfoundation/slang-linux-x64-musl": "0.17.0", + "@nomicfoundation/slang-win32-arm64-msvc": "0.17.0", + "@nomicfoundation/slang-win32-ia32-msvc": "0.17.0", + "@nomicfoundation/slang-win32-x64-msvc": "0.17.0" } }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "@nomicfoundation/slang-darwin-arm64": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-darwin-arm64/-/slang-darwin-arm64-0.17.0.tgz", + "integrity": "sha512-O0q94EUtoWy9A5kOTOa9/khtxXDYnLqmuda9pQELurSiwbQEVCPQL8kb34VbOW+ifdre66JM/05Xw9JWhIZ9sA==", "dev": true }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } + "@nomicfoundation/slang-darwin-x64": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-darwin-x64/-/slang-darwin-x64-0.17.0.tgz", + "integrity": "sha512-IaDbHzvT08sBK2HyGzonWhq1uu8IxdjmTqAWHr25Oh/PYnamdi8u4qchZXXYKz/DHLoYN3vIpBXoqLQIomhD/g==", + "dev": true }, - "bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", + "@nomicfoundation/slang-linux-arm64-gnu": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-arm64-gnu/-/slang-linux-arm64-gnu-0.17.0.tgz", + "integrity": "sha512-Lj4anvOsQZxs1SycG8VyT2Rl2oqIhyLSUCgGepTt3CiJ/bM+8r8bLJIgh8vKkki4BWz49YsYIgaJB2IPv8FFTw==", "dev": true }, - "big-integer": { - "version": "1.6.36", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz", - "integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==", + "@nomicfoundation/slang-linux-arm64-musl": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-arm64-musl/-/slang-linux-arm64-musl-0.17.0.tgz", + "integrity": "sha512-/xkTCa9d5SIWUBQE3BmLqDFfJRr4yUBwbl4ynPiGUpRXrD69cs6pWKkwjwz/FdBpXqVo36I+zY95qzoTj/YhOA==", "dev": true }, - "big.js": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", - "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==", + "@nomicfoundation/slang-linux-x64-gnu": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-x64-gnu/-/slang-linux-x64-gnu-0.17.0.tgz", + "integrity": "sha512-oe5IO5vntOqYvTd67deCHPIWuSuWm6aYtT2/0Kqz2/VLtGz4ClEulBSRwfnNzBVtw2nksWipE1w8BzhImI7Syg==", "dev": true }, - "bigi": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/bigi/-/bigi-1.4.2.tgz", - "integrity": "sha1-nGZalfiLiwj8Bc/XMfVhhZ1yWCU=", - "dev": true, - "optional": true + "@nomicfoundation/slang-linux-x64-musl": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-linux-x64-musl/-/slang-linux-x64-musl-0.17.0.tgz", + "integrity": "sha512-PpYCI5K/kgLAMXaPY0V4VST5gCDprEOh7z/47tbI8kJQumI5odjsj/Cs8MpTo7/uRH6flKYbVNgUzcocWVYrAQ==", + "dev": true }, - "bignumber.js": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", - "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", + "@nomicfoundation/slang-win32-arm64-msvc": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-win32-arm64-msvc/-/slang-win32-arm64-msvc-0.17.0.tgz", + "integrity": "sha512-u/Mkf7OjokdBilP7QOJj6QYJU4/mjkbKnTX21wLyCIzeVWS7yafRPYpBycKIBj2pRRZ6ceAY5EqRpb0aiCq+0Q==", "dev": true }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "@nomicfoundation/slang-win32-ia32-msvc": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-win32-ia32-msvc/-/slang-win32-ia32-msvc-0.17.0.tgz", + "integrity": "sha512-XJBVQfNnZQUv0tP2JSJ573S+pmgrLWgqSZOGaMllnB/TL1gRci4Z7dYRJUF2s82GlRJE+FHSI2Ro6JISKmlXCg==", "dev": true }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "@nomicfoundation/slang-win32-x64-msvc": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@nomicfoundation/slang-win32-x64-msvc/-/slang-win32-x64-msvc-0.17.0.tgz", + "integrity": "sha512-zPGsAeiTfqfPNYHD8BfrahQmYzA78ZraoHKTGraq/1xwJwzBK4bu/NtvVA4pJjBV+B4L6DCxVhSbpn40q26JQA==", + "dev": true + }, + "@nomicfoundation/solidity-analyzer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz", + "integrity": "sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg==", "dev": true, - "optional": true, "requires": { - "file-uri-to-path": "1.0.0" + "@nomicfoundation/solidity-analyzer-darwin-arm64": "0.1.1", + "@nomicfoundation/solidity-analyzer-darwin-x64": "0.1.1", + "@nomicfoundation/solidity-analyzer-freebsd-x64": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": "0.1.1", + "@nomicfoundation/solidity-analyzer-linux-x64-musl": "0.1.1", + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": "0.1.1", + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": "0.1.1", + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": "0.1.1" } }, - "bip-schnorr": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/bip-schnorr/-/bip-schnorr-0.6.4.tgz", - "integrity": "sha512-dNKw7Lea8B0wMIN4OjEmOk/Z5qUGqoPDY0P2QttLqGk1hmDPytLWW8PR5Pb6Vxy6CprcdEgfJpOjUu+ONQveyg==", + "@nomicfoundation/solidity-analyzer-darwin-arm64": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz", + "integrity": "sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w==", + "dev": true, + "optional": true + }, + "@nomicfoundation/solidity-analyzer-darwin-x64": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.1.tgz", + "integrity": "sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA==", + "dev": true, + "optional": true + }, + "@nomicfoundation/solidity-analyzer-freebsd-x64": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.1.tgz", + "integrity": "sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA==", + "dev": true, + "optional": true + }, + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.1.tgz", + "integrity": "sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg==", + "dev": true, + "optional": true + }, + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.1.tgz", + "integrity": "sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w==", + "dev": true, + "optional": true + }, + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.1.tgz", + "integrity": "sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA==", + "dev": true, + "optional": true + }, + "@nomicfoundation/solidity-analyzer-linux-x64-musl": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.1.tgz", + "integrity": "sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w==", + "dev": true, + "optional": true + }, + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.1.tgz", + "integrity": "sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg==", + "dev": true, + "optional": true + }, + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.1.tgz", + "integrity": "sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ==", + "dev": true, + "optional": true + }, + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.1.tgz", + "integrity": "sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw==", "dev": true, - "optional": true, - "requires": { - "bigi": "^1.4.2", - "ecurve": "^1.0.6", - "js-sha256": "^0.9.0", - "randombytes": "^2.1.0", - "safe-buffer": "^5.2.1" - } + "optional": true }, - "bip32": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/bip32/-/bip32-2.0.6.tgz", - "integrity": "sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA==", + "@nomiclabs/hardhat-ethers": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz", + "integrity": "sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg==", "dev": true, - "optional": true, - "requires": { - "@types/node": "10.12.18", - "bs58check": "^2.1.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "tiny-secp256k1": "^1.1.3", - "typeforce": "^1.11.5", - "wif": "^2.0.6" - }, - "dependencies": { - "@types/node": { - "version": "10.12.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", - "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", - "dev": true, - "optional": true - } - } + "peer": true, + "requires": {} }, - "bip39": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.4.tgz", - "integrity": "sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw==", + "@nomiclabs/hardhat-etherscan": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.7.tgz", + "integrity": "sha512-tZ3TvSgpvsQ6B6OGmo1/Au6u8BrAkvs1mIC/eURA3xgIfznUZBhmpne8hv7BXUzw9xNL3fXdpOYgOQlVMTcoHQ==", "dev": true, - "optional": true, + "peer": true, "requires": { - "@types/node": "11.11.6", - "create-hash": "^1.1.0", - "pbkdf2": "^3.0.9", - "randombytes": "^2.0.1" + "@ethersproject/abi": "^5.1.2", + "@ethersproject/address": "^5.0.2", + "cbor": "^8.1.0", + "chalk": "^2.4.2", + "debug": "^4.1.1", + "fs-extra": "^7.0.1", + "lodash": "^4.17.11", + "semver": "^6.3.0", + "table": "^6.8.0", + "undici": "^5.14.0" }, "dependencies": { - "@types/node": { - "version": "11.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", - "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==", + "cbor": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", + "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", "dev": true, - "optional": true + "peer": true, + "requires": { + "nofilter": "^3.1.0" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "peer": true, + "requires": { + "ms": "2.1.2" + } + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "peer": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "peer": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "peer": true + }, + "nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "dev": true, + "peer": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "peer": true } } }, - "bitcore-lib": { - "version": "8.25.25", - "resolved": "https://registry.npmjs.org/bitcore-lib/-/bitcore-lib-8.25.25.tgz", - "integrity": "sha512-H6qNCVl4M8/MglXhvc04mmeus1d6nrmqTJGQ+xezJLvL7hs7R3dyBPtOqSP3YSw0iq/GWspMd8f5OOlyXVipJQ==", + "@nomiclabs/hardhat-truffle5": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-truffle5/-/hardhat-truffle5-2.0.7.tgz", + "integrity": "sha512-Pw8451IUZp1bTp0QqCHCYfCHs66sCnyxPcaorapu9mfOV9xnZsVaFdtutnhNEiXdiZwbed7LFKpRsde4BjFwig==", "dev": true, - "optional": true, "requires": { - "bech32": "=2.0.0", - "bip-schnorr": "=0.6.4", - "bn.js": "=4.11.8", - "bs58": "^4.0.1", - "buffer-compare": "=1.1.1", - "elliptic": "^6.5.3", - "inherits": "=2.0.1", - "lodash": "^4.17.20" + "@nomiclabs/truffle-contract": "^4.2.23", + "@types/chai": "^4.2.0", + "chai": "^4.2.0", + "ethereumjs-util": "^7.1.4", + "fs-extra": "^7.0.1" }, "dependencies": { - "bech32": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", - "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==", - "dev": true, - "optional": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", "dev": true, - "optional": true + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } }, - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", "dev": true, - "optional": true + "requires": { + "graceful-fs": "^4.1.6" + } } } }, - "bitcore-mnemonic": { - "version": "8.25.25", - "resolved": "https://registry.npmjs.org/bitcore-mnemonic/-/bitcore-mnemonic-8.25.25.tgz", - "integrity": "sha512-7HvRxHrmd+Rh0Ohl0SEDMKQBAM+FoevXbCFnxGju6H+uZjtWMOToHA8vUg0+B91pfEMjdt9mQVB/wSA8GMqnCA==", + "@nomiclabs/hardhat-web3": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-web3/-/hardhat-web3-2.0.0.tgz", + "integrity": "sha512-zt4xN+D+fKl3wW2YlTX3k9APR3XZgPkxJYf36AcliJn3oujnKEVRZaHu0PhgLjO+gR+F/kiYayo9fgd2L8970Q==", "dev": true, - "optional": true, "requires": { - "bitcore-lib": "^8.25.25", - "unorm": "^1.4.1" + "@types/bignumber.js": "^5.0.0" } }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "@nomiclabs/truffle-contract": { + "version": "4.5.10", + "resolved": "https://registry.npmjs.org/@nomiclabs/truffle-contract/-/truffle-contract-4.5.10.tgz", + "integrity": "sha512-nF/6InFV+0hUvutyFgsdOMCoYlr//2fJbRER4itxYtQtc4/O1biTwZIKRu+5l2J5Sq6LU2WX7vZHtDgQdhWxIQ==", "dev": true, - "optional": true, "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" + "@ensdomains/ensjs": "^2.0.1", + "@truffle/blockchain-utils": "^0.1.3", + "@truffle/contract-schema": "^3.4.7", + "@truffle/debug-utils": "^6.0.22", + "@truffle/error": "^0.1.0", + "@truffle/interface-adapter": "^0.5.16", + "bignumber.js": "^7.2.1", + "ethereum-ens": "^0.8.0", + "ethers": "^4.0.0-beta.1", + "source-map-support": "^0.5.19" }, "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", "dev": true, - "optional": true, "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" } + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", + "dev": true } } }, - "blakejs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", - "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==", - "dev": true - }, - "blob-to-it": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/blob-to-it/-/blob-to-it-1.0.4.tgz", - "integrity": "sha512-iCmk0W4NdbrWgRRuxOriU8aM5ijeVLI61Zulsmg/lUHNr7pYjoj+U77opLefNagevtrrbMt3JQ5Qip7ar178kA==", + "@openzeppelin/contract-loader": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@openzeppelin/contract-loader/-/contract-loader-0.6.3.tgz", + "integrity": "sha512-cOFIjBjwbGgZhDZsitNgJl0Ye1rd5yu/Yx5LMgeq3u0ZYzldm4uObzHDFq4gjDdoypvyORjjJa3BlFA7eAnVIg==", "dev": true, - "optional": true, "requires": { - "browser-readablestream-to-it": "^1.0.3" + "find-up": "^4.1.0", + "fs-extra": "^8.1.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } } }, - "bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true + "@openzeppelin/contracts": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.3.0.tgz", + "integrity": "sha512-AemZEsQYtUp1WRkcmZm1div5ORfTpLquLaziCIrSagjxyKdmObxuaY1yjQ5SHFMctR8rLwp706NXTbiIRJg7pw==" }, - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true + "@openzeppelin/contracts-v5": { + "version": "npm:@openzeppelin/contracts@5.0.2", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.0.2.tgz", + "integrity": "sha512-ytPc6eLGcHHnapAZ9S+5qsdomhjo6QBHTDRRBFfTxXIpsicMhVPouPgmUPebZZZGX7vt9USA+Z+0M0dSVtSUEA==" }, - "body-parser": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "@openzeppelin/test-helpers": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/@openzeppelin/test-helpers/-/test-helpers-0.5.16.tgz", + "integrity": "sha512-T1EvspSfH1qQO/sgGlskLfYVBbqzJR23SZzYl/6B2JnT4EhThcI85UpvDk0BkLWKaDScQTabGHt4GzHW+3SfZg==", "dev": true, "requires": { - "bytes": "3.1.0", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "~1.1.2", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "on-finished": "~2.3.0", - "qs": "6.7.0", - "raw-body": "2.4.0", - "type-is": "~1.6.17" + "@openzeppelin/contract-loader": "^0.6.2", + "@truffle/contract": "^4.0.35", + "ansi-colors": "^3.2.3", + "chai": "^4.2.0", + "chai-bn": "^0.2.1", + "ethjs-abi": "^0.2.1", + "lodash.flatten": "^4.4.0", + "semver": "^5.6.0", + "web3": "^1.2.5", + "web3-utils": "^1.2.5" } }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", - "dev": true - }, - "borc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/borc/-/borc-2.1.2.tgz", - "integrity": "sha512-Sy9eoUi4OiKzq7VovMn246iTo17kzuyHJKomCfpWMlI6RpfN1gk95w7d7gH264nApVLg0HZfcpz62/g4VH1Y4w==", + "@openzeppelin/upgrades-core": { + "version": "1.37.1", + "resolved": "https://registry.npmjs.org/@openzeppelin/upgrades-core/-/upgrades-core-1.37.1.tgz", + "integrity": "sha512-dMQPDoMn1OUZXsCHT1thnAmkZ14v0FNlst5Ej8MIfujOv0k74kUok5XeuNF42fYewnNUYMkkz3PhXU1OIwSeyg==", "dev": true, - "optional": true, "requires": { - "bignumber.js": "^9.0.0", - "buffer": "^5.5.0", - "commander": "^2.15.0", - "ieee754": "^1.1.13", - "iso-url": "~0.4.7", - "json-text-sequence": "~0.1.0", - "readable-stream": "^3.6.0" + "@nomicfoundation/slang": "^0.17.0", + "cbor": "^9.0.0", + "chalk": "^4.1.0", + "compare-versions": "^6.0.0", + "debug": "^4.1.1", + "ethereumjs-util": "^7.0.3", + "minimatch": "^9.0.5", + "minimist": "^1.2.7", + "proper-lockfile": "^4.1.1", + "solidity-ast": "^0.4.51" }, "dependencies": { - "bignumber.js": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", - "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, - "optional": true + "requires": { + "color-convert": "^2.0.1" + } }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "optional": true, "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "balanced-match": "^1.0.0" } }, - "iso-url": { - "version": "0.4.7", - "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-0.4.7.tgz", - "integrity": "sha512-27fFRDnPAMnHGLq36bWTpKET+eiXct3ENlCcdcMdk+mjXrb2kw3mhBUg1B7ewAC0kVzlOPhADzQgz1SE6Tglog==", + "cbor": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-9.0.1.tgz", + "integrity": "sha512-/TQOWyamDxvVIv+DY9cOLNuABkoyz8K/F3QE56539pGVYohx0+MEA1f4lChFTX79dBTBS7R1PF6ovH7G+VtBfQ==", "dev": true, - "optional": true + "requires": { + "nofilter": "^3.1.0" + } + }, + "chalk": { + "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" + } + }, + "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==", + "dev": true, + "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==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "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" + } } } }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "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==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "@scure/base": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.8.tgz", + "integrity": "sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==", "dev": true }, - "browser-headers": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", - "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==", - "dev": true, - "optional": true - }, - "browser-readablestream-to-it": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/browser-readablestream-to-it/-/browser-readablestream-to-it-1.0.3.tgz", - "integrity": "sha512-+12sHB+Br8HIh6VAMVEG5r3UXCyESIgDW7kzk3BjIXa43DVqVwL7GC5TW3jeh+72dtcH99pPVpw0X8i0jt+/kw==", - "dev": true, - "optional": true - }, - "browser-stdout": { + "@scure/bip32": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz", + "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==", "dev": true, "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" + "@noble/curves": "~1.1.0", + "@noble/hashes": "~1.3.1", + "@scure/base": "~1.1.0" } }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "@scure/bip39": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz", + "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==", "dev": true, "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "@noble/hashes": "~1.3.0", + "@scure/base": "~1.1.0" } }, - "browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "@sentry/core": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.30.0.tgz", + "integrity": "sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==", "dev": true, "requires": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" }, "dependencies": { - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true } } }, - "browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "@sentry/hub": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.30.0.tgz", + "integrity": "sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ==", "dev": true, "requires": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" }, "dependencies": { - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true } } }, - "browserslist": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz", - "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==", + "@sentry/minimal": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.30.0.tgz", + "integrity": "sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001317", - "electron-to-chromium": "^1.4.84", - "escalade": "^3.1.1", - "node-releases": "^2.0.2", - "picocolors": "^1.0.0" + "@sentry/hub": "5.30.0", + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } } }, - "bs58": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", - "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", + "@sentry/node": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-5.30.0.tgz", + "integrity": "sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg==", "dev": true, "requires": { - "base-x": "^3.0.2" + "@sentry/core": "5.30.0", + "@sentry/hub": "5.30.0", + "@sentry/tracing": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", + "lru_map": "^0.3.3", + "tslib": "^1.9.3" + }, + "dependencies": { + "cookie": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz", + "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==", + "dev": true + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } } }, - "bs58check": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", - "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", + "@sentry/tracing": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.30.0.tgz", + "integrity": "sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw==", "dev": true, "requires": { - "bs58": "^4.0.0", - "create-hash": "^1.1.0", - "safe-buffer": "^5.1.2" + "@sentry/hub": "5.30.0", + "@sentry/minimal": "5.30.0", + "@sentry/types": "5.30.0", + "@sentry/utils": "5.30.0", + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } } }, - "btoa": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", - "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", + "@sentry/types": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.30.0.tgz", + "integrity": "sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw==", "dev": true }, - "btoa-lite": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", - "integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=", - "dev": true, - "optional": true - }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "@sentry/utils": { + "version": "5.30.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.30.0.tgz", + "integrity": "sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww==", "dev": true, "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" + "@sentry/types": "5.30.0", + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } } }, - "buffer-compare": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-compare/-/buffer-compare-1.1.1.tgz", - "integrity": "sha1-W+e+hTr4kZjR9N3AkNHWakiu9ZY=", - "dev": true, - "optional": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", "dev": true }, - "buffer-pipe": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/buffer-pipe/-/buffer-pipe-0.0.3.tgz", - "integrity": "sha512-GlxfuD/NrKvCNs0Ut+7b1IHjylfdegMBxQIlZHj7bObKVQBxB5S84gtm2yu1mQ8/sSggceWBDPY0cPXgvX2MuA==", + "@solidity-parser/parser": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.14.1.tgz", + "integrity": "sha512-eLjj2L6AuQjBB6s/ibwCAc0DwrR5Ge+ys+wgWo+bviU7fV2nTMQhU63CGaDKXg9iTmMxwhkyoggdIR7ZGRfMgw==", "dev": true, - "optional": true, + "peer": true, "requires": { - "safe-buffer": "^5.1.2" + "antlr4ts": "^0.5.0-alpha.4" } }, - "buffer-to-arraybuffer": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", - "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=", - "dev": true + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "@truffle/blockchain-utils": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@truffle/blockchain-utils/-/blockchain-utils-0.1.3.tgz", + "integrity": "sha512-K21Wf10u6VmS12/f9OrLN98f1RCqzrmuM2zlsly4b7BF/Xdh55Iq/jNSOnsNUJa+6Iaqqz6zeidquCYu9nTFng==", "dev": true }, - "bufferutil": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz", - "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==", + "@truffle/codec": { + "version": "0.14.17", + "resolved": "https://registry.npmjs.org/@truffle/codec/-/codec-0.14.17.tgz", + "integrity": "sha512-kD4dD86huLeaBEq5R8D1zleJEu6NsXbyYLdXl1V1TKdiO8odw5CBC6Y/+wdu5d3t1dyEYrTbhn1dqknZa52pmw==", "dev": true, "requires": { - "node-gyp-build": "^4.2.0" + "@truffle/abi-utils": "^0.3.9", + "@truffle/compile-common": "^0.9.4", + "big.js": "^6.0.3", + "bn.js": "^5.1.3", + "cbor": "^5.2.0", + "debug": "^4.3.1", + "lodash": "^4.17.21", + "semver": "7.3.7", + "utf8": "^3.0.0", + "web3-utils": "1.8.2" + }, + "dependencies": { + "@truffle/abi-utils": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@truffle/abi-utils/-/abi-utils-0.3.9.tgz", + "integrity": "sha512-G5dqgwRHx5zwlXjz3QT8OJVfB2cOqWwD6DwKso0KttUt/zejhCjnkKq72rSgyeLMkz7wBB9ERLOsupLBILM8MA==", + "dev": true, + "requires": { + "change-case": "3.0.2", + "fast-check": "3.1.1", + "web3-utils": "1.8.2" + } + }, + "@truffle/compile-common": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@truffle/compile-common/-/compile-common-0.9.4.tgz", + "integrity": "sha512-mnqJB/hLiPHNf+WKwt/2MH6lv34xSG/SFCib7+ckAklutUqVLeFo8EwQxinuHNkU7LY0C+YgZXhK1WTCO5YRJQ==", + "dev": true, + "requires": { + "@truffle/error": "^0.2.0", + "colors": "1.4.0" + } + }, + "@truffle/error": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.2.0.tgz", + "integrity": "sha512-Fe0/z4WWb7IP2gBnv3l6zqP87Y0kSMs7oiSLakKJq17q3GUunrHSdioKuNspdggxkXIBhEQLhi8C+LJdwmHKWQ==", + "dev": true + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "fast-check": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.1.1.tgz", + "integrity": "sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA==", + "dev": true, + "requires": { + "pure-rand": "^5.0.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + } } }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "dev": true - }, - "cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "@truffle/contract": { + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/@truffle/contract/-/contract-4.5.6.tgz", + "integrity": "sha512-Io+hwP4FRgsKz29hOCu2NTpu8b6mOT0urcjPgFpvRK2pUCl/E8WmggX3uyKtcntxXjtw/8tGFqGqSwHCiUcpLw==", "dev": true, "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" + "@ensdomains/ensjs": "^2.0.1", + "@truffle/blockchain-utils": "^0.1.3", + "@truffle/contract-schema": "^3.4.7", + "@truffle/debug-utils": "^6.0.18", + "@truffle/error": "^0.1.0", + "@truffle/interface-adapter": "^0.5.14", + "bignumber.js": "^7.2.1", + "debug": "^4.3.1", + "ethers": "^4.0.32", + "web3": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-promievent": "1.5.3", + "web3-eth-abi": "1.5.3", + "web3-utils": "1.5.3" }, "dependencies": { - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "@ethersproject/abi": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", + "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", + "dev": true, + "requires": { + "@ethersproject/address": "^5.0.4", + "@ethersproject/bignumber": "^5.0.7", + "@ethersproject/bytes": "^5.0.4", + "@ethersproject/constants": "^5.0.4", + "@ethersproject/hash": "^5.0.4", + "@ethersproject/keccak256": "^5.0.3", + "@ethersproject/logger": "^5.0.5", + "@ethersproject/properties": "^5.0.3", + "@ethersproject/strings": "^5.0.4" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "dev": true, + "requires": { + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", + "dev": true + }, + "web3": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.5.3.tgz", + "integrity": "sha512-eyBg/1K44flfv0hPjXfKvNwcUfIVDI4NX48qHQe6wd7C8nPSdbWqo9vLy6ksZIt9NLa90HjI8HsGYgnMSUxn6w==", + "dev": true, + "requires": { + "web3-bzz": "1.5.3", + "web3-core": "1.5.3", + "web3-eth": "1.5.3", + "web3-eth-personal": "1.5.3", + "web3-net": "1.5.3", + "web3-shh": "1.5.3", + "web3-utils": "1.5.3" + } + }, + "web3-bzz": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.5.3.tgz", + "integrity": "sha512-SlIkAqG0eS6cBS9Q2eBOTI1XFzqh83RqGJWnyrNZMDxUwsTVHL+zNnaPShVPvrWQA1Ub5b0bx1Kc5+qJVxsTJg==", + "dev": true, + "requires": { + "@types/node": "^12.12.6", + "got": "9.6.0", + "swarm-js": "^0.1.40" + } + }, + "web3-core": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.5.3.tgz", + "integrity": "sha512-ACTbu8COCu+0eUNmd9pG7Q9EVsNkAg2w3Y7SqhDr+zjTgbSHZV01jXKlapm9z+G3AN/BziV3zGwudClJ4u4xXQ==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.5", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.5.3", + "web3-core-method": "1.5.3", + "web3-core-requestmanager": "1.5.3", + "web3-utils": "1.5.3" + }, + "dependencies": { + "bignumber.js": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", + "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", + "dev": true + } + } + }, + "web3-core-helpers": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.5.3.tgz", + "integrity": "sha512-Ip1IjB3S8vN7Kf1PPjK41U5gskmMk6IJQlxIVuS8/1U7n/o0jC8krqtpRwiMfAgYyw3TXwBFtxSRTvJtnLyXZw==", + "dev": true, + "requires": { + "web3-eth-iban": "1.5.3", + "web3-utils": "1.5.3" + } + }, + "web3-core-method": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.5.3.tgz", + "integrity": "sha512-8wJrwQ2qD9ibWieF9oHXwrJsUGrv3XAtEkNeyvyNMpktNTIjxJ2jaFGQUuLiyUrMubD18XXgLk4JS6PJU4Loeg==", "dev": true, "requires": { - "pump": "^3.0.0" + "@ethereumjs/common": "^2.4.0", + "@ethersproject/transactions": "^5.0.0-beta.135", + "web3-core-helpers": "1.5.3", + "web3-core-promievent": "1.5.3", + "web3-core-subscriptions": "1.5.3", + "web3-utils": "1.5.3" } }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true - } - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "dev": true, - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" + "web3-core-promievent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.5.3.tgz", + "integrity": "sha512-CFfgqvk3Vk6PIAxtLLuX+pOMozxkKCY+/GdGr7weMh033mDXEPvwyVjoSRO1PqIKj668/hMGQsVoIgbyxkJ9Mg==", + "dev": true, + "requires": { + "eventemitter3": "4.0.4" + } + }, + "web3-core-requestmanager": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.5.3.tgz", + "integrity": "sha512-9k/Bze2rs8ONix5IZR+hYdMNQv+ark2Ek2kVcrFgWO+LdLgZui/rn8FikPunjE+ub7x7pJaKCgVRbYFXjo3ZWg==", + "dev": true, + "requires": { + "util": "^0.12.0", + "web3-core-helpers": "1.5.3", + "web3-providers-http": "1.5.3", + "web3-providers-ipc": "1.5.3", + "web3-providers-ws": "1.5.3" + } + }, + "web3-core-subscriptions": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.5.3.tgz", + "integrity": "sha512-L2m9vG1iRN6thvmv/HQwO2YLhOQlmZU8dpLG6GSo9FBN14Uch868Swk0dYVr3rFSYjZ/GETevSXU+O+vhCummA==", + "dev": true, + "requires": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.5.3" + } + }, + "web3-eth": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.5.3.tgz", + "integrity": "sha512-saFurA1L23Bd7MEf7cBli6/jRdMhD4X/NaMiO2mdMMCXlPujoudlIJf+VWpRWJpsbDFdu7XJ2WHkmBYT5R3p1Q==", + "dev": true, + "requires": { + "web3-core": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-method": "1.5.3", + "web3-core-subscriptions": "1.5.3", + "web3-eth-abi": "1.5.3", + "web3-eth-accounts": "1.5.3", + "web3-eth-contract": "1.5.3", + "web3-eth-ens": "1.5.3", + "web3-eth-iban": "1.5.3", + "web3-eth-personal": "1.5.3", + "web3-net": "1.5.3", + "web3-utils": "1.5.3" + } + }, + "web3-eth-abi": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.5.3.tgz", + "integrity": "sha512-i/qhuFsoNrnV130CSRYX/z4SlCfSQ4mHntti5yTmmQpt70xZKYZ57BsU0R29ueSQ9/P+aQrL2t2rqkQkAloUxg==", + "dev": true, + "requires": { + "@ethersproject/abi": "5.0.7", + "web3-utils": "1.5.3" + } + }, + "web3-eth-accounts": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.5.3.tgz", + "integrity": "sha512-pdGhXgeBaEJENMvRT6W9cmji3Zz/46ugFSvmnLLw79qi5EH7XJhKISNVb41eWCrs4am5GhI67GLx5d2s2a72iw==", + "dev": true, + "requires": { + "@ethereumjs/common": "^2.3.0", + "@ethereumjs/tx": "^3.2.1", + "crypto-browserify": "3.12.0", + "eth-lib": "0.2.8", + "ethereumjs-util": "^7.0.10", + "scrypt-js": "^3.0.1", + "uuid": "3.3.2", + "web3-core": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-method": "1.5.3", + "web3-utils": "1.5.3" + }, + "dependencies": { + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + } + } + }, + "web3-eth-contract": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.5.3.tgz", + "integrity": "sha512-Gdlt1L6cdHe83k7SdV6xhqCytVtOZkjD0kY/15x441AuuJ4JLubCHuqu69k2Dr3tWifHYVys/vG8QE/W16syGg==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.5", + "web3-core": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-method": "1.5.3", + "web3-core-promievent": "1.5.3", + "web3-core-subscriptions": "1.5.3", + "web3-eth-abi": "1.5.3", + "web3-utils": "1.5.3" + } + }, + "web3-eth-ens": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.5.3.tgz", + "integrity": "sha512-QmGFFtTGElg0E+3xfCIFhiUF+1imFi9eg/cdsRMUZU4F1+MZCC/ee+IAelYLfNTGsEslCqfAusliKOT9DdGGnw==", + "dev": true, + "requires": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "web3-core": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-promievent": "1.5.3", + "web3-eth-abi": "1.5.3", + "web3-eth-contract": "1.5.3", + "web3-utils": "1.5.3" + } + }, + "web3-eth-iban": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.5.3.tgz", + "integrity": "sha512-vMzmGqolYZvRHwP9P4Nf6G8uYM5aTLlQu2a34vz78p0KlDC+eV1th3+90Qeaupa28EG7OO0IT1F0BejiIauOPw==", + "dev": true, + "requires": { + "bn.js": "^4.11.9", + "web3-utils": "1.5.3" + } + }, + "web3-eth-personal": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.5.3.tgz", + "integrity": "sha512-JzibJafR7ak/Icas8uvos3BmUNrZw1vShuNR5Cxjo+vteOC8XMqz1Vr7RH65B4bmlfb3bm9xLxetUHO894+Sew==", + "dev": true, + "requires": { + "@types/node": "^12.12.6", + "web3-core": "1.5.3", + "web3-core-helpers": "1.5.3", + "web3-core-method": "1.5.3", + "web3-net": "1.5.3", + "web3-utils": "1.5.3" + } + }, + "web3-net": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.5.3.tgz", + "integrity": "sha512-0W/xHIPvgVXPSdLu0iZYnpcrgNnhzHMC888uMlGP5+qMCt8VuflUZHy7tYXae9Mzsg1kxaJAS5lHVNyeNw4CoQ==", + "dev": true, + "requires": { + "web3-core": "1.5.3", + "web3-core-method": "1.5.3", + "web3-utils": "1.5.3" + } + }, + "web3-providers-http": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.5.3.tgz", + "integrity": "sha512-5DpUyWGHtDAr2RYmBu34Fu+4gJuBAuNx2POeiJIooUtJ+Mu6pIx4XkONWH6V+Ez87tZAVAsFOkJRTYuzMr3rPw==", + "dev": true, + "requires": { + "web3-core-helpers": "1.5.3", + "xhr2-cookies": "1.1.0" + } + }, + "web3-providers-ipc": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.5.3.tgz", + "integrity": "sha512-JmeAptugVpmXI39LGxUSAymx0NOFdgpuI1hGQfIhbEAcd4sv7fhfd5D+ZU4oLHbRI8IFr4qfGU0uhR8BXhDzlg==", + "dev": true, + "requires": { + "oboe": "2.1.5", + "web3-core-helpers": "1.5.3" + } + }, + "web3-providers-ws": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.5.3.tgz", + "integrity": "sha512-6DhTw4Q7nm5CFYEUHOJM0gAb3xFx+9gWpVveg3YxJ/ybR1BUvEWo3bLgIJJtX56cYX0WyY6DS35a7f0LOI1kVg==", + "dev": true, + "requires": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.5.3", + "websocket": "^1.0.32" + } + }, + "web3-shh": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.5.3.tgz", + "integrity": "sha512-COfEXfsqoV/BkcsNLRxQqnWc1Teb8/9GxdGag5GtPC5gQC/vsN+7hYVJUwNxY9LtJPKYTij2DHHnx6UkITng+Q==", + "dev": true, + "requires": { + "web3-core": "1.5.3", + "web3-core-method": "1.5.3", + "web3-core-subscriptions": "1.5.3", + "web3-net": "1.5.3" + } + }, + "web3-utils": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.5.3.tgz", + "integrity": "sha512-56nRgA+Ad9SEyCv39g36rTcr5fpsd4L9LgV3FK0aB66nAMazLAA6Qz4lH5XrUKPDyBIPGJIR+kJsyRtwcu2q1Q==", + "dev": true, + "requires": { + "bn.js": "^4.11.9", + "eth-lib": "0.2.8", + "ethereum-bloom-filters": "^1.0.6", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } + } } }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001332", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz", - "integrity": "sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==", - "dev": true - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, - "catering": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", - "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", - "dev": true, - "optional": true - }, - "cbor": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-5.2.0.tgz", - "integrity": "sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==", + "@truffle/contract-schema": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/@truffle/contract-schema/-/contract-schema-3.4.7.tgz", + "integrity": "sha512-vbOHMq/a8rVPh+cFMBDDGPqqiKrXXOc+f1kB4znfh3ewOX8rJxZhGJvdMm3WNMJHR5RstqDV7ZIZ7ePwtSXH8Q==", "dev": true, "requires": { - "bignumber.js": "^9.0.1", - "nofilter": "^1.0.4" + "ajv": "^6.10.0", + "debug": "^4.3.1" }, "dependencies": { - "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, - "chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", + "@truffle/debug-utils": { + "version": "6.0.48", + "resolved": "https://registry.npmjs.org/@truffle/debug-utils/-/debug-utils-6.0.48.tgz", + "integrity": "sha512-HdK/7eH5EFrcTPeZVEgKaKkkzuZ4xsrH8yw+EoLEsScLsOEuQeKynY61NctjuU93voATWrYmV99Sfb/MRq2i2g==", "dev": true, "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" + "@truffle/codec": "^0.14.17", + "@trufflesuite/chromafi": "^3.0.0", + "bn.js": "^5.1.3", + "chalk": "^2.4.2", + "debug": "^4.3.1", + "highlightjs-solidity": "^2.0.6" + }, + "dependencies": { + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, - "chai-bn": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/chai-bn/-/chai-bn-0.2.2.tgz", - "integrity": "sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg==", + "@truffle/error": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@truffle/error/-/error-0.1.0.tgz", + "integrity": "sha512-RbUfp5VreNhsa2Q4YbBjz18rOQI909pG32bghl1hulO7IpvcqTS+C3Ge5cNbiWQ1WGzy1wIeKLW0tmQtHFB7qg==", "dev": true }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "@truffle/interface-adapter": { + "version": "0.5.32", + "resolved": "https://registry.npmjs.org/@truffle/interface-adapter/-/interface-adapter-0.5.32.tgz", + "integrity": "sha512-7Hgmdb4nJUcWtq4vvgWY7Mr2RLOTOp5FZaWyMiFmjkcEEhDlezm2QstALWAXgT0W6q7tDmDBpw3vTIFenRhHBA==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "bn.js": "^5.1.3", + "ethers": "^4.0.32", + "web3": "1.8.2" }, "dependencies": { - "has-flag": { + "@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true + }, + "@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "dev": true, + "requires": { + "defer-to-connect": "^2.0.1" + } + }, + "@types/bn.js": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "bignumber.js": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", + "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "dev": true + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "cacheable-request": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", + "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, + "decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "requires": { + "mimic-response": "^3.1.0" + } + }, + "defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true + }, + "ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", + "dev": true, + "requires": { + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "got": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", + "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", + "dev": true, + "requires": { + "@sindresorhus/is": "^4.6.0", + "@szmarczak/http-timer": "^5.0.1", + "@types/cacheable-request": "^6.0.2", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^6.0.4", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "form-data-encoder": "1.7.1", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^2.0.0" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" + } + }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "keyv": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz", + "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==", + "dev": true, + "requires": { + "json-buffer": "3.0.1" + } + }, + "lowercase-keys": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "dev": true + }, + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true + }, + "normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true + }, + "p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "dev": true + }, + "responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "dev": true, + "requires": { + "lowercase-keys": "^2.0.0" + }, + "dependencies": { + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", + "dev": true + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "web3": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.8.2.tgz", + "integrity": "sha512-92h0GdEHW9wqDICQQKyG4foZBYi0OQkyg4CRml2F7XBl/NG+fu9o6J19kzfFXzSBoA4DnJXbyRgj/RHZv5LRiw==", + "dev": true, + "requires": { + "web3-bzz": "1.8.2", + "web3-core": "1.8.2", + "web3-eth": "1.8.2", + "web3-eth-personal": "1.8.2", + "web3-net": "1.8.2", + "web3-shh": "1.8.2", + "web3-utils": "1.8.2" + } + }, + "web3-bzz": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.8.2.tgz", + "integrity": "sha512-1EEnxjPnFnvNWw3XeeKuTR8PBxYd0+XWzvaLK7OJC/Go9O8llLGxrxICbKV+8cgIE0sDRBxiYx02X+6OhoAQ9w==", + "dev": true, + "requires": { + "@types/node": "^12.12.6", + "got": "12.1.0", + "swarm-js": "^0.1.40" + } + }, + "web3-core": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.8.2.tgz", + "integrity": "sha512-DJTVEAYcNqxkqruJE+Rxp3CIv0y5AZMwPHQmOkz/cz+MM75SIzMTc0AUdXzGyTS8xMF8h3YWMQGgGEy8SBf1PQ==", + "dev": true, + "requires": { + "@types/bn.js": "^5.1.0", + "@types/node": "^12.12.6", + "bignumber.js": "^9.0.0", + "web3-core-helpers": "1.8.2", + "web3-core-method": "1.8.2", + "web3-core-requestmanager": "1.8.2", + "web3-utils": "1.8.2" + } + }, + "web3-core-helpers": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.8.2.tgz", + "integrity": "sha512-6B1eLlq9JFrfealZBomd1fmlq1o4A09vrCVQSa51ANoib/jllT3atZrRDr0zt1rfI7TSZTZBXdN/aTdeN99DWw==", + "dev": true, + "requires": { + "web3-eth-iban": "1.8.2", + "web3-utils": "1.8.2" + } + }, + "web3-core-method": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.8.2.tgz", + "integrity": "sha512-1qnr5mw5wVyULzLOrk4B+ryO3gfGjGd/fx8NR+J2xCGLf1e6OSjxT9vbfuQ3fErk/NjSTWWreieYWLMhaogcRA==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "@ethersproject/transactions": "^5.6.2", + "web3-core-helpers": "1.8.2", + "web3-core-promievent": "1.8.2", + "web3-core-subscriptions": "1.8.2", + "web3-utils": "1.8.2" } - } - } - }, - "change-case": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.0.2.tgz", - "integrity": "sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==", - "dev": true, - "requires": { - "camel-case": "^3.0.0", - "constant-case": "^2.0.0", - "dot-case": "^2.1.0", - "header-case": "^1.0.0", - "is-lower-case": "^1.1.0", - "is-upper-case": "^1.1.0", - "lower-case": "^1.1.1", - "lower-case-first": "^1.0.0", - "no-case": "^2.3.2", - "param-case": "^2.1.0", - "pascal-case": "^2.0.0", - "path-case": "^2.1.0", - "sentence-case": "^2.1.0", - "snake-case": "^2.1.0", - "swap-case": "^1.1.0", - "title-case": "^2.1.0", - "upper-case": "^1.1.1", - "upper-case-first": "^1.1.0" - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "checkpoint-store": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", - "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", - "dev": true, - "requires": { - "functional-red-black-tree": "^1.0.1" - } - }, - "cheerio": { - "version": "1.0.0-rc.10", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.10.tgz", - "integrity": "sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==", - "dev": true, - "requires": { - "cheerio-select": "^1.5.0", - "dom-serializer": "^1.3.2", - "domhandler": "^4.2.0", - "htmlparser2": "^6.1.0", - "parse5": "^6.0.1", - "parse5-htmlparser2-tree-adapter": "^6.0.1", - "tslib": "^2.2.0" - } - }, - "cheerio-select": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.6.0.tgz", - "integrity": "sha512-eq0GdBvxVFbqWgmCm7M3XGs1I8oLy/nExUnh6oLqmBditPO9AqQJrkslDpMun/hZ0yyTs8L0m85OHp4ho6Qm9g==", - "dev": true, - "requires": { - "css-select": "^4.3.0", - "css-what": "^6.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.3.1", - "domutils": "^2.8.0" - } - }, - "chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "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==", - "dev": true - }, - "cids": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", - "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "class-is": "^1.1.0", - "multibase": "~0.6.0", - "multicodec": "^1.0.0", - "multihashes": "~0.4.15" - }, - "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + }, + "web3-core-promievent": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.8.2.tgz", + "integrity": "sha512-nvkJWDVgoOSsolJldN33tKW6bKKRJX3MCPDYMwP5SUFOA/mCzDEoI88N0JFofDTXkh1k7gOqp1pvwi9heuaxGg==", "dev": true, "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "eventemitter3": "4.0.4" } }, - "multicodec": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", - "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", + "web3-core-requestmanager": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.8.2.tgz", + "integrity": "sha512-p1d090RYs5Mu7DK1yyc3GCBVZB/03rBtFhYFoS2EruGzOWs/5Q0grgtpwS/DScdRAm8wB8mYEBhY/RKJWF6B2g==", "dev": true, "requires": { - "buffer": "^5.6.0", - "varint": "^5.0.0" + "util": "^0.12.5", + "web3-core-helpers": "1.8.2", + "web3-providers-http": "1.8.2", + "web3-providers-ipc": "1.8.2", + "web3-providers-ws": "1.8.2" + } + }, + "web3-core-subscriptions": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.8.2.tgz", + "integrity": "sha512-vXQogHDmAIQcKpXvGiMddBUeP9lnKgYF64+yQJhPNE5PnWr1sAibXuIPV7mIPihpFr/n/DORRj6Wh1pUv9zaTw==", + "dev": true, + "requires": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.8.2" + } + }, + "web3-eth": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.8.2.tgz", + "integrity": "sha512-JoTiWWc4F4TInpbvDUGb0WgDYJsFhuIjJlinc5ByjWD88Gvh+GKLsRjjFdbqe5YtwIGT4NymwoC5LQd1K6u/QQ==", + "dev": true, + "requires": { + "web3-core": "1.8.2", + "web3-core-helpers": "1.8.2", + "web3-core-method": "1.8.2", + "web3-core-subscriptions": "1.8.2", + "web3-eth-abi": "1.8.2", + "web3-eth-accounts": "1.8.2", + "web3-eth-contract": "1.8.2", + "web3-eth-ens": "1.8.2", + "web3-eth-iban": "1.8.2", + "web3-eth-personal": "1.8.2", + "web3-net": "1.8.2", + "web3-utils": "1.8.2" + } + }, + "web3-eth-abi": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.8.2.tgz", + "integrity": "sha512-Om9g3kaRNjqiNPAgKwGT16y+ZwtBzRe4ZJFGjLiSs6v5I7TPNF+rRMWuKnR6jq0azQZDj6rblvKFMA49/k48Og==", + "dev": true, + "requires": { + "@ethersproject/abi": "^5.6.3", + "web3-utils": "1.8.2" + } + }, + "web3-eth-accounts": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.8.2.tgz", + "integrity": "sha512-c367Ij63VCz9YdyjiHHWLFtN85l6QghgwMQH2B1eM/p9Y5lTlTX7t/Eg/8+f1yoIStXbk2w/PYM2lk+IkbqdLA==", + "dev": true, + "requires": { + "@ethereumjs/common": "2.5.0", + "@ethereumjs/tx": "3.3.2", + "eth-lib": "0.2.8", + "ethereumjs-util": "^7.1.5", + "scrypt-js": "^3.0.1", + "uuid": "^9.0.0", + "web3-core": "1.8.2", + "web3-core-helpers": "1.8.2", + "web3-core-method": "1.8.2", + "web3-utils": "1.8.2" + }, + "dependencies": { + "scrypt-js": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", + "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==", + "dev": true + }, + "uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "dev": true + } + } + }, + "web3-eth-contract": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.8.2.tgz", + "integrity": "sha512-ID5A25tHTSBNwOPjiXSVzxruz006ULRIDbzWTYIFTp7NJ7vXu/kynKK2ag/ObuTqBpMbobP8nXcA9b5EDkIdQA==", + "dev": true, + "requires": { + "@types/bn.js": "^5.1.0", + "web3-core": "1.8.2", + "web3-core-helpers": "1.8.2", + "web3-core-method": "1.8.2", + "web3-core-promievent": "1.8.2", + "web3-core-subscriptions": "1.8.2", + "web3-eth-abi": "1.8.2", + "web3-utils": "1.8.2" + } + }, + "web3-eth-ens": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.8.2.tgz", + "integrity": "sha512-PWph7C/CnqdWuu1+SH4U4zdrK4t2HNt0I4XzPYFdv9ugE8EuojselioPQXsVGvjql+Nt3jDLvQvggPqlMbvwRw==", + "dev": true, + "requires": { + "content-hash": "^2.5.2", + "eth-ens-namehash": "2.0.8", + "web3-core": "1.8.2", + "web3-core-helpers": "1.8.2", + "web3-core-promievent": "1.8.2", + "web3-eth-abi": "1.8.2", + "web3-eth-contract": "1.8.2", + "web3-utils": "1.8.2" + } + }, + "web3-eth-iban": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.8.2.tgz", + "integrity": "sha512-h3vNblDWkWMuYx93Q27TAJz6lhzpP93EiC3+45D6xoz983p6si773vntoQ+H+5aZhwglBtoiBzdh7PSSOnP/xQ==", + "dev": true, + "requires": { + "bn.js": "^5.2.1", + "web3-utils": "1.8.2" + } + }, + "web3-eth-personal": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.8.2.tgz", + "integrity": "sha512-Vg4HfwCr7doiUF/RC+Jz0wT4+cYaXcOWMAW2AHIjHX6Z7Xwa8nrURIeQgeEE62qcEHAzajyAdB1u6bJyTfuCXw==", + "dev": true, + "requires": { + "@types/node": "^12.12.6", + "web3-core": "1.8.2", + "web3-core-helpers": "1.8.2", + "web3-core-method": "1.8.2", + "web3-net": "1.8.2", + "web3-utils": "1.8.2" + } + }, + "web3-net": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.8.2.tgz", + "integrity": "sha512-1itkDMGmbgb83Dg9nporFes9/fxsU7smJ3oRXlFkg4ZHn8YJyP1MSQFPJWWwSc+GrcCFt4O5IrUTvEkHqE3xag==", + "dev": true, + "requires": { + "web3-core": "1.8.2", + "web3-core-method": "1.8.2", + "web3-utils": "1.8.2" + } + }, + "web3-providers-http": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.8.2.tgz", + "integrity": "sha512-2xY94IIEQd16+b+vIBF4IC1p7GVaz9q4EUFscvMUjtEq4ru4Atdzjs9GP+jmcoo49p70II0UV3bqQcz0TQfVyQ==", + "dev": true, + "requires": { + "abortcontroller-polyfill": "^1.7.3", + "cross-fetch": "^3.1.4", + "es6-promise": "^4.2.8", + "web3-core-helpers": "1.8.2" + } + }, + "web3-providers-ipc": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.8.2.tgz", + "integrity": "sha512-p6fqKVGFg+WiXGHWnB1hu43PbvPkDHTz4RgoEzbXugv5rtv5zfYLqm8Ba6lrJOS5ks9kGKR21a0y3NzE3u7V4w==", + "dev": true, + "requires": { + "oboe": "2.1.5", + "web3-core-helpers": "1.8.2" + } + }, + "web3-providers-ws": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.8.2.tgz", + "integrity": "sha512-3s/4K+wHgbiN+Zrp9YjMq2eqAF6QGABw7wFftPdx+m5hWImV27/MoIx57c6HffNRqZXmCHnfWWFCNHHsi7wXnA==", + "dev": true, + "requires": { + "eventemitter3": "4.0.4", + "web3-core-helpers": "1.8.2", + "websocket": "^1.0.32" + } + }, + "web3-shh": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.8.2.tgz", + "integrity": "sha512-uZ+3MAoNcaJsXXNCDnizKJ5viBNeHOFYsCbFhV755Uu52FswzTOw6DtE7yK9nYXMtIhiSgi7nwl1RYzP8pystw==", + "dev": true, + "requires": { + "web3-core": "1.8.2", + "web3-core-method": "1.8.2", + "web3-core-subscriptions": "1.8.2", + "web3-net": "1.8.2" } } } }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "circular": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/circular/-/circular-1.0.5.tgz", - "integrity": "sha1-fad6+Yu96c5LWzWM1Va13e0tMUk=", - "dev": true - }, - "circular-json": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.9.tgz", - "integrity": "sha512-4ivwqHpIFJZBuhN3g/pEcdbnGUywkBblloGbkglyloVjjR3uT6tieI89MVOfbP2tHX5sgb01FuLgAOzebNlJNQ==", - "dev": true, - "optional": true - }, - "class-is": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", - "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", - "dev": true - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "optional": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-logger": { - "version": "0.5.40", - "resolved": "https://registry.npmjs.org/cli-logger/-/cli-logger-0.5.40.tgz", - "integrity": "sha1-CX8OEbByx8aYomxH9YiinCC0iws=", - "dev": true, - "requires": { - "circular": "^1.0.5", - "cli-util": "~1.1.27" - } - }, - "cli-regexp": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/cli-regexp/-/cli-regexp-0.1.2.tgz", - "integrity": "sha1-a82TsJ+y7RAl0woRVdWZeVSlNRI=", - "dev": true - }, - "cli-util": { - "version": "1.1.27", - "resolved": "https://registry.npmjs.org/cli-util/-/cli-util-1.1.27.tgz", - "integrity": "sha1-QtaeNqBAoyH8nPhRwVE8rcUJMFQ=", + "@trufflesuite/chromafi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz", + "integrity": "sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ==", "dev": true, "requires": { - "cli-regexp": "~0.1.0" + "camelcase": "^4.1.0", + "chalk": "^2.3.2", + "cheerio": "^1.0.0-rc.2", + "detect-indent": "^5.0.0", + "highlight.js": "^10.4.1", + "lodash.merge": "^4.6.2", + "strip-ansi": "^4.0.0", + "strip-indent": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } } }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } + "peer": true }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true, - "optional": true + "peer": true }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true, - "requires": { - "mimic-response": "^1.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "peer": true }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-logger": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/color-logger/-/color-logger-0.0.6.tgz", - "integrity": "sha1-5WJF7ymCJlcRDHy3WpzXhstp7Rs=", - "dev": true - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true + "peer": true }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "@typechain/ethers-v5": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/@typechain/ethers-v5/-/ethers-v5-10.2.0.tgz", + "integrity": "sha512-ikaq0N/w9fABM+G01OFmU3U3dNnyRwEahkdvi9mqy1a3XwKiPZaF/lu54OcNaEWnpvEYyhhS0N7buCtLQqC92w==", "dev": true, + "peer": true, "requires": { - "delayed-stream": "~1.0.0" + "lodash": "^4.17.15", + "ts-essentials": "^7.0.1" } }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "optional": true - }, - "compare-versions": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz", - "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "conf": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/conf/-/conf-10.1.2.tgz", - "integrity": "sha512-o9Fv1Mv+6A0JpoayQ8JleNp3hhkbOJP/Re/Q+QqxMPHPkABVsRjQGWZn9A5GcqLiTNC6d89p2PB5ZhHVDSMwyg==", + "@typechain/hardhat": { + "version": "6.1.5", + "resolved": "https://registry.npmjs.org/@typechain/hardhat/-/hardhat-6.1.5.tgz", + "integrity": "sha512-lg7LW4qDZpxFMknp3Xool61Fg6Lays8F8TXdFGBG+MxyYcYU5795P1U2XdStuzGq9S2Dzdgh+1jGww9wvZ6r4Q==", "dev": true, - "optional": true, + "peer": true, "requires": { - "ajv": "^8.6.3", - "ajv-formats": "^2.1.1", - "atomically": "^1.7.0", - "debounce-fn": "^4.0.0", - "dot-prop": "^6.0.1", - "env-paths": "^2.2.1", - "json-schema-typed": "^7.0.3", - "onetime": "^5.1.2", - "pkg-up": "^3.1.0", - "semver": "^7.3.5" + "fs-extra": "^9.1.0" }, "dependencies": { - "ajv": { - "version": "8.11.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", - "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, - "optional": true, + "peer": true, "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" } }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "optional": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "optional": true - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, - "optional": true, + "peer": true, "requires": { - "lru-cache": "^6.0.0" + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "peer": true } } }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true, - "optional": true - }, - "constant-case": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz", - "integrity": "sha1-QXV2TTidP6nI7NKRhu1gBSQ7akY=", - "dev": true, - "requires": { - "snake-case": "^2.1.0", - "upper-case": "^1.1.1" - } + "@types/async-eventemitter": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@types/async-eventemitter/-/async-eventemitter-0.2.1.tgz", + "integrity": "sha512-M2P4Ng26QbAeITiH7w1d7OxtldgfAe0wobpyJzVK/XOb0cUGKU2R4pfAhqcJBXAe2ife5ZOhSv4wk7p+ffURtg==", + "dev": true }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "@types/bignumber.js": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-5.0.0.tgz", + "integrity": "sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA==", "dev": true, "requires": { - "safe-buffer": "5.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "bignumber.js": "*" } }, - "content-hash": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", - "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", "dev": true, "requires": { - "cids": "^0.7.1", - "multicodec": "^0.5.5", - "multihashes": "^0.4.15" + "@types/node": "*" } }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true - }, - "cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", - "dev": true - }, - "cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "cookiejar": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", - "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", - "dev": true - }, - "core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "dev": true - }, - "core-js-compat": { - "version": "3.22.2", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.22.2.tgz", - "integrity": "sha512-Fns9lU06ZJ07pdfmPMu7OnkIKGPKDzXKIiuGlSvHHapwqMUF2QnnsWwtueFZtSyZEilP0o6iUeHQwpn7LxtLUw==", + "@types/cacheable-request": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", "dev": true, "requires": { - "browserslist": "^4.20.2", - "semver": "7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true - } + "@types/http-cache-semantics": "*", + "@types/keyv": "^3.1.4", + "@types/node": "*", + "@types/responselike": "^1.0.0" } }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "@types/chai": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", "dev": true }, - "cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "requires": { - "object-assign": "^4", - "vary": "^1" - } - }, - "cosmiconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", - "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", + "@types/chai-as-promised": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", + "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", "dev": true, + "peer": true, "requires": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - }, - "dependencies": { - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - } + "@types/chai": "*" } }, - "crc-32": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", - "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", + "@types/concat-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", "dev": true, + "peer": true, "requires": { - "exit-on-epipe": "~1.0.1", - "printj": "~1.1.0" + "@types/node": "*" } }, - "create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "@types/debug": { + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", + "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==", "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" + "requires": { + "@types/ms": "*" } }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", "dev": true, + "peer": true, "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" + "@types/node": "*" } }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "@types/fs-extra": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", + "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", "dev": true, + "optional": true, "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "@types/jsonfile": "*", + "@types/node": "*" } }, - "cross-fetch": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.6.tgz", - "integrity": "sha512-9JZz+vXCmfKUZ68zAptS7k4Nu8e2qcibe7WVZYps7sAgk5R8GYTc+T1WR0v1rlP9HxgARmOX1UTIJZFytajpNA==", + "@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", "dev": true, + "peer": true, "requires": { - "node-fetch": "^2.6.7", - "whatwg-fetch": "^2.0.4" + "@types/minimatch": "*", + "@types/node": "*" } }, - "crypto-addr-codec": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz", - "integrity": "sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg==", + "@types/http-cache-semantics": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", + "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", + "dev": true + }, + "@types/jsonfile": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", + "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", "dev": true, + "optional": true, "requires": { - "base-x": "^3.0.8", - "big-integer": "1.6.36", - "blakejs": "^1.1.0", - "bs58": "^4.0.1", - "ripemd160-min": "0.0.6", - "safe-buffer": "^5.2.0", - "sha3": "^2.1.1" + "@types/node": "*" } }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "@types/keyv": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", "dev": true, "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" + "@types/node": "*" } }, - "css-select": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", - "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "@types/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw==", + "dev": true + }, + "@types/minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "dev": true, + "peer": true + }, + "@types/mocha": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", + "dev": true, + "peer": true + }, + "@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", + "dev": true + }, + "@types/node": { + "version": "12.20.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.16.tgz", + "integrity": "sha512-6CLxw83vQf6DKqXxMPwl8qpF8I7THFZuIwLt4TnNsumxkp1VsRZWT8txQxncT/Rl2UojTsFzWgDG4FRMwafrlA==", + "dev": true + }, + "@types/pbkdf2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.0.tgz", + "integrity": "sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==", "dev": true, "requires": { - "boolbase": "^1.0.0", - "css-what": "^6.0.1", - "domhandler": "^4.3.1", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" + "@types/node": "*" } }, - "css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", + "@types/prettier": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.2.tgz", + "integrity": "sha512-KufADq8uQqo1pYKVIYzfKbJfBAc0sOeXqGbFaSpv8MRmC/zXgowNZmFcbngndGk922QDmOASEXUZCaY48gs4cg==", + "dev": true, + "peer": true + }, + "@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", "dev": true }, - "cssfilter": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz", - "integrity": "sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4=", + "@types/readable-stream": { + "version": "2.3.15", + "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-2.3.15.tgz", + "integrity": "sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==", "dev": true, - "optional": true + "requires": { + "@types/node": "*", + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } }, - "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "@types/responselike": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", + "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", "dev": true, - "optional": true + "requires": { + "@types/node": "*" + } }, - "cssstyle": { - "version": "0.2.37", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-0.2.37.tgz", - "integrity": "sha1-VBCXI0yyUTyDzu06zdwn/yeYfVQ=", + "@types/secp256k1": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.3.tgz", + "integrity": "sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==", "dev": true, - "optional": true, "requires": { - "cssom": "0.3.x" + "@types/node": "*" } }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "@types/yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", "dev": true, + "optional": true, "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" + "@types/node": "*" } }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, + "@uniswap/lib": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@uniswap/lib/-/lib-1.1.1.tgz", + "integrity": "sha512-2yK7sLpKIT91TiS5sewHtOa7YuM8IuBXVl4GZv2jZFys4D2sY7K5vZh6MqD25TPA95Od+0YzCVq6cTF2IKrOmg==" + }, + "@uniswap/v2-core": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@uniswap/v2-core/-/v2-core-1.0.0.tgz", + "integrity": "sha512-BJiXrBGnN8mti7saW49MXwxDBRFiWemGetE58q8zgfnPPzQKq55ADltEILqOt6VFZ22kVeVKbF8gVd8aY3l7pA==" + }, + "@uniswap/v2-periphery": { + "version": "1.1.0-beta.0", + "resolved": "https://registry.npmjs.org/@uniswap/v2-periphery/-/v2-periphery-1.1.0-beta.0.tgz", + "integrity": "sha512-6dkwAMKza8nzqYiXEr2D86dgW3TTavUvCR0w2Tu33bAbM8Ah43LKAzH7oKKPRT5VJQaMi1jtkGs1E8JPor1n5g==", "requires": { - "assert-plus": "^1.0.0" + "@uniswap/lib": "1.1.1", + "@uniswap/v2-core": "1.0.0" } }, - "dataloader": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.1.0.tgz", - "integrity": "sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==", + "abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", "dev": true, - "optional": true + "peer": true }, - "death": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", - "integrity": "sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg=", + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, + "requires": { + "event-target-shim": "^5.0.0" + } + }, + "abortcontroller-polyfill": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz", + "integrity": "sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==", "dev": true }, - "debounce-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/debounce-fn/-/debounce-fn-4.0.0.tgz", - "integrity": "sha512-8pYCQiL9Xdcg0UPSD3d+0KMlOjp+KGU5EPwYddgzQ7DATsg4fuUDjQtsYLmWjnk2obnNHgV3vE2Y4jejSOJVBQ==", + "abstract-level": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", + "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", "dev": true, - "optional": true, "requires": { - "mimic-fn": "^3.0.0" - }, - "dependencies": { - "mimic-fn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", - "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", - "dev": true, - "optional": true - } + "buffer": "^6.0.3", + "catering": "^2.1.0", + "is-buffer": "^2.0.5", + "level-supports": "^4.0.0", + "level-transcoder": "^1.0.1", + "module-error": "^1.0.1", + "queue-microtask": "^1.2.3" } }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", "dev": true, "requires": { - "ms": "2.0.0" + "mime-types": "~2.1.24", + "negotiator": "0.6.2" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "peer": true + }, + "address": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz", + "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==", + "dev": true, + "peer": true + }, + "adm-zip": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.16.tgz", + "integrity": "sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg==", "dev": true }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=", "dev": true }, - "decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "requires": { - "mimic-response": "^1.0.0" + "debug": "4" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } } }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "requires": { - "type-detect": "^4.0.0" + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" } }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "optional": true + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, + "optional": true, + "peer": true }, - "defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "ansi-colors": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", + "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==", "dev": true }, - "deferred-leveldown": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", - "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "requires": { - "abstract-leveldown": "~2.6.0" + "type-fest": "^0.21.3" } }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "object-keys": "^1.0.12" + "color-convert": "^1.9.0" } }, - "delay": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", - "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", + "antlr4ts": { + "version": "0.5.0-alpha.4", + "resolved": "https://registry.npmjs.org/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz", + "integrity": "sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==", "dev": true }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true, - "optional": true + "peer": true }, - "delimit-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", - "integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs=", + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, - "optional": true + "peer": true, + "requires": { + "sprintf-js": "~1.0.2" + } }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true + "array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, + "peer": true }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", "dev": true, "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" } }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", "dev": true }, - "detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", - "dev": true + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "peer": true }, - "detect-libc": { + "array-uniq": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", "dev": true, - "optional": true + "peer": true }, - "detect-port": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", - "integrity": "sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ==", + "array.prototype.findlast": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlast/-/array.prototype.findlast-1.2.3.tgz", + "integrity": "sha512-kcBubumjciBg4JKp5KTKtI7ec7tRefPk88yjkWJwaVKYd9QfTaxcsOxoMNKd7iBr447zCfDV0z1kOF47umv42g==", "dev": true, "requires": { - "address": "^1.0.1", - "debug": "^2.6.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" } }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "array.prototype.reduce": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz", + "integrity": "sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==", "dev": true, + "peer": true, "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.7" } }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "arraybuffer.prototype.slice": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", + "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", "dev": true, "requires": { - "path-type": "^4.0.0" - }, - "dependencies": { - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - } + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" } }, - "dns-over-http-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-1.2.3.tgz", - "integrity": "sha512-miDiVSI6KSNbi4SVifzO/reD8rMnxgrlnkrlkugOLQpWQTe2qMdHsZp5DmfKjxNE+/T3VAAYLQUZMv9SMr6+AA==", + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true, + "peer": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "dev": true, - "optional": true, "requires": { - "debug": "^4.3.1", - "native-fetch": "^3.0.0", - "receptacle": "^1.3.2" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true, - "optional": true - } + "safer-buffer": "~2.1.0" } }, - "dom-serializer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", - "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", "dev": true, "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" } }, - "dom-walk": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", - "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", "dev": true }, - "domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, - "domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, - "requires": { - "domelementtype": "^2.2.0" - } + "peer": true }, - "domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" + "lodash": "^4.17.14" } }, - "dot-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz", - "integrity": "sha1-NNzzf1Co6TwrO8qLt/uRVcfaO+4=", + "async-eventemitter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", + "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", "dev": true, "requires": { - "no-case": "^2.2.0" + "async": "^2.4.0" } }, - "dot-prop": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", - "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", - "dev": true, - "optional": true, - "requires": { - "is-obj": "^2.0.0" - } + "async-limiter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", + "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, - "double-ended-queue": { - "version": "2.1.0-0", - "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", - "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=", + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", "dev": true, - "optional": true + "peer": true }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", "dev": true }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true }, - "ecurve": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/ecurve/-/ecurve-1.0.6.tgz", - "integrity": "sha512-/BzEjNfiSuB7jIWKcS/z8FK9jNjmEWvUV2YZ4RLSmcDtP7Lq0m6FvDuSnJpBlDpGRpfRQeTLGLBI8H+kEv0r+w==", + "axios": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dev": true, - "optional": true, "requires": { - "bigi": "^1.1.0", - "safe-buffer": "^5.0.1" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + }, + "dependencies": { + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } } }, - "ed2curve": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/ed2curve/-/ed2curve-0.3.0.tgz", - "integrity": "sha512-8w2fmmq3hv9rCrcI7g9hms2pMunQr1JINfcjwR9tAyZqhtyaMN991lF/ZfHfr5tzZQ8c7y7aBgZbjfbd0fjFwQ==", + "axios-debug-log": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/axios-debug-log/-/axios-debug-log-1.0.0.tgz", + "integrity": "sha512-ZjMaEBEij9w+Vbk2Uc3XflchTT7j9rZdYD/snN+XQ5FRDq1QjZNhh0Izb3KSyarU5vTkiCvJyg1xDiQBHZZB9w==", "dev": true, - "optional": true, "requires": { - "tweetnacl": "1.x.x" + "@types/debug": "^4.0.0", + "debug": "^4.0.0" }, "dependencies": { - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "optional": true + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "electron-fetch": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/electron-fetch/-/electron-fetch-1.7.4.tgz", - "integrity": "sha512-+fBLXEy4CJWQ5bz8dyaeSG1hD6JJ15kBZyj3eh24pIVrd3hLM47H/umffrdQfS6GZ0falF0g9JT9f3Rs6AVUhw==", + "base-x": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.8.tgz", + "integrity": "sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA==", "dev": true, - "optional": true, "requires": { - "encoding": "^0.1.13" + "safe-buffer": "^5.0.1" } }, - "electron-to-chromium": { - "version": "1.4.118", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.118.tgz", - "integrity": "sha512-maZIKjnYDvF7Fs35nvVcyr44UcKNwybr93Oba2n3HkKDFAtk0svERkLN/HyczJDS3Fo4wU9th9fUQd09ZLtj1w==", + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "dev": true }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "dev": true, "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" + "tweetnacl": "^0.14.3" } }, - "emittery": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.4.1.tgz", - "integrity": "sha512-r4eRSeStEGf6M5SKdrQhhLK5bOwOBxQhIE3YSTnZE3GpKiLfnnhE+tPtrJE79+eDJgm39BM6LSoI8SCx4HbwlQ==", - "dev": true, - "optional": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "bech32": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", + "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==", "dev": true }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "bent": { + "version": "7.3.12", + "resolved": "https://registry.npmjs.org/bent/-/bent-7.3.12.tgz", + "integrity": "sha512-T3yrKnVGB63zRuoco/7Ybl7BwwGZR0lceoVG5XmQyMIH9s19SV5m+a8qam4if0zQuAmOQTyPTPmsQBdAorGK3w==", "dev": true, - "optional": true, "requires": { - "iconv-lite": "^0.6.2" + "bytesish": "^0.4.1", + "caseless": "~0.12.0", + "is-stream": "^2.0.0" }, "dependencies": { - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true } } }, - "encoding-down": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz", - "integrity": "sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==", + "big-integer": { + "version": "1.6.36", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.36.tgz", + "integrity": "sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==", + "dev": true + }, + "big.js": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-6.1.1.tgz", + "integrity": "sha512-1vObw81a8ylZO5ePrtMay0n018TcftpTA5HFKDaSuiUDBo8biRBtjIobw60OpwuvrGk+FsxKamqN4cnmj/eXdg==", + "dev": true + }, + "bigint-crypto-utils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/bigint-crypto-utils/-/bigint-crypto-utils-3.2.2.tgz", + "integrity": "sha512-U1RbE3aX9ayCUVcIPHuPDPKcK3SFOXf93J1UK/iHlJuQB7bhagPIX06/CLpLEsDThJ7KA4Dhrnzynl+d2weTiw==", + "dev": true + }, + "bignumber.js": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz", + "integrity": "sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ==", + "dev": true + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", "dev": true, - "optional": true, "requires": { - "abstract-leveldown": "^6.2.1", - "inherits": "^2.0.3", - "level-codec": "^9.0.0", - "level-errors": "^2.0.0" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" }, "dependencies": { - "abstract-leveldown": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz", - "integrity": "sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, "buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, - "optional": true, "requires": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } - }, - "level-codec": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", - "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.6.0" - } - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "dev": true, - "optional": true - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, - "optional": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "dev": true, - "optional": true, - "requires": { - "xtend": "^4.0.2" - } } } }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "blakejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.1.tgz", + "integrity": "sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg==", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", "dev": true, "requires": { - "once": "^1.4.0" + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" } }, - "end-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/end-stream/-/end-stream-0.1.0.tgz", - "integrity": "sha1-MgA/P0OKKwFDFoE3+PpumGbIHtU=", + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "optional": true, "requires": { - "write-stream": "~0.4.3" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "requires": { + "fill-range": "^7.1.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", "dev": true }, - "env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "browser-level": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-1.0.1.tgz", + "integrity": "sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ==", "dev": true, - "optional": true + "requires": { + "abstract-level": "^1.0.2", + "catering": "^2.1.1", + "module-error": "^1.0.2", + "run-parallel-limit": "^1.1.0" + } }, - "err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, - "optional": true + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } }, - "errno": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "dev": true, "requires": { - "prr": "~1.0.1" + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" } }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, - "es-abstract": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", - "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "is-callable": "^1.2.3", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.3", - "is-string": "^1.0.6", - "object-inspect": "^1.10.3", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + } } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + } } }, - "es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "bs58": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz", + "integrity": "sha1-vhYedsNU9veIrkBx9j806MTwpCo=", "dev": true, "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" + "base-x": "^3.0.2" } }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "bs58check": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz", + "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==", "dev": true, "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" + "bs58": "^4.0.0", + "create-hash": "^1.1.0", + "safe-buffer": "^5.1.2" } }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", "dev": true, "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "buffer-to-arraybuffer": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz", + "integrity": "sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=", "dev": true }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "bufferutil": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.3.tgz", + "integrity": "sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw==", "dev": true, "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - }, - "dependencies": { - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - } + "node-gyp-build": "^4.2.0" } }, - "esdoc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/esdoc/-/esdoc-1.1.0.tgz", - "integrity": "sha512-vsUcp52XJkOWg9m1vDYplGZN2iDzvmjDL5M/Mp8qkoDG3p2s0yIQCIjKR5wfPBaM3eV14a6zhQNYiNTCVzPnxA==", + "busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dev": true, + "requires": { + "streamsearch": "^1.1.0" + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", + "dev": true + }, + "bytesish": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/bytesish/-/bytesish-0.4.4.tgz", + "integrity": "sha512-i4uu6M4zuMUiyfZN4RU2+i9+peJh//pXhd9x1oSe1LBkZ3LEbCoygu8W0bXTukU1Jme2txKuotpCZRaC3FLxcQ==", + "dev": true + }, + "cacheable-lookup": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz", + "integrity": "sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==", + "dev": true + }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", "dev": true, "requires": { - "babel-generator": "6.26.1", - "babel-traverse": "6.26.0", - "babylon": "6.18.0", - "cheerio": "1.0.0-rc.2", - "color-logger": "0.0.6", - "escape-html": "1.0.3", - "fs-extra": "5.0.0", - "ice-cap": "0.0.4", - "marked": "0.3.19", - "minimist": "1.2.0", - "taffydb": "2.7.3" + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" }, "dependencies": { - "cheerio": { - "version": "1.0.0-rc.2", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz", - "integrity": "sha1-S59TqBsn5NXawxwP/Qz6A8xoMNs=", - "dev": true, - "requires": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.0", - "entities": "~1.1.1", - "htmlparser2": "^3.9.1", - "lodash": "^4.15.0", - "parse5": "^3.0.1" - } - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", - "dev": true, - "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" - } - }, - "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", - "dev": true - }, - "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", - "dev": true, - "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" - } - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "domhandler": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", - "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, - "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "htmlparser2": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", - "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", - "dev": true, - "requires": { - "domelementtype": "^1.3.1", - "domhandler": "^2.3.0", - "domutils": "^1.5.1", - "entities": "^1.1.1", - "inherits": "^2.0.1", - "readable-stream": "^3.1.1" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", - "dev": true, - "requires": { - "boolbase": "~1.0.0" - } - }, - "parse5": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz", - "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==", + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "requires": { - "@types/node": "*" + "pump": "^3.0.0" } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true } } }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", "dev": true }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "case": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/case/-/case-1.6.3.tgz", + "integrity": "sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==", "dev": true }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "catering": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", + "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", "dev": true }, - "eth-block-tracker": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-4.4.3.tgz", - "integrity": "sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw==", + "cbor": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-5.2.0.tgz", + "integrity": "sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==", "dev": true, "requires": { - "@babel/plugin-transform-runtime": "^7.5.5", - "@babel/runtime": "^7.5.5", - "eth-query": "^2.1.0", - "json-rpc-random-id": "^1.0.1", - "pify": "^3.0.0", - "safe-event-emitter": "^1.0.1" + "bignumber.js": "^9.0.1", + "nofilter": "^1.0.4" }, "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "bignumber.js": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", + "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", "dev": true } } }, - "eth-ens-namehash": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", - "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", + "chai": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", + "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", "dev": true, "requires": { - "idna-uts46-hx": "^2.3.1", - "js-sha3": "^0.5.7" + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" } }, - "eth-json-rpc-filters": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-4.2.2.tgz", - "integrity": "sha512-DGtqpLU7bBg63wPMWg1sCpkKCf57dJ+hj/k3zF26anXMzkmtSBDExL8IhUu7LUd34f0Zsce3PYNO2vV2GaTzaw==", + "chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", "dev": true, + "peer": true, "requires": { - "@metamask/safe-event-emitter": "^2.0.0", - "async-mutex": "^0.2.6", - "eth-json-rpc-middleware": "^6.0.0", - "eth-query": "^2.1.2", - "json-rpc-engine": "^6.1.0", - "pify": "^5.0.0" - }, - "dependencies": { - "pify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", - "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", - "dev": true - } + "check-error": "^1.0.2" } }, - "eth-json-rpc-infura": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eth-json-rpc-infura/-/eth-json-rpc-infura-5.1.0.tgz", - "integrity": "sha512-THzLye3PHUSGn1EXMhg6WTLW9uim7LQZKeKaeYsS9+wOBcamRiCQVGHa6D2/4P0oS0vSaxsBnU/J6qvn0MPdow==", + "chai-bn": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/chai-bn/-/chai-bn-0.2.2.tgz", + "integrity": "sha512-MzjelH0p8vWn65QKmEq/DLBG1Hle4WeyqT79ANhXZhn/UxRWO0OogkAxi5oGGtfzwU9bZR8mvbvYdoqNVWQwFg==", + "dev": true, + "requires": {} + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "requires": { - "eth-json-rpc-middleware": "^6.0.0", - "eth-rpc-errors": "^3.0.0", - "json-rpc-engine": "^5.3.0", - "node-fetch": "^2.6.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "dependencies": { - "json-rpc-engine": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.4.0.tgz", - "integrity": "sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g==", + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "requires": { - "eth-rpc-errors": "^3.0.0", - "safe-event-emitter": "^1.0.1" + "has-flag": "^3.0.0" } } } }, - "eth-json-rpc-middleware": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-6.0.0.tgz", - "integrity": "sha512-qqBfLU2Uq1Ou15Wox1s+NX05S9OcAEL4JZ04VZox2NS0U+RtCMjSxzXhLFWekdShUPZ+P8ax3zCO2xcPrp6XJQ==", + "change-case": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.0.2.tgz", + "integrity": "sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA==", + "dev": true, + "requires": { + "camel-case": "^3.0.0", + "constant-case": "^2.0.0", + "dot-case": "^2.1.0", + "header-case": "^1.0.0", + "is-lower-case": "^1.1.0", + "is-upper-case": "^1.1.0", + "lower-case": "^1.1.1", + "lower-case-first": "^1.0.0", + "no-case": "^2.3.2", + "param-case": "^2.1.0", + "pascal-case": "^2.0.0", + "path-case": "^2.1.0", + "sentence-case": "^2.1.0", + "snake-case": "^2.1.0", + "swap-case": "^1.1.0", + "title-case": "^2.1.0", + "upper-case": "^1.1.1", + "upper-case-first": "^1.1.0" + } + }, + "charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", + "dev": true, + "peer": true + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "cheerio": { + "version": "1.0.0-rc.12", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", + "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "dev": true, + "requires": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "htmlparser2": "^8.0.1", + "parse5": "^7.0.0", + "parse5-htmlparser2-tree-adapter": "^7.0.0" + } + }, + "cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + } + }, + "chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "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==", + "dev": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "cids": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz", + "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==", "dev": true, "requires": { - "btoa": "^1.2.1", - "clone": "^2.1.1", - "eth-query": "^2.1.2", - "eth-rpc-errors": "^3.0.0", - "eth-sig-util": "^1.4.2", - "ethereumjs-util": "^5.1.2", - "json-rpc-engine": "^5.3.0", - "json-stable-stringify": "^1.0.1", - "node-fetch": "^2.6.1", - "pify": "^3.0.0", - "safe-event-emitter": "^1.0.1" + "buffer": "^5.5.0", + "class-is": "^1.1.0", + "multibase": "~0.6.0", + "multicodec": "^1.0.0", + "multihashes": "~0.4.15" }, "dependencies": { - "eth-sig-util": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", - "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", - "dev": true, - "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", - "ethereumjs-util": "^5.1.1" - } - }, - "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0", - "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", - "dev": true, - "requires": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - }, - "dependencies": { - "ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - } - } - }, - "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, - "json-rpc-engine": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.4.0.tgz", - "integrity": "sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g==", + "multicodec": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz", + "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==", "dev": true, "requires": { - "eth-rpc-errors": "^3.0.0", - "safe-event-emitter": "^1.0.1" + "buffer": "^5.6.0", + "varint": "^5.0.0" } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true } } }, - "eth-lib": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", - "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-is": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz", + "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==", + "dev": true + }, + "classic-level": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", + "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", "dev": true, "requires": { - "bn.js": "^4.11.6", - "elliptic": "^6.4.0", - "xhr-request-promise": "^0.1.2" + "abstract-level": "^1.0.2", + "catering": "^2.1.0", + "module-error": "^1.0.1", + "napi-macros": "^2.2.2", + "node-gyp-build": "^4.3.0" } }, - "eth-query": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", - "integrity": "sha1-1nQdkAAQa1FRDHLbktY2VFam2l4=", + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cli-color": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz", + "integrity": "sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ==", "dev": true, "requires": { - "json-rpc-random-id": "^1.0.0", - "xtend": "^4.0.1" + "d": "^1.0.1", + "es5-ext": "^0.10.61", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" } }, - "eth-rpc-errors": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-3.0.0.tgz", - "integrity": "sha512-iPPNHPrLwUlR9xCSYm7HHQjWBasor3+KZfRvwEWxMz3ca0yqnlBeJrnyphkGIXZ4J7AMAaOLmwy4AWhnxOiLxg==", + "cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", "dev": true, "requires": { - "fast-safe-stringify": "^2.0.6" + "restore-cursor": "^5.0.0" } }, - "eth-sig-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.1.tgz", - "integrity": "sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==", + "cli-table3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", + "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", "dev": true, + "peer": true, "requires": { - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^5.1.1", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.0" + "colors": "^1.1.2", + "object-assign": "^4.1.0", + "string-width": "^2.1.1" }, "dependencies": { - "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "peer": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "peer": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, + "peer": true, "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" } }, - "tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "dev": true + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, + "peer": true, + "requires": { + "ansi-regex": "^3.0.0" + } } } }, - "ethereum-bloom-filters": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", - "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", + "cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, "requires": { - "js-sha3": "^0.8.0" + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" }, "dependencies": { - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true + }, + "slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + } + }, + "string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } } } }, - "ethereum-common": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", - "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==", - "dev": true - }, - "ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "dev": true, "requires": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" } }, - "ethereum-protocol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz", - "integrity": "sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg==", - "dev": true - }, - "ethereumjs-abi": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", - "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", "dev": true, "requires": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - }, - "dependencies": { - "ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - } + "mimic-response": "^1.0.0" } }, - "ethereumjs-account": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", - "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { - "ethereumjs-util": "^5.0.0", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - } + "color-name": "1.1.3" } }, - "ethereumjs-block": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", - "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { - "async": "^2.0.1", - "ethereum-common": "0.2.0", - "ethereumjs-tx": "^1.2.2", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - } + "delayed-stream": "~1.0.0" } }, - "ethereumjs-common": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", - "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==", + "command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", "dev": true }, - "ethereumjs-tx": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", - "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "command-line-args": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", + "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", "dev": true, + "peer": true, "requires": { - "ethereum-common": "^0.0.18", - "ethereumjs-util": "^5.0.0" - }, - "dependencies": { - "ethereum-common": { - "version": "0.0.18", - "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", - "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", - "dev": true - }, - "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - } + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" } }, - "ethereumjs-util": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz", - "integrity": "sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw==", + "command-line-usage": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.3.tgz", + "integrity": "sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw==", "dev": true, + "peer": true, "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.4" + "array-back": "^4.0.2", + "chalk": "^2.4.2", + "table-layout": "^1.0.2", + "typical": "^5.2.0" }, "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", + "array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", "dev": true, - "requires": { - "@types/node": "*" - } + "peer": true }, - "bn.js": { + "typical": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true } } }, - "ethereumjs-vm": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", - "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", + "commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true + }, + "compare-versions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.0.tgz", + "integrity": "sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, + "peer": true, "requires": { - "async": "^2.1.2", - "async-eventemitter": "^0.2.2", - "ethereumjs-account": "^2.0.3", - "ethereumjs-block": "~2.2.0", - "ethereumjs-common": "^1.1.0", - "ethereumjs-util": "^6.0.0", - "fake-merkle-patricia-tree": "^1.0.1", - "functional-red-black-tree": "^1.0.1", - "merkle-patricia-tree": "^2.3.2", - "rustbn.js": "~0.2.0", - "safe-buffer": "^5.1.1" + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" }, "dependencies": { - "ethereumjs-block": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", - "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", + "readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, + "peer": true, "requires": { - "async": "^2.0.1", - "ethereumjs-common": "^1.5.0", - "ethereumjs-tx": "^2.1.1", - "ethereumjs-util": "^5.0.0", - "merkle-patricia-tree": "^2.1.2" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - } + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "ethereumjs-tx": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", - "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true, - "requires": { - "ethereumjs-common": "^1.5.0", - "ethereumjs-util": "^6.0.0" - } + "peer": true }, - "ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, + "peer": true, "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" + "safe-buffer": "~5.1.0" } } } }, - "ethereumjs-wallet": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz", - "integrity": "sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA==", + "constant-case": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz", + "integrity": "sha1-QXV2TTidP6nI7NKRhu1gBSQ7akY=", "dev": true, "requires": { - "aes-js": "^3.1.2", - "bs58check": "^2.1.2", - "ethereum-cryptography": "^0.1.3", - "ethereumjs-util": "^7.1.2", - "randombytes": "^2.1.0", - "scrypt-js": "^3.0.1", - "utf8": "^3.0.0", - "uuid": "^8.3.2" + "snake-case": "^2.1.0", + "upper-case": "^1.1.1" + } + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "dev": true, + "requires": { + "safe-buffer": "5.1.2" }, "dependencies": { - "@types/bn.js": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", - "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "aes-js": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", - "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==", - "dev": true - }, - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - }, - "ethereumjs-util": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz", - "integrity": "sha512-p6KmuPCX4mZIqsQzXfmSx9Y0l2hqf+VkAiwSisW3UKUFdk8ZkAt+AYaor83z2nSi6CU2zSsXMlD80hAbNEGM0A==", - "dev": true, - "requires": { - "@types/bn.js": "^5.1.0", - "bn.js": "^5.1.2", - "create-hash": "^1.1.2", - "ethereum-cryptography": "^0.1.3", - "rlp": "^2.2.4" - } - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true } } }, - "ethers": { - "version": "5.6.4", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.6.4.tgz", - "integrity": "sha512-62UIfxAQXdf67TeeOaoOoPctm5hUlYgfd0iW3wxfj7qRYKDcvvy0f+sJ3W2/Pyx77R8dblvejA8jokj+lS+ATQ==", + "content-hash": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/content-hash/-/content-hash-2.5.2.tgz", + "integrity": "sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw==", + "dev": true, + "requires": { + "cids": "^0.7.1", + "multicodec": "^0.5.5", + "multihashes": "^0.4.15" + } + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "dev": true + }, + "convert-svg-core": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/convert-svg-core/-/convert-svg-core-0.6.4.tgz", + "integrity": "sha512-8mS0n7otc1lljTte4z7nDhihEakKCRq4w5ivMnIGeOZuD/OV/eDZNNEgGLV1ET3p+rMbnrZnX4lAcsf14WzD5w==", "dev": true, "requires": { - "@ethersproject/abi": "5.6.1", - "@ethersproject/abstract-provider": "5.6.0", - "@ethersproject/abstract-signer": "5.6.0", - "@ethersproject/address": "5.6.0", - "@ethersproject/base64": "5.6.0", - "@ethersproject/basex": "5.6.0", - "@ethersproject/bignumber": "5.6.0", - "@ethersproject/bytes": "5.6.1", - "@ethersproject/constants": "5.6.0", - "@ethersproject/contracts": "5.6.0", - "@ethersproject/hash": "5.6.0", - "@ethersproject/hdnode": "5.6.0", - "@ethersproject/json-wallets": "5.6.0", - "@ethersproject/keccak256": "5.6.0", - "@ethersproject/logger": "5.6.0", - "@ethersproject/networks": "5.6.2", - "@ethersproject/pbkdf2": "5.6.0", - "@ethersproject/properties": "5.6.0", - "@ethersproject/providers": "5.6.4", - "@ethersproject/random": "5.6.0", - "@ethersproject/rlp": "5.6.0", - "@ethersproject/sha2": "5.6.0", - "@ethersproject/signing-key": "5.6.0", - "@ethersproject/solidity": "5.6.0", - "@ethersproject/strings": "5.6.0", - "@ethersproject/transactions": "5.6.0", - "@ethersproject/units": "5.6.0", - "@ethersproject/wallet": "5.6.0", - "@ethersproject/web": "5.6.0", - "@ethersproject/wordlists": "5.6.0" + "chalk": "^4.1.2", + "cheerio": "^1.0.0-rc.11", + "commander": "^9.2.0", + "file-url": "^3.0.0", + "get-stdin": "^8.0.0", + "glob": "^8.0.1", + "lodash.omit": "^4.5.0", + "lodash.pick": "^4.4.0", + "pollock": "^0.2.0", + "puppeteer": "^13.7.0", + "tmp": "^0.2.1" }, "dependencies": { - "@ethersproject/abstract-provider": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz", - "integrity": "sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/networks": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/transactions": "^5.6.0", - "@ethersproject/web": "^5.6.0" - } - }, - "@ethersproject/abstract-signer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.6.0.tgz", - "integrity": "sha512-WOqnG0NJKtI8n0wWZPReHtaLkDByPL67tn4nBaDAhmVq8sjHTPbCdz4DRhVu/cfTOvfy9w3iq5QZ7BX7zw56BQ==", - "dev": true, - "requires": { - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0" - } - }, - "@ethersproject/address": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.6.0.tgz", - "integrity": "sha512-6nvhYXjbXsHPS+30sHZ+U4VMagFC/9zAk6Gd/h3S21YW4+yfb0WfRtaAIZ4kfM4rrVwqiy284LP0GtL5HXGLxQ==", - "dev": true, - "requires": { - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/rlp": "^5.6.0" - } - }, - "@ethersproject/base64": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.6.0.tgz", - "integrity": "sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0" - } - }, - "@ethersproject/bignumber": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.6.0.tgz", - "integrity": "sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "bn.js": "^4.11.9" - } - }, - "@ethersproject/bytes": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.6.1.tgz", - "integrity": "sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@ethersproject/logger": "^5.6.0" + "color-convert": "^2.0.1" } }, - "@ethersproject/constants": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.6.0.tgz", - "integrity": "sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA==", + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "requires": { - "@ethersproject/bignumber": "^5.6.0" + "balanced-match": "^1.0.0" } }, - "@ethersproject/hash": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.6.0.tgz", - "integrity": "sha512-fFd+k9gtczqlr0/BruWLAu7UAOas1uRRJvOR84uDf4lNZ+bTkGl366qvniUZHKtlqxBRU65MkOobkmvmpHU+jA==", + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "@ethersproject/abstract-signer": "^5.6.0", - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "@ethersproject/keccak256": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.6.0.tgz", - "integrity": "sha512-tk56BJ96mdj/ksi7HWZVWGjCq0WVl/QvfhFQNeL8fxhBlGoP+L80uDCiQcpJPd+2XxkivS3lwRm3E0CXTfol0w==", + "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==", "dev": true, "requires": { - "@ethersproject/bytes": "^5.6.0", - "js-sha3": "0.8.0" + "color-name": "~1.1.4" } }, - "@ethersproject/logger": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.6.0.tgz", - "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==", + "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==", "dev": true }, - "@ethersproject/networks": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.2.tgz", - "integrity": "sha512-9uEzaJY7j5wpYGTojGp8U89mSsgQLc40PCMJLMCnFXTs7nhBveZ0t7dbqWUNrepWTszDbFkYD6WlL8DKx5huHA==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } - }, - "@ethersproject/properties": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.6.0.tgz", - "integrity": "sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg==", - "dev": true, - "requires": { - "@ethersproject/logger": "^5.6.0" - } + "commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true }, - "@ethersproject/rlp": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.6.0.tgz", - "integrity": "sha512-dz9WR1xpcTL+9DtOT/aDO+YyxSSdO8YIS0jyZwHHSlAmnxA6cKU3TrTd4Xc/bHayctxTgGLYNuVVoiXE4tTq1g==", + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" } }, - "@ethersproject/signing-key": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.6.0.tgz", - "integrity": "sha512-S+njkhowmLeUu/r7ir8n78OUKx63kBdMCPssePS89So1TH4hZqnWFsThEd/GiXYp9qMxVrydf7KdM9MTGPFukA==", - "dev": true, - "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "bn.js": "^4.11.9", - "elliptic": "6.5.4", - "hash.js": "1.1.7" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, - "@ethersproject/strings": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.6.0.tgz", - "integrity": "sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg==", + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "requires": { - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/logger": "^5.6.0" + "brace-expansion": "^2.0.1" } }, - "@ethersproject/transactions": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.6.0.tgz", - "integrity": "sha512-4HX+VOhNjXHZyGzER6E/LVI2i6lf9ejYeWD6l4g50AdmimyuStKc39kvKf1bXWQMg7QNVh+uC7dYwtaZ02IXeg==", + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { - "@ethersproject/address": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/keccak256": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/rlp": "^5.6.0", - "@ethersproject/signing-key": "^5.6.0" + "glob": "^7.1.3" + }, + "dependencies": { + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, - "@ethersproject/web": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.6.0.tgz", - "integrity": "sha512-G/XHj0hV1FxI2teHRfCGvfBUHFmU+YOSbCxlAMqJklxSa7QMiHFQfAxvwY2PFqgvdkxEKwRNr/eCjfAPEm2Ctg==", + "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": { - "@ethersproject/base64": "^5.6.0", - "@ethersproject/bytes": "^5.6.0", - "@ethersproject/logger": "^5.6.0", - "@ethersproject/properties": "^5.6.0", - "@ethersproject/strings": "^5.6.0" - } - }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", - "dev": true - } - } - }, - "ethjs-abi": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", - "integrity": "sha1-4KepOn6BFjqUR3utVu3lJKtt5TM=", - "dev": true, - "requires": { - "bn.js": "4.11.6", - "js-sha3": "0.5.5", - "number-to-bn": "1.7.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", - "dev": true - }, - "js-sha3": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", - "integrity": "sha1-uvDA6MVK1ZA0R9+Wreekobynmko=", - "dev": true - } - } - }, - "ethjs-unit": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", - "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", - "dev": true, - "requires": { - "bn.js": "4.11.6", - "number-to-bn": "1.7.0" - }, - "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", - "dev": true + "has-flag": "^4.0.0" + } + }, + "tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "requires": { + "rimraf": "^3.0.0" + } } } }, - "ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "convert-svg-to-png": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/convert-svg-to-png/-/convert-svg-to-png-0.6.4.tgz", + "integrity": "sha512-zHNTuVedkyuhMl+f+HMm2L7+TKDYCKFAqAmDqUr0dN7/xtgYe76PPAydjlFzeLbzEpGtEfhaA15q+ejpLaVo3g==", "dev": true, "requires": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" + "convert-svg-core": "^0.6.4" } }, - "event-iterator": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/event-iterator/-/event-iterator-1.2.0.tgz", - "integrity": "sha512-Daq7YUl0Mv1i4QEgzGQlz0jrx7hUFNyLGbiF+Ap7NCMCjDLCCnolyj6s0TAc6HmrBziO5rNVHsPwGMp7KdRPvw==", - "dev": true, - "optional": true - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true, - "optional": true - }, - "eventemitter3": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", - "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", "dev": true }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", "dev": true }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==", + "dev": true }, - "exit-on-epipe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", - "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==", + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "express": { - "version": "4.17.1", - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", "dev": true, "requires": { - "accepts": "~1.3.7", - "array-flatten": "1.1.1", - "body-parser": "1.19.0", - "content-disposition": "0.5.3", - "content-type": "~1.0.4", - "cookie": "0.4.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "~1.1.2", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.1.2", - "fresh": "0.5.2", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.5", - "qs": "6.7.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.1.2", - "send": "0.17.1", - "serve-static": "1.14.1", - "setprototypeof": "1.1.1", - "statuses": "~1.5.0", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "object-assign": "^4", + "vary": "^1" } }, - "ext": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", - "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "crc-32": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.0.tgz", + "integrity": "sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA==", "dev": true, "requires": { - "type": "^2.0.0" - }, - "dependencies": { - "type": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", - "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==", - "dev": true - } + "exit-on-epipe": "~1.0.1", + "printj": "~1.1.0" } }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, - "fake-merkle-patricia-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", - "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", "dev": true, "requires": { - "checkpoint-store": "^1.1.0" + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" } }, - "faker": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/faker/-/faker-5.5.3.tgz", - "integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==", - "dev": true - }, - "fast-check": { - "version": "2.24.0", - "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-2.24.0.tgz", - "integrity": "sha512-iNXbN90lbabaCUfnW5jyXYPwMJLFYl09eJDkXA9ZoidFlBK63gNRvcKxv+8D1OJ1kIYjwBef4bO/K3qesUeWLQ==", + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { - "pure-rand": "^5.0.1" + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" } }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-fifo": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.1.0.tgz", - "integrity": "sha512-Kl29QoNbNvn4nhDsLYjyIAaIqaJB6rBx5p3sL9VjaefJ+eMFBWVZiaoguaoZfzEKr5RhAti0UgM8703akGPJ6g==", - "dev": true, - "optional": true - }, - "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", - "dev": true - }, - "fast-sha256": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fast-sha256/-/fast-sha256-1.3.0.tgz", - "integrity": "sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==", - "dev": true, - "optional": true - }, - "fastestsmallesttextencoderdecoder": { - "version": "1.0.22", - "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", - "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==", + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true, - "optional": true + "peer": true }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "cross-fetch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", "dev": true, "requires": { - "reusify": "^1.0.4" + "node-fetch": "2.6.7" } }, - "fetch-cookie": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.10.1.tgz", - "integrity": "sha512-beB+VEd4cNeVG1PY+ee74+PkuCQnik78pgLi5Ah/7qdUfov8IctU0vLUbBT8/10Ma5GMBeI4wtxhGrEfKNYs2g==", + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, - "optional": true, "requires": { - "tough-cookie": "^2.3.3 || ^3.0.1 || ^4.0.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } } }, - "file-uri-to-path": { - "version": "1.0.0", - "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==", - "dev": true, - "optional": true - }, - "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==", + "crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } + "peer": true }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "crypto-addr-codec": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz", + "integrity": "sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg==", "dev": true, "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" + "base-x": "^3.0.8", + "big-integer": "1.6.36", + "blakejs": "^1.1.0", + "bs58": "^4.0.1", + "ripemd160-min": "0.0.6", + "safe-buffer": "^5.2.0", + "sha3": "^2.1.1" } }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "dev": true, "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" } }, - "find-versions": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/find-versions/-/find-versions-4.0.0.tgz", - "integrity": "sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ==", + "css-select": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", + "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", "dev": true, "requires": { - "semver-regex": "^3.1.2" + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" } }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", - "dev": true - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "css-what": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", + "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", "dev": true }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", "dev": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "es5-ext": "^0.10.50", + "type": "^1.0.1" } }, - "forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" + "assert-plus": "^1.0.0" } }, - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "death": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", + "integrity": "sha1-AaqcQB7dknUFFEcLgmY5DGbGcxg=", + "dev": true, + "peer": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { - "minipass": "^2.6.0" + "ms": "2.0.0" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } }, - "ganache": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/ganache/-/ganache-7.0.4.tgz", - "integrity": "sha512-/ur2WNQoCwmobZb/TcpMgJlJy4TLtCUMtnCIldChAn5LleeAETaHB80knGqOgGc3ZS+ksokSqmQHuHqMAmlRkg==", + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", "dev": true, "requires": { - "@trufflesuite/bigint-buffer": "1.1.9", - "bufferutil": "4.0.5", - "emittery": "0.10.0", - "keccak": "3.0.1", - "leveldown": "6.1.0", - "secp256k1": "4.0.2", - "utf-8-validate": "5.0.7" - }, - "dependencies": { - "@trufflesuite/bigint-buffer": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@trufflesuite/bigint-buffer/-/bigint-buffer-1.1.9.tgz", - "integrity": "sha512-bdM5cEGCOhDSwminryHJbRmXc1x7dPKg6Pqns3qyTwFlxsqUgxE29lsERS3PlIW1HTjoIGMUqsk1zQQwST1Yxw==", - "dev": true, - "requires": { - "node-gyp-build": "4.3.0" - } - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "bufferutil": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.5.tgz", - "integrity": "sha512-HTm14iMQKK2FjFLRTM5lAVcyaUzOnqbPtesFIvREgXpJHdQm8bWS+GkQgIkfaBYRHuCnea7w8UVNfwiAQhlr9A==", - "dev": true, - "optional": true, - "requires": { - "node-gyp-build": "^4.3.0" - } - }, - "catering": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.0.tgz", - "integrity": "sha512-M5imwzQn6y+ODBfgi+cfgZv2hIUI6oYU/0f35Mdb1ujGeqeoI5tOnl9Q13DTH7LW+7er+NYq8stNOKZD/Z3U/A==", - "dev": true, - "requires": { - "queue-tick": "^1.0.0" - } - }, - "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "emittery": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz", - "integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==", - "dev": true - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true - }, - "keccak": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", - "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", - "dev": true, - "requires": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "leveldown": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.0.tgz", - "integrity": "sha512-8C7oJDT44JXxh04aSSsfcMI8YiaGRhOFI9/pMEL7nWJLVsWajDPTRxsSHTM2WcTVY5nXM+SuRHzPPi0GbnDX+w==", - "dev": true, - "requires": { - "abstract-leveldown": "^7.2.0", - "napi-macros": "~2.0.0", - "node-gyp-build": "^4.3.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz", - "integrity": "sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ==", - "dev": true, - "requires": { - "buffer": "^6.0.3", - "catering": "^2.0.0", - "is-buffer": "^2.0.5", - "level-concat-iterator": "^3.0.0", - "level-supports": "^2.0.1", - "queue-microtask": "^1.2.3" - } - }, - "level-concat-iterator": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz", - "integrity": "sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ==", - "dev": true, - "requires": { - "catering": "^2.1.0" - } - }, - "level-supports": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-2.1.0.tgz", - "integrity": "sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA==", - "dev": true - } - } - }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "napi-macros": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", - "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==", - "dev": true - }, - "node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", - "dev": true - }, - "node-gyp-build": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.3.0.tgz", - "integrity": "sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "queue-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.0.tgz", - "integrity": "sha512-ULWhjjE8BmiICGn3G8+1L9wFpERNxkf8ysxkAer4+TFdRefDaXOCV5m92aMB9FtBVmn/8sETXLXY6BfW7hyaWQ==", - "dev": true - }, - "secp256k1": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.2.tgz", - "integrity": "sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg==", - "dev": true, - "requires": { - "elliptic": "^6.5.2", - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "utf-8-validate": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.7.tgz", - "integrity": "sha512-vLt1O5Pp+flcArHGIyKEQq883nBt8nN8tVBcoL0qUXj2XT1n7p70yGIq2VK98I5FdZ1YHc0wk/koOnHjnXWk1Q==", - "dev": true, - "optional": true, - "requires": { - "node-gyp-build": "^4.3.0" - } - } + "type-detect": "^4.0.0" } }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "peer": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true, + "peer": true + }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, + "define-data-property": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", + "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", "dev": true, - "optional": true, "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" } }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "dev": true }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" } }, - "get-iterator": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-iterator/-/get-iterator-1.0.2.tgz", - "integrity": "sha512-v+dm9bNVfOYsY1OrhaCrmyOcYoSeVvbt+hHZ0Au+T+p1y+0Uyj9aMaGIeUTT6xdpRbWzDeYKvfOslPhggQMcsg==", + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=", + "dev": true + }, + "detect-indent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", + "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50=", + "dev": true + }, + "detect-port": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz", + "integrity": "sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ==", "dev": true, - "optional": true + "peer": true, + "requires": { + "address": "^1.0.1", + "debug": "^2.6.0" + } }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "devtools-protocol": { + "version": "0.0.981744", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", + "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==", "dev": true }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true + }, + "diff-match-patch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.5.tgz", + "integrity": "sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { - "assert-plus": "^1.0.0" + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" } }, - "ghost-testrpc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", - "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", + "difflib": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", + "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", "dev": true, + "peer": true, "requires": { - "chalk": "^2.4.2", - "node-emoji": "^1.10.0" + "heap": ">= 0.2.0" } }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, + "peer": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "path-type": "^4.0.0" + }, + "dependencies": { + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "peer": true + } } }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", "dev": true, "requires": { - "is-glob": "^4.0.1" + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" } }, - "global": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", - "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "dom-walk": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.2.tgz", + "integrity": "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w==", + "dev": true + }, + "domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true + }, + "domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", "dev": true, "requires": { - "min-document": "^2.19.0", - "process": "^0.11.10" + "domelementtype": "^2.3.0" } }, - "global-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", - "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "domutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "dev": true, "requires": { - "global-prefix": "^3.0.0" + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" } }, - "global-prefix": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", - "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dot-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz", + "integrity": "sha1-NNzzf1Co6TwrO8qLt/uRVcfaO+4=", "dev": true, "requires": { - "ini": "^1.3.5", - "kind-of": "^6.0.2", - "which": "^1.3.1" + "no-case": "^2.2.0" } }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", "dev": true }, - "globalthis": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.2.tgz", - "integrity": "sha512-ZQnSFO1la8P7auIOQECnm0sSuoMeaSq0EEdXMBFF2QJO4uNcwbyhSgG3MruWNbFTqCLmxVwGOl7LZ9kASvHdeQ==", + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "dev": true, - "optional": true, "requires": { - "define-properties": "^1.1.3" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, - "globby": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", - "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "dev": true + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "dev": true, "requires": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" } }, - "google-protobuf": { - "version": "3.20.1", - "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.20.1.tgz", - "integrity": "sha512-XMf1+O32FjYIV3CYu6Tuh5PNbfNEU5Xu22X+Xkdb/DUexFlCzhvv7d5Iirm4AOwn8lv4al1YvIhzGrg2j9Zfzw==", - "dev": true, - "optional": true + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, - "got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "encode-utf8": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/encode-utf8/-/encode-utf8-1.0.3.tgz", + "integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==", + "dev": true + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "dev": true + }, + "encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "dev": true, - "requires": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" + "optional": true, + "peer": true, + "requires": { + "iconv-lite": "^0.6.2" }, "dependencies": { - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, + "optional": true, + "peer": true, "requires": { - "pump": "^3.0.0" + "safer-buffer": ">= 2.1.2 < 3.0.0" } } } }, - "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", - "dev": true - }, - "graphql": { - "version": "15.8.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.8.0.tgz", - "integrity": "sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==", - "dev": true, - "optional": true - }, - "graphql-executor": { - "version": "0.0.23", - "resolved": "https://registry.npmjs.org/graphql-executor/-/graphql-executor-0.0.23.tgz", - "integrity": "sha512-3Ivlyfjaw3BWmGtUSnMpP/a4dcXCp0mJtj0PiPG14OKUizaMKlSEX+LX2Qed0LrxwniIwvU6B4w/koVjEPyWJg==", - "dev": true, - "optional": true - }, - "graphql-tag": { - "version": "2.12.6", - "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", - "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, - "optional": true, "requires": { - "tslib": "^2.1.0" + "once": "^1.4.0" } }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" + "ansi-colors": "^4.1.1" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true } } }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", + "dev": true + }, + "environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" + "is-arrayish": "^0.2.1" } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "es-abstract": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", + "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", "dev": true, "requires": { - "function-bind": "^1.1.1" - } + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.2", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.1", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.12", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "safe-array-concat": "^1.0.1", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.8", + "string.prototype.trimend": "^1.0.7", + "string.prototype.trimstart": "^1.0.7", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.11" + } + }, + "es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true, + "peer": true }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" } }, - "has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true - }, - "has-flag": { + "es-shim-unscopables": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "has-symbol-support-x": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", - "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", - "dev": true - }, - "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true - }, - "has-to-string-tag-x": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", - "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", "dev": true, "requires": { - "has-symbol-support-x": "^1.4.1" + "has": "^1.0.3" } }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, - "optional": true + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } }, - "hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", "dev": true, "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" } }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" } }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", "dev": true }, - "header-case": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz", - "integrity": "sha1-lTWXMZfBRLCWE81l0xfvGZY70C0=", + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", "dev": true, "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.3" + "d": "^1.0.1", + "ext": "^1.1.2" } }, - "highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "dev": true - }, - "highlightjs-solidity": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.5.tgz", - "integrity": "sha512-ReXxQSGQkODMUgHcWzVSnfDCDrL2HshOYgw3OlIYmfHeRzUPkfJTUIp95pK4CmbiNG2eMTOmNLpfCz9Zq7Cwmg==", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", "dev": true, "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" } }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, - "htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", - "dev": true, - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" - } + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "dev": true }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", "dev": true, + "peer": true, "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.2.0" }, "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true, + "peer": true + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "amdefine": ">=0.0.4" + } } } }, - "http-https": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", - "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=", + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true, + "peer": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "peer": true + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", "dev": true }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "eth-ens-namehash": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", + "integrity": "sha1-IprEbsqG1S4MmR58sq74P/D2i88=", "dev": true, "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "idna-uts46-hx": "^2.3.1", + "js-sha3": "^0.5.7" } }, - "husky": { - "version": "4.3.8", - "resolved": "https://registry.npmjs.org/husky/-/husky-4.3.8.tgz", - "integrity": "sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow==", + "eth-gas-reporter": { + "version": "0.2.25", + "resolved": "https://registry.npmjs.org/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz", + "integrity": "sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ==", "dev": true, + "peer": true, "requires": { - "chalk": "^4.0.0", - "ci-info": "^2.0.0", - "compare-versions": "^3.6.0", - "cosmiconfig": "^7.0.0", - "find-versions": "^4.0.0", - "opencollective-postinstall": "^2.0.2", - "pkg-dir": "^5.0.0", - "please-upgrade-node": "^3.2.0", - "slash": "^3.0.0", - "which-pm-runs": "^1.0.0" + "@ethersproject/abi": "^5.0.0-beta.146", + "@solidity-parser/parser": "^0.14.0", + "cli-table3": "^0.5.0", + "colors": "1.4.0", + "ethereum-cryptography": "^1.0.3", + "ethers": "^4.0.40", + "fs-readdir-recursive": "^1.1.0", + "lodash": "^4.17.14", + "markdown-table": "^1.1.3", + "mocha": "^7.1.1", + "req-cwd": "^2.0.0", + "request": "^2.88.0", + "request-promise-native": "^1.0.5", + "sha1": "^1.1.1", + "sync-request": "^6.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==", + "@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", "dev": true, - "requires": { - "color-convert": "^2.0.1" - } + "peer": true }, - "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", "dev": true, + "peer": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" } }, - "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==", + "@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", "dev": true, + "peer": true, "requires": { - "color-name": "~1.1.4" + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" } }, - "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==", - "dev": true + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true, + "peer": 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==", - "dev": true + "ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "peer": 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==", + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "ice-cap": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/ice-cap/-/ice-cap-0.0.4.tgz", - "integrity": "sha1-im0xq0ysjUtW3k+pRt8zUlYbbhg=", - "dev": true, - "requires": { - "cheerio": "0.20.0", - "color-logger": "0.0.3" - }, - "dependencies": { - "cheerio": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-0.20.0.tgz", - "integrity": "sha1-XHEPK6uVZTJyhCugHG6mGzVF7DU=", + "peer": true + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", "dev": true, + "peer": true, "requires": { - "css-select": "~1.2.0", - "dom-serializer": "~0.1.0", - "entities": "~1.1.1", - "htmlparser2": "~3.8.1", - "jsdom": "^7.0.2", - "lodash": "^4.1.0" + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" } }, - "color-logger": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/color-logger/-/color-logger-0.0.3.tgz", - "integrity": "sha1-2bIt0dlz4Waxi/MT+fSBu6TfIBg=", - "dev": true - }, - "css-select": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", - "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=", + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, + "peer": true, "requires": { - "boolbase": "~1.0.0", - "css-what": "2.1", - "domutils": "1.5.1", - "nth-check": "~1.0.1" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "peer": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } } }, - "css-what": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz", - "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==", - "dev": true - }, - "dom-serializer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", - "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==", + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", "dev": true, + "peer": true, "requires": { - "domelementtype": "^1.3.0", - "entities": "^1.1.1" + "ms": "^2.1.1" } }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "peer": true }, - "domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true, - "requires": { - "domelementtype": "1" - } + "peer": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "peer": true }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", "dev": true, + "peer": true, "requires": { - "dom-serializer": "0", - "domelementtype": "1" + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" } }, - "entities": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", - "dev": true - }, - "htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "ethers": { + "version": "4.0.49", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.49.tgz", + "integrity": "sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg==", "dev": true, + "peer": true, "requires": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - }, - "dependencies": { - "entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", - "dev": true - } + "aes-js": "3.0.0", + "bn.js": "^4.11.9", + "elliptic": "6.5.4", + "hash.js": "1.1.3", + "js-sha3": "0.5.7", + "scrypt-js": "2.0.4", + "setimmediate": "1.0.4", + "uuid": "2.0.1", + "xmlhttprequest": "1.8.0" } }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, + "peer": true, "requires": { - "boolbase": "~1.0.0" + "locate-path": "^3.0.0" } }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", "dev": true, + "peer": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "is-buffer": "~2.0.3" } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "idna-uts46-hx": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", - "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", - "dev": true, - "requires": { - "punycode": "2.1.0" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true - }, - "ignore-walk": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz", - "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==", - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "immediate": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", - "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "ip-regex": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", - "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", - "dev": true, - "optional": true - }, - "ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true - }, - "ipfs-core-types": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/ipfs-core-types/-/ipfs-core-types-0.2.1.tgz", - "integrity": "sha512-q93+93qSybku6woZaajE9mCrHeVoMzNtZ7S5m/zx0+xHRhnoLlg8QNnGGsb5/+uFQt/RiBArsIw/Q61K9Jwkzw==", - "dev": true, - "optional": true, - "requires": { - "cids": "^1.1.5", - "multiaddr": "^8.0.0", - "peer-id": "^0.14.1" - }, - "dependencies": { - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", "dev": true, "optional": true, + "peer": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "peer": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "peer": true, "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, - "optional": true, + "peer": true + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "dev": true, + "peer": true, "requires": { - "@multiformats/base-x": "^4.0.1" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.0" } }, - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", "dev": true, - "optional": true, + "peer": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "peer": true, "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, - "optional": true, + "peer": true, "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - } + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" } }, - "uint8arrays": { + "log-symbols": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", "dev": true, - "optional": true, + "peer": true, "requires": { - "multiformats": "^9.4.2" + "chalk": "^2.4.2" } }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "mocha": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz", + "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==", + "dev": true, + "peer": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true, - "optional": true - } - } - }, - "ipfs-core-utils": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/ipfs-core-utils/-/ipfs-core-utils-0.6.1.tgz", - "integrity": "sha512-UFIklwE3CFcsNIhYFDuz0qB7E2QtdFauRfc76kskgiqhGWcjqqiDeND5zBCrAy0u8UMaDqAbFl02f/mIq1yKXw==", - "dev": true, - "optional": true, - "requires": { - "any-signal": "^2.0.0", - "blob-to-it": "^1.0.1", - "browser-readablestream-to-it": "^1.0.1", - "cids": "^1.1.5", - "err-code": "^2.0.3", - "ipfs-core-types": "^0.2.1", - "ipfs-utils": "^5.0.0", - "it-all": "^1.0.4", - "it-map": "^1.0.4", - "it-peekable": "^1.0.1", - "multiaddr": "^8.0.0", - "multiaddr-to-uri": "^6.0.0", - "parse-duration": "^0.4.4", - "timeout-abort-controller": "^1.1.1", - "uint8arrays": "^1.1.0" - }, - "dependencies": { - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "peer": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "dev": true, - "optional": true, + "peer": true, "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - } + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" } }, - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, - "optional": true, + "peer": true, "requires": { - "@multiformats/base-x": "^4.0.1" + "p-limit": "^2.0.0" } }, - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "dev": true, - "optional": true, - "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - } - } + "peer": true }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", "dev": true, - "optional": true, + "peer": true, "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - } + "picomatch": "^2.0.4" } }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true, - "optional": true - } - } - }, - "ipfs-http-client": { - "version": "48.2.2", - "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-48.2.2.tgz", - "integrity": "sha512-f3ppfWe913SJLvunm0UgqdA1dxVZSGQJPaEVJtqgjxPa5x0fPDiBDdo60g2MgkW1W6bhF9RGlxvHHIE9sv/tdg==", - "dev": true, - "optional": true, - "requires": { - "any-signal": "^2.0.0", - "bignumber.js": "^9.0.0", - "cids": "^1.1.5", - "debug": "^4.1.1", - "form-data": "^3.0.0", - "ipfs-core-types": "^0.2.1", - "ipfs-core-utils": "^0.6.1", - "ipfs-utils": "^5.0.0", - "ipld-block": "^0.11.0", - "ipld-dag-cbor": "^0.17.0", - "ipld-dag-pb": "^0.20.0", - "ipld-raw": "^6.0.0", - "it-last": "^1.0.4", - "it-map": "^1.0.4", - "it-tar": "^1.2.2", - "it-to-stream": "^0.1.2", - "merge-options": "^2.0.0", - "multiaddr": "^8.0.0", - "multibase": "^3.0.0", - "multicodec": "^2.0.1", - "multihashes": "^3.0.1", - "nanoid": "^3.1.12", - "native-abort-controller": "~0.0.3", - "parse-duration": "^0.4.4", - "stream-to-it": "^0.2.2", - "uint8arrays": "^1.1.0" - }, - "dependencies": { - "bignumber.js": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", - "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", + "peer": true + }, + "scrypt-js": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.4.tgz", + "integrity": "sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw==", "dev": true, - "optional": true + "peer": true }, - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog==", "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - }, - "dependencies": { - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1" - } - }, - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", - "dev": true, - "optional": true, - "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - } - }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - } - } - }, - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - } - } + "peer": true }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, - "optional": true, + "peer": true, "requires": { - "ms": "2.1.2" + "ansi-regex": "^4.1.0" } }, - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", "dev": true, - "optional": true, + "peer": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "has-flag": "^3.0.0" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", "dev": true, - "optional": true + "peer": true }, - "multibase": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-3.1.2.tgz", - "integrity": "sha512-bpklWHs70LO3smJUHOjcnzGceJJvn9ui0Vau6Za0B/GBepaXswmW8Ufea0uD9pROf/qCQ4N4lZ3sf3U+SNf0tw==", + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, - "optional": true, + "peer": true, "requires": { - "@multiformats/base-x": "^4.0.1", - "web-encoding": "^1.0.6" + "string-width": "^1.0.2 || 2" } }, - "multicodec": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-2.1.3.tgz", - "integrity": "sha512-0tOH2Gtio39uO41o+2xl9UhRkCWxU5ZmZSbFCh/OjGzkWJI8e6lkN/s4Mj1YfyWoBod+2+S3W+6wO6nhkwN8pA==", + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, - "optional": true, + "peer": true, "requires": { - "uint8arrays": "1.1.0", - "varint": "^6.0.0" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "peer": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } } }, - "multihashes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-3.1.2.tgz", - "integrity": "sha512-AP4IoV/YzkNrfbQKZE3OMPibrmy350OmCd6cJkwyM8oExaXIlOY4UnOOVSQtAEuq/LR01XfXKCESidzZvSwHCQ==", + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true, - "optional": true, + "peer": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "peer": true, "requires": { - "multibase": "^3.1.0", - "uint8arrays": "^2.0.5", - "varint": "^6.0.0" + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" }, "dependencies": { - "uint8arrays": { - "version": "2.1.10", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-2.1.10.tgz", - "integrity": "sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A==", + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, - "optional": true, + "peer": true, "requires": { - "multiformats": "^9.4.2" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" } } } }, - "native-abort-controller": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/native-abort-controller/-/native-abort-controller-0.0.3.tgz", - "integrity": "sha512-YIxU5nWqSHG1Xbu3eOu3pdFRD882ivQpIcu6AiPVe2oSVoRbfYW63DVkZm3g1gHiMtZSvZzF6THSzTGEBYl8YA==", + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "peer": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", + "dev": true, + "peer": true, + "requires": { + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" + } + } + } + }, + "eth-lib": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", + "integrity": "sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw==", + "dev": true, + "requires": { + "bn.js": "^4.11.6", + "elliptic": "^6.4.0", + "xhr-request-promise": "^0.1.2" + } + }, + "ethereum-bloom-filters": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", + "integrity": "sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==", + "dev": true, + "requires": { + "js-sha3": "^0.8.0" + }, + "dependencies": { + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + } + } + }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, + "ethereum-ens": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/ethereum-ens/-/ethereum-ens-0.8.0.tgz", + "integrity": "sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg==", + "dev": true, + "requires": { + "bluebird": "^3.4.7", + "eth-ens-namehash": "^2.0.0", + "js-sha3": "^0.5.7", + "pako": "^1.0.4", + "underscore": "^1.8.3", + "web3": "^1.0.0-beta.34" + } + }, + "ethereumjs-abi": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", + "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", + "dev": true, + "requires": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + }, + "dependencies": { + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", "dev": true, - "optional": true, "requires": { - "globalthis": "^1.0.1" + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true } } }, - "ipfs-utils": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-5.0.1.tgz", - "integrity": "sha512-28KZPgO4Uf5duT2ORLAYfboUp98iUshDD7yRAfbNxNAR8Dtidfn6o20rZfoXnkri2zKBVIPlJkuCPmPJB+6erg==", + "ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", "dev": true, - "optional": true, "requires": { - "abort-controller": "^3.0.0", - "any-signal": "^2.1.0", - "buffer": "^6.0.1", - "electron-fetch": "^1.7.2", - "err-code": "^2.0.0", - "fs-extra": "^9.0.1", - "is-electron": "^2.2.0", - "iso-url": "^1.0.0", - "it-glob": "0.0.10", - "it-to-stream": "^0.1.2", - "merge-options": "^2.0.0", - "nanoid": "^3.1.3", - "native-abort-controller": "0.0.3", - "native-fetch": "^2.0.0", - "node-fetch": "^2.6.0", - "stream-to-it": "^0.2.0" + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" }, "dependencies": { - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "optional": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "optional": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "native-abort-controller": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/native-abort-controller/-/native-abort-controller-0.0.3.tgz", - "integrity": "sha512-YIxU5nWqSHG1Xbu3eOu3pdFRD882ivQpIcu6AiPVe2oSVoRbfYW63DVkZm3g1gHiMtZSvZzF6THSzTGEBYl8YA==", - "dev": true, - "optional": true, - "requires": { - "globalthis": "^1.0.1" - } - }, - "native-fetch": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/native-fetch/-/native-fetch-2.0.1.tgz", - "integrity": "sha512-gv4Bea+ga9QdXINurpkEqun3ap3vnB+WYoe4c8ddqUYEH7B2h6iD39RF8uVN7OwmSfMY3RDxkvBnoI4e2/vLXQ==", + "@types/bn.js": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.0.tgz", + "integrity": "sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==", "dev": true, - "optional": true, "requires": { - "globalthis": "^1.0.1" + "@types/node": "*" } }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "optional": true + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true } } }, - "ipld-block": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/ipld-block/-/ipld-block-0.11.1.tgz", - "integrity": "sha512-sDqqLqD5qh4QzGq6ssxLHUCnH4emCf/8F8IwjQM2cjEEIEHMUj57XhNYgmGbemdYPznUhffxFGEHsruh5+HQRw==", + "ethers": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz", + "integrity": "sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==", + "dev": true, + "requires": { + "@ethersproject/abi": "5.7.0", + "@ethersproject/abstract-provider": "5.7.0", + "@ethersproject/abstract-signer": "5.7.0", + "@ethersproject/address": "5.7.0", + "@ethersproject/base64": "5.7.0", + "@ethersproject/basex": "5.7.0", + "@ethersproject/bignumber": "5.7.0", + "@ethersproject/bytes": "5.7.0", + "@ethersproject/constants": "5.7.0", + "@ethersproject/contracts": "5.7.0", + "@ethersproject/hash": "5.7.0", + "@ethersproject/hdnode": "5.7.0", + "@ethersproject/json-wallets": "5.7.0", + "@ethersproject/keccak256": "5.7.0", + "@ethersproject/logger": "5.7.0", + "@ethersproject/networks": "5.7.1", + "@ethersproject/pbkdf2": "5.7.0", + "@ethersproject/properties": "5.7.0", + "@ethersproject/providers": "5.7.2", + "@ethersproject/random": "5.7.0", + "@ethersproject/rlp": "5.7.0", + "@ethersproject/sha2": "5.7.0", + "@ethersproject/signing-key": "5.7.0", + "@ethersproject/solidity": "5.7.0", + "@ethersproject/strings": "5.7.0", + "@ethersproject/transactions": "5.7.0", + "@ethersproject/units": "5.7.0", + "@ethersproject/wallet": "5.7.0", + "@ethersproject/web": "5.7.1", + "@ethersproject/wordlists": "5.7.0" + } + }, + "ethjs-abi": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", + "integrity": "sha1-4KepOn6BFjqUR3utVu3lJKtt5TM=", "dev": true, - "optional": true, "requires": { - "cids": "^1.0.0" + "bn.js": "4.11.6", + "js-sha3": "0.5.5", + "number-to-bn": "1.7.0" }, "dependencies": { - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - } - }, - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1" - } - }, - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", - "dev": true, - "optional": true, - "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - } + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - } - } + "js-sha3": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", + "integrity": "sha1-uvDA6MVK1ZA0R9+Wreekobynmko=", + "dev": true + } + } + }, + "ethjs-unit": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", + "integrity": "sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk=", + "dev": true, + "requires": { + "bn.js": "4.11.6", + "number-to-bn": "1.7.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + } + } + }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "dev": true, + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true + }, + "eventemitter3": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz", + "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "dependencies": { + "get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true }, - "uint8arrays": { + "is-stream": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true } } }, - "ipld-dag-cbor": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/ipld-dag-cbor/-/ipld-dag-cbor-0.17.1.tgz", - "integrity": "sha512-Bakj/cnxQBdscORyf4LRHxQJQfoaY8KWc7PWROQgX+aw5FCzBt8ga0VM/59K+ABOznsqNvyLR/wz/oYImOpXJw==", + "exit-on-epipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz", + "integrity": "sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==", + "dev": true + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "dev": true, + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", "dev": true, - "optional": true, "requires": { - "borc": "^2.1.2", - "cids": "^1.0.0", - "is-circular": "^1.0.2", - "multicodec": "^3.0.1", - "multihashing-async": "^2.0.0", - "uint8arrays": "^2.1.3" + "type": "^2.0.0" }, "dependencies": { - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - } - } - }, - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1" - } - }, - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", - "dev": true, - "optional": true, - "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - } - } - }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - } - } - }, - "uint8arrays": { - "version": "2.1.10", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-2.1.10.tgz", - "integrity": "sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true + "type": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", + "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==", + "dev": true } } }, - "ipld-dag-pb": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.20.0.tgz", - "integrity": "sha512-zfM0EdaolqNjAxIrtpuGKvXxWk5YtH9jKinBuQGTcngOsWFQhyybGCTJHGNGGtRjHNJi2hz5Udy/8pzv4kcKyg==", + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extract-zip": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", + "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, - "optional": true, "requires": { - "cids": "^1.0.0", - "class-is": "^1.1.0", - "multicodec": "^2.0.0", - "multihashing-async": "^2.0.0", - "protons": "^2.0.0", - "reset": "^0.1.0", - "run": "^1.4.0", - "stable": "^0.1.8", - "uint8arrays": "^1.0.0" + "@types/yauzl": "^2.9.1", + "debug": "^4.1.1", + "get-stream": "^5.1.0", + "yauzl": "^2.10.0" }, "dependencies": { - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - }, - "dependencies": { - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", - "dev": true, - "optional": true, - "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - } - }, - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - } - } - }, - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1" - } - }, - "multicodec": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-2.1.3.tgz", - "integrity": "sha512-0tOH2Gtio39uO41o+2xl9UhRkCWxU5ZmZSbFCh/OjGzkWJI8e6lkN/s4Mj1YfyWoBod+2+S3W+6wO6nhkwN8pA==", + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "optional": true, "requires": { - "uint8arrays": "1.1.0", - "varint": "^6.0.0" + "ms": "2.1.2" } }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, - "optional": true, "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - } + "pump": "^3.0.0" } }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, - "ipld-raw": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/ipld-raw/-/ipld-raw-6.0.0.tgz", - "integrity": "sha512-UK7fjncAzs59iu/o2kwYtb8jgTtW6B+cNWIiNpAJkfRwqoMk1xD/6i25ktzwe4qO8gQgoR9RxA5ibC23nq8BLg==", + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", "dev": true, - "optional": true, + "peer": true, "requires": { - "cids": "^1.0.0", - "multicodec": "^2.0.0", - "multihashing-async": "^2.0.0" - }, - "dependencies": { - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - }, - "dependencies": { - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", - "dev": true, - "optional": true, - "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - } - } - } - }, - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1" - } - }, - "multicodec": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-2.1.3.tgz", - "integrity": "sha512-0tOH2Gtio39uO41o+2xl9UhRkCWxU5ZmZSbFCh/OjGzkWJI8e6lkN/s4Mj1YfyWoBod+2+S3W+6wO6nhkwN8pA==", - "dev": true, - "optional": true, - "requires": { - "uint8arrays": "1.1.0", - "varint": "^6.0.0" - }, - "dependencies": { - "multibase": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-3.1.2.tgz", - "integrity": "sha512-bpklWHs70LO3smJUHOjcnzGceJJvn9ui0Vau6Za0B/GBepaXswmW8Ufea0uD9pROf/qCQ4N4lZ3sf3U+SNf0tw==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1", - "web-encoding": "^1.0.6" - } - }, - "uint8arrays": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-1.1.0.tgz", - "integrity": "sha512-cLdlZ6jnFczsKf5IH1gPHTtcHtPGho5r4CvctohmQjw8K7Q3gFdfIGHxSTdTaCKrL4w09SsPRJTqRS0drYeszA==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^3.0.0", - "web-encoding": "^1.0.2" - } - } - } - }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - } - } - }, - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true - } + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true, + "peer": true + }, + "fastq": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "dev": true, + "peer": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "fd-slicer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", + "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", + "dev": true, + "requires": { + "pend": "~1.2.0" + } + }, + "file-url": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/file-url/-/file-url-3.0.0.tgz", + "integrity": "sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==", + "dev": true + }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, + "peer": true, + "requires": { + "array-back": "^3.0.1" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, - "is-arguments": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", - "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "dev": true + }, + "fmix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fmix/-/fmix-0.1.0.tgz", + "integrity": "sha512-Y6hyofImk9JdzU8k5INtTXX1cu8LDlePWDFU5sftm9H+zKCr5SGrVjdhkvsim646cw5zD0nADj8oHyXMZmCZ9w==", "dev": true, "requires": { - "call-bind": "^1.0.0" + "imul": "^1.0.0" } }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true }, - "is-bigint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "dev": true }, - "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==", + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "dev": true, "requires": { - "binary-extensions": "^2.0.0" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" } }, - "is-boolean-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", - "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "form-data-encoder": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.1.tgz", + "integrity": "sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg==", + "dev": true + }, + "forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "dev": true + }, + "fp-ts": { + "version": "1.19.3", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-1.19.3.tgz", + "integrity": "sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg==", + "dev": true + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", "dev": true, "requires": { - "call-bind": "^1.0.2" + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" } }, - "is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", "dev": true, - "optional": true + "requires": { + "minipass": "^2.6.0" + } }, - "is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true, + "peer": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "is-circular": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-circular/-/is-circular-1.0.2.tgz", - "integrity": "sha512-YttjnrswnUYRVJvxCvu8z+PGMUSzC2JttP0OEXezlAEdp3EXzhf7IZ3j0gRAybJBQupedIZFhY61Tga6E0qASA==", + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "optional": true }, - "is-core-module": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", - "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, "requires": { - "has": "^1.0.3" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" } }, - "is-date-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", - "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", "dev": true }, - "is-electron": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.1.tgz", - "integrity": "sha512-r8EEQQsqT+Gn0aXFx7lTFygYQhILLCB+wn0WCDL5LZRINeLH/Rvw1j2oKodELLXYNImQ3CRlVsY8wW4cGOsyuw==", - "dev": true, - "optional": true + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", "dev": true }, - "is-fn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fn/-/is-fn-1.0.0.tgz", - "integrity": "sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw=", + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "requires": { - "number-is-nan": "^1.0.0" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" } }, - "is-function": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", - "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==", + "dev": true, + "peer": true + }, + "get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", "dev": true }, - "is-generator-function": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.9.tgz", - "integrity": "sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A==", + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", "dev": true }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, "requires": { - "is-extglob": "^2.1.1" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" } }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=", - "dev": true - }, - "is-ip": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-3.1.0.tgz", - "integrity": "sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q==", + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "dev": true, - "optional": true, "requires": { - "ip-regex": "^4.0.0" + "assert-plus": "^1.0.0" } }, - "is-lower-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", - "integrity": "sha1-fhR75HaNxGbbO/shzGCzHmrWk5M=", + "ghost-testrpc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz", + "integrity": "sha512-i08dAEgJ2g8z5buJIrCTduwPIhih3DP+hOCTyyryikfV8T0bNvHnGXO67i0DD1H4GBDETTclPy9njZbfluQYrQ==", "dev": true, + "peer": true, "requires": { - "lower-case": "^1.1.0" + "chalk": "^2.4.2", + "node-emoji": "^1.10.0" } }, - "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-number-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", - "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", + "gitignore-globs": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/gitignore-globs/-/gitignore-globs-0.1.1.tgz", + "integrity": "sha512-GAeT2xnAfU9513pjJ3etkKSxa7rBbLOvZRPJvQ2sfZBNx2zHR6HuX9ZHHU8id8CwgGF+bmss7Jct4VDNLsKZwg==", "dev": true }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, - "optional": true - }, - "is-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", - "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", - "dev": true + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true + "glob-parent": { + "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" + } }, - "is-regex": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", - "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "global": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", + "integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==", + "dev": true, + "requires": { + "min-document": "^2.19.0", + "process": "^0.11.10" + } + }, + "global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", "dev": true, + "peer": true, "requires": { - "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" + "global-prefix": "^3.0.0" } }, - "is-retry-allowed": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", - "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", - "dev": true + "global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "peer": true, + "requires": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + } }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true + "globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3" + } }, - "is-string": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", - "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", - "dev": true + "globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "dev": true, + "peer": true, + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + } }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, "requires": { - "has-symbols": "^1.0.2" + "get-intrinsic": "^1.1.3" } }, - "is-typed-array": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.5.tgz", - "integrity": "sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==", + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", "dev": true, "requires": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.0-next.2", - "foreach": "^2.0.5", - "has-symbols": "^1.0.1" + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "dependencies": { + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + } } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true, + "peer": true }, - "is-upper-case": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", - "integrity": "sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8=", + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", "dev": true, "requires": { - "upper-case": "^1.1.0" + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { + "har-schema": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", "dev": true }, - "iso-constants": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/iso-constants/-/iso-constants-0.1.2.tgz", - "integrity": "sha512-OTCM5ZCQsHBCI4Wdu4tSxvDIkmDHd5EwJDps5mKqnQnWJSKlnwMs3EDZ4n3Fh1tmkWkDlyd2vCDbEYuPbyrUNQ==", - "dev": true, - "optional": true - }, - "iso-random-stream": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-2.0.2.tgz", - "integrity": "sha512-yJvs+Nnelic1L2vH2JzWvvPQFA4r7kSTnpST/+LkAQjSz0hos2oqLD+qIVi9Qk38Hoe7mNDt3j0S27R58MVjLQ==", + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "dev": true, - "optional": true, "requires": { - "events": "^3.3.0", - "readable-stream": "^3.4.0" + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "hardhat": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.14.1.tgz", + "integrity": "sha512-H3Qp/UKyQGmPDDBSfMoSyH18rRnac90rsb0LNer+sKe6at6rxLe4D5j+M+1icqZQF02iLPjNRwc/PA8OPf757A==", + "dev": true, + "requires": { + "@ethersproject/abi": "^5.1.2", + "@metamask/eth-sig-util": "^4.0.0", + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-blockchain": "7.0.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-evm": "2.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-statemanager": "2.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "@nomicfoundation/ethereumjs-vm": "7.0.1", + "@nomicfoundation/solidity-analyzer": "^0.1.0", + "@sentry/node": "^5.18.1", + "@types/bn.js": "^5.1.0", + "@types/lru-cache": "^5.1.0", + "abort-controller": "^3.0.0", + "adm-zip": "^0.4.16", + "aggregate-error": "^3.0.0", + "ansi-escapes": "^4.3.0", + "chalk": "^2.4.2", + "chokidar": "^3.4.0", + "ci-info": "^2.0.0", + "debug": "^4.1.1", + "enquirer": "^2.3.0", + "env-paths": "^2.2.0", + "ethereum-cryptography": "^1.0.3", + "ethereumjs-abi": "^0.6.8", + "find-up": "^2.1.0", + "fp-ts": "1.19.3", + "fs-extra": "^7.0.1", + "glob": "7.2.0", + "immutable": "^4.0.0-rc.12", + "io-ts": "1.10.4", + "keccak": "^3.0.2", + "lodash": "^4.17.11", + "mnemonist": "^0.38.0", + "mocha": "^10.0.0", + "p-map": "^4.0.0", + "qs": "^6.7.0", + "raw-body": "^2.4.1", + "resolve": "1.17.0", + "semver": "^6.3.0", + "solc": "0.7.3", + "source-map-support": "^0.5.13", + "stacktrace-parser": "^0.1.10", + "tsort": "0.0.1", + "undici": "^5.14.0", + "uuid": "^8.3.2", + "ws": "^7.4.6" + }, + "dependencies": { + "@chainsafe/persistent-merkle-tree": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz", + "integrity": "sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw==", + "dev": true, + "requires": { + "@chainsafe/as-sha256": "^0.3.1" + } + }, + "@metamask/eth-sig-util": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz", + "integrity": "sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==", + "dev": true, + "requires": { + "ethereumjs-abi": "^0.6.8", + "ethereumjs-util": "^6.2.1", + "ethjs-util": "^0.1.6", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.1" + } + }, + "@noble/hashes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.2.0.tgz", + "integrity": "sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==", + "dev": true + }, + "@nomicfoundation/ethereumjs-block": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.1.tgz", + "integrity": "sha512-u1Yioemi6Ckj3xspygu/SfFvm8vZEO8/Yx5a1QLzi6nVU0jz3Pg2OmHKJ5w+D9Ogk1vhwRiqEBAqcb0GVhCyHw==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "ethereum-cryptography": "0.1.3", + "ethers": "^5.7.1" + }, + "dependencies": { + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + } + } + }, + "@nomicfoundation/ethereumjs-blockchain": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.1.tgz", + "integrity": "sha512-NhzndlGg829XXbqJEYrF1VeZhAwSPgsK/OB7TVrdzft3y918hW5KNd7gIZ85sn6peDZOdjBsAXIpXZ38oBYE5A==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-ethash": "3.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "abstract-level": "^1.0.3", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "level": "^8.0.0", + "lru-cache": "^5.1.1", + "memory-level": "^1.0.0" + }, + "dependencies": { + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + } + } + }, + "@nomicfoundation/ethereumjs-common": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.1.tgz", + "integrity": "sha512-OBErlkfp54GpeiE06brBW/TTbtbuBJV5YI5Nz/aB2evTDo+KawyEzPjBlSr84z/8MFfj8wS2wxzQX1o32cev5g==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-util": "9.0.1", + "crc-32": "^1.2.0" + } + }, + "@nomicfoundation/ethereumjs-ethash": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.1.tgz", + "integrity": "sha512-KDjGIB5igzWOp8Ik5I6QiRH5DH+XgILlplsHR7TEuWANZA759G6krQ6o8bvj+tRUz08YygMQu/sGd9mJ1DYT8w==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "abstract-level": "^1.0.3", + "bigint-crypto-utils": "^3.0.23", + "ethereum-cryptography": "0.1.3" + }, + "dependencies": { + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + } + } + }, + "@nomicfoundation/ethereumjs-evm": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.1.tgz", + "integrity": "sha512-oL8vJcnk0Bx/onl+TgQOQ1t/534GKFaEG17fZmwtPFeH8S5soiBYPCLUrvANOl4sCp9elYxIMzIiTtMtNNN8EQ==", + "dev": true, + "requires": { + "@ethersproject/providers": "^5.7.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "mcl-wasm": "^0.7.1", + "rustbn.js": "~0.2.0" + }, + "dependencies": { + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + } + } + }, + "@nomicfoundation/ethereumjs-rlp": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.1.tgz", + "integrity": "sha512-xtxrMGa8kP4zF5ApBQBtjlSbN5E2HI8m8FYgVSYAnO6ssUoY5pVPGy2H8+xdf/bmMa22Ce8nWMH3aEW8CcqMeQ==", + "dev": true + }, + "@nomicfoundation/ethereumjs-statemanager": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.1.tgz", + "integrity": "sha512-B5ApMOnlruVOR7gisBaYwFX+L/AP7i/2oAahatssjPIBVDF6wTX1K7Qpa39E/nzsH8iYuL3krkYeUFIdO3EMUQ==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "ethers": "^5.7.1", + "js-sdsl": "^4.1.4" + }, + "dependencies": { + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + } + } + }, + "@nomicfoundation/ethereumjs-trie": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.1.tgz", + "integrity": "sha512-A64It/IMpDVODzCgxDgAAla8jNjNtsoQZIzZUfIV5AY6Coi4nvn7+VReBn5itlxMiL2yaTlQr9TRWp3CSI6VoA==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "@types/readable-stream": "^2.3.13", + "ethereum-cryptography": "0.1.3", + "readable-stream": "^3.6.0" + }, + "dependencies": { + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + } + } + }, + "@nomicfoundation/ethereumjs-tx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.1.tgz", + "integrity": "sha512-0HwxUF2u2hrsIM1fsasjXvlbDOq1ZHFV2dd1yGq8CA+MEYhaxZr8OTScpVkkxqMwBcc5y83FyPl0J9MZn3kY0w==", + "dev": true, + "requires": { + "@chainsafe/ssz": "^0.9.2", + "@ethersproject/providers": "^5.7.2", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "ethereum-cryptography": "0.1.3" + }, + "dependencies": { + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + } + } + }, + "@nomicfoundation/ethereumjs-util": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.1.tgz", + "integrity": "sha512-TwbhOWQ8QoSCFhV/DDfSmyfFIHjPjFBj957219+V3jTZYZ2rf9PmDtNOeZWAE3p3vlp8xb02XGpd0v6nTUPbsA==", + "dev": true, + "requires": { + "@chainsafe/ssz": "^0.10.0", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "ethereum-cryptography": "0.1.3" + }, + "dependencies": { + "@chainsafe/ssz": { + "version": "0.10.2", + "resolved": "https://registry.npmjs.org/@chainsafe/ssz/-/ssz-0.10.2.tgz", + "integrity": "sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg==", + "dev": true, + "requires": { + "@chainsafe/as-sha256": "^0.3.1", + "@chainsafe/persistent-merkle-tree": "^0.5.0" + } + }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + } + } + }, + "@nomicfoundation/ethereumjs-vm": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.1.tgz", + "integrity": "sha512-rArhyn0jPsS/D+ApFsz3yVJMQ29+pVzNZ0VJgkzAZ+7FqXSRtThl1C1prhmlVr3YNUlfpZ69Ak+RUT4g7VoOuQ==", + "dev": true, + "requires": { + "@nomicfoundation/ethereumjs-block": "5.0.1", + "@nomicfoundation/ethereumjs-blockchain": "7.0.1", + "@nomicfoundation/ethereumjs-common": "4.0.1", + "@nomicfoundation/ethereumjs-evm": "2.0.1", + "@nomicfoundation/ethereumjs-rlp": "5.0.1", + "@nomicfoundation/ethereumjs-statemanager": "2.0.1", + "@nomicfoundation/ethereumjs-trie": "6.0.1", + "@nomicfoundation/ethereumjs-tx": "5.0.1", + "@nomicfoundation/ethereumjs-util": "9.0.1", + "debug": "^4.3.3", + "ethereum-cryptography": "0.1.3", + "mcl-wasm": "^0.7.1", + "rustbn.js": "~0.2.0" + }, + "dependencies": { + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + } + } + }, + "@scure/bip32": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.1.5.tgz", + "integrity": "sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw==", + "dev": true, + "requires": { + "@noble/hashes": "~1.2.0", + "@noble/secp256k1": "~1.7.0", + "@scure/base": "~1.1.0" + } + }, + "@scure/bip39": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.1.tgz", + "integrity": "sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==", + "dev": true, + "requires": { + "@noble/hashes": "~1.2.0", + "@scure/base": "~1.1.0" + } + }, + "@types/bn.js": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.1.tgz", + "integrity": "sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true + }, + "commander": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", + "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "dev": true + }, + "ethereum-cryptography": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz", + "integrity": "sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw==", + "dev": true, + "requires": { + "@noble/hashes": "1.2.0", + "@noble/secp256k1": "1.7.1", + "@scure/bip32": "1.1.5", + "@scure/bip39": "1.1.1" + } + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dev": true, + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + }, + "dependencies": { + "@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "dev": true, + "requires": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "requires": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + } + }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true + }, + "raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "requires": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + } + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "dev": true + }, + "solc": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.3.tgz", + "integrity": "sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA==", + "dev": true, + "requires": { + "command-exists": "^1.2.8", + "commander": "3.0.2", + "follow-redirects": "^1.12.1", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "dependencies": { + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true + }, + "toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "dev": true + }, + "tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "dev": true + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } } }, - "iso-url": { + "hardhat-dependency-compiler": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-1.2.1.tgz", - "integrity": "sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng==", - "dev": true, - "optional": true - }, - "isomorphic-ws": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", - "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", - "dev": true, - "optional": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "isurl": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", - "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", - "dev": true, - "requires": { - "has-to-string-tag-x": "^1.2.0", - "is-object": "^1.0.1" - } - }, - "it-all": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/it-all/-/it-all-1.0.6.tgz", - "integrity": "sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A==", - "dev": true, - "optional": true - }, - "it-concat": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/it-concat/-/it-concat-1.0.3.tgz", - "integrity": "sha512-sjeZQ1BWQ9U/W2oI09kZgUyvSWzQahTkOkLIsnEPgyqZFaF9ME5gV6An4nMjlyhXKWQMKEakQU8oRHs2SdmeyA==", - "dev": true, - "optional": true, - "requires": { - "bl": "^4.0.0" - } - }, - "it-drain": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/it-drain/-/it-drain-1.0.5.tgz", - "integrity": "sha512-r/GjkiW1bZswC04TNmUnLxa6uovme7KKwPhc+cb1hHU65E3AByypHH6Pm91WHuvqfFsm+9ws0kPtDBV3/8vmIg==", - "dev": true, - "optional": true - }, - "it-glob": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/it-glob/-/it-glob-0.0.10.tgz", - "integrity": "sha512-p1PR15djgPV7pxdLOW9j4WcJdla8+91rJdUU2hU2Jm68vkxpIEXK55VHBeH8Lvqh2vqLtM83t8q4BuJxue6niA==", - "dev": true, - "optional": true, - "requires": { - "fs-extra": "^9.0.1", - "minimatch": "^3.0.4" + "resolved": "https://registry.npmjs.org/hardhat-dependency-compiler/-/hardhat-dependency-compiler-1.2.1.tgz", + "integrity": "sha512-xG5iwbspTtxOEiP5UsPngEYQ1Hg+fjTjliapIjdTQmwGkCPofrsDhQDV2O/dopcYzcR68nTx2X8xTewYHgA2rQ==", + "dev": true, + "requires": {} + }, + "hardhat-deploy": { + "version": "0.11.43", + "resolved": "https://registry.npmjs.org/hardhat-deploy/-/hardhat-deploy-0.11.43.tgz", + "integrity": "sha512-D760CjDtinwjOCpKOvdyRtIJYLQIYXmhfgkFe+AkxlYM9bPZ/T4tZ/xIB2tR89ZT+z0hF1YuZFBXIL3/G/9T5g==", + "dev": true, + "requires": { + "@ethersproject/abi": "^5.7.0", + "@ethersproject/abstract-signer": "^5.7.0", + "@ethersproject/address": "^5.7.0", + "@ethersproject/bignumber": "^5.7.0", + "@ethersproject/bytes": "^5.7.0", + "@ethersproject/constants": "^5.7.0", + "@ethersproject/contracts": "^5.7.0", + "@ethersproject/providers": "^5.7.2", + "@ethersproject/solidity": "^5.7.0", + "@ethersproject/transactions": "^5.7.0", + "@ethersproject/wallet": "^5.7.0", + "@types/qs": "^6.9.7", + "axios": "^0.21.1", + "chalk": "^4.1.2", + "chokidar": "^3.5.2", + "debug": "^4.3.2", + "enquirer": "^2.3.6", + "ethers": "^5.7.0", + "form-data": "^4.0.0", + "fs-extra": "^10.0.0", + "match-all": "^1.2.6", + "murmur-128": "^0.2.1", + "qs": "^6.9.4", + "zksync-web3": "^0.14.3" }, "dependencies": { + "ansi-styles": { + "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" + } + }, + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dev": true, + "requires": { + "follow-redirects": "^1.14.0" + } + }, + "chalk": { + "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" + } + }, + "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==", + "dev": true, + "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==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "dev": true, - "optional": true, "requires": { - "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, - "optional": true, "requires": { "graceful-fs": "^4.1.6", "universalify": "^2.0.0" } }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "optional": true - } - } - }, - "it-last": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/it-last/-/it-last-1.0.6.tgz", - "integrity": "sha512-aFGeibeiX/lM4bX3JY0OkVCFkAw8+n9lkukkLNivbJRvNz8lI3YXv5xcqhFUV2lDJiraEK3OXRDbGuevnnR67Q==", - "dev": true, - "optional": true - }, - "it-map": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/it-map/-/it-map-1.0.6.tgz", - "integrity": "sha512-XT4/RM6UHIFG9IobGlQPFQUrlEKkU4eBUFG3qhWhfAdh1JfF2x11ShCrKCdmZ0OiZppPfoLuzcfA4cey6q3UAQ==", - "dev": true, - "optional": true - }, - "it-peekable": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-1.0.3.tgz", - "integrity": "sha512-5+8zemFS+wSfIkSZyf0Zh5kNN+iGyccN02914BY4w/Dj+uoFEoPSvj5vaWn8pNZJNSxzjW0zHRxC3LUb2KWJTQ==", - "dev": true, - "optional": true - }, - "it-reader": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/it-reader/-/it-reader-2.1.0.tgz", - "integrity": "sha512-hSysqWTO9Tlwc5EGjVf8JYZzw0D2FsxD/g+eNNWrez9zODxWt6QlN6JAMmycK72Mv4jHEKEXoyzUN4FYGmJaZw==", - "dev": true, - "optional": true, - "requires": { - "bl": "^4.0.0" - } - }, - "it-tar": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/it-tar/-/it-tar-1.2.2.tgz", - "integrity": "sha512-M8V4a9I+x/vwXTjqvixcEZbQZHjwDIb8iUQ+D4M2QbhAdNs3WKVSl+45u5/F2XFx6jYMFOGzMVlKNK/uONgNIA==", - "dev": true, - "optional": true, - "requires": { - "bl": "^4.0.0", - "buffer": "^5.4.3", - "iso-constants": "^0.1.2", - "it-concat": "^1.0.0", - "it-reader": "^2.0.0", - "p-defer": "^3.0.0" - }, - "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "optional": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - } - } - }, - "it-to-stream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/it-to-stream/-/it-to-stream-0.1.2.tgz", - "integrity": "sha512-DTB5TJRZG3untmZehcaFN0kGWl2bNv7tnJRgQHAO9QEt8jfvVRrebZtnD5NZd4SCj4WVPjl0LSrugNWE/UaZRQ==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.6.0", - "fast-fifo": "^1.0.0", - "get-iterator": "^1.0.2", - "p-defer": "^3.0.0", - "p-fifo": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "qs": { + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", "dev": true, - "optional": true, "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "side-channel": "^1.0.4" } - } - } - }, - "iter-tools": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/iter-tools/-/iter-tools-7.3.1.tgz", - "integrity": "sha512-XYS0CjthZqQ7MomjB4Ww9NqrVKRlP2qoa1oWFcIQrkMykhkgFTpSNG+sRcqzHBp6fSxk8oDIjudFTgQ6nnA4mA==", - "dev": true, - "optional": true, - "requires": { - "@babel/runtime": "^7.12.1" - } - }, - "js-sha256": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", - "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==", - "dev": true, - "optional": true - }, - "js-sha3": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", - "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - } - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, - "jsdom": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz", - "integrity": "sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4=", - "dev": true, - "optional": true, - "requires": { - "abab": "^1.0.0", - "acorn": "^2.4.0", - "acorn-globals": "^1.0.4", - "cssom": ">= 0.3.0 < 0.4.0", - "cssstyle": ">= 0.2.29 < 0.3.0", - "escodegen": "^1.6.1", - "nwmatcher": ">= 1.3.7 < 2.0.0", - "parse5": "^1.5.1", - "request": "^2.55.0", - "sax": "^1.1.4", - "symbol-tree": ">= 3.1.0 < 4.0.0", - "tough-cookie": "^2.2.0", - "webidl-conversions": "^2.0.0", - "whatwg-url-compat": "~0.6.5", - "xml-name-validator": ">= 2.0.1 < 3.0.0" - }, - "dependencies": { - "parse5": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", - "integrity": "sha1-m387DeMr543CQBsXVzzK8Pb1nZQ=", - "dev": true, - "optional": true }, - "webidl-conversions": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-2.0.1.tgz", - "integrity": "sha1-O/glj30xjHRDw28uFpQCoaZwNQY=", - "dev": true, - "optional": true - } - } - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json-pointer": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.2.tgz", - "integrity": "sha512-vLWcKbOaXlO+jvRy4qNd+TI1QUPZzfJj1tpJ3vAXDych5XJf93ftpUKe5pKCrzyIIwgBJcOcCVRUfqQP25afBw==", - "dev": true, - "requires": { - "foreach": "^2.0.4" - } - }, - "json-rpc-engine": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-6.1.0.tgz", - "integrity": "sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==", - "dev": true, - "requires": { - "@metamask/safe-event-emitter": "^2.0.0", - "eth-rpc-errors": "^4.0.2" - }, - "dependencies": { - "eth-rpc-errors": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz", - "integrity": "sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg==", + "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": { - "fast-safe-stringify": "^2.0.6" + "has-flag": "^4.0.0" } + }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true } } }, - "json-rpc-random-id": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz", - "integrity": "sha1-uknZat7RRE27jaPSA3SKy7zeyMg=", - "dev": true - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-schema-typed": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-7.0.3.tgz", - "integrity": "sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A==", - "dev": true, - "optional": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true, - "requires": { - "jsonify": "~0.0.0" - } - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "json-text-sequence": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", - "integrity": "sha1-py8hfcSvxGKf/1/rME3BvVGi89I=", + "hardhat-gas-reporter": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz", + "integrity": "sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg==", "dev": true, - "optional": true, + "peer": true, "requires": { - "delimit-stream": "0.1.0" + "array-uniq": "1.0.3", + "eth-gas-reporter": "^0.2.25", + "sha1": "^1.1.1" } }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "requires": { - "graceful-fs": "^4.1.6" + "function-bind": "^1.1.1" } }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonschema": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", - "integrity": "sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw==", + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "keccak": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.1.tgz", - "integrity": "sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA==", - "dev": true, - "requires": { - "node-addon-api": "^2.0.0", - "node-gyp-build": "^4.2.0" - } - }, - "keypair": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/keypair/-/keypair-1.0.4.tgz", - "integrity": "sha512-zwhgOhhniaL7oxMgUMKKw5219PWWABMO+dgMnzJOQ2/5L3XJtTJGhW2PEXlxXj9zaccdReZJZ83+4NPhVfNVDg==", + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", "dev": true, - "optional": true + "peer": true }, - "keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", "dev": true, "requires": { - "json-buffer": "3.0.0" + "get-intrinsic": "^1.1.1" } }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "dev": true }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "has-symbol-support-x": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz", + "integrity": "sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw==", + "dev": true + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz", + "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==", "dev": true, "requires": { - "graceful-fs": "^4.1.9" + "has-symbol-support-x": "^1.4.1" } }, - "lcid": { + "has-tostringtag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "has-symbols": "^1.0.2" } }, - "leb128": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/leb128/-/leb128-0.0.5.tgz", - "integrity": "sha512-elbNtfmu3GndZbesVF6+iQAfVjOXW9bM/aax9WwMlABZW+oK9sbAZEXoewaPHmL34sxa8kVwWsru8cNE/yn2gg==", + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", "dev": true, - "optional": true, "requires": { - "bn.js": "^5.0.0", - "buffer-pipe": "0.0.3" - }, - "dependencies": { - "bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true, - "optional": true - } + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" } }, - "level": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/level/-/level-6.0.1.tgz", - "integrity": "sha512-psRSqJZCsC/irNhfHzrVZbmPYXDcEYhA5TVNwr+V92jF44rbf86hqGp8fiT702FyiArScYIlPSBTDUASCVNSpw==", + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", "dev": true, - "optional": true, "requires": { - "level-js": "^5.0.0", - "level-packager": "^5.1.0", - "leveldown": "^5.4.0" + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" } }, - "level-codec": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", - "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==", + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, - "level-concat-iterator": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz", - "integrity": "sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ==", + "header-case": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz", + "integrity": "sha1-lTWXMZfBRLCWE81l0xfvGZY70C0=", "dev": true, - "optional": true, "requires": { - "catering": "^2.1.0" + "no-case": "^2.2.0", + "upper-case": "^1.1.3" } }, - "level-errors": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", - "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "heap": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", + "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", "dev": true, - "requires": { - "errno": "~0.1.1" - } + "peer": true }, - "level-iterator-stream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", - "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "level-errors": "^1.0.3", - "readable-stream": "^1.0.33", - "xtend": "^4.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } + "highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "dev": true }, - "level-js": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/level-js/-/level-js-5.0.2.tgz", - "integrity": "sha512-SnBIDo2pdO5VXh02ZmtAyPP6/+6YTJg2ibLtl9C34pWvmtMEmRTWpra+qO/hifkUtBTOtfx6S9vLDjBsBK4gRg==", + "highlightjs-solidity": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz", + "integrity": "sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "dev": true, - "optional": true, "requires": { - "abstract-leveldown": "~6.2.3", - "buffer": "^5.5.0", - "inherits": "^2.0.3", - "ltgt": "^2.1.2" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "optional": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "dev": true, - "optional": true - }, - "level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "dev": true, - "optional": true, - "requires": { - "xtend": "^4.0.2" - } - } + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" } }, - "level-packager": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz", - "integrity": "sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==", + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "htmlparser2": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", "dev": true, - "optional": true, "requires": { - "encoding-down": "^6.3.0", - "levelup": "^4.3.2" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "optional": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "deferred-leveldown": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", - "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", - "dev": true, - "optional": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "inherits": "^2.0.3" - } - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "dev": true, - "optional": true - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, - "optional": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", - "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", - "dev": true, - "optional": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.4.0", - "xtend": "^4.0.2" - } - }, - "level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "dev": true, - "optional": true, - "requires": { - "xtend": "^4.0.2" - } - }, - "levelup": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", - "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", - "dev": true, - "optional": true, - "requires": { - "deferred-leveldown": "~5.3.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~4.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - } + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1", + "entities": "^4.4.0" } }, - "level-supports": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-2.1.0.tgz", - "integrity": "sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA==", - "dev": true, - "optional": true - }, - "level-write-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/level-write-stream/-/level-write-stream-1.0.0.tgz", - "integrity": "sha1-P3+7Z5pVE3wP6zA97nZuEu4Twdw=", + "http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", "dev": true, - "optional": true, + "peer": true, "requires": { - "end-stream": "~0.1.0" + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" } }, - "level-ws": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", - "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", "dev": true, "requires": { - "readable-stream": "~1.0.15", - "xtend": "~2.1.1" + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" }, "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } } } }, - "leveldown": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.6.0.tgz", - "integrity": "sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ==", + "http-https": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/http-https/-/http-https-1.0.0.tgz", + "integrity": "sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs=", + "dev": true + }, + "http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", "dev": true, - "optional": true, + "peer": true, "requires": { - "abstract-leveldown": "~6.2.1", - "napi-macros": "~2.0.0", - "node-gyp-build": "~4.1.0" + "@types/node": "^10.0.3" }, "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "optional": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "dev": true, - "optional": true - }, - "level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "dev": true, - "optional": true, - "requires": { - "xtend": "^4.0.2" - } - }, - "node-gyp-build": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.1.1.tgz", - "integrity": "sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ==", + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==", "dev": true, - "optional": true + "peer": true } } }, - "levelup": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", - "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "dev": true, "requires": { - "deferred-leveldown": "~1.2.1", - "level-codec": "~7.0.0", - "level-errors": "~1.0.3", - "level-iterator-stream": "~1.3.0", - "prr": "~1.0.1", - "semver": "~5.4.1", - "xtend": "~4.0.0" - }, - "dependencies": { - "semver": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", - "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "dev": true - } + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" } }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "http2-wrapper": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz", + "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" } }, - "libp2p-crypto": { - "version": "0.19.7", - "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.19.7.tgz", - "integrity": "sha512-Qb5o/3WFKF2j6mYSt4UBPyi2kbKl3jYV0podBJoJCw70DlpM5Xc+oh3fFY9ToSunu8aSQQ5GY8nutjXgX/uGRA==", + "https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, - "optional": true, "requires": { - "err-code": "^3.0.1", - "is-typedarray": "^1.0.0", - "iso-random-stream": "^2.0.0", - "keypair": "^1.0.1", - "multiformats": "^9.4.5", - "node-forge": "^0.10.0", - "pem-jwk": "^2.0.0", - "protobufjs": "^6.11.2", - "secp256k1": "^4.0.0", - "uint8arrays": "^3.0.0", - "ursa-optional": "^0.10.1" + "agent-base": "6", + "debug": "4" }, "dependencies": { - "err-code": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz", - "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==", - "dev": true, - "optional": true - }, - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, - "optional": true, "requires": { - "multiformats": "^9.4.2" + "ms": "2.1.2" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", "dev": true }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "husky": { + "version": "9.1.6", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz", + "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" + "safer-buffer": ">= 2.1.2 < 3" } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "idna-uts46-hx": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz", + "integrity": "sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA==", "dev": true, "requires": { - "p-locate": "^4.1.0" + "punycode": "2.1.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "dev": true }, - "lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", - "dev": true + "ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "peer": true }, - "lodash.assign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", - "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "immutable": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.0.tgz", + "integrity": "sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==", "dev": true }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "imul": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/imul/-/imul-1.0.1.tgz", + "integrity": "sha512-WFAgfwPLAjU66EKt6vRdTlKj4nAgIDQzh29JonLa4Bqtl6D8JrIMvWjCnx7xEjVNmP3U0fM5o8ZObk7d0f62bA==", "dev": true }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, - "lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", - "dev": true, - "optional": true - }, - "lodash.keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.2.0.tgz", - "integrity": "sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU=", + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, - "optional": true + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "lodash.omit": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", - "integrity": "sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=", + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true, - "optional": true + "peer": true }, - "lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", "dev": true, - "optional": true + "requires": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } }, - "lodash.without": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.without/-/lodash.without-4.4.0.tgz", - "integrity": "sha1-PNRXSgC2e643OpS3SHcmQFB7eqw=", + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true, - "optional": true + "peer": true }, - "lodash.xor": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.xor/-/lodash.xor-4.5.0.tgz", - "integrity": "sha1-TUjtfpgJWwYyWCunFNP/iuj7HbY=", + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "io-ts": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-1.10.4.tgz", + "integrity": "sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g==", "dev": true, - "optional": true + "requires": { + "fp-ts": "^1.0.0" + } }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true + }, + "is-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", "dev": true, "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.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==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "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" - } - }, - "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==", - "dev": true, - "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==", - "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==", - "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" - } - } + "call-bind": "^1.0.0" + } + }, + "is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" } }, - "loglevel": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.0.tgz", - "integrity": "sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA==", - "dev": true, - "optional": true + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, - "optional": true + "requires": { + "has-bigints": "^1.0.1" + } }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "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==", "dev": true, "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" + "binary-extensions": "^2.0.0" } }, - "loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "requires": { - "get-func-name": "^2.0.0" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true }, - "lower-case-first": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz", - "integrity": "sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E=", + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true + }, + "is-core-module": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", "dev": true, "requires": { - "lower-case": "^1.1.2" + "has": "^1.0.3" } }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "is-date-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", + "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", "dev": true }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { - "yallist": "^4.0.0" + "number-is-nan": "^1.0.0" } }, - "ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", + "is-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.2.tgz", + "integrity": "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==", "dev": true }, - "marked": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", - "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", + "is-generator-function": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.9.tgz", + "integrity": "sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A==", "dev": true }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "is-glob": { + "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": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" + "is-extglob": "^2.1.1" } }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=", "dev": true }, - "memdown": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", - "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "is-lower-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", + "integrity": "sha1-fhR75HaNxGbbO/shzGCzHmrWk5M=", "dev": true, "requires": { - "abstract-leveldown": "~2.7.1", - "functional-red-black-tree": "^1.0.1", - "immediate": "^3.2.3", - "inherits": "~2.0.1", - "ltgt": "~2.2.0", - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "abstract-leveldown": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", - "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", - "dev": true, - "requires": { - "xtend": "~4.0.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "lower-case": "^1.1.0" } }, - "memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true }, - "merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "merge-options": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-2.0.0.tgz", - "integrity": "sha512-S7xYIeWHl2ZUKF7SDeBhGg6rfv5bKxVBdk95s/I7wVF8d+hjLSztJ/B271cnUiF6CAFduEQ5Zn3HYwAjT16DlQ==", + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, - "optional": true, "requires": { - "is-plain-obj": "^2.0.0" - }, - "dependencies": { - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "optional": true - } + "has-tostringtag": "^1.0.0" } }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "is-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.2.tgz", + "integrity": "sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA==", "dev": true }, - "merkle-patricia-tree": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", - "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "requires": { - "async": "^1.4.2", - "ethereumjs-util": "^5.0.0", - "level-ws": "0.0.0", - "levelup": "^1.2.1", - "memdown": "^1.0.0", - "readable-stream": "^2.0.0", - "rlp": "^2.0.0", - "semaphore": ">=1.0.1" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "ethereumjs-util": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", - "dev": true, - "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - } + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", + "is-retry-allowed": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz", + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", "dev": true }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "dependencies": { - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - } + "call-bind": "^1.0.2" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" } }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" + "which-typed-array": "^1.1.11" } }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, - "mime-db": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", - "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, - "mime-types": { - "version": "2.1.31", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", - "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "is-upper-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", + "integrity": "sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8=", "dev": true, "requires": { - "mime-db": "1.48.0" + "upper-case": "^1.1.0" } }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "optional": true - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "dev": true }, - "min-document": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", - "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, "requires": { - "dom-walk": "^0.1.0" + "call-bind": "^1.0.2" } }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true, + "peer": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "has-to-string-tag-x": "^1.2.0", + "is-object": "^1.0.1" } }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + "js-graph-algorithms": { + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/js-graph-algorithms/-/js-graph-algorithms-1.0.18.tgz", + "integrity": "sha512-Gu1wtWzXBzGeye/j9BuyplGHscwqKRZodp/0M1vyBc19RJpblSwKGu099KwwaTx9cRIV+Qupk8xUMfEiGfFqSA==", + "dev": true }, - "minipass": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", - "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "js-sdsl": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.2.tgz", + "integrity": "sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w==", + "dev": true + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "peer": true, "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, "dependencies": { - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "peer": true } } }, - "minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "dev": true, "requires": { - "minipass": "^2.9.0" + "graceful-fs": "^4.1.6" } }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "jsonschema": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", + "integrity": "sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw==", + "dev": true, + "peer": true + }, + "jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dev": true, "requires": { - "minimist": "^1.2.5" + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" } }, - "mkdirp-promise": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", - "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", + "keccak": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-3.0.3.tgz", + "integrity": "sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ==", "dev": true, "requires": { - "mkdirp": "*" + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.0", + "readable-stream": "^3.6.0" } }, - "mocha": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.2.tgz", - "integrity": "sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==", + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", "dev": true, "requires": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.3", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "4.2.1", - "ms": "2.1.3", - "nanoid": "3.3.1", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "workerpool": "6.2.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "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" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "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==", - "dev": true, - "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==", + "json-buffer": "3.0.0" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "peer": true + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "level": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/level/-/level-8.0.0.tgz", + "integrity": "sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ==", + "dev": true, + "requires": { + "browser-level": "^1.0.1", + "classic-level": "^1.2.0" + } + }, + "level-supports": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz", + "integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==", + "dev": true + }, + "level-transcoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", + "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", + "dev": true, + "requires": { + "buffer": "^6.0.3", + "module-error": "^1.0.1" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "peer": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lilconfig": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "dev": true + }, + "lint-staged": { + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.10.tgz", + "integrity": "sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==", + "dev": true, + "requires": { + "chalk": "~5.3.0", + "commander": "~12.1.0", + "debug": "~4.3.6", + "execa": "~8.0.1", + "lilconfig": "~3.1.2", + "listr2": "~8.2.4", + "micromatch": "~4.0.8", + "pidtree": "~0.6.0", + "string-argv": "~0.3.2", + "yaml": "~2.5.0" + }, + "dependencies": { + "chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "dev": true, - "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "dependencies": { - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - } - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "minimatch": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-4.2.1.tgz", - "integrity": "sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "ms": "^2.1.3" } }, "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", - "dev": true - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "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==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true - } - } - }, - "mock-fs": { - "version": "4.14.0", - "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", - "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + } + } }, - "multiaddr": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-8.1.2.tgz", - "integrity": "sha512-r13IzW8+Sv9zab9Gt8RPMIN2WkptIPq99EpAzg4IbJ/zTELhiEwXWr9bAmEatSCI4j/LSA6ESJzvz95JZ+ZYXQ==", + "listr2": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.4.tgz", + "integrity": "sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==", "dev": true, - "optional": true, "requires": { - "cids": "^1.0.0", - "class-is": "^1.1.0", - "dns-over-http-resolver": "^1.0.0", - "err-code": "^2.0.3", - "is-ip": "^3.1.0", - "multibase": "^3.0.0", - "uint8arrays": "^1.1.0", - "varint": "^5.0.0" + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" }, "dependencies": { - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - }, - "dependencies": { - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1" - } - }, - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - } - } + "ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true }, - "multibase": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-3.1.2.tgz", - "integrity": "sha512-bpklWHs70LO3smJUHOjcnzGceJJvn9ui0Vau6Za0B/GBepaXswmW8Ufea0uD9pROf/qCQ4N4lZ3sf3U+SNf0tw==", + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true + }, + "eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true + }, + "string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, - "optional": true, "requires": { - "@multiformats/base-x": "^4.0.1", - "web-encoding": "^1.0.6" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" } }, - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, - "optional": true, "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true - } + "ansi-regex": "^6.0.1" } }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, - "optional": true, "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1" - } - }, - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - } + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" } } } }, - "multiaddr-to-uri": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/multiaddr-to-uri/-/multiaddr-to-uri-6.0.0.tgz", - "integrity": "sha512-OjpkVHOXEmIKMO8WChzzQ7aZQcSQX8squxmvtDbRpy7/QNmJ3Z7jv6qyD74C28QtaeNie8O8ngW2AkeiMmKP7A==", + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, - "optional": true, "requires": { - "multiaddr": "^8.0.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, - "multibase": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", - "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" - }, - "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - } + "p-locate": "^4.1.0" } }, - "multicodec": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", - "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", "dev": true, - "requires": { - "varint": "^5.0.0" - } + "peer": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "dev": true + }, + "lodash.isequalwith": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.isequalwith/-/lodash.isequalwith-4.4.0.tgz", + "integrity": "sha512-dcZON0IalGBpRmJBmMkaoV7d3I80R2O+FrzsZyHdNSFrANq/cgDqKQNmAHE8UEj4+QYWwwhkQOVdLHiAopzlsQ==", + "dev": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "lodash.omit": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", + "integrity": "sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg==", + "dev": true + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q==", + "dev": true }, - "multiformats": { - "version": "9.6.4", - "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-9.6.4.tgz", - "integrity": "sha512-fCCB6XMrr6CqJiHNjfFNGT0v//dxOBMrOMqUIzpPc/mmITweLEyhvMpY9bF+jZ9z3vaMAau5E8B68DW77QMXkg==", + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", "dev": true, - "optional": true + "peer": true }, - "multihashes": { - "version": "0.4.21", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", - "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "requires": { - "buffer": "^5.5.0", - "multibase": "^0.7.0", - "varint": "^5.0.0" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "color-convert": "^2.0.1" } }, - "multibase": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", - "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "base-x": "^3.0.8", - "buffer": "^5.5.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "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==", + "dev": true, + "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==", + "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==", + "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" } } } }, - "multihashing-async": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-2.1.4.tgz", - "integrity": "sha512-sB1MiQXPSBTNRVSJc2zM157PXgDtud2nMFUEIvBrsq5Wv96sUclMRK/ecjoP1T/W61UJBqt4tCTwMkUpt2Gbzg==", + "log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", "dev": true, - "optional": true, "requires": { - "blakejs": "^1.1.0", - "err-code": "^3.0.0", - "js-sha3": "^0.8.0", - "multihashes": "^4.0.1", - "murmurhash3js-revisited": "^3.0.0", - "uint8arrays": "^3.0.0" + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "dependencies": { - "err-code": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz", - "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==", + "ansi-escapes": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", "dev": true, - "optional": true + "requires": { + "environment": "^1.0.0" + } }, - "js-sha3": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", - "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", "dev": true, - "optional": true + "requires": { + "get-east-asian-width": "^1.0.0" + } }, - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", + "slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", "dev": true, - "optional": true, "requires": { - "@multiformats/base-x": "^4.0.1" + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" } }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", + "string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, - "optional": true, "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" + "ansi-regex": "^6.0.1" } }, - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", + "wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, - "optional": true, "requires": { - "multiformats": "^9.4.2" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" } } } }, - "murmurhash3js-revisited": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz", - "integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==", + "loupe": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", + "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", "dev": true, - "optional": true + "requires": { + "get-func-name": "^2.0.0" + } + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true }, - "nan": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", + "lower-case-first": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz", + "integrity": "sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E=", "dev": true, - "optional": true + "requires": { + "lower-case": "^1.1.2" + } }, - "nano-base32": { + "lowercase-keys": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/nano-base32/-/nano-base32-1.0.1.tgz", - "integrity": "sha1-ulSMh578+5DaHE2eCX20pGySVe8=", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", "dev": true }, - "nano-json-stream-parser": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", - "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=", + "lru_map": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", + "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==", "dev": true }, - "nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "optional": true - }, - "napi-macros": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", - "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==", + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, - "optional": true + "requires": { + "yallist": "^4.0.0" + } }, - "native-abort-controller": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/native-abort-controller/-/native-abort-controller-1.0.4.tgz", - "integrity": "sha512-zp8yev7nxczDJMoP6pDxyD20IU0T22eX8VwN2ztDccKvSZhRaV33yP1BGwKSZfXuqWUzsXopVFjBdau9OOAwMQ==", + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", "dev": true, - "optional": true + "requires": { + "es5-ext": "~0.10.2" + } }, - "native-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/native-fetch/-/native-fetch-3.0.0.tgz", - "integrity": "sha512-G3Z7vx0IFb/FQ4JxvtqGABsOTIqRWvgQz6e+erkB+JJD6LrszQtMozEHI4EkmgZQvnGHrpLVzUWk7t4sJCIkVw==", + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true, - "optional": true + "peer": true }, - "needle": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.9.1.tgz", - "integrity": "sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ==", + "markdown-table": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz", + "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==", "dev": true, - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "optional": true - } - } - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "dev": true + "peer": true }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "match-all": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/match-all/-/match-all-1.2.6.tgz", + "integrity": "sha512-0EESkXiTkWzrQQntBu2uzKvLu6vVkUGz40nGPbSZuegcfE5UuSzNjLaIu76zJWuaT/2I3Z/8M06OlUOZLGwLlQ==", "dev": true }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "mcl-wasm": { + "version": "0.7.9", + "resolved": "https://registry.npmjs.org/mcl-wasm/-/mcl-wasm-0.7.9.tgz", + "integrity": "sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ==", "dev": true }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "requires": { - "lower-case": "^1.1.1" + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, - "node-addon-api": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", - "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "dev": true }, - "node-emoji": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", - "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", + "memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", "dev": true, "requires": { - "lodash": "^4.17.21" + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" } }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "memory-level": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/memory-level/-/memory-level-1.0.0.tgz", + "integrity": "sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og==", "dev": true, "requires": { - "whatwg-url": "^5.0.0" + "abstract-level": "^1.0.0", + "functional-red-black-tree": "^1.0.1", + "module-error": "^1.0.1" } }, - "node-forge": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==", + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=", + "dev": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", + "dev": true + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "optional": true + "peer": true }, - "node-gyp-build": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.3.tgz", - "integrity": "sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==", + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", "dev": true }, - "node-interval-tree": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/node-interval-tree/-/node-interval-tree-1.3.3.tgz", - "integrity": "sha512-K9vk96HdTK5fEipJwxSvIIqwTqr4e3HRJeJrNxBSeVMNSC/JWARRaX7etOLOuTmrRMeOI/K5TCJu3aWIwZiNTw==", + "micro-ftch": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "dev": true + }, + "micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "requires": { - "shallowequal": "^1.0.2" + "braces": "^3.0.3", + "picomatch": "^2.3.1" } }, - "node-pre-gyp": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz", - "integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==", + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "dev": true, - "optional": true, "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - }, - "dependencies": { - "nopt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - } + "bn.js": "^4.0.0", + "brorand": "^1.0.1" } }, - "node-releases": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.3.tgz", - "integrity": "sha512-maHFz6OLqYxz+VQyCAtA3PTX4UP/53pa05fyDNc9CwjvJ0yEh6+xBwKsgCxMNhS8taUKBFYxfuiaD9U/55iFaw==", + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true }, - "nofilter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz", - "integrity": "sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==", + "mime-db": { + "version": "1.48.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", + "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==", "dev": true }, - "noop-fn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/noop-fn/-/noop-fn-1.0.0.tgz", - "integrity": "sha1-XzPUfxPSFQ35PgywNmmemC94/78=", - "dev": true, - "optional": true - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "mime-types": { + "version": "2.1.31", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", + "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", "dev": true, "requires": { - "abbrev": "1" + "mime-db": "1.48.0" } }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true + }, + "mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", "dev": true, "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "dom-walk": "^0.1.0" } }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", "dev": true }, - "normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", "dev": true }, - "npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", "dev": true, - "optional": true, "requires": { - "npm-normalize-package-bin": "^1.0.1" + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + }, + "dependencies": { + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } } }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", - "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", "dev": true, - "optional": true, "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1", - "npm-normalize-package-bin": "^1.0.1" + "minipass": "^2.9.0" } }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, - "optional": true, "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "minimist": "^1.2.5" } }, - "nth-check": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", - "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "mkdirp-promise": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz", + "integrity": "sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE=", "dev": true, "requires": { - "boolbase": "^1.0.0" + "mkdirp": "*" } }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "mnemonist": { + "version": "0.38.5", + "resolved": "https://registry.npmjs.org/mnemonist/-/mnemonist-0.38.5.tgz", + "integrity": "sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg==", "dev": true, "requires": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" + "obliterator": "^2.0.0" + } + }, + "mocha": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.7.3.tgz", + "integrity": "sha512-uQWxAu44wwiACGqjbPYmjo7Lg8sFrS3dQe7PP2FQI+woptP4vZXSMcfMyFL/e1yFEeEpV4RtyTpZROOKmxis+A==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" }, "dependencies": { - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "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" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "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==", + "dev": true, + "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==", + "dev": true + }, + "debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "requires": { + "ms": "^2.1.3" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "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==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true } } }, - "nwmatcher": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.4.tgz", - "integrity": "sha512-3iuY4N5dhgMpCUrOVnuAdGrgxVqV2cJpM+XNccjR2DKOB1RUP0aA+wGXEiNziG/UKboFyGBIoKOaNlJxx8bciQ==", - "dev": true, - "optional": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "mock-fs": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.14.0.tgz", + "integrity": "sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw==", "dev": true }, - "object-inspect": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", - "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==", + "module-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", + "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", "dev": true }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "oboe": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", - "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", - "dev": true, - "requires": { - "http-https": "^1.0.0" - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "multibase": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz", + "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==", "dev": true, "requires": { - "ee-first": "1.1.1" + "base-x": "^3.0.8", + "buffer": "^5.5.0" + }, + "dependencies": { + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + } } }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "multicodec": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.7.tgz", + "integrity": "sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA==", "dev": true, "requires": { - "wrappy": "1" + "varint": "^5.0.0" } }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "multihashes": { + "version": "0.4.21", + "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz", + "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==", "dev": true, - "optional": true, "requires": { - "mimic-fn": "^2.1.0" + "buffer": "^5.5.0", + "multibase": "^0.7.0", + "varint": "^5.0.0" + }, + "dependencies": { + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "multibase": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz", + "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==", + "dev": true, + "requires": { + "base-x": "^3.0.8", + "buffer": "^5.5.0" + } + } } }, - "opencollective-postinstall": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", - "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==", - "dev": true - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "murmur-128": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/murmur-128/-/murmur-128-0.2.1.tgz", + "integrity": "sha512-WseEgiRkI6aMFBbj8Cg9yBj/y+OdipwVC7zUo3W2W1JAJITwouUOtpqsmGSg67EQmwwSyod7hsVsWY5LsrfQVg==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "encode-utf8": "^1.0.2", + "fmix": "^0.1.0", + "imul": "^1.0.0" } }, - "original-require": { + "nano-base32": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/original-require/-/original-require-1.0.1.tgz", - "integrity": "sha1-DxMEcVhM0zURxew4yNWSE/msXiA=", + "resolved": "https://registry.npmjs.org/nano-base32/-/nano-base32-1.0.1.tgz", + "integrity": "sha1-ulSMh578+5DaHE2eCX20pGySVe8=", "dev": true }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true, - "optional": true - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "nano-json-stream-parser": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz", + "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=", "dev": true }, - "p-defer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-3.0.0.tgz", - "integrity": "sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw==", - "dev": true, - "optional": true - }, - "p-fifo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-fifo/-/p-fifo-1.0.0.tgz", - "integrity": "sha512-IjoCxXW48tqdtDFz6fqo5q1UfFVjjVZe8TC1QRflvNUJtNfCUhxOUw6MOVZhDPjqhSzc26xKdugsO17gmzd5+A==", - "dev": true, - "optional": true, - "requires": { - "fast-fifo": "^1.0.0", - "p-defer": "^3.0.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "napi-macros": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", + "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==", "dev": true }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-timeout": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", - "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", "dev": true }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "dev": true, - "requires": { - "no-case": "^2.2.0" - } - }, - "paramap-it": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/paramap-it/-/paramap-it-0.1.1.tgz", - "integrity": "sha512-3uZmCAN3xCw7Am/4ikGzjjR59aNMJVXGSU7CjG2Z6DfOAdhnLdCOd0S0m1sTkN4ov9QhlE3/jkzyu953hq0uwQ==", - "dev": true, - "optional": true, - "requires": { - "event-iterator": "^1.0.0" - } + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } + "next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true }, - "parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", "dev": true, "requires": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" + "lower-case": "^1.1.1" } }, - "parse-duration": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-0.4.4.tgz", - "integrity": "sha512-KbAJuYGUhZkB9gotDiKLnZ7Z3VTacK3fgwmDdB6ZVDtJbMBT6MfLga0WJaYpPDu0mzqT0NgHtHDt5PY4l0nidg==", - "dev": true, - "optional": true - }, - "parse-headers": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", - "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==", + "node-addon-api": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", + "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==", "dev": true }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "node-emoji": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz", + "integrity": "sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==", "dev": true, + "peer": true, "requires": { - "error-ex": "^1.2.0" + "lodash": "^4.17.21" } }, - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, - "parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", + "node-environment-flags": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", + "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", "dev": true, + "peer": true, "requires": { - "parse5": "^6.0.1" + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" } }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true - }, - "pascal-case": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz", - "integrity": "sha1-LVeNNFX2YNpl7KGO+VtODekSdh4=", + "node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "dev": true, "requires": { - "camel-case": "^3.0.0", - "upper-case-first": "^1.1.0" + "whatwg-url": "^5.0.0" } }, - "patched-openzeppelin-test-helpers": { - "version": "file:patched-openzeppelin-test-helpers", + "node-gyp-build": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz", + "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==", "dev": true }, - "path-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", - "integrity": "sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU=", + "nofilter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz", + "integrity": "sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA==", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", "dev": true, + "peer": true, "requires": { - "no-case": "^2.2.0" + "abbrev": "1" } }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "requires": { - "pinkie-promise": "^2.0.0" + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, - "path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", "dev": true }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "path-key": "^4.0.0" + }, + "dependencies": { + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + } } }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", "dev": true, "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "boolbase": "^1.0.0" } }, - "peer-id": { - "version": "0.14.8", - "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.14.8.tgz", - "integrity": "sha512-GpuLpob/9FrEFvyZrKKsISEkaBYsON2u0WtiawLHj1ii6ewkoeRiSDFLyIefYhw0jGvQoeoZS05jaT52X7Bvig==", + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", "dev": true, - "optional": true, "requires": { - "cids": "^1.1.5", - "class-is": "^1.1.0", - "libp2p-crypto": "^0.19.0", - "minimist": "^1.2.5", - "multihashes": "^4.0.2", - "protobufjs": "^6.10.2", - "uint8arrays": "^2.0.5" + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" }, "dependencies": { - "cids": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/cids/-/cids-1.1.9.tgz", - "integrity": "sha512-l11hWRfugIcbGuTZwAM5PwpjPPjyb6UZOGwlHSnOBV5o07XhQ4gNpBN67FbODvpjyHtd+0Xs6KNvUcGBiDRsdg==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "multicodec": "^3.0.1", - "multihashes": "^4.0.1", - "uint8arrays": "^3.0.0" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - } - } - }, - "multibase": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-4.0.6.tgz", - "integrity": "sha512-x23pDe5+svdLz/k5JPGCVdfn7Q5mZVMBETiC+ORfO+sor9Sgs0smJzAjfTbM5tckeCqnaUuMYoz+k3RXMmJClQ==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1" - } - }, - "multicodec": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-3.2.1.tgz", - "integrity": "sha512-+expTPftro8VAW8kfvcuNNNBgb9gPeNYV9dn+z1kJRWF2vih+/S79f2RVeIwmrJBUJ6NT9IUPWnZDQvegEh5pw==", - "dev": true, - "optional": true, - "requires": { - "uint8arrays": "^3.0.0", - "varint": "^6.0.0" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - } - } - }, - "multihashes": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-4.0.3.tgz", - "integrity": "sha512-0AhMH7Iu95XjDLxIeuCOOE4t9+vQZsACyKZ9Fxw2pcsRmlX4iCn1mby0hS0bb+nQOVpdQYWPpnyusw4da5RPhA==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^4.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.2" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", - "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==", - "dev": true, - "optional": true - } - } - }, - "uint8arrays": { - "version": "2.1.10", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-2.1.10.tgz", - "integrity": "sha512-Q9/hhJa2836nQfEJSZTmr+pg9+cDJS9XEAp7N2Vg5MzL3bK/mkMVfjscRGYruP9jNda6MAdf4QD/y78gSzkp6A==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - }, - "varint": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz", - "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==", - "dev": true, - "optional": true + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true } } }, - "pem-jwk": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pem-jwk/-/pem-jwk-2.0.0.tgz", - "integrity": "sha512-rFxu7rVoHgQ5H9YsP50dDWf0rHjreVA2z0yPiWr5WdH/UHb29hKtF7h6l8vNd1cbYR1t0QL+JKhW55a2ZV4KtA==", - "dev": true, - "optional": true, - "requires": { - "asn1.js": "^5.0.1" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true + "object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + } }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "object.getownpropertydescriptors": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz", + "integrity": "sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==", "dev": true, + "peer": true, "requires": { - "pinkie": "^2.0.0" + "array.prototype.reduce": "^1.0.5", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.21.2", + "safe-array-concat": "^1.0.0" } }, - "pkg-dir": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", - "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", + "obliterator": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/obliterator/-/obliterator-2.0.4.tgz", + "integrity": "sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ==", + "dev": true + }, + "oboe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/oboe/-/oboe-2.1.5.tgz", + "integrity": "sha1-VVQoTFQ6ImbXo48X4HOCH73jk80=", "dev": true, "requires": { - "find-up": "^5.0.0" - }, - "dependencies": { - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } + "http-https": "^1.0.0" } }, - "pkg-up": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz", - "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==", + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", "dev": true, - "optional": true, "requires": { - "find-up": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "optional": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "optional": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "optional": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "optional": true - } + "ee-first": "1.1.1" } }, - "please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { - "semver-compare": "^1.0.0" + "wrappy": "1" } }, - "pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, - "optional": true + "requires": { + "mimic-fn": "^4.0.0" + } }, - "pouchdb": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/pouchdb/-/pouchdb-7.2.2.tgz", - "integrity": "sha512-5gf5nw5XH/2H/DJj8b0YkvG9fhA/4Jt6kL0Y8QjtztVjb1y4J19Rg4rG+fUbXu96gsUrlyIvZ3XfM0b4mogGmw==", + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, - "optional": true, + "peer": true, "requires": { - "abort-controller": "3.0.0", - "argsarray": "0.0.1", - "buffer-from": "1.1.1", - "clone-buffer": "1.0.0", - "double-ended-queue": "2.1.0-0", - "fetch-cookie": "0.10.1", - "immediate": "3.3.0", - "inherits": "2.0.4", - "level": "6.0.1", - "level-codec": "9.0.2", - "level-write-stream": "1.0.0", - "leveldown": "5.6.0", - "levelup": "4.4.0", - "ltgt": "2.2.1", - "node-fetch": "2.6.0", - "readable-stream": "1.1.14", - "spark-md5": "3.0.1", - "through2": "3.0.2", - "uuid": "8.1.0", - "vuvuzela": "1.0.3" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "optional": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "deferred-leveldown": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", - "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", - "dev": true, - "optional": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "inherits": "^2.0.3" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true, - "optional": true - }, - "level-codec": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", - "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.6.0" - } - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "dev": true, - "optional": true - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, - "optional": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", - "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", - "dev": true, - "optional": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.4.0", - "xtend": "^4.0.2" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "optional": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "dev": true, - "optional": true, - "requires": { - "xtend": "^4.0.2" - } - }, - "levelup": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", - "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", - "dev": true, - "optional": true, - "requires": { - "deferred-leveldown": "~5.3.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~4.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "node-fetch": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", - "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", - "dev": true, - "optional": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - }, - "dependencies": { - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true, - "optional": true - } - } - }, - "uuid": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz", - "integrity": "sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg==", - "dev": true, - "optional": true - } + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" } }, - "pouchdb-abstract-mapreduce": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-7.3.0.tgz", - "integrity": "sha512-+2fVt3SDh7D776lIGbYZOsKX5js1aUyUw7iJaTGitxSdQ2ObWSTrr3SUrj5Qo1CkgPXwRM3Tdoq/53JYAa2qCA==", + "ordinal": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ordinal/-/ordinal-1.0.3.tgz", + "integrity": "sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ==", + "dev": true, + "peer": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, - "optional": true, "requires": { - "pouchdb-binary-utils": "7.3.0", - "pouchdb-collate": "7.3.0", - "pouchdb-collections": "7.3.0", - "pouchdb-errors": "7.3.0", - "pouchdb-fetch": "7.3.0", - "pouchdb-mapreduce-utils": "7.3.0", - "pouchdb-md5": "7.3.0", - "pouchdb-utils": "7.3.0" + "lcid": "^1.0.0" } }, - "pouchdb-adapter-leveldb-core": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-adapter-leveldb-core/-/pouchdb-adapter-leveldb-core-7.3.0.tgz", - "integrity": "sha512-OyUsEae1JlqR2jSGMohP03gj6VANh9fDR/3nPIa1vYyoQWlwQzOS7knKqDaJm7Nui3JC5q/lWos7/FGZBFuF5Q==", + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "optional": true, "requires": { - "argsarray": "0.0.1", - "buffer-from": "1.1.2", - "double-ended-queue": "2.1.0-0", - "levelup": "4.4.0", - "pouchdb-adapter-utils": "7.3.0", - "pouchdb-binary-utils": "7.3.0", - "pouchdb-collections": "7.3.0", - "pouchdb-errors": "7.3.0", - "pouchdb-json": "7.3.0", - "pouchdb-md5": "7.3.0", - "pouchdb-merge": "7.3.0", - "pouchdb-utils": "7.3.0", - "sublevel-pouchdb": "7.3.0", - "through2": "3.0.2" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", - "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.5.0", - "immediate": "^3.2.3", - "level-concat-iterator": "~2.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "optional": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "optional": true - }, - "deferred-leveldown": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", - "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", - "dev": true, - "optional": true, - "requires": { - "abstract-leveldown": "~6.2.1", - "inherits": "^2.0.3" - } - }, - "level-concat-iterator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", - "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", - "dev": true, - "optional": true - }, - "level-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", - "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", - "dev": true, - "optional": true, - "requires": { - "errno": "~0.1.1" - } - }, - "level-iterator-stream": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", - "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", - "dev": true, - "optional": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "^3.4.0", - "xtend": "^4.0.2" - } - }, - "level-supports": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", - "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", - "dev": true, - "optional": true, - "requires": { - "xtend": "^4.0.2" - } - }, - "levelup": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", - "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", - "dev": true, - "optional": true, - "requires": { - "deferred-leveldown": "~5.3.0", - "level-errors": "~2.0.0", - "level-iterator-stream": "~4.0.0", - "level-supports": "~1.0.0", - "xtend": "~4.0.0" - } - } + "p-try": "^2.0.0" } }, - "pouchdb-adapter-memory": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-adapter-memory/-/pouchdb-adapter-memory-7.3.0.tgz", - "integrity": "sha512-nUdYi5KpbUa0uv0L3IJorpiUnIOBPxX9qplCX9i7JE8OtLPeLyKuX3WC+3M1//8Lmmxg3b1wXSNIod6FJy4wAQ==", + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "optional": true, "requires": { - "memdown": "1.4.1", - "pouchdb-adapter-leveldb-core": "7.3.0", - "pouchdb-utils": "7.3.0" + "p-limit": "^2.2.0" } }, - "pouchdb-adapter-node-websql": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-adapter-node-websql/-/pouchdb-adapter-node-websql-7.0.0.tgz", - "integrity": "sha512-fNaOMO8bvMrRTSfmH4RSLSpgnKahRcCA7Z0jg732PwRbGvvMdGbreZwvKPPD1fg2tm2ZwwiXWK2G3+oXyoqZYw==", + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, - "optional": true, "requires": { - "pouchdb-adapter-websql-core": "7.0.0", - "pouchdb-utils": "7.0.0", - "websql": "1.0.0" - }, - "dependencies": { - "buffer-from": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", - "dev": true, - "optional": true - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "dev": true, - "optional": true - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true, - "optional": true - }, - "pouchdb-binary-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.0.0.tgz", - "integrity": "sha512-yUktdOPIPvOVouCjJN3uop+bCcpdPwePrLm9eUAZNgEYnUFu0njdx7Q0WRsZ7UJ6l75HinL5ZHk4bnvEt86FLw==", - "dev": true, - "optional": true, - "requires": { - "buffer-from": "1.1.0" - } - }, - "pouchdb-collections": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.0.0.tgz", - "integrity": "sha512-DaoUr/vU24Q3gM6ghj0va9j/oBanPwkbhkvnqSyC3Dm5dgf5pculNxueLF9PKMo3ycApoWzHMh6N2N8KJbDU2Q==", - "dev": true, - "optional": true - }, - "pouchdb-errors": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.0.0.tgz", - "integrity": "sha512-dTusY8nnTw4HIztCrNl7AoGgwvS1bVf/3/97hDaGc4ytn72V9/4dK8kTqlimi3UpaurohYRnqac0SGXYP8vgXA==", - "dev": true, - "optional": true, - "requires": { - "inherits": "2.0.3" - } - }, - "pouchdb-md5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.0.0.tgz", - "integrity": "sha512-yaSJKhLA3QlgloKUQeb2hLdT3KmUmPfoYdryfwHZuPTpXIRKTnMQTR9qCIRUszc0ruBpDe53DRslCgNUhAyTNQ==", - "dev": true, - "optional": true, - "requires": { - "pouchdb-binary-utils": "7.0.0", - "spark-md5": "3.0.0" - } - }, - "pouchdb-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.0.0.tgz", - "integrity": "sha512-1bnoX1KdZYHv9wicDIFdO0PLiVIMzNDUBUZ/yOJZ+6LW6niQCB8aCv09ZztmKfSQcU5nnN3fe656tScBgP6dOQ==", - "dev": true, - "optional": true, - "requires": { - "argsarray": "0.0.1", - "clone-buffer": "1.0.0", - "immediate": "3.0.6", - "inherits": "2.0.3", - "pouchdb-collections": "7.0.0", - "pouchdb-errors": "7.0.0", - "pouchdb-md5": "7.0.0", - "uuid": "3.2.1" - } - }, - "spark-md5": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.0.tgz", - "integrity": "sha1-NyIifFTi+vJLHcbZM8wUTm9xv+8=", - "dev": true, - "optional": true - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "dev": true, - "optional": true - } + "aggregate-error": "^3.0.0" } }, - "pouchdb-adapter-utils": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-adapter-utils/-/pouchdb-adapter-utils-7.3.0.tgz", - "integrity": "sha512-mU1+smcagWSpInVx/VQk7VVjjnJlyagKtusUS3OdCMFZY35L6RbXC8eIhoNVDbkBfEv3cIwqQ3t7fdvkaa1odQ==", + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", "dev": true, - "optional": true, "requires": { - "pouchdb-binary-utils": "7.3.0", - "pouchdb-collections": "7.3.0", - "pouchdb-errors": "7.3.0", - "pouchdb-md5": "7.3.0", - "pouchdb-merge": "7.3.0", - "pouchdb-utils": "7.3.0" + "p-finally": "^1.0.0" } }, - "pouchdb-adapter-websql-core": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-adapter-websql-core/-/pouchdb-adapter-websql-core-7.0.0.tgz", - "integrity": "sha512-NyMaH0bl20SdJdOCzd+fwXo8JZ15a48/MAwMcIbXzsRHE4DjFNlRcWAcjUP6uN4Ezc+Gx+r2tkBBMf71mIz1Aw==", + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", "dev": true, - "optional": true, "requires": { - "pouchdb-adapter-utils": "7.0.0", - "pouchdb-binary-utils": "7.0.0", - "pouchdb-collections": "7.0.0", - "pouchdb-errors": "7.0.0", - "pouchdb-json": "7.0.0", - "pouchdb-merge": "7.0.0", - "pouchdb-utils": "7.0.0" - }, - "dependencies": { - "buffer-from": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", - "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", - "dev": true, - "optional": true - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "dev": true, - "optional": true - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true, - "optional": true - }, - "pouchdb-adapter-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-adapter-utils/-/pouchdb-adapter-utils-7.0.0.tgz", - "integrity": "sha512-UWKPC6jkz6mHUzZefrU7P5X8ZGvBC8LSNZ7BIp0hWvJE6c20cnpDwedTVDpZORcCbVJpDmFOHBYnOqEIblPtbA==", - "dev": true, - "optional": true, - "requires": { - "pouchdb-binary-utils": "7.0.0", - "pouchdb-collections": "7.0.0", - "pouchdb-errors": "7.0.0", - "pouchdb-md5": "7.0.0", - "pouchdb-merge": "7.0.0", - "pouchdb-utils": "7.0.0" - } - }, - "pouchdb-binary-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.0.0.tgz", - "integrity": "sha512-yUktdOPIPvOVouCjJN3uop+bCcpdPwePrLm9eUAZNgEYnUFu0njdx7Q0WRsZ7UJ6l75HinL5ZHk4bnvEt86FLw==", - "dev": true, - "optional": true, - "requires": { - "buffer-from": "1.1.0" - } - }, - "pouchdb-collections": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.0.0.tgz", - "integrity": "sha512-DaoUr/vU24Q3gM6ghj0va9j/oBanPwkbhkvnqSyC3Dm5dgf5pculNxueLF9PKMo3ycApoWzHMh6N2N8KJbDU2Q==", - "dev": true, - "optional": true - }, - "pouchdb-errors": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.0.0.tgz", - "integrity": "sha512-dTusY8nnTw4HIztCrNl7AoGgwvS1bVf/3/97hDaGc4ytn72V9/4dK8kTqlimi3UpaurohYRnqac0SGXYP8vgXA==", - "dev": true, - "optional": true, - "requires": { - "inherits": "2.0.3" - } - }, - "pouchdb-json": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-json/-/pouchdb-json-7.0.0.tgz", - "integrity": "sha512-w0bNRu/7VmmCrFWMYAm62n30wvJJUT2SokyzeTyj3hRohj4GFwTRg1mSZ+iAmxgRKOFE8nzZstLG/WAB4Ymjew==", - "dev": true, - "optional": true, - "requires": { - "vuvuzela": "1.0.3" - } - }, - "pouchdb-md5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.0.0.tgz", - "integrity": "sha512-yaSJKhLA3QlgloKUQeb2hLdT3KmUmPfoYdryfwHZuPTpXIRKTnMQTR9qCIRUszc0ruBpDe53DRslCgNUhAyTNQ==", - "dev": true, - "optional": true, - "requires": { - "pouchdb-binary-utils": "7.0.0", - "spark-md5": "3.0.0" - } - }, - "pouchdb-merge": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-merge/-/pouchdb-merge-7.0.0.tgz", - "integrity": "sha512-tci5u6NpznQhGcPv4ho1h0miky9rs+ds/T9zQ9meQeDZbUojXNaX1Jxsb0uYEQQ+HMqdcQs3Akdl0/u0mgwPGg==", - "dev": true, - "optional": true - }, - "pouchdb-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.0.0.tgz", - "integrity": "sha512-1bnoX1KdZYHv9wicDIFdO0PLiVIMzNDUBUZ/yOJZ+6LW6niQCB8aCv09ZztmKfSQcU5nnN3fe656tScBgP6dOQ==", - "dev": true, - "optional": true, - "requires": { - "argsarray": "0.0.1", - "clone-buffer": "1.0.0", - "immediate": "3.0.6", - "inherits": "2.0.3", - "pouchdb-collections": "7.0.0", - "pouchdb-errors": "7.0.0", - "pouchdb-md5": "7.0.0", - "uuid": "3.2.1" - } - }, - "spark-md5": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.0.tgz", - "integrity": "sha1-NyIifFTi+vJLHcbZM8wUTm9xv+8=", - "dev": true, - "optional": true - }, - "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "dev": true, - "optional": true - } + "no-case": "^2.2.0" } }, - "pouchdb-binary-utils": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.3.0.tgz", - "integrity": "sha512-xvBH/XGHGcou2vkEzszJxkCc7YElfRUrkLUg51Jbdmh1mogLDUO0bU3Tj6TOIIJfRkQrU/HV+dDkMAhsil0amQ==", + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", "dev": true, - "optional": true, "requires": { - "buffer-from": "1.1.2" - }, - "dependencies": { - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "optional": true - } + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" } }, - "pouchdb-collate": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-collate/-/pouchdb-collate-7.3.0.tgz", - "integrity": "sha512-ys7rXKtEr6cfghgUjknwFJiOkITebV6JmeTybJKCzMV0r2luXu0OoPQsKVpE/wbM/3F5LxfpbFKGFpPcfGMvTA==", + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==", "dev": true, - "optional": true + "peer": true }, - "pouchdb-collections": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.3.0.tgz", - "integrity": "sha512-Xr54m2+fErShXn+qAT4xwqJ+8NwddNPeTMJT4z4k1sZsrwfHmZsWbsKAyGPMF04eQaaU+7DDRMciu2VzaBUXyg==", - "dev": true, - "optional": true + "parse-headers": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.3.tgz", + "integrity": "sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA==", + "dev": true }, - "pouchdb-debug": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/pouchdb-debug/-/pouchdb-debug-7.2.1.tgz", - "integrity": "sha512-eP3ht/AKavLF2RjTzBM6S9gaI2/apcW6xvaKRQhEdOfiANqerFuksFqHCal3aikVQuDO+cB/cw+a4RyJn/glBw==", + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, - "optional": true, "requires": { - "debug": "3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "optional": true, - "requires": { - "ms": "2.0.0" - } - } + "error-ex": "^1.2.0" } }, - "pouchdb-errors": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.3.0.tgz", - "integrity": "sha512-dTBbIC1BbCy6J9W/Csg5xROgb3wJN3HpbgAJHHSEtAkb8oA45KZmU3ZwEpNhf0AfPuQm4XgW1936PvlDlGgJiw==", + "parse5": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", "dev": true, - "optional": true, "requires": { - "inherits": "2.0.4" + "entities": "^4.4.0" } }, - "pouchdb-fetch": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-fetch/-/pouchdb-fetch-7.3.0.tgz", - "integrity": "sha512-8/lcg8iMDG+GVs1dHNXA4ktJSEpH71dHU3xesMJ25tNQOqfAaaWrkfz9j71ZYDDkveLYE6UjUzl/sDacu2hSjw==", + "parse5-htmlparser2-tree-adapter": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", + "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", "dev": true, - "optional": true, "requires": { - "abort-controller": "3.0.0", - "fetch-cookie": "0.11.0", - "node-fetch": "2.6.7" - }, - "dependencies": { - "fetch-cookie": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/fetch-cookie/-/fetch-cookie-0.11.0.tgz", - "integrity": "sha512-BQm7iZLFhMWFy5CZ/162sAGjBfdNWb7a8LEqqnzsHFhxT/X/SVj/z2t2nu3aJvjlbQkrAlTUApplPRjWyH4mhA==", - "dev": true, - "optional": true, - "requires": { - "tough-cookie": "^2.3.3 || ^3.0.1 || ^4.0.0" - } - } + "domhandler": "^5.0.2", + "parse5": "^7.0.0" } }, - "pouchdb-find": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-find/-/pouchdb-find-7.3.0.tgz", - "integrity": "sha512-EwhnfyxCAkKf8PG4tfndTTygEmtuz+o1LiZkxfPrflfXA3m1jo1ithib0hwBYtEwEYWuZxH6B8pRZutbLoQCGA==", + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "dev": true + }, + "pascal-case": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz", + "integrity": "sha1-LVeNNFX2YNpl7KGO+VtODekSdh4=", "dev": true, - "optional": true, "requires": { - "pouchdb-abstract-mapreduce": "7.3.0", - "pouchdb-collate": "7.3.0", - "pouchdb-errors": "7.3.0", - "pouchdb-fetch": "7.3.0", - "pouchdb-md5": "7.3.0", - "pouchdb-selector-core": "7.3.0", - "pouchdb-utils": "7.3.0" + "camel-case": "^3.0.0", + "upper-case-first": "^1.1.0" } }, - "pouchdb-json": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-json/-/pouchdb-json-7.3.0.tgz", - "integrity": "sha512-D4wyi20ltyiFpuziQeMk3CbXs/Q58VoGTYTJQY8MWBw37OidtHGQAt1Kh5yJ435wJqDzJZyxMA5RxGZxEOBDVg==", + "path-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", + "integrity": "sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU=", "dev": true, - "optional": true, "requires": { - "vuvuzela": "1.0.3" + "no-case": "^2.2.0" } }, - "pouchdb-mapreduce-utils": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-mapreduce-utils/-/pouchdb-mapreduce-utils-7.3.0.tgz", - "integrity": "sha512-KDVSd+H2r+XWTrQfKWV71SknDDYRjYXoeWs0ZQl3xITHCcTl+fIgqyagg/XN+Zy/U9LeLPGMe2JdgPx9H8lJgw==", + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, - "optional": true, "requires": { - "argsarray": "0.0.1", - "inherits": "2.0.4", - "pouchdb-collections": "7.3.0", - "pouchdb-utils": "7.3.0" + "pinkie-promise": "^2.0.0" } }, - "pouchdb-md5": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.3.0.tgz", - "integrity": "sha512-wL04QgoKyd/L/TV5gxgcvlEyCJiZoXCOEFJklTzkdza/kBQNJGPH7i0ZhKa7Sb+AvZYoWZHddf1Zgv7rBScHkA==", + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "dev": true + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, - "optional": true, "requires": { - "pouchdb-binary-utils": "7.3.0", - "spark-md5": "3.0.2" - }, - "dependencies": { - "spark-md5": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.2.tgz", - "integrity": "sha512-wcFzz9cDfbuqe0FZzfi2or1sgyIrsDwmPwfZC4hiNidPdPINjeUwNfv5kldczoEAcjl9Y1L3SM7Uz2PUEQzxQw==", - "dev": true, - "optional": true - } + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, - "pouchdb-merge": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-merge/-/pouchdb-merge-7.3.0.tgz", - "integrity": "sha512-E7LmchMzwYFm6V8OBxejzARLisanpksOju2LEfuiYnotGfNDeW7MByP0qBH0/zF8BfUyyjA1cl7ByaEpsapkeQ==", - "dev": true, - "optional": true + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true }, - "pouchdb-selector-core": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-selector-core/-/pouchdb-selector-core-7.3.0.tgz", - "integrity": "sha512-sK/cCrIGeL9ImcMhKGcwa54+bzX7Wv4hhVV+oUW3T1Nasaoxh+Muem1GuA+x1+SbTCE8y37rUg8i6DIOhX51ew==", + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "dev": true, - "optional": true, "requires": { - "pouchdb-collate": "7.3.0", - "pouchdb-utils": "7.3.0" + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" } }, - "pouchdb-utils": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.3.0.tgz", - "integrity": "sha512-HH+5IXXWn/ZgVCSnrlydBMYn6MabT7RS7SNoo9w8qVH9efpZSp3eLchw6yMQNLw8LQefWmbbskiHV9VgJmSVWQ==", + "pend": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", + "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, - "optional": true, "requires": { - "argsarray": "0.0.1", - "clone-buffer": "1.0.0", - "immediate": "3.3.0", - "inherits": "2.0.4", - "pouchdb-collections": "7.3.0", - "pouchdb-errors": "7.3.0", - "pouchdb-md5": "7.3.0", - "uuid": "8.3.2" - }, - "dependencies": { - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "optional": true - } + "pinkie": "^2.0.0" } }, - "precond": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", - "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=", + "plantuml-encoder": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/plantuml-encoder/-/plantuml-encoder-1.4.0.tgz", + "integrity": "sha512-sxMwpDw/ySY1WB2CE3+IdMuEcWibJ72DDOsXLkSmEaSzwEUaYBT6DWgOfBiHGCux4q433X6+OEFWjlVqp7gL6g==", + "dev": true + }, + "pollock": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/pollock/-/pollock-0.2.1.tgz", + "integrity": "sha512-2Xy6LImSXm0ANKv9BKSVuCa6Z4ACbK7oUrl9gtUgqLkekL7n9C0mlWsOGYYuGbCG8xT0x3Q4F31C3ZMyVQjwsg==", "dev": true }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true + "dev": true, + "peer": true }, "prepend-http": { "version": "2.0.0", @@ -16556,6 +29764,43 @@ "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", "dev": true }, + "prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true + }, + "prettier-plugin-organize-imports": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-4.0.0.tgz", + "integrity": "sha512-vnKSdgv9aOlqKeEFGhf9SCBsTyzDSyScy1k7E0R1Uo4L0cTcOV7c1XQaT7jfXIOc/p08WLBfN2QUQA9zDSZMxA==", + "dev": true, + "requires": {} + }, + "prettier-plugin-solidity": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.4.1.tgz", + "integrity": "sha512-Mq8EtfacVZ/0+uDKTtHZGW3Aa7vEbX/BNx63hmVg6YTiTXSiuKP0amj0G6pGwjmLaOfymWh3QgXEZkjQbU8QRg==", + "dev": true, + "requires": { + "@solidity-parser/parser": "^0.18.0", + "semver": "^7.5.4" + }, + "dependencies": { + "@solidity-parser/parser": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.18.0.tgz", + "integrity": "sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA==", + "dev": true + }, + "semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true + } + } + }, "printj": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/printj/-/printj-1.1.2.tgz", @@ -16572,79 +29817,34 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "promise-to-callback": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/promise-to-callback/-/promise-to-callback-1.0.0.tgz", - "integrity": "sha1-XSp0kBC/tn2WNZj805YHRqaP7vc=", "dev": true, - "requires": { - "is-fn": "^1.0.0", - "set-immediate-shim": "^1.0.1" - } + "peer": true }, - "protobufjs": { - "version": "6.11.2", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.2.tgz", - "integrity": "sha512-4BQJoPooKJl2G9j3XftkIXjoC9C0Av2NOrWmbLWT1vH32GcSUHjM0Arra6UfTsVyfMAuFzaLucXn1sadxJydAw==", + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", "dev": true, - "optional": true, + "peer": true, "requires": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - }, - "dependencies": { - "@types/node": { - "version": "17.0.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.25.tgz", - "integrity": "sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==", - "dev": true, - "optional": true - } + "asap": "~2.0.6" } }, - "protocol-buffers-schema": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", - "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==", - "dev": true, - "optional": true - }, - "protons": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/protons/-/protons-2.0.3.tgz", - "integrity": "sha512-j6JikP/H7gNybNinZhAHMN07Vjr1i4lVupg598l4I9gSTjJqOvKnwjzYX2PzvBTSVf2eZ2nWv4vG+mtW8L6tpA==", + "proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", "dev": true, - "optional": true, "requires": { - "protocol-buffers-schema": "^3.3.1", - "signed-varint": "^2.0.1", - "uint8arrays": "^3.0.0", - "varint": "^5.0.0" - }, - "dependencies": { - "uint8arrays": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.0.0.tgz", - "integrity": "sha512-HRCx0q6O9Bfbp+HHSfQQKD7wU70+lydKVt4EghkdOvlK/NlrF90z+eXV34mUd48rNvVJXwkrMSPpCATkct8fJA==", - "dev": true, - "optional": true, - "requires": { - "multiformats": "^9.4.2" - } - } + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" } }, "proxy-addr": { @@ -16657,10 +29857,10 @@ "ipaddr.js": "1.9.1" } }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "dev": true }, "psl": { @@ -16683,6 +29883,30 @@ "safe-buffer": "^5.1.2" } }, + "puml-for-markdown": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/puml-for-markdown/-/puml-for-markdown-1.2.1.tgz", + "integrity": "sha512-zDlnWjNBlTF8LKaI9wxOQPCbqZoObgIn14cTzAHRwkY2At2wIdbqnvPAqAs6ONlZ/9ATPvQ2LPL2ZZy6c7o0ug==", + "dev": true, + "requires": { + "bent": "7.3.12", + "bluebird": "3.7.2", + "commander": "8.2.0", + "gitignore-globs": "0.1.1", + "glob": "7.2.0", + "lodash": "4.17.21", + "plantuml-encoder": "1.4.0", + "tinyurl": "1.1.7" + }, + "dependencies": { + "commander": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.2.0.tgz", + "integrity": "sha512-LLKxDvHeL91/8MIyTAD5BFMNtoIwztGPMiM/7Bl8rIPmHCZXRxmSWr91h57dpOpnQ6jIUqEWdXE/uBYMfiVZDA==", + "dev": true + } + } + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -16699,6 +29923,84 @@ "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=", "dev": true }, + "puppeteer": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.7.0.tgz", + "integrity": "sha512-U1uufzBjz3+PkpCxFrWzh4OrMIdIb2ztzCu0YEPfRHjHswcSwHZswnK+WdsOQJsRV8WeTg3jLhJR4D867+fjsA==", + "dev": true, + "requires": { + "cross-fetch": "3.1.5", + "debug": "4.3.4", + "devtools-protocol": "0.0.981744", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.1", + "pkg-dir": "4.2.0", + "progress": "2.0.3", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.1.1", + "unbzip2-stream": "1.4.3", + "ws": "8.5.0" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ws": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz", + "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==", + "dev": true, + "requires": {} + } + } + }, "pure-rand": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-5.0.1.tgz", @@ -16722,18 +30024,18 @@ "strict-uri-encode": "^1.0.0" } }, - "querystring": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", - "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==", - "dev": true - }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -16765,23 +30067,10 @@ "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", "dev": true, "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" } }, "read-pkg": { @@ -16825,30 +30114,12 @@ "picomatch": "^2.2.1" } }, - "receptacle": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/receptacle/-/receptacle-1.3.2.tgz", - "integrity": "sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A==", - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - }, - "dependencies": { - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "optional": true - } - } - }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "dev": true, + "peer": true, "requires": { "resolve": "^1.1.6" } @@ -16858,30 +30129,17 @@ "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz", "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==", "dev": true, + "peer": true, "requires": { "minimatch": "3.0.4" } }, - "redux": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz", - "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==", - "dev": true, - "requires": { - "lodash": "^4.2.1", - "lodash-es": "^4.2.1", - "loose-envify": "^1.1.0", - "symbol-observable": "^1.0.3" - } - }, - "redux-saga": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-1.0.0.tgz", - "integrity": "sha512-GvJWs/SzMvEQgeaw6sRMXnS2FghlvEGsHiEtTLpJqc/FHF3I5EE/B+Hq5lyHZ8LSoT2r/X/46uWvkdCnK9WgHA==", + "reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", "dev": true, - "requires": { - "@redux-saga/core": "^1.0.0" - } + "peer": true }, "regenerator-runtime": { "version": "0.13.7", @@ -16889,13 +30147,44 @@ "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "dev": true }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "regexp.prototype.flags": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", + "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", "dev": true, "requires": { - "is-finite": "^1.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "set-function-name": "^2.0.0" + } + }, + "req-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-cwd/-/req-cwd-2.0.0.tgz", + "integrity": "sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ==", + "dev": true, + "peer": true, + "requires": { + "req-from": "^2.0.0" + } + }, + "req-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/req-from/-/req-from-2.0.0.tgz", + "integrity": "sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA==", + "dev": true, + "peer": true, + "requires": { + "resolve-from": "^3.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", + "dev": true, + "peer": true + } } }, "request": { @@ -16940,6 +30229,28 @@ } } }, + "request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dev": true, + "peer": true, + "requires": { + "lodash": "^4.17.19" + } + }, + "request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "dev": true, + "peer": true, + "requires": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -16958,49 +30269,6 @@ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", "dev": true }, - "reselect": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.5.tgz", - "integrity": "sha512-uVdlz8J7OO+ASpBYoz1Zypgx0KasCY20H+N8JD13oUMtPvSHQuscrHop4KbXrbsBcdB9Ds7lVK7eRkBIfO43vQ==", - "dev": true - }, - "reselect-tree": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/reselect-tree/-/reselect-tree-1.3.5.tgz", - "integrity": "sha512-h/iXrz7wGBidwMmNFu5L1z0sDvqU6SAdJ2TKr5IIsyGKeyXQchi0gXbfbIJJfGWD8VGcDYjzGAbhy1KaGD4FWQ==", - "dev": true, - "requires": { - "debug": "^3.1.0", - "esdoc": "^1.0.4", - "json-pointer": "^0.6.1", - "reselect": "^4.0.0", - "source-map-support": "^0.5.3" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - } - } - }, - "reset": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/reset/-/reset-0.1.0.tgz", - "integrity": "sha1-n8cxQXGZWubLC35YsGznUir0uvs=", - "dev": true, - "optional": true - }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -17011,10 +30279,10 @@ "path-parse": "^1.0.6" } }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", "dev": true }, "responselike": { @@ -17027,34 +30295,49 @@ } }, "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", "dev": true, - "optional": true, "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "dependencies": { + "onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "requires": { + "mimic-function": "^5.0.0" + } + }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + } } }, - "retimer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/retimer/-/retimer-2.0.0.tgz", - "integrity": "sha512-KLXY85WkEq2V2bKex/LOO1ViXVn2KGYe4PYysAdYdjmraYIUsVkXu8O4am+8+5UbaaGl1qho4aqAAPHNQ4GSbg==", - "dev": true, - "optional": true - }, "retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", - "dev": true, - "optional": true + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "peer": true + }, + "rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", "dev": true }, "rimraf": { @@ -17096,53 +30379,21 @@ "bn.js": "^4.11.1" } }, - "rpc-websockets": { - "version": "7.4.17", - "resolved": "https://registry.npmjs.org/rpc-websockets/-/rpc-websockets-7.4.17.tgz", - "integrity": "sha512-eolVi/qlXS13viIUH9aqrde902wzSLAai0IjmOZSRefp5I3CSG/vCnD0c0fDSYCWuEyUoRL1BHQA8K1baEUyow==", - "dev": true, - "optional": true, - "requires": { - "@babel/runtime": "^7.11.2", - "bufferutil": "^4.0.1", - "circular-json": "^0.5.9", - "eventemitter3": "^4.0.7", - "utf-8-validate": "^5.0.2", - "uuid": "^8.3.0", - "ws": "^7.4.5" - }, - "dependencies": { - "eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true, - "optional": true - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "optional": true - } - } - }, - "run": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/run/-/run-1.4.0.tgz", - "integrity": "sha1-4X2ekEOrL+F3dsspnhI3848LT/o=", - "dev": true, - "optional": true, - "requires": { - "minimatch": "*" - } - }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, + "peer": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "run-parallel-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", + "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", + "dev": true, "requires": { "queue-microtask": "^1.2.2" } @@ -17154,36 +30405,49 @@ "dev": true }, "rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "requires": { + "tslib": "^2.1.0" + } + }, + "safe-array-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", + "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", "dev": true, - "optional": true, "requires": { - "tslib": "^1.9.0" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" }, "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true, - "optional": true + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true } } }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true }, - "safe-event-emitter": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz", - "integrity": "sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg==", + "safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", "dev": true, "requires": { - "events": "^3.0.0" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" } }, "safer-buffer": { @@ -17192,18 +30456,12 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true, - "optional": true - }, "sc-istanbul": { "version": "0.4.6", "resolved": "https://registry.npmjs.org/sc-istanbul/-/sc-istanbul-0.4.6.tgz", "integrity": "sha512-qJFF/8tW/zJsbyfh/iT/ZM5QNHE3CXxtLJbZsL+CzdJLBsPD7SedJZoUA4d8iAcN2IoMp/Dx80shOOd2x96X/g==", "dev": true, + "peer": true, "requires": { "abbrev": "1.0.x", "async": "1.x", @@ -17225,13 +30483,15 @@ "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true + "dev": true, + "peer": true }, "glob": { "version": "5.0.15", "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", "dev": true, + "peer": true, "requires": { "inflight": "^1.0.4", "inherits": "2", @@ -17244,17 +30504,11 @@ "version": "1.1.7", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true + "dev": true, + "peer": true } } }, - "scrypt-async": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/scrypt-async/-/scrypt-async-2.0.1.tgz", - "integrity": "sha512-wHR032jldwZNy7Tzrfu7RccOgGf8r5hyDMSP2uV6DpLiBUsR8JsDcx/in73o2UGVVrH5ivRFdNsFPcjtl3LErQ==", - "dev": true, - "optional": true - }, "scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", @@ -17272,37 +30526,12 @@ "node-gyp-build": "^4.2.0" } }, - "seedrandom": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/seedrandom/-/seedrandom-3.0.5.tgz", - "integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg==", - "dev": true, - "optional": true - }, - "semaphore": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", - "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==", - "dev": true - }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, - "semver-regex": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/semver-regex/-/semver-regex-3.1.3.tgz", - "integrity": "sha512-Aqi54Mk9uYTjVexLnR67rTyBusmwd04cLkHy9hNvk3+G3nT2Oyg7E0l4XVbOaNwIvQ3hHeYxGcyEy+mKreyBFQ==", - "dev": true - }, "send": { "version": "0.17.1", "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", @@ -17343,9 +30572,9 @@ } }, "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "requires": { "randombytes": "^2.1.0" @@ -17382,11 +30611,16 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, - "set-immediate-shim": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", - "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", - "dev": true + "set-function-name": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", + "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==", + "dev": true, + "requires": { + "define-data-property": "^1.0.1", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.0" + } }, "setimmediate": { "version": "1.0.5", @@ -17410,6 +30644,17 @@ "safe-buffer": "^5.0.1" } }, + "sha1": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", + "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", + "dev": true, + "peer": true, + "requires": { + "charenc": ">= 0.0.1", + "crypt": ">= 0.0.1" + } + }, "sha3": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/sha3/-/sha3-2.1.4.tgz", @@ -17419,10 +30664,19 @@ "buffer": "6.0.3" } }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==", + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "shelljs": { @@ -17430,28 +30684,29 @@ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", "dev": true, + "peer": true, "requires": { "glob": "^7.0.0", "interpret": "^1.0.0", "rechoir": "^0.6.2" } }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true, - "optional": true - }, - "signed-varint": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/signed-varint/-/signed-varint-2.0.1.tgz", - "integrity": "sha1-UKmYnafJjCxh2tEZvJdHDvhSgSk=", - "dev": true, - "optional": true, - "requires": { - "varint": "~5.0.0" - } + "dev": true }, "simple-concat": { "version": "1.0.1", @@ -17470,12 +30725,61 @@ "simple-concat": "^1.0.0" } }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "peer": true + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "peer": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.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==", + "dev": true, + "peer": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "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==", + "dev": true, + "peer": true, + "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==", + "dev": true, + "peer": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "peer": true + } + } + }, "snake-case": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz", @@ -17485,6 +30789,64 @@ "no-case": "^2.2.0" } }, + "sol2uml": { + "version": "2.5.19", + "resolved": "https://registry.npmjs.org/sol2uml/-/sol2uml-2.5.19.tgz", + "integrity": "sha512-edip2A4LEehh0rJah/j2dHpD8rsNGHc61INQOPo+dvY3MDm/xOUoykGsw6RMPXq8/uOZY+tCWIcZyIdW91aawg==", + "dev": true, + "requires": { + "@aduh95/viz.js": "^3.7.0", + "@solidity-parser/parser": "^0.16.1", + "axios": "^1.6.0", + "axios-debug-log": "^1.0.0", + "cli-color": "^2.0.3", + "commander": "^11.1.0", + "convert-svg-to-png": "^0.6.4", + "debug": "^4.3.4", + "diff-match-patch": "^1.0.5", + "ethers": "^5.7.2", + "js-graph-algorithms": "^1.0.18", + "klaw": "^4.1.0" + }, + "dependencies": { + "@solidity-parser/parser": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@solidity-parser/parser/-/parser-0.16.1.tgz", + "integrity": "sha512-PdhRFNhbTtu3x8Axm0uYpqOy/lODYQK+MlYSgqIsq2L8SFYEHJPHNUiOTAJbDGzNjjr1/n9AcIayxafR/fWmYw==", + "dev": true, + "requires": { + "antlr4ts": "^0.5.0-alpha.4" + } + }, + "commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "klaw": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-4.1.0.tgz", + "integrity": "sha512-1zGZ9MF9H22UnkpVeuaGKOjfA2t6WrfdrJmGjy16ykcjnKQDmHVX+KI477rpbGevz/5FD4MC3xf1oxylBgcaQw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "solc": { "version": "0.4.26", "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.26.tgz", @@ -17498,79 +30860,503 @@ "yargs": "^4.7.1" } }, + "solidity-ast": { + "version": "0.4.52", + "resolved": "https://registry.npmjs.org/solidity-ast/-/solidity-ast-0.4.52.tgz", + "integrity": "sha512-iOya9BSiB9jhM8Vf40n8lGELGzwrUc57rl5BhfNtJ5cvAaMvRcNlHeAMNvqJJyjoUnczqRbHqdivEqK89du3Cw==", + "dev": true, + "requires": { + "array.prototype.findlast": "^1.2.2" + } + }, "solidity-coverage": { - "version": "0.7.20", - "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.7.20.tgz", - "integrity": "sha512-edOXTugUYdqxrtEnIn4vgrGjLPxdexcL0WD8LzAvVA3d1dwgcfRO3k8xQR02ZQnOnWMBi8Cqs0F+kAQQp3JW8g==", + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/solidity-coverage/-/solidity-coverage-0.8.2.tgz", + "integrity": "sha512-cv2bWb7lOXPE9/SSleDO6czkFiMHgP4NXPj+iW9W7iEKLBk7Cj0AGBiNmGX3V1totl9wjPrT0gHmABZKZt65rQ==", "dev": true, + "peer": true, "requires": { - "@solidity-parser/parser": "^0.14.0", - "@truffle/provider": "^0.2.24", + "@ethersproject/abi": "^5.0.9", + "@solidity-parser/parser": "^0.14.1", "chalk": "^2.4.2", "death": "^1.1.0", "detect-port": "^1.3.0", + "difflib": "^0.2.4", "fs-extra": "^8.1.0", "ghost-testrpc": "^0.0.2", "global-modules": "^2.0.0", "globby": "^10.0.1", "jsonschema": "^1.2.4", "lodash": "^4.17.15", + "mocha": "7.1.2", "node-emoji": "^1.10.0", "pify": "^4.0.1", "recursive-readdir": "^2.2.2", "sc-istanbul": "^0.4.5", "semver": "^7.3.4", "shelljs": "^0.8.3", - "web3-utils": "^1.3.0" + "web3-utils": "^1.3.6" }, "dependencies": { + "ansi-colors": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", + "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", + "dev": true, + "peer": true + }, + "ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "dev": true, + "peer": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "peer": true + }, + "chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "peer": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "peer": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + }, + "dependencies": { + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "peer": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "peer": true, + "requires": { + "ms": "^2.1.1" + } + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true, + "peer": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true, + "peer": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "peer": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "peer": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "flat": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", + "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", + "dev": true, + "peer": true, + "requires": { + "is-buffer": "~2.0.3" + } + }, "fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, + "peer": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true, + "peer": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "peer": true + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "dev": true, + "peer": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "peer": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "peer": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "peer": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "peer": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "peer": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "log-symbols": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", + "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", + "dev": true, + "peer": true, + "requires": { + "chalk": "^2.4.2" + } + }, + "mocha": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz", + "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==", + "dev": true, + "peer": true, + "requires": { + "ansi-colors": "3.2.3", + "browser-stdout": "1.3.1", + "chokidar": "3.3.0", + "debug": "3.2.6", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "find-up": "3.0.0", + "glob": "7.1.3", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.13.1", + "log-symbols": "3.0.0", + "minimatch": "3.0.4", + "mkdirp": "0.5.5", + "ms": "2.1.1", + "node-environment-flags": "1.0.6", + "object.assign": "4.1.0", + "strip-json-comments": "2.0.1", + "supports-color": "6.0.0", + "which": "1.3.1", + "wide-align": "1.1.3", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.0" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true, + "peer": true + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "peer": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "peer": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "peer": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "peer": true + }, + "readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "peer": true, + "requires": { + "picomatch": "^2.0.4" + } + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true, + "peer": true + }, + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "peer": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "peer": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "supports-color": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", + "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", + "dev": true, + "peer": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "dev": true, + "peer": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "peer": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "peer": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "peer": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true, + "peer": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "peer": true, "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "peer": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } } }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, + "peer": true, "requires": { - "graceful-fs": "^4.1.6" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "yargs-unparser": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", + "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", "dev": true, + "peer": true, "requires": { - "lru-cache": "^6.0.0" + "flat": "^4.1.0", + "lodash": "^4.17.15", + "yargs": "^13.3.0" } } } }, - "solstruct": { - "version": "0.0.13", - "resolved": "https://registry.npmjs.org/solstruct/-/solstruct-0.0.13.tgz", - "integrity": "sha512-gYlF8yj4rB9V0xC5pz+jT8YsewLQkCsf9FDgswg/zyUliKj48Ty/T2XSEYpUFXPa0kVNKcCTd04tJivjcWeRIw==" + "solidity-docgen": { + "version": "0.6.0-beta.36", + "resolved": "https://registry.npmjs.org/solidity-docgen/-/solidity-docgen-0.6.0-beta.36.tgz", + "integrity": "sha512-f/I5G2iJgU1h0XrrjRD0hHMr7C10u276vYvm//rw1TzFcYQ4xTOyAoi9oNAHRU0JU4mY9eTuxdVc2zahdMuhaQ==", + "dev": true, + "requires": { + "handlebars": "^4.7.7", + "solidity-ast": "^0.4.38" + } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true + "solstruct": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/solstruct/-/solstruct-0.1.0.tgz", + "integrity": "sha512-7XiFF2g3R08tsfhhZfKbKheNC0A5lsdAxk5R2HVPzT/kwenTh8AUzmQoc10xw+zXO813KRRLK3t65KqgUE2T4w==" }, "source-map-support": { "version": "0.5.21", @@ -17590,13 +31376,6 @@ } } }, - "spark-md5": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spark-md5/-/spark-md5-3.0.1.tgz", - "integrity": "sha512-0tF3AGSD1ppQeuffsLDIOWlKUd3lS92tFxcsrh5Pe3ZphhnoK+oXIBTzOAThZCiuINZLvpiLH/1VS1/ANEJVig==", - "dev": true, - "optional": true - }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -17629,53 +31408,12 @@ "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", "dev": true }, - "spinnies": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/spinnies/-/spinnies-0.5.1.tgz", - "integrity": "sha512-WpjSXv9NQz0nU3yCT9TFEOfpFrXADY9C5fG6eAJqixLhvTX1jP3w92Y8IE5oafIe42nlF9otjhllnXN/QCaB3A==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^2.4.2", - "cli-cursor": "^3.0.0", - "strip-ansi": "^5.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "optional": true - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^4.1.0" - } - } - } - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "sqlite3": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-4.2.0.tgz", - "integrity": "sha512-roEOz41hxui2Q7uYnWsjMOTry6TcNUNmp8audCx18gF10P2NknwdpF+E+HKvz/F2NvPKGGBF4NGc+ZPQ+AABwg==", "dev": true, - "optional": true, - "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.11.0" - } + "peer": true }, "sshpk": { "version": "1.16.1", @@ -17694,12 +31432,22 @@ "tweetnacl": "~0.14.0" } }, - "stable": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", - "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "stacktrace-parser": { + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", + "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", "dev": true, - "optional": true + "requires": { + "type-fest": "^0.7.1" + }, + "dependencies": { + "type-fest": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", + "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", + "dev": true + } + } }, "statuses": { "version": "1.5.0", @@ -17707,15 +31455,18 @@ "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", "dev": true }, - "stream-to-it": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/stream-to-it/-/stream-to-it-0.2.4.tgz", - "integrity": "sha512-4vEbkSs83OahpmBybNJXlJd7d6/RxzkkSdT3I0mnGt79Xd2Kk+e1JqbvAvsQfCeKj3aKb0QIWkyK3/n0j506vQ==", + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==", "dev": true, - "optional": true, - "requires": { - "get-iterator": "^1.0.2" - } + "peer": true + }, + "streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "dev": true }, "strict-uri-encode": { "version": "1.1.0", @@ -17723,6 +31474,28 @@ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "dev": true }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true + }, + "string-format": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-format/-/string-format-2.0.0.tgz", + "integrity": "sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA==", + "dev": true, + "peer": true + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -17734,33 +31507,37 @@ "strip-ansi": "^3.0.0" } }, - "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "string.prototype.trim": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", + "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" } }, - "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "string.prototype.trimend": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", + "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" } }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "string.prototype.trimstart": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", + "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", "dev": true, "requires": { - "safe-buffer": "~5.2.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" } }, "strip-ansi": { @@ -17781,6 +31558,12 @@ "is-utf8": "^0.2.0" } }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true + }, "strip-hex-prefix": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", @@ -17801,76 +31584,14 @@ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, - "optional": true - }, - "sublevel-pouchdb": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/sublevel-pouchdb/-/sublevel-pouchdb-7.3.0.tgz", - "integrity": "sha512-zp7u4jmv2N/s+dXZkWTtL4BjREs3SZ1nGBNNJ8RWX4yqN59oHgKmti4CfVOqfsAW9RMasmTqQAEPxL9hX8+CIA==", - "dev": true, - "optional": true, - "requires": { - "inherits": "2.0.4", - "level-codec": "9.0.2", - "ltgt": "2.2.1", - "readable-stream": "1.1.14" - }, - "dependencies": { - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "optional": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true, - "optional": true - }, - "level-codec": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-9.0.2.tgz", - "integrity": "sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ==", - "dev": true, - "optional": true, - "requires": { - "buffer": "^5.6.0" - } - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true, - "optional": true - } - } + "peer": true }, "supports-color": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "dev": true, + "peer": true, "requires": { "has-flag": "^1.0.0" } @@ -18010,29 +31731,141 @@ } } }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true + "sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "dev": true, + "peer": true, + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } }, - "symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", "dev": true, - "optional": true + "peer": true, + "requires": { + "get-port": "^3.1.0" + } }, - "taffydb": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.7.3.tgz", - "integrity": "sha1-KtNxaWKUmPylvIQkMJbTzeDsOjQ=", - "dev": true + "table": { + "version": "6.8.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", + "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "dev": true, + "peer": true, + "requires": { + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dev": true, + "peer": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "peer": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "peer": true + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "peer": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "peer": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "peer": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "peer": true, + "requires": { + "ansi-regex": "^5.0.1" + } + } + } + }, + "table-layout": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", + "integrity": "sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A==", + "dev": true, + "peer": true, + "requires": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + }, + "dependencies": { + "array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "peer": true + }, + "typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true + } + } }, "tar": { "version": "4.4.19", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.19.tgz", "integrity": "sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA==", + "dev": true, "requires": { "chownr": "^1.1.4", "fs-minipass": "^1.2.7", @@ -18046,64 +31879,98 @@ "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true } } }, + "tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + } + }, "testrpc": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/testrpc/-/testrpc-0.0.1.tgz", "integrity": "sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA==", "dev": true }, - "through2": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", - "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", "dev": true, - "optional": true, + "peer": true, "requires": { - "inherits": "^2.0.4", - "readable-stream": "2 || 3" + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==", + "dev": true, + "peer": true + } } }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true + }, "timed-out": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", "dev": true }, - "timeout-abort-controller": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/timeout-abort-controller/-/timeout-abort-controller-1.1.1.tgz", - "integrity": "sha512-BsF9i3NAJag6T0ZEjki9j654zoafI2X6ayuNd6Tp8+Ul6Tr5s4jo973qFeiWrRSweqvskC+AHDKUmIW4b7pdhQ==", + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", "dev": true, - "optional": true, "requires": { - "abort-controller": "^3.0.0", - "retimer": "^2.0.0" + "es5-ext": "~0.10.46", + "next-tick": "1" } }, - "tiny-queue": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tiny-queue/-/tiny-queue-0.2.1.tgz", - "integrity": "sha1-JaZ/LG4lOyypQZd7XvdELvl6YEY=", - "dev": true, - "optional": true - }, - "tiny-secp256k1": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz", - "integrity": "sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.3.0", - "bn.js": "^4.11.8", - "create-hmac": "^1.1.7", - "elliptic": "^6.4.0", - "nan": "^2.13.2" - } + "tinyurl": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/tinyurl/-/tinyurl-1.1.7.tgz", + "integrity": "sha512-NCnyDkBTByS/pLH/Vrx/DPL8EciAUDoAvruaM/WnQLfX6Uame3D1nuWNy2Z9CXw7rcsok0tjuonRLolhmyz5rg==", + "dev": true }, "title-case": { "version": "2.1.1", @@ -18115,32 +31982,13 @@ "upper-case": "^1.0.3" } }, - "to-data-view": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/to-data-view/-/to-data-view-1.1.0.tgz", - "integrity": "sha512-1eAdufMg6mwgmlojAx3QeMnzB/BTVp7Tbndi3U7ftcT2zCZadjxkkmLmd97zmaxWi+sgGcgWrokmpEoy0Dn0vQ==", - "dev": true, - "optional": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "to-json-schema": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/to-json-schema/-/to-json-schema-0.2.5.tgz", - "integrity": "sha512-jP1ievOee8pec3tV9ncxLSS48Bnw7DIybgy112rhMCEhf3K4uyVNZZHr03iQQBzbV5v5Hos+dlZRRyk6YSMNDw==", + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, - "optional": true, "requires": { - "lodash.isequal": "^4.5.0", - "lodash.keys": "^4.2.0", - "lodash.merge": "^4.6.2", - "lodash.omit": "^4.5.0", - "lodash.without": "^4.4.0", - "lodash.xor": "^4.5.0" + "os-tmpdir": "~1.0.2" } }, "to-readable-stream": { @@ -18188,54 +32036,133 @@ "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", "dev": true }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", - "dev": true - }, - "truffle": { - "version": "5.5.11", - "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.5.11.tgz", - "integrity": "sha512-FjnLUhv9JGixr6iHd5LvlPCy5SSdcorxiHefiwZ9DBrOt4sTk03X76iH5f425VmX6MYrAhIztEgU7zEUB9YhqQ==", + "ts-command-line-args": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-command-line-args/-/ts-command-line-args-2.5.0.tgz", + "integrity": "sha512-Ff7Xt04WWCjj/cmPO9eWTJX3qpBZWuPWyQYG1vnxJao+alWWYjwJBc5aYz3h5p5dE08A6AnpkgiCtP/0KXXBYw==", "dev": true, + "peer": true, "requires": { - "@truffle/db": "^1.0.3", - "@truffle/db-loader": "^0.1.13", - "@truffle/debugger": "^10.0.7", - "@truffle/preserve-fs": "^0.2.7", - "@truffle/preserve-to-buckets": "^0.2.8", - "@truffle/preserve-to-filecoin": "^0.2.8", - "@truffle/preserve-to-ipfs": "^0.2.8", - "app-module-path": "^2.2.0", - "ganache": "^7.0.4", - "mocha": "9.2.2", - "original-require": "^1.0.1" + "@morgan-stanley/ts-mocking-bird": "^0.6.2", + "chalk": "^4.1.0", + "command-line-args": "^5.1.1", + "command-line-usage": "^6.1.0", + "string-format": "^2.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==", + "dev": true, + "peer": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "peer": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "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==", + "dev": true, + "peer": true, + "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==", + "dev": true, + "peer": 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==", + "dev": true, + "peer": 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, + "peer": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, - "truffle-plugin-verify": { - "version": "0.5.25", - "resolved": "https://registry.npmjs.org/truffle-plugin-verify/-/truffle-plugin-verify-0.5.25.tgz", - "integrity": "sha512-LWx1mPKSP+eiiE0/VgTL9tixVdnHXwhd7eVV3zBhyuR1sJwecvEMrRbDqxDz9fAzcDzXyf43xmsi/MaR2h1EVg==", - "dev": true, - "requires": { - "axios": "^0.26.1", - "cli-logger": "^0.5.40", - "delay": "^5.0.0", - "querystring": "^0.2.1", - "tunnel": "0.0.6" + "ts-essentials": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ts-essentials/-/ts-essentials-7.0.3.tgz", + "integrity": "sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==", + "dev": true, + "peer": true, + "requires": {} + }, + "ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "peer": true, + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "dependencies": { + "acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "peer": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "peer": true + } } }, "tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", + "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==", "dev": true }, - "tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "tsort": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tsort/-/tsort-0.0.1.tgz", + "integrity": "sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw==", "dev": true }, "tunnel-agent": { @@ -18270,6 +32197,7 @@ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, + "peer": true, "requires": { "prelude-ls": "~1.1.2" } @@ -18280,6 +32208,12 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + }, "type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -18290,46 +32224,179 @@ "mime-types": "~2.1.24" } }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "typechain": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/typechain/-/typechain-8.1.1.tgz", + "integrity": "sha512-uF/sUvnXTOVF2FHKhQYnxHk4su4JjZR8vr4mA2mBaRwHTbwh0jIlqARz9XJr1tA0l7afJGvEa1dTSi4zt039LQ==", "dev": true, + "peer": true, "requires": { - "is-typedarray": "^1.0.0" + "@types/prettier": "^2.1.1", + "debug": "^4.3.1", + "fs-extra": "^7.0.0", + "glob": "7.1.7", + "js-sha3": "^0.8.0", + "lodash": "^4.17.15", + "mkdirp": "^1.0.4", + "prettier": "^2.3.1", + "ts-command-line-args": "^2.2.0", + "ts-essentials": "^7.0.1" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "peer": true, + "requires": { + "ms": "2.1.2" + } + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "peer": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "peer": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "dev": true, + "peer": true + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "dev": true, + "peer": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "peer": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "peer": true + }, + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "peer": true + } } }, - "typeforce": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz", - "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==", + "typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", "dev": true, - "optional": true + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + } }, - "typescript-compare": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/typescript-compare/-/typescript-compare-0.0.2.tgz", - "integrity": "sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA==", + "typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", "dev": true, "requires": { - "typescript-logic": "^0.0.0" + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" } }, - "typescript-logic": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/typescript-logic/-/typescript-logic-0.0.0.tgz", - "integrity": "sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==", - "dev": true + "typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + } }, - "typescript-tuple": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/typescript-tuple/-/typescript-tuple-2.2.1.tgz", - "integrity": "sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q==", + "typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true, + "peer": true + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", "dev": true, "requires": { - "typescript-compare": "^0.0.2" + "is-typedarray": "^1.0.0" } }, + "typescript": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", + "dev": true, + "peer": true + }, + "typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "dev": true, + "peer": true + }, "uglify-js": { "version": "3.15.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.4.tgz", @@ -18337,30 +32404,6 @@ "dev": true, "optional": true }, - "uint8arrays": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-1.1.0.tgz", - "integrity": "sha512-cLdlZ6jnFczsKf5IH1gPHTtcHtPGho5r4CvctohmQjw8K7Q3gFdfIGHxSTdTaCKrL4w09SsPRJTqRS0drYeszA==", - "dev": true, - "optional": true, - "requires": { - "multibase": "^3.0.0", - "web-encoding": "^1.0.2" - }, - "dependencies": { - "multibase": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/multibase/-/multibase-3.1.2.tgz", - "integrity": "sha512-bpklWHs70LO3smJUHOjcnzGceJJvn9ui0Vau6Za0B/GBepaXswmW8Ufea0uD9pROf/qCQ4N4lZ3sf3U+SNf0tw==", - "dev": true, - "optional": true, - "requires": { - "@multiformats/base-x": "^4.0.1", - "web-encoding": "^1.0.6" - } - } - } - }, "ultron": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz", @@ -18368,36 +32411,67 @@ "dev": true }, "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" } }, + "unbzip2-stream": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", + "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", + "dev": true, + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + }, + "dependencies": { + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + } + } + }, "underscore": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==", "dev": true }, + "undici": { + "version": "5.22.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.22.0.tgz", + "integrity": "sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA==", + "dev": true, + "requires": { + "busboy": "^1.6.0" + } + }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "optional": true + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, - "unorm": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.6.0.tgz", - "integrity": "sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA==", - "dev": true, - "optional": true - }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -18449,17 +32523,6 @@ "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", "dev": true }, - "ursa-optional": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/ursa-optional/-/ursa-optional-0.10.2.tgz", - "integrity": "sha512-TKdwuLboBn7M34RcvVTuQyhvrA8gYKapuVdm0nBP0mnBc7oECOfUQZrY91cefL3/nm64ZyrejSRrhTVdX7NG/A==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.14.2" - } - }, "utf-8-validate": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.5.tgz", @@ -18476,16 +32539,15 @@ "dev": true }, "util": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", - "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", "dev": true, "requires": { "inherits": "^2.0.3", "is-arguments": "^1.0.4", "is-generator-function": "^1.0.7", "is-typed-array": "^1.1.3", - "safe-buffer": "^5.1.2", "which-typed-array": "^1.1.2" } }, @@ -18507,6 +32569,13 @@ "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", "dev": true }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "peer": true + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -18517,13 +32586,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "value-or-promise": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz", - "integrity": "sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg==", - "dev": true, - "optional": true - }, "varint": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz", @@ -18547,488 +32609,1364 @@ "extsprintf": "^1.2.0" } }, - "vuvuzela": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/vuvuzela/-/vuvuzela-1.0.3.tgz", - "integrity": "sha1-O+FF5YJxxzylUnndhR8SpoIRSws=", - "dev": true, - "optional": true - }, - "web-encoding": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/web-encoding/-/web-encoding-1.1.5.tgz", - "integrity": "sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA==", - "dev": true, - "optional": true, - "requires": { - "@zxing/text-encoding": "0.9.0", - "util": "^0.12.3" - } - }, "web3": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.4.0.tgz", - "integrity": "sha512-faT3pIX+1tuo+wqmUFQPe10MUGaB1UvRYxw9dmVJFLxaRAIfXErSilOf3jFhSwKbbPNkwG0bTiudCLN9JgeS7A==", - "dev": true, - "requires": { - "web3-bzz": "1.4.0", - "web3-core": "1.4.0", - "web3-eth": "1.4.0", - "web3-eth-personal": "1.4.0", - "web3-net": "1.4.0", - "web3-shh": "1.4.0", - "web3-utils": "1.4.0" + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.4.tgz", + "integrity": "sha512-kgJvQZjkmjOEKimx/tJQsqWfRDPTTcBfYPa9XletxuHLpHcXdx67w8EFn5AW3eVxCutE9dTVHgGa9VYe8vgsEA==", + "dev": true, + "requires": { + "web3-bzz": "1.10.4", + "web3-core": "1.10.4", + "web3-eth": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-shh": "1.10.4", + "web3-utils": "1.10.4" + }, + "dependencies": { + "@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "requires": { + "@noble/hashes": "1.4.0" + } + }, + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "requires": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "requires": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "requires": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } + } } }, "web3-bzz": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.4.0.tgz", - "integrity": "sha512-KhXmz8hcfGsqhplB7NrekAeNkG2edHjXV4bL3vnXde8RGMWpabpSNxuwiGv+dv/3nWlrHatH0vGooONYCkP5TA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.4.tgz", + "integrity": "sha512-ZZ/X4sJ0Uh2teU9lAGNS8EjveEppoHNQiKlOXAjedsrdWuaMErBPdLQjXfcrYvN6WM6Su9PMsAxf3FXXZ+HwQw==", "dev": true, "requires": { "@types/node": "^12.12.6", - "got": "9.6.0", - "swarm-js": "^0.1.40", - "underscore": "1.12.1" + "got": "12.1.0", + "swarm-js": "^0.1.40" + }, + "dependencies": { + "@sindresorhus/is": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "dev": true + }, + "@szmarczak/http-timer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz", + "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==", + "dev": true, + "requires": { + "defer-to-connect": "^2.0.1" + } + }, + "cacheable-request": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, + "decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "requires": { + "mimic-response": "^3.1.0" + } + }, + "defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "dev": true + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "got": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-12.1.0.tgz", + "integrity": "sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig==", + "dev": true, + "requires": { + "@sindresorhus/is": "^4.6.0", + "@szmarczak/http-timer": "^5.0.1", + "@types/cacheable-request": "^6.0.2", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^6.0.4", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "form-data-encoder": "1.7.1", + "get-stream": "^6.0.1", + "http2-wrapper": "^2.1.10", + "lowercase-keys": "^3.0.0", + "p-cancelable": "^3.0.0", + "responselike": "^2.0.0" + } + }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "requires": { + "json-buffer": "3.0.1" + } + }, + "lowercase-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz", + "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==", + "dev": true + }, + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true + }, + "normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true + }, + "p-cancelable": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz", + "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==", + "dev": true + }, + "responselike": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "dev": true, + "requires": { + "lowercase-keys": "^2.0.0" + }, + "dependencies": { + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + } } }, "web3-core": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.4.0.tgz", - "integrity": "sha512-VRNMNqwzvPeKIet2l9BMApPHoUv0UqwaZH0lZJhG2RBko42w9Xls+pQwfVNSV16j04t/ehm1aLRV2Sx6lzVfRg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.4.tgz", + "integrity": "sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww==", "dev": true, "requires": { - "@types/bn.js": "^4.11.5", + "@types/bn.js": "^5.1.1", "@types/node": "^12.12.6", "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.4.0", - "web3-core-method": "1.4.0", - "web3-core-requestmanager": "1.4.0", - "web3-utils": "1.4.0" + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-requestmanager": "1.10.4", + "web3-utils": "1.10.4" }, "dependencies": { + "@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "requires": { + "@noble/hashes": "1.4.0" + } + }, + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "requires": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@types/bn.js": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "bignumber.js": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.1.tgz", - "integrity": "sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "dev": true + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "requires": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "requires": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } + } + } + }, + "web3-core-helpers": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.4.tgz", + "integrity": "sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g==", + "dev": true, + "requires": { + "web3-eth-iban": "1.10.4", + "web3-utils": "1.10.4" + }, + "dependencies": { + "@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "requires": { + "@noble/hashes": "1.4.0" + } + }, + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "requires": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "requires": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "requires": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } + } + } + }, + "web3-core-method": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.4.tgz", + "integrity": "sha512-uZTb7flr+Xl6LaDsyTeE2L1TylokCJwTDrIVfIfnrGmnwLc6bmTWCCrm71sSrQ0hqs6vp/MKbQYIYqUN0J8WyA==", + "dev": true, + "requires": { + "@ethersproject/transactions": "^5.6.2", + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-utils": "1.10.4" + }, + "dependencies": { + "@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "requires": { + "@noble/hashes": "1.4.0" + } + }, + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "requires": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "requires": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "requires": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } } } }, - "web3-core-helpers": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.4.0.tgz", - "integrity": "sha512-8Ebq0nmRfzw7iPoXbIRHEWOuPh+1cOV3OOEvKm5Od3McZOjja914vdk+DM3MgmbSpDzYJRFM6KoF0+Z/U/1bPw==", - "dev": true, - "requires": { - "underscore": "1.12.1", - "web3-eth-iban": "1.4.0", - "web3-utils": "1.4.0" - } - }, - "web3-core-method": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.4.0.tgz", - "integrity": "sha512-KW9922fEkgKu8zDcJR8Iikg/epsuWMArAUVTipKVwzAI5TVdvOMRgSe/b7IIDRUIeoeXMARmJ+PrAlx+IU2acQ==", - "dev": true, - "requires": { - "@ethersproject/transactions": "^5.0.0-beta.135", - "underscore": "1.12.1", - "web3-core-helpers": "1.4.0", - "web3-core-promievent": "1.4.0", - "web3-core-subscriptions": "1.4.0", - "web3-utils": "1.4.0" - } - }, "web3-core-promievent": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.4.0.tgz", - "integrity": "sha512-YEwko22kcry7lHwbe0k80BrjXCZ+73jMdvZtptRH5k2B+XZ1XtmXwYL1PFIlZy9V0zgZijdg+3GabCnAHjVXAw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.4.tgz", + "integrity": "sha512-2de5WnJQ72YcIhYwV/jHLc4/cWJnznuoGTJGD29ncFQHAfwW/MItHFSVKPPA5v8AhJe+r6y4Y12EKvZKjQVBvQ==", "dev": true, "requires": { "eventemitter3": "4.0.4" } }, "web3-core-requestmanager": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.4.0.tgz", - "integrity": "sha512-qIwKJO5T0KkUAIL7y9JRSUkk3+LaCwghdUHK8FzbMvq6R1W9lgCBnccqFGEI76EJjHvsiw4kEKBEXowdB3xenQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.4.tgz", + "integrity": "sha512-vqP6pKH8RrhT/2MoaU+DY/OsYK9h7HmEBNCdoMj+4ZwujQtw/Mq2JifjwsJ7gits7Q+HWJwx8q6WmQoVZAWugg==", "dev": true, "requires": { - "underscore": "1.12.1", - "util": "^0.12.0", - "web3-core-helpers": "1.4.0", - "web3-providers-http": "1.4.0", - "web3-providers-ipc": "1.4.0", - "web3-providers-ws": "1.4.0" - }, - "dependencies": { - "util": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", - "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "safe-buffer": "^5.1.2", - "which-typed-array": "^1.1.2" - } - } + "util": "^0.12.5", + "web3-core-helpers": "1.10.4", + "web3-providers-http": "1.10.4", + "web3-providers-ipc": "1.10.4", + "web3-providers-ws": "1.10.4" } }, "web3-core-subscriptions": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.4.0.tgz", - "integrity": "sha512-/UMC9rSLEd0U+h6Qanx6CM29o/cfUyGWgl/HM6O/AIuth9G+34QBuKDa11Gr2Qg6F8Lr9tSFm8QIGVniOx9i5A==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.4.tgz", + "integrity": "sha512-o0lSQo/N/f7/L76C0HV63+S54loXiE9fUPfHFcTtpJRQNDBVsSDdWRdePbWwR206XlsBqD5VHApck1//jEafTw==", "dev": true, "requires": { "eventemitter3": "4.0.4", - "underscore": "1.12.1", - "web3-core-helpers": "1.4.0" + "web3-core-helpers": "1.10.4" } }, "web3-eth": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.4.0.tgz", - "integrity": "sha512-L990eMJeWh4h/Z3M8MJb9HrKq8tqvzdGZ7igdzd6Ba3B/VKgGFAJ/4XIqtLwAJ1Wg5Cj8my60tYY+34c2cLefw==", - "dev": true, - "requires": { - "underscore": "1.12.1", - "web3-core": "1.4.0", - "web3-core-helpers": "1.4.0", - "web3-core-method": "1.4.0", - "web3-core-subscriptions": "1.4.0", - "web3-eth-abi": "1.4.0", - "web3-eth-accounts": "1.4.0", - "web3-eth-contract": "1.4.0", - "web3-eth-ens": "1.4.0", - "web3-eth-iban": "1.4.0", - "web3-eth-personal": "1.4.0", - "web3-net": "1.4.0", - "web3-utils": "1.4.0" + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.4.tgz", + "integrity": "sha512-Sql2kYKmgt+T/cgvg7b9ce24uLS7xbFrxE4kuuor1zSCGrjhTJ5rRNG8gTJUkAJGKJc7KgnWmgW+cOfMBPUDSA==", + "dev": true, + "requires": { + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-accounts": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-eth-ens": "1.10.4", + "web3-eth-iban": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" + }, + "dependencies": { + "@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "requires": { + "@noble/hashes": "1.4.0" + } + }, + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "requires": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "requires": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "requires": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } + } } }, "web3-eth-abi": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.4.0.tgz", - "integrity": "sha512-FtmWipG/dSSkTGFb72JCwky7Jd0PIvd0kGTInWQwIEZlw5qMOYl61WZ9gwfojFHvHF6q1eKncerQr+MRXHO6zg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.4.tgz", + "integrity": "sha512-cZ0q65eJIkd/jyOlQPDjr8X4fU6CRL1eWgdLwbWEpo++MPU/2P4PFk5ZLAdye9T5Sdp+MomePPJ/gHjLMj2VfQ==", "dev": true, "requires": { - "@ethersproject/abi": "5.0.7", - "underscore": "1.12.1", - "web3-utils": "1.4.0" + "@ethersproject/abi": "^5.6.3", + "web3-utils": "1.10.4" }, "dependencies": { - "@ethersproject/abi": { - "version": "5.0.7", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.0.7.tgz", - "integrity": "sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw==", + "@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", "dev": true, "requires": { - "@ethersproject/address": "^5.0.4", - "@ethersproject/bignumber": "^5.0.7", - "@ethersproject/bytes": "^5.0.4", - "@ethersproject/constants": "^5.0.4", - "@ethersproject/hash": "^5.0.4", - "@ethersproject/keccak256": "^5.0.3", - "@ethersproject/logger": "^5.0.5", - "@ethersproject/properties": "^5.0.3", - "@ethersproject/strings": "^5.0.4" + "@noble/hashes": "1.4.0" + } + }, + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "requires": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "requires": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "requires": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" } } } }, "web3-eth-accounts": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.4.0.tgz", - "integrity": "sha512-tETHBvfO3Z7BXZ7HJIwuX7ol6lPefP55X7b4IiX82C1PujHwsxENY7c/3wyxzqKoDyH6zfyEQo17yhxkhsM1oA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.4.tgz", + "integrity": "sha512-ysy5sVTg9snYS7tJjxVoQAH6DTOTkRGR8emEVCWNGLGiB9txj+qDvSeT0izjurS/g7D5xlMAgrEHLK1Vi6I3yg==", "dev": true, "requires": { - "@ethereumjs/common": "^2.3.0", - "@ethereumjs/tx": "^3.2.1", - "crypto-browserify": "3.12.0", + "@ethereumjs/common": "2.6.5", + "@ethereumjs/tx": "3.5.2", + "@ethereumjs/util": "^8.1.0", "eth-lib": "0.2.8", - "ethereumjs-util": "^7.0.10", "scrypt-js": "^3.0.1", - "underscore": "1.12.1", - "uuid": "3.3.2", - "web3-core": "1.4.0", - "web3-core-helpers": "1.4.0", - "web3-core-method": "1.4.0", - "web3-utils": "1.4.0" + "uuid": "^9.0.0", + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" }, "dependencies": { + "@ethereumjs/common": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz", + "integrity": "sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==", + "dev": true, + "requires": { + "crc-32": "^1.2.0", + "ethereumjs-util": "^7.1.5" + } + }, + "@ethereumjs/tx": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.5.2.tgz", + "integrity": "sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw==", + "dev": true, + "requires": { + "@ethereumjs/common": "^2.6.4", + "ethereumjs-util": "^7.1.5" + } + }, + "@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "requires": { + "@noble/hashes": "1.4.0" + } + }, + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "requires": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "requires": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", "dev": true + }, + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "requires": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } } } }, "web3-eth-contract": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.4.0.tgz", - "integrity": "sha512-GfIhOzfp/ZXKd+1tFEH3ePq0DEsvq9XO5tOsI0REDtEYUj2GNxO5e/x/Fhekk7iLZ7xAqSzDMweFruDQ1fxn0A==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.5", - "underscore": "1.12.1", - "web3-core": "1.4.0", - "web3-core-helpers": "1.4.0", - "web3-core-method": "1.4.0", - "web3-core-promievent": "1.4.0", - "web3-core-subscriptions": "1.4.0", - "web3-eth-abi": "1.4.0", - "web3-utils": "1.4.0" + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.4.tgz", + "integrity": "sha512-Q8PfolOJ4eV9TvnTj1TGdZ4RarpSLmHnUnzVxZ/6/NiTfe4maJz99R0ISgwZkntLhLRtw0C7LRJuklzGYCNN3A==", + "dev": true, + "requires": { + "@types/bn.js": "^5.1.1", + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-utils": "1.10.4" + }, + "dependencies": { + "@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "requires": { + "@noble/hashes": "1.4.0" + } + }, + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "requires": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@types/bn.js": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-5.1.6.tgz", + "integrity": "sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "requires": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "requires": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } + } } }, "web3-eth-ens": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.4.0.tgz", - "integrity": "sha512-jR1KorjU1erpYFpFzsMXAWZnHhqUqWPBq/4+BGVj7/pJ43+A3mrE1eB0zl91Dwc1RTNwOhB02iOj1c9OlpGr3g==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.4.tgz", + "integrity": "sha512-LLrvxuFeVooRVZ9e5T6OWKVflHPFgrVjJ/jtisRWcmI7KN/b64+D/wJzXqgmp6CNsMQcE7rpmf4CQmJCrTdsgg==", "dev": true, "requires": { "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", - "underscore": "1.12.1", - "web3-core": "1.4.0", - "web3-core-helpers": "1.4.0", - "web3-core-promievent": "1.4.0", - "web3-eth-abi": "1.4.0", - "web3-eth-contract": "1.4.0", - "web3-utils": "1.4.0" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-utils": "1.10.4" + }, + "dependencies": { + "@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "requires": { + "@noble/hashes": "1.4.0" + } + }, + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "requires": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "requires": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "requires": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } + } } }, "web3-eth-iban": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.4.0.tgz", - "integrity": "sha512-YNx748VzwiBe0gvtZjvU9BQsooZ9s9sAlmiDWJOMcvMbUTDhC7SvxA7vV/vrnOxL6oGHRh0U/azsYNxxlKiTBw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.4.tgz", + "integrity": "sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "web3-utils": "1.4.0" + "bn.js": "^5.2.1", + "web3-utils": "1.10.4" + }, + "dependencies": { + "@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "requires": { + "@noble/hashes": "1.4.0" + } + }, + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "dev": true, + "requires": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "requires": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", + "dev": true, + "requires": { + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } + } } }, "web3-eth-personal": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.4.0.tgz", - "integrity": "sha512-8Ip6xZ8plmWqAD4ESbKUIPVV9gfTAFFm0ff1FQIw9I9kYvFlBIPzukvm852w2SftGem+/iRH+2+2mK7HvuKXZQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.4.tgz", + "integrity": "sha512-BRa/hs6jU1hKHz+AC/YkM71RP3f0Yci1dPk4paOic53R4ZZG4MgwKRkJhgt3/GPuPliwS46f/i5A7fEGBT4F9w==", "dev": true, "requires": { "@types/node": "^12.12.6", - "web3-core": "1.4.0", - "web3-core-helpers": "1.4.0", - "web3-core-method": "1.4.0", - "web3-net": "1.4.0", - "web3-utils": "1.4.0" - } - }, - "web3-net": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.4.0.tgz", - "integrity": "sha512-41WkKobL+KnKC0CY0RZ1KhMMyR/hMFGlbHZQac4KtB7ro1UdXeK+RiYX+GzSr1h7j9Dj+dQZqyBs70cxmL9cPQ==", - "dev": true, - "requires": { - "web3-core": "1.4.0", - "web3-core-method": "1.4.0", - "web3-utils": "1.4.0" - } - }, - "web3-provider-engine": { - "version": "16.0.3", - "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-16.0.3.tgz", - "integrity": "sha512-Q3bKhGqLfMTdLvkd4TtkGYJHcoVQ82D1l8jTIwwuJp/sAp7VHnRYb9YJ14SW/69VMWoOhSpPLZV2tWb9V0WJoA==", - "dev": true, - "requires": { - "@ethereumjs/tx": "^3.3.0", - "async": "^2.5.0", - "backoff": "^2.5.0", - "clone": "^2.0.0", - "cross-fetch": "^2.1.0", - "eth-block-tracker": "^4.4.2", - "eth-json-rpc-filters": "^4.2.1", - "eth-json-rpc-infura": "^5.1.0", - "eth-json-rpc-middleware": "^6.0.0", - "eth-rpc-errors": "^3.0.0", - "eth-sig-util": "^1.4.2", - "ethereumjs-block": "^1.2.2", - "ethereumjs-util": "^5.1.5", - "ethereumjs-vm": "^2.3.4", - "json-stable-stringify": "^1.0.1", - "promise-to-callback": "^1.0.0", - "readable-stream": "^2.2.9", - "request": "^2.85.0", - "semaphore": "^1.0.3", - "ws": "^5.1.1", - "xhr": "^2.2.0", - "xtend": "^4.0.1" - }, - "dependencies": { - "eth-sig-util": { + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" + }, + "dependencies": { + "@noble/curves": { "version": "1.4.2", - "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", - "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", "dev": true, "requires": { - "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", - "ethereumjs-util": "^5.1.1" + "@noble/hashes": "1.4.0" } }, - "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0", - "from": "git+https://github.com/ethereumjs/ethereumjs-abi.git", + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", "dev": true, "requires": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" - }, - "dependencies": { - "ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", - "dev": true, - "requires": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" - } - } + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" } }, - "ethereumjs-util": { + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "bn.js": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", - "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", "dev": true, "requires": { - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "^0.1.3", - "rlp": "^2.0.0", - "safe-buffer": "^5.1.1" + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" } }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" + } + } + } + }, + "web3-net": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.4.tgz", + "integrity": "sha512-mKINnhOOnZ4koA+yV2OT5s5ztVjIx7IY9a03w6s+yao/BUn+Luuty0/keNemZxTr1E8Ehvtn28vbOtW7Ids+Ow==", + "dev": true, + "requires": { + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" + }, + "dependencies": { + "@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "dev": true, + "requires": { + "@noble/hashes": "1.4.0" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "dev": true + }, + "@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" } }, - "ws": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.3.tgz", - "integrity": "sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA==", + "@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "dev": true, + "requires": { + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + } + }, + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "ethereum-cryptography": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "dev": true, + "requires": { + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" + } + }, + "web3-utils": { + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", "dev": true, "requires": { - "async-limiter": "~1.0.0" + "@ethereumjs/util": "^8.1.0", + "bn.js": "^5.2.1", + "ethereum-bloom-filters": "^1.0.6", + "ethereum-cryptography": "^2.1.2", + "ethjs-unit": "0.1.6", + "number-to-bn": "1.7.0", + "randombytes": "^2.1.0", + "utf8": "3.0.0" } } } }, "web3-providers-http": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.4.0.tgz", - "integrity": "sha512-A9nLF4XGZfDb1KYYuKRwHY1H90Ee/0I0CqQQEELI0yuY9eca50qdCHEg3sJhvqBIG44JCm83amOGxR8wi+76tQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.4.tgz", + "integrity": "sha512-m2P5Idc8hdiO0l60O6DSCPw0kw64Zgi0pMjbEFRmxKIck2Py57RQMu4bxvkxJwkF06SlGaEQF8rFZBmuX7aagQ==", "dev": true, "requires": { - "web3-core-helpers": "1.4.0", - "xhr2-cookies": "1.1.0" + "abortcontroller-polyfill": "^1.7.5", + "cross-fetch": "^4.0.0", + "es6-promise": "^4.2.8", + "web3-core-helpers": "1.10.4" + }, + "dependencies": { + "cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dev": true, + "requires": { + "node-fetch": "^2.6.12" + } + }, + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "requires": { + "whatwg-url": "^5.0.0" + } + } } }, "web3-providers-ipc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.4.0.tgz", - "integrity": "sha512-ul/tSNUI5anhdBGBV+FWFH9EJgO73/G21haFDEXvTnSJQa9/byj401H/E2Xd8BXGk+2XB+CCGLZBiuAjhhhtTA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.4.tgz", + "integrity": "sha512-YRF/bpQk9z3WwjT+A6FI/GmWRCASgd+gC0si7f9zbBWLXjwzYAKG73bQBaFRAHex1hl4CVcM5WUMaQXf3Opeuw==", "dev": true, "requires": { "oboe": "2.1.5", - "underscore": "1.12.1", - "web3-core-helpers": "1.4.0" + "web3-core-helpers": "1.10.4" } }, "web3-providers-ws": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.4.0.tgz", - "integrity": "sha512-E5XfF58RLXuCtGiMSXxXEtjceCfPli+I4MDYCKx/J/bDJ6qvLUM2OnnGEmE7pq1Z03h0xh1ZezaB/qoweK3ZIQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.4.tgz", + "integrity": "sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA==", "dev": true, "requires": { "eventemitter3": "4.0.4", - "underscore": "1.12.1", - "web3-core-helpers": "1.4.0", + "web3-core-helpers": "1.10.4", "websocket": "^1.0.32" } }, "web3-shh": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.4.0.tgz", - "integrity": "sha512-OZMkMgo+VZnu1ErhIFXW+5ExnPKQg9v8/2DHGVtNEwuC5OHYuAEF5U7MQgbxYJYwbRmxQCt/hA3VwKjnkbmSAA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.4.tgz", + "integrity": "sha512-cOH6iFFM71lCNwSQrC3niqDXagMqrdfFW85hC9PFUrAr3PUrIem8TNstTc3xna2bwZeWG6OBy99xSIhBvyIACw==", "dev": true, "requires": { - "web3-core": "1.4.0", - "web3-core-method": "1.4.0", - "web3-core-subscriptions": "1.4.0", - "web3-net": "1.4.0" + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-net": "1.10.4" } }, "web3-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.4.0.tgz", - "integrity": "sha512-b8mEhwh/J928Xk+SQFjtqrR2EGPhpknWLcIt9aCpVPVRXiqjUGo/kpOHKz0azu9c6/onEJ9tWXZt0cVjmH0N5Q==", + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.8.2.tgz", + "integrity": "sha512-v7j6xhfLQfY7xQDrUP0BKbaNrmZ2/+egbqP9q3KYmOiPpnvAfol+32slgL0WX/5n8VPvKCK5EZ1HGrAVICSToA==", "dev": true, "requires": { - "bn.js": "^4.11.9", - "eth-lib": "0.2.8", + "bn.js": "^5.2.1", "ethereum-bloom-filters": "^1.0.6", + "ethereumjs-util": "^7.1.0", "ethjs-unit": "0.1.6", "number-to-bn": "1.7.0", "randombytes": "^2.1.0", - "underscore": "1.12.1", "utf8": "3.0.0" + }, + "dependencies": { + "bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + } } }, "webidl-conversions": { @@ -19051,26 +33989,6 @@ "yaeti": "^0.0.6" } }, - "websql": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/websql/-/websql-1.0.0.tgz", - "integrity": "sha512-7iZ+u28Ljw5hCnMiq0BCOeSYf0vCFQe/ORY0HgscTiKjQed8WqugpBUggJ2NTnB9fahn1kEnPRX2jf8Px5PhJw==", - "dev": true, - "optional": true, - "requires": { - "argsarray": "^0.0.1", - "immediate": "^3.2.2", - "noop-fn": "^1.0.0", - "sqlite3": "^4.0.0", - "tiny-queue": "^0.2.1" - } - }, - "whatwg-fetch": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", - "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==", - "dev": true - }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", @@ -19081,21 +33999,12 @@ "webidl-conversions": "^3.0.0" } }, - "whatwg-url-compat": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/whatwg-url-compat/-/whatwg-url-compat-0.6.5.tgz", - "integrity": "sha1-AImBEa9om7CXVBzVpFymyHmERb8=", - "dev": true, - "optional": true, - "requires": { - "tr46": "~0.0.1" - } - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, + "peer": true, "requires": { "isexe": "^2.0.0" } @@ -19119,45 +34028,17 @@ "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", "dev": true }, - "which-pm-runs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", - "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", - "dev": true - }, "which-typed-array": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz", - "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.2", - "call-bind": "^1.0.0", - "es-abstract": "^1.18.0-next.1", - "foreach": "^2.0.5", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.1", - "is-typed-array": "^1.1.3" - } - }, - "wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "wif": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", - "integrity": "sha1-CNP1IFbGZnkplyb63g1DKudLRwQ=", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", "dev": true, - "optional": true, "requires": { - "bs58check": "<3.0.0" + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" } }, "window-size": { @@ -19170,7 +34051,8 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true + "dev": true, + "peer": true }, "wordwrap": { "version": "1.0.0", @@ -19178,10 +34060,30 @@ "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, + "wordwrapjs": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.1.tgz", + "integrity": "sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA==", + "dev": true, + "peer": true, + "requires": { + "reduce-flatten": "^2.0.0", + "typical": "^5.2.0" + }, + "dependencies": { + "typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true, + "peer": true + } + } + }, "workerpool": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", - "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.5.1.tgz", + "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, "wrap-ansi": { @@ -19200,30 +34102,12 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "write-stream": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/write-stream/-/write-stream-0.4.3.tgz", - "integrity": "sha1-g8yMA0fQr2BXqThitOOuAd5cgcE=", - "dev": true, - "optional": true, - "requires": { - "readable-stream": "~0.0.2" - }, - "dependencies": { - "readable-stream": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-0.0.4.tgz", - "integrity": "sha1-8y124/uGM0SlSNeZIwBxc2ZbO40=", - "dev": true, - "optional": true - } - } - }, "ws": { "version": "7.4.6", "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true + "dev": true, + "requires": {} }, "xhr": { "version": "2.6.0", @@ -19270,30 +34154,12 @@ "cookiejar": "^2.1.1" } }, - "xml-name-validator": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-2.0.1.tgz", - "integrity": "sha1-TYuPHszTQZqjYgYb7O9RXh5VljU=", - "dev": true, - "optional": true - }, "xmlhttprequest": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=", "dev": true }, - "xss": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.11.tgz", - "integrity": "sha512-EimjrjThZeK2MO7WKR9mN5ZC1CSqivSl55wvUK5EtU6acf0rzEE1pN+9ZDrFXJ82BRp3JL38pPE6S4o/rpp1zQ==", - "dev": true, - "optional": true, - "requires": { - "commander": "^2.20.3", - "cssfilter": "0.0.10" - } - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -19319,9 +34185,9 @@ "dev": true }, "yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz", + "integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==", "dev": true }, "yargs": { @@ -19388,11 +34254,57 @@ } } }, + "yauzl": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", + "dev": true, + "requires": { + "buffer-crc32": "~0.2.3", + "fd-slicer": "~1.1.0" + } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "peer": true + }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true + }, + "zksync-web3": { + "version": "0.14.3", + "resolved": "https://registry.npmjs.org/zksync-web3/-/zksync-web3-0.14.3.tgz", + "integrity": "sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ==", + "dev": true, + "requires": {} + }, + "zx": { + "version": "8.1.6", + "resolved": "https://registry.npmjs.org/zx/-/zx-8.1.6.tgz", + "integrity": "sha512-SYAriWG+i2CFqMOJcF8QayI8wprlMYQsrmP6tFD7rSPnDLcImNSW7n/8crOYvNVrB2EFgz8LAQk23U1+Y7WrKA==", + "dev": true, + "requires": { + "@types/fs-extra": ">=11", + "@types/node": ">=20" + }, + "dependencies": { + "@types/node": { + "version": "20.14.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", + "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "dev": true, + "optional": true, + "requires": { + "undici-types": "~5.26.4" + } + } + } } } } diff --git a/package.json b/package.json index a19843ffb..b008ba924 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,31 @@ { "name": "@iexec/poco", - "version": "5.3.2", + "version": "5.5.0", "description": "", - "main": "truffle.js", + "author": "iExec", + "license": "Apache-2.0", + "homepage": "https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme", + "main": "", "scripts": { - "build": "truffle compile", - "migrate": "truffle migrate", - "test": "truffle test", - "autotest": "./autotest.sh", - "coverage": "NODE_OPTIONS='--max-old-space-size=8192' truffle run coverage", - "verify": "NODE_OPTIONS='--max-old-space-size=8192' truffle run verify" + "prepare": "husky", + "build": "npx hardhat compile", + "deploy": "npx hardhat deploy", + "test-storage-layout": "npx hardhat run scripts/test-storage.js", + "test": "REPORT_GAS=true npx hardhat test", + "autotest": "./test.sh", + "coverage": "npx hardhat coverage", + "verify": "npx hardhat verify", + "format": "npx prettier --write", + "uml": "npm run sol-to-uml && npm run puml-to-links && npm run storage-to-diagrams", + "sol-to-uml": "npx zx tools/sol-to-uml.mjs", + "puml-to-links": "npx zx tools/puml-to-links.mjs", + "storage-to-diagrams": "npx zx tools/storage-to-diagrams.mjs", + "doc": "npx hardhat docgen" + }, + "lint-staged": { + "*.{js,ts,sol}": [ + "prettier --write" + ] }, "repository": { "type": "git", @@ -19,33 +35,49 @@ "url": "https://github.com/iExecBlockchainComputing/PoCo-dev.git/issues" }, "files": [ - "/build", - "/contracts" + "/contracts", + "!/contracts/tools/testing/**/*", + "/artifacts/contracts", + "!/artifacts/contracts/**/*.dbg.json", + "!/artifacts/contracts/tools/testing/**/*", + "/deployments", + "/build" ], - "author": "iExec", - "license": "Apache-2.0", - "homepage": "https://github.com/iExecBlockchainComputing/PoCo-dev.git#readme", "dependencies": { - "@iexec/erlc": "1.0.0", "@iexec/interface": "3.0.35-8", - "@iexec/solidity": "0.1.0-legacy", + "@iexec/solidity": "^0.1.1", "@openzeppelin/contracts": "3.3.0", + "@openzeppelin/contracts-v5": "npm:@openzeppelin/contracts@^5.0.2", "@uniswap/v2-periphery": "1.1.0-beta.0", "rlc-faucet-contract": "1.0.10" }, "devDependencies": { - "@ensdomains/ens": "0.4.5", - "@ensdomains/resolver": "0.2.4", - "@openzeppelin/test-helpers": "^0.5.15", - "@truffle/hdwallet-provider": "^2.0.7", - "chai": "^4.3.6", - "eth-sig-util": "^3.0.1", - "ethers": "^5.6.4", - "ganache": "^7.0.4", - "husky": "^4.3.7", - "patched-openzeppelin-test-helpers": "file:patched-openzeppelin-test-helpers", - "solidity-coverage": "^0.7.20", - "truffle": "^5.5.11", - "truffle-plugin-verify": "^0.5.25" + "@amxx/factory": "^1.0.0", + "@defi-wonderland/smock": "^2.3.5", + "@ensdomains/ens-contracts": "^0.0.3", + "@nomicfoundation/hardhat-network-helpers": "^1.0.11", + "@nomicfoundation/hardhat-toolbox": "^2.0.2", + "@nomiclabs/hardhat-truffle5": "^2.0.7", + "@nomiclabs/hardhat-web3": "^2.0.0", + "@openzeppelin/test-helpers": "^0.5.16", + "@openzeppelin/upgrades-core": "^1.37.1", + "hardhat": "^2.14.1", + "hardhat-dependency-compiler": "^1.2.1", + "hardhat-deploy": "^0.11.43", + "husky": "^9.1.6", + "lint-staged": "^15.2.10", + "mocha": "^10.7.3", + "prettier": "^3.3.3", + "prettier-plugin-organize-imports": "^4.0.0", + "prettier-plugin-solidity": "^1.4.1", + "puml-for-markdown": "^1.2.1", + "sol2uml": "^2.5.19", + "solidity-docgen": "^0.6.0-beta.36", + "web3": "^1.10.4", + "zx": "^8.1.6" + }, + "devDependenciesComment": { + "mocha": "Mocha Test Explorer in VSCode", + "sol2uml": "After 2.5.19, see https://github.com/naddison36/sol2uml/issues/183" } } diff --git a/patched-openzeppelin-test-helpers/index.js b/patched-openzeppelin-test-helpers/index.js deleted file mode 100644 index ba7973933..000000000 --- a/patched-openzeppelin-test-helpers/index.js +++ /dev/null @@ -1,36 +0,0 @@ -const ozTestHelper = require("@openzeppelin/test-helpers"); -const { expect } = require("chai"); - -const ozExpectRevert = ozTestHelper.expectRevert; - -const patchedExpectRevert = async function (...args) { - return ozExpectRevert(...args); -}; - -Object.entries(ozExpectRevert).forEach(([key, val]) => { - patchedExpectRevert[key] = val; -}); - -patchedExpectRevert.unspecified = async function (promise) { - console.warn( - `Using patched 'exceptRevert.unspecified', error message will not be checked by @openzeppelin/test-helpers` - ); - try { - await promise; - } catch (error) { - console.info(`got error: ${error}`); - return; - } - expect.fail("Expected an exception but none was received"); -}; - -const patchedTestHelper = { - ...ozTestHelper, - expectRevert: patchedExpectRevert, -}; - -console.log( - "using patched-openzeppelin-test-helpers based on @openzeppelin/test-helpers with patched 'exceptRevert.unspecified'" -); - -module.exports = patchedTestHelper; diff --git a/patched-openzeppelin-test-helpers/package.json b/patched-openzeppelin-test-helpers/package.json deleted file mode 100644 index f21ff2b29..000000000 --- a/patched-openzeppelin-test-helpers/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "main": "index.js", - "name": "patched-openzeppelin-test-helpers", - "version": "0.0.1" -} diff --git a/scripts/boost/0_deploy-modules.ts b/scripts/boost/0_deploy-modules.ts new file mode 100644 index 000000000..6298b2e35 --- /dev/null +++ b/scripts/boost/0_deploy-modules.ts @@ -0,0 +1,39 @@ +import { deployments, ethers } from 'hardhat'; +import CONFIG from '../../config/config.json'; +import { + GenericFactory__factory, + IexecPocoBoostAccessorsDelegate__factory, + IexecPocoBoostDelegate__factory, +} from '../../typechain'; +const genericFactoryAddress = require('@amxx/factory/deployments/GenericFactory.json').address; + +(async () => { + console.log('Deploying Boost modules..'); + const [owner] = await ethers.getSigners(); + const chainId = (await ethers.provider.getNetwork()).chainId; + const deploymentOptions = CONFIG.chains[chainId].v5; + const salt = deploymentOptions.salt; + const modules = [ + { + name: 'IexecPocoBoostDelegate', + bytecode: IexecPocoBoostDelegate__factory.linkBytecode({ + ['contracts/libs/IexecLibOrders_v5.sol:IexecLibOrders_v5']: + deploymentOptions.IexecLibOrders_v5, + }), + }, + { + name: 'IexecPocoBoostAccessorsDelegate', + bytecode: IexecPocoBoostAccessorsDelegate__factory.bytecode, + }, + ]; + const genericFactoryInstance = GenericFactory__factory.connect(genericFactoryAddress, owner); + for (const module of modules) { + const moduleAddress = await genericFactoryInstance.predictAddress(module.bytecode, salt); + await genericFactoryInstance.createContract(module.bytecode, salt).then((tx) => tx.wait()); + console.log(`${module.name}: ${moduleAddress}`); + await deployments.save(module.name, { + abi: [], + address: moduleAddress, + }); + } +})(); diff --git a/scripts/boost/1_add-modules-to-proxy.ts b/scripts/boost/1_add-modules-to-proxy.ts new file mode 100644 index 000000000..5427b332f --- /dev/null +++ b/scripts/boost/1_add-modules-to-proxy.ts @@ -0,0 +1,78 @@ +import { BigNumber } from '@ethersproject/bignumber'; +import { BytesLike } from '@ethersproject/bytes'; +import { time } from '@nomicfoundation/hardhat-network-helpers'; +import hre, { ethers } from 'hardhat'; +import CONFIG from '../../config/config.json'; +import { + IexecPocoBoostAccessors__factory, + IexecPocoBoost__factory, + TimelockController__factory, +} from '../../typechain'; +import { Ownable__factory } from '../../typechain/factories/rlc-faucet-contract/contracts'; +import { + encodeModuleProxyUpdate, + logTxData, + printBlockTime, + printFunctions, +} from '../upgrades/upgrade-helper'; + +(async () => { + const chainId = (await ethers.provider.getNetwork()).chainId; + const deploymentOptions = CONFIG.chains[chainId].v5; + console.log('Link Boost functions to proxy:'); + const erc1538ProxyAddress = deploymentOptions.ERC1538Proxy; + const iexecPocoBoostDelegateAddress = (await hre.deployments.get('IexecPocoBoostDelegate')) + .address; // Bellecour: 0x8425229f979AB3b0dDDe00D475D762cA4d6a5eFc + const iexecPocoBoostAccessorsDelegateAddress = ( + await hre.deployments.get('IexecPocoBoostAccessorsDelegate') + ).address; // Bellecour: 0x56185a2b0dc8b556BBfBAFB702BC971Ed75e868C + const [account] = await hre.ethers.getSigners(); + const timelockAddress = await Ownable__factory.connect(erc1538ProxyAddress, account).owner(); // Bellecour: 0x4611B943AA1d656Fc669623b5DA08756A7e288E9 + const iexecPocoBoostProxyUpdate = encodeModuleProxyUpdate( + IexecPocoBoost__factory.createInterface(), + iexecPocoBoostDelegateAddress, + ); + const iexecPocoBoostAccessorsProxyUpdate = encodeModuleProxyUpdate( + IexecPocoBoostAccessors__factory.createInterface(), + iexecPocoBoostAccessorsDelegateAddress, + ); + // Salt but must be the same for schedule & execute + const operationSalt = '0x0be814a62c44af32241a2c964e5680d1b25c783473c6e7875cbc8071770d7ff0'; // Random + const delay = 60 * 60 * 24 * 7; + const updateProxyArgs = [ + Array(2).fill(erc1538ProxyAddress), + Array(2).fill(0), + [iexecPocoBoostProxyUpdate, iexecPocoBoostAccessorsProxyUpdate], + ethers.constants.HashZero, + operationSalt, + ] as [string[], BigNumber[], BytesLike[], BytesLike, BytesLike]; + console.log('Scheduling proxy update..'); + await printBlockTime(); + const timelockInstance = TimelockController__factory.connect(timelockAddress, account); + const timelockAdminAddress = await timelockInstance.getRoleMember( + await timelockInstance.PROPOSER_ROLE(), + 0, + ); + console.log(`Timelock proposer: ${timelockAdminAddress}`); + const timelockAdminSigner = await ethers.getImpersonatedSigner(timelockAdminAddress); + await timelockInstance + .connect(timelockAdminSigner) + .scheduleBatch(...updateProxyArgs, delay) + .then((tx) => { + logTxData(tx); + tx.wait(); + }); + await time.increase(delay); + console.log('Time traveling..'); + await printBlockTime(); + await printFunctions(erc1538ProxyAddress, account); + console.log('Executing proxy update..'); + await timelockInstance + .connect(timelockAdminSigner) + .executeBatch(...updateProxyArgs) + .then((x) => { + logTxData(x); + x.wait(); + }); + await printFunctions(erc1538ProxyAddress, account); +})(); diff --git a/scripts/boost/README.md b/scripts/boost/README.md new file mode 100644 index 000000000..080b593b4 --- /dev/null +++ b/scripts/boost/README.md @@ -0,0 +1,51 @@ +# Add Boost functions to proxy + +## Locally forked Bellecour network + +0. Start node +``` +LOCAL_FORK=true npx hardhat node --no-deploy +``` + +1. Deploy modules and add to proxy +``` +(export LOCAL_FORK=true; \ +npx hardhat run scripts/boost/0_deploy-modules.ts --network external-hardhat && \ +npx hardhat run scripts/boost/1_add-modules-to-proxy.ts --network external-hardhat) +``` + +For later production deployment, either +A. Get transaction data from previous logs +OR +B. Re-generate it with CLI +``` +node ../erc1538upgrade-cli/src/erc1538update.js +``` +``` +node ../erc1538upgrade-cli/src/timelock.js +``` + +## Bellecour network + +1a. Deploy modules + +1b. Schedule update +``` +const tx = await timeLockAdmin + .sendTransaction({ + to: timeLockAddress, + value: 0, + data: '', + }) + .then((x) => x.wait()); +``` +1c. Execute update +``` +const tx = await timeLockAdmin + .sendTransaction({ + to: timeLockAddress, + value: 0, + data: '', + }) + .then((x) => x.wait()); +``` \ No newline at end of file diff --git a/scripts/common-test-snapshot.js b/scripts/common-test-snapshot.js new file mode 100644 index 000000000..9f8becf1c --- /dev/null +++ b/scripts/common-test-snapshot.js @@ -0,0 +1,13 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +async function resetNetworkToInitialState() { + console.log( + 'Reset network to a fresh state to ensure same initial snapshot state between tests', + ); + await hre.network.provider.send('hardhat_reset'); +} + +module.exports = { + resetNetworkToInitialState, +}; diff --git a/scripts/ens/sidechain.js b/scripts/ens/sidechain.js index 3dcea0d07..f18bcc2a5 100644 --- a/scripts/ens/sidechain.js +++ b/scripts/ens/sidechain.js @@ -1,185 +1,214 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 -const { ethers } = require('ethers'); +const { ethers } = require('ethers'); const { EthersDeployer: FactoryDeployer } = require('../../utils/FactoryDeployer'); -const ENSRegistry = require('@ensdomains/ens/build/contracts/ENSRegistry.json'); -const FIFSRegistrar = require('@ensdomains/ens/build/contracts/FIFSRegistrar.json'); -const ReverseRegistrar = require('@ensdomains/ens/build/contracts/ReverseRegistrar.json'); -const PublicResolver = require('@ensdomains/resolver/build/contracts/PublicResolver.json'); +const ENSRegistry = require('@ensdomains/ens/build/contracts/ENSRegistry.json'); +const FIFSRegistrar = require('@ensdomains/ens/build/contracts/FIFSRegistrar.json'); +const ReverseRegistrar = require('@ensdomains/ens/build/contracts/ReverseRegistrar.json'); +const PublicResolver = require('@ensdomains/resolver/build/contracts/PublicResolver.json'); -(async() => { +(async () => { + const provider = new ethers.getDefaultProvider(process.env.NODE); + const wallet = new ethers.Wallet(process.env.MNEMONIC, provider); + const deployer = new FactoryDeployer(wallet); - const provider = new ethers.getDefaultProvider(process.env.NODE); - const wallet = new ethers.Wallet(process.env.MNEMONIC, provider); - const deployer = new FactoryDeployer(wallet); + await deployer.deploy(ENSRegistry, { + call: new ethers.utils.Interface(ENSRegistry.abi).encodeFunctionData('setOwner', [ + ethers.constants.HashZero, + wallet.address, + ]), + }); + const ens = new ethers.Contract(ENSRegistry.address, ENSRegistry.abi, wallet); - await deployer.deploy(ENSRegistry, { call: (new ethers.utils.Interface(ENSRegistry.abi)).encodeFunctionData('setOwner', [ ethers.constants.HashZero, wallet.address ]) }); - const ens = new ethers.Contract(ENSRegistry.address, ENSRegistry.abi, wallet); + await deployer.deploy(PublicResolver, { args: [ens.address] }); + const publicresolver = new ethers.Contract(PublicResolver.address, PublicResolver.abi, wallet); - await deployer.deploy(PublicResolver, { args: [ ens.address ] }); - const publicresolver = new ethers.Contract(PublicResolver.address, PublicResolver.abi, wallet); + await deployer.deploy(ReverseRegistrar, { args: [ens.address, publicresolver.address] }); + const reverseregistrar = new ethers.Contract( + ReverseRegistrar.address, + ReverseRegistrar.abi, + wallet, + ); - await deployer.deploy(ReverseRegistrar, { args: [ ens.address, publicresolver.address ] }); - const reverseregistrar = new ethers.Contract(ReverseRegistrar.address, ReverseRegistrar.abi, wallet); + const domains = [ + { + name: 'eth', + }, + { + name: 'iexec.eth', + }, + { + name: 'erlc.iexec.eth', + address: '0x0000000000000000000000000000000000000000', + }, + { + name: 'timelock.iexec.eth', + address: '0x4611B943AA1d656Fc669623b5DA08756A7e288E9', + }, + { + name: 'v5.iexec.eth', + }, + { + name: 'core.v5.iexec.eth', + address: '0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f', + setName: true, + }, + { + name: 'apps.v5.iexec.eth', + address: '0xB1C52075b276f87b1834919167312221d50c9D16', + setName: true, + }, + { + name: 'datasets.v5.iexec.eth', + address: '0x799DAa22654128d0C64d5b79eac9283008158730', + setName: true, + }, + { + name: 'workerpools.v5.iexec.eth', + address: '0xC76A18c78B7e530A165c5683CB1aB134E21938B4', + setName: true, + }, + { + name: 'resolver.eth', + address: publicresolver.address, + }, + { + name: 'reverse', + }, + { + name: 'addr.reverse', + owner: reverseregistrar.address, + }, + ]; - const domains = [{ - name: 'eth', - },{ - name: 'iexec.eth', - },{ - name: 'erlc.iexec.eth', - address: '0x0000000000000000000000000000000000000000', - },{ - name: 'timelock.iexec.eth', - address: '0x4611B943AA1d656Fc669623b5DA08756A7e288E9', - },{ - name: 'v5.iexec.eth', - },{ - name: 'core.v5.iexec.eth', - address: '0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f', - setName: true, - },{ - name: 'apps.v5.iexec.eth', - address: '0xB1C52075b276f87b1834919167312221d50c9D16', - setName: true, - },{ - name: 'datasets.v5.iexec.eth', - address: '0x799DAa22654128d0C64d5b79eac9283008158730', - setName: true, - },{ - name: 'workerpools.v5.iexec.eth', - address: '0xC76A18c78B7e530A165c5683CB1aB134E21938B4', - setName: true, - },{ - name: 'resolver.eth', - address: publicresolver.address, - },{ - name: 'reverse', - },{ - name: 'addr.reverse', - owner: reverseregistrar.address, - }] + // Register domains + await new Promise((resolve) => { + Promise.all( + domains + .filter((entry) => entry.name) + .map(async (entry) => ({ + ...entry, + owner: entry.owner || wallet.address, + _owner: await ens.owner(ethers.utils.namehash(entry.name)), + })), + ).then((_) => { + _.filter(({ _owner, owner }) => _owner != owner) + .reduce(async (promise, entry) => { + await Promise.resolve(promise); + console.log(`setSubnodeOwner(${entry.name}) โ†’ ${entry.owner}`); + const i = entry.name.indexOf('.'); + const label = i == -1 ? entry.name : entry.name.substr(0, i); + const parent = i == -1 ? '' : entry.name.substr(i + 1); + await ( + await ens.setSubnodeOwner( + ethers.utils.namehash(parent), + ethers.utils.id(label), + entry.owner, + ) + ).wait(); + }, Promise.resolve()) + .then(resolve); + }); + }); - // Register domains - await new Promise(resolve => { - Promise.all( - domains - .filter(entry => entry.name) - .map(async entry => ({ ...entry, owner: entry.owner || wallet.address, _owner: await ens.owner(ethers.utils.namehash(entry.name)) })) - ).then(_ => { - _ - .filter(({ _owner, owner }) => _owner != owner) - .reduce(async (promise, entry) => { - await Promise.resolve(promise); - console.log(`setSubnodeOwner(${entry.name}) โ†’ ${entry.owner}`) - const i = entry.name.indexOf('.') - const label = i == -1 ? entry.name : entry.name.substr(0, i) - const parent = i == -1 ? '' : entry.name.substr(i + 1) - await (await ens.setSubnodeOwner( - ethers.utils.namehash(parent), - ethers.utils.id(label), - entry.owner, - )).wait(); - }, Promise.resolve()) - .then(resolve) - }) - }) + // Set resolver + await new Promise((resolve) => { + Promise.all( + domains + .filter((entry) => entry.resolver || entry.address) + .map(async (entry) => ({ + ...entry, + resolver: entry.resolver || publicresolver.address, + _resolver: await ens.resolver(ethers.utils.namehash(entry.name)), + })), + ).then((_) => { + _.filter(({ _resolver, resolver }) => _resolver != resolver) + .reduce(async (promise, entry) => { + await Promise.resolve(promise); + console.log(`setResolver(${entry.name}) โ†’ ${entry.resolver}`); + await ( + await ens.setResolver(ethers.utils.namehash(entry.name), entry.resolver) + ).wait(); + }, Promise.resolve()) + .then(resolve); + }); + }); - // Set resolver - await new Promise(resolve => { - Promise.all( - domains - .filter(entry => entry.resolver || entry.address) - .map(async entry => ({ ...entry, resolver: entry.resolver || publicresolver.address, _resolver: await ens.resolver(ethers.utils.namehash(entry.name)) })) - ).then(_ => { - _ - .filter(({ _resolver, resolver }) => _resolver != resolver) - .reduce(async (promise, entry) => { - await Promise.resolve(promise); - console.log(`setResolver(${entry.name}) โ†’ ${entry.resolver}`) - await (await ens.setResolver( - ethers.utils.namehash(entry.name), - entry.resolver, - )).wait(); - }, Promise.resolve()) - .then(resolve) - }) - }) - - // Set address - await new Promise(resolve => { - Promise.all( - domains - .filter(entry => entry.address) - .map(async entry => { - try - { - const resolverContract = new ethers.Contract(await ens.resolver(ethers.utils.namehash(entry.name)), PublicResolver.abi, wallet) - const address = await resolverContract['addr(bytes32)'](ethers.utils.namehash(entry.name)) - return address == entry.address ? null : { ...entry, resolverContract } - } - catch - { - return null // invalid resolverContract - } - }) - ).then(_ => { - _ - .filter(Boolean) - .reduce(async (promise, entry) => { - await Promise.resolve(promise); - console.log(`setAddr(${entry.name}) โ†’ ${entry.address}`) - await (await entry.resolverContract['setAddr(bytes32,address)']( - ethers.utils.namehash(entry.name), - entry.address, - )).wait(); - }, Promise.resolve()) - .then(resolve) - }) - }) - - // Set reverse - await new Promise(resolve => { - Promise.all( - domains - .filter(entry => entry.name && entry.address && entry.setName) - .map(entry => ({ ...entry, lookup: `${entry.address.toLowerCase().substr(2)}.addr.reverse` })) - .map(async entry => { - try - { - const reverseResolver = new ethers.Contract(await ens.resolver(ethers.utils.namehash(entry.lookup)), PublicResolver.abi, wallet) - const name = await reverseResolver.name(ethers.utils.namehash(entry.lookup)) - return name == entry.name ? null : entry - } - catch - { - return entry // reverseResolver not set - } - }) - ).then(_ => { - _ - .filter(Boolean) - .reduce(async (promise, entry) => { - await Promise.resolve(promise); - console.log(`setName(${entry.address}) โ†’ ${entry.name}`) - await (await (new ethers.Contract(entry.address, [ ethers.utils.FunctionFragment.fromString('setName(address,string)') ], wallet)).setName(ens.address, entry.name)).wait() - }, Promise.resolve()) - .then(resolve) - }) - }) + // Set address + await new Promise((resolve) => { + Promise.all( + domains + .filter((entry) => entry.address) + .map(async (entry) => { + try { + const resolverContract = new ethers.Contract( + await ens.resolver(ethers.utils.namehash(entry.name)), + PublicResolver.abi, + wallet, + ); + const address = await resolverContract['addr(bytes32)']( + ethers.utils.namehash(entry.name), + ); + return address == entry.address ? null : { ...entry, resolverContract }; + } catch { + return null; // invalid resolverContract + } + }), + ).then((_) => { + _.filter(Boolean) + .reduce(async (promise, entry) => { + await Promise.resolve(promise); + console.log(`setAddr(${entry.name}) โ†’ ${entry.address}`); + await ( + await entry.resolverContract['setAddr(bytes32,address)']( + ethers.utils.namehash(entry.name), + entry.address, + ) + ).wait(); + }, Promise.resolve()) + .then(resolve); + }); + }); + // Set reverse + await new Promise((resolve) => { + Promise.all( + domains + .filter((entry) => entry.name && entry.address && entry.setName) + .map((entry) => ({ + ...entry, + lookup: `${entry.address.toLowerCase().substr(2)}.addr.reverse`, + })) + .map(async (entry) => { + try { + const reverseResolver = new ethers.Contract( + await ens.resolver(ethers.utils.namehash(entry.lookup)), + PublicResolver.abi, + wallet, + ); + const name = await reverseResolver.name( + ethers.utils.namehash(entry.lookup), + ); + return name == entry.name ? null : entry; + } catch { + return entry; // reverseResolver not set + } + }), + ).then((_) => { + _.filter(Boolean) + .reduce(async (promise, entry) => { + await Promise.resolve(promise); + console.log(`setName(${entry.address}) โ†’ ${entry.name}`); + await ( + await new ethers.Contract( + entry.address, + [ethers.utils.FunctionFragment.fromString('setName(address,string)')], + wallet, + ).setName(ens.address, entry.name) + ).wait(); + }, Promise.resolve()) + .then(resolve); + }); + }); })().catch(console.error); diff --git a/scripts/hardhat-fixture-deployer.ts b/scripts/hardhat-fixture-deployer.ts new file mode 100644 index 000000000..c8e796aee --- /dev/null +++ b/scripts/hardhat-fixture-deployer.ts @@ -0,0 +1,63 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { deployments, ethers } from 'hardhat'; +import { IexecInterfaceNative__factory } from '../typechain'; +import { getIexecAccounts } from '../utils/poco-tools'; +const { resetNetworkToInitialState } = require('./common-test-snapshot'); +const deploy = require('../deploy/0_deploy'); +const deployEns = require('../deploy/1_deploy-ens'); + +// Anonymous functions cannot be used as fixtures, hence we need to wrap body +// in a method which will be called by `loadFixture`. +async function resetNetworkAndDeployAllContracts() { + let proxyAddress; + if (process.env.LOCAL_FORK != 'true') { + await resetNetworkToInitialState(); + await deploy(); + await deployEns(); + proxyAddress = (await deployments.get('ERC1538Proxy')).address; + } else { + proxyAddress = '0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f'; + // Send RLCs to default accounts + const srlcRichSigner = await ethers.getImpersonatedSigner(proxyAddress); + const otherAccountInitAmount = + 10 * // Give this much RLC per account + 10 ** 9; + const accounts = await getIexecAccounts(); + const accountsArray = Object.values(accounts) as SignerWithAddress[]; + console.log(`Rich account ${srlcRichSigner.address} sending RLCs to other accounts..`); + const iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, ethers.provider); + for (let i = 0; i < accountsArray.length; i++) { + const account = accountsArray[i]; + await iexecPoco + .connect(srlcRichSigner) + .transfer(account.address, otherAccountInitAmount) + .then((tx) => tx.wait()); + const balance = await iexecPoco.balanceOf(account.address); + console.log(`Account #${i}: ${account.address} (${balance.toLocaleString()} nRLC)`); + } + // Transfer ownership from Timelock to iexecAdmin EOA account + const timelockAddress = await iexecPoco.owner(); + const timelock = await ethers.getImpersonatedSigner(timelockAddress); + const newIexecAdminAddress = accounts.iexecAdmin.address; + console.log( + `Transferring Poco ownership from Timelock:${timelockAddress} to iexecAdmin:${newIexecAdminAddress}`, + ); + await iexecPoco + .connect(timelock) + .transferOwnership(newIexecAdminAddress) + .then((tx) => tx.wait()); + } + return proxyAddress; +} + +/** + * @returns proxy address. + */ +export const loadHardhatFixtureDeployment = async () => { + console.log('Running hardhat-fixture'); + return await loadFixture(resetNetworkAndDeployAllContracts); +}; diff --git a/scripts/hardhat-truffle-utils.js b/scripts/hardhat-truffle-utils.js new file mode 100644 index 000000000..d557f9316 --- /dev/null +++ b/scripts/hardhat-truffle-utils.js @@ -0,0 +1,18 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +module.exports = { + deploy: async function (contract, ...args) { + const instance = await contract.new(...args); + contract.setAsDeployed(instance); + console.log("%s: %s", contract._json.contractName, instance.address); + return instance; + }, + link: async function (libraryInstance, contract) { + const chainid = await web3.eth.net.getId(); + const instance = contract._json.networks[chainid]; + if (!instance) { + await contract.link(libraryInstance); + } + }, +}; diff --git a/scripts/module_upgrade.js b/scripts/module_upgrade.js index 02ecd999f..0cab8d21b 100644 --- a/scripts/module_upgrade.js +++ b/scripts/module_upgrade.js @@ -1,157 +1,150 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 -const assert = require('assert') -const CONFIG = require('../config/config.json') -var GenericFactory = artifacts.require('@iexec/solidity/GenericFactory') -var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy') -var ERC1538Update = artifacts.require('@iexec/solidity/ERC1538UpdateDelegate') +const assert = require('assert'); +const CONFIG = require('../config/config.json'); +var GenericFactory = artifacts.require('@iexec/solidity/GenericFactory'); +var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy'); +var ERC1538Update = artifacts.require('@iexec/solidity/ERC1538UpdateDelegate'); /***************************************************************************** * Configuration * *****************************************************************************/ const LIBRARIES = [ - // artifacts.require('IexecLibOrders_v5'), -] + // artifacts.require('IexecLibOrders_v5'), +]; const MODULES = [ - // { module: artifacts.require('IexecAccessorsDelegate'), methods: [ 'viewTask', 'resultFor' ] }, // result separation update - // { module: artifacts.require('IexecPocoDelegate'), methods: [ 'finalize', 'contributeAndFinalize' ] }, // result separation update - // { module: artifacts.require('IexecEscrowTokenDelegate'), methods: null }, // escrow upgrade (uniswap) - // { module: artifacts.require('IexecEscrowTokenSwapDelegate'), methods: null }, // escrow upgrade (uniswap) -] + // { module: artifacts.require('IexecAccessorsDelegate'), methods: [ 'viewTask', 'resultFor' ] }, // result separation update + // { module: artifacts.require('IexecPocoDelegate'), methods: [ 'finalize', 'contributeAndFinalize' ] }, // result separation update + // { module: artifacts.require('IexecEscrowTokenDelegate'), methods: null }, // escrow upgrade (uniswap) + // { module: artifacts.require('IexecEscrowTokenSwapDelegate'), methods: null }, // escrow upgrade (uniswap) +]; const FUNCTIONS = [ - // { func: 'finalize(bytes32,bytes);', address: '0x0000000000000000000000000000000000000000' }, // result separation update - // { func: 'contributeAndFinalize(bytes32,bytes32,bytes,address,bytes,bytes);', address: '0x0000000000000000000000000000000000000000' }, // result separation update -] + // { func: 'finalize(bytes32,bytes);', address: '0x0000000000000000000000000000000000000000' }, // result separation update + // { func: 'contributeAndFinalize(bytes32,bytes32,bytes,address,bytes,bytes);', address: '0x0000000000000000000000000000000000000000' }, // result separation update +]; /***************************************************************************** * Tools * *****************************************************************************/ -function getSerializedObject(entry) -{ - return (entry.type == 'tuple') - ? `(${entry.components.map(getSerializedObject).join(',')})` - : entry.type; +function getSerializedObject(entry) { + return entry.type == 'tuple' + ? `(${entry.components.map(getSerializedObject).join(',')})` + : entry.type; } -function getFunctionSignatures(abi) -{ - return abi - .filter(entry => entry.type == 'function') - .map(entry => `${entry.name}(${entry.inputs.map(getSerializedObject).join(',')});`) - .join('') - + (abi.some(entry => entry.type == 'receive' ) ? 'receive;' : '') - + (abi.some(entry => entry.type == 'fallback') ? 'fallback;' : ''); +function getFunctionSignatures(abi) { + return ( + abi + .filter((entry) => entry.type == 'function') + .map((entry) => `${entry.name}(${entry.inputs.map(getSerializedObject).join(',')});`) + .join('') + + (abi.some((entry) => entry.type == 'receive') ? 'receive;' : '') + + (abi.some((entry) => entry.type == 'fallback') ? 'fallback;' : '') + ); } -async function factoryDeployer(contract, options = {}) -{ - console.log(`[factoryDeployer] ${contract.contractName}`); - const factory = await GenericFactory.deployed(); - const libraryAddresses = await Promise.all( - LIBRARIES - .filter(({ contractName }) => contract.bytecode.search(contractName) != -1) - .map(async ({ contractName, deployed }) => ({ - pattern: new RegExp(`__${contractName}${'_'.repeat(38-contractName.length)}`, 'g'), - ...await deployed() - })) - ); +async function factoryDeployer(contract, options = {}) { + console.log(`[factoryDeployer] ${contract.contractName}`); + const factory = await GenericFactory.deployed(); + const libraryAddresses = await Promise.all( + LIBRARIES.filter(({ contractName }) => contract.bytecode.search(contractName) != -1).map( + async ({ contractName, deployed }) => ({ + pattern: new RegExp( + `__${contractName}${'_'.repeat(38 - contractName.length)}`, + 'g', + ), + ...(await deployed()), + }), + ), + ); - const constructorABI = contract._json.abi.find(e => e.type == 'constructor'); - const coreCode = libraryAddresses.reduce((code, { pattern, address }) => code.replace(pattern, address.slice(2).toLowerCase()), contract.bytecode); - const argsCode = constructorABI ? web3.eth.abi.encodeParameters(constructorABI.inputs.map(e => e.type), options.args || []).slice(2) : ''; - const code = coreCode + argsCode; - const salt = options.salt || '0x0000000000000000000000000000000000000000000000000000000000000000'; + const constructorABI = contract._json.abi.find((e) => e.type == 'constructor'); + const coreCode = libraryAddresses.reduce( + (code, { pattern, address }) => code.replace(pattern, address.slice(2).toLowerCase()), + contract.bytecode, + ); + const argsCode = constructorABI + ? web3.eth.abi + .encodeParameters( + constructorABI.inputs.map((e) => e.type), + options.args || [], + ) + .slice(2) + : ''; + const code = coreCode + argsCode; + const salt = + options.salt || '0x0000000000000000000000000000000000000000000000000000000000000000'; - contract.address = options.call - ? await factory.predictAddressWithCall(code, salt, options.call) - : await factory.predictAddress(code, salt); + contract.address = options.call + ? await factory.predictAddressWithCall(code, salt, options.call) + : await factory.predictAddress(code, salt); - if (await web3.eth.getCode(contract.address) == '0x') - { - console.log(`[factory] Preparing to deploy ${contract.contractName} ...`); - options.call - ? await factory.createContractAndCall(code, salt, options.call) - : await factory.createContract(code, salt); - console.log(`[factory] ${contract.contractName} successfully deployed at ${contract.address}`); - } - else - { - console.log(`[factory] ${contract.contractName} already deployed`); - } + if ((await web3.eth.getCode(contract.address)) == '0x') { + console.log(`[factory] Preparing to deploy ${contract.contractName} ...`); + options.call + ? await factory.createContractAndCall(code, salt, options.call) + : await factory.createContract(code, salt); + console.log( + `[factory] ${contract.contractName} successfully deployed at ${contract.address}`, + ); + } else { + console.log(`[factory] ${contract.contractName} already deployed`); + } } /***************************************************************************** * Main * *****************************************************************************/ module.exports = async (callback) => { - try - { - console.log('# web3 version:', web3.version); - const chainid = await web3.eth.net.getId(); - const chaintype = await web3.eth.net.getNetworkType(); - console.log('Chainid is:', chainid); - console.log('Chaintype is:', chaintype); + try { + console.log('# web3 version:', web3.version); + const chainid = await web3.eth.net.getId(); + const chaintype = await web3.eth.net.getNetworkType(); + console.log('Chainid is:', chainid); + console.log('Chaintype is:', chaintype); - // Load config - const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; - const factoryOptions = { salt: deploymentOptions.v5.salt || web3.utils.randomHex(32) }; + // Load config + const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; + const factoryOptions = { salt: deploymentOptions.v5.salt || web3.utils.randomHex(32) }; - // Load core - const proxy = await ERC1538Update.at((await ERC1538Proxy.deployed()).address); - console.log('Deploying to proxy:', proxy.address); + // Load core + const proxy = await ERC1538Update.at((await ERC1538Proxy.deployed()).address); + console.log('Deploying to proxy:', proxy.address); - // Module updates - for ([ i, { module, methods } ] of Object.entries(MODULES.filter(Boolean))) - { - console.log(`[${i}] ERC1538 link: ${module.contractName}`); - // deploy module - if (deploymentOptions.v5.usefactory) - { - await factoryDeployer(module, factoryOptions); - } - else - { - await deployer.deploy(module); - } - // update proxy - await proxy.updateContract( - (await module.deployed()).address, - getFunctionSignatures(module.abi.filter(entry => !methods || methods.indexOf(entry.name) != -1)), - `Linking module ${module.contractName}` - ); - } + // Module updates + for ([i, { module, methods }] of Object.entries(MODULES.filter(Boolean))) { + console.log(`[${i}] ERC1538 link: ${module.contractName}`); + // deploy module + if (deploymentOptions.v5.usefactory) { + await factoryDeployer(module, factoryOptions); + } else { + await deployer.deploy(module); + } + // update proxy + await proxy.updateContract( + (await module.deployed()).address, + getFunctionSignatures( + module.abi.filter((entry) => !methods || methods.indexOf(entry.name) != -1), + ), + `Linking module ${module.contractName}`, + ); + } - // Function updates - for ([ i, { func, address } ] of Object.entries(FUNCTIONS.filter(Boolean))) - { - // format, add ';' if needed. - if (!func.endsWith(';')) { func += ';'; } - // update proxy - console.log(`[${i}] Linking function: ${func} โ†’ ${address}`); - await proxy.updateContract(address, func, `Updating function ${func}`); - } - } - catch (e) - { - callback(e) - } - finally - { - callback() - } -} + // Function updates + for ([i, { func, address }] of Object.entries(FUNCTIONS.filter(Boolean))) { + // format, add ';' if needed. + if (!func.endsWith(';')) { + func += ';'; + } + // update proxy + console.log(`[${i}] Linking function: ${func} โ†’ ${address}`); + await proxy.updateContract(address, func, `Updating function ${func}`); + } + } catch (e) { + callback(e); + } finally { + callback(); + } +}; diff --git a/scripts/set-callback-gas.ts b/scripts/set-callback-gas.ts new file mode 100644 index 000000000..28de48811 --- /dev/null +++ b/scripts/set-callback-gas.ts @@ -0,0 +1,25 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import hre, { deployments } from 'hardhat'; +import { IexecAccessors__factory, IexecMaintenanceDelegate__factory } from '../typechain'; + +(async () => { + const requestedCallbackGas = Number(process.env.CALLBACK_GAS); + if (!requestedCallbackGas) { + console.error('`CALLBACK_GAS` env variable is missing. Aborting.'); + process.exit(1); + } + console.log(`Setting callback-gas to ${requestedCallbackGas.toLocaleString()} ..`); + const [owner] = await hre.ethers.getSigners(); + const erc1538ProxyAddress = (await deployments.get('ERC1538Proxy')).address; + const viewCallbackGas = async () => + (await IexecAccessors__factory.connect(erc1538ProxyAddress, owner).callbackgas()) + .toNumber() + .toLocaleString(); + const callbackGasBefore = await viewCallbackGas(); + await IexecMaintenanceDelegate__factory.connect(erc1538ProxyAddress, owner) + .setCallbackGas(requestedCallbackGas) + .then((tx) => tx.wait()); + console.log(`Changed callback-gas from ${callbackGasBefore} to ${await viewCallbackGas()}`); +})().catch((error) => console.log(error)); diff --git a/scripts/sponsoring/0_deploy-modules.ts b/scripts/sponsoring/0_deploy-modules.ts new file mode 100644 index 000000000..c4c6bf87b --- /dev/null +++ b/scripts/sponsoring/0_deploy-modules.ts @@ -0,0 +1,63 @@ +import { deployments, ethers } from 'hardhat'; +import CONFIG from '../../config/config.json'; +import { + GenericFactory__factory, + IexecOrderManagementDelegate__factory, + IexecPoco1Delegate__factory, + IexecPoco2Delegate__factory, + IexecPocoAccessorsDelegate__factory, +} from '../../typechain'; +const genericFactoryAddress = require('@amxx/factory/deployments/GenericFactory.json').address; + +if (process.env.HANDLE_SPONSORING_UPGRADE_INTERNALLY != 'true') { + (async () => { + await deployModules(); + })(); +} + +export async function deployModules() { + console.log('Deploying modules..'); + const [deployer] = await ethers.getSigners(); + console.log(`Deployer: ${deployer.address}`); + const chainId = (await ethers.provider.getNetwork()).chainId; + const deploymentOptions = CONFIG.chains[chainId].v5; + + const salt = deploymentOptions.salt; + const libraries = { + ['contracts/libs/IexecLibOrders_v5.sol:IexecLibOrders_v5']: + deploymentOptions.IexecLibOrders_v5, + }; + const modules = [ + { + name: 'IexecOrderManagementDelegate', + contract: new IexecOrderManagementDelegate__factory(libraries), + }, + { + name: 'IexecPoco1Delegate', + contract: new IexecPoco1Delegate__factory(libraries), + }, + { + name: 'IexecPoco2Delegate', + contract: new IexecPoco2Delegate__factory(), + }, + { + name: 'IexecPocoAccessorsDelegate', + contract: new IexecPocoAccessorsDelegate__factory(libraries), + }, + ]; + const genericFactoryInstance = GenericFactory__factory.connect(genericFactoryAddress, deployer); + for await (const module of modules) { + let moduleBytecode = module.contract.getDeployTransaction().data; + if (!moduleBytecode) { + throw new Error('Failed to prepare bytecode'); + } + const moduleAddress = await genericFactoryInstance.predictAddress(moduleBytecode, salt); + await genericFactoryInstance.createContract(moduleBytecode, salt).then((tx) => tx.wait()); + console.log(`${module.name}: ${moduleAddress}`); + await deployments.save(module.name, { + abi: (module.contract as any).constructor.abi, + address: moduleAddress, + bytecode: moduleBytecode.toString(), + }); + } +} diff --git a/scripts/sponsoring/1_add-modules-to-proxy.ts b/scripts/sponsoring/1_add-modules-to-proxy.ts new file mode 100644 index 000000000..82c766112 --- /dev/null +++ b/scripts/sponsoring/1_add-modules-to-proxy.ts @@ -0,0 +1,128 @@ +import { BigNumber } from '@ethersproject/bignumber'; +import { BytesLike } from '@ethersproject/bytes'; +import { time } from '@nomicfoundation/hardhat-network-helpers'; +import hre, { ethers } from 'hardhat'; +import CONFIG from '../../config/config.json'; +import { + IexecOrderManagementDelegate__factory, + IexecPoco1Delegate__factory, + IexecPoco2Delegate__factory, + IexecPocoAccessorsDelegate__factory, + Ownable__factory, + TimelockController__factory, +} from '../../typechain'; +import { + encodeModuleProxyUpdate, + logTxData, + printBlockTime, + printFunctions, +} from '../upgrades/upgrade-helper'; + +if (process.env.HANDLE_SPONSORING_UPGRADE_INTERNALLY != 'true') { + (async () => { + await addModulesToProxy(); + })(); +} + +export async function addModulesToProxy() { + const chainId = (await ethers.provider.getNetwork()).chainId; + const deploymentOptions = CONFIG.chains[chainId].v5; + console.log('Link functions to proxy:'); + const erc1538ProxyAddress = deploymentOptions.ERC1538Proxy; + const iexecOrderManagementAddress = (await hre.deployments.get('IexecOrderManagementDelegate')) + .address; + const iexecPoco1DelegateAddress = (await hre.deployments.get('IexecPoco1Delegate')).address; + const iexecPoco2DelegateAddress = (await hre.deployments.get('IexecPoco2Delegate')).address; + const iexecPocoAccessorsDelegateAddress = ( + await hre.deployments.get('IexecPocoAccessorsDelegate') + ).address; + await printFunctions(erc1538ProxyAddress); + + console.log('Functions about to be added to proxy:'); + const timelockAddress = await Ownable__factory.connect( + erc1538ProxyAddress, + ethers.provider, + ).owner(); + const iexecOrderManagementProxyUpdate = encodeModuleProxyUpdate( + IexecOrderManagementDelegate__factory.createInterface(), + iexecOrderManagementAddress, + ); + const iexecPoco1ProxyUpdate = encodeModuleProxyUpdate( + IexecPoco1Delegate__factory.createInterface(), + iexecPoco1DelegateAddress, + ); + const iexecPoco2ProxyUpdate = encodeModuleProxyUpdate( + IexecPoco2Delegate__factory.createInterface(), + iexecPoco2DelegateAddress, + ); + const iexecPocoAccessorsProxyUpdate = encodeModuleProxyUpdate( + IexecPocoAccessorsDelegate__factory.createInterface(), + iexecPocoAccessorsDelegateAddress, + ); + // The salt must be the same for a given schedule & execute operation set + // Please increment salt in case of operation ID collision + const operationSalt = '0x0000000000000000000000000000000000000000000000000000000000000001'; + const updates = [ + iexecOrderManagementProxyUpdate, + iexecPoco1ProxyUpdate, + iexecPoco2ProxyUpdate, + iexecPocoAccessorsProxyUpdate, + ]; + const updateProxyArgs = [ + Array(updates.length).fill(erc1538ProxyAddress), + Array(updates.length).fill(0), + updates, + ethers.constants.HashZero, + operationSalt, + ] as [string[], BigNumber[], BytesLike[], BytesLike, BytesLike]; + console.log('Scheduling proxy update..'); + await printBlockTime(); + const timelockInstance = TimelockController__factory.connect(timelockAddress, ethers.provider); + const delay = await timelockInstance.getMinDelay(); + const timelockAdminAddress = await timelockInstance.getRoleMember( + await timelockInstance.PROPOSER_ROLE(), + 0, + ); + console.log(`Expected Timelock proposer: ${timelockAdminAddress}`); + /* + // Enable this in production + const [proposer] = await ethers.getSigners(); + console.log(`Actual Timelock proposer: ${proposer.address}`); + if (proposer.address != timelockAdminAddress) { + console.error('Bad proposer'); + process.exit(1); + } + */ + const timelockAdminSigner = await ethers.getImpersonatedSigner(timelockAdminAddress); + //const timelockAdminSigner = proposer; // Enable this in production + await scheduleUpgrade(); + await time.increase(delay); // Disable this in production + console.log('Time traveling..'); + await executeUpgrade(); + + return erc1538ProxyAddress; + + async function scheduleUpgrade() { + await timelockInstance + .connect(timelockAdminSigner) + .scheduleBatch(...updateProxyArgs, delay) + .then((tx) => { + logTxData(tx); + return tx.wait(); + }); + } + + async function executeUpgrade() { + await printBlockTime(); + await printFunctions(erc1538ProxyAddress); + console.log('Executing proxy update..'); + await timelockInstance + .connect(timelockAdminSigner) + .executeBatch(...updateProxyArgs) + .then((x) => { + logTxData(x); + return x.wait(); + }); + await printFunctions(erc1538ProxyAddress); + } +} diff --git a/scripts/sponsoring/README.md b/scripts/sponsoring/README.md new file mode 100644 index 000000000..8822da470 --- /dev/null +++ b/scripts/sponsoring/README.md @@ -0,0 +1,87 @@ +# Add sponsoring functions to proxy + +## Locally forked Bellecour network + +0. Start node +``` +LOCAL_FORK=true npx hardhat node --no-deploy +``` + +1. Deploy modules and add to proxy +``` +(export LOCAL_FORK=true; \ +npx hardhat run scripts/sponsoring/0_deploy-modules.ts --network external-hardhat && \ +npx hardhat run scripts/sponsoring/1_add-modules-to-proxy.ts --network external-hardhat) +``` + +2. Run test(s) +``` +LOCAL_FORK=true npx hardhat test test/byContract/IexecPoco/04_finalize.test.ts --network external-hardhat +``` + +OR + +0. Run test(s) directly (without launching node and deploying/upgrading Poco manually) +``` +LOCAL_FORK=true HANDLE_SPONSORING_UPGRADE_INTERNALLY=true npx hardhat test test/byContract/IexecPoco/04_finalize.test.ts +``` + + +## Bellecour + +0. Deploy modules +``` +npx hardhat run scripts/sponsoring/0_deploy-modules.ts --network bellecour +``` + +``` +Deploying modules.. +Deployer: 0x0B3a38b0A47aB0c5E8b208A703de366751Df5916 +IexecOrderManagementDelegate: 0xDF63F026779E31AcD1DB4626b39Ea5148f7B9AA4 // https://blockscout.bellecour.iex.ec/tx/0x072d8d4e392bc67367e7434a88ac063c876973edee5637568d9c8462f8eec552 +IexecPoco1Delegate: 0x1eE1cceF893DF6c4D3FC4eCaF315F09183f3048c // https://blockscout.bellecour.iex.ec/tx/0xc975f4c94fba7a19573d6094aff9178a21d07e3f2e13c8944a0bcb62f62cb6a8 +IexecPoco2Delegate: 0x7eCf076343FBe296Da2D39f20B2a01AaBB68CC27 // https://blockscout-bellecour.iex.ec/tx/0x4013dcc930acc2ac5fa53f4ad1062e4b6bd0deb6945972534b2db3586a6617d1 +IexecPocoAccessorsDelegate: 0xa1d371eF7bf36e89Db41276543ACf91Ec50Dd261 // https://blockscout-bellecour.iex.ec/tx/0xcc90f94b6ddb809720f94271b7b58bef9b24c4fe6e92a72f1271c5f83912081f +``` + +0b. Verify contracts + +- Blockscout v5 +``` +BLOCKSCOUT_VERSION=v5 npx hardhat run ./scripts/sponsoring/verify.ts --network bellecour +``` + +- Blockscout v6 + +Contracts have been verified using `etherscan-verify` plugin of `hardhat-deploy` (v0.12.4): +``` +npx hardhat --network bellecour etherscan-verify +``` +and embedded `hardhat-verify` plugin of `hardhat` (v2.22.12): +``` +npx hardhat run ./scripts/sponsoring/verify.ts --network bellecour +``` +by previously modifiying the `.json` file produced by: +``` +await deployments.deploy('Delegate', { + from: deployer.address, + libraries: { + IexecLibOrders_v5: deploymentOptions.IexecLibOrders_v5 + } +} +``` + +1. Schedule upgrade + +From [c54f713](https://github.com/iExecBlockchainComputing/PoCo/blob/c54f713af4a520ed3260bf119e689cf32cf85925/scripts/sponsoring/1_add-modules-to-proxy.ts) commit: +``` +npx hardhat run scripts/sponsoring/1_add-modules-to-proxy.ts --network bellecour +``` +- Tx: https://blockscout-bellecour.iex.ec/tx/0x59c94a0206187ff9cfe36bf380dfa012f25b51189e321ed70650827230ab8bd7 + + +1. Execute upgrade + +From [1c5d486](https://github.com/iExecBlockchainComputing/PoCo/blob/1c5d486a90e14b8f1e5df96d90926861f103d6ea/scripts/sponsoring/1_add-modules-to-proxy.ts) commit: +``` +npx hardhat run scripts/sponsoring/1_add-modules-to-proxy.ts --network bellecour +``` diff --git a/scripts/sponsoring/upgrade-status.md b/scripts/sponsoring/upgrade-status.md new file mode 100644 index 000000000..6a2ad21f3 --- /dev/null +++ b/scripts/sponsoring/upgrade-status.md @@ -0,0 +1,82 @@ +# PoCo v5.5 upgrade status + +## Legacy modules linked to proxy before this v5.5 upgrade + +| Contract | Address | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | +| [IexecOrderManagementDelegate](https://github.com/iExecBlockchainComputing/PoCo/blob/v5.4.3/contracts/modules/delegates/IexecOrderManagementDelegate.sol) | [0xc7d6c9cAf4cdA7B1EC24bd83873A822eE7Da2966](https://blockscout-bellecour.iex.ec/address/0xc7d6c9cAf4cdA7B1EC24bd83873A822eE7Da2966) | +| [IexecPocoDelegate](https://github.com/iExecBlockchainComputing/PoCo/blob/v5.2.1/contracts/modules/delegates/IexecPocoDelegate.sol) | [0xE20a3d2B778B9e924c68dD74beB6723620eBaD0c](https://blockscout-bellecour.iex.ec/address/0xE20a3d2B778B9e924c68dD74beB6723620eBaD0c) | +| [IexecPocoAccessorsDelegate](https://github.com/iExecBlockchainComputing/PoCo/blob/v5.4.3/contracts/modules/delegates/IexecAccessorsABILegacyDelegate.sol) | [0xAa567D6C87C465A5a15b8efAe4778acD33e6Cd66](https://blockscout-bellecour.iex.ec/address/0xAa567D6C87C465A5a15b8efAe4778acD33e6Cd66) | + + +## New modules deployed for v5.5 upgrade + +| Contract | Address | Deployment | +| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| IexecOrderManagementDelegate | [0xDF63F026779E31AcD1DB4626b39Ea5148f7B9AA4](https://blockscout-bellecour.iex.ec/address/0xDF63F026779E31AcD1DB4626b39Ea5148f7B9AA4/contracts#address-tabs) | [0x072d8d4e392bc67367e7434a88ac063c876973edee5637568d9c8462f8eec552](https://blockscout-bellecour.iex.ec/tx/0x072d8d4e392bc67367e7434a88ac063c876973edee5637568d9c8462f8eec552) | +| IexecPoco1Delegate | [0x1eE1cceF893DF6c4D3FC4eCaF315F09183f3048c](https://blockscout-bellecour.iex.ec/address/0x1eE1cceF893DF6c4D3FC4eCaF315F09183f3048c/contracts#address-tabs) | [0xc975f4c94fba7a19573d6094aff9178a21d07e3f2e13c8944a0bcb62f62cb6a8](https://blockscout-bellecour.iex.ec/tx/0xc975f4c94fba7a19573d6094aff9178a21d07e3f2e13c8944a0bcb62f62cb6a8) | +| IexecPoco2Delegate | [0x7eCf076343FBe296Da2D39f20B2a01AaBB68CC27](https://blockscout-bellecour.iex.ec/address/0x7eCf076343FBe296Da2D39f20B2a01AaBB68CC27/contracts#address-tabs) | [0x4013dcc930acc2ac5fa53f4ad1062e4b6bd0deb6945972534b2db3586a6617d1](https://blockscout-bellecour.iex.ec/tx/0x4013dcc930acc2ac5fa53f4ad1062e4b6bd0deb6945972534b2db3586a6617d1) | +| IexecPocoAccessorsDelegate | [0xa1d371eF7bf36e89Db41276543ACf91Ec50Dd261](https://blockscout-bellecour.iex.ec/address/0xa1d371eF7bf36e89Db41276543ACf91Ec50Dd261/contracts#address-tabs) | [0xcc90f94b6ddb809720f94271b7b58bef9b24c4fe6e92a72f1271c5f83912081f](https://blockscout-bellecour.iex.ec/tx/0xcc90f94b6ddb809720f94271b7b58bef9b24c4fe6e92a72f1271c5f83912081f) | + + +## Linking of these new modules to proxy is scheduled on TimelockControler + +``` +Block#30158507: Mon Sep 23 2024 17:31:40 GMT+0200 (Central European Summer Time) (timestamp:1727105500) +Timelock proposer: 0x0B3a38b0A47aB0c5E8b208A703de366751Df5916 +``` +- Tx: https://blockscout-bellecour.iex.ec/tx/0x59c94a0206187ff9cfe36bf380dfa012f25b51189e321ed70650827230ab8bd7 +- The ERC1538Proxy currently supports 96 functions. + +Now 7-days are required before executing linking of new modules. +- Functions from `IexecOrderManagementDelegate`, `IexecPoco1Delegate`, `IexecPoco2Delegate` & `IexecPocoAccessorsDelegate` modules that will be added to proxy (or modified on proxy): +``` +- manageAppOrder(((address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),uint8,bytes)); +- manageDatasetOrder(((address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),uint8,bytes)); +- manageRequestOrder(((address,uint256,address,uint256,address,uint256,address,uint256,bytes32,uint256,uint256,address,address,string,bytes32,bytes),uint8,bytes)); +- manageWorkerpoolOrder(((address,uint256,uint256,bytes32,uint256,uint256,address,address,address,bytes32,bytes),uint8,bytes)); +- owner(); +- renounceOwnership(); +- transferOwnership(address); +- matchOrders((address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),(address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),(address,uint256,uint256,bytes32,uint256,uint256,address,address,address,bytes32,bytes),(address,uint256,address,uint256,address,uint256,address,uint256,bytes32,uint256,uint256,address,address,string,bytes32,bytes)); +- owner(); +- renounceOwnership(); +- sponsorMatchOrders((address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),(address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),(address,uint256,uint256,bytes32,uint256,uint256,address,address,address,bytes32,bytes),(address,uint256,address,uint256,address,uint256,address,uint256,bytes32,uint256,uint256,address,address,string,bytes32,bytes)); +- transferOwnership(address); +- verifyPresignature(address,bytes32); +- verifyPresignatureOrSignature(address,bytes32,bytes); +- verifySignature(address,bytes32,bytes); +- claim(bytes32); +- claimArray(bytes32[]); +- contribute(bytes32,bytes32,bytes32,address,bytes,bytes); +- contributeAndFinalize(bytes32,bytes32,bytes,bytes,address,bytes,bytes); +- finalize(bytes32,bytes,bytes); +- initialize(bytes32,uint256); +- initializeAndClaimArray(bytes32[],uint256[]); +- initializeArray(bytes32[],uint256[]); +- owner(); +- renounceOwnership(); +- reopen(bytes32); +- reveal(bytes32,bytes32); +- transferOwnership(address); +- computeDealVolume((address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),(address,uint256,uint256,bytes32,address,address,address,bytes32,bytes),(address,uint256,uint256,bytes32,uint256,uint256,address,address,address,bytes32,bytes),(address,uint256,address,uint256,address,uint256,address,uint256,bytes32,uint256,uint256,address,address,string,bytes32,bytes)); +- owner(); +- renounceOwnership(); +- transferOwnership(address); +- viewDeal(bytes32); +- viewTask(bytes32); +``` + +## Linking of these new modules to proxy is executed on TimelockControler + +``` +Block#30158507: Mon Sep 23 2024 17:31:40 GMT+0200 (Central European Summer Time) (timestamp:1727105500) +Timelock proposer: 0x0B3a38b0A47aB0c5E8b208A703de366751Df5916 +``` +- Tx: 0x71b904f526a9be218d35748f57d74ef6da20d12c88f94cfa1ec5ae2de187cb98 + +``` +[...] +ERC1538Proxy supports 98 functions: +[...] +``` diff --git a/scripts/sponsoring/verify.ts b/scripts/sponsoring/verify.ts new file mode 100644 index 000000000..fc849d4d3 --- /dev/null +++ b/scripts/sponsoring/verify.ts @@ -0,0 +1,19 @@ +import fs from 'fs'; +import hre, { deployments } from 'hardhat'; +import path from 'path'; + +(async () => { + const jsonExtension = '.json'; + const contractNames = fs + .readdirSync(path.resolve(__dirname, `../../deployments/${hre.network.name}`)) + .filter((file) => file.endsWith(jsonExtension)) + .map((filePath) => filePath.replace(jsonExtension, '')); + console.log(`Contracts to verify: ${contractNames}`); + for (const contractName of contractNames) { + console.log(`Verifying ${contractName}..`); + const address = (await deployments.get(contractName)).address; + await hre.run('verify:verify', { + address, + }); + } +})(); diff --git a/scripts/test-storage.js b/scripts/test-storage.js new file mode 100644 index 000000000..f9df5d706 --- /dev/null +++ b/scripts/test-storage.js @@ -0,0 +1,58 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +const fs = require('fs'); +const path = require('path'); +const semver = require('semver'); +const { findAll } = require('solidity-ast/utils'); +const { astDereferencer } = require('solidity-ast/utils'); +const { solcInputOutputDecoder } = require('@openzeppelin/upgrades-core/dist/src-decoder'); +const { extractStorageLayout } = require('@openzeppelin/upgrades-core/dist/storage/extract'); +const { getStorageUpgradeReport } = require('@openzeppelin/upgrades-core/dist/storage'); + +const layouts = {}; + +const build = 'artifacts/build-info'; +for (const artifact of fs.readdirSync(build)) { + const { solcVersion, input, output } = JSON.parse(fs.readFileSync(path.join(build, artifact))); + const decoder = solcInputOutputDecoder(input, output); + const deref = astDereferencer(output); + + for (const src in output.contracts) { + // Skip if no AST + if (!output.sources[src].ast) continue; + for (const contractDef of findAll('ContractDefinition', output.sources[src].ast)) { + // Skip libraries and interfaces that don't have storage anyway + if (['library', 'interface'].includes(contractDef.contractKind)) continue; + // Store storage layout for this version of this contract + layouts[contractDef.name] ??= {} + layouts[contractDef.name][solcVersion] = extractStorageLayout( + contractDef, + decoder, + deref, + output.contracts[src][contractDef.name].storageLayout, + ); + } + } +} + +for (const [ name, versions ] of Object.entries(layouts)) { + const keys = Object.keys(versions).sort(semver.compare); + switch (keys.length) { + case 0: // should never happen + case 1: // contract only available in one version + continue; + default: + console.log(`[${name}]`); + keys.slice(0,-1).forEach((v, i) => { + const report = getStorageUpgradeReport(versions[v], versions[keys[i+1]], {}); + if (report.ok) { + console.log(`- ${v} โ†’ ${keys[i+1]}: storage layout is compatible`); + } else { + console.log(report.explain()); + process.exitCode = 1; + } + }); + break; + } +} diff --git a/scripts/timelock.js b/scripts/timelock.js index c7dfe1512..2278de106 100644 --- a/scripts/timelock.js +++ b/scripts/timelock.js @@ -1,118 +1,109 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 const { ethers } = require('ethers'); -const CONFIG = require('../config/config.json') +const CONFIG = require('../config/config.json'); artifacts = { - require: (name) => { - try { return require(`${process.cwd()}/build/contracts/${name}.json`); } catch {} - try { return require(`${process.cwd()}/node_modules/${name}.json`); } catch {} - } + require: (name) => { + try { + return require(`${process.cwd()}/build/contracts/${name}.json`); + } catch {} + try { + return require(`${process.cwd()}/node_modules/${name}.json`); + } catch {} + }, }; -const FACTORY = require('@iexec/solidity/deployment/factory.json') -const TimelockController = artifacts.require('TimelockController') +const FACTORY = require('@iexec/solidity/deployment/factory.json'); +const TimelockController = artifacts.require('TimelockController'); -const LIBRARIES = [ -]; +const LIBRARIES = []; /***************************************************************************** * Tools * *****************************************************************************/ -class FactoryDeployer -{ - constructor(options) - { - this._factory = new ethers.Contract(FACTORY.address, FACTORY.abi, options.wallet); - this._salt = options.salt || ethers.utils.randomBytes(32); - } +class FactoryDeployer { + constructor(options) { + this._factory = new ethers.Contract(FACTORY.address, FACTORY.abi, options.wallet); + this._salt = options.salt || ethers.utils.randomBytes(32); + } - async deploy(artefact, options = {}) - { - console.log(`[factoryDeployer] ${artefact.contractName}`); - const libraryAddresses = await Promise.all( - LIBRARIES - .filter(({ contractName }) => artefact.bytecode.search(contractName) != -1) - .map(({ contractName, networks }) => ({ - pattern: new RegExp(`__${contractName}${'_'.repeat(38-contractName.length)}`, 'g'), - address: networks[options.chainid].address, - })) - ); + async deploy(artefact, options = {}) { + console.log(`[factoryDeployer] ${artefact.contractName}`); + const libraryAddresses = await Promise.all( + LIBRARIES.filter( + ({ contractName }) => artefact.bytecode.search(contractName) != -1, + ).map(({ contractName, networks }) => ({ + pattern: new RegExp( + `__${contractName}${'_'.repeat(38 - contractName.length)}`, + 'g', + ), + address: networks[options.chainid].address, + })), + ); - const constructorABI = artefact.abi.find(e => e.type == 'constructor'); - const coreCode = libraryAddresses.reduce((code, { pattern, address }) => code.replace(pattern, address.slice(2).toLowerCase()), artefact.bytecode); - const argsCode = constructorABI ? ethers.utils.defaultAbiCoder.encode(constructorABI.inputs.map(e => e.type), options.args || []).slice(2) : ''; - const code = coreCode + argsCode; - const salt = options.salt || this._salt || ethers.constants.HashZero; - const predicted = options.call - ? await this._factory.predictAddressWithCall(code, salt, options.call) - : await this._factory.predictAddress(code, salt); + const constructorABI = artefact.abi.find((e) => e.type == 'constructor'); + const coreCode = libraryAddresses.reduce( + (code, { pattern, address }) => code.replace(pattern, address.slice(2).toLowerCase()), + artefact.bytecode, + ); + const argsCode = constructorABI + ? ethers.utils.defaultAbiCoder + .encode( + constructorABI.inputs.map((e) => e.type), + options.args || [], + ) + .slice(2) + : ''; + const code = coreCode + argsCode; + const salt = options.salt || this._salt || ethers.constants.HashZero; + const predicted = options.call + ? await this._factory.predictAddressWithCall(code, salt, options.call) + : await this._factory.predictAddress(code, salt); - if (await this._factory.provider.getCode(predicted) == '0x') - { - console.log(`[factory] Preparing to deploy ${artefact.contractName} ...`); - options.call - ? await this._factory.createContractAndCall(code, salt, options.call) - : await this._factory.createContract(code, salt); - console.log(`[factory] ${artefact.contractName} successfully deployed at ${predicted}`); - } - else - { - console.log(`[factory] ${artefact.contractName} already deployed at ${predicted}`); - } - artefact.networks[await this._factory.signer.getChainId()] = { address: predicted }; - } + if ((await this._factory.provider.getCode(predicted)) == '0x') { + console.log(`[factory] Preparing to deploy ${artefact.contractName} ...`); + options.call + ? await this._factory.createContractAndCall(code, salt, options.call) + : await this._factory.createContract(code, salt); + console.log(`[factory] ${artefact.contractName} successfully deployed at ${predicted}`); + } else { + console.log(`[factory] ${artefact.contractName} already deployed at ${predicted}`); + } + artefact.networks[await this._factory.signer.getChainId()] = { address: predicted }; + } } +(async () => { + const provider = new ethers.getDefaultProvider(process.env.NODE); + const wallet = new ethers.Wallet(process.env.MNEMONIC, provider); + const chainid = await wallet.getChainId(); + const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; -(async() => { - - const provider = new ethers.getDefaultProvider(process.env.NODE); - const wallet = new ethers.Wallet(process.env.MNEMONIC, provider); - const chainid = await wallet.getChainId(); - const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; - - // Deployer - const deployer = new FactoryDeployer({ - wallet, - chainid, - salt: deploymentOptions.v5.salt - }); - await deployer.deploy( - TimelockController, - { - args: [ - 86400 * 7, // 7 days - [ - "0x9ED07B5DB7dAD3C9a0baA3E320E68Ce779063249", - "0x36e19bc6374c9cea5eb86622cf04c6b144b5b59c", - "0x56fa2d29a54b5349cd5d88ffa584bffb2986a656", - "0x9a78ecd77595ea305c6e5a0daed3669b17801d09", - "0xb5ad0c32fc5fcb5e4cba4c81f523e6d47a82ecd7", - "0xb906dc99340d0f3162dbc5b2539b0ad075649bcf", - ], - [ - "0x0B3a38b0A47aB0c5E8b208A703de366751Df5916", // v5 deployer - ], - [ - "0x0B3a38b0A47aB0c5E8b208A703de366751Df5916", // v5 deployer - ], - ] - } - ); - + // Deployer + const deployer = new FactoryDeployer({ + wallet, + chainid, + salt: deploymentOptions.v5.salt, + }); + await deployer.deploy(TimelockController, { + args: [ + 86400 * 7, // 7 days + [ + '0x9ED07B5DB7dAD3C9a0baA3E320E68Ce779063249', + '0x36e19bc6374c9cea5eb86622cf04c6b144b5b59c', + '0x56fa2d29a54b5349cd5d88ffa584bffb2986a656', + '0x9a78ecd77595ea305c6e5a0daed3669b17801d09', + '0xb5ad0c32fc5fcb5e4cba4c81f523e6d47a82ecd7', + '0xb906dc99340d0f3162dbc5b2539b0ad075649bcf', + ], + [ + '0x0B3a38b0A47aB0c5E8b208A703de366751Df5916', // v5 deployer + ], + [ + '0x0B3a38b0A47aB0c5E8b208A703de366751Df5916', // v5 deployer + ], + ], + }); })().catch(console.error); diff --git a/scripts/truffle-fixture-deployer.js b/scripts/truffle-fixture-deployer.js new file mode 100644 index 000000000..d9fbbc59d --- /dev/null +++ b/scripts/truffle-fixture-deployer.js @@ -0,0 +1,26 @@ +// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); +const { resetNetworkToInitialState } = require('./common-test-snapshot'); +const initial_migration = require('../migrations/1_initial_migration.js'); +const deploy_token = require('../migrations/3_deploy_token.js'); +const deploy_core = require('../migrations/4_deploy_core.js'); +const deploy_ens = require('../migrations/5_deploy_ens.js'); +const functions = require('../migrations/999_functions.js'); + +async function resetNetworkAndDeployAllContracts() { + await resetNetworkToInitialState(); + console.log('Migrating contracts..'); + await initial_migration(); + const accounts = await web3.eth.getAccounts(); + await deploy_token(accounts); + await deploy_core(accounts); + await deploy_ens(accounts); + await functions(accounts); +} + +module.exports = async () => { + console.log('Running truffle-fixture'); + await loadFixture(resetNetworkAndDeployAllContracts); +}; diff --git a/scripts/upgrades/5_0_0-to-5_1_0.js b/scripts/upgrades/5_0_0-to-5_1_0.js index 5cc2f6a63..619015e7e 100644 --- a/scripts/upgrades/5_0_0-to-5_1_0.js +++ b/scripts/upgrades/5_0_0-to-5_1_0.js @@ -1,155 +1,152 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 -const assert = require('assert') -const CONFIG = require('../../config/config.json') -var GenericFactory = artifacts.require('@iexec/solidity/GenericFactory') -var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy') -var ERC1538Update = artifacts.require('@iexec/solidity/ERC1538UpdateDelegate') +const assert = require('assert'); +const CONFIG = require('../../config/config.json'); +var GenericFactory = artifacts.require('@iexec/solidity/GenericFactory'); +var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy'); +var ERC1538Update = artifacts.require('@iexec/solidity/ERC1538UpdateDelegate'); /***************************************************************************** * Configuration * *****************************************************************************/ -const LIBRARIES = [ - artifacts.require('IexecLibOrders_v5'), -] +const LIBRARIES = [artifacts.require('IexecLibOrders_v5')]; const MODULES = [ - { module: artifacts.require('IexecAccessorsDelegate'), methods: [ 'viewTask', 'resultFor' ] }, // result separation update - { module: artifacts.require('IexecPocoDelegate'), methods: [ 'finalize', 'contributeAndFinalize' ] }, // result separation update -] + { module: artifacts.require('IexecAccessorsDelegate'), methods: ['viewTask', 'resultFor'] }, // result separation update + { + module: artifacts.require('IexecPocoDelegate'), + methods: ['finalize', 'contributeAndFinalize'], + }, // result separation update +]; const FUNCTIONS = [ - { func: 'finalize(bytes32,bytes);', address: '0x0000000000000000000000000000000000000000' }, // result separation update - { func: 'contributeAndFinalize(bytes32,bytes32,bytes,address,bytes,bytes);', address: '0x0000000000000000000000000000000000000000' }, // result separation update -] + { func: 'finalize(bytes32,bytes);', address: '0x0000000000000000000000000000000000000000' }, // result separation update + { + func: 'contributeAndFinalize(bytes32,bytes32,bytes,address,bytes,bytes);', + address: '0x0000000000000000000000000000000000000000', + }, // result separation update +]; /***************************************************************************** * Tools * *****************************************************************************/ -function getSerializedObject(entry) -{ - return (entry.type == 'tuple') - ? `(${entry.components.map(getSerializedObject).join(',')})` - : entry.type; +function getSerializedObject(entry) { + return entry.type == 'tuple' + ? `(${entry.components.map(getSerializedObject).join(',')})` + : entry.type; } -function getFunctionSignatures(abi) -{ - return abi - .filter(entry => entry.type == 'function') - .map(entry => `${entry.name}(${entry.inputs.map(getSerializedObject).join(',')});`) - .join('') - + (abi.some(entry => entry.type == 'receive' ) ? 'receive;' : '') - + (abi.some(entry => entry.type == 'fallback') ? 'fallback;' : ''); +function getFunctionSignatures(abi) { + return ( + abi + .filter((entry) => entry.type == 'function') + .map((entry) => `${entry.name}(${entry.inputs.map(getSerializedObject).join(',')});`) + .join('') + + (abi.some((entry) => entry.type == 'receive') ? 'receive;' : '') + + (abi.some((entry) => entry.type == 'fallback') ? 'fallback;' : '') + ); } -async function factoryDeployer(contract, options = {}) -{ - console.log(`[factoryDeployer] ${contract.contractName}`); - const factory = await GenericFactory.deployed(); - const libraryAddresses = await Promise.all( - LIBRARIES - .filter(({ contractName }) => contract.bytecode.search(contractName) != -1) - .map(async ({ contractName, deployed }) => ({ - pattern: new RegExp(`__${contractName}${'_'.repeat(38-contractName.length)}`, 'g'), - ...await deployed() - })) - ); +async function factoryDeployer(contract, options = {}) { + console.log(`[factoryDeployer] ${contract.contractName}`); + const factory = await GenericFactory.deployed(); + const libraryAddresses = await Promise.all( + LIBRARIES.filter(({ contractName }) => contract.bytecode.search(contractName) != -1).map( + async ({ contractName, deployed }) => ({ + pattern: new RegExp( + `__${contractName}${'_'.repeat(38 - contractName.length)}`, + 'g', + ), + ...(await deployed()), + }), + ), + ); - const constructorABI = contract._json.abi.find(e => e.type == 'constructor'); - const coreCode = libraryAddresses.reduce((code, { pattern, address }) => code.replace(pattern, address.slice(2).toLowerCase()), contract.bytecode); - const argsCode = constructorABI ? web3.eth.abi.encodeParameters(constructorABI.inputs.map(e => e.type), options.args || []).slice(2) : ''; - const code = coreCode + argsCode; - const salt = options.salt || '0x0000000000000000000000000000000000000000000000000000000000000000'; + const constructorABI = contract._json.abi.find((e) => e.type == 'constructor'); + const coreCode = libraryAddresses.reduce( + (code, { pattern, address }) => code.replace(pattern, address.slice(2).toLowerCase()), + contract.bytecode, + ); + const argsCode = constructorABI + ? web3.eth.abi + .encodeParameters( + constructorABI.inputs.map((e) => e.type), + options.args || [], + ) + .slice(2) + : ''; + const code = coreCode + argsCode; + const salt = + options.salt || '0x0000000000000000000000000000000000000000000000000000000000000000'; - contract.address = options.call - ? await factory.predictAddressWithCall(code, salt, options.call) - : await factory.predictAddress(code, salt); + contract.address = options.call + ? await factory.predictAddressWithCall(code, salt, options.call) + : await factory.predictAddress(code, salt); - if (await web3.eth.getCode(contract.address) == '0x') - { - console.log(`[factory] Preparing to deploy ${contract.contractName} ...`); - options.call - ? await factory.createContractAndCall(code, salt, options.call) - : await factory.createContract(code, salt); - console.log(`[factory] ${contract.contractName} successfully deployed at ${contract.address}`); - } - else - { - console.log(`[factory] ${contract.contractName} already deployed`); - } + if ((await web3.eth.getCode(contract.address)) == '0x') { + console.log(`[factory] Preparing to deploy ${contract.contractName} ...`); + options.call + ? await factory.createContractAndCall(code, salt, options.call) + : await factory.createContract(code, salt); + console.log( + `[factory] ${contract.contractName} successfully deployed at ${contract.address}`, + ); + } else { + console.log(`[factory] ${contract.contractName} already deployed`); + } } /***************************************************************************** * Main * *****************************************************************************/ module.exports = async (callback) => { - try - { - console.log('# web3 version:', web3.version); - const chainid = await web3.eth.net.getId(); - const chaintype = await web3.eth.net.getNetworkType(); - console.log('Chainid is:', chainid); - console.log('Chaintype is:', chaintype); + try { + console.log('# web3 version:', web3.version); + const chainid = await web3.eth.net.getId(); + const chaintype = await web3.eth.net.getNetworkType(); + console.log('Chainid is:', chainid); + console.log('Chaintype is:', chaintype); - // Load config - const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; - const factoryOptions = { salt: deploymentOptions.v5.salt || web3.utils.randomHex(32) }; + // Load config + const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; + const factoryOptions = { salt: deploymentOptions.v5.salt || web3.utils.randomHex(32) }; - // Load core - const proxy = await ERC1538Update.at((await ERC1538Proxy.deployed()).address); - console.log('Deploying to proxy:', proxy.address); + // Load core + const proxy = await ERC1538Update.at((await ERC1538Proxy.deployed()).address); + console.log('Deploying to proxy:', proxy.address); - // Module updates - for ([ i, { module, methods } ] of Object.entries(MODULES.filter(Boolean))) - { - console.log(`[${i}] ERC1538 link: ${module.contractName}`); - // deploy module - if (deploymentOptions.v5.usefactory) - { - await factoryDeployer(module, factoryOptions); - } - else - { - await deployer.deploy(module); - } - // update proxy - await proxy.updateContract( - (await module.deployed()).address, - getFunctionSignatures(module.abi.filter(entry => !methods || methods.indexOf(entry.name) != -1)), - `Linking module ${module.contractName}` - ); - } + // Module updates + for ([i, { module, methods }] of Object.entries(MODULES.filter(Boolean))) { + console.log(`[${i}] ERC1538 link: ${module.contractName}`); + // deploy module + if (deploymentOptions.v5.usefactory) { + await factoryDeployer(module, factoryOptions); + } else { + await deployer.deploy(module); + } + // update proxy + await proxy.updateContract( + (await module.deployed()).address, + getFunctionSignatures( + module.abi.filter((entry) => !methods || methods.indexOf(entry.name) != -1), + ), + `Linking module ${module.contractName}`, + ); + } - // Function updates - for ([ i, { func, address } ] of Object.entries(FUNCTIONS.filter(Boolean))) - { - // format, add ';' if needed. - if (!func.endsWith(';')) { func += ';'; } - // update proxy - console.log(`[${i}] Linking function: ${func} โ†’ ${address}`); - await proxy.updateContract(address, func, `Updating function ${func}`); - } - } - catch (e) - { - callback(e) - } - finally - { - callback() - } -} + // Function updates + for ([i, { func, address }] of Object.entries(FUNCTIONS.filter(Boolean))) { + // format, add ';' if needed. + if (!func.endsWith(';')) { + func += ';'; + } + // update proxy + console.log(`[${i}] Linking function: ${func} โ†’ ${address}`); + await proxy.updateContract(address, func, `Updating function ${func}`); + } + } catch (e) { + callback(e); + } finally { + callback(); + } +}; diff --git a/scripts/upgrades/5_1_0-to-5_2_0.ethers.js b/scripts/upgrades/5_1_0-to-5_2_0.ethers.js index 55780718f..82529639d 100644 --- a/scripts/upgrades/5_1_0-to-5_2_0.ethers.js +++ b/scripts/upgrades/5_1_0-to-5_2_0.ethers.js @@ -1,166 +1,158 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 const { ethers } = require('ethers'); -const CONFIG = require('../../config/config.json') +const CONFIG = require('../../config/config.json'); artifacts = { - require: (name) => { - try { return require(`${process.cwd()}/build/contracts/${name}.json`); } catch {} - try { return require(`${process.cwd()}/node_modules/${name}.json`); } catch {} - } + require: (name) => { + try { + return require(`${process.cwd()}/build/contracts/${name}.json`); + } catch {} + try { + return require(`${process.cwd()}/node_modules/${name}.json`); + } catch {} + }, }; const GenericFactory = artifacts.require('GenericFactory'); -const ERC1538Proxy = artifacts.require('ERC1538Proxy'); -const ERC1538Update = artifacts.require('ERC1538UpdateDelegate'); +const ERC1538Proxy = artifacts.require('ERC1538Proxy'); +const ERC1538Update = artifacts.require('ERC1538UpdateDelegate'); -const LIBRARIES = [ - artifacts.require('IexecLibOrders_v5'), -]; +const LIBRARIES = [artifacts.require('IexecLibOrders_v5')]; const MODULES = [ - // { module: artifacts.require('IexecEscrowNativeDelegate'), methods: null }, - { module: artifacts.require('IexecEscrowTokenDelegate'), methods: null }, - { module: artifacts.require('IexecEscrowTokenSwapDelegate'), methods: null }, + // { module: artifacts.require('IexecEscrowNativeDelegate'), methods: null }, + { module: artifacts.require('IexecEscrowTokenDelegate'), methods: null }, + { module: artifacts.require('IexecEscrowTokenSwapDelegate'), methods: null }, ]; const FUNCTIONS = [ - // + // ]; /***************************************************************************** * Tools * *****************************************************************************/ -function getSerializedObject(entry) -{ - return (entry.type == 'tuple') - ? `(${entry.components.map(getSerializedObject).join(',')})` - : entry.type; +function getSerializedObject(entry) { + return entry.type == 'tuple' + ? `(${entry.components.map(getSerializedObject).join(',')})` + : entry.type; } -function getFunctionSignatures(abi) -{ - return abi - .filter(entry => entry.type == 'function') - .map(entry => `${entry.name}(${entry.inputs.map(getSerializedObject).join(',')});`) - .join('') - + (abi.some(entry => entry.type == 'receive' ) ? 'receive;' : '') - + (abi.some(entry => entry.type == 'fallback') ? 'fallback;' : ''); +function getFunctionSignatures(abi) { + return ( + abi + .filter((entry) => entry.type == 'function') + .map((entry) => `${entry.name}(${entry.inputs.map(getSerializedObject).join(',')});`) + .join('') + + (abi.some((entry) => entry.type == 'receive') ? 'receive;' : '') + + (abi.some((entry) => entry.type == 'fallback') ? 'fallback;' : '') + ); } - -class FactoryDeployer -{ - constructor(artefact, options) - { - this._address = artefact.networks[options.chainid].address; - this._factory = new ethers.Contract(this._address, artefact.abi, options.wallet); - this._salt = options.salt || ethers.utils.randomBytes(32); - } - - async deploy(artefact, options = {}) - { - console.log(`[factoryDeployer] ${artefact.contractName}`); - const libraryAddresses = await Promise.all( - LIBRARIES - .filter(({ contractName }) => artefact.bytecode.search(contractName) != -1) - .map(({ contractName, networks }) => ({ - pattern: new RegExp(`__${contractName}${'_'.repeat(38-contractName.length)}`, 'g'), - address: networks[options.chainid].address, - })) - ); - - const constructorABI = artefact.abi.find(e => e.type == 'constructor'); - const coreCode = libraryAddresses.reduce((code, { pattern, address }) => code.replace(pattern, address.slice(2).toLowerCase()), artefact.bytecode); - const argsCode = constructorABI ? ethers.utils.defaultAbiCoder.encode(constructorABI.inputs.map(e => e.type), options.args || []).slice(2) : ''; - const code = coreCode + argsCode; - const salt = options.salt || this._salt || ethers.constants.HashZero; - const predicted = options.call - ? await this._factory.predictAddressWithCall(code, salt, options.call) - : await this._factory.predictAddress(code, salt); - - if (await this._factory.provider.getCode(predicted) == '0x') - { - console.log(`[factory] Preparing to deploy ${artefact.contractName} ...`); - options.call - ? await this._factory.createContractAndCall(code, salt, options.call) - : await this._factory.createContract(code, salt); - console.log(`[factory] ${artefact.contractName} successfully deployed at ${predicted}`); - } - else - { - console.log(`[factory] ${artefact.contractName} already deployed at ${predicted}`); - } - artefact.networks[await this._factory.signer.getChainId()] = { address: predicted }; - } +class FactoryDeployer { + constructor(artefact, options) { + this._address = artefact.networks[options.chainid].address; + this._factory = new ethers.Contract(this._address, artefact.abi, options.wallet); + this._salt = options.salt || ethers.utils.randomBytes(32); + } + + async deploy(artefact, options = {}) { + console.log(`[factoryDeployer] ${artefact.contractName}`); + const libraryAddresses = await Promise.all( + LIBRARIES.filter( + ({ contractName }) => artefact.bytecode.search(contractName) != -1, + ).map(({ contractName, networks }) => ({ + pattern: new RegExp( + `__${contractName}${'_'.repeat(38 - contractName.length)}`, + 'g', + ), + address: networks[options.chainid].address, + })), + ); + + const constructorABI = artefact.abi.find((e) => e.type == 'constructor'); + const coreCode = libraryAddresses.reduce( + (code, { pattern, address }) => code.replace(pattern, address.slice(2).toLowerCase()), + artefact.bytecode, + ); + const argsCode = constructorABI + ? ethers.utils.defaultAbiCoder + .encode( + constructorABI.inputs.map((e) => e.type), + options.args || [], + ) + .slice(2) + : ''; + const code = coreCode + argsCode; + const salt = options.salt || this._salt || ethers.constants.HashZero; + const predicted = options.call + ? await this._factory.predictAddressWithCall(code, salt, options.call) + : await this._factory.predictAddress(code, salt); + + if ((await this._factory.provider.getCode(predicted)) == '0x') { + console.log(`[factory] Preparing to deploy ${artefact.contractName} ...`); + options.call + ? await this._factory.createContractAndCall(code, salt, options.call) + : await this._factory.createContract(code, salt); + console.log(`[factory] ${artefact.contractName} successfully deployed at ${predicted}`); + } else { + console.log(`[factory] ${artefact.contractName} already deployed at ${predicted}`); + } + artefact.networks[await this._factory.signer.getChainId()] = { address: predicted }; + } } - -(async() => { - - const provider = new ethers.providers.JsonRpcProvider(process.env.NODE); - const wallet = new ethers.Wallet(process.env.MNEMONIC, provider); - const chainid = await wallet.getChainId(); - const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; - - // Deployer - const deployer = new FactoryDeployer( - GenericFactory, - { - wallet, - chainid, - salt: deploymentOptions.v5.salt - } - ); - - // Load core - const proxy = new ethers.Contract(ERC1538Proxy.networks[chainid].address, ERC1538Update.abi, wallet); - console.log(`Connecting to proxy at ${proxy.address}`); - - // Module updates - for ([ i, { module, methods } ] of Object.entries(MODULES.filter(Boolean))) - { - console.log(`[${i}] ERC1538 link: ${module.contractName}`); - // deploy module - if (deploymentOptions.v5.usefactory) - { - await deployer.deploy(module); - } - else - { - throw 'not supported'; - } - - // update proxy - await proxy.updateContract( - module.networks[chainid].address, - getFunctionSignatures(module.abi.filter(entry => !methods || methods.indexOf(entry.name) != -1)), - `Linking module ${module.contractName}` - ); - } - - // Function updates - for ([ i, { func, address } ] of Object.entries(FUNCTIONS.filter(Boolean))) - { - // format, add ';' if needed. - if (!func.endsWith(';')) { func += ';'; } - // update proxy - console.log(`[${i}] Linking function: ${func} โ†’ ${address}`); - await proxy.updateContract(address, func, `Updating function ${func}`); - } - +(async () => { + const provider = new ethers.providers.JsonRpcProvider(process.env.NODE); + const wallet = new ethers.Wallet(process.env.MNEMONIC, provider); + const chainid = await wallet.getChainId(); + const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; + + // Deployer + const deployer = new FactoryDeployer(GenericFactory, { + wallet, + chainid, + salt: deploymentOptions.v5.salt, + }); + + // Load core + const proxy = new ethers.Contract( + ERC1538Proxy.networks[chainid].address, + ERC1538Update.abi, + wallet, + ); + console.log(`Connecting to proxy at ${proxy.address}`); + + // Module updates + for ([i, { module, methods }] of Object.entries(MODULES.filter(Boolean))) { + console.log(`[${i}] ERC1538 link: ${module.contractName}`); + // deploy module + if (deploymentOptions.v5.usefactory) { + await deployer.deploy(module); + } else { + throw 'not supported'; + } + + // update proxy + await proxy.updateContract( + module.networks[chainid].address, + getFunctionSignatures( + module.abi.filter((entry) => !methods || methods.indexOf(entry.name) != -1), + ), + `Linking module ${module.contractName}`, + ); + } + + // Function updates + for ([i, { func, address }] of Object.entries(FUNCTIONS.filter(Boolean))) { + // format, add ';' if needed. + if (!func.endsWith(';')) { + func += ';'; + } + // update proxy + console.log(`[${i}] Linking function: ${func} โ†’ ${address}`); + await proxy.updateContract(address, func, `Updating function ${func}`); + } })().catch(console.error); diff --git a/scripts/upgrades/5_1_0-to-5_2_0.js b/scripts/upgrades/5_1_0-to-5_2_0.js index 278ea3416..195ce6430 100644 --- a/scripts/upgrades/5_1_0-to-5_2_0.js +++ b/scripts/upgrades/5_1_0-to-5_2_0.js @@ -1,303 +1,310 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 -const assert = require('assert') -const CONFIG = require('../../config/config.json') -var GenericFactory = artifacts.require('@iexec/solidity/GenericFactory') -var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy') -var ERC1538Update = artifacts.require('@iexec/solidity/ERC1538UpdateDelegate') +const assert = require('assert'); +const CONFIG = require('../../config/config.json'); +var GenericFactory = artifacts.require('@iexec/solidity/GenericFactory'); +var ERC1538Proxy = artifacts.require('@iexec/solidity/ERC1538Proxy'); +var ERC1538Update = artifacts.require('@iexec/solidity/ERC1538UpdateDelegate'); const { ethers } = require('ethers'); /***************************************************************************** * Configuration * *****************************************************************************/ -const LIBRARIES = [ - artifacts.require('IexecLibOrders_v5'), -] +const LIBRARIES = [artifacts.require('IexecLibOrders_v5')]; const MODULES = [ - // { module: artifacts.require('IexecEscrowNativeDelegate'), methods: null }, - // { module: artifacts.require('IexecEscrowTokenDelegate'), methods: null }, - { module: artifacts.require('IexecEscrowTokenSwapDelegate'), methods: null }, -] + // { module: artifacts.require('IexecEscrowNativeDelegate'), methods: null }, + // { module: artifacts.require('IexecEscrowTokenDelegate'), methods: null }, + { module: artifacts.require('IexecEscrowTokenSwapDelegate'), methods: null }, +]; -const FUNCTIONS = [ -] +const FUNCTIONS = []; /***************************************************************************** * Tools * *****************************************************************************/ -function getSerializedObject(entry) -{ - return (entry.type == 'tuple') - ? `(${entry.components.map(getSerializedObject).join(',')})` - : entry.type; +function getSerializedObject(entry) { + return entry.type == 'tuple' + ? `(${entry.components.map(getSerializedObject).join(',')})` + : entry.type; } -function getFunctionSignatures(abi) -{ - return abi - .filter(entry => entry.type == 'function') - .map(entry => `${entry.name}(${entry.inputs.map(getSerializedObject).join(',')});`) - .join('') - + (abi.some(entry => entry.type == 'receive' ) ? 'receive;' : '') - + (abi.some(entry => entry.type == 'fallback') ? 'fallback;' : ''); +function getFunctionSignatures(abi) { + return ( + abi + .filter((entry) => entry.type == 'function') + .map((entry) => `${entry.name}(${entry.inputs.map(getSerializedObject).join(',')});`) + .join('') + + (abi.some((entry) => entry.type == 'receive') ? 'receive;' : '') + + (abi.some((entry) => entry.type == 'fallback') ? 'fallback;' : '') + ); } -async function factoryDeployer(contract, options = {}) -{ - console.log(`[factoryDeployer] ${contract.contractName}`); - const factory = await GenericFactory.deployed(); - const libraryAddresses = await Promise.all( - LIBRARIES - .filter(({ contractName }) => contract.bytecode.search(contractName) != -1) - .map(async ({ contractName, deployed }) => ({ - pattern: new RegExp(`__${contractName}${'_'.repeat(38-contractName.length)}`, 'g'), - ...await deployed() - })) - ); +async function factoryDeployer(contract, options = {}) { + console.log(`[factoryDeployer] ${contract.contractName}`); + const factory = await GenericFactory.deployed(); + const libraryAddresses = await Promise.all( + LIBRARIES.filter(({ contractName }) => contract.bytecode.search(contractName) != -1).map( + async ({ contractName, deployed }) => ({ + pattern: new RegExp( + `__${contractName}${'_'.repeat(38 - contractName.length)}`, + 'g', + ), + ...(await deployed()), + }), + ), + ); - const constructorABI = contract._json.abi.find(e => e.type == 'constructor'); - const coreCode = libraryAddresses.reduce((code, { pattern, address }) => code.replace(pattern, address.slice(2).toLowerCase()), contract.bytecode); - const argsCode = constructorABI ? web3.eth.abi.encodeParameters(constructorABI.inputs.map(e => e.type), options.args || []).slice(2) : ''; - const code = coreCode + argsCode; - const salt = options.salt || '0x0000000000000000000000000000000000000000000000000000000000000000'; + const constructorABI = contract._json.abi.find((e) => e.type == 'constructor'); + const coreCode = libraryAddresses.reduce( + (code, { pattern, address }) => code.replace(pattern, address.slice(2).toLowerCase()), + contract.bytecode, + ); + const argsCode = constructorABI + ? web3.eth.abi + .encodeParameters( + constructorABI.inputs.map((e) => e.type), + options.args || [], + ) + .slice(2) + : ''; + const code = coreCode + argsCode; + const salt = + options.salt || '0x0000000000000000000000000000000000000000000000000000000000000000'; - contract.address = options.call - ? await factory.predictAddressWithCall(code, salt, options.call) - : await factory.predictAddress(code, salt); + contract.address = options.call + ? await factory.predictAddressWithCall(code, salt, options.call) + : await factory.predictAddress(code, salt); - if (await web3.eth.getCode(contract.address) == '0x') - { - console.log(`[factory] Preparing to deploy ${contract.contractName} ...`); - options.call - ? await factory.createContractAndCall(code, salt, options.call) - : await factory.createContract(code, salt); - console.log(`[factory] ${contract.contractName} successfully deployed at ${contract.address}`); - } - else - { - console.log(`[factory] ${contract.contractName} already deployed`); - } + if ((await web3.eth.getCode(contract.address)) == '0x') { + console.log(`[factory] Preparing to deploy ${contract.contractName} ...`); + options.call + ? await factory.createContractAndCall(code, salt, options.call) + : await factory.createContract(code, salt); + console.log( + `[factory] ${contract.contractName} successfully deployed at ${contract.address}`, + ); + } else { + console.log(`[factory] ${contract.contractName} already deployed`); + } } /***************************************************************************** * Main * *****************************************************************************/ module.exports = async (callback) => { - try - { - console.log('# web3 version:', web3.version); - const chainid = await web3.eth.net.getId(); - const chaintype = await web3.eth.net.getNetworkType(); - console.log('Chainid is:', chainid); - console.log('Chaintype is:', chaintype); + try { + console.log('# web3 version:', web3.version); + const chainid = await web3.eth.net.getId(); + const chaintype = await web3.eth.net.getNetworkType(); + console.log('Chainid is:', chainid); + console.log('Chaintype is:', chaintype); - // Load config - const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; - const factoryOptions = { salt: deploymentOptions.v5.salt || web3.utils.randomHex(32) }; + // Load config + const deploymentOptions = CONFIG.chains[chainid] || CONFIG.chains.default; + const factoryOptions = { salt: deploymentOptions.v5.salt || web3.utils.randomHex(32) }; - // Load core - const proxy = await ERC1538Update.at((await ERC1538Proxy.deployed()).address); - console.log('Deploying to proxy:', proxy.address); + // Load core + const proxy = await ERC1538Update.at((await ERC1538Proxy.deployed()).address); + console.log('Deploying to proxy:', proxy.address); - // Module updates - for ([ i, { module, methods } ] of Object.entries(MODULES.filter(Boolean))) - { - console.log(`[${i}] ERC1538 link: ${module.contractName}`); - // deploy module - if (deploymentOptions.v5.usefactory) - { - await factoryDeployer(module, factoryOptions); - } - else - { - await deployer.deploy(module); - } - // update proxy - await proxy.updateContract( - (await module.deployed()).address, - getFunctionSignatures(module.abi.filter(entry => !methods || methods.indexOf(entry.name) != -1)), - `Linking module ${module.contractName}` - ); - } + // Module updates + for ([i, { module, methods }] of Object.entries(MODULES.filter(Boolean))) { + console.log(`[${i}] ERC1538 link: ${module.contractName}`); + // deploy module + if (deploymentOptions.v5.usefactory) { + await factoryDeployer(module, factoryOptions); + } else { + await deployer.deploy(module); + } + // update proxy + await proxy.updateContract( + (await module.deployed()).address, + getFunctionSignatures( + module.abi.filter((entry) => !methods || methods.indexOf(entry.name) != -1), + ), + `Linking module ${module.contractName}`, + ); + } - // Function updates - for ([ i, { func, address } ] of Object.entries(FUNCTIONS.filter(Boolean))) - { - // format, add ';' if needed. - if (!func.endsWith(';')) { func += ';'; } - // update proxy - console.log(`[${i}] Linking function: ${func} โ†’ ${address}`); - await proxy.updateContract(address, func, `Updating function ${func}`); - } + // Function updates + for ([i, { func, address }] of Object.entries(FUNCTIONS.filter(Boolean))) { + // format, add ';' if needed. + if (!func.endsWith(';')) { + func += ';'; + } + // update proxy + console.log(`[${i}] Linking function: ${func} โ†’ ${address}`); + await proxy.updateContract(address, func, `Updating function ${func}`); + } - /************************************************************************* - ************************************************************************* - ** TESTING ** - ************************************************************************* - *************************************************************************/ + /************************************************************************* + ************************************************************************* + ** TESTING ** + ************************************************************************* + *************************************************************************/ - if (process.env.TEST) - { - const query = await artifacts.require('@iexec/solidity/ERC1538QueryDelegate').at(proxy.address); - const iexec = await artifacts.require('IexecInterfaceToken' ).at(proxy.address); - const rlc = await artifacts.require('IERC20' ).at(await iexec.token()); - const apps = await artifacts.require('AppRegistry' ).at(await iexec.appregistry()); - const datasets = await artifacts.require('DatasetRegistry' ).at(await iexec.datasetregistry()); - const workerpools = await artifacts.require('WorkerpoolRegistry' ).at(await iexec.workerpoolregistry()); + if (process.env.TEST) { + const query = await artifacts + .require('@iexec/solidity/ERC1538QueryDelegate') + .at(proxy.address); + const iexec = await artifacts.require('IexecInterfaceToken').at(proxy.address); + const rlc = await artifacts.require('IERC20').at(await iexec.token()); + const apps = await artifacts.require('AppRegistry').at(await iexec.appregistry()); + const datasets = await artifacts + .require('DatasetRegistry') + .at(await iexec.datasetregistry()); + const workerpools = await artifacts + .require('WorkerpoolRegistry') + .at(await iexec.workerpoolregistry()); - console.log('Using proxy at: ', proxy.address); - console.log('owner: ', await iexec.owner()); - console.log('totalSupply: ', (await iexec.totalSupply()).toString()); - console.log('active methods count: ', (await query.totalFunctions()).toString()); + console.log('Using proxy at: ', proxy.address); + console.log('owner: ', await iexec.owner()); + console.log('totalSupply: ', (await iexec.totalSupply()).toString()); + console.log('active methods count: ', (await query.totalFunctions()).toString()); - // (await Promise.all( - // Array((await query.totalFunctions()).toNumber()).fill().map((_, i) => query.functionByIndex(i)) - // )) - // .forEach((details, i) => console.log(`[${i}] ${details.delegate} ${details.signature}`)); + // (await Promise.all( + // Array((await query.totalFunctions()).toNumber()).fill().map((_, i) => query.functionByIndex(i)) + // )) + // .forEach((details, i) => console.log(`[${i}] ${details.delegate} ${details.signature}`)); - const accounts = await web3.eth.getAccounts(); - console.log("Before:"); - console.log("- ETH balance: ", await web3.eth.getBalance(iexec.address)); - console.log("- RLC balance: ", (await rlc.balanceOf(iexec.address)).toString()); - console.log("- Total supply: ", (await iexec.totalSupply()).toString()); + const accounts = await web3.eth.getAccounts(); + console.log('Before:'); + console.log('- ETH balance: ', await web3.eth.getBalance(iexec.address)); + console.log('- RLC balance: ', (await rlc.balanceOf(iexec.address)).toString()); + console.log('- Total supply: ', (await iexec.totalSupply()).toString()); - if (await apps.balanceOf(accounts[0]) == 0) - { - console.log("deploy fake app"); - await apps.createApp( - accounts[0], - "FakeApp", - "DOCKER", - "0x", - ethers.constants.HashZero, - "0x", - ); - } - if (await datasets.balanceOf(accounts[0]) == 0) - { - console.log("deploy fake dataset"); - await datasets.createDataset( - accounts[0], - "FakeDataset", - "0x", - ethers.constants.HashZero, - ); - } - if (await workerpools.balanceOf(accounts[0]) == 0) - { - console.log("deploy fake workerpool"); - await workerpools.createWorkerpool( - accounts[0], - "FakeWorkerpool", - ); - } + if ((await apps.balanceOf(accounts[0])) == 0) { + console.log('deploy fake app'); + await apps.createApp( + accounts[0], + 'FakeApp', + 'DOCKER', + '0x', + ethers.constants.HashZero, + '0x', + ); + } + if ((await datasets.balanceOf(accounts[0])) == 0) { + console.log('deploy fake dataset'); + await datasets.createDataset( + accounts[0], + 'FakeDataset', + '0x', + ethers.constants.HashZero, + ); + } + if ((await workerpools.balanceOf(accounts[0])) == 0) { + console.log('deploy fake workerpool'); + await workerpools.createWorkerpool(accounts[0], 'FakeWorkerpool'); + } - const app = ethers.utils.hexZeroPad(ethers.BigNumber.from((await apps.tokenOfOwnerByIndex(accounts[0], 0)).toString()), 20); - const dataset = ethers.utils.hexZeroPad(ethers.BigNumber.from((await datasets.tokenOfOwnerByIndex(accounts[0], 0)).toString()), 20); - const workerpool = ethers.utils.hexZeroPad(ethers.BigNumber.from((await workerpools.tokenOfOwnerByIndex(accounts[0], 0)).toString()), 20); + const app = ethers.utils.hexZeroPad( + ethers.BigNumber.from((await apps.tokenOfOwnerByIndex(accounts[0], 0)).toString()), + 20, + ); + const dataset = ethers.utils.hexZeroPad( + ethers.BigNumber.from( + (await datasets.tokenOfOwnerByIndex(accounts[0], 0)).toString(), + ), + 20, + ); + const workerpool = ethers.utils.hexZeroPad( + ethers.BigNumber.from( + (await workerpools.tokenOfOwnerByIndex(accounts[0], 0)).toString(), + ), + 20, + ); - const apporder = { - app, - appprice: 20, - volume: 1000, - tag: ethers.constants.HashZero, - datasetrestrict: ethers.constants.AddressZero, - workerpoolrestrict: ethers.constants.AddressZero, - requesterrestrict: ethers.constants.AddressZero, - salt: ethers.utils.randomBytes(32), - sign: "0x", - } - const datasetorder = { - dataset, - datasetprice: 60, - volume: 1000, - tag: ethers.constants.HashZero, - apprestrict: ethers.constants.AddressZero, - workerpoolrestrict: ethers.constants.AddressZero, - requesterrestrict: ethers.constants.AddressZero, - salt: ethers.utils.randomBytes(32), - sign: "0x", - } - const workerpoolorder = { - workerpool, - workerpoolprice: 0, - volume: 3, - category: 4, - trust: ethers.constants.Zero, - tag: ethers.constants.AddressZero, - apprestrict: ethers.constants.AddressZero, - datasetrestrict: ethers.constants.AddressZero, - requesterrestrict: ethers.constants.AddressZero, - salt: ethers.utils.randomBytes(32), - sign: "0x", - } - const requestorder = { - app, - appmaxprice: 100, - dataset, - datasetmaxprice: 100, - workerpool, - workerpoolmaxprice: 100, - volume: 10, // CHANGE FOR BOT - category: 4, - trust: ethers.constants.Zero, - tag: ethers.constants.HashZero, - requester: accounts[0], - beneficiary: accounts[0], - callback: ethers.constants.AddressZero, - params: "", - salt: ethers.utils.randomBytes(32), - sign: "0x", - } + const apporder = { + app, + appprice: 20, + volume: 1000, + tag: ethers.constants.HashZero, + datasetrestrict: ethers.constants.AddressZero, + workerpoolrestrict: ethers.constants.AddressZero, + requesterrestrict: ethers.constants.AddressZero, + salt: ethers.utils.randomBytes(32), + sign: '0x', + }; + const datasetorder = { + dataset, + datasetprice: 60, + volume: 1000, + tag: ethers.constants.HashZero, + apprestrict: ethers.constants.AddressZero, + workerpoolrestrict: ethers.constants.AddressZero, + requesterrestrict: ethers.constants.AddressZero, + salt: ethers.utils.randomBytes(32), + sign: '0x', + }; + const workerpoolorder = { + workerpool, + workerpoolprice: 0, + volume: 3, + category: 4, + trust: ethers.constants.Zero, + tag: ethers.constants.AddressZero, + apprestrict: ethers.constants.AddressZero, + datasetrestrict: ethers.constants.AddressZero, + requesterrestrict: ethers.constants.AddressZero, + salt: ethers.utils.randomBytes(32), + sign: '0x', + }; + const requestorder = { + app, + appmaxprice: 100, + dataset, + datasetmaxprice: 100, + workerpool, + workerpoolmaxprice: 100, + volume: 10, // CHANGE FOR BOT + category: 4, + trust: ethers.constants.Zero, + tag: ethers.constants.HashZero, + requester: accounts[0], + beneficiary: accounts[0], + callback: ethers.constants.AddressZero, + params: '', + salt: ethers.utils.randomBytes(32), + sign: '0x', + }; - await iexec.manageAppOrder ({ order: apporder, operation: 0, sign: "0x" }); - await iexec.manageDatasetOrder ({ order: datasetorder, operation: 0, sign: "0x" }); - await iexec.manageWorkerpoolOrder({ order: workerpoolorder, operation: 0, sign: "0x" }); - await iexec.manageRequestOrder ({ order: requestorder, operation: 0, sign: "0x" }); + await iexec.manageAppOrder({ order: apporder, operation: 0, sign: '0x' }); + await iexec.manageDatasetOrder({ order: datasetorder, operation: 0, sign: '0x' }); + await iexec.manageWorkerpoolOrder({ order: workerpoolorder, operation: 0, sign: '0x' }); + await iexec.manageRequestOrder({ order: requestorder, operation: 0, sign: '0x' }); - // const tx = await web3.eth.sendTransaction({ from: accounts[0], to: iexec.address, value: "100000000000000000" }); - // const tx = await iexec.depositEth({ value: "10000000000000000" }) - // const tx = await iexec.withdrawEth(126492) - // const tx = await iexec.requestToken(10, { value: "10000000000000000" }) - const tx = await iexec.matchOrdersWithEth(apporder, datasetorder, workerpoolorder, requestorder, { value: "10000000000000000", from: accounts[1] }); + // const tx = await web3.eth.sendTransaction({ from: accounts[0], to: iexec.address, value: "100000000000000000" }); + // const tx = await iexec.depositEth({ value: "10000000000000000" }) + // const tx = await iexec.withdrawEth(126492) + // const tx = await iexec.requestToken(10, { value: "10000000000000000" }) + const tx = await iexec.matchOrdersWithEth( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { value: '10000000000000000', from: accounts[1] }, + ); - tx.logs - .filter(({ event }) => event == 'Transfer') - .forEach(({address, event, args}) => { - console.log(`[ ${address} | ${event} ]`) - console.log(args.from.toString()) - console.log(args.to.toString()) - console.log(args.value.toString()) - }) + tx.logs + .filter(({ event }) => event == 'Transfer') + .forEach(({ address, event, args }) => { + console.log(`[ ${address} | ${event} ]`); + console.log(args.from.toString()); + console.log(args.to.toString()); + console.log(args.value.toString()); + }); - console.log("After:"); - console.log("- ETH balance: ", await web3.eth.getBalance(iexec.address)); - console.log("- RLC balance: ", (await rlc.balanceOf(iexec.address)).toString()); - console.log("- Total supply: ", (await iexec.totalSupply()).toString()); - } - - } - catch (e) - { - callback(e) - } - finally - { - callback() - } -} + console.log('After:'); + console.log('- ETH balance: ', await web3.eth.getBalance(iexec.address)); + console.log('- RLC balance: ', (await rlc.balanceOf(iexec.address)).toString()); + console.log('- Total supply: ', (await iexec.totalSupply()).toString()); + } + } catch (e) { + callback(e); + } finally { + callback(); + } +}; diff --git a/scripts/upgrades/upgrade-helper.ts b/scripts/upgrades/upgrade-helper.ts new file mode 100644 index 000000000..7c907460a --- /dev/null +++ b/scripts/upgrades/upgrade-helper.ts @@ -0,0 +1,43 @@ +import { Interface } from '@ethersproject/abi'; +import { ContractTransaction } from '@ethersproject/contracts'; +import { ethers } from 'hardhat'; +import { ERC1538Query, ERC1538Query__factory, ERC1538Update__factory } from '../../typechain'; + +function encodeModuleProxyUpdate(ModuleInterface: Interface, moduleAddress: string) { + const moduleFunctions = Object.keys(ModuleInterface.functions).map((tx) => tx + ';'); + moduleFunctions.forEach((func) => { + console.log(`- ${func}`); + }); + const moduleProxyUpdateData = ERC1538Update__factory.createInterface().encodeFunctionData( + 'updateContract', + [moduleAddress, moduleFunctions.join(''), ''], + ); + return moduleProxyUpdateData; +} + +async function printBlockTime() { + const latestBlock = await ethers.provider.getBlock('latest'); + const blockNumber = latestBlock.number; + const blockTimestamp = latestBlock.timestamp; + const blockDate = new Date(blockTimestamp * 1000); + console.log(`Block#${blockNumber}: ${blockDate} (timestamp:${blockTimestamp})`); +} + +async function printFunctions(erc1538ProxyAddress: string) { + const erc1538QueryInstance: ERC1538Query = ERC1538Query__factory.connect( + erc1538ProxyAddress, + ethers.provider, + ); + const functionCount = await erc1538QueryInstance.totalFunctions(); + console.log(`ERC1538Proxy supports ${functionCount} functions:`); + for (let i = 0; i < functionCount.toNumber(); i++) { + const [method, , contract] = await erc1538QueryInstance.functionByIndex(i); + console.log(`[${i}] ${contract} ${method}`); + } +} + +function logTxData(x: ContractTransaction) { + console.log(x); +} + +export { encodeModuleProxyUpdate, printBlockTime, printFunctions, logTxData }; diff --git a/slither.config.json b/slither.config.json new file mode 100644 index 000000000..26f25ceef --- /dev/null +++ b/slither.config.json @@ -0,0 +1,12 @@ +{ + "solc_remaps": "@=node_modules/@", + "filter_paths": "(node_modules/|contracts/modules/interfaces/|contracts/libs/|contracts/external/|contracts/registries/)", + "detectors_to_exclude": "pragma,solc-version,naming-convention,timestamp", + "solc_args": "--optimize --via-ir", + "_comments": [ + "For some reasons `compile_force_framework: hardhat` is not working.", + "Error is https://github.com/crytic/slither/issues/1391#issue-1393210665", + "Hence we manually compile with `solc_solcs_select` option and", + "target a single contract when performing a Slither analysis." + ] +} diff --git a/test.sh b/test.sh new file mode 100755 index 000000000..719bf8a76 --- /dev/null +++ b/test.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +sub_dir="" + +logs_dir="logs/$sub_dir" +mkdir -p $logs_dir +exit_code=0 +if [[ $OSTYPE == 'darwin'* ]]; then + files=$(find test/ -type f | sort) +else + files=$(find test/ -regex '.*\(js\|ts\)' | sort) +fi +for f in $files; do + log_file=$logs_dir$(basename "$f").logs + echo "Running $sub_dir: $f ($log_file)" + npx hardhat test "$f" &>"$log_file" # redirect stdout and stderr + # display summary (filter with passing/failing and only show failing) + failing_line=$(grep -A 2 'passing (' "$log_file" | + grep 'failing') + if [ -n "$failing_line" ]; then + exit_code=1 + echo "$failing_line" + fi +done + +exit $exit_code diff --git a/test/000_fullchain-ABILegacy.js b/test/000_fullchain-ABILegacy.js index ef6afb3b2..10ca243d7 100644 --- a/test/000_fullchain-ABILegacy.js +++ b/test/000_fullchain-ABILegacy.js @@ -1,719 +1,1017 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../config/config.json").chains.default; +var DEPLOYMENT = require('../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); var IexecInterfaceABILegacy = artifacts.require(`IexecInterface${DEPLOYMENT.asset}ABILegacy`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../utils/tools"); -const enstools = require("../utils/ens-tools"); -const odbtools = require("../utils/odb-tools"); -const constants = require("../utils/constants"); +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../utils/tools'); +const enstools = require('../utils/ens-tools'); +const odbtools = require('../utils/odb-tools'); +const constants = require('../utils/constants'); -Object.extract = (obj, keys) => keys.map(key => obj[key]); +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Fullchain', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - var dealid = null; - var taskid = null; - - var authorizations = {}; - var secrets = {}; - var results = {}; - var consensus = null; - var workers = []; - - var gasReceipt = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterfaceABILegacy.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - trusttarget = 4; - workers = [ - { agent: worker1, useenclave: true, result: "iExec the wanderer" }, - { agent: worker2, useenclave: false, result: "iExec the wanderer" }, - ]; - consensus = "iExec the wanderer"; - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, appProvider.address); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, datasetProvider.address); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, scheduler.address); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - txMined = await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - events = tools.extractEvents(txMined, WorkerpoolInstance.address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, // CHANGE FOR BOT - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - txMined = await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - gasReceipt.push([ "matchOrders", txMined.receipt.gasUsed ]); - - dealid = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 0 }, - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, dealid ); - - events = tools.extractEvents(txMined, IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, dealid ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 1 ); - }); - - describe("checks", async () => { - it("deal", async () => { - deal_pt1 = await IexecInstance.viewDealABILegacy_pt1(dealid); - assert.equal (deal_pt1[0] /*dapp.pointer*/ , AppInstance.address, "check deal (deal.dapp.pointer)"); - assert.equal (deal_pt1[0] /*dapp.pointer*/ , requestorder.app, "check deal (deal.dapp.pointer)"); - assert.equal (deal_pt1[1] /*dapp.owner*/ , appProvider.address, "check deal (deal.dapp.owner)" ); - assert.equal (deal_pt1[2].toNumber() /*dapp.price*/ , apporder.appprice, "check deal (deal.dapp.price)" ); - assert.isAtMost (deal_pt1[2].toNumber() /*dapp.price*/ , requestorder.appmaxprice, "check deal (deal.dapp.price)" ); - - assert.equal (deal_pt1[3] /*data.pointer*/ , DatasetInstance.address, "check deal (deal.data.pointer)"); - assert.equal (deal_pt1[3] /*data.pointer*/ , requestorder.dataset, "check deal (deal.data.pointer)"); - assert.equal (deal_pt1[4] /*data.owner*/ , datasetProvider.address, "check deal (deal.data.owner)" ); - assert.equal (deal_pt1[5].toNumber() /*data.price*/ , datasetorder.datasetprice, "check deal (deal.data.price)" ); - assert.isAtMost (deal_pt1[5].toNumber() /*data.price*/ , requestorder.datasetmaxprice, "check deal (deal.data.price)" ); - - assert.equal (deal_pt1[6] /*pool.pointer*/ , WorkerpoolInstance.address, "check deal (deal.pool.pointer)"); - if (requestorder.workerpool != constants.NULL.ADDRESS) - assert.equal (deal_pt1[6] /*pool.pointer*/ , requestorder.workerpool, "check deal (deal.pool.pointer)"); - assert.equal (deal_pt1[7] /*pool.owner*/ , scheduler.address, "check deal (deal.pool.owner)" ); - assert.equal (deal_pt1[8].toNumber() /*pool.price*/ , workerpoolorder.workerpoolprice, "check deal (deal.pool.price)" ); - assert.isAtMost (deal_pt1[8].toNumber() /*pool.price*/ , requestorder.workerpoolmaxprice, "check deal (deal.pool.price)" ); - - deal_pt2 = await IexecInstance.viewDealABILegacy_pt2(dealid); - assert.equal (deal_pt2[0].toNumber(), workerpoolorder.trust, "check deal (deal.trust)" ); - assert.isAtLeast(deal_pt2[0].toNumber(), requestorder.trust, "check deal (deal.trust)" ); - assert.equal (deal_pt2[1], workerpoolorder.tag, "check deal (deal.tag)" ); - assert.equal (deal_pt2[1], requestorder.tag, "check deal (deal.tag)" ); - assert.equal (deal_pt2[2], user.address, "check deal (deal.requester)" ); - assert.equal (deal_pt2[3], user.address, "check deal (deal.beneficiary)"); - assert.equal (deal_pt2[4], requestorder.callback, "check deal (deal.callback)" ); - assert.equal (deal_pt2[5], requestorder.params, "check deal (deal.params)" ); - }); - - it("config", async () => { - config = await IexecInstance.viewConfigABILegacy(dealid); - assert.equal (config[0].toNumber(), workerpoolorder.category, "check config (config.category)" ); - assert.equal (config[0].toNumber(), requestorder.category, "check config (config.category)" ); - assert.isAbove(config[1].toNumber(), 0, "check config (config.start)" ); - assert.equal (config[2].toNumber(), 0, "check config (config.botFirst)" ); - assert.equal (config[3].toNumber(), 1, "check config (config.botSize)" ); - assert.equal (config[4].toNumber(), 8, "check config (config.workerStake)" ); // 8 = floor(25*.3) - assert.equal (config[5].toNumber(), 5, "check config (config.schedulerRewardRatio)"); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 993, 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 29 ], "check balance"); - }); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize", async () => { - txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - taskid = web3.utils.soliditySha3({ t: 'bytes32', v: dealid }, { t: 'uint256', v: 0 }); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTaskABILegacy(taskid); - assert.equal (task[ 0].toNumber(), constants.TaskStatusEnum.ACTIVE ); - assert.equal (task[ 1], dealid ); - assert.equal (task[ 2].toNumber(), 0 ); - assert.equal (task[ 3].toNumber(), (await IexecInstance.viewCategoryABILegacy(requestorder.category))[2]); - assert.isAbove (task[ 4].toNumber(), 0 ); - assert.equal (task[ 5].toNumber(), 0 ); - assert.isAbove (task[ 6].toNumber(), 0 ); - assert.equal (task[ 7], constants.NULL.BYTES32 ); - assert.equal (task[ 8].toNumber(), 0 ); - assert.equal (task[ 9].toNumber(), 0 ); - assert.deepEqual(task[10], [] ); - assert.equal (task[11], null ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 993, 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 29 ], "check balance"); - }); - }); - }); - - describe("[3] contribute", async () => { - it("authorization signature", async () => { - for (w of workers) - { - const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); - const [ auth, secret ] = w.useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - authorizations[w.agent.address] = auth; - secrets[w.agent.address] = secret; - } - }); - - it("run", async () => { - consensus = odbtools.utils.hashConsensus(taskid, consensus); - for (w of workers) - { - results[w.agent.address] = await w.agent.run(authorizations[w.agent.address], secrets[w.agent.address], w.result); - } - }); - - it("[TX] contribute", async () => { - for (w of workers) - { - txMined = await IexecInstance.contribute( - authorizations[w.agent.address].taskid, // task (authorization) - results [w.agent.address].hash, // common (result) - results [w.agent.address].seal, // unique (result) - authorizations[w.agent.address].enclave, // address (enclave) - results [w.agent.address].sign, // signature (enclave) - authorizations[w.agent.address].sign, // signature (authorization) - { from: w.agent.address } - ); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.hash, results[w.agent.address].hash ); - } - }); - describe("checks", async () => { - it("contribution", async () => { - for (w of workers) - { - contribution = await IexecInstance.viewContributionABILegacy(taskid, w.agent.address); - assert.equal(contribution[0], constants.ContributionStatusEnum.CONTRIBUTED, "check contribution (contribution.status)" ); - assert.equal(contribution[1], results[w.agent.address].hash, "check contribution (contribution.resultHash)" ); - assert.equal(contribution[2], results[w.agent.address].seal, "check contribution (contribution.resultSeal)" ); - assert.equal(contribution[3], authorizations[w.agent.address].enclave, "check contribution (contribution.enclaveChallenge)"); - } - }); - }); - - it("task", async () => { - task = await IexecInstance.viewTaskABILegacy(taskid); - assert.equal (task[ 0].toNumber(), constants.TaskStatusEnum.REVEALING ); - assert.equal (task[ 1], dealid ); - assert.equal (task[ 2].toNumber(), 0 ); - assert.equal (task[ 3].toNumber(), (await IexecInstance.viewCategoryABILegacy(requestorder.category))[2]); - assert.isAbove (task[ 4].toNumber(), 0 ); - assert.isAbove (task[ 5].toNumber(), 0 ); - assert.isAbove (task[ 6].toNumber(), 0 ); - assert.equal (task[ 7], consensus.hash ); - assert.equal (task[ 8].toNumber(), 0 ); - assert.equal (task[ 9].toNumber(), workers.length ); - assert.deepEqual(task[10], workers.map(w => w.agent.address) ); - assert.equal (task[11], null ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 993, 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 992, 8 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 992, 8 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 29 ], "check balance"); - }); - }); - - describe("[4] reveal", async () => { - it("[TX] reveal", async () => { - for (w of workers) - if (results[w.agent.address].hash == consensus.hash) - { - txMined = await IexecInstance.reveal( - taskid, - results[w.agent.address].digest, - { from: w.agent.address } - ); - gasReceipt.push([ "reveal", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReveal"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.digest, results[w.agent.address].digest); - } - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTaskABILegacy(taskid); - assert.equal (task[ 0].toNumber(), constants.TaskStatusEnum.REVEALING ); - assert.equal (task[ 1], dealid ); - assert.equal (task[ 2].toNumber(), 0 ); - assert.equal (task[ 3].toNumber(), (await IexecInstance.viewCategoryABILegacy(requestorder.category))[2]); - assert.isAbove (task[ 4].toNumber(), 0 ); - assert.isAbove (task[ 5].toNumber(), 0 ); - assert.isAbove (task[ 6].toNumber(), 0 ); - assert.equal (task[ 7], consensus.hash ); - assert.equal (task[ 8].toNumber(), workers.length ); - assert.equal (task[ 9].toNumber(), workers.length ); - assert.deepEqual(task[10], workers.map(w => w.agent.address) ); - assert.equal (task[11], null ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 993, 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 992, 8 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 992, 8 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 29 ], "check balance"); - }); - }); - }); - - describe("[5] finalization", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - taskid, - web3.utils.utf8ToHex("aResult"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult")); - - // TODO: check 2 events by w.address for w in workers - // How to retreive events from the IexecClerk (5 rewards and 1 seize) - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTaskABILegacy(taskid); - assert.equal (task[ 0].toNumber(), constants.TaskStatusEnum.COMPLETED ); - assert.equal (task[ 1], dealid ); - assert.equal (task[ 2].toNumber(), 0 ); - assert.equal (task[ 3].toNumber(), (await IexecInstance.viewCategoryABILegacy(requestorder.category))[2]); - assert.isAbove (task[ 4].toNumber(), 0 ); - assert.isAbove (task[ 5].toNumber(), 0 ); - assert.isAbove (task[ 6].toNumber(), 0 ); - assert.equal (task[ 7], consensus.hash ); - assert.equal (task[ 8].toNumber(), workers.length ); - assert.equal (task[ 9].toNumber(), workers.length ); - assert.deepEqual(task[10], workers.map(w => w.agent.address) ); - assert.equal (task[11], web3.utils.utf8ToHex("aResult") ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 3, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 1, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1003, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1011, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1011, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 0 ], "check balance"); - }); - }); - }); - }); - - describe("โ†’ summary", async () => { - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 3, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 1, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1003, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1011, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1011, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 0 ], "check balance"); - }); - - it("balances - extra", async () => { - assert.equal( - Number(await IexecInstance.totalSupply()), - DEPLOYMENT.asset == "Native" - ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 - : Number(await RLCInstance.balanceOf(IexecInstance.address)) - ); - - for (agent of [ datasetProvider, appProvider, scheduler, worker1, worker2, worker3, worker4, worker5, user ]) - { - assert.deepEqual(await agent.viewAccount(), [ Number(await IexecInstance.balanceOf(agent.address)), Number(await IexecInstance.frozenOf(agent.address)) ], "check balance"); - } - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 1, "score issue"); - assert.equal(await worker2.viewScore(), 1, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - - it("gas used", async () => { - totalgas = 0; - for ([descr, gas] of gasReceipt) - { - console.log(`${descr.padEnd(20, " ")} ${gas.toString().padStart(8, " ")}`); - totalgas += gas; - } - console.log(`${"Total gas".padEnd(20, " ")} ${totalgas.toString().padStart(8, " ")}`); - }); - }); - + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + var dealid = null; + var taskid = null; + + var authorizations = {}; + var secrets = {}; + var results = {}; + var consensus = null; + var workers = []; + + var gasReceipt = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterfaceABILegacy.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + + trusttarget = 4; + workers = [ + { agent: worker1, useenclave: true, result: 'iExec the wanderer' }, + { agent: worker2, useenclave: false, result: 'iExec the wanderer' }, + ]; + consensus = 'iExec the wanderer'; + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + assert.equal(events[0].args.from, constants.NULL.ADDRESS); + assert.equal(events[0].args.to, appProvider.address); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + assert.equal(events[0].args.from, constants.NULL.ADDRESS); + assert.equal(events[0].args.to, datasetProvider.address); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + assert.equal(events[0].args.from, constants.NULL.ADDRESS); + assert.equal(events[0].args.to, scheduler.address); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + txMined = await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolInstance.address, + 'PolicyUpdate', + ); + assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); + assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); + assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); + assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, // CHANGE FOR BOT + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { from: user.address }, + ); + gasReceipt.push(['matchOrders', txMined.receipt.gasUsed]); + + dealid = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, dealid); + + events = tools.extractEvents(txMined, IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, dealid); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 1); + }); + + describe('checks', async () => { + it('deal', async () => { + deal_pt1 = await IexecInstance.viewDealABILegacy_pt1(dealid); + assert.equal( + deal_pt1[0] /*dapp.pointer*/, + AppInstance.address, + 'check deal (deal.dapp.pointer)', + ); + assert.equal( + deal_pt1[0] /*dapp.pointer*/, + requestorder.app, + 'check deal (deal.dapp.pointer)', + ); + assert.equal( + deal_pt1[1] /*dapp.owner*/, + appProvider.address, + 'check deal (deal.dapp.owner)', + ); + assert.equal( + deal_pt1[2].toNumber() /*dapp.price*/, + apporder.appprice, + 'check deal (deal.dapp.price)', + ); + assert.isAtMost( + deal_pt1[2].toNumber() /*dapp.price*/, + requestorder.appmaxprice, + 'check deal (deal.dapp.price)', + ); + + assert.equal( + deal_pt1[3] /*data.pointer*/, + DatasetInstance.address, + 'check deal (deal.data.pointer)', + ); + assert.equal( + deal_pt1[3] /*data.pointer*/, + requestorder.dataset, + 'check deal (deal.data.pointer)', + ); + assert.equal( + deal_pt1[4] /*data.owner*/, + datasetProvider.address, + 'check deal (deal.data.owner)', + ); + assert.equal( + deal_pt1[5].toNumber() /*data.price*/, + datasetorder.datasetprice, + 'check deal (deal.data.price)', + ); + assert.isAtMost( + deal_pt1[5].toNumber() /*data.price*/, + requestorder.datasetmaxprice, + 'check deal (deal.data.price)', + ); + + assert.equal( + deal_pt1[6] /*pool.pointer*/, + WorkerpoolInstance.address, + 'check deal (deal.pool.pointer)', + ); + if (requestorder.workerpool != constants.NULL.ADDRESS) + assert.equal( + deal_pt1[6] /*pool.pointer*/, + requestorder.workerpool, + 'check deal (deal.pool.pointer)', + ); + assert.equal( + deal_pt1[7] /*pool.owner*/, + scheduler.address, + 'check deal (deal.pool.owner)', + ); + assert.equal( + deal_pt1[8].toNumber() /*pool.price*/, + workerpoolorder.workerpoolprice, + 'check deal (deal.pool.price)', + ); + assert.isAtMost( + deal_pt1[8].toNumber() /*pool.price*/, + requestorder.workerpoolmaxprice, + 'check deal (deal.pool.price)', + ); + + deal_pt2 = await IexecInstance.viewDealABILegacy_pt2(dealid); + assert.equal( + deal_pt2[0].toNumber(), + workerpoolorder.trust, + 'check deal (deal.trust)', + ); + assert.isAtLeast( + deal_pt2[0].toNumber(), + requestorder.trust, + 'check deal (deal.trust)', + ); + assert.equal(deal_pt2[1], workerpoolorder.tag, 'check deal (deal.tag)'); + assert.equal(deal_pt2[1], requestorder.tag, 'check deal (deal.tag)'); + assert.equal(deal_pt2[2], user.address, 'check deal (deal.requester)'); + assert.equal(deal_pt2[3], user.address, 'check deal (deal.beneficiary)'); + assert.equal(deal_pt2[4], requestorder.callback, 'check deal (deal.callback)'); + assert.equal(deal_pt2[5], requestorder.params, 'check deal (deal.params)'); + }); + + it('config', async () => { + config = await IexecInstance.viewConfigABILegacy(dealid); + assert.equal( + config[0].toNumber(), + workerpoolorder.category, + 'check config (config.category)', + ); + assert.equal( + config[0].toNumber(), + requestorder.category, + 'check config (config.category)', + ); + assert.isAbove(config[1].toNumber(), 0, 'check config (config.start)'); + assert.equal(config[2].toNumber(), 0, 'check config (config.botFirst)'); + assert.equal(config[3].toNumber(), 1, 'check config (config.botSize)'); + assert.equal(config[4].toNumber(), 8, 'check config (config.workerStake)'); // 8 = floor(25*.3) + assert.equal( + config[5].toNumber(), + 5, + 'check config (config.schedulerRewardRatio)', + ); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [993, 7], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 29], 'check balance'); + }); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize', async () => { + txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + taskid = web3.utils.soliditySha3( + { t: 'bytes32', v: dealid }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTaskABILegacy(taskid); + assert.equal(task[0].toNumber(), constants.TaskStatusEnum.ACTIVE); + assert.equal(task[1], dealid); + assert.equal(task[2].toNumber(), 0); + assert.equal( + task[3].toNumber(), + (await IexecInstance.viewCategoryABILegacy(requestorder.category))[2], + ); + assert.isAbove(task[4].toNumber(), 0); + assert.equal(task[5].toNumber(), 0); + assert.isAbove(task[6].toNumber(), 0); + assert.equal(task[7], constants.NULL.BYTES32); + assert.equal(task[8].toNumber(), 0); + assert.equal(task[9].toNumber(), 0); + assert.deepEqual(task[10], []); + assert.equal(task[11], null); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [993, 7], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 29], 'check balance'); + }); + }); + }); + + describe('[3] contribute', async () => { + it('authorization signature', async () => { + for (w of workers) { + const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); + const [auth, secret] = w.useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + authorizations[w.agent.address] = auth; + secrets[w.agent.address] = secret; + } + }); + + it('run', async () => { + consensus = odbtools.utils.hashConsensus(taskid, consensus); + for (w of workers) { + results[w.agent.address] = await w.agent.run( + authorizations[w.agent.address], + secrets[w.agent.address], + w.result, + ); + } + }); + + it('[TX] contribute', async () => { + for (w of workers) { + txMined = await IexecInstance.contribute( + authorizations[w.agent.address].taskid, // task (authorization) + results[w.agent.address].hash, // common (result) + results[w.agent.address].seal, // unique (result) + authorizations[w.agent.address].enclave, // address (enclave) + results[w.agent.address].sign, // signature (enclave) + authorizations[w.agent.address].sign, // signature (authorization) + { from: w.agent.address }, + ); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskContribute'); + assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.hash, results[w.agent.address].hash); + } + }); + describe('checks', async () => { + it('contribution', async () => { + for (w of workers) { + contribution = await IexecInstance.viewContributionABILegacy( + taskid, + w.agent.address, + ); + assert.equal( + contribution[0], + constants.ContributionStatusEnum.CONTRIBUTED, + 'check contribution (contribution.status)', + ); + assert.equal( + contribution[1], + results[w.agent.address].hash, + 'check contribution (contribution.resultHash)', + ); + assert.equal( + contribution[2], + results[w.agent.address].seal, + 'check contribution (contribution.resultSeal)', + ); + assert.equal( + contribution[3], + authorizations[w.agent.address].enclave, + 'check contribution (contribution.enclaveChallenge)', + ); + } + }); + }); + + it('task', async () => { + task = await IexecInstance.viewTaskABILegacy(taskid); + assert.equal(task[0].toNumber(), constants.TaskStatusEnum.REVEALING); + assert.equal(task[1], dealid); + assert.equal(task[2].toNumber(), 0); + assert.equal( + task[3].toNumber(), + (await IexecInstance.viewCategoryABILegacy(requestorder.category))[2], + ); + assert.isAbove(task[4].toNumber(), 0); + assert.isAbove(task[5].toNumber(), 0); + assert.isAbove(task[6].toNumber(), 0); + assert.equal(task[7], consensus.hash); + assert.equal(task[8].toNumber(), 0); + assert.equal(task[9].toNumber(), workers.length); + assert.deepEqual( + task[10], + workers.map((w) => w.agent.address), + ); + assert.equal(task[11], null); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [993, 7], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [992, 8], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [992, 8], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 29], 'check balance'); + }); + }); + + describe('[4] reveal', async () => { + it('[TX] reveal', async () => { + for (w of workers) + if (results[w.agent.address].hash == consensus.hash) { + txMined = await IexecInstance.reveal( + taskid, + results[w.agent.address].digest, + { from: w.agent.address }, + ); + gasReceipt.push(['reveal', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskReveal'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.digest, results[w.agent.address].digest); + } + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTaskABILegacy(taskid); + assert.equal(task[0].toNumber(), constants.TaskStatusEnum.REVEALING); + assert.equal(task[1], dealid); + assert.equal(task[2].toNumber(), 0); + assert.equal( + task[3].toNumber(), + (await IexecInstance.viewCategoryABILegacy(requestorder.category))[2], + ); + assert.isAbove(task[4].toNumber(), 0); + assert.isAbove(task[5].toNumber(), 0); + assert.isAbove(task[6].toNumber(), 0); + assert.equal(task[7], consensus.hash); + assert.equal(task[8].toNumber(), workers.length); + assert.equal(task[9].toNumber(), workers.length); + assert.deepEqual( + task[10], + workers.map((w) => w.agent.address), + ); + assert.equal(task[11], null); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [993, 7], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [992, 8], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [992, 8], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 29], 'check balance'); + }); + }); + }); + + describe('[5] finalization', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + taskid, + web3.utils.utf8ToHex('aResult'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult')); + + // TODO: check 2 events by w.address for w in workers + // How to retreive events from the IexecClerk (5 rewards and 1 seize) + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTaskABILegacy(taskid); + assert.equal(task[0].toNumber(), constants.TaskStatusEnum.COMPLETED); + assert.equal(task[1], dealid); + assert.equal(task[2].toNumber(), 0); + assert.equal( + task[3].toNumber(), + (await IexecInstance.viewCategoryABILegacy(requestorder.category))[2], + ); + assert.isAbove(task[4].toNumber(), 0); + assert.isAbove(task[5].toNumber(), 0); + assert.isAbove(task[6].toNumber(), 0); + assert.equal(task[7], consensus.hash); + assert.equal(task[8].toNumber(), workers.length); + assert.equal(task[9].toNumber(), workers.length); + assert.deepEqual( + task[10], + workers.map((w) => w.agent.address), + ); + assert.equal(task[11], web3.utils.utf8ToHex('aResult')); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [3, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [1, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1003, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1011, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1011, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 0], 'check balance'); + }); + }); + }); + }); + + describe('โ†’ summary', async () => { + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [3, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [1, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1003, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1011, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1011, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 0], 'check balance'); + }); + + it('balances - extra', async () => { + assert.equal( + Number(await IexecInstance.totalSupply()), + DEPLOYMENT.asset == 'Native' + ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 + : Number(await RLCInstance.balanceOf(IexecInstance.address)), + ); + + for (agent of [ + datasetProvider, + appProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + worker5, + user, + ]) { + assert.deepEqual( + await agent.viewAccount(), + [ + Number(await IexecInstance.balanceOf(agent.address)), + Number(await IexecInstance.frozenOf(agent.address)), + ], + 'check balance', + ); + } + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 1, 'score issue'); + assert.equal(await worker2.viewScore(), 1, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + + it('gas used', async () => { + totalgas = 0; + for ([descr, gas] of gasReceipt) { + console.log(`${descr.padEnd(20, ' ')} ${gas.toString().padStart(8, ' ')}`); + totalgas += gas; + } + console.log(`${'Total gas'.padEnd(20, ' ')} ${totalgas.toString().padStart(8, ' ')}`); + }); + }); }); diff --git a/test/000_fullchain-boost.test.ts b/test/000_fullchain-boost.test.ts new file mode 100644 index 000000000..1c5324161 --- /dev/null +++ b/test/000_fullchain-boost.test.ts @@ -0,0 +1,785 @@ +// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { loadFixture, time } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { expect } from 'chai'; +import { TypedDataDomain } from 'ethers'; +import hre, { ethers } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../scripts/hardhat-fixture-deployer'; +import { + IexecAccessors, + IexecAccessors__factory, + IexecOrderManagement__factory, + IexecPocoBoostAccessorsDelegate__factory, + IexecPocoBoostDelegate, + IexecPocoBoostDelegate__factory, + TestClient__factory, + WorkerpoolInterface__factory, +} from '../typechain'; +import constants from '../utils/constants'; +import { + OrdersActors, + OrdersAssets, + OrdersPrices, + buildOrders, + hashOrder, + signOrders, +} from '../utils/createOrders'; +import { + buildAndSignContributionAuthorizationMessage, + buildAndSignEnclaveMessage, + buildResultCallbackAndDigest, + buildUtf8ResultAndDigest, + getDealId, + getIexecAccounts, + getTaskId, + setNextBlockTimestamp, +} from '../utils/poco-tools'; +import { IexecWrapper } from './utils/IexecWrapper'; + +const teeDealTag = '0x0000000000000000000000000000000000000000000000000000000000000001'; +const taskIndex = 0; +const volume = taskIndex + 1; +const { results, resultDigest } = buildUtf8ResultAndDigest('result'); +const appPrice = 1000; +const datasetPrice = 1_000_000; +const workerpoolPrice = 1_000_000_000; + +describe('IexecPocoBoostDelegate (IT)', function () { + let domain: TypedDataDomain; + let proxyAddress: string; + let iexecInstance: IexecAccessors; + let iexecPocoBoostInstance: IexecPocoBoostDelegate; + let iexecWrapper: IexecWrapper; + let appAddress = ''; + let workerpoolAddress = ''; + let datasetAddress = ''; + let [ + owner, + requester, + sponsor, + beneficiary, + appProvider, + datasetProvider, + scheduler, + worker, + enclave, + anyone, + teeBroker, + ] = [] as SignerWithAddress[]; + let ordersActors: OrdersActors; + let ordersAssets: OrdersAssets; + let ordersPrices: OrdersPrices; + + beforeEach('Deploy IexecPocoBoostDelegate', async () => { + // We define a fixture to reuse the same setup in every test. + // We use loadFixture to run this setup once, snapshot that state, + // and reset Hardhat Network to that snapshot in every test. + // Deploy all contracts + proxyAddress = await loadHardhatFixtureDeployment(); + // Initialize test environment + await loadFixture(initFixture); + ordersActors = { + appOwner: appProvider, + datasetOwner: datasetProvider, + workerpoolOwner: scheduler, + requester: requester, + }; + iexecPocoBoostInstance = IexecPocoBoostDelegate__factory.connect(proxyAddress, owner); + iexecInstance = IexecAccessors__factory.connect(proxyAddress, anyone); + domain = { + name: 'iExecODB', + version: '5.0.0', + chainId: hre.network.config.chainId, + verifyingContract: proxyAddress, + }; + ordersAssets = { + app: appAddress, + dataset: datasetAddress, + workerpool: workerpoolAddress, + }; + ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, + }; + // initialize tee broker to address(0) + await iexecWrapper.setTeeBroker('0x0000000000000000000000000000000000000000'); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ + iexecAdmin: owner, + requester, + sponsor, + beneficiary, + appProvider, + datasetProvider, + scheduler, + worker, + enclave, + anyone, + sms: teeBroker, + } = accounts); + iexecWrapper = new IexecWrapper(proxyAddress, accounts); + ({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets()); + } + + describe('MatchOrders', function () { + it('Should match orders (TEE)', async function () { + const callbackAddress = ethers.Wallet.createRandom().address; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + beneficiary: beneficiary.address, + tag: teeDealTag, + prices: ordersPrices, + callback: callbackAddress, + }); + const { + appOrder, + datasetOrder, + workerpoolOrder, + requesterOrder: requestOrder, + } = orders.toObject(); + const dealPrice = + (appPrice + datasetPrice + workerpoolPrice) * // task price + 1; // volume + expect(await iexecInstance.balanceOf(iexecInstance.address)).to.be.equal(0); + await iexecWrapper.depositInIexecAccount(requester, dealPrice); + expect(await iexecInstance.balanceOf(requester.address)).to.be.equal(dealPrice); + expect(await iexecInstance.frozenOf(requester.address)).to.be.equal(0); + // Deposit RLC in the scheduler's account. + const schedulerStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + volume, + ); + await iexecWrapper.depositInIexecAccount(scheduler, schedulerStake); + expect(await iexecInstance.balanceOf(scheduler.address)).to.be.equal(schedulerStake); + expect(await iexecInstance.frozenOf(scheduler.address)).to.be.equal(0); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const startTime = await setNextBlockTimestamp(); + + expect( + await iexecPocoBoostInstance.callStatic.matchOrdersBoost(...orders.toArray()), + ).to.equal(dealId); + await expect(iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray())) + .to.emit(iexecPocoBoostInstance, 'SchedulerNoticeBoost') + .withArgs( + workerpoolAddress, + dealId, + appAddress, + datasetAddress, + requestOrder.category, + teeDealTag, + requestOrder.params, + beneficiary.address, + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId, + hashOrder(domain, appOrder), + hashOrder(domain, datasetOrder), + hashOrder(domain, workerpoolOrder), + hashOrder(domain, requestOrder), + volume, + ) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(requester.address, iexecPocoBoostInstance.address, dealPrice) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(requester.address, dealPrice) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(scheduler.address, iexecPocoBoostInstance.address, schedulerStake) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(scheduler.address, schedulerStake); + const deal = await viewDealBoost(dealId); + expect(deal.appOwner).to.be.equal(appProvider.address); + expect(deal.appPrice).to.be.equal(appPrice); + expect(deal.datasetOwner).to.be.equal(datasetProvider.address); + expect(deal.datasetPrice).to.be.equal(datasetPrice); + expect(deal.workerpoolOwner).to.be.equal(scheduler.address); + expect(deal.workerpoolPrice).to.be.equal(workerpoolPrice); + expect(deal.requester).to.be.equal(requester.address); + const schedulerRewardRatio = ( + await WorkerpoolInterface__factory.connect( + workerpoolAddress, + anyone, + ).m_schedulerRewardRatioPolicy() + ).toNumber(); + expect(deal.workerReward) + .to.be.equal((workerpoolPrice * (100 - schedulerRewardRatio)) / 100) + .to.be.greaterThan(0); + expect(deal.deadline).to.be.equal(startTime + 7 * 300); // Category 0 + expect(deal.botFirst).to.be.equal(0); + expect(deal.botSize).to.be.equal(1); + expect(deal.shortTag).to.be.equal('0x000001'); + expect(deal.callback).to.be.equal(callbackAddress); + expect(await iexecInstance.balanceOf(iexecInstance.address)).to.be.equal( + dealPrice + schedulerStake, + ); + expect(await iexecInstance.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(requester.address)).to.be.equal(dealPrice); + expect(await iexecInstance.balanceOf(scheduler.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(scheduler.address)).to.be.equal(schedulerStake); + }); + + it('Should match orders with pre-signatures (TEE)', async function () { + let iexecOrderManagementInstance = IexecOrderManagement__factory.connect( + proxyAddress, + anyone, + ); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = buildOrders({ + assets: ordersAssets, + requester: requester.address, + beneficiary: beneficiary.address, + tag: teeDealTag, + }).toObject(); + await iexecOrderManagementInstance.connect(appProvider).manageAppOrder({ + order: appOrder, + operation: 0, + sign: '0x', + }); + await iexecOrderManagementInstance.connect(datasetProvider).manageDatasetOrder({ + order: datasetOrder, + operation: 0, + sign: '0x', + }); + await iexecOrderManagementInstance.connect(scheduler).manageWorkerpoolOrder({ + order: workerpoolOrder, + operation: 0, + sign: '0x', + }); + await iexecOrderManagementInstance.connect(requester).manageRequestOrder({ + order: requestOrder, + operation: 0, + sign: '0x', + }); + const dealId = getDealId(domain, requestOrder, taskIndex); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ), + ) + .to.emit(iexecPocoBoostInstance, 'SchedulerNoticeBoost') + .withArgs( + workerpoolAddress, + dealId, + appAddress, + datasetAddress, + requestOrder.category, + teeDealTag, + requestOrder.params, + beneficiary.address, + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId, + hashOrder(domain, appOrder), + hashOrder(domain, datasetOrder), + hashOrder(domain, workerpoolOrder), + hashOrder(domain, requestOrder), + volume, + ); + }); + + it('Should sponsor match orders (TEE)', async function () { + const callbackAddress = ethers.Wallet.createRandom().address; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + beneficiary: beneficiary.address, + tag: teeDealTag, + prices: ordersPrices, + callback: callbackAddress, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + const dealPrice = + (appPrice + datasetPrice + workerpoolPrice) * // task price + 1; // volume + expect(await iexecInstance.balanceOf(iexecInstance.address)).to.be.equal(0); + expect(await iexecInstance.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(requester.address)).to.be.equal(0); + await iexecWrapper.depositInIexecAccount(sponsor, dealPrice); + expect(await iexecInstance.balanceOf(sponsor.address)).to.be.equal(dealPrice); + expect(await iexecInstance.frozenOf(sponsor.address)).to.be.equal(0); + // Deposit RLC in the scheduler's account. + const schedulerStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + volume, + ); + await iexecWrapper.depositInIexecAccount(scheduler, schedulerStake); + expect(await iexecInstance.balanceOf(scheduler.address)).to.be.equal(schedulerStake); + expect(await iexecInstance.frozenOf(scheduler.address)).to.be.equal(0); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const startTime = await setNextBlockTimestamp(); + + expect( + await iexecPocoBoostInstance + .connect(sponsor) + .callStatic.sponsorMatchOrdersBoost(...orders.toArray()), + ).to.equal(dealId); + await expect( + iexecPocoBoostInstance + .connect(sponsor) + .sponsorMatchOrdersBoost(...orders.toArray()), + ) + .to.emit(iexecPocoBoostInstance, 'SchedulerNoticeBoost') + .withArgs( + workerpoolAddress, + dealId, + appAddress, + datasetAddress, + requestOrder.category, + teeDealTag, + requestOrder.params, + beneficiary.address, + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId, + hashOrder(domain, appOrder), + hashOrder(domain, datasetOrder), + hashOrder(domain, workerpoolOrder), + hashOrder(domain, requestOrder), + volume, + ) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(sponsor.address, iexecPocoBoostInstance.address, dealPrice) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(sponsor.address, dealPrice) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(scheduler.address, iexecPocoBoostInstance.address, schedulerStake) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(scheduler.address, schedulerStake) + .to.emit(iexecPocoBoostInstance, 'DealSponsoredBoost') + .withArgs(dealId, sponsor.address); + const deal = await viewDealBoost(dealId); + expect(deal.appOwner).to.be.equal(appProvider.address); + expect(deal.appPrice).to.be.equal(appPrice); + expect(deal.datasetOwner).to.be.equal(datasetProvider.address); + expect(deal.datasetPrice).to.be.equal(datasetPrice); + expect(deal.workerpoolOwner).to.be.equal(scheduler.address); + expect(deal.workerpoolPrice).to.be.equal(workerpoolPrice); + expect(deal.requester).to.be.equal(requester.address); + expect(deal.sponsor).to.be.equal(sponsor.address); + const schedulerRewardRatio = ( + await WorkerpoolInterface__factory.connect( + workerpoolAddress, + anyone, + ).m_schedulerRewardRatioPolicy() + ).toNumber(); + expect(deal.workerReward) + .to.be.equal((workerpoolPrice * (100 - schedulerRewardRatio)) / 100) + .to.be.greaterThan(0); + expect(deal.deadline).to.be.equal(startTime + 7 * 300); // Category 0 + expect(deal.botFirst).to.be.equal(0); + expect(deal.botSize).to.be.equal(1); + expect(deal.shortTag).to.be.equal('0x000001'); + expect(deal.callback).to.be.equal(callbackAddress); + expect(await iexecInstance.balanceOf(iexecInstance.address)).to.be.equal( + dealPrice + schedulerStake, + ); + expect(await iexecInstance.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(requester.address)).to.be.equal(0); + expect(await iexecInstance.balanceOf(sponsor.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(sponsor.address)).to.be.equal(dealPrice); + expect(await iexecInstance.balanceOf(scheduler.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(scheduler.address)).to.be.equal(schedulerStake); + }); + }); + + describe('PushResult', function () { + it('Should push result (TEE & callback)', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + const oracleConsumerInstance = await new TestClient__factory() + .connect(anyone) + .deploy() + .then((contract) => contract.deployed()); + requestOrder.callback = oracleConsumerInstance.address; + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclave.address, + scheduler, + ); + const { resultsCallback, callbackResultDigest } = buildResultCallbackAndDigest(123); + const enclaveSignature = await buildAndSignEnclaveMessage( + worker.address, + taskId, + callbackResultDigest, + enclave, + ); + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + resultsCallback, + schedulerSignature, + enclave.address, + enclaveSignature, + ), + ) + .to.emit(iexecPocoBoostInstance, 'ResultPushedBoost') + .withArgs(dealId, taskIndex, results) + .to.emit(oracleConsumerInstance, 'GotResult') + .withArgs(taskId, resultsCallback); + expect((await iexecInstance.viewTask(taskId)).status).to.equal(3); // COMPLETED + expect(await oracleConsumerInstance.store(taskId)).to.be.equal(resultsCallback); + }); + + it('Should push result (TEE with contribution authorization signed by scheduler)', async function () { + const volume = 3; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + prices: ordersPrices, + volume: volume, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + const taskPrice = appPrice + datasetPrice + workerpoolPrice; + const dealPrice = taskPrice * volume; + await iexecWrapper.depositInIexecAccount(requester, dealPrice); + const schedulerDealStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + volume, + ); + const schedulerTaskStake = schedulerDealStake / volume; + await iexecWrapper.depositInIexecAccount(scheduler, schedulerDealStake); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclave.address, + scheduler, + ); + const enclaveSignature = await buildAndSignEnclaveMessage( + worker.address, + taskId, + resultDigest, + enclave, + ); + expect(await iexecInstance.balanceOf(iexecInstance.address)).to.be.equal( + dealPrice + schedulerDealStake, + ); + expect(await iexecInstance.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(requester.address)).to.be.equal(dealPrice); + expect(await iexecInstance.balanceOf(worker.address)).to.be.equal(0); + expect(await iexecInstance.balanceOf(appProvider.address)).to.be.equal(0); + expect(await iexecInstance.balanceOf(datasetProvider.address)).to.be.equal(0); + expect(await iexecInstance.balanceOf(scheduler.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(scheduler.address)).to.be.equal(schedulerDealStake); + const expectedWorkerReward = (await viewDealBoost(dealId)).workerReward.toNumber(); + const schedulerBaseReward = workerpoolPrice - expectedWorkerReward; + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + constants.NULL.BYTES32, + schedulerSignature, + enclave.address, + enclaveSignature, + ), + ) + .to.emit(iexecPocoBoostInstance, 'Seize') + .withArgs(requester.address, taskPrice, taskId) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecInstance.address, worker.address, expectedWorkerReward) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(worker.address, expectedWorkerReward, taskId) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecInstance.address, appProvider.address, appPrice) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(appProvider.address, appPrice, taskId) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecInstance.address, datasetProvider.address, datasetPrice) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(datasetProvider.address, datasetPrice, taskId) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecPocoBoostInstance.address, scheduler.address, schedulerTaskStake) + .to.emit(iexecPocoBoostInstance, 'Unlock') + .withArgs(scheduler.address, schedulerTaskStake) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecInstance.address, scheduler.address, schedulerBaseReward) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(scheduler.address, schedulerBaseReward, taskId) + .to.emit(iexecPocoBoostInstance, 'ResultPushedBoost') + .withArgs(dealId, taskIndex, results); + const remainingTasksToPush = volume - 1; + expect(await iexecInstance.balanceOf(iexecInstance.address)).to.be.equal( + (taskPrice + schedulerTaskStake) * remainingTasksToPush, + ); + expect(await iexecInstance.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(requester.address)).to.be.equal( + taskPrice * remainingTasksToPush, + ); + expect(await iexecInstance.balanceOf(worker.address)).to.be.equal(expectedWorkerReward); + expect(await iexecInstance.balanceOf(appProvider.address)).to.be.equal(appPrice); + expect(await iexecInstance.balanceOf(datasetProvider.address)).to.be.equal( + datasetPrice, + ); + expect(await iexecInstance.balanceOf(scheduler.address)).to.be.equal( + schedulerTaskStake + schedulerBaseReward, + ); + expect(await iexecInstance.frozenOf(scheduler.address)).to.be.equal( + schedulerTaskStake * remainingTasksToPush, + ); + //TODO: Eventually add check where scheduler is rewarded with kitty (already covered in UT) + }); + + it('Should push result (TEE with contribution authorization signed by broker)', async function () { + await iexecWrapper.setTeeBroker(teeBroker.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ); + const teeBrokerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclave.address, + teeBroker, + ); + const enclaveSignature = await buildAndSignEnclaveMessage( + worker.address, + taskId, + resultDigest, + enclave, + ); + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + constants.NULL.BYTES32, + teeBrokerSignature, + enclave.address, + enclaveSignature, + ), + ); + }); + }); + + describe('Claim', function () { + it('Should refund requester on claim of non sponsored deal (TEE)', async function () { + const expectedVolume = 3; // > 1 to explicit taskPrice vs dealPrice + const claimedTasks = 1; + const taskPrice = appPrice + datasetPrice + workerpoolPrice; + const dealPrice = taskPrice * expectedVolume; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + prices: ordersPrices, + volume: expectedVolume, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecWrapper.depositInIexecAccount(requester, dealPrice); + // Deposit RLC in the scheduler's account. + const schedulerDealStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + expectedVolume, + ); + const schedulerTaskStake = schedulerDealStake / expectedVolume; + + const kittyAddress = await iexecInstance.kitty_address(); + + await iexecWrapper.depositInIexecAccount(scheduler, schedulerDealStake); + const startTime = await setNextBlockTimestamp(); + await iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ); + expect(await iexecInstance.balanceOf(iexecInstance.address)).to.be.equal( + dealPrice + schedulerDealStake, + ); + expect(await iexecInstance.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(requester.address)).to.be.equal(dealPrice); + expect(await iexecInstance.balanceOf(scheduler.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(scheduler.address)).to.be.equal(schedulerDealStake); + expect(await iexecInstance.balanceOf(kittyAddress)).to.be.equal(0); + expect(await iexecInstance.frozenOf(kittyAddress)).to.be.equal(0); + await time.setNextBlockTimestamp(startTime + 7 * 300); + + await expect(iexecPocoBoostInstance.connect(worker).claimBoost(dealId, taskIndex)) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecPocoBoostInstance.address, requester.address, taskPrice) + .to.emit(iexecPocoBoostInstance, 'Unlock') + .withArgs(requester.address, taskPrice) + .to.emit(iexecPocoBoostInstance, 'Seize') + .withArgs(scheduler.address, schedulerTaskStake, taskId) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(kittyAddress, schedulerTaskStake, taskId) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(kittyAddress, schedulerTaskStake) + .to.emit(iexecPocoBoostInstance, 'TaskClaimed') + .withArgs(taskId); + + expect((await iexecInstance.viewTask(taskId)).status).to.equal(4); // FAILED + const remainingTasksToClaim = expectedVolume - claimedTasks; + expect(await iexecInstance.balanceOf(iexecInstance.address)).to.be.equal( + taskPrice * remainingTasksToClaim + // requester has 2nd & 3rd task locked + schedulerDealStake, // kitty value since 1st task seized + ); + // 2nd & 3rd tasks can still be claimed. + expect(await iexecInstance.balanceOf(requester.address)).to.be.equal( + taskPrice * claimedTasks, + ); + expect(await iexecInstance.frozenOf(requester.address)).to.be.equal( + taskPrice * remainingTasksToClaim, + ); + expect(await iexecInstance.balanceOf(scheduler.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(scheduler.address)).to.be.equal( + schedulerTaskStake * remainingTasksToClaim, + ); + expect(await iexecInstance.balanceOf(kittyAddress)).to.be.equal(0); + expect(await iexecInstance.frozenOf(kittyAddress)).to.be.equal( + schedulerTaskStake * claimedTasks, + ); + }); + + it('Should refund sponsor on claim of a sponsored deal (TEE)', async function () { + const expectedVolume = 3; // > 1 to explicit taskPrice vs dealPrice + const claimedTasks = 1; + const taskPrice = appPrice + datasetPrice + workerpoolPrice; + const dealPrice = taskPrice * expectedVolume; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + prices: ordersPrices, + volume: expectedVolume, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecWrapper.depositInIexecAccount(sponsor, dealPrice); + // Deposit RLC in the scheduler's account. + const schedulerDealStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + expectedVolume, + ); + const schedulerTaskStake = schedulerDealStake / expectedVolume; + + const kittyAddress = await iexecInstance.kitty_address(); + + await iexecWrapper.depositInIexecAccount(scheduler, schedulerDealStake); + const startTime = await setNextBlockTimestamp(); + await iexecPocoBoostInstance + .connect(sponsor) + .sponsorMatchOrdersBoost(appOrder, datasetOrder, workerpoolOrder, requestOrder); + expect(await iexecInstance.balanceOf(iexecInstance.address)).to.be.equal( + dealPrice + schedulerDealStake, + ); + expect(await iexecInstance.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(requester.address)).to.be.equal(0); + expect(await iexecInstance.balanceOf(sponsor.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(sponsor.address)).to.be.equal(dealPrice); + expect(await iexecInstance.balanceOf(scheduler.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(scheduler.address)).to.be.equal(schedulerDealStake); + expect(await iexecInstance.balanceOf(kittyAddress)).to.be.equal(0); + expect(await iexecInstance.frozenOf(kittyAddress)).to.be.equal(0); + await time.setNextBlockTimestamp(startTime + 7 * 300); + + await expect(iexecPocoBoostInstance.connect(anyone).claimBoost(dealId, taskIndex)) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecPocoBoostInstance.address, sponsor.address, taskPrice) + .to.emit(iexecPocoBoostInstance, 'Unlock') + .withArgs(sponsor.address, taskPrice) + .to.emit(iexecPocoBoostInstance, 'Seize') + .withArgs(scheduler.address, schedulerTaskStake, taskId) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(kittyAddress, schedulerTaskStake, taskId) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(kittyAddress, schedulerTaskStake) + .to.emit(iexecPocoBoostInstance, 'TaskClaimed') + .withArgs(taskId); + + expect((await iexecInstance.viewTask(taskId)).status).to.equal(4); // FAILED + const remainingTasksToClaim = expectedVolume - claimedTasks; + expect(await iexecInstance.balanceOf(iexecInstance.address)).to.be.equal( + taskPrice * remainingTasksToClaim + // sponsor has 2nd & 3rd task locked + schedulerDealStake, // kitty value since 1st task seized + ); + expect(await iexecInstance.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(requester.address)).to.be.equal(0); + // 2nd & 3rd tasks can still be claimed. + expect(await iexecInstance.balanceOf(sponsor.address)).to.be.equal( + taskPrice * claimedTasks, + ); + expect(await iexecInstance.frozenOf(sponsor.address)).to.be.equal( + taskPrice * remainingTasksToClaim, + ); + expect(await iexecInstance.balanceOf(scheduler.address)).to.be.equal(0); + expect(await iexecInstance.frozenOf(scheduler.address)).to.be.equal( + schedulerTaskStake * remainingTasksToClaim, + ); + expect(await iexecInstance.balanceOf(kittyAddress)).to.be.equal(0); + expect(await iexecInstance.frozenOf(kittyAddress)).to.be.equal( + schedulerTaskStake * claimedTasks, + ); + }); + }); + + async function viewDealBoost(dealId: string) { + return await IexecPocoBoostAccessorsDelegate__factory.connect( + iexecPocoBoostInstance.address, + anyone, + ).viewDealBoost(dealId); + } +}); diff --git a/test/000_fullchain.js b/test/000_fullchain.js index 7e831cc26..e158fee40 100644 --- a/test/000_fullchain.js +++ b/test/000_fullchain.js @@ -1,781 +1,1123 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../config/config.json").chains.default; +var DEPLOYMENT = require('../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../utils/tools"); -const enstools = require("../utils/ens-tools"); -const odbtools = require("../utils/odb-tools"); -const constants = require("../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../utils/tools'); +const enstools = require('../utils/ens-tools'); +const odbtools = require('../utils/odb-tools'); +const constants = require('../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Fullchain', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - var dealid = null; - var taskid = null; - - var authorizations = {}; - var secrets = {}; - var results = {}; - var consensus = null; - var workers = []; - - var gasReceipt = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain() - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - trusttarget = 4; - workers = [ - { agent: worker1, useenclave: true, result: "iExec the wanderer" }, - { agent: worker2, useenclave: false, result: "iExec the wanderer" }, - ]; - consensus = "iExec the wanderer"; - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, appProvider.address); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, datasetProvider.address); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, scheduler.address); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - txMined = await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - events = tools.extractEvents(txMined, WorkerpoolInstance.address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, // CHANGE FOR BOT - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - txMined = await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - gasReceipt.push([ "matchOrders", txMined.receipt.gasUsed ]); - - dealid = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 0 }, - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, dealid ); - - events = tools.extractEvents(txMined, IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, dealid ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 1 ); - }); - - describe("checks", async () => { - it("deal", async () => { - deal = await IexecInstance.viewDeal(dealid); - assert.equal ( deal.app.pointer, AppInstance.address, "check deal (deal.app.pointer)" ); - assert.equal ( deal.app.owner, appProvider.address, "check deal (deal.app.owner)" ); - assert.equal (Number(deal.app.price ), apporder.appprice, "check deal (deal.app.price)" ); - assert.equal ( deal.app.pointer, requestorder.app, "check deal (deal.app.pointer)" ); - assert.isAtMost (Number(deal.app.price ), requestorder.appmaxprice, "check deal (deal.app.price)" ); - assert.equal ( deal.dataset.pointer, DatasetInstance.address, "check deal (deal.dataset.pointer)" ); - assert.equal ( deal.dataset.owner, datasetProvider.address, "check deal (deal.dataset.owner)" ); - assert.equal (Number(deal.dataset.price ), datasetorder.datasetprice, "check deal (deal.dataset.price)" ); - assert.equal ( deal.dataset.pointer, requestorder.dataset, "check deal (deal.dataset.pointer)" ); - assert.isAtMost (Number(deal.dataset.price ), requestorder.datasetmaxprice, "check deal (deal.dataset.price)" ); - assert.equal ( deal.workerpool.pointer, WorkerpoolInstance.address, "check deal (deal.workerpool.pointer)" ); - assert.equal ( deal.workerpool.owner, scheduler.address, "check deal (deal.workerpool.owner)" ); - assert.equal (Number(deal.workerpool.price ), workerpoolorder.workerpoolprice, "check deal (deal.workerpool.price)" ); - if( requestorder.workerpool != constants.NULL.ADDRESS) - assert.equal ( deal.workerpool.pointer, requestorder.workerpool, "check deal (deal.workerpool.pointer)" ); - assert.isAtMost (Number(deal.workerpool.price ), requestorder.workerpoolmaxprice, "check deal (deal.workerpool.price)" ); - assert.equal (Number(deal.trust ), workerpoolorder.trust, "check deal (deal.trust)" ); - assert.isAtLeast(Number(deal.trust ), requestorder.trust, "check deal (deal.trust)" ); - assert.equal (Number(deal.category ), workerpoolorder.category, "check deal (deal.category)" ); - assert.equal (Number(deal.category ), requestorder.category, "check deal (deal.category)" ); - assert.equal (Number(deal.tag ), workerpoolorder.tag, "check deal (deal.tag)" ); - assert.equal (Number(deal.tag ), requestorder.tag, "check deal (deal.tag)" ); - assert.equal ( deal.requester, user.address, "check deal (deal.requester)" ); - assert.equal ( deal.beneficiary, user.address, "check deal (deal.beneficiary)" ); - assert.equal ( deal.callback, requestorder.callback, "check deal (deal.callback)" ); - assert.equal ( deal.params, requestorder.params, "check deal (deal.params)" ); - assert.isAbove (Number(deal.startTime ), 0, "check deal (deal.start)" ); - assert.equal (Number(deal.botFirst ), 0, "check deal (deal.botFirst)" ); - assert.equal (Number(deal.botSize ), 1, "check deal (deal.botSize)" ); - assert.equal (Number(deal.workerStake ), 8, "check deal (deal.workerStake)" ); // 8 = floor(25*.3) - assert.equal (Number(deal.schedulerRewardRatio), 5, "check deal (deal.schedulerRewardRatio)"); - }); - - it("balances", async () => { - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 993, 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 29 ], "check balance"); - }); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize", async () => { - txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - taskid = web3.utils.soliditySha3({ t: 'bytes32', v: dealid }, { t: 'uint256', v: 0 }); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(taskid); - assert.equal ( task.status, constants.TaskStatusEnum.ACTIVE ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.equal (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, constants.NULL.BYTES32 ); - assert.equal (Number(task.revealCounter), 0 ); - assert.equal (Number(task.winnerCounter), 0 ); - assert.deepEqual( task.contributors, [] ); - }); - - it("balances", async () => { - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 993, 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 29 ], "check balance"); - }); - }); - }); - - describe("[3] contribute", async () => { - it("authorization signature", async () => { - for (w of workers) - { - const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); - const [ auth, secret ] = w.useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - authorizations[w.agent.address] = auth; - secrets[w.agent.address] = secret; - } - }); - - it("run", async () => { - consensus = odbtools.utils.hashConsensus(taskid, consensus); - for (w of workers) - { - results[w.agent.address] = await w.agent.run(authorizations[w.agent.address], secrets[w.agent.address], w.result); - } - }); - - describe("worker 1", async () => { - it("[TX] contribute", async () => { - w = workers[0] - // for (w of workers) - { - txMined = await IexecInstance.contribute( - authorizations[w.agent.address].taskid, // task (authorization) - results [w.agent.address].hash, // common (result) - results [w.agent.address].seal, // unique (result) - authorizations[w.agent.address].enclave, // address (enclave) - results [w.agent.address].sign, // signature (enclave) - authorizations[w.agent.address].sign, // signature (authorization) - { from: w.agent.address } - ); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.hash, results[w.agent.address].hash ); - } - }); - describe("checks", async () => { - it("contribution", async () => { - w = workers[0] - // for (w of workers) - { - contribution = await IexecInstance.viewContribution(taskid, w.agent.address); - assert.equal(contribution.status, constants.ContributionStatusEnum.CONTRIBUTED, "check contribution (contribution.status)" ); - assert.equal(contribution.resultHash, results[w.agent.address].hash, "check contribution (contribution.resultHash)" ); - assert.equal(contribution.resultSeal, results[w.agent.address].seal, "check contribution (contribution.resultSeal)" ); - assert.equal(contribution.enclaveChallenge, authorizations[w.agent.address].enclave, "check contribution (contribution.enclaveChallenge)"); - } - }); - }); - - it("task", async () => { - task = await IexecInstance.viewTask(taskid); - assert.equal ( task.status, constants.TaskStatusEnum.ACTIVE ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.equal (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, constants.NULL.BYTES32 ); - assert.equal (Number(task.revealCounter), 0 ); - assert.equal (Number(task.winnerCounter), 0 ); - assert.deepEqual( task.contributors.map(a => a), [ workers[0].agent.address ] ); - }); - - it("balances", async () => { - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 993, 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 992, 8 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 29 ], "check balance"); - }); - }); - - describe("worker 2 - TEE", async () => { - it("[TX] contribute", async () => { - w = workers[1] - // for (w of workers) - { - txMined = await IexecInstance.contribute( - authorizations[w.agent.address].taskid, // task (authorization) - results [w.agent.address].hash, // common (result) - results [w.agent.address].seal, // unique (result) - authorizations[w.agent.address].enclave, // address (enclave) - results [w.agent.address].sign, // signature (enclave) - authorizations[w.agent.address].sign, // signature (authorization) - { from: w.agent.address } - ); - gasReceipt.push([ "contribute (TEE)", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.hash, results[w.agent.address].hash ); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskConsensus"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.consensus, consensus.hash); - } - }); - describe("checks", async () => { - it("contribution", async () => { - w = workers[1] - // for (w of workers) - { - contribution = await IexecInstance.viewContribution(taskid, w.agent.address); - assert.equal(contribution.status, constants.ContributionStatusEnum.CONTRIBUTED, "check contribution (contribution.status)" ); - assert.equal(contribution.resultHash, results[w.agent.address].hash, "check contribution (contribution.resultHash)" ); - assert.equal(contribution.resultSeal, results[w.agent.address].seal, "check contribution (contribution.resultSeal)" ); - assert.equal(contribution.enclaveChallenge, authorizations[w.agent.address].enclave, "check contribution (contribution.enclaveChallenge)"); - } - }); - }); - - it("task", async () => { - task = await IexecInstance.viewTask(taskid); - assert.equal ( task.status, constants.TaskStatusEnum.REVEALING ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, consensus.hash ); - assert.equal (Number(task.revealCounter), 0 ); - assert.equal (Number(task.winnerCounter), workers.length ); - assert.deepEqual( task.contributors.map(a => a), workers.map(w => w.agent.address) ); - }); - - it("balances", async () => { - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 993, 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 992, 8 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 992, 8 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 29 ], "check balance"); - }); - }); - }); - - describe("[4] reveal", async () => { - it("[TX] reveal", async () => { - for (w of workers) - if (results[w.agent.address].hash == consensus.hash) - { - txMined = await IexecInstance.reveal( - taskid, - results[w.agent.address].digest, - { from: w.agent.address } - ); - gasReceipt.push([ "reveal", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReveal"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.digest, results[w.agent.address].digest); - } - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(taskid); - assert.equal ( task.status, constants.TaskStatusEnum.REVEALING ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, consensus.hash ); - assert.equal (Number(task.revealCounter), workers.length ); - assert.equal (Number(task.winnerCounter), workers.length ); - assert.deepEqual( task.contributors.map(a => a), workers.map(w => w.agent.address) ); - }); - - it("balances", async () => { - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 993, 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 992, 8 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 992, 8 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 29 ], "check balance"); - }); - }); - }); - - describe("[5] finalization", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - taskid, - web3.utils.utf8ToHex("aResult"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult")); - - // TODO: check 2 events by w.address for w in workers - // How to retreive events from the IexecClerk (5 rewards and 1 seize) - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, consensus.hash ); - assert.equal (Number(task.revealCounter), workers.length ); - assert.equal (Number(task.winnerCounter), workers.length ); - assert.deepEqual( task.contributors.map(a => a), workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await datasetProvider.viewAccount(), [ 1, 0 ], "check balance"); - assert.deepEqual(await appProvider.viewAccount(), [ 3, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1003, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1011, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1011, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 0 ], "check balance"); - }); - }); - }); - }); - - describe("โ†’ summary", async () => { - it("balances", async () => { - assert.deepEqual(await datasetProvider.viewAccount(), [ 1, 0 ], "check balance"); - assert.deepEqual(await appProvider.viewAccount(), [ 3, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1003, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1011, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1011, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 0 ], "check balance"); - }); - - it("balances - extra", async () => { - assert.equal( - Number(await IexecInstance.totalSupply()), - DEPLOYMENT.asset == "Native" - ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 - : Number(await RLCInstance.balanceOf(IexecInstance.address)) - ); - - for (agent of [ datasetProvider, appProvider, scheduler, worker1, worker2, worker3, worker4, worker5, user ]) - { - assert.deepEqual(await agent.viewAccount(), [ Number(await IexecInstance.balanceOf(agent.address)), Number(await IexecInstance.frozenOf(agent.address)) ], "check balance"); - } - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 1, "score issue"); - assert.equal(await worker2.viewScore(), 1, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - - it("gas used", async () => { - totalgas = 0; - for ([descr, gas] of gasReceipt) - { - console.log(`${descr.padEnd(20, " ")} ${gas.toString().padStart(8, " ")}`); - totalgas += gas; - } - console.log(`${"Total gas".padEnd(20, " ")} ${totalgas.toString().padStart(8, " ")}`); - }); - }); - + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + var dealid = null; + var taskid = null; + + var authorizations = {}; + var secrets = {}; + var results = {}; + var consensus = null; + var workers = []; + + var gasReceipt = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + + trusttarget = 4; + workers = [ + { agent: worker1, useenclave: true, result: 'iExec the wanderer' }, + { agent: worker2, useenclave: false, result: 'iExec the wanderer' }, + ]; + consensus = 'iExec the wanderer'; + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + assert.equal(events[0].args.from, constants.NULL.ADDRESS); + assert.equal(events[0].args.to, appProvider.address); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + assert.equal(events[0].args.from, constants.NULL.ADDRESS); + assert.equal(events[0].args.to, datasetProvider.address); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + assert.equal(events[0].args.from, constants.NULL.ADDRESS); + assert.equal(events[0].args.to, scheduler.address); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + txMined = await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolInstance.address, + 'PolicyUpdate', + ); + assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); + assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); + assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); + assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, // CHANGE FOR BOT + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { from: user.address }, + ); + gasReceipt.push(['matchOrders', txMined.receipt.gasUsed]); + + dealid = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, dealid); + + events = tools.extractEvents(txMined, IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, dealid); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 1); + }); + + describe('checks', async () => { + it('deal', async () => { + deal = await IexecInstance.viewDeal(dealid); + assert.equal( + deal.app.pointer, + AppInstance.address, + 'check deal (deal.app.pointer)', + ); + assert.equal( + deal.app.owner, + appProvider.address, + 'check deal (deal.app.owner)', + ); + assert.equal( + Number(deal.app.price), + apporder.appprice, + 'check deal (deal.app.price)', + ); + assert.equal( + deal.app.pointer, + requestorder.app, + 'check deal (deal.app.pointer)', + ); + assert.isAtMost( + Number(deal.app.price), + requestorder.appmaxprice, + 'check deal (deal.app.price)', + ); + assert.equal( + deal.dataset.pointer, + DatasetInstance.address, + 'check deal (deal.dataset.pointer)', + ); + assert.equal( + deal.dataset.owner, + datasetProvider.address, + 'check deal (deal.dataset.owner)', + ); + assert.equal( + Number(deal.dataset.price), + datasetorder.datasetprice, + 'check deal (deal.dataset.price)', + ); + assert.equal( + deal.dataset.pointer, + requestorder.dataset, + 'check deal (deal.dataset.pointer)', + ); + assert.isAtMost( + Number(deal.dataset.price), + requestorder.datasetmaxprice, + 'check deal (deal.dataset.price)', + ); + assert.equal( + deal.workerpool.pointer, + WorkerpoolInstance.address, + 'check deal (deal.workerpool.pointer)', + ); + assert.equal( + deal.workerpool.owner, + scheduler.address, + 'check deal (deal.workerpool.owner)', + ); + assert.equal( + Number(deal.workerpool.price), + workerpoolorder.workerpoolprice, + 'check deal (deal.workerpool.price)', + ); + if (requestorder.workerpool != constants.NULL.ADDRESS) + assert.equal( + deal.workerpool.pointer, + requestorder.workerpool, + 'check deal (deal.workerpool.pointer)', + ); + assert.isAtMost( + Number(deal.workerpool.price), + requestorder.workerpoolmaxprice, + 'check deal (deal.workerpool.price)', + ); + assert.equal( + Number(deal.trust), + workerpoolorder.trust, + 'check deal (deal.trust)', + ); + assert.isAtLeast( + Number(deal.trust), + requestorder.trust, + 'check deal (deal.trust)', + ); + assert.equal( + Number(deal.category), + workerpoolorder.category, + 'check deal (deal.category)', + ); + assert.equal( + Number(deal.category), + requestorder.category, + 'check deal (deal.category)', + ); + assert.equal(Number(deal.tag), workerpoolorder.tag, 'check deal (deal.tag)'); + assert.equal(Number(deal.tag), requestorder.tag, 'check deal (deal.tag)'); + assert.equal(deal.requester, user.address, 'check deal (deal.requester)'); + assert.equal(deal.beneficiary, user.address, 'check deal (deal.beneficiary)'); + assert.equal( + deal.callback, + requestorder.callback, + 'check deal (deal.callback)', + ); + assert.equal(deal.params, requestorder.params, 'check deal (deal.params)'); + assert.isAbove(Number(deal.startTime), 0, 'check deal (deal.start)'); + assert.equal(Number(deal.botFirst), 0, 'check deal (deal.botFirst)'); + assert.equal(Number(deal.botSize), 1, 'check deal (deal.botSize)'); + assert.equal(Number(deal.workerStake), 8, 'check deal (deal.workerStake)'); // 8 = floor(25*.3) + assert.equal( + Number(deal.schedulerRewardRatio), + 5, + 'check deal (deal.schedulerRewardRatio)', + ); + assert.equal(deal.sponsor, user.address); + }); + + it('balances', async () => { + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [993, 7], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 29], 'check balance'); + }); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize', async () => { + txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + taskid = web3.utils.soliditySha3( + { t: 'bytes32', v: dealid }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(taskid); + assert.equal(task.status, constants.TaskStatusEnum.ACTIVE); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.equal(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, constants.NULL.BYTES32); + assert.equal(Number(task.revealCounter), 0); + assert.equal(Number(task.winnerCounter), 0); + assert.deepEqual(task.contributors, []); + }); + + it('balances', async () => { + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [993, 7], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 29], 'check balance'); + }); + }); + }); + + describe('[3] contribute', async () => { + it('authorization signature', async () => { + for (w of workers) { + const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); + const [auth, secret] = w.useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + authorizations[w.agent.address] = auth; + secrets[w.agent.address] = secret; + } + }); + + it('run', async () => { + consensus = odbtools.utils.hashConsensus(taskid, consensus); + for (w of workers) { + results[w.agent.address] = await w.agent.run( + authorizations[w.agent.address], + secrets[w.agent.address], + w.result, + ); + } + }); + + describe('worker 1', async () => { + it('[TX] contribute', async () => { + w = workers[0]; + // for (w of workers) + { + txMined = await IexecInstance.contribute( + authorizations[w.agent.address].taskid, // task (authorization) + results[w.agent.address].hash, // common (result) + results[w.agent.address].seal, // unique (result) + authorizations[w.agent.address].enclave, // address (enclave) + results[w.agent.address].sign, // signature (enclave) + authorizations[w.agent.address].sign, // signature (authorization) + { from: w.agent.address }, + ); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + + events = tools.extractEvents( + txMined, + IexecInstance.address, + 'TaskContribute', + ); + assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.hash, results[w.agent.address].hash); + } + }); + describe('checks', async () => { + it('contribution', async () => { + w = workers[0]; + // for (w of workers) + { + contribution = await IexecInstance.viewContribution( + taskid, + w.agent.address, + ); + assert.equal( + contribution.status, + constants.ContributionStatusEnum.CONTRIBUTED, + 'check contribution (contribution.status)', + ); + assert.equal( + contribution.resultHash, + results[w.agent.address].hash, + 'check contribution (contribution.resultHash)', + ); + assert.equal( + contribution.resultSeal, + results[w.agent.address].seal, + 'check contribution (contribution.resultSeal)', + ); + assert.equal( + contribution.enclaveChallenge, + authorizations[w.agent.address].enclave, + 'check contribution (contribution.enclaveChallenge)', + ); + } + }); + }); + + it('task', async () => { + task = await IexecInstance.viewTask(taskid); + assert.equal(task.status, constants.TaskStatusEnum.ACTIVE); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.equal(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, constants.NULL.BYTES32); + assert.equal(Number(task.revealCounter), 0); + assert.equal(Number(task.winnerCounter), 0); + assert.deepEqual( + task.contributors.map((a) => a), + [workers[0].agent.address], + ); + }); + + it('balances', async () => { + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [993, 7], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [992, 8], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 29], 'check balance'); + }); + }); + + describe('worker 2 - TEE', async () => { + it('[TX] contribute', async () => { + w = workers[1]; + // for (w of workers) + { + txMined = await IexecInstance.contribute( + authorizations[w.agent.address].taskid, // task (authorization) + results[w.agent.address].hash, // common (result) + results[w.agent.address].seal, // unique (result) + authorizations[w.agent.address].enclave, // address (enclave) + results[w.agent.address].sign, // signature (enclave) + authorizations[w.agent.address].sign, // signature (authorization) + { from: w.agent.address }, + ); + gasReceipt.push(['contribute (TEE)', txMined.receipt.gasUsed]); + + events = tools.extractEvents( + txMined, + IexecInstance.address, + 'TaskContribute', + ); + assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.hash, results[w.agent.address].hash); + + events = tools.extractEvents( + txMined, + IexecInstance.address, + 'TaskConsensus', + ); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.consensus, consensus.hash); + } + }); + describe('checks', async () => { + it('contribution', async () => { + w = workers[1]; + // for (w of workers) + { + contribution = await IexecInstance.viewContribution( + taskid, + w.agent.address, + ); + assert.equal( + contribution.status, + constants.ContributionStatusEnum.CONTRIBUTED, + 'check contribution (contribution.status)', + ); + assert.equal( + contribution.resultHash, + results[w.agent.address].hash, + 'check contribution (contribution.resultHash)', + ); + assert.equal( + contribution.resultSeal, + results[w.agent.address].seal, + 'check contribution (contribution.resultSeal)', + ); + assert.equal( + contribution.enclaveChallenge, + authorizations[w.agent.address].enclave, + 'check contribution (contribution.enclaveChallenge)', + ); + } + }); + }); + + it('task', async () => { + task = await IexecInstance.viewTask(taskid); + assert.equal(task.status, constants.TaskStatusEnum.REVEALING); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, consensus.hash); + assert.equal(Number(task.revealCounter), 0); + assert.equal(Number(task.winnerCounter), workers.length); + assert.deepEqual( + task.contributors.map((a) => a), + workers.map((w) => w.agent.address), + ); + }); + + it('balances', async () => { + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [993, 7], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [992, 8], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [992, 8], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 29], 'check balance'); + }); + }); + }); + + describe('[4] reveal', async () => { + it('[TX] reveal', async () => { + for (w of workers) + if (results[w.agent.address].hash == consensus.hash) { + txMined = await IexecInstance.reveal( + taskid, + results[w.agent.address].digest, + { from: w.agent.address }, + ); + gasReceipt.push(['reveal', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskReveal'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.digest, results[w.agent.address].digest); + } + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(taskid); + assert.equal(task.status, constants.TaskStatusEnum.REVEALING); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, consensus.hash); + assert.equal(Number(task.revealCounter), workers.length); + assert.equal(Number(task.winnerCounter), workers.length); + assert.deepEqual( + task.contributors.map((a) => a), + workers.map((w) => w.agent.address), + ); + }); + + it('balances', async () => { + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [993, 7], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [992, 8], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [992, 8], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 29], 'check balance'); + }); + }); + }); + + describe('[5] finalization', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + taskid, + web3.utils.utf8ToHex('aResult'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult')); + + // TODO: check 2 events by w.address for w in workers + // How to retreive events from the IexecClerk (5 rewards and 1 seize) + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, consensus.hash); + assert.equal(Number(task.revealCounter), workers.length); + assert.equal(Number(task.winnerCounter), workers.length); + assert.deepEqual( + task.contributors.map((a) => a), + workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual(await datasetProvider.viewAccount(), [1, 0], 'check balance'); + assert.deepEqual(await appProvider.viewAccount(), [3, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1003, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1011, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1011, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 0], 'check balance'); + }); + }); + }); + }); + + describe('โ†’ summary', async () => { + it('balances', async () => { + assert.deepEqual(await datasetProvider.viewAccount(), [1, 0], 'check balance'); + assert.deepEqual(await appProvider.viewAccount(), [3, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1003, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1011, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1011, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 0], 'check balance'); + }); + + it('balances - extra', async () => { + assert.equal( + Number(await IexecInstance.totalSupply()), + DEPLOYMENT.asset == 'Native' + ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 + : Number(await RLCInstance.balanceOf(IexecInstance.address)), + ); + + for (agent of [ + datasetProvider, + appProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + worker5, + user, + ]) { + assert.deepEqual( + await agent.viewAccount(), + [ + Number(await IexecInstance.balanceOf(agent.address)), + Number(await IexecInstance.frozenOf(agent.address)), + ], + 'check balance', + ); + } + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 1, 'score issue'); + assert.equal(await worker2.viewScore(), 1, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + + it('gas used', async () => { + totalgas = 0; + for ([descr, gas] of gasReceipt) { + console.log(`${descr.padEnd(20, ' ')} ${gas.toString().padStart(8, ' ')}`); + totalgas += gas; + } + console.log(`${'Total gas'.padEnd(20, ' ')} ${totalgas.toString().padStart(8, ' ')}`); + }); + }); }); diff --git a/test/000_fullchain.test.ts b/test/000_fullchain.test.ts new file mode 100644 index 000000000..e187d1c87 --- /dev/null +++ b/test/000_fullchain.test.ts @@ -0,0 +1,168 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { TypedDataDomain } from 'ethers'; +import hre, { ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../scripts/hardhat-fixture-deployer'; +import { IexecAccessors, IexecAccessors__factory, IexecPocoAccessors__factory } from '../typechain'; +import { IexecPoco1 } from '../typechain/contracts/modules/interfaces/IexecPoco1.v8.sol'; +import { IexecPoco1__factory } from '../typechain/factories/contracts/modules/interfaces/IexecPoco1.v8.sol'; +import { + OrdersActors, + OrdersAssets, + OrdersPrices, + buildOrders, + signOrders, +} from '../utils/createOrders'; +import { getDealId, getIexecAccounts } from '../utils/poco-tools'; +import { IexecWrapper } from './utils/IexecWrapper'; + +const teeDealTag = '0x0000000000000000000000000000000000000000000000000000000000000001'; +const taskIndex = 0; +const volume = taskIndex + 1; +const appPrice = 1000; +const datasetPrice = 1_000_000; +const workerpoolPrice = 1_000_000_000; + +/* + * TODO make this a real integration test (match, contribute, ..., finalize). + */ + +describe('IexecPoco (IT)', function () { + let domain: TypedDataDomain; + let proxyAddress: string; + let iexecAccessor: IexecAccessors; + let iexecPoco: IexecPoco1; + let iexecWrapper: IexecWrapper; + let [appAddress, workerpoolAddress, datasetAddress]: string[] = []; + let [ + iexecAdmin, + requester, + sponsor, + beneficiary, + appProvider, + datasetProvider, + scheduler, + anyone, + ]: SignerWithAddress[] = []; + let ordersActors: OrdersActors; + let ordersAssets: OrdersAssets; + let ordersPrices: OrdersPrices; + + beforeEach('Deploy', async () => { + // Deploy all contracts + proxyAddress = await loadHardhatFixtureDeployment(); + // Initialize test environment + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ + iexecAdmin, + requester, + sponsor, + beneficiary, + appProvider, + datasetProvider, + scheduler, + anyone, + } = accounts); + iexecWrapper = new IexecWrapper(proxyAddress, accounts); + ({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets()); + await iexecWrapper.setTeeBroker('0x0000000000000000000000000000000000000000'); + iexecPoco = IexecPoco1__factory.connect(proxyAddress, iexecAdmin); + iexecAccessor = IexecAccessors__factory.connect(proxyAddress, anyone); + ordersActors = { + appOwner: appProvider, + datasetOwner: datasetProvider, + workerpoolOwner: scheduler, + requester: requester, + }; + domain = { + name: 'iExecODB', + version: '5.0.0', + chainId: hre.network.config.chainId, + verifyingContract: proxyAddress, + }; + ordersAssets = { + app: appAddress, + dataset: datasetAddress, + workerpool: workerpoolAddress, + }; + ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, + }; + } + + describe('MatchOrders', function () { + it('Should sponsor match orders (TEE)', async function () { + const callbackAddress = ethers.Wallet.createRandom().address; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + beneficiary: beneficiary.address, + tag: teeDealTag, + prices: ordersPrices, + callback: callbackAddress, + }); + const dealPrice = + (appPrice + datasetPrice + workerpoolPrice) * // task price + volume; + expect(await iexecAccessor.balanceOf(proxyAddress)).to.be.equal(0); + await iexecWrapper.depositInIexecAccount(sponsor, dealPrice); + expect(await iexecAccessor.balanceOf(sponsor.address)).to.be.equal(dealPrice); + expect(await iexecAccessor.frozenOf(sponsor.address)).to.be.equal(0); + expect(await iexecAccessor.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecAccessor.frozenOf(requester.address)).to.be.equal(0); + // Deposit RLC in the scheduler's account. + const schedulerStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + volume, + ); + await iexecWrapper.depositInIexecAccount(scheduler, schedulerStake); + expect(await iexecAccessor.balanceOf(scheduler.address)).to.be.equal(schedulerStake); + expect(await iexecAccessor.frozenOf(scheduler.address)).to.be.equal(0); + await signOrders(domain, orders, ordersActors); + const { appOrderHash, datasetOrderHash, workerpoolOrderHash, requestOrderHash } = + iexecWrapper.hashOrders(orders); + const dealId = getDealId(domain, orders.requester, taskIndex); + expect( + await IexecPocoAccessors__factory.connect(proxyAddress, anyone).computeDealVolume( + ...orders.toArray(), + ), + ).to.equal(volume); + + expect( + await iexecPoco.connect(sponsor).callStatic.sponsorMatchOrders(...orders.toArray()), + ).to.equal(dealId); + await expect(iexecPoco.connect(sponsor).sponsorMatchOrders(...orders.toArray())) + .to.emit(iexecPoco, 'OrdersMatched') + .withArgs( + dealId, + appOrderHash, + datasetOrderHash, + workerpoolOrderHash, + requestOrderHash, + volume, + ) + .to.emit(iexecPoco, 'DealSponsored') + .withArgs(dealId, sponsor.address); + expect(await iexecAccessor.balanceOf(proxyAddress)).to.be.equal( + dealPrice + schedulerStake, + ); + expect(await iexecAccessor.balanceOf(sponsor.address)).to.be.equal(0); + expect(await iexecAccessor.frozenOf(sponsor.address)).to.be.equal(dealPrice); + expect(await iexecAccessor.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecAccessor.frozenOf(requester.address)).to.be.equal(0); + expect(await iexecAccessor.balanceOf(scheduler.address)).to.be.equal(0); + expect(await iexecAccessor.frozenOf(scheduler.address)).to.be.equal(schedulerStake); + const deal = await iexecAccessor.viewDeal(dealId); + expect(deal.sponsor).to.be.equal(sponsor.address); + }); + }); +}); diff --git a/test/001_fullchain-1workers.js b/test/001_fullchain-1workers.js index cf181e5c0..90853dbf8 100644 --- a/test/001_fullchain-1workers.js +++ b/test/001_fullchain-1workers.js @@ -1,542 +1,725 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../config/config.json").chains.default; +var DEPLOYMENT = require('../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../utils/tools"); -const enstools = require("../utils/ens-tools"); -const odbtools = require("../utils/odb-tools"); -const constants = require("../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../utils/tools'); +const enstools = require('../utils/ens-tools'); +const odbtools = require('../utils/odb-tools'); +const constants = require('../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Fullchain', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - var dealid = null; - var taskid = null; - - var authorizations = {}; - var secrets = {}; - var results = {}; - var consensus = null; - var workers = []; - - var gasReceipt = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - trusttarget = 0; - workers = [ - { agent: worker1, useenclave: true, result: "iExec the wanderer" }, - ]; - consensus = "iExec the wanderer"; - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - txMined = await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - events = tools.extractEvents(txMined, WorkerpoolInstance.address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, // CHANGE FOR BOT - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - txMined = await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - gasReceipt.push([ "matchOrders", txMined.receipt.gasUsed ]); - - dealid = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 0 }, - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, dealid ); - - events = tools.extractEvents(txMined, IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, dealid ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 1 ); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize", async () => { - txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - taskid = web3.utils.soliditySha3({ t: 'bytes32', v: dealid }, { t: 'uint256', v: 0 }); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - }); - }); - - describe("[3] contribute", async () => { - it("authorization signature", async () => { - for (w of workers) - { - const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); - const [ auth, secret ] = w.useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - authorizations[w.agent.address] = auth; - secrets[w.agent.address] = secret; - } - }); - - it("run", async () => { - consensus = odbtools.utils.hashConsensus(taskid, consensus); - for (w of workers) - { - results[w.agent.address] = await w.agent.run(authorizations[w.agent.address], secrets[w.agent.address], w.result); - } - }); - - it("[TX] contribute", async () => { - for (w of workers) - { - txMined = await IexecInstance.contribute( - authorizations[w.agent.address].taskid, // task (authorization) - results [w.agent.address].hash, // common (result) - results [w.agent.address].seal, // unique (result) - authorizations[w.agent.address].enclave, // address (enclave) - results [w.agent.address].sign, // signature (enclave) - authorizations[w.agent.address].sign, // signature (authorization) - { from: w.agent.address } - ); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.hash, results[w.agent.address].hash ); - } - }); - }); - - describe("[4] reveal", async () => { - it("[TX] reveal", async () => { - for (w of workers) - if (results[w.agent.address].hash == consensus.hash) - { - txMined = await IexecInstance.reveal( - taskid, - results[w.agent.address].digest, - { from: w.agent.address } - ); - gasReceipt.push([ "reveal", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReveal"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.digest, results[w.agent.address].digest); - } - }); - }); - - describe("[5] finalization", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - taskid, - web3.utils.utf8ToHex("aResult"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult")); - - // TODO: check 2 events by w.address for w in workers - // How to retreive events from the IexecClerk (5 rewards and 1 seize) - }); - }); - }); - - describe("โ†’ summary", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, consensus.hash ); - assert.equal (Number(task.revealCounter), workers.length ); - assert.equal (Number(task.winnerCounter), workers.length ); - assert.deepEqual( task.contributors.map(a => a), workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 3, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 1, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1002, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1023, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 0 ], "check balance"); - }); - - it("balances - extra", async () => { - assert.equal( - Number(await IexecInstance.totalSupply()), - DEPLOYMENT.asset == "Native" - ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 - : Number(await RLCInstance.balanceOf(IexecInstance.address)) - ); - - for (agent of [ appProvider, datasetProvider, scheduler, worker1, worker2, worker3, worker4, worker5, user ]) - { - assert.deepEqual(await agent.viewAccount(), [ Number(await IexecInstance.balanceOf(agent.address)), Number(await IexecInstance.frozenOf(agent.address)) ], "check balance"); - } - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - - it("gas used", async () => { - totalgas = 0; - for ([descr, gas] of gasReceipt) - { - console.log(`${descr.padEnd(20, " ")} ${gas.toString().padStart(8, " ")}`); - totalgas += gas; - } - console.log(`${"Total gas".padEnd(20, " ")} ${totalgas.toString().padStart(8, " ")}`); - }); - }); - + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + var dealid = null; + var taskid = null; + + var authorizations = {}; + var secrets = {}; + var results = {}; + var consensus = null; + var workers = []; + + var gasReceipt = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + + trusttarget = 0; + workers = [{ agent: worker1, useenclave: true, result: 'iExec the wanderer' }]; + consensus = 'iExec the wanderer'; + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + txMined = await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolInstance.address, + 'PolicyUpdate', + ); + assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); + assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); + assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); + assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, // CHANGE FOR BOT + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { from: user.address }, + ); + gasReceipt.push(['matchOrders', txMined.receipt.gasUsed]); + + dealid = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, dealid); + + events = tools.extractEvents(txMined, IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, dealid); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 1); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize', async () => { + txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + taskid = web3.utils.soliditySha3( + { t: 'bytes32', v: dealid }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + }); + }); + + describe('[3] contribute', async () => { + it('authorization signature', async () => { + for (w of workers) { + const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); + const [auth, secret] = w.useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + authorizations[w.agent.address] = auth; + secrets[w.agent.address] = secret; + } + }); + + it('run', async () => { + consensus = odbtools.utils.hashConsensus(taskid, consensus); + for (w of workers) { + results[w.agent.address] = await w.agent.run( + authorizations[w.agent.address], + secrets[w.agent.address], + w.result, + ); + } + }); + + it('[TX] contribute', async () => { + for (w of workers) { + txMined = await IexecInstance.contribute( + authorizations[w.agent.address].taskid, // task (authorization) + results[w.agent.address].hash, // common (result) + results[w.agent.address].seal, // unique (result) + authorizations[w.agent.address].enclave, // address (enclave) + results[w.agent.address].sign, // signature (enclave) + authorizations[w.agent.address].sign, // signature (authorization) + { from: w.agent.address }, + ); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskContribute'); + assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.hash, results[w.agent.address].hash); + } + }); + }); + + describe('[4] reveal', async () => { + it('[TX] reveal', async () => { + for (w of workers) + if (results[w.agent.address].hash == consensus.hash) { + txMined = await IexecInstance.reveal( + taskid, + results[w.agent.address].digest, + { from: w.agent.address }, + ); + gasReceipt.push(['reveal', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskReveal'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.digest, results[w.agent.address].digest); + } + }); + }); + + describe('[5] finalization', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + taskid, + web3.utils.utf8ToHex('aResult'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult')); + + // TODO: check 2 events by w.address for w in workers + // How to retreive events from the IexecClerk (5 rewards and 1 seize) + }); + }); + }); + + describe('โ†’ summary', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, consensus.hash); + assert.equal(Number(task.revealCounter), workers.length); + assert.equal(Number(task.winnerCounter), workers.length); + assert.deepEqual( + task.contributors.map((a) => a), + workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [3, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [1, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1002, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1023, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 0], 'check balance'); + }); + + it('balances - extra', async () => { + assert.equal( + Number(await IexecInstance.totalSupply()), + DEPLOYMENT.asset == 'Native' + ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 + : Number(await RLCInstance.balanceOf(IexecInstance.address)), + ); + + for (agent of [ + appProvider, + datasetProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + worker5, + user, + ]) { + assert.deepEqual( + await agent.viewAccount(), + [ + Number(await IexecInstance.balanceOf(agent.address)), + Number(await IexecInstance.frozenOf(agent.address)), + ], + 'check balance', + ); + } + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + + it('gas used', async () => { + totalgas = 0; + for ([descr, gas] of gasReceipt) { + console.log(`${descr.padEnd(20, ' ')} ${gas.toString().padStart(8, ' ')}`); + totalgas += gas; + } + console.log(`${'Total gas'.padEnd(20, ' ')} ${totalgas.toString().padStart(8, ' ')}`); + }); + }); }); diff --git a/test/002_fullchain-2workers.js b/test/002_fullchain-2workers.js index c4ea1083a..a93ffefb7 100644 --- a/test/002_fullchain-2workers.js +++ b/test/002_fullchain-2workers.js @@ -1,542 +1,727 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../config/config.json").chains.default; +var DEPLOYMENT = require('../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../utils/tools"); -const enstools = require("../utils/ens-tools"); -const odbtools = require("../utils/odb-tools"); -const constants = require("../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../utils/tools'); +const enstools = require('../utils/ens-tools'); +const odbtools = require('../utils/odb-tools'); +const constants = require('../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Fullchain', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - var dealid = null; - var taskid = null; - - var authorizations = {}; - var secrets = {}; - var results = {}; - var consensus = null; - var workers = []; - - var gasReceipt = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - trusttarget = 4; - workers = [ - { agent: worker1, useenclave: true, result: "iExec the wanderer" }, - { agent: worker2, useenclave: true, result: "iExec the wanderer" }, - ]; - consensus = "iExec the wanderer"; - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - txMined = await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - events = tools.extractEvents(txMined, WorkerpoolInstance.address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, // CHANGE FOR BOT - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - txMined = await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - gasReceipt.push([ "matchOrders", txMined.receipt.gasUsed ]); - - dealid = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 0 }, - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, dealid ); - - events = tools.extractEvents(txMined, IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, dealid ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 1 ); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize", async () => { - txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - taskid = web3.utils.soliditySha3({ t: 'bytes32', v: dealid }, { t: 'uint256', v: 0 }); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - }); - }); - - describe("[3] contribute", async () => { - it("authorization signature", async () => { - for (w of workers) - { - const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); - const [ auth, secret ] = w.useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - authorizations[w.agent.address] = auth; - secrets[w.agent.address] = secret; - } - }); - - it("run", async () => { - consensus = odbtools.utils.hashConsensus(taskid, consensus); - for (w of workers) - { - results[w.agent.address] = await w.agent.run(authorizations[w.agent.address], secrets[w.agent.address], w.result); - } - }); - - it("[TX] contribute", async () => { - for (w of workers) - { - txMined = await IexecInstance.contribute( - authorizations[w.agent.address].taskid, // task (authorization) - results [w.agent.address].hash, // common (result) - results [w.agent.address].seal, // unique (result) - authorizations[w.agent.address].enclave, // address (enclave) - results [w.agent.address].sign, // signature (enclave) - authorizations[w.agent.address].sign, // signature (authorization) - { from: w.agent.address } - ); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.hash, results[w.agent.address].hash ); - } - }); - }); - - describe("[4] reveal", async () => { - it("[TX] reveal", async () => { - for (w of workers) - if (results[w.agent.address].hash == consensus.hash) - { - txMined = await IexecInstance.reveal( - taskid, - results[w.agent.address].digest, - { from: w.agent.address } - ); - gasReceipt.push([ "reveal", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReveal"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.digest, results[w.agent.address].digest); - } - }); - }); - - describe("[5] finalization", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - taskid, - web3.utils.utf8ToHex("aResult"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult")); - - // TODO: check 2 events by w.address for w in workers - // How to retreive events from the IexecClerk (5 rewards and 1 seize) - }); - }); - }); - - describe("โ†’ summary", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, consensus.hash ); - assert.equal (Number(task.revealCounter), workers.length ); - assert.equal (Number(task.winnerCounter), workers.length ); - assert.deepEqual( task.contributors.map(a => a), workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 3, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 1, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1003, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1011, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1011, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 0 ], "check balance"); - }); - - it("balances - extra", async () => { - assert.equal( - Number(await IexecInstance.totalSupply()), - DEPLOYMENT.asset == "Native" - ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 - : Number(await RLCInstance.balanceOf(IexecInstance.address)) - ); - - for (agent of [ appProvider, datasetProvider, scheduler, worker1, worker2, worker3, worker4, worker5, user ]) - { - assert.deepEqual(await agent.viewAccount(), [ Number(await IexecInstance.balanceOf(agent.address)), Number(await IexecInstance.frozenOf(agent.address)) ], "check balance"); - } - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 1, "score issue"); - assert.equal(await worker2.viewScore(), 1, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - - it("gas used", async () => { - totalgas = 0; - for ([descr, gas] of gasReceipt) - { - console.log(`${descr.padEnd(20, " ")} ${gas.toString().padStart(8, " ")}`); - totalgas += gas; - } - console.log(`${"Total gas".padEnd(20, " ")} ${totalgas.toString().padStart(8, " ")}`); - }); - }); - + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + var dealid = null; + var taskid = null; + + var authorizations = {}; + var secrets = {}; + var results = {}; + var consensus = null; + var workers = []; + + var gasReceipt = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + + trusttarget = 4; + workers = [ + { agent: worker1, useenclave: true, result: 'iExec the wanderer' }, + { agent: worker2, useenclave: true, result: 'iExec the wanderer' }, + ]; + consensus = 'iExec the wanderer'; + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + txMined = await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolInstance.address, + 'PolicyUpdate', + ); + assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); + assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); + assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); + assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, // CHANGE FOR BOT + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { from: user.address }, + ); + gasReceipt.push(['matchOrders', txMined.receipt.gasUsed]); + + dealid = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, dealid); + + events = tools.extractEvents(txMined, IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, dealid); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 1); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize', async () => { + txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + taskid = web3.utils.soliditySha3( + { t: 'bytes32', v: dealid }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + }); + }); + + describe('[3] contribute', async () => { + it('authorization signature', async () => { + for (w of workers) { + const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); + const [auth, secret] = w.useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + authorizations[w.agent.address] = auth; + secrets[w.agent.address] = secret; + } + }); + + it('run', async () => { + consensus = odbtools.utils.hashConsensus(taskid, consensus); + for (w of workers) { + results[w.agent.address] = await w.agent.run( + authorizations[w.agent.address], + secrets[w.agent.address], + w.result, + ); + } + }); + + it('[TX] contribute', async () => { + for (w of workers) { + txMined = await IexecInstance.contribute( + authorizations[w.agent.address].taskid, // task (authorization) + results[w.agent.address].hash, // common (result) + results[w.agent.address].seal, // unique (result) + authorizations[w.agent.address].enclave, // address (enclave) + results[w.agent.address].sign, // signature (enclave) + authorizations[w.agent.address].sign, // signature (authorization) + { from: w.agent.address }, + ); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskContribute'); + assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.hash, results[w.agent.address].hash); + } + }); + }); + + describe('[4] reveal', async () => { + it('[TX] reveal', async () => { + for (w of workers) + if (results[w.agent.address].hash == consensus.hash) { + txMined = await IexecInstance.reveal( + taskid, + results[w.agent.address].digest, + { from: w.agent.address }, + ); + gasReceipt.push(['reveal', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskReveal'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.digest, results[w.agent.address].digest); + } + }); + }); + + describe('[5] finalization', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + taskid, + web3.utils.utf8ToHex('aResult'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult')); + + // TODO: check 2 events by w.address for w in workers + // How to retreive events from the IexecClerk (5 rewards and 1 seize) + }); + }); + }); + + describe('โ†’ summary', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, consensus.hash); + assert.equal(Number(task.revealCounter), workers.length); + assert.equal(Number(task.winnerCounter), workers.length); + assert.deepEqual( + task.contributors.map((a) => a), + workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [3, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [1, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1003, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1011, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1011, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 0], 'check balance'); + }); + + it('balances - extra', async () => { + assert.equal( + Number(await IexecInstance.totalSupply()), + DEPLOYMENT.asset == 'Native' + ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 + : Number(await RLCInstance.balanceOf(IexecInstance.address)), + ); + + for (agent of [ + appProvider, + datasetProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + worker5, + user, + ]) { + assert.deepEqual( + await agent.viewAccount(), + [ + Number(await IexecInstance.balanceOf(agent.address)), + Number(await IexecInstance.frozenOf(agent.address)), + ], + 'check balance', + ); + } + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 1, 'score issue'); + assert.equal(await worker2.viewScore(), 1, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + + it('gas used', async () => { + totalgas = 0; + for ([descr, gas] of gasReceipt) { + console.log(`${descr.padEnd(20, ' ')} ${gas.toString().padStart(8, ' ')}`); + totalgas += gas; + } + console.log(`${'Total gas'.padEnd(20, ' ')} ${totalgas.toString().padStart(8, ' ')}`); + }); + }); }); diff --git a/test/003_fullchain-3workers.js b/test/003_fullchain-3workers.js index 8e078c914..48e352315 100644 --- a/test/003_fullchain-3workers.js +++ b/test/003_fullchain-3workers.js @@ -1,544 +1,729 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../config/config.json").chains.default; +var DEPLOYMENT = require('../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../utils/tools"); -const enstools = require("../utils/ens-tools"); -const odbtools = require("../utils/odb-tools"); -const constants = require("../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../utils/tools'); +const enstools = require('../utils/ens-tools'); +const odbtools = require('../utils/odb-tools'); +const constants = require('../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Fullchain', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - var dealid = null; - var taskid = null; - - var authorizations = {}; - var secrets = {}; - var results = {}; - var consensus = null; - var workers = []; - - var gasReceipt = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - trusttarget = 8; - workers = [ - { agent: worker1, useenclave: true, result: "iExec the wanderer" }, - { agent: worker2, useenclave: true, result: "iExec the wanderer" }, - { agent: worker3, useenclave: true, result: "iExec the wanderer" }, - ]; - consensus = "iExec the wanderer"; - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - txMined = await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - events = tools.extractEvents(txMined, WorkerpoolInstance.address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, // CHANGE FOR BOT - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - txMined = await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - gasReceipt.push([ "matchOrders", txMined.receipt.gasUsed ]); - - dealid = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 0 }, - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, dealid ); - - events = tools.extractEvents(txMined, IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, dealid ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 1 ); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize", async () => { - txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - taskid = web3.utils.soliditySha3({ t: 'bytes32', v: dealid }, { t: 'uint256', v: 0 }); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - }); - }); - - describe("[3] contribute", async () => { - it("authorization signature", async () => { - for (w of workers) - { - const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); - const [ auth, secret ] = w.useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - authorizations[w.agent.address] = auth; - secrets[w.agent.address] = secret; - } - }); - - it("run", async () => { - consensus = odbtools.utils.hashConsensus(taskid, consensus); - for (w of workers) - { - results[w.agent.address] = await w.agent.run(authorizations[w.agent.address], secrets[w.agent.address], w.result); - } - }); - - it("[TX] contribute", async () => { - for (w of workers) - { - txMined = await IexecInstance.contribute( - authorizations[w.agent.address].taskid, // task (authorization) - results [w.agent.address].hash, // common (result) - results [w.agent.address].seal, // unique (result) - authorizations[w.agent.address].enclave, // address (enclave) - results [w.agent.address].sign, // signature (enclave) - authorizations[w.agent.address].sign, // signature (authorization) - { from: w.agent.address } - ); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.hash, results[w.agent.address].hash ); - } - }); - }); - - describe("[4] reveal", async () => { - it("[TX] reveal", async () => { - for (w of workers) - if (results[w.agent.address].hash == consensus.hash) - { - txMined = await IexecInstance.reveal( - taskid, - results[w.agent.address].digest, - { from: w.agent.address } - ); - gasReceipt.push([ "reveal", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReveal"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.digest, results[w.agent.address].digest); - } - }); - }); - - describe("[5] finalization", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - taskid, - web3.utils.utf8ToHex("aResult"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult")); - - // TODO: check 2 events by w.agent.address for w in workers - // How to retreive events from the IexecClerk (5 rewards and 1 seize) - }); - }); - }); - - describe("โ†’ summary", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, consensus.hash ); - assert.equal (Number(task.revealCounter), workers.length ); - assert.equal (Number(task.winnerCounter), workers.length ); - assert.deepEqual( task.contributors.map(a => a), workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 3, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 1, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1004, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1007, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1007, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1007, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 0 ], "check balance"); - }); - - it("balances - extra", async () => { - assert.equal( - Number(await IexecInstance.totalSupply()), - DEPLOYMENT.asset == "Native" - ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 - : Number(await RLCInstance.balanceOf(IexecInstance.address)) - ); - - for (agent of [ appProvider, datasetProvider, scheduler, worker1, worker2, worker3, worker4, worker5, user ]) - { - assert.deepEqual(await agent.viewAccount(), [ Number(await IexecInstance.balanceOf(agent.address)), Number(await IexecInstance.frozenOf(agent.address)) ], "check balance"); - } - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 1, "score issue"); - assert.equal(await worker2.viewScore(), 1, "score issue"); - assert.equal(await worker3.viewScore(), 1, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - - it("gas used", async () => { - totalgas = 0; - for ([descr, gas] of gasReceipt) - { - console.log(`${descr.padEnd(20, " ")} ${gas.toString().padStart(8, " ")}`); - totalgas += gas; - } - console.log(`${"Total gas".padEnd(20, " ")} ${totalgas.toString().padStart(8, " ")}`); - }); - }); - + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + var dealid = null; + var taskid = null; + + var authorizations = {}; + var secrets = {}; + var results = {}; + var consensus = null; + var workers = []; + + var gasReceipt = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + + trusttarget = 8; + workers = [ + { agent: worker1, useenclave: true, result: 'iExec the wanderer' }, + { agent: worker2, useenclave: true, result: 'iExec the wanderer' }, + { agent: worker3, useenclave: true, result: 'iExec the wanderer' }, + ]; + consensus = 'iExec the wanderer'; + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + txMined = await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolInstance.address, + 'PolicyUpdate', + ); + assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); + assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); + assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); + assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, // CHANGE FOR BOT + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { from: user.address }, + ); + gasReceipt.push(['matchOrders', txMined.receipt.gasUsed]); + + dealid = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, dealid); + + events = tools.extractEvents(txMined, IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, dealid); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 1); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize', async () => { + txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + taskid = web3.utils.soliditySha3( + { t: 'bytes32', v: dealid }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + }); + }); + + describe('[3] contribute', async () => { + it('authorization signature', async () => { + for (w of workers) { + const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); + const [auth, secret] = w.useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + authorizations[w.agent.address] = auth; + secrets[w.agent.address] = secret; + } + }); + + it('run', async () => { + consensus = odbtools.utils.hashConsensus(taskid, consensus); + for (w of workers) { + results[w.agent.address] = await w.agent.run( + authorizations[w.agent.address], + secrets[w.agent.address], + w.result, + ); + } + }); + + it('[TX] contribute', async () => { + for (w of workers) { + txMined = await IexecInstance.contribute( + authorizations[w.agent.address].taskid, // task (authorization) + results[w.agent.address].hash, // common (result) + results[w.agent.address].seal, // unique (result) + authorizations[w.agent.address].enclave, // address (enclave) + results[w.agent.address].sign, // signature (enclave) + authorizations[w.agent.address].sign, // signature (authorization) + { from: w.agent.address }, + ); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskContribute'); + assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.hash, results[w.agent.address].hash); + } + }); + }); + + describe('[4] reveal', async () => { + it('[TX] reveal', async () => { + for (w of workers) + if (results[w.agent.address].hash == consensus.hash) { + txMined = await IexecInstance.reveal( + taskid, + results[w.agent.address].digest, + { from: w.agent.address }, + ); + gasReceipt.push(['reveal', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskReveal'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.digest, results[w.agent.address].digest); + } + }); + }); + + describe('[5] finalization', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + taskid, + web3.utils.utf8ToHex('aResult'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult')); + + // TODO: check 2 events by w.agent.address for w in workers + // How to retreive events from the IexecClerk (5 rewards and 1 seize) + }); + }); + }); + + describe('โ†’ summary', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, consensus.hash); + assert.equal(Number(task.revealCounter), workers.length); + assert.equal(Number(task.winnerCounter), workers.length); + assert.deepEqual( + task.contributors.map((a) => a), + workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [3, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [1, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1004, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1007, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1007, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1007, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 0], 'check balance'); + }); + + it('balances - extra', async () => { + assert.equal( + Number(await IexecInstance.totalSupply()), + DEPLOYMENT.asset == 'Native' + ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 + : Number(await RLCInstance.balanceOf(IexecInstance.address)), + ); + + for (agent of [ + appProvider, + datasetProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + worker5, + user, + ]) { + assert.deepEqual( + await agent.viewAccount(), + [ + Number(await IexecInstance.balanceOf(agent.address)), + Number(await IexecInstance.frozenOf(agent.address)), + ], + 'check balance', + ); + } + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 1, 'score issue'); + assert.equal(await worker2.viewScore(), 1, 'score issue'); + assert.equal(await worker3.viewScore(), 1, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + + it('gas used', async () => { + totalgas = 0; + for ([descr, gas] of gasReceipt) { + console.log(`${descr.padEnd(20, ' ')} ${gas.toString().padStart(8, ' ')}`); + totalgas += gas; + } + console.log(`${'Total gas'.padEnd(20, ' ')} ${totalgas.toString().padStart(8, ' ')}`); + }); + }); }); diff --git a/test/004_fullchain-4workers.js b/test/004_fullchain-4workers.js index 61e39593d..bf33a80ec 100644 --- a/test/004_fullchain-4workers.js +++ b/test/004_fullchain-4workers.js @@ -1,545 +1,730 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../config/config.json").chains.default; +var DEPLOYMENT = require('../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../utils/tools"); -const enstools = require("../utils/ens-tools"); -const odbtools = require("../utils/odb-tools"); -const constants = require("../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../utils/tools'); +const enstools = require('../utils/ens-tools'); +const odbtools = require('../utils/odb-tools'); +const constants = require('../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Fullchain', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - var dealid = null; - var taskid = null; - - var authorizations = {}; - var secrets = {}; - var results = {}; - var consensus = null; - var workers = []; - - var gasReceipt = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - trusttarget = 16; - workers = [ - { agent: worker1, useenclave: true, result: "iExec the wanderer" }, - { agent: worker2, useenclave: true, result: "iExec the wanderer" }, - { agent: worker3, useenclave: true, result: "iExec the wanderer" }, - { agent: worker4, useenclave: true, result: "iExec the wanderer" }, - ]; - consensus = "iExec the wanderer"; - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - txMined = await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - events = tools.extractEvents(txMined, WorkerpoolInstance.address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, // CHANGE FOR BOT - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - txMined = await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - gasReceipt.push([ "matchOrders", txMined.receipt.gasUsed ]); - - dealid = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 0 }, - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, dealid ); - - events = tools.extractEvents(txMined, IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, dealid ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 1 ); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize", async () => { - txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - taskid = web3.utils.soliditySha3({ t: 'bytes32', v: dealid }, { t: 'uint256', v: 0 }); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - }); - }); - - describe("[3] contribute", async () => { - it("authorization signature", async () => { - for (w of workers) - { - const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); - const [ auth, secret ] = w.useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - authorizations[w.agent.address] = auth; - secrets[w.agent.address] = secret; - } - }); - - it("run", async () => { - consensus = odbtools.utils.hashConsensus(taskid, consensus); - for (w of workers) - { - results[w.agent.address] = await w.agent.run(authorizations[w.agent.address], secrets[w.agent.address], w.result); - } - }); - - it("[TX] contribute", async () => { - for (w of workers) - { - txMined = await IexecInstance.contribute( - authorizations[w.agent.address].taskid, // task (authorization) - results [w.agent.address].hash, // common (result) - results [w.agent.address].seal, // unique (result) - authorizations[w.agent.address].enclave, // address (enclave) - results [w.agent.address].sign, // signature (enclave) - authorizations[w.agent.address].sign, // signature (authorization) - { from: w.agent.address } - ); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.hash, results[w.agent.address].hash ); - } - }); - }); - - describe("[4] reveal", async () => { - it("[TX] reveal", async () => { - for (w of workers) - if (results[w.agent.address].hash == consensus.hash) - { - txMined = await IexecInstance.reveal( - taskid, - results[w.agent.address].digest, - { from: w.agent.address } - ); - gasReceipt.push([ "reveal", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReveal"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.digest, results[w.agent.address].digest); - } - }); - }); - - describe("[5] finalization", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - taskid, - web3.utils.utf8ToHex("aResult"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult")); - - // TODO: check 2 events by w.agent.address for w in workers - // How to retreive events from the IexecClerk (5 rewards and 1 seize) - }); - }); - }); - - describe("โ†’ summary", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, consensus.hash ); - assert.equal (Number(task.revealCounter), workers.length ); - assert.equal (Number(task.winnerCounter), workers.length ); - assert.deepEqual( task.contributors.map(a => a), workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 3, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 1, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1005, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1005, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1005, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1005, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1005, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 0 ], "check balance"); - }); - - it("balances - extra", async () => { - assert.equal( - Number(await IexecInstance.totalSupply()), - DEPLOYMENT.asset == "Native" - ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 - : Number(await RLCInstance.balanceOf(IexecInstance.address)) - ); - - for (agent of [ appProvider, datasetProvider, scheduler, worker1, worker2, worker3, worker4, worker5, user ]) - { - assert.deepEqual(await agent.viewAccount(), [ Number(await IexecInstance.balanceOf(agent.address)), Number(await IexecInstance.frozenOf(agent.address)) ], "check balance"); - } - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 1, "score issue"); - assert.equal(await worker2.viewScore(), 1, "score issue"); - assert.equal(await worker3.viewScore(), 1, "score issue"); - assert.equal(await worker4.viewScore(), 1, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - - it("gas used", async () => { - totalgas = 0; - for ([descr, gas] of gasReceipt) - { - console.log(`${descr.padEnd(20, " ")} ${gas.toString().padStart(8, " ")}`); - totalgas += gas; - } - console.log(`${"Total gas".padEnd(20, " ")} ${totalgas.toString().padStart(8, " ")}`); - }); - }); - + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + var dealid = null; + var taskid = null; + + var authorizations = {}; + var secrets = {}; + var results = {}; + var consensus = null; + var workers = []; + + var gasReceipt = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + + trusttarget = 16; + workers = [ + { agent: worker1, useenclave: true, result: 'iExec the wanderer' }, + { agent: worker2, useenclave: true, result: 'iExec the wanderer' }, + { agent: worker3, useenclave: true, result: 'iExec the wanderer' }, + { agent: worker4, useenclave: true, result: 'iExec the wanderer' }, + ]; + consensus = 'iExec the wanderer'; + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + txMined = await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolInstance.address, + 'PolicyUpdate', + ); + assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); + assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); + assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); + assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, // CHANGE FOR BOT + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { from: user.address }, + ); + gasReceipt.push(['matchOrders', txMined.receipt.gasUsed]); + + dealid = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, dealid); + + events = tools.extractEvents(txMined, IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, dealid); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 1); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize', async () => { + txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + taskid = web3.utils.soliditySha3( + { t: 'bytes32', v: dealid }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + }); + }); + + describe('[3] contribute', async () => { + it('authorization signature', async () => { + for (w of workers) { + const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); + const [auth, secret] = w.useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + authorizations[w.agent.address] = auth; + secrets[w.agent.address] = secret; + } + }); + + it('run', async () => { + consensus = odbtools.utils.hashConsensus(taskid, consensus); + for (w of workers) { + results[w.agent.address] = await w.agent.run( + authorizations[w.agent.address], + secrets[w.agent.address], + w.result, + ); + } + }); + + it('[TX] contribute', async () => { + for (w of workers) { + txMined = await IexecInstance.contribute( + authorizations[w.agent.address].taskid, // task (authorization) + results[w.agent.address].hash, // common (result) + results[w.agent.address].seal, // unique (result) + authorizations[w.agent.address].enclave, // address (enclave) + results[w.agent.address].sign, // signature (enclave) + authorizations[w.agent.address].sign, // signature (authorization) + { from: w.agent.address }, + ); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskContribute'); + assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.hash, results[w.agent.address].hash); + } + }); + }); + + describe('[4] reveal', async () => { + it('[TX] reveal', async () => { + for (w of workers) + if (results[w.agent.address].hash == consensus.hash) { + txMined = await IexecInstance.reveal( + taskid, + results[w.agent.address].digest, + { from: w.agent.address }, + ); + gasReceipt.push(['reveal', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskReveal'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.digest, results[w.agent.address].digest); + } + }); + }); + + describe('[5] finalization', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + taskid, + web3.utils.utf8ToHex('aResult'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult')); + + // TODO: check 2 events by w.agent.address for w in workers + // How to retreive events from the IexecClerk (5 rewards and 1 seize) + }); + }); + }); + + describe('โ†’ summary', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, consensus.hash); + assert.equal(Number(task.revealCounter), workers.length); + assert.equal(Number(task.winnerCounter), workers.length); + assert.deepEqual( + task.contributors.map((a) => a), + workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [3, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [1, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1005, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1005, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1005, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1005, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1005, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 0], 'check balance'); + }); + + it('balances - extra', async () => { + assert.equal( + Number(await IexecInstance.totalSupply()), + DEPLOYMENT.asset == 'Native' + ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 + : Number(await RLCInstance.balanceOf(IexecInstance.address)), + ); + + for (agent of [ + appProvider, + datasetProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + worker5, + user, + ]) { + assert.deepEqual( + await agent.viewAccount(), + [ + Number(await IexecInstance.balanceOf(agent.address)), + Number(await IexecInstance.frozenOf(agent.address)), + ], + 'check balance', + ); + } + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 1, 'score issue'); + assert.equal(await worker2.viewScore(), 1, 'score issue'); + assert.equal(await worker3.viewScore(), 1, 'score issue'); + assert.equal(await worker4.viewScore(), 1, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + + it('gas used', async () => { + totalgas = 0; + for ([descr, gas] of gasReceipt) { + console.log(`${descr.padEnd(20, ' ')} ${gas.toString().padStart(8, ' ')}`); + totalgas += gas; + } + console.log(`${'Total gas'.padEnd(20, ' ')} ${totalgas.toString().padStart(8, ' ')}`); + }); + }); }); diff --git a/test/100_fullchain-5workers-1error.js b/test/100_fullchain-5workers-1error.js index aa92bd078..e1bff4925 100644 --- a/test/100_fullchain-5workers-1error.js +++ b/test/100_fullchain-5workers-1error.js @@ -1,546 +1,731 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../config/config.json").chains.default; +var DEPLOYMENT = require('../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../utils/tools"); -const enstools = require("../utils/ens-tools"); -const odbtools = require("../utils/odb-tools"); -const constants = require("../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../utils/tools'); +const enstools = require('../utils/ens-tools'); +const odbtools = require('../utils/odb-tools'); +const constants = require('../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Fullchain', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - var dealid = null; - var taskid = null; - - var authorizations = {}; - var secrets = {}; - var results = {}; - var consensus = null; - var workers = []; - - var gasReceipt = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - trusttarget = 4; - workers = [ - { agent: worker1, useenclave: true, result: "iExec the wanderer" }, - { agent: worker2, useenclave: true, result: "je ne veux pas travailler" }, - { agent: worker3, useenclave: true, result: "iExec the wanderer" }, - { agent: worker4, useenclave: true, result: "iExec the wanderer" }, - { agent: worker5, useenclave: true, result: "iExec the wanderer" }, - ]; - consensus = "iExec the wanderer"; - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - txMined = await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - events = tools.extractEvents(txMined, WorkerpoolInstance.address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, // CHANGE FOR BOT - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - txMined = await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - gasReceipt.push([ "matchOrders", txMined.receipt.gasUsed ]); - - dealid = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 0 }, - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, dealid ); - - events = tools.extractEvents(txMined, IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, dealid ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 1 ); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize", async () => { - txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - taskid = web3.utils.soliditySha3({ t: 'bytes32', v: dealid }, { t: 'uint256', v: 0 }); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - }); - }); - - describe("[3] contribute", async () => { - it("authorization signature", async () => { - for (w of workers) - { - const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); - const [ auth, secret ] = w.useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - authorizations[w.agent.address] = auth; - secrets[w.agent.address] = secret; - } - }); - - it("run", async () => { - consensus = odbtools.utils.hashConsensus(taskid, consensus); - for (w of workers) - { - results[w.agent.address] = await w.agent.run(authorizations[w.agent.address], secrets[w.agent.address], w.result); - } - }); - - it("[TX] contribute", async () => { - for (w of workers) - { - txMined = await IexecInstance.contribute( - authorizations[w.agent.address].taskid, // task (authorization) - results [w.agent.address].hash, // common (result) - results [w.agent.address].seal, // unique (result) - authorizations[w.agent.address].enclave, // address (enclave) - results [w.agent.address].sign, // signature (enclave) - authorizations[w.agent.address].sign, // signature (authorization) - { from: w.agent.address } - ); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.hash, results[w.agent.address].hash ); - } - }); - }); - - describe("[4] reveal", async () => { - it("[TX] reveal", async () => { - for (w of workers) - if (results[w.agent.address].hash == consensus.hash) - { - txMined = await IexecInstance.reveal( - taskid, - results[w.agent.address].digest, - { from: w.agent.address } - ); - gasReceipt.push([ "reveal", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReveal"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.digest, results[w.agent.address].digest); - } - }); - }); - - describe("[5] finalization", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - taskid, - web3.utils.utf8ToHex("aResult"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult")); - - // TODO: check 2 events by w.agent.address for w in workers - // How to retreive events from the IexecClerk (5 rewards and 1 seize) - }); - }); - }); - - describe("โ†’ summary", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, consensus.hash ); - assert.equal (Number(task.revealCounter), workers.length - 1 ); - assert.equal (Number(task.winnerCounter), workers.length - 1 ); - assert.deepEqual( task.contributors.map(a => a), workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 3, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 1, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1005, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1007, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 992, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1007, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1007, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1007, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 0 ], "check balance"); - }); - - it("balances - extra", async () => { - assert.equal( - Number(await IexecInstance.totalSupply()), - DEPLOYMENT.asset == "Native" - ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 - : Number(await RLCInstance.balanceOf(IexecInstance.address)) - ); - - for (agent of [ appProvider, datasetProvider, scheduler, worker1, worker2, worker3, worker4, worker5, user ]) - { - assert.deepEqual(await agent.viewAccount(), [ Number(await IexecInstance.balanceOf(agent.address)), Number(await IexecInstance.frozenOf(agent.address)) ], "check balance"); - } - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 1, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 1, "score issue"); - assert.equal(await worker4.viewScore(), 1, "score issue"); - assert.equal(await worker5.viewScore(), 1, "score issue"); - }); - - it("gas used", async () => { - totalgas = 0; - for ([descr, gas] of gasReceipt) - { - console.log(`${descr.padEnd(20, " ")} ${gas.toString().padStart(8, " ")}`); - totalgas += gas; - } - console.log(`${"Total gas".padEnd(20, " ")} ${totalgas.toString().padStart(8, " ")}`); - }); - }); - + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + var dealid = null; + var taskid = null; + + var authorizations = {}; + var secrets = {}; + var results = {}; + var consensus = null; + var workers = []; + + var gasReceipt = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + + trusttarget = 4; + workers = [ + { agent: worker1, useenclave: true, result: 'iExec the wanderer' }, + { agent: worker2, useenclave: true, result: 'je ne veux pas travailler' }, + { agent: worker3, useenclave: true, result: 'iExec the wanderer' }, + { agent: worker4, useenclave: true, result: 'iExec the wanderer' }, + { agent: worker5, useenclave: true, result: 'iExec the wanderer' }, + ]; + consensus = 'iExec the wanderer'; + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + txMined = await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolInstance.address, + 'PolicyUpdate', + ); + assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); + assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); + assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); + assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, // CHANGE FOR BOT + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { from: user.address }, + ); + gasReceipt.push(['matchOrders', txMined.receipt.gasUsed]); + + dealid = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, dealid); + + events = tools.extractEvents(txMined, IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, dealid); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 1); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize', async () => { + txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + taskid = web3.utils.soliditySha3( + { t: 'bytes32', v: dealid }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + }); + }); + + describe('[3] contribute', async () => { + it('authorization signature', async () => { + for (w of workers) { + const preauth = await scheduler.signPreAuthorization(taskid, w.agent.address); + const [auth, secret] = w.useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + authorizations[w.agent.address] = auth; + secrets[w.agent.address] = secret; + } + }); + + it('run', async () => { + consensus = odbtools.utils.hashConsensus(taskid, consensus); + for (w of workers) { + results[w.agent.address] = await w.agent.run( + authorizations[w.agent.address], + secrets[w.agent.address], + w.result, + ); + } + }); + + it('[TX] contribute', async () => { + for (w of workers) { + txMined = await IexecInstance.contribute( + authorizations[w.agent.address].taskid, // task (authorization) + results[w.agent.address].hash, // common (result) + results[w.agent.address].seal, // unique (result) + authorizations[w.agent.address].enclave, // address (enclave) + results[w.agent.address].sign, // signature (enclave) + authorizations[w.agent.address].sign, // signature (authorization) + { from: w.agent.address }, + ); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskContribute'); + assert.equal(events[0].args.taskid, authorizations[w.agent.address].taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.hash, results[w.agent.address].hash); + } + }); + }); + + describe('[4] reveal', async () => { + it('[TX] reveal', async () => { + for (w of workers) + if (results[w.agent.address].hash == consensus.hash) { + txMined = await IexecInstance.reveal( + taskid, + results[w.agent.address].digest, + { from: w.agent.address }, + ); + gasReceipt.push(['reveal', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskReveal'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal(events[0].args.digest, results[w.agent.address].digest); + } + }); + }); + + describe('[5] finalization', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + taskid, + web3.utils.utf8ToHex('aResult'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult')); + + // TODO: check 2 events by w.agent.address for w in workers + // How to retreive events from the IexecClerk (5 rewards and 1 seize) + }); + }); + }); + + describe('โ†’ summary', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, consensus.hash); + assert.equal(Number(task.revealCounter), workers.length - 1); + assert.equal(Number(task.winnerCounter), workers.length - 1); + assert.deepEqual( + task.contributors.map((a) => a), + workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [3, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [1, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1005, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1007, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [992, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1007, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1007, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1007, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 0], 'check balance'); + }); + + it('balances - extra', async () => { + assert.equal( + Number(await IexecInstance.totalSupply()), + DEPLOYMENT.asset == 'Native' + ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 + : Number(await RLCInstance.balanceOf(IexecInstance.address)), + ); + + for (agent of [ + appProvider, + datasetProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + worker5, + user, + ]) { + assert.deepEqual( + await agent.viewAccount(), + [ + Number(await IexecInstance.balanceOf(agent.address)), + Number(await IexecInstance.frozenOf(agent.address)), + ], + 'check balance', + ); + } + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 1, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 1, 'score issue'); + assert.equal(await worker4.viewScore(), 1, 'score issue'); + assert.equal(await worker5.viewScore(), 1, 'score issue'); + }); + + it('gas used', async () => { + totalgas = 0; + for ([descr, gas] of gasReceipt) { + console.log(`${descr.padEnd(20, ' ')} ${gas.toString().padStart(8, ' ')}`); + totalgas += gas; + } + console.log(`${'Total gas'.padEnd(20, ' ')} ${totalgas.toString().padStart(8, ' ')}`); + }); + }); }); diff --git a/test/200_fullchain-bot.js b/test/200_fullchain-bot.js index 5d524203f..c7f4cb678 100644 --- a/test/200_fullchain-bot.js +++ b/test/200_fullchain-bot.js @@ -1,681 +1,981 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../config/config.json").chains.default; +var DEPLOYMENT = require('../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../utils/tools"); -const enstools = require("../utils/ens-tools"); -const odbtools = require("../utils/odb-tools"); -const constants = require("../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../utils/tools'); +const enstools = require('../utils/ens-tools'); +const odbtools = require('../utils/odb-tools'); +const constants = require('../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Fullchain', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - - var dealid = null; - var tasks = null; - var trusttarget = null; - - var gasReceipt = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - trusttarget = 4; - tasks = { - 0: - { - taskid: null, - authorizations: {}, - secrets: {}, - results: {}, - consensus: "iExec BOT 0", - workers : - [ - { agent: worker1, useenclave: false, result: "iExec BOT 0" }, - { agent: worker2, useenclave: false, result: "iExec BOT 0" }, - ] - }, - 1: - { - taskid: null, - authorizations: {}, - secrets: {}, - results: {}, - consensus: "iExec BOT 1", - workers : - [ - { agent: worker2, useenclave: true, result: "iExec BOT 1" }, - { agent: worker3, useenclave: true, result: "iExec BOT 1" }, - ] - }, - 2: - { - taskid: null, - authorizations: {}, - secrets: {}, - results: {}, - consensus: "iExec BOT 2", - workers : - [ - { agent: worker1, useenclave: false, result: "iExec BOT 2" }, - { agent: worker3, useenclave: false, result: "" }, - { agent: worker2, useenclave: true, result: "iExec BOT 2" }, - { agent: worker4, useenclave: true, result: "iExec BOT 2" }, - { agent: worker5, useenclave: true, result: "iExec BOT 2" }, - ] - }, - }; - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - txMined = await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - events = tools.extractEvents(txMined, WorkerpoolInstance.address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 3, // CHANGE FOR BOT - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - txMined = await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - gasReceipt.push([ "matchOrders", txMined.receipt.gasUsed ]); - - dealid = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 0 }, - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, dealid ); - - events = tools.extractEvents(txMined, IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, dealid ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 3 ); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize task", async () => { - for (i in tasks) - { - txMined = await IexecInstance.initialize(dealid, i, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - tasks[i].taskid = web3.utils.soliditySha3({ t: 'bytes32', v: dealid }, { t: 'uint256', v: i }); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.taskid, tasks[i].taskid ); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - } - }); - }); - - describe("[3] contribute", async () => { - it("authorization signature", async () => { - for (i in tasks) - for (w of tasks[i].workers) - { - const preauth = await scheduler.signPreAuthorization(tasks[i].taskid, w.agent.address); - const [ auth, secret ] = w.useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - tasks[i].authorizations[w.agent.address] = auth; - tasks[i].secrets[w.agent.address] = secret; - } - }); - - it("run", async () => { - for (i in tasks) - { - tasks[i].consensus = odbtools.utils.hashConsensus(tasks[i].taskid, tasks[i].consensus); - for (w of tasks[i].workers) - { - tasks[i].results[w.agent.address] = await w.agent.run(tasks[i].authorizations[w.agent.address], tasks[i].secrets[w.agent.address], w.result); - } - } - }); - - it("[TX] contribute", async () => { - for (i in tasks) - for (w of tasks[i].workers) - { - txMined = await IexecInstance.contribute( - tasks[i].authorizations[w.agent.address].taskid, // task (authorization) - tasks[i].results [w.agent.address].hash, // common (result) - tasks[i].results [w.agent.address].seal, // unique (result) - tasks[i].authorizations[w.agent.address].enclave, // address (enclave) - tasks[i].results [w.agent.address].sign, // signature (enclave) - tasks[i].authorizations[w.agent.address].sign, // signature (authorization) - { from: w.agent.address } - ); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - } - }); - }); - - describe("[4] reveal", async () => { - it("[TX] reveal", async () => { - for (i in tasks) - for (w of tasks[i].workers) - if (tasks[i].results[w.agent.address].hash == tasks[i].consensus.hash) - { - txMined = await IexecInstance.reveal( - tasks[i].authorizations[w.agent.address].taskid, - tasks[i].results[w.agent.address].digest, - { from: w.agent.address } - ); - gasReceipt.push([ "reveal", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReveal"); - assert.equal(events[0].args.taskid, tasks[i].authorizations[w.agent.address].taskid); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.digest, tasks[i].results[w.agent.address].digest ); - } - }); - }); - - describe("[5] finalization", async () => { - - describe("task 1", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - tasks[0].taskid, - web3.utils.utf8ToHex("aResult 1"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[0].taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 1")); - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(tasks[0].taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, tasks[0].consensus.hash ); - assert.equal (Number(task.revealCounter), 2 ); - assert.equal (Number(task.winnerCounter), 2 ); - assert.deepEqual( task.contributors.map(a => a), tasks[0].workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult 1") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0 + 3 + 0 + 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0 + 1 + 0 + 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000 + 3 - 7 - 7, 0 + 7 + 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000 + 11 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000 + 11 - 8 - 8, 0 + 8 + 8 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000 - 8 - 8, 0 + 8 + 8 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000 - 29 - 29 - 29, 0 + 29 + 29 ], "check balance"); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 1, "score issue"); - assert.equal(await worker2.viewScore(), 1, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - }); - - describe("task 2", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - tasks[1].taskid, - web3.utils.utf8ToHex("aResult 2"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[1].taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 2")); - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(tasks[1].taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 1 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, tasks[1].consensus.hash ); - assert.equal (Number(task.revealCounter), 2 ); - assert.equal (Number(task.winnerCounter), 2 ); - assert.deepEqual( task.contributors.map(a => a), tasks[1].workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult 2") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0 + 3 + 3 + 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0 + 1 + 1 + 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000 + 3 + 3 - 7, 0 + 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000 + 11 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000 + 11 + 11 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000 + 11 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000 - 29 - 29 - 29, 0 + 29 ], "check balance"); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 1, "score issue"); - assert.equal(await worker2.viewScore(), 2, "score issue"); - assert.equal(await worker3.viewScore(), 1, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - }); - - describe("task 3", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - tasks[2].taskid, - web3.utils.utf8ToHex("aResult 3"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[2].taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 3")); - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(tasks[2].taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 2 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, tasks[2].consensus.hash ); - assert.equal (Number(task.revealCounter), 4 ); - assert.equal (Number(task.winnerCounter), 4 ); - assert.deepEqual( task.contributors.map(a => a), tasks[2].workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult 3") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0 + 3 + 3 + 3, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0 + 1 + 1 + 1, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000 + 3 + 3 + 5, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000 + 11 + 7, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000 + 11 + 11 + 7, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000 + 11 - 8, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000 + 7, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000 + 7, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000 - 29 - 29 - 29, 0 ], "check balance"); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 2, "score issue"); - assert.equal(await worker2.viewScore(), 3, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 1, "score issue"); - assert.equal(await worker5.viewScore(), 1, "score issue"); - }); - }); - }); - - }); - }); - - describe("โ†’ summary", async () => { - it("gas used", async () => { - totalgas = 0; - for ([descr, gas] of gasReceipt) - { - console.log(`${descr.padEnd(20, " ")} ${gas.toString().padStart(8, " ")}`); - totalgas += gas; - } - console.log(`${"Total gas".padEnd(20, " ")} ${totalgas.toString().padStart(8, " ")}`); - }); - }); - + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + + var dealid = null; + var tasks = null; + var trusttarget = null; + + var gasReceipt = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + + trusttarget = 4; + tasks = { + 0: { + taskid: null, + authorizations: {}, + secrets: {}, + results: {}, + consensus: 'iExec BOT 0', + workers: [ + { agent: worker1, useenclave: false, result: 'iExec BOT 0' }, + { agent: worker2, useenclave: false, result: 'iExec BOT 0' }, + ], + }, + 1: { + taskid: null, + authorizations: {}, + secrets: {}, + results: {}, + consensus: 'iExec BOT 1', + workers: [ + { agent: worker2, useenclave: true, result: 'iExec BOT 1' }, + { agent: worker3, useenclave: true, result: 'iExec BOT 1' }, + ], + }, + 2: { + taskid: null, + authorizations: {}, + secrets: {}, + results: {}, + consensus: 'iExec BOT 2', + workers: [ + { agent: worker1, useenclave: false, result: 'iExec BOT 2' }, + { agent: worker3, useenclave: false, result: '' }, + { agent: worker2, useenclave: true, result: 'iExec BOT 2' }, + { agent: worker4, useenclave: true, result: 'iExec BOT 2' }, + { agent: worker5, useenclave: true, result: 'iExec BOT 2' }, + ], + }, + }; + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + txMined = await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolInstance.address, + 'PolicyUpdate', + ); + assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); + assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); + assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); + assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 3, // CHANGE FOR BOT + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { from: user.address }, + ); + gasReceipt.push(['matchOrders', txMined.receipt.gasUsed]); + + dealid = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, dealid); + + events = tools.extractEvents(txMined, IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, dealid); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 3); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize task', async () => { + for (i in tasks) { + txMined = await IexecInstance.initialize(dealid, i, { + from: scheduler.address, + }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + tasks[i].taskid = web3.utils.soliditySha3( + { t: 'bytes32', v: dealid }, + { t: 'uint256', v: i }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.taskid, tasks[i].taskid); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + } + }); + }); + + describe('[3] contribute', async () => { + it('authorization signature', async () => { + for (i in tasks) + for (w of tasks[i].workers) { + const preauth = await scheduler.signPreAuthorization( + tasks[i].taskid, + w.agent.address, + ); + const [auth, secret] = w.useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + tasks[i].authorizations[w.agent.address] = auth; + tasks[i].secrets[w.agent.address] = secret; + } + }); + + it('run', async () => { + for (i in tasks) { + tasks[i].consensus = odbtools.utils.hashConsensus( + tasks[i].taskid, + tasks[i].consensus, + ); + for (w of tasks[i].workers) { + tasks[i].results[w.agent.address] = await w.agent.run( + tasks[i].authorizations[w.agent.address], + tasks[i].secrets[w.agent.address], + w.result, + ); + } + } + }); + + it('[TX] contribute', async () => { + for (i in tasks) + for (w of tasks[i].workers) { + txMined = await IexecInstance.contribute( + tasks[i].authorizations[w.agent.address].taskid, // task (authorization) + tasks[i].results[w.agent.address].hash, // common (result) + tasks[i].results[w.agent.address].seal, // unique (result) + tasks[i].authorizations[w.agent.address].enclave, // address (enclave) + tasks[i].results[w.agent.address].sign, // signature (enclave) + tasks[i].authorizations[w.agent.address].sign, // signature (authorization) + { from: w.agent.address }, + ); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + } + }); + }); + + describe('[4] reveal', async () => { + it('[TX] reveal', async () => { + for (i in tasks) + for (w of tasks[i].workers) + if (tasks[i].results[w.agent.address].hash == tasks[i].consensus.hash) { + txMined = await IexecInstance.reveal( + tasks[i].authorizations[w.agent.address].taskid, + tasks[i].results[w.agent.address].digest, + { from: w.agent.address }, + ); + gasReceipt.push(['reveal', txMined.receipt.gasUsed]); + + events = tools.extractEvents( + txMined, + IexecInstance.address, + 'TaskReveal', + ); + assert.equal( + events[0].args.taskid, + tasks[i].authorizations[w.agent.address].taskid, + ); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal( + events[0].args.digest, + tasks[i].results[w.agent.address].digest, + ); + } + }); + }); + + describe('[5] finalization', async () => { + describe('task 1', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + tasks[0].taskid, + web3.utils.utf8ToHex('aResult 1'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, tasks[0].taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult 1')); + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(tasks[0].taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)) + .workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, tasks[0].consensus.hash); + assert.equal(Number(task.revealCounter), 2); + assert.equal(Number(task.winnerCounter), 2); + assert.deepEqual( + task.contributors.map((a) => a), + tasks[0].workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult 1')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual( + await appProvider.viewAccount(), + [0 + 3 + 0 + 0, 0], + 'check balance', + ); + assert.deepEqual( + await datasetProvider.viewAccount(), + [0 + 1 + 0 + 0, 0], + 'check balance', + ); + assert.deepEqual( + await scheduler.viewAccount(), + [1000 + 3 - 7 - 7, 0 + 7 + 7], + 'check balance', + ); + assert.deepEqual( + await worker1.viewAccount(), + [1000 + 11 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker2.viewAccount(), + [1000 + 11 - 8 - 8, 0 + 8 + 8], + 'check balance', + ); + assert.deepEqual( + await worker3.viewAccount(), + [1000 - 8 - 8, 0 + 8 + 8], + 'check balance', + ); + assert.deepEqual( + await worker4.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker5.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await user.viewAccount(), + [1000 - 29 - 29 - 29, 0 + 29 + 29], + 'check balance', + ); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 1, 'score issue'); + assert.equal(await worker2.viewScore(), 1, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + }); + + describe('task 2', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + tasks[1].taskid, + web3.utils.utf8ToHex('aResult 2'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, tasks[1].taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult 2')); + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(tasks[1].taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 1); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)) + .workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, tasks[1].consensus.hash); + assert.equal(Number(task.revealCounter), 2); + assert.equal(Number(task.winnerCounter), 2); + assert.deepEqual( + task.contributors.map((a) => a), + tasks[1].workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult 2')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual( + await appProvider.viewAccount(), + [0 + 3 + 3 + 0, 0], + 'check balance', + ); + assert.deepEqual( + await datasetProvider.viewAccount(), + [0 + 1 + 1 + 0, 0], + 'check balance', + ); + assert.deepEqual( + await scheduler.viewAccount(), + [1000 + 3 + 3 - 7, 0 + 7], + 'check balance', + ); + assert.deepEqual( + await worker1.viewAccount(), + [1000 + 11 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker2.viewAccount(), + [1000 + 11 + 11 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker3.viewAccount(), + [1000 + 11 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker4.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker5.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await user.viewAccount(), + [1000 - 29 - 29 - 29, 0 + 29], + 'check balance', + ); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 1, 'score issue'); + assert.equal(await worker2.viewScore(), 2, 'score issue'); + assert.equal(await worker3.viewScore(), 1, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + }); + + describe('task 3', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + tasks[2].taskid, + web3.utils.utf8ToHex('aResult 3'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, tasks[2].taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult 3')); + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(tasks[2].taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 2); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)) + .workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, tasks[2].consensus.hash); + assert.equal(Number(task.revealCounter), 4); + assert.equal(Number(task.winnerCounter), 4); + assert.deepEqual( + task.contributors.map((a) => a), + tasks[2].workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult 3')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual( + await appProvider.viewAccount(), + [0 + 3 + 3 + 3, 0], + 'check balance', + ); + assert.deepEqual( + await datasetProvider.viewAccount(), + [0 + 1 + 1 + 1, 0], + 'check balance', + ); + assert.deepEqual( + await scheduler.viewAccount(), + [1000 + 3 + 3 + 5, 0], + 'check balance', + ); + assert.deepEqual( + await worker1.viewAccount(), + [1000 + 11 + 7, 0], + 'check balance', + ); + assert.deepEqual( + await worker2.viewAccount(), + [1000 + 11 + 11 + 7, 0], + 'check balance', + ); + assert.deepEqual( + await worker3.viewAccount(), + [1000 + 11 - 8, 0], + 'check balance', + ); + assert.deepEqual( + await worker4.viewAccount(), + [1000 + 7, 0], + 'check balance', + ); + assert.deepEqual( + await worker5.viewAccount(), + [1000 + 7, 0], + 'check balance', + ); + assert.deepEqual( + await user.viewAccount(), + [1000 - 29 - 29 - 29, 0], + 'check balance', + ); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 2, 'score issue'); + assert.equal(await worker2.viewScore(), 3, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 1, 'score issue'); + assert.equal(await worker5.viewScore(), 1, 'score issue'); + }); + }); + }); + }); + }); + + describe('โ†’ summary', async () => { + it('gas used', async () => { + totalgas = 0; + for ([descr, gas] of gasReceipt) { + console.log(`${descr.padEnd(20, ' ')} ${gas.toString().padStart(8, ' ')}`); + totalgas += gas; + } + console.log(`${'Total gas'.padEnd(20, ' ')} ${totalgas.toString().padStart(8, ' ')}`); + }); + }); }); diff --git a/test/201_fullchain-bot-dualPool.js b/test/201_fullchain-bot-dualPool.js index 2d943769f..e2a7594f9 100644 --- a/test/201_fullchain-bot-dualPool.js +++ b/test/201_fullchain-bot-dualPool.js @@ -1,734 +1,1062 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../config/config.json").chains.default; +var DEPLOYMENT = require('../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../utils/tools"); -const enstools = require("../utils/ens-tools"); -const odbtools = require("../utils/odb-tools"); -const constants = require("../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../utils/tools'); +const enstools = require('../utils/ens-tools'); +const odbtools = require('../utils/odb-tools'); +const constants = require('../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Fullchain', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = accounts[0]; - let appProvider = accounts[1]; - let datasetProvider = accounts[2]; - let scheduler = accounts[3]; - let worker1 = accounts[4]; - let worker2 = accounts[5]; - let worker3 = accounts[6]; - let worker4 = accounts[7]; - let worker5 = accounts[8]; - let user = accounts[9]; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - - var dealid = null; - var tasks = null; - var trusttarget = null; - - var gasReceipt = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - trusttarget = 4; - tasks = { - 0: - { - taskid: null, - authorizations: {}, - secrets: {}, - results: {}, - consensus: "iExec BOT 0", - workers : - [ - { agent: worker1, useenclave: false, result: "iExec BOT 0" }, - { agent: worker2, useenclave: false, result: "iExec BOT 0" }, - ] - }, - 1: - { - taskid: null, - authorizations: {}, - secrets: {}, - results: {}, - consensus: "iExec BOT 1", - workers : - [ - { agent: worker2, useenclave: true, result: "iExec BOT 1" }, - { agent: worker3, useenclave: true, result: "iExec BOT 1" }, - ] - }, - 2: - { - taskid: null, - authorizations: {}, - secrets: {}, - results: {}, - consensus: "iExec BOT 2", - workers : - [ - { agent: worker1, useenclave: false, result: "iExec BOT 2" }, - { agent: worker3, useenclave: false, result: "" }, - { agent: worker2, useenclave: true, result: "iExec BOT 2" }, - { agent: worker4, useenclave: true, result: "iExec BOT 2" }, - { agent: worker5, useenclave: true, result: "iExec BOT 2" }, - ] - }, - }; - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - txMined = await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - events = tools.extractEvents(txMined, WorkerpoolInstance.address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder1 = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 15, - volume: 2, - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - - workerpoolorder2 = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 10, - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder1), - workerpoolorder1.sign - )); - - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder2), - workerpoolorder2.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 3, // CHANGE FOR BOT - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - const txsMined = [ - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder1, requestorder, { from: user.address }), - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder2, requestorder, { from: user.address }), - ]; - gasReceipt.push([ "matchOrders", txsMined[0].receipt.gasUsed ]); - gasReceipt.push([ "matchOrders", txsMined[1].receipt.gasUsed ]); - - deal0 = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 0 }, - ); - deal1 = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 2 }, - ); - - events = tools.extractEvents(txsMined[0], IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, deal0 ); - - events = tools.extractEvents(txsMined[1], IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, deal1 ); - - events = tools.extractEvents(txsMined[0], IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, deal0 ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder1)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 2 ); - - events = tools.extractEvents(txsMined[1], IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, deal1 ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder2)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 1 ); - - dealids = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder)); - assert.equal(dealids[0], deal0); - assert.equal(dealids[1], deal1); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize task", async () => { - txMined = await IexecInstance.initialize(dealids[0], 0, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - tasks[0].taskid = events[0].args.taskid; - - txMined = await IexecInstance.initialize(dealids[0], 1, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - tasks[1].taskid = events[0].args.taskid; - - txMined = await IexecInstance.initialize(dealids[1], 2, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - tasks[2].taskid = events[0].args.taskid; - }); - }); - - describe("[3] contribute", async () => { - it("authorization signature", async () => { - for (i in tasks) - for (w of tasks[i].workers) - { - const preauth = await scheduler.signPreAuthorization(tasks[i].taskid, w.agent.address); - const [ auth, secret ] = w.useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - tasks[i].authorizations[w.agent.address] = auth; - tasks[i].secrets[w.agent.address] = secret; - } - }); - - it("run", async () => { - for (i in tasks) - { - tasks[i].consensus = odbtools.utils.hashConsensus(tasks[i].taskid, tasks[i].consensus); - for (w of tasks[i].workers) - { - tasks[i].results[w.agent.address] = await w.agent.run(tasks[i].authorizations[w.agent.address], tasks[i].secrets[w.agent.address], w.result); - } - } - }); - - it("[TX] contribute", async () => { - for (i in tasks) - for (w of tasks[i].workers) - { - txMined = await IexecInstance.contribute( - tasks[i].authorizations[w.agent.address].taskid, // task (authorization) - tasks[i].results [w.agent.address].hash, // common (result) - tasks[i].results [w.agent.address].seal, // unique (result) - tasks[i].authorizations[w.agent.address].enclave, // address (enclave) - tasks[i].results [w.agent.address].sign, // signature (enclave) - tasks[i].authorizations[w.agent.address].sign, // signature (authorization) - { from: w.agent.address } - ); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - } - }); - }); - - describe("[4] reveal", async () => { - it("[TX] reveal", async () => { - for (i in tasks) - for (w of tasks[i].workers) - if (tasks[i].results[w.agent.address].hash == tasks[i].consensus.hash) - { - txMined = await IexecInstance.reveal( - tasks[i].authorizations[w.agent.address].taskid, - tasks[i].results[w.agent.address].digest, - { from: w.agent.address } - ); - gasReceipt.push([ "reveal", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReveal"); - assert.equal(events[0].args.taskid, tasks[i].authorizations[w.agent.address].taskid); - assert.equal(events[0].args.worker, w.agent.address ); - assert.equal(events[0].args.digest, tasks[i].results[w.agent.address].digest ); - } - }); - }); - - describe("[5] finalization", async () => { - - describe("task 1", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - tasks[0].taskid, - web3.utils.utf8ToHex("aResult 1"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[0].taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 1")); - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(tasks[0].taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealids[0] ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, tasks[0].consensus.hash ); - assert.equal (Number(task.revealCounter), 2 ); - assert.equal (Number(task.winnerCounter), 2 ); - assert.deepEqual( task.contributors.map(a => a), tasks[0].workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult 1") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0 + 3 + 0 + 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0 + 1 + 0 + 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000 + 1 - 4 - 7, 0 + 4 + 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000 + 7 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000 + 7 - 5 - 8, 0 + 5 + 8 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000 - 5 - 8, 0 + 5 + 8 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000 - 19 - 19 - 29, 0 + 19 + 29 ], "check balance"); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 1, "score issue"); - assert.equal(await worker2.viewScore(), 1, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - }); - - describe("task 2", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - tasks[1].taskid, - web3.utils.utf8ToHex("aResult 2"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[1].taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 2")); - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(tasks[1].taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealids[0] ); - assert.equal (Number(task.idx), 1 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, tasks[1].consensus.hash ); - assert.equal (Number(task.revealCounter), 2 ); - assert.equal (Number(task.winnerCounter), 2 ); - assert.deepEqual( task.contributors.map(a => a), tasks[1].workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult 2") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0 + 3 + 3 + 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0 + 1 + 1 + 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000 + 1 + 1 - 7, 0 + 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000 + 7 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000 + 7 + 7 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000 + 7 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000 - 19 - 19 - 29, 0 + 29 ], "check balance"); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 1, "score issue"); - assert.equal(await worker2.viewScore(), 2, "score issue"); - assert.equal(await worker3.viewScore(), 1, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - }); - - describe("task 3", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - tasks[2].taskid, - web3.utils.utf8ToHex("aResult 3"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[2].taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 3")); - }); - - describe("checks", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(tasks[2].taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealids[1] ); - assert.equal (Number(task.idx), 2 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, tasks[2].consensus.hash ); - assert.equal (Number(task.revealCounter), 4 ); - assert.equal (Number(task.winnerCounter), 4 ); - assert.deepEqual( task.contributors.map(a => a), tasks[2].workers.map(w => w.agent.address) ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult 3") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0 + 3 + 3 + 3, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0 + 1 + 1 + 1, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000 + 1 + 1 + 5, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000 + 7 + 7, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000 + 7 + 7 + 7, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000 + 7 - 8, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000 + 7, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000 + 7, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000 - 19 - 19 - 29, 0 ], "check balance"); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 2, "score issue"); - assert.equal(await worker2.viewScore(), 3, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 1, "score issue"); - assert.equal(await worker5.viewScore(), 1, "score issue"); - }); - }); - }); - - }); - }); - - describe("โ†’ summary", async () => { - it("gas used", async () => { - totalgas = 0; - for ([descr, gas] of gasReceipt) - { - console.log(`${descr.padEnd(20, " ")} ${gas.toString().padStart(8, " ")}`); - totalgas += gas; - } - console.log(`${"Total gas".padEnd(20, " ")} ${totalgas.toString().padStart(8, " ")}`); - }); - }); - + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = accounts[0]; + let appProvider = accounts[1]; + let datasetProvider = accounts[2]; + let scheduler = accounts[3]; + let worker1 = accounts[4]; + let worker2 = accounts[5]; + let worker3 = accounts[6]; + let worker4 = accounts[7]; + let worker5 = accounts[8]; + let user = accounts[9]; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + + var dealid = null; + var tasks = null; + var trusttarget = null; + + var gasReceipt = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + + trusttarget = 4; + tasks = { + 0: { + taskid: null, + authorizations: {}, + secrets: {}, + results: {}, + consensus: 'iExec BOT 0', + workers: [ + { agent: worker1, useenclave: false, result: 'iExec BOT 0' }, + { agent: worker2, useenclave: false, result: 'iExec BOT 0' }, + ], + }, + 1: { + taskid: null, + authorizations: {}, + secrets: {}, + results: {}, + consensus: 'iExec BOT 1', + workers: [ + { agent: worker2, useenclave: true, result: 'iExec BOT 1' }, + { agent: worker3, useenclave: true, result: 'iExec BOT 1' }, + ], + }, + 2: { + taskid: null, + authorizations: {}, + secrets: {}, + results: {}, + consensus: 'iExec BOT 2', + workers: [ + { agent: worker1, useenclave: false, result: 'iExec BOT 2' }, + { agent: worker3, useenclave: false, result: '' }, + { agent: worker2, useenclave: true, result: 'iExec BOT 2' }, + { agent: worker4, useenclave: true, result: 'iExec BOT 2' }, + { agent: worker5, useenclave: true, result: 'iExec BOT 2' }, + ], + }, + }; + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + txMined = await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolInstance.address, + 'PolicyUpdate', + ); + assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); + assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); + assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); + assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder1 = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 15, + volume: 2, + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + + workerpoolorder2 = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 10, + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder1), + workerpoolorder1.sign, + ), + ); + + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder2), + workerpoolorder2.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 3, // CHANGE FOR BOT + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + const txsMined = [ + await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder1, + requestorder, + { from: user.address }, + ), + await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder2, + requestorder, + { from: user.address }, + ), + ]; + gasReceipt.push(['matchOrders', txsMined[0].receipt.gasUsed]); + gasReceipt.push(['matchOrders', txsMined[1].receipt.gasUsed]); + + deal0 = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 0 }, + ); + deal1 = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 2 }, + ); + + events = tools.extractEvents(txsMined[0], IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, deal0); + + events = tools.extractEvents(txsMined[1], IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, deal1); + + events = tools.extractEvents(txsMined[0], IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, deal0); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder1), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 2); + + events = tools.extractEvents(txsMined[1], IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, deal1); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder2), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 1); + + dealids = await odbtools.utils.requestToDeal( + IexecInstance, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(dealids[0], deal0); + assert.equal(dealids[1], deal1); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize task', async () => { + txMined = await IexecInstance.initialize(dealids[0], 0, { + from: scheduler.address, + }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + tasks[0].taskid = events[0].args.taskid; + + txMined = await IexecInstance.initialize(dealids[0], 1, { + from: scheduler.address, + }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + tasks[1].taskid = events[0].args.taskid; + + txMined = await IexecInstance.initialize(dealids[1], 2, { + from: scheduler.address, + }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + tasks[2].taskid = events[0].args.taskid; + }); + }); + + describe('[3] contribute', async () => { + it('authorization signature', async () => { + for (i in tasks) + for (w of tasks[i].workers) { + const preauth = await scheduler.signPreAuthorization( + tasks[i].taskid, + w.agent.address, + ); + const [auth, secret] = w.useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + tasks[i].authorizations[w.agent.address] = auth; + tasks[i].secrets[w.agent.address] = secret; + } + }); + + it('run', async () => { + for (i in tasks) { + tasks[i].consensus = odbtools.utils.hashConsensus( + tasks[i].taskid, + tasks[i].consensus, + ); + for (w of tasks[i].workers) { + tasks[i].results[w.agent.address] = await w.agent.run( + tasks[i].authorizations[w.agent.address], + tasks[i].secrets[w.agent.address], + w.result, + ); + } + } + }); + + it('[TX] contribute', async () => { + for (i in tasks) + for (w of tasks[i].workers) { + txMined = await IexecInstance.contribute( + tasks[i].authorizations[w.agent.address].taskid, // task (authorization) + tasks[i].results[w.agent.address].hash, // common (result) + tasks[i].results[w.agent.address].seal, // unique (result) + tasks[i].authorizations[w.agent.address].enclave, // address (enclave) + tasks[i].results[w.agent.address].sign, // signature (enclave) + tasks[i].authorizations[w.agent.address].sign, // signature (authorization) + { from: w.agent.address }, + ); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + } + }); + }); + + describe('[4] reveal', async () => { + it('[TX] reveal', async () => { + for (i in tasks) + for (w of tasks[i].workers) + if (tasks[i].results[w.agent.address].hash == tasks[i].consensus.hash) { + txMined = await IexecInstance.reveal( + tasks[i].authorizations[w.agent.address].taskid, + tasks[i].results[w.agent.address].digest, + { from: w.agent.address }, + ); + gasReceipt.push(['reveal', txMined.receipt.gasUsed]); + + events = tools.extractEvents( + txMined, + IexecInstance.address, + 'TaskReveal', + ); + assert.equal( + events[0].args.taskid, + tasks[i].authorizations[w.agent.address].taskid, + ); + assert.equal(events[0].args.worker, w.agent.address); + assert.equal( + events[0].args.digest, + tasks[i].results[w.agent.address].digest, + ); + } + }); + }); + + describe('[5] finalization', async () => { + describe('task 1', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + tasks[0].taskid, + web3.utils.utf8ToHex('aResult 1'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, tasks[0].taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult 1')); + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(tasks[0].taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealids[0]); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)) + .workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, tasks[0].consensus.hash); + assert.equal(Number(task.revealCounter), 2); + assert.equal(Number(task.winnerCounter), 2); + assert.deepEqual( + task.contributors.map((a) => a), + tasks[0].workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult 1')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual( + await appProvider.viewAccount(), + [0 + 3 + 0 + 0, 0], + 'check balance', + ); + assert.deepEqual( + await datasetProvider.viewAccount(), + [0 + 1 + 0 + 0, 0], + 'check balance', + ); + assert.deepEqual( + await scheduler.viewAccount(), + [1000 + 1 - 4 - 7, 0 + 4 + 7], + 'check balance', + ); + assert.deepEqual( + await worker1.viewAccount(), + [1000 + 7 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker2.viewAccount(), + [1000 + 7 - 5 - 8, 0 + 5 + 8], + 'check balance', + ); + assert.deepEqual( + await worker3.viewAccount(), + [1000 - 5 - 8, 0 + 5 + 8], + 'check balance', + ); + assert.deepEqual( + await worker4.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker5.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await user.viewAccount(), + [1000 - 19 - 19 - 29, 0 + 19 + 29], + 'check balance', + ); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 1, 'score issue'); + assert.equal(await worker2.viewScore(), 1, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + }); + + describe('task 2', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + tasks[1].taskid, + web3.utils.utf8ToHex('aResult 2'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, tasks[1].taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult 2')); + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(tasks[1].taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealids[0]); + assert.equal(Number(task.idx), 1); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)) + .workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, tasks[1].consensus.hash); + assert.equal(Number(task.revealCounter), 2); + assert.equal(Number(task.winnerCounter), 2); + assert.deepEqual( + task.contributors.map((a) => a), + tasks[1].workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult 2')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual( + await appProvider.viewAccount(), + [0 + 3 + 3 + 0, 0], + 'check balance', + ); + assert.deepEqual( + await datasetProvider.viewAccount(), + [0 + 1 + 1 + 0, 0], + 'check balance', + ); + assert.deepEqual( + await scheduler.viewAccount(), + [1000 + 1 + 1 - 7, 0 + 7], + 'check balance', + ); + assert.deepEqual( + await worker1.viewAccount(), + [1000 + 7 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker2.viewAccount(), + [1000 + 7 + 7 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker3.viewAccount(), + [1000 + 7 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker4.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker5.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await user.viewAccount(), + [1000 - 19 - 19 - 29, 0 + 29], + 'check balance', + ); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 1, 'score issue'); + assert.equal(await worker2.viewScore(), 2, 'score issue'); + assert.equal(await worker3.viewScore(), 1, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + }); + + describe('task 3', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + tasks[2].taskid, + web3.utils.utf8ToHex('aResult 3'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, tasks[2].taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult 3')); + }); + + describe('checks', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(tasks[2].taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealids[1]); + assert.equal(Number(task.idx), 2); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)) + .workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, tasks[2].consensus.hash); + assert.equal(Number(task.revealCounter), 4); + assert.equal(Number(task.winnerCounter), 4); + assert.deepEqual( + task.contributors.map((a) => a), + tasks[2].workers.map((w) => w.agent.address), + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult 3')); + assert.equal(task.resultsCallback, '0x'); + }); + + it('balances', async () => { + assert.deepEqual( + await appProvider.viewAccount(), + [0 + 3 + 3 + 3, 0], + 'check balance', + ); + assert.deepEqual( + await datasetProvider.viewAccount(), + [0 + 1 + 1 + 1, 0], + 'check balance', + ); + assert.deepEqual( + await scheduler.viewAccount(), + [1000 + 1 + 1 + 5, 0], + 'check balance', + ); + assert.deepEqual( + await worker1.viewAccount(), + [1000 + 7 + 7, 0], + 'check balance', + ); + assert.deepEqual( + await worker2.viewAccount(), + [1000 + 7 + 7 + 7, 0], + 'check balance', + ); + assert.deepEqual( + await worker3.viewAccount(), + [1000 + 7 - 8, 0], + 'check balance', + ); + assert.deepEqual( + await worker4.viewAccount(), + [1000 + 7, 0], + 'check balance', + ); + assert.deepEqual( + await worker5.viewAccount(), + [1000 + 7, 0], + 'check balance', + ); + assert.deepEqual( + await user.viewAccount(), + [1000 - 19 - 19 - 29, 0], + 'check balance', + ); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 2, 'score issue'); + assert.equal(await worker2.viewScore(), 3, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 1, 'score issue'); + assert.equal(await worker5.viewScore(), 1, 'score issue'); + }); + }); + }); + }); + }); + + describe('โ†’ summary', async () => { + it('gas used', async () => { + totalgas = 0; + for ([descr, gas] of gasReceipt) { + console.log(`${descr.padEnd(20, ' ')} ${gas.toString().padStart(8, ' ')}`); + totalgas += gas; + } + console.log(`${'Total gas'.padEnd(20, ' ')} ${totalgas.toString().padStart(8, ' ')}`); + }); + }); }); diff --git a/test/300_fullchain-reopen.js b/test/300_fullchain-reopen.js index c47993eed..ca0c8c7eb 100644 --- a/test/300_fullchain-reopen.js +++ b/test/300_fullchain-reopen.js @@ -1,545 +1,782 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../config/config.json").chains.default; +var DEPLOYMENT = require('../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../utils/tools"); -const enstools = require("../utils/ens-tools"); -const odbtools = require("../utils/odb-tools"); -const constants = require("../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../utils/tools'); +const enstools = require('../utils/ens-tools'); +const odbtools = require('../utils/odb-tools'); +const constants = require('../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Fullchain', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - - var deals = {}; - var tasks = {}; - - var gasReceipt = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - txMined = await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - events = tools.extractEvents(txMined, WorkerpoolInstance.address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - category: 4, - trust: 4, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, // CHANGE FOR BOT - category: 4, - trust: 4, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - txMined = await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - gasReceipt.push([ "matchOrders", txMined.receipt.gasUsed ]); - - dealid = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 0 }, - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, dealid ); - - events = tools.extractEvents(txMined, IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, dealid ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 1 ); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize", async () => { - txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - taskid = web3.utils.soliditySha3({ t: 'bytes32', v: dealid }, { t: 'uint256', v: 0 }); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - }); - }); - - async function sendContribution(worker, taskid, result, useenclave = true) - { - const preauth = await scheduler.signPreAuthorization(taskid, worker.address); - const [ auth, secret ] = useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - const results = await worker.run(auth, secret, result); - - return IexecInstance.contribute( - auth.taskid, // task (authorization) - results.hash, // common (result) - results.seal, // unique (result) - auth.enclave, // address (enclave) - results.sign, // signature (enclave) - auth.sign, // signature (authorization) - { from: worker.address } - ); - } - - describe("[3] contribute", async () => { - it("[TX] contribute", async () => { - enclaveWallet = web3.eth.accounts.create() - txMined = await sendContribution(worker1, taskid, "true", false); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - - enclaveWallet = web3.eth.accounts.create() - txMined = await sendContribution(worker2, taskid, "true", true); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - }); - describe("check", async () => { - it("balances", async () => { - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000 - 7, 0 + 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000 - 29, 0 + 29 ], "check balance"); - }); - }); - }); - - describe("[4] no reveal", async () => { - it("clock fast forward", async () => { - target = Number((await IexecInstance.viewTask(taskid)).revealDeadline); - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_increaseTime", params: [ target - (await web3.eth.getBlock("latest")).timestamp ], id: 0 }, () => {}); - // workaround for https://github.com/trufflesuite/ganache/issues/1033 - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_mine", params: [ ], id: 0 }, () => {}); - }); - }); - - describe("[5] reopen", async () => { - it("[TX] reopen", async () => { - await IexecInstance.reopen(taskid, { from: scheduler.address }); - }); - }); - - describe("[6] contribute", async () => { - it("[TX] contribute", async () => { - await expectRevert.unspecified(sendContribution(worker1, taskid, "true", false)); - - txMined = await sendContribution(worker3, taskid, "true", true); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - - txMined = await sendContribution(worker4, taskid, "true", true); - gasReceipt.push([ "contribute", txMined.receipt.gasUsed ]); - }); - - describe("check", async () => { - it("balances", async () => { - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000 - 7, 0 + 7 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000 - 8, 0 + 8 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000 , 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000 - 29, 0 + 29 ], "check balance"); - }); - }); - }); - - describe("[7] reveal", async () => { - it("[TX] reveal", async () => { - txMined = await IexecInstance.reveal(taskid, odbtools.utils.hashResult(taskid, "true").digest, { from: worker3.address }); - gasReceipt.push([ "reveal", txMined.receipt.gasUsed ]); - txMined = await IexecInstance.reveal(taskid, odbtools.utils.hashResult(taskid, "true").digest, { from: worker4.address }); - gasReceipt.push([ "reveal", txMined.receipt.gasUsed ]); - }); - }); - - describe("[8] finalization", async () => { - it("[TX] finalize", async () => { - txMined = await IexecInstance.finalize( - taskid, - web3.utils.utf8ToHex("aResult"), - "0x", - { from: scheduler.address } - ); - gasReceipt.push([ "finalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult")); - - // TODO: check 2 events by w.address for w in workers - // How to retreive events from the IexecClerk (5 rewards and 1 seize) - }); - }); - }); - - describe("โ†’ summary", async () => { - it("balances", async () => { - assert.deepEqual(await datasetProvider.viewAccount(), [ 0 + 1, 0 ], "check balance"); - assert.deepEqual(await appProvider.viewAccount(), [ 0 + 3, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000 + 3, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000 - 8, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000 - 8, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000 + 19, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000 + 19, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000 , 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000 - 29, 0 ], "check balance"); - }); - - it("balances - extra", async () => { - assert.equal( - Number(await IexecInstance.totalSupply()), - DEPLOYMENT.asset == "Native" - ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 - : Number(await RLCInstance.balanceOf(IexecInstance.address)) - ); - - for (agent of [ appProvider, datasetProvider, scheduler, worker1, worker2, worker3, worker4, worker5, user ]) - { - assert.deepEqual(await agent.viewAccount(), [ Number(await IexecInstance.balanceOf(agent.address)), Number(await IexecInstance.frozenOf(agent.address)) ], "check balance"); - } - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 1, "score issue"); - assert.equal(await worker4.viewScore(), 1, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - - it("gas used", async () => { - totalgas = 0; - for ([descr, gas] of gasReceipt) - { - console.log(`${descr.padEnd(20, " ")} ${gas.toString().padStart(8, " ")}`); - totalgas += gas; - } - console.log(`${"Total gas".padEnd(20, " ")} ${totalgas.toString().padStart(8, " ")}`); - }); - }); - + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + + var deals = {}; + var tasks = {}; + + var gasReceipt = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + txMined = await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolInstance.address, + 'PolicyUpdate', + ); + assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); + assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); + assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); + assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + category: 4, + trust: 4, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, // CHANGE FOR BOT + category: 4, + trust: 4, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { from: user.address }, + ); + gasReceipt.push(['matchOrders', txMined.receipt.gasUsed]); + + dealid = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, dealid); + + events = tools.extractEvents(txMined, IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, dealid); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 1); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize', async () => { + txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + taskid = web3.utils.soliditySha3( + { t: 'bytes32', v: dealid }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + }); + }); + + async function sendContribution(worker, taskid, result, useenclave = true) { + const preauth = await scheduler.signPreAuthorization(taskid, worker.address); + const [auth, secret] = useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + const results = await worker.run(auth, secret, result); + + return IexecInstance.contribute( + auth.taskid, // task (authorization) + results.hash, // common (result) + results.seal, // unique (result) + auth.enclave, // address (enclave) + results.sign, // signature (enclave) + auth.sign, // signature (authorization) + { from: worker.address }, + ); + } + + describe('[3] contribute', async () => { + it('[TX] contribute', async () => { + enclaveWallet = web3.eth.accounts.create(); + txMined = await sendContribution(worker1, taskid, 'true', false); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + + enclaveWallet = web3.eth.accounts.create(); + txMined = await sendContribution(worker2, taskid, 'true', true); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + }); + describe('check', async () => { + it('balances', async () => { + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual( + await scheduler.viewAccount(), + [1000 - 7, 0 + 7], + 'check balance', + ); + assert.deepEqual( + await worker1.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker2.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual( + await user.viewAccount(), + [1000 - 29, 0 + 29], + 'check balance', + ); + }); + }); + }); + + describe('[4] no reveal', async () => { + it('clock fast forward', async () => { + target = Number((await IexecInstance.viewTask(taskid)).revealDeadline); + await web3.currentProvider.send( + { + jsonrpc: '2.0', + method: 'evm_increaseTime', + params: [target - (await web3.eth.getBlock('latest')).timestamp], + id: 0, + }, + () => {}, + ); + // workaround for https://github.com/trufflesuite/ganache/issues/1033 + await web3.currentProvider.send( + { jsonrpc: '2.0', method: 'evm_mine', params: [], id: 0 }, + () => {}, + ); + }); + }); + + describe('[5] reopen', async () => { + it('[TX] reopen', async () => { + await IexecInstance.reopen(taskid, { from: scheduler.address }); + }); + }); + + describe('[6] contribute', async () => { + it('[TX] contribute', async () => { + await expectRevert.unspecified(sendContribution(worker1, taskid, 'true', false)); + + txMined = await sendContribution(worker3, taskid, 'true', true); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + + txMined = await sendContribution(worker4, taskid, 'true', true); + gasReceipt.push(['contribute', txMined.receipt.gasUsed]); + }); + + describe('check', async () => { + it('balances', async () => { + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual( + await scheduler.viewAccount(), + [1000 - 7, 0 + 7], + 'check balance', + ); + assert.deepEqual( + await worker1.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker2.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker3.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual( + await worker4.viewAccount(), + [1000 - 8, 0 + 8], + 'check balance', + ); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual( + await user.viewAccount(), + [1000 - 29, 0 + 29], + 'check balance', + ); + }); + }); + }); + + describe('[7] reveal', async () => { + it('[TX] reveal', async () => { + txMined = await IexecInstance.reveal( + taskid, + odbtools.utils.hashResult(taskid, 'true').digest, + { from: worker3.address }, + ); + gasReceipt.push(['reveal', txMined.receipt.gasUsed]); + txMined = await IexecInstance.reveal( + taskid, + odbtools.utils.hashResult(taskid, 'true').digest, + { from: worker4.address }, + ); + gasReceipt.push(['reveal', txMined.receipt.gasUsed]); + }); + }); + + describe('[8] finalization', async () => { + it('[TX] finalize', async () => { + txMined = await IexecInstance.finalize( + taskid, + web3.utils.utf8ToHex('aResult'), + '0x', + { from: scheduler.address }, + ); + gasReceipt.push(['finalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult')); + + // TODO: check 2 events by w.address for w in workers + // How to retreive events from the IexecClerk (5 rewards and 1 seize) + }); + }); + }); + + describe('โ†’ summary', async () => { + it('balances', async () => { + assert.deepEqual(await datasetProvider.viewAccount(), [0 + 1, 0], 'check balance'); + assert.deepEqual(await appProvider.viewAccount(), [0 + 3, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000 + 3, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000 - 8, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000 - 8, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000 + 19, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000 + 19, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000 - 29, 0], 'check balance'); + }); + + it('balances - extra', async () => { + assert.equal( + Number(await IexecInstance.totalSupply()), + DEPLOYMENT.asset == 'Native' + ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 + : Number(await RLCInstance.balanceOf(IexecInstance.address)), + ); + + for (agent of [ + appProvider, + datasetProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + worker5, + user, + ]) { + assert.deepEqual( + await agent.viewAccount(), + [ + Number(await IexecInstance.balanceOf(agent.address)), + Number(await IexecInstance.frozenOf(agent.address)), + ], + 'check balance', + ); + } + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 1, 'score issue'); + assert.equal(await worker4.viewScore(), 1, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + + it('gas used', async () => { + totalgas = 0; + for ([descr, gas] of gasReceipt) { + console.log(`${descr.padEnd(20, ' ')} ${gas.toString().padStart(8, ' ')}`); + totalgas += gas; + } + console.log(`${'Total gas'.padEnd(20, ' ')} ${totalgas.toString().padStart(8, ' ')}`); + }); + }); }); diff --git a/test/400_contributeAndCallback.js b/test/400_contributeAndCallback.js index 6d846c2d5..b1c00c8ab 100644 --- a/test/400_contributeAndCallback.js +++ b/test/400_contributeAndCallback.js @@ -1,505 +1,692 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../config/config.json").chains.default; +var DEPLOYMENT = require('../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../utils/tools"); -const enstools = require("../utils/ens-tools"); -const odbtools = require("../utils/odb-tools"); -const constants = require("../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../utils/tools'); +const enstools = require('../utils/ens-tools'); +const odbtools = require('../utils/odb-tools'); +const constants = require('../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Fullchain', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - var dealid = null; - var taskid = null; - - var authorization = {}; - var secret = {}; - var result = {}; - var consensus = null; - var worker = []; - - var gasReceipt = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - trusttarget = 0; - worker = { agent: worker1, useenclave: true, result: "iExec the wanderer" }; - consensus = "iExec the wanderer"; - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - txMined = await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - events = tools.extractEvents(txMined, WorkerpoolInstance.address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, // CHANGE FOR BOT - category: 4, - trust: trusttarget, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - txMined = await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - gasReceipt.push([ "matchOrders", txMined.receipt.gasUsed ]); - - dealid = web3.utils.soliditySha3( - { t: 'bytes32', v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder) }, - { t: 'uint256', v: 0 }, - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - assert.equal(events[0].args.dealid, dealid ); - - events = tools.extractEvents(txMined, IexecInstance.address, "OrdersMatched"); - assert.equal(events[0].args.dealid, dealid ); - assert.equal(events[0].args.appHash, odbtools.utils.hashAppOrder (ERC712_domain, apporder )); - assert.equal(events[0].args.datasetHash, odbtools.utils.hashDatasetOrder (ERC712_domain, datasetorder )); - assert.equal(events[0].args.workerpoolHash, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder)); - assert.equal(events[0].args.requestHash, odbtools.utils.hashRequestOrder (ERC712_domain, requestorder )); - assert.equal(events[0].args.volume, 1 ); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize", async () => { - txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); - gasReceipt.push([ "initialize", txMined.receipt.gasUsed ]); - - taskid = web3.utils.soliditySha3({ t: 'bytes32', v: dealid }, { t: 'uint256', v: 0 }); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); - }); - }); - - describe("[3] contributeAndFinalize", async () => { - it("authorization signature", async () => { - const preauth = await scheduler.signPreAuthorization(taskid, worker.agent.address); - [ authorization, secret ] = worker.useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - - }); - - it("run", async () => { - consensus = odbtools.utils.hashConsensus(taskid, consensus); - result = await worker.agent.run(authorization, secret, worker.result); - }); - - it("[TX] contributeAndFinalize", async () => { - txMined = await IexecInstance.contributeAndFinalize( - authorization.taskid, // task (authorization) - result.digest, // digest (result) - web3.utils.utf8ToHex("aResult"), // data (result) - "0x", // data (callback) - authorization.enclave, // address (enclave) - result.sign, // signature (enclave) - authorization.sign, // signature (authorization) - { from: worker.agent.address } - ); - gasReceipt.push([ "contributeAndFinalize", txMined.receipt.gasUsed ]); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, authorization.taskid); - assert.equal(events[0].args.worker, worker.agent.address); - assert.equal(events[0].args.hash, result.hash ); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskConsensus"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.consensus, consensus.hash); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReveal"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.worker, worker.agent.address); - assert.equal(events[0].args.digest, result.digest ); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, taskid ); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult")); - }); - }); - }); - - describe("โ†’ summary", async () => { - it("task", async () => { - task = await IexecInstance.viewTask(taskid); - assert.equal ( task.status, constants.TaskStatusEnum.COMPLETED ); - assert.equal ( task.dealid, dealid ); - assert.equal (Number(task.idx), 0 ); - assert.equal (Number(task.timeref), (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef); - assert.isAbove (Number(task.contributionDeadline), 0 ); - assert.isAbove (Number(task.revealDeadline), 0 ); - assert.isAbove (Number(task.finalDeadline), 0 ); - assert.equal ( task.consensusValue, consensus.hash ); - assert.equal (Number(task.revealCounter), 1 ); - assert.equal (Number(task.winnerCounter), 1 ); - assert.deepEqual( task.contributors.map(a => a), [ worker.agent.address ] ); - assert.equal ( task.results, web3.utils.utf8ToHex("aResult") ); - assert.equal ( task.resultsCallback, "0x" ); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 3, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 1, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1002, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1023, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 971, 0 ], "check balance"); - }); - - it("balances - extra", async () => { - assert.equal( - Number(await IexecInstance.totalSupply()), - DEPLOYMENT.asset == "Native" - ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 - : Number(await RLCInstance.balanceOf(IexecInstance.address)) - ); - - for (agent of [ appProvider, datasetProvider, scheduler, worker1, worker2, worker3, worker4, worker5, user ]) - { - assert.deepEqual(await agent.viewAccount(), [ Number(await IexecInstance.balanceOf(agent.address)), Number(await IexecInstance.frozenOf(agent.address)) ], "check balance"); - } - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - - it("gas used", async () => { - totalgas = 0; - for ([descr, gas] of gasReceipt) - { - console.log(`${descr.padEnd(24, " ")} ${gas.toString().padStart(8, " ")}`); - totalgas += gas; - } - console.log(`${"Total gas".padEnd(24, " ")} ${totalgas.toString().padStart(8, " ")}`); - }); - }); - + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + var dealid = null; + var taskid = null; + + var authorization = {}; + var secret = {}; + var result = {}; + var consensus = null; + var worker = []; + var resultsCallback = null; + + var gasReceipt = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + + trusttarget = 0; + worker = { agent: worker1, useenclave: true, result: 'iExec the wanderer' }; + consensus = 'iExec the wanderer'; + resultsCallback = web3.utils.utf8ToHex('iExec the wanderer'); + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + txMined = await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolInstance.address, + 'PolicyUpdate', + ); + assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30); + assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35); + assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1); + assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, // CHANGE FOR BOT + category: 4, + trust: trusttarget, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: ethers.Wallet.createRandom().address, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { from: user.address }, + ); + gasReceipt.push(['matchOrders', txMined.receipt.gasUsed]); + + dealid = web3.utils.soliditySha3( + { + t: 'bytes32', + v: odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'SchedulerNotice'); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + assert.equal(events[0].args.dealid, dealid); + + events = tools.extractEvents(txMined, IexecInstance.address, 'OrdersMatched'); + assert.equal(events[0].args.dealid, dealid); + assert.equal( + events[0].args.appHash, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + ); + assert.equal( + events[0].args.datasetHash, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + ); + assert.equal( + events[0].args.workerpoolHash, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + ); + assert.equal( + events[0].args.requestHash, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + assert.equal(events[0].args.volume, 1); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize', async () => { + txMined = await IexecInstance.initialize(dealid, 0, { from: scheduler.address }); + gasReceipt.push(['initialize', txMined.receipt.gasUsed]); + + taskid = web3.utils.soliditySha3( + { t: 'bytes32', v: dealid }, + { t: 'uint256', v: 0 }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskInitialize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.workerpool, WorkerpoolInstance.address); + }); + }); + + describe('[3] contributeAndFinalize', async () => { + it('authorization signature', async () => { + const preauth = await scheduler.signPreAuthorization(taskid, worker.agent.address); + [authorization, secret] = worker.useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + }); + + it('run', async () => { + consensus = odbtools.utils.hashConsensus(taskid, consensus); + result = await worker.agent.run(authorization, secret, worker.result); + }); + + it('[TX] contributeAndFinalize', async () => { + txMined = await IexecInstance.contributeAndFinalize( + authorization.taskid, // task (authorization) + result.digest, // digest (result) + web3.utils.utf8ToHex('aResult'), // data (result) + resultsCallback, // data (resultsCallback) + authorization.enclave, // address (enclave) + result.sign, // signature (enclave) + authorization.sign, // signature (authorization) + { from: worker.agent.address }, + ); + gasReceipt.push(['contributeAndFinalize', txMined.receipt.gasUsed]); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskContribute'); + assert.equal(events[0].args.taskid, authorization.taskid); + assert.equal(events[0].args.worker, worker.agent.address); + assert.equal(events[0].args.hash, result.hash); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskConsensus'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.consensus, consensus.hash); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskReveal'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.worker, worker.agent.address); + assert.equal(events[0].args.digest, result.digest); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, taskid); + assert.equal(events[0].args.results, web3.utils.utf8ToHex('aResult')); + }); + //[TODO] contributeAndFinalize without callback + }); + }); + + describe('โ†’ summary', async () => { + it('task', async () => { + task = await IexecInstance.viewTask(taskid); + assert.equal(task.status, constants.TaskStatusEnum.COMPLETED); + assert.equal(task.dealid, dealid); + assert.equal(Number(task.idx), 0); + assert.equal( + Number(task.timeref), + (await IexecInstance.viewCategory(requestorder.category)).workClockTimeRef, + ); + assert.isAbove(Number(task.contributionDeadline), 0); + assert.isAbove(Number(task.revealDeadline), 0); + assert.isAbove(Number(task.finalDeadline), 0); + assert.equal(task.consensusValue, consensus.hash); + assert.equal(Number(task.revealCounter), 1); + assert.equal(Number(task.winnerCounter), 1); + assert.deepEqual( + task.contributors.map((a) => a), + [worker.agent.address], + ); + assert.equal(task.results, web3.utils.utf8ToHex('aResult')); + assert.equal(task.resultsCallback, resultsCallback); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [3, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [1, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1002, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1023, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [971, 0], 'check balance'); + }); + + it('balances - extra', async () => { + assert.equal( + Number(await IexecInstance.totalSupply()), + DEPLOYMENT.asset == 'Native' + ? Number(await web3.eth.getBalance(IexecInstance.address)) / 10 ** 9 + : Number(await RLCInstance.balanceOf(IexecInstance.address)), + ); + + for (agent of [ + appProvider, + datasetProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + worker5, + user, + ]) { + assert.deepEqual( + await agent.viewAccount(), + [ + Number(await IexecInstance.balanceOf(agent.address)), + Number(await IexecInstance.frozenOf(agent.address)), + ], + 'check balance', + ); + } + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + + it('gas used', async () => { + totalgas = 0; + for ([descr, gas] of gasReceipt) { + console.log(`${descr.padEnd(24, ' ')} ${gas.toString().padStart(8, ' ')}`); + totalgas += gas; + } + console.log(`${'Total gas'.padEnd(24, ' ')} ${totalgas.toString().padStart(8, ' ')}`); + }); + }); }); diff --git a/test/ERC1154/callback.js b/test/ERC1154/callback.js index c64626454..0d496fa1a 100644 --- a/test/ERC1154/callback.js +++ b/test/ERC1154/callback.js @@ -1,593 +1,882 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../../config/config.json").chains.default; +var DEPLOYMENT = require('../../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -var TestClient = artifacts.require("./TestClient.sol"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../utils/tools"); -const enstools = require("../../utils/ens-tools"); -const odbtools = require("../../utils/odb-tools"); -const constants = require("../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +var TestClient = artifacts.require('./TestClient.sol'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../../utils/tools'); +const enstools = require('../../utils/ens-tools'); +const odbtools = require('../../utils/odb-tools'); +const constants = require('../../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('ERC1154: callback', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder1 = null; - var requestorder2 = null; - var requestorder3 = null; - - var deals = {}; - var tasks = {}; - - var TestClientInstance = null; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - TestClientInstance = await TestClient.new(); - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 0, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 1000, - category: 4, - trust: 0, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - describe("no callback", async () => { - it("sign", async () => { - requestorder1 = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 0, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 0, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder1), - requestorder1.sign - )); - }); - }); - - describe("invalid callback", async () => { - it("sign", async () => { - requestorder2 = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 0, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 0, - requester: user.address, - beneficiary: user.address, - callback: AppInstance.address, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder2), - requestorder2.sign - )); - }); - }); - - describe("valid callback", async () => { - it("sign", async () => { - requestorder3 = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 0, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 0, - requester: user.address, - beneficiary: user.address, - callback: TestClientInstance.address, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder3), - requestorder3.sign - )); - }); - }); - - describe("callback EOA", async () => { - it("sign", async () => { - requestorder4 = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 0, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 0, - requester: user.address, - beneficiary: user.address, - callback: "0x0000000000000000000000000000000000000001", - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder4), - requestorder4.sign - )); - }); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - const txsMined = [ - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder1, { from: user.address }), - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder2, { from: user.address }), - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder3, { from: user.address }), - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder4, { from: user.address }), - ]; - - deals[1] = tools.extractEvents(txsMined[0], IexecInstance.address, "OrdersMatched")[0].args.dealid; - deals[2] = tools.extractEvents(txsMined[1], IexecInstance.address, "OrdersMatched")[0].args.dealid; - deals[3] = tools.extractEvents(txsMined[2], IexecInstance.address, "OrdersMatched")[0].args.dealid; - deals[4] = tools.extractEvents(txsMined[3], IexecInstance.address, "OrdersMatched")[0].args.dealid; - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize", async () => { - const txsMined = [ - await IexecInstance.initialize(deals[1], 0, { from: scheduler.address }), - await IexecInstance.initialize(deals[2], 0, { from: scheduler.address }), - await IexecInstance.initialize(deals[3], 0, { from: scheduler.address }), - await IexecInstance.initialize(deals[4], 0, { from: scheduler.address }), - ]; - - tasks[1] = tools.extractEvents(txsMined[0], IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[2] = tools.extractEvents(txsMined[1], IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[3] = tools.extractEvents(txsMined[2], IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[4] = tools.extractEvents(txsMined[3], IexecInstance.address, "TaskInitialize")[0].args.taskid; - }); - }); - - async function sendContribution(worker, taskid, result, useenclave = true, callback) - { - const preauth = await scheduler.signPreAuthorization(taskid, worker.address); - const [ auth, secret ] = useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - const results = await worker.run(auth, secret, result, callback); - - return IexecInstance.contribute( - auth.taskid, // task (authorization) - results.hash, // common (result) - results.seal, // unique (result) - auth.enclave, // address (enclave) - results.sign, // signature (enclave) - auth.sign, // signature (authorization) - { from: worker.address } - ); - } - - describe("[3] contribute", async () => { - it("[TX] contribute", async () => { - await sendContribution(worker1, tasks[1], "aResult 1", false, web3.utils.utf8ToHex("callback-1")); - await sendContribution(worker1, tasks[2], "aResult 2", false, web3.utils.utf8ToHex("callback-2")); - await sendContribution(worker1, tasks[3], "aResult 3", false, web3.utils.utf8ToHex("callback-3")); - await sendContribution(worker1, tasks[4], "aResult 4", false, web3.utils.utf8ToHex("callback-4")); - }); - }); - - describe("[4] reveal", async () => { - it("[TX] reveal", async () => { - await IexecInstance.reveal(tasks[1], odbtools.utils.hashByteResult(tasks[1], web3.utils.soliditySha3({t: 'bytes', v: web3.utils.utf8ToHex("callback-1") })).digest, { from: worker1.address }); - await IexecInstance.reveal(tasks[2], odbtools.utils.hashByteResult(tasks[2], web3.utils.soliditySha3({t: 'bytes', v: web3.utils.utf8ToHex("callback-2") })).digest, { from: worker1.address }); - await IexecInstance.reveal(tasks[3], odbtools.utils.hashByteResult(tasks[3], web3.utils.soliditySha3({t: 'bytes', v: web3.utils.utf8ToHex("callback-3") })).digest, { from: worker1.address }); - await IexecInstance.reveal(tasks[4], odbtools.utils.hashByteResult(tasks[4], web3.utils.soliditySha3({t: 'bytes', v: web3.utils.utf8ToHex("callback-4") })).digest, { from: worker1.address }); - }); - }); - - describe("[5] finalization", async () => { - describe("bad callback", async () => { - it("[TX] no call", async () => { - await expectRevert.unspecified(IexecInstance.finalize( - tasks[1], - web3.utils.utf8ToHex("aResult 1"), - web3.utils.utf8ToHex("wrong-callback"), - { from: scheduler.address } - )); - }); - }); - - describe("no callback", async () => { - it("[TX] no call", async () => { - txMined = await IexecInstance.finalize( - tasks[1], - web3.utils.utf8ToHex("aResult 1"), - web3.utils.utf8ToHex("callback-1"), - { from: scheduler.address } - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[1], "check taskid"); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 1"), "check consensus (results)"); - }); - }); - - describe("invalid callback", async () => { - it("[TX] doesn't revert", async () => { - txMined = await IexecInstance.finalize( - tasks[2], - web3.utils.utf8ToHex("aResult 2"), - web3.utils.utf8ToHex("callback-2"), - { from: scheduler.address } - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[2], "check taskid"); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 2"), "check consensus (results)"); - }); - }); - - describe("valid callback", async () => { - it("[TX] call", async () => { - assert.equal(await TestClientInstance.store(tasks[3]), null, "Error in test client: store empty"); - - txMined = await IexecInstance.finalize( - tasks[3], - web3.utils.utf8ToHex("aResult 3"), - web3.utils.utf8ToHex("callback-3"), - { from: scheduler.address } - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[3], "check taskid"); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 3"), "check consensus (results)"); - }); - - it("check", async () => { - assert.equal(await TestClientInstance.store(tasks[3]), web3.utils.utf8ToHex("callback-3"), "Error in test client: dataset not stored"); - // fails under coverage because of additional cost for instrumentation - // assert.equal(await TestClientInstance.gstore(tasks[3]), await IexecInstance.callbackgas()-343); - }); - }); - - describe("callback EOA", async () => { - it("[TX] doesn't revert", async () => { - txMined = await IexecInstance.finalize( - tasks[4], - web3.utils.utf8ToHex("aResult 4"), - web3.utils.utf8ToHex("callback-4"), - { from: scheduler.address } - ); - - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[4], "check taskid"); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 4"), "check consensus (results)"); - }); - }); - }); - }); + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder1 = null; + var requestorder2 = null; + var requestorder3 = null; + + var deals = {}; + var tasks = {}; + + var TestClientInstance = null; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + + TestClientInstance = await TestClient.new(); + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 0, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 1000, + category: 4, + trust: 0, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + describe('no callback', async () => { + it('sign', async () => { + requestorder1 = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 0, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 0, + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder1), + requestorder1.sign, + ), + ); + }); + }); + + describe('invalid callback', async () => { + it('sign', async () => { + requestorder2 = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 0, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 0, + requester: user.address, + beneficiary: user.address, + callback: AppInstance.address, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder2), + requestorder2.sign, + ), + ); + }); + }); + + describe('valid callback', async () => { + it('sign', async () => { + requestorder3 = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 0, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 0, + requester: user.address, + beneficiary: user.address, + callback: TestClientInstance.address, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder3), + requestorder3.sign, + ), + ); + }); + }); + + describe('callback EOA', async () => { + it('sign', async () => { + requestorder4 = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 0, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 0, + requester: user.address, + beneficiary: user.address, + callback: '0x0000000000000000000000000000000000000001', + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder4), + requestorder4.sign, + ), + ); + }); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + const txsMined = [ + await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder1, + { from: user.address }, + ), + await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder2, + { from: user.address }, + ), + await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder3, + { from: user.address }, + ), + await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder4, + { from: user.address }, + ), + ]; + + deals[1] = tools.extractEvents( + txsMined[0], + IexecInstance.address, + 'OrdersMatched', + )[0].args.dealid; + deals[2] = tools.extractEvents( + txsMined[1], + IexecInstance.address, + 'OrdersMatched', + )[0].args.dealid; + deals[3] = tools.extractEvents( + txsMined[2], + IexecInstance.address, + 'OrdersMatched', + )[0].args.dealid; + deals[4] = tools.extractEvents( + txsMined[3], + IexecInstance.address, + 'OrdersMatched', + )[0].args.dealid; + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize', async () => { + const txsMined = [ + await IexecInstance.initialize(deals[1], 0, { from: scheduler.address }), + await IexecInstance.initialize(deals[2], 0, { from: scheduler.address }), + await IexecInstance.initialize(deals[3], 0, { from: scheduler.address }), + await IexecInstance.initialize(deals[4], 0, { from: scheduler.address }), + ]; + + tasks[1] = tools.extractEvents( + txsMined[0], + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; + tasks[2] = tools.extractEvents( + txsMined[1], + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; + tasks[3] = tools.extractEvents( + txsMined[2], + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; + tasks[4] = tools.extractEvents( + txsMined[3], + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; + }); + }); + + async function sendContribution(worker, taskid, result, useenclave = true, callback) { + const preauth = await scheduler.signPreAuthorization(taskid, worker.address); + const [auth, secret] = useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + const results = await worker.run(auth, secret, result, callback); + + return IexecInstance.contribute( + auth.taskid, // task (authorization) + results.hash, // common (result) + results.seal, // unique (result) + auth.enclave, // address (enclave) + results.sign, // signature (enclave) + auth.sign, // signature (authorization) + { from: worker.address }, + ); + } + + describe('[3] contribute', async () => { + it('[TX] contribute', async () => { + await sendContribution( + worker1, + tasks[1], + 'aResult 1', + false, + web3.utils.utf8ToHex('callback-1'), + ); + await sendContribution( + worker1, + tasks[2], + 'aResult 2', + false, + web3.utils.utf8ToHex('callback-2'), + ); + await sendContribution( + worker1, + tasks[3], + 'aResult 3', + false, + web3.utils.utf8ToHex('callback-3'), + ); + await sendContribution( + worker1, + tasks[4], + 'aResult 4', + false, + web3.utils.utf8ToHex('callback-4'), + ); + }); + }); + + describe('[4] reveal', async () => { + it('[TX] reveal', async () => { + await IexecInstance.reveal( + tasks[1], + odbtools.utils.hashByteResult( + tasks[1], + web3.utils.soliditySha3({ + t: 'bytes', + v: web3.utils.utf8ToHex('callback-1'), + }), + ).digest, + { from: worker1.address }, + ); + await IexecInstance.reveal( + tasks[2], + odbtools.utils.hashByteResult( + tasks[2], + web3.utils.soliditySha3({ + t: 'bytes', + v: web3.utils.utf8ToHex('callback-2'), + }), + ).digest, + { from: worker1.address }, + ); + await IexecInstance.reveal( + tasks[3], + odbtools.utils.hashByteResult( + tasks[3], + web3.utils.soliditySha3({ + t: 'bytes', + v: web3.utils.utf8ToHex('callback-3'), + }), + ).digest, + { from: worker1.address }, + ); + await IexecInstance.reveal( + tasks[4], + odbtools.utils.hashByteResult( + tasks[4], + web3.utils.soliditySha3({ + t: 'bytes', + v: web3.utils.utf8ToHex('callback-4'), + }), + ).digest, + { from: worker1.address }, + ); + }); + }); + + describe('[5] finalization', async () => { + describe('bad callback', async () => { + it('[TX] no call', async () => { + await expectRevert.unspecified( + IexecInstance.finalize( + tasks[1], + web3.utils.utf8ToHex('aResult 1'), + web3.utils.utf8ToHex('wrong-callback'), + { from: scheduler.address }, + ), + ); + }); + }); + + describe('no callback', async () => { + it('[TX] no call', async () => { + txMined = await IexecInstance.finalize( + tasks[1], + web3.utils.utf8ToHex('aResult 1'), + web3.utils.utf8ToHex('callback-1'), + { from: scheduler.address }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, tasks[1], 'check taskid'); + assert.equal( + events[0].args.results, + web3.utils.utf8ToHex('aResult 1'), + 'check consensus (results)', + ); + }); + }); + + describe('invalid callback', async () => { + it("[TX] doesn't revert", async () => { + txMined = await IexecInstance.finalize( + tasks[2], + web3.utils.utf8ToHex('aResult 2'), + web3.utils.utf8ToHex('callback-2'), + { from: scheduler.address }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, tasks[2], 'check taskid'); + assert.equal( + events[0].args.results, + web3.utils.utf8ToHex('aResult 2'), + 'check consensus (results)', + ); + }); + }); + + describe('valid callback', async () => { + it('[TX] call', async () => { + assert.equal( + await TestClientInstance.store(tasks[3]), + null, + 'Error in test client: store empty', + ); + + txMined = await IexecInstance.finalize( + tasks[3], + web3.utils.utf8ToHex('aResult 3'), + web3.utils.utf8ToHex('callback-3'), + { from: scheduler.address }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, tasks[3], 'check taskid'); + assert.equal( + events[0].args.results, + web3.utils.utf8ToHex('aResult 3'), + 'check consensus (results)', + ); + }); + + it('check', async () => { + assert.equal( + await TestClientInstance.store(tasks[3]), + web3.utils.utf8ToHex('callback-3'), + 'Error in test client: dataset not stored', + ); + // fails under coverage because of additional cost for instrumentation + // assert.equal(await TestClientInstance.gstore(tasks[3]), await IexecInstance.callbackgas()-343); + }); + }); + + describe('callback EOA', async () => { + it("[TX] doesn't revert", async () => { + txMined = await IexecInstance.finalize( + tasks[4], + web3.utils.utf8ToHex('aResult 4'), + web3.utils.utf8ToHex('callback-4'), + { from: scheduler.address }, + ); + + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskFinalize'); + assert.equal(events[0].args.taskid, tasks[4], 'check taskid'); + assert.equal( + events[0].args.results, + web3.utils.utf8ToHex('aResult 4'), + 'check consensus (results)', + ); + }); + }); + }); + }); }); diff --git a/test/ERC1154/resultFor.js b/test/ERC1154/resultFor.js index ca5782d47..abad2ea3f 100644 --- a/test/ERC1154/resultFor.js +++ b/test/ERC1154/resultFor.js @@ -1,435 +1,658 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +//require("../000_fullchain-boost.test") +const loadTruffleFixtureDeployment = require('../../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../../config/config.json").chains.default; +var DEPLOYMENT = require('../../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../utils/tools"); -const enstools = require("../../utils/ens-tools"); -const odbtools = require("../../utils/odb-tools"); -const constants = require("../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../../utils/tools'); +const enstools = require('../../utils/ens-tools'); +const odbtools = require('../../utils/odb-tools'); +const constants = require('../../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('ERC1154: resultFor', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; - - var deals = {} - var tasks = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - }); - }); - }); - - describe("tokens", async () => { - it("balances before", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 0, 0 ], "check balance"); - }); - - it("deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.owner, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.spender, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Approval")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.to, IexecInstance.address); - assert.equal(tools.extractEvents(txMined, RLCInstance.address, "Transfer")[0].args.value, 10000000); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.from, constants.NULL.ADDRESS); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.to, iexecAdmin.address); - assert.equal(tools.extractEvents(txMined, IexecInstance.address, "Transfer")[0].args.value, 10000000); - break; - } - - const txsMined = [ - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }), - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), - ]; - - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[0], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[1], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[2], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[3], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[4], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[5], IexecInstance.address, "Transfer")[0].args.value, 1000); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.from, iexecAdmin.address); - assert.equal(tools.extractEvents(txsMined[6], IexecInstance.address, "Transfer")[0].args.value, 1000); - }); - - it("balances after", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 1000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 1000, 0 ], "check balance"); - }); - }); - - it("score", async () => { - assert.equal(await worker1.viewScore(), 0, "score issue"); - assert.equal(await worker2.viewScore(), 0, "score issue"); - assert.equal(await worker3.viewScore(), 0, "score issue"); - assert.equal(await worker4.viewScore(), 0, "score issue"); - assert.equal(await worker5.viewScore(), 0, "score issue"); - }); - }); - - describe("โ†’ pipeline", async () => { - describe("[0] orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); - - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 0, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); - - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 1000, - category: 4, - trust: 0, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); - - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 0, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 10, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 0, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - - describe("[1] order matching", async () => { - it("[TX] match", async () => { - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder)); - }); - }); - - describe("[2] initialization", async () => { - it("[TX] initialize", async () => { - tasks[0] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[0] }, { t: 'uint256', v: 0 }); // uninitialized - tasks[1] = tools.extractEvents(await IexecInstance.initialize(deals[0], 1, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // finalized - tasks[2] = tools.extractEvents(await IexecInstance.initialize(deals[0], 2, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // initialized - tasks[3] = tools.extractEvents(await IexecInstance.initialize(deals[0], 3, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // contributions - tasks[4] = tools.extractEvents(await IexecInstance.initialize(deals[0], 4, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // consensus - tasks[5] = tools.extractEvents(await IexecInstance.initialize(deals[0], 5, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // reveal - }); - }); - - async function sendContribution(worker, taskid, result, useenclave = true, callback) - { - const preauth = await scheduler.signPreAuthorization(taskid, worker.address); - const [ auth, secret ] = useenclave ? await broker.signAuthorization(preauth) : [ preauth, null ]; - const results = await worker.run(auth, secret, result, callback); - - return IexecInstance.contribute( - auth.taskid, // task (authorization) - results.hash, // common (result) - results.seal, // unique (result) - auth.enclave, // address (enclave) - results.sign, // signature (enclave) - auth.sign, // signature (authorization) - { from: worker.address } - ); - } - - describe("[3] contribute", async () => { - it("[TX] contribute", async () => { - await sendContribution(worker1, tasks[2], "true", false, web3.utils.utf8ToHex("callback-2")); - await sendContribution(worker1, tasks[3], "true", false, web3.utils.utf8ToHex("callback-3")); - await sendContribution(worker1, tasks[4], "true", false, web3.utils.utf8ToHex("callback-4")); - await sendContribution(worker1, tasks[5], "true", false, web3.utils.utf8ToHex("callback-5")); - }); - }); - - describe("[4] reveal", async () => { - it("[TX] reveal", async () => { - await IexecInstance.reveal(tasks[4], odbtools.utils.hashByteResult(tasks[4], web3.utils.soliditySha3({t: 'bytes', v: web3.utils.utf8ToHex("callback-4") })).digest, { from: worker1.address }); - await IexecInstance.reveal(tasks[5], odbtools.utils.hashByteResult(tasks[5], web3.utils.soliditySha3({t: 'bytes', v: web3.utils.utf8ToHex("callback-5") })).digest, { from: worker1.address }); - }); - }); - - describe("[5] finalization", async () => { - it("[TX] finalize", async () => { - await IexecInstance.finalize(tasks[5], web3.utils.utf8ToHex("aResult 5"), web3.utils.utf8ToHex("callback-5"), { from: scheduler.address }); - }); - }); - }); - - describe("โ†’ result for", async () => { - describe("uninitialized", async () => { - it("reverts", async () => { - await expectRevert.unspecified(IexecInstance.resultFor(tasks[0])); - }); - }); - describe("initialized", async () => { - it("reverts", async () => { - await expectRevert.unspecified(IexecInstance.resultFor(tasks[1])); - }); - }); - describe("contributed", async () => { - it("reverts", async () => { - await expectRevert.unspecified(IexecInstance.resultFor(tasks[2])); - }); - }); - describe("consensus", async () => { - it("reverts", async () => { - await expectRevert.unspecified(IexecInstance.resultFor(tasks[3])); - }); - }); - describe("reveal", async () => { - it("reverts", async () => { - await expectRevert.unspecified(IexecInstance.resultFor(tasks[4])); - }); - }); - describe("finalized", async () => { - it("valid", async () => { - assert.equal(await IexecInstance.resultFor(tasks[5]), web3.utils.utf8ToHex("callback-5"), "resultFor returned incorrect value"); - }); - }); - }); + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; + + var deals = {}; + var tasks = {}; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + }); + + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + }); + }); + }); + + describe('tokens', async () => { + it('balances before', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [0, 0], 'check balance'); + }); + + it('deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .owner, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .spender, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Approval')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .to, + IexecInstance.address, + ); + assert.equal( + tools.extractEvents(txMined, RLCInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .from, + constants.NULL.ADDRESS, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .to, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txMined, IexecInstance.address, 'Transfer')[0].args + .value, + 10000000, + ); + break; + } + + const txsMined = [ + await IexecInstance.transfer(scheduler.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker1.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker2.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker3.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker4.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(worker5.address, 1000, { + from: iexecAdmin.address, + }), + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }), + ]; + + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[0], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[1], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[2], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[3], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[4], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[5], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .from, + iexecAdmin.address, + ); + assert.equal( + tools.extractEvents(txsMined[6], IexecInstance.address, 'Transfer')[0].args + .value, + 1000, + ); + }); + + it('balances after', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [1000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [1000, 0], 'check balance'); + }); + }); + + it('score', async () => { + assert.equal(await worker1.viewScore(), 0, 'score issue'); + assert.equal(await worker2.viewScore(), 0, 'score issue'); + assert.equal(await worker3.viewScore(), 0, 'score issue'); + assert.equal(await worker4.viewScore(), 0, 'score issue'); + assert.equal(await worker5.viewScore(), 0, 'score issue'); + }); + }); + + describe('โ†’ pipeline', async () => { + describe('[0] orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); + + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 0, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); + + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 1000, + category: 4, + trust: 0, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); + + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 0, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 10, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 0, + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + + describe('[1] order matching', async () => { + it('[TX] match', async () => { + await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder, + requestorder, + { from: user.address }, + ); + deals = await odbtools.utils.requestToDeal( + IexecInstance, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + }); + }); + + describe('[2] initialization', async () => { + it('[TX] initialize', async () => { + tasks[0] = web3.utils.soliditySha3( + { t: 'bytes32', v: deals[0] }, + { t: 'uint256', v: 0 }, + ); // uninitialized + tasks[1] = tools.extractEvents( + await IexecInstance.initialize(deals[0], 1, { from: scheduler.address }), + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; // finalized + tasks[2] = tools.extractEvents( + await IexecInstance.initialize(deals[0], 2, { from: scheduler.address }), + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; // initialized + tasks[3] = tools.extractEvents( + await IexecInstance.initialize(deals[0], 3, { from: scheduler.address }), + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; // contributions + tasks[4] = tools.extractEvents( + await IexecInstance.initialize(deals[0], 4, { from: scheduler.address }), + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; // consensus + tasks[5] = tools.extractEvents( + await IexecInstance.initialize(deals[0], 5, { from: scheduler.address }), + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; // reveal + }); + }); + + async function sendContribution(worker, taskid, result, useenclave = true, callback) { + const preauth = await scheduler.signPreAuthorization(taskid, worker.address); + const [auth, secret] = useenclave + ? await broker.signAuthorization(preauth) + : [preauth, null]; + const results = await worker.run(auth, secret, result, callback); + + return IexecInstance.contribute( + auth.taskid, // task (authorization) + results.hash, // common (result) + results.seal, // unique (result) + auth.enclave, // address (enclave) + results.sign, // signature (enclave) + auth.sign, // signature (authorization) + { from: worker.address }, + ); + } + + describe('[3] contribute', async () => { + it('[TX] contribute', async () => { + await sendContribution( + worker1, + tasks[2], + 'true', + false, + web3.utils.utf8ToHex('callback-2'), + ); + await sendContribution( + worker1, + tasks[3], + 'true', + false, + web3.utils.utf8ToHex('callback-3'), + ); + await sendContribution( + worker1, + tasks[4], + 'true', + false, + web3.utils.utf8ToHex('callback-4'), + ); + await sendContribution( + worker1, + tasks[5], + 'true', + false, + web3.utils.utf8ToHex('callback-5'), + ); + }); + }); + + describe('[4] reveal', async () => { + it('[TX] reveal', async () => { + await IexecInstance.reveal( + tasks[4], + odbtools.utils.hashByteResult( + tasks[4], + web3.utils.soliditySha3({ + t: 'bytes', + v: web3.utils.utf8ToHex('callback-4'), + }), + ).digest, + { from: worker1.address }, + ); + await IexecInstance.reveal( + tasks[5], + odbtools.utils.hashByteResult( + tasks[5], + web3.utils.soliditySha3({ + t: 'bytes', + v: web3.utils.utf8ToHex('callback-5'), + }), + ).digest, + { from: worker1.address }, + ); + }); + }); + + describe('[5] finalization', async () => { + it('[TX] finalize', async () => { + await IexecInstance.finalize( + tasks[5], + web3.utils.utf8ToHex('aResult 5'), + web3.utils.utf8ToHex('callback-5'), + { from: scheduler.address }, + ); + }); + }); + }); + + describe('โ†’ result for', async () => { + describe('uninitialized', async () => { + it('reverts', async () => { + await expectRevert.unspecified(IexecInstance.resultFor(tasks[0])); + }); + }); + describe('initialized', async () => { + it('reverts', async () => { + await expectRevert.unspecified(IexecInstance.resultFor(tasks[1])); + }); + }); + describe('contributed', async () => { + it('reverts', async () => { + await expectRevert.unspecified(IexecInstance.resultFor(tasks[2])); + }); + }); + describe('consensus', async () => { + it('reverts', async () => { + await expectRevert.unspecified(IexecInstance.resultFor(tasks[3])); + }); + }); + describe('reveal', async () => { + it('reverts', async () => { + await expectRevert.unspecified(IexecInstance.resultFor(tasks[4])); + }); + }); + describe('finalized', async () => { + it('valid', async () => { + assert.equal( + await IexecInstance.resultFor(tasks[5]), + web3.utils.utf8ToHex('callback-5'), + 'resultFor returned incorrect value', + ); + }); + }); + }); }); diff --git a/test/byContract/ENSIntegration/ENSIntegration.js b/test/byContract/ENSIntegration/ENSIntegration.js deleted file mode 100644 index e4a70d9b8..000000000 --- a/test/byContract/ENSIntegration/ENSIntegration.js +++ /dev/null @@ -1,135 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERLCTokenSwap = artifacts.require('@iexec/erlc/ERLCTokenSwap'); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); -var ENSRegistry = artifacts.require("@ensdomains/ens/ENSRegistry"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('ENSIntegration', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - var ENSInstance = null; - - var categories = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - ENSInstance = await ENSRegistry.deployed(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * * - ***************************************************************************/ - describe("Initial state (migration)", async () => { - it("lookup", async () => { - assert.equal(await enstools.lookup(IexecInstance.address ), "core.v5.iexec.eth" ); - assert.equal(await enstools.lookup(AppRegistryInstance.address ), "apps.v5.iexec.eth" ); - assert.equal(await enstools.lookup(DatasetRegistryInstance.address ), "datasets.v5.iexec.eth" ); - assert.equal(await enstools.lookup(WorkerpoolRegistryInstance.address), "workerpools.v5.iexec.eth"); - }) - it("resolve", async () => { - if (DEPLOYMENT.asset == "Token") { - assert.equal(await enstools.resolve("rlc.iexec.eth"), (await RLC.deployed()).address); - } - if (DEPLOYMENT.asset == "Token" && !!process.env.KYC) { - assert.equal(await enstools.resolve("erlc.iexec.eth"), (await ERLCTokenSwap.deployed()).address); - } - assert.equal(await enstools.resolve("core.v5.iexec.eth" ), IexecInstance.address ); - assert.equal(await enstools.resolve("apps.v5.iexec.eth" ), AppRegistryInstance.address ); - assert.equal(await enstools.resolve("datasets.v5.iexec.eth" ), DatasetRegistryInstance.address ); - assert.equal(await enstools.resolve("workerpools.v5.iexec.eth"), WorkerpoolRegistryInstance.address); - }); - }); - - describe("Reverse register", async () => { - describe("unauthorized", async () => { - it("reverts", async () => { - await expectRevert(IexecInstance.setName(ENSInstance.address, "wrong.domain.eth", { from: user.address }), "Ownable: caller is not the owner"); - }); - }); - - describe("authorized", async () => { - it("success", async () => { - await IexecInstance.setName(ENSInstance.address, "test.namespace.eth", { from: iexecAdmin.address }); - }); - - it("lookup", async () => { - assert.equal(await enstools.lookup(IexecInstance.address), "test.namespace.eth"); - }); - }); - }); -}); diff --git a/test/byContract/ENSIntegration/ENSIntegration.test.ts b/test/byContract/ENSIntegration/ENSIntegration.test.ts new file mode 100644 index 000000000..f233bf54e --- /dev/null +++ b/test/byContract/ENSIntegration/ENSIntegration.test.ts @@ -0,0 +1,126 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { deployments, ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { + ENSRegistry, + ENSRegistry__factory, + IexecInterfaceNative, + IexecInterfaceNative__factory, + PublicResolver__factory, + ReverseRegistrar__factory, +} from '../../../typechain'; +import { getIexecAccounts } from '../../../utils/poco-tools'; +const CONFIG = require('../../../config/config.json'); + +describe('ENSIntegration', () => { + let proxyAddress: string; + let [iexecPoco, iexecPocoAsAdmin]: IexecInterfaceNative[] = []; + let [iexecAdmin, anyone]: SignerWithAddress[] = []; + let ensRegistry: ENSRegistry; + + beforeEach('Deploy', async () => { + // Deploy all contracts + proxyAddress = await loadHardhatFixtureDeployment(); + // Initialize test environment + await loadFixture(initFixture); + }); + + async function initFixture() { + ({ iexecAdmin, anyone } = await getIexecAccounts()); + const ensRegistryAddress = (await deployments.get('ENSRegistry')).address; + ensRegistry = ENSRegistry__factory.connect(ensRegistryAddress, anyone); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + iexecPocoAsAdmin = iexecPoco.connect(iexecAdmin); + } + + describe('Forward resolution', () => { + it('Should resolve initial names', async () => { + if (CONFIG.chains.default.asset === 'Token') { + expect(await resolve('rlc.iexec.eth')).to.equal(await iexecPoco.token()); + } + expect(await resolve('admin.iexec.eth')).to.equal(iexecAdmin.address); + expect(await resolve('core.v5.iexec.eth')).to.equal(proxyAddress); + expect(await resolve('apps.v5.iexec.eth')).to.equal(await iexecPoco.appregistry()); + expect(await resolve('datasets.v5.iexec.eth')).to.equal( + await iexecPoco.datasetregistry(), + ); + expect(await resolve('workerpools.v5.iexec.eth')).to.equal( + await iexecPoco.workerpoolregistry(), + ); + }); + }); + + describe('Reverse resolution', () => { + it('Should lookup initial addresses', async () => { + expect(await lookup(iexecAdmin.address)).to.equal('admin.iexec.eth'); + expect(await lookup(proxyAddress)).to.equal('core.v5.iexec.eth'); + expect(await lookup(await iexecPoco.appregistry())).to.equal('apps.v5.iexec.eth'); + expect(await lookup(await iexecPoco.datasetregistry())).to.equal( + 'datasets.v5.iexec.eth', + ); + expect(await lookup(await iexecPoco.workerpoolregistry())).to.equal( + 'workerpools.v5.iexec.eth', + ); + }); + + it('Should register reverse resolution name', async () => { + const name = 'test.domain.eth'; + const reverseNameHash = ethers.utils.namehash( + `${proxyAddress.substring(2)}.addr.reverse`, + ); + const reverseRootNameHash = ethers.utils.namehash('addr.reverse'); + const reverseRegistrarAddress = await ensRegistry.owner(reverseRootNameHash); + const reverseResolverAddress = await ReverseRegistrar__factory.connect( + reverseRegistrarAddress, + anyone, + ).defaultResolver(); + const reverseResolver = PublicResolver__factory.connect(reverseResolverAddress, anyone); + await expect(iexecPocoAsAdmin.setName(ensRegistry.address, name)) + .to.emit(reverseResolver, 'NameChanged') + .withArgs(reverseNameHash, name); + expect(await lookup(proxyAddress)).to.equal(name); + }); + + it('Should not register reverse resolution name when sender is not the owner', async () => { + await expect( + iexecPoco.setName(ensRegistry.address, 'some.name.eth'), + ).to.be.revertedWith('Ownable: caller is not the owner'); + }); + }); + + /** + * Get the address associated to the given ENS name using forward resolution. + * @param domain ENS domain name + * @returns ETH address + */ + async function resolve(domain: string) { + const nameHash = ethers.utils.namehash(domain); + const resolver = await getResolver(nameHash); + return await resolver['addr(bytes32)'](nameHash); + } + + /** + * Get the primary ENS name associated to the given address using reverse resolution. + * @param address + * @returns ENS name + */ + async function lookup(address: string) { + const nameHash = ethers.utils.namehash(`${address.substring(2)}.addr.reverse`); + const reverseResolver = await getResolver(nameHash); + return await reverseResolver.name(nameHash); + } + + /** + * Get resolver contract of the given name hash. + * @param nameHash namehash of the domain name + * @returns PublicResolver instance + */ + async function getResolver(nameHash: string) { + const resolverAddress = await ensRegistry.resolver(nameHash); + return PublicResolver__factory.connect(resolverAddress, anyone); + } +}); diff --git a/test/byContract/IexecAccessors/IexecAccessors.js b/test/byContract/IexecAccessors/IexecAccessors.js deleted file mode 100644 index 6c99c98e6..000000000 --- a/test/byContract/IexecAccessors/IexecAccessors.js +++ /dev/null @@ -1,128 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Accessors', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var categories = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * * - ***************************************************************************/ - describe("checking constant view methods", async () => { - describe("escrow", async () => { - it("token", async () => { - assert.equal(await IexecInstance.token(), RLCInstance.address); - }); - }); - - describe("ERC20 metadata", async () => { - it("name", async () => { - assert.equal(await IexecInstance.name(), !!process.env.KYC ? "Staked eRLC" : "Staked RLC"); - }); - - it("symbol", async () => { - assert.equal(await IexecInstance.symbol(), !!process.env.KYC ? "SeRLC" : "SRLC"); - }); - - it("decimals", async () => { - assert.equal(Number(await IexecInstance.decimals()), 9); - }); - }); - - describe("Registries", async () => { - it("AppRegistry", async () => { - assert.equal(await IexecInstance.appregistry(), AppRegistryInstance.address); - }); - - it("DatasetRegistry", async () => { - assert.equal(await IexecInstance.datasetregistry(), DatasetRegistryInstance.address); - }); - - it("AppRegistry", async () => { - assert.equal(await IexecInstance.workerpoolregistry(), WorkerpoolRegistryInstance.address); - }); - }); - }); -}); diff --git a/test/byContract/IexecAccessors/IexecAccessors.test.ts b/test/byContract/IexecAccessors/IexecAccessors.test.ts new file mode 100644 index 000000000..0bc0d91e7 --- /dev/null +++ b/test/byContract/IexecAccessors/IexecAccessors.test.ts @@ -0,0 +1,105 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { deployments, ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { IexecInterfaceNative, IexecInterfaceNative__factory } from '../../../typechain'; +import { getIexecAccounts } from '../../../utils/poco-tools'; + +/** + * Test state view functions. + */ +describe('IexecAccessors', async () => { + let proxyAddress: string; + let iexecPocoAsAnyone: IexecInterfaceNative; + let anyone: SignerWithAddress; + + beforeEach('Deploy', async () => { + // Deploy all contracts + proxyAddress = await loadHardhatFixtureDeployment(); + // Initialize test environment + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ anyone } = accounts); + iexecPocoAsAnyone = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + } + + it('name', async function () { + expect(await iexecPocoAsAnyone.name()).to.equal('Staked RLC'); + }); + it('symbol', async function () { + expect(await iexecPocoAsAnyone.symbol()).to.equal('SRLC'); + }); + it('decimals', async function () { + expect(await iexecPocoAsAnyone.decimals()).to.equal(9n); + }); + it('totalSupply', async function () { + expect(await iexecPocoAsAnyone.totalSupply()).to.equal(0n); + }); + // TODO test the case where token() == 0x0 in native mode. + it('token', async function () { + expect(await iexecPocoAsAnyone.token()).to.equal( + '0x5FbDB2315678afecb367f032d93F642f64180aa3', + ); + }); + it('countCategory', async function () { + expect(await iexecPocoAsAnyone.countCategory()).to.equal(5); + }); + it('appRegistry', async function () { + expect(await iexecPocoAsAnyone.appregistry()).to.equal( + (await deployments.get('AppRegistry')).address, + ); + }); + it('datasetRegistry', async function () { + expect(await iexecPocoAsAnyone.datasetregistry()).to.equal( + (await deployments.get('DatasetRegistry')).address, + ); + }); + it('workerpoolRegistry', async function () { + expect(await iexecPocoAsAnyone.workerpoolregistry()).to.equal( + (await deployments.get('WorkerpoolRegistry')).address, + ); + }); + it('teeBroker', async function () { + expect(await iexecPocoAsAnyone.teebroker()).to.equal(ethers.constants.AddressZero); + }); + it('callbackGas', async function () { + expect(await iexecPocoAsAnyone.callbackgas()).to.equal(100_000n); + }); + it('contributionDeadlineRatio', async function () { + expect(await iexecPocoAsAnyone.contribution_deadline_ratio()).to.equal(7); + }); + it('revealDeadlineRatio', async function () { + expect(await iexecPocoAsAnyone.reveal_deadline_ratio()).to.equal(2n); + }); + it('finalDeadlineRatio', async function () { + expect(await iexecPocoAsAnyone.final_deadline_ratio()).to.equal(10n); + }); + it('workerpoolStakeRatio', async function () { + expect(await iexecPocoAsAnyone.workerpool_stake_ratio()).to.equal(30n); + }); + it('kittyRatio', async function () { + expect(await iexecPocoAsAnyone.kitty_ratio()).to.equal(10n); + }); + it('kittyMin', async function () { + expect(await iexecPocoAsAnyone.kitty_min()).to.equal(1_000_000_000n); + }); + it('kittyAddress', async function () { + expect(await iexecPocoAsAnyone.kitty_address()).to.equal( + '0x99c2268479b93fDe36232351229815DF80837e23', + ); + }); + it('groupMemberPurpose', async function () { + expect(await iexecPocoAsAnyone.groupmember_purpose()).to.equal(4n); + }); + it('eip712domainSeparator', async function () { + expect(await iexecPocoAsAnyone.eip712domain_separator()).to.equal( + '0xfc2178d8b8300e657cb9f8b5a4d1957174cf1392e294f3575b82a9cea1da1c4b', + ); + }); +}); diff --git a/test/byContract/IexecCategoryManager/IexecCategoryManager.js b/test/byContract/IexecCategoryManager/IexecCategoryManager.js deleted file mode 100644 index 9d67dcaa0..000000000 --- a/test/byContract/IexecCategoryManager/IexecCategoryManager.js +++ /dev/null @@ -1,136 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require('../../../utils/ens-tools'); -const odbtools = require('../../../utils/odb-tools'); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('CategoryManager', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var categories = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - describe("view", async () => { - describe("invalid index", async () => { - it("reverts", async () => { - assert.equal(await IexecInstance.countCategory(), 5, "Error in category count"); - await expectRevert.unspecified(IexecInstance.viewCategory(5)); - assert.equal(await IexecInstance.countCategory(), 5, "Error in category count"); - }); - }); - }); - - describe("create", async () => { - describe("unauthorized create", async () => { - it("reverts", async () => { - assert.equal(await IexecInstance.countCategory(), 5, "Error in category count"); - await expectRevert.unspecified(IexecInstance.createCategory("fake category", "this is an attack", 0xFFFFFFFFFF, { from: user.address })); - assert.equal(await IexecInstance.countCategory(), 5, "Error in category count"); - }); - }); - - describe("authorized", async () => { - it("success", async () => { - assert.equal(await IexecInstance.countCategory(), 5, "Error in category count"); - - txMined = await IexecInstance.createCategory("Tiny", "Small but impractical", 3, { from: iexecAdmin.address }); - }); - - it("emits event", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "CreateCategory"); - assert.equal(events[0].args.catid, 5, "check catid" ); - assert.equal(events[0].args.name, "Tiny", "check name" ); - assert.equal(events[0].args.description, "Small but impractical", "check description" ); - assert.equal(events[0].args.workClockTimeRef, 3, "check workClockTimeRef"); - }); - - it("count update", async () => { - assert.equal(await IexecInstance.countCategory(), 6, "Error in category count"); - }); - - it("view newly created category", async () => { - category = await IexecInstance.viewCategory(5); - assert.equal(category.name, "Tiny", "check name" ); - assert.equal(category.description, "Small but impractical", "check description" ); - assert.equal(category.workClockTimeRef, 3, "check workClockTimeRef"); - }); - }); - }); -}); diff --git a/test/byContract/IexecCategoryManager/IexecCategoryManager.test.ts b/test/byContract/IexecCategoryManager/IexecCategoryManager.test.ts new file mode 100644 index 000000000..6cd031fef --- /dev/null +++ b/test/byContract/IexecCategoryManager/IexecCategoryManager.test.ts @@ -0,0 +1,72 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { IexecInterfaceNative, IexecInterfaceNative__factory } from '../../../typechain'; +import { Category, getIexecAccounts } from '../../../utils/poco-tools'; +const CONFIG = require('../../../config/config.json'); + +const name = 'name'; +const description = 'description'; +const timeRef = 100; +const args = [name, description, timeRef] as [string, string, number]; + +describe('CategoryManager', async () => { + let proxyAddress: string; + let [iexecPoco, iexecPocoAsAnyone]: IexecInterfaceNative[] = []; + let [iexecAdmin, anyone]: SignerWithAddress[] = []; + + beforeEach('Deploy', async () => { + // Deploy all contracts + proxyAddress = await loadHardhatFixtureDeployment(); + // Initialize test environment + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ iexecAdmin, anyone } = accounts); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, iexecAdmin); + iexecPocoAsAnyone = iexecPoco.connect(anyone); + } + + it('Should view categories', async () => { + const categories = CONFIG.categories as Category[]; + for (let i = 0; i < categories.length; i++) { + const expectedCategory = categories[i]; + const category = await iexecPocoAsAnyone.viewCategory(i); + expect(category.name).to.equal(expectedCategory.name); + expect(category.description).to.equal(JSON.stringify(expectedCategory.description)); + expect(category.workClockTimeRef).to.equal(expectedCategory.workClockTimeRef); + } + }); + + it('Should not view category with bad index', async () => { + const lastCategoryIndex = (await iexecPocoAsAnyone.countCategory()).toNumber() - 1; + await expect( + iexecPocoAsAnyone.viewCategory(lastCategoryIndex + 1), + ).to.be.revertedWithoutReason(); + }); + + it('Should create category', async () => { + const newCategoryIndex = 5; + expect(await iexecPoco.callStatic.createCategory(...args)).to.equal(newCategoryIndex); + await expect(iexecPoco.createCategory(...args)) + .to.emit(iexecPoco, 'CreateCategory') + .withArgs(newCategoryIndex, name, description, timeRef); + expect(await iexecPocoAsAnyone.countCategory()).to.equal(6); + const category = await iexecPocoAsAnyone.viewCategory(newCategoryIndex); + expect(category.name).to.equal(name); + expect(category.description).to.equal(description); + expect(category.workClockTimeRef).to.equal(timeRef); + }); + + it('Should not create category when sender not authorized', async () => { + await expect(iexecPocoAsAnyone.createCategory(...args)).to.be.revertedWith( + 'Ownable: caller is not the owner', + ); + }); +}); diff --git a/test/byContract/IexecERC20/ERC20.behavior.js b/test/byContract/IexecERC20/ERC20.behavior.js deleted file mode 100644 index ac17a0b23..000000000 --- a/test/byContract/IexecERC20/ERC20.behavior.js +++ /dev/null @@ -1,321 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -const { BN, constants, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const { expect } = require('chai'); -const { ZERO_ADDRESS } = constants; - -function shouldBehaveLikeERC20(errorPrefix, initialSupply, initialHolder, recipient, anotherAccount) { - - describe('total supply', function () { - it('returns the total amount of tokens', async function () { - expect(await this.token.totalSupply()).to.be.bignumber.equal(this.frozenSupply.add(initialSupply)); - }); - }); - - describe('balanceOf', function () { - describe('when the requested account has no tokens', function () { - it('returns zero', async function () { - expect(await this.token.balanceOf(anotherAccount)).to.be.bignumber.equal('0'); - }); - }); - - describe('when the requested account has some tokens', function () { - it('returns the total amount of tokens', async function () { - expect(await this.token.balanceOf(initialHolder)).to.be.bignumber.equal(initialSupply); - }); - }); - }); - - describe('transfer', function () { - shouldBehaveLikeERC20Transfer(errorPrefix, initialHolder, recipient, initialSupply, - function (from, to, value) { - return this.token.transfer(to, value, { from }); - } - ); - }); - - describe('transfer from', function () { - const spender = recipient; - - describe('when the token owner is not the zero address', function () { - const tokenOwner = initialHolder; - - describe('when the recipient is not the zero address', function () { - const to = anotherAccount; - - describe('when the spender has enough approved balance', function () { - beforeEach(async function () { - await this.token.approve(spender, initialSupply, { from: initialHolder }); - }); - - describe('when the token owner has enough balance', function () { - const amount = initialSupply; - - it('transfers the requested amount', async function () { - await this.token.transferFrom(tokenOwner, to, amount, { from: spender }); - - expect(await this.token.balanceOf(tokenOwner)).to.be.bignumber.equal('0'); - - expect(await this.token.balanceOf(to)).to.be.bignumber.equal(amount); - }); - - it('decreases the spender allowance', async function () { - await this.token.transferFrom(tokenOwner, to, amount, { from: spender }); - - expect(await this.token.allowance(tokenOwner, spender)).to.be.bignumber.equal('0'); - }); - - it('emits a transfer event', async function () { - const { logs } = await this.token.transferFrom(tokenOwner, to, amount, { from: spender }); - - expectEvent.inLogs(logs, 'Transfer', { - from: tokenOwner, - to: to, - value: amount, - }); - }); - - it('emits an approval event', async function () { - const { logs } = await this.token.transferFrom(tokenOwner, to, amount, { from: spender }); - - expectEvent.inLogs(logs, 'Approval', { - owner: tokenOwner, - spender: spender, - value: await this.token.allowance(tokenOwner, spender), - }); - }); - }); - - describe('when the token owner does not have enough balance', function () { - const amount = initialSupply.addn(1); - - it('reverts', async function () { - await expectRevert.unspecified(this.token.transferFrom(tokenOwner, to, amount, { from: spender })); - }); - }); - }); - - describe('when the spender does not have enough approved balance', function () { - beforeEach(async function () { - await this.token.approve(spender, initialSupply.subn(1), { from: tokenOwner }); - }); - - describe('when the token owner has enough balance', function () { - const amount = initialSupply; - - it('reverts', async function () { - await expectRevert.unspecified(this.token.transferFrom(tokenOwner, to, amount, { from: spender })); - }); - }); - - describe('when the token owner does not have enough balance', function () { - const amount = initialSupply.addn(1); - - it('reverts', async function () { - await expectRevert.unspecified(this.token.transferFrom(tokenOwner, to, amount, { from: spender })); - }); - }); - }); - }); - - describe('when the recipient is the zero address', function () { - const amount = initialSupply; - const to = ZERO_ADDRESS; - - beforeEach(async function () { - await this.token.approve(spender, amount, { from: tokenOwner }); - }); - - it('reverts', async function () { - await expectRevert(this.token.transferFrom( - tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer to the zero address` - ); - }); - }); - }); - - describe('when the token owner is the zero address', function () { - const amount = 0; - const tokenOwner = ZERO_ADDRESS; - const to = recipient; - - it('reverts', async function () { - await expectRevert(this.token.transferFrom( - tokenOwner, to, amount, { from: spender }), `${errorPrefix}: transfer from the zero address` - ); - }); - }); - }); - - describe('approve', function () { - shouldBehaveLikeERC20Approve(errorPrefix, initialHolder, recipient, initialSupply, - function (owner, spender, amount) { - return this.token.approve(spender, amount, { from: owner }); - } - ); - }); -} - -function shouldBehaveLikeERC20Transfer(errorPrefix, from, to, balance, transfer) { - describe('when the recipient is not the zero address', function () { - describe('when the sender does not have enough balance', function () { - const amount = balance.addn(1); - - it('reverts', async function () { - await expectRevert.unspecified(transfer.call(this, from, to, amount)); - }); - }); - - describe('when the sender transfers all balance', function () { - const amount = balance; - - it('transfers the requested amount', async function () { - await transfer.call(this, from, to, amount); - - expect(await this.token.balanceOf(from)).to.be.bignumber.equal('0'); - - expect(await this.token.balanceOf(to)).to.be.bignumber.equal(amount); - }); - - it('emits a transfer event', async function () { - const { logs } = await transfer.call(this, from, to, amount); - - expectEvent.inLogs(logs, 'Transfer', { - from, - to, - value: amount, - }); - }); - }); - - describe('when the sender transfers zero tokens', function () { - const amount = new BN('0'); - - it('transfers the requested amount', async function () { - await transfer.call(this, from, to, amount); - - expect(await this.token.balanceOf(from)).to.be.bignumber.equal(balance); - - expect(await this.token.balanceOf(to)).to.be.bignumber.equal('0'); - }); - - it('emits a transfer event', async function () { - const { logs } = await transfer.call(this, from, to, amount); - - expectEvent.inLogs(logs, 'Transfer', { - from, - to, - value: amount, - }); - }); - }); - }); - - describe('when the recipient is the zero address', function () { - it('reverts', async function () { - await expectRevert(transfer.call(this, from, ZERO_ADDRESS, balance), - `${errorPrefix}: transfer to the zero address` - ); - }); - }); -} - -function shouldBehaveLikeERC20Approve(errorPrefix, owner, spender, supply, approve) { - describe('when the spender is not the zero address', function () { - describe('when the sender has enough balance', function () { - const amount = supply; - - it('emits an approval event', async function () { - const { logs } = await approve.call(this, owner, spender, amount); - - expectEvent.inLogs(logs, 'Approval', { - owner: owner, - spender: spender, - value: amount, - }); - }); - - describe('when there was no approved amount before', function () { - it('approves the requested amount', async function () { - await approve.call(this, owner, spender, amount); - - expect(await this.token.allowance(owner, spender)).to.be.bignumber.equal(amount); - }); - }); - - describe('when the spender had an approved amount', function () { - beforeEach(async function () { - await approve.call(this, owner, spender, new BN(1)); - }); - - it('approves the requested amount and replaces the previous one', async function () { - await approve.call(this, owner, spender, amount); - - expect(await this.token.allowance(owner, spender)).to.be.bignumber.equal(amount); - }); - }); - }); - - describe('when the sender does not have enough balance', function () { - const amount = supply.addn(1); - - it('emits an approval event', async function () { - const { logs } = await approve.call(this, owner, spender, amount); - - expectEvent.inLogs(logs, 'Approval', { - owner: owner, - spender: spender, - value: amount, - }); - }); - - describe('when there was no approved amount before', function () { - it('approves the requested amount', async function () { - await approve.call(this, owner, spender, amount); - - expect(await this.token.allowance(owner, spender)).to.be.bignumber.equal(amount); - }); - }); - - describe('when the spender had an approved amount', function () { - beforeEach(async function () { - await approve.call(this, owner, spender, new BN(1)); - }); - - it('approves the requested amount and replaces the previous one', async function () { - await approve.call(this, owner, spender, amount); - - expect(await this.token.allowance(owner, spender)).to.be.bignumber.equal(amount); - }); - }); - }); - }); - - describe('when the spender is the zero address', function () { - it('reverts', async function () { - await expectRevert(approve.call(this, owner, ZERO_ADDRESS, supply), - `${errorPrefix}: approve to the zero address` - ); - }); - }); -} - -module.exports = { - shouldBehaveLikeERC20, - shouldBehaveLikeERC20Transfer, - shouldBehaveLikeERC20Approve, -}; diff --git a/test/byContract/IexecERC20/IexecERC20.js b/test/byContract/IexecERC20/IexecERC20.js deleted file mode 100644 index ec67397ef..000000000 --- a/test/byContract/IexecERC20/IexecERC20.js +++ /dev/null @@ -1,313 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -var TestReceiver = artifacts.require("TestReceiver"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -const { expect } = require('chai'); -const { - shouldBehaveLikeERC20, - shouldBehaveLikeERC20Transfer, - shouldBehaveLikeERC20Approve, -} = require('./ERC20.behavior'); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('ERC20', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - - const initialSupply = new BN(100); - const initialHolder = accounts[0]; - const recipient = accounts[1]; - const anotherAccount = accounts[2]; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - var TestReceiverInstance = null; - - var categories = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - TestReceiverInstance = await TestReceiver.new(); - }); - - /*************************************************************************** - * * - ***************************************************************************/ - beforeEach(async function () { - const txsMined = [ - await IexecInstance.withdraw(await IexecInstance.balanceOf(initialHolder), { from: initialHolder, gas: constants.AMOUNT_GAS_PROVIDED }), - await IexecInstance.withdraw(await IexecInstance.balanceOf(recipient), { from: recipient, gas: constants.AMOUNT_GAS_PROVIDED }), - await IexecInstance.withdraw(await IexecInstance.balanceOf(anotherAccount), { from: anotherAccount, gas: constants.AMOUNT_GAS_PROVIDED }), - await IexecInstance.approve(initialHolder, 0, { from: initialHolder, gas: constants.AMOUNT_GAS_PROVIDED }), - await IexecInstance.approve(initialHolder, 0, { from: recipient, gas: constants.AMOUNT_GAS_PROVIDED }), - await IexecInstance.approve(initialHolder, 0, { from: anotherAccount, gas: constants.AMOUNT_GAS_PROVIDED }), - await IexecInstance.approve(recipient, 0, { from: initialHolder, gas: constants.AMOUNT_GAS_PROVIDED }), - await IexecInstance.approve(recipient, 0, { from: recipient, gas: constants.AMOUNT_GAS_PROVIDED }), - await IexecInstance.approve(recipient, 0, { from: anotherAccount, gas: constants.AMOUNT_GAS_PROVIDED }), - await IexecInstance.approve(anotherAccount, 0, { from: initialHolder, gas: constants.AMOUNT_GAS_PROVIDED }), - await IexecInstance.approve(anotherAccount, 0, { from: recipient, gas: constants.AMOUNT_GAS_PROVIDED }), - await IexecInstance.approve(anotherAccount, 0, { from: anotherAccount, gas: constants.AMOUNT_GAS_PROVIDED }), - ]; - - assert.isBelow(txsMined[ 0].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - assert.isBelow(txsMined[ 1].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - assert.isBelow(txsMined[ 2].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - assert.isBelow(txsMined[ 3].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - assert.isBelow(txsMined[ 4].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - assert.isBelow(txsMined[ 5].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - assert.isBelow(txsMined[ 6].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - assert.isBelow(txsMined[ 7].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - assert.isBelow(txsMined[ 8].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - assert.isBelow(txsMined[ 9].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - assert.isBelow(txsMined[10].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - assert.isBelow(txsMined[11].receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - - this.frozenSupply = await IexecInstance.totalSupply(); - - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: initialHolder, value: initialSupply * 10 ** 9, gas: constants.AMOUNT_GAS_PROVIDED }); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, initialSupply, "0x", { from: initialHolder, gas: constants.AMOUNT_GAS_PROVIDED }); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - break; - } - - assert.equal(Number(await IexecInstance.balanceOf(initialHolder)), initialSupply); - assert.equal(Number(await IexecInstance.balanceOf(recipient)), 0); - assert.equal(Number(await IexecInstance.balanceOf(anotherAccount)), 0); - - this.token = IexecInstance; - - }); - - shouldBehaveLikeERC20('ERC20', initialSupply, initialHolder, recipient, anotherAccount); - - describe('decrease allowance', function () { - describe('when the spender is not the zero address', function () { - const spender = recipient; - - function shouldDecreaseApproval (amount) { - describe('when there was no approved amount before', function () { - it('reverts', async function () { - await expectRevert.unspecified(this.token.decreaseAllowance( - spender, amount, { from: initialHolder }) - ); - }); - }); - - describe('when the spender had an approved amount', function () { - const approvedAmount = amount; - - beforeEach(async function () { - ({ logs: this.logs } = await this.token.approve(spender, approvedAmount, { from: initialHolder })); - }); - - it('emits an approval event', async function () { - const { logs } = await this.token.decreaseAllowance(spender, approvedAmount, { from: initialHolder }); - - expectEvent.inLogs(logs, 'Approval', { - owner: initialHolder, - spender: spender, - value: new BN(0), - }); - }); - - it('decreases the spender allowance subtracting the requested amount', async function () { - await this.token.decreaseAllowance(spender, approvedAmount.subn(1), { from: initialHolder }); - - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal('1'); - }); - - it('sets the allowance to zero when all allowance is removed', async function () { - await this.token.decreaseAllowance(spender, approvedAmount, { from: initialHolder }); - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal('0'); - }); - - it('reverts when more than the full allowance is removed', async function () { - await expectRevert.unspecified( - this.token.decreaseAllowance(spender, approvedAmount.addn(1), { from: initialHolder }) - ); - }); - }); - } - - describe('when the sender has enough balance', function () { - const amount = initialSupply; - - shouldDecreaseApproval(amount); - }); - - describe('when the sender does not have enough balance', function () { - const amount = initialSupply.addn(1); - - shouldDecreaseApproval(amount); - }); - }); - - describe('when the spender is the zero address', function () { - const amount = initialSupply; - const spender = constants.NULL.ADDRESS; - - it('reverts', async function () { - await expectRevert.unspecified(this.token.decreaseAllowance( - spender, amount, { from: initialHolder }) - ); - }); - }); - }); - - describe('increase allowance', function () { - const amount = initialSupply; - - describe('when the spender is not the zero address', function () { - const spender = recipient; - - describe('when the sender has enough balance', function () { - it('emits an approval event', async function () { - const { logs } = await this.token.increaseAllowance(spender, amount, { from: initialHolder }); - - expectEvent.inLogs(logs, 'Approval', { - owner: initialHolder, - spender: spender, - value: amount, - }); - }); - - describe('when there was no approved amount before', function () { - it('approves the requested amount', async function () { - await this.token.increaseAllowance(spender, amount, { from: initialHolder }); - - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal(amount); - }); - }); - - describe('when the spender had an approved amount', function () { - beforeEach(async function () { - await this.token.approve(spender, new BN(1), { from: initialHolder }); - }); - - it('increases the spender allowance adding the requested amount', async function () { - await this.token.increaseAllowance(spender, amount, { from: initialHolder }); - - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal(amount.addn(1)); - }); - }); - }); - - describe('when the sender does not have enough balance', function () { - const amount = initialSupply.addn(1); - - it('emits an approval event', async function () { - const { logs } = await this.token.increaseAllowance(spender, amount, { from: initialHolder }); - - expectEvent.inLogs(logs, 'Approval', { - owner: initialHolder, - spender: spender, - value: amount, - }); - }); - - describe('when there was no approved amount before', function () { - it('approves the requested amount', async function () { - await this.token.increaseAllowance(spender, amount, { from: initialHolder }); - - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal(amount); - }); - }); - - describe('when the spender had an approved amount', function () { - beforeEach(async function () { - await this.token.approve(spender, new BN(1), { from: initialHolder }); - }); - - it('increases the spender allowance adding the requested amount', async function () { - await this.token.increaseAllowance(spender, amount, { from: initialHolder }); - - expect(await this.token.allowance(initialHolder, spender)).to.be.bignumber.equal(amount.addn(1)); - }); - }); - }); - }); - - describe('when the spender is the zero address', function () { - const spender = constants.NULL.ADDRESS; - - it('reverts', async function () { - await expectRevert.unspecified( - this.token.increaseAllowance(spender, amount, { from: initialHolder }), 'ERC20: approve to the zero address' - ); - }); - }); - }); - - describe('approveAndCall', async () => { - it('accepted by spender', async () => { - await IexecInstance.approveAndCall(TestReceiverInstance.address, 10, '0x', { from: initialHolder }); - // TODO: check event emitted by TestReceiver - }); - - it('rejected by spender', async () => { - await expectRevert( - IexecInstance.approveAndCall(TestReceiverInstance.address, 0, '0x', { from: initialHolder }), - 'approval-refused' - ); - }); - }); - -}); diff --git a/test/byContract/IexecERC20/IexecERC20.test.ts b/test/byContract/IexecERC20/IexecERC20.test.ts new file mode 100644 index 000000000..d9ffe3873 --- /dev/null +++ b/test/byContract/IexecERC20/IexecERC20.test.ts @@ -0,0 +1,269 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { BigNumber } from 'ethers'; +import { ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { + IexecInterfaceNative, + IexecInterfaceNative__factory, + TestReceiver, + TestReceiver__factory, +} from '../../../typechain'; +import { getIexecAccounts } from '../../../utils/poco-tools'; +import { IexecWrapper } from '../../utils/IexecWrapper'; + +const value = 100; +const zeroAddress = ethers.constants.AddressZero; + +describe('ERC20', async () => { + let proxyAddress: string; + let iexecWrapper: IexecWrapper; + let [iexecPoco, iexecPocoAsHolder, iexecPocoAsSpender]: IexecInterfaceNative[] = []; + let [holder, recipient, spender, anyone, zeroAddressSigner]: SignerWithAddress[] = []; + let totalSupplyBeforeFirstDeposit: BigNumber; + + beforeEach('Deploy', async () => { + // Deploy all contracts + proxyAddress = await loadHardhatFixtureDeployment(); + // Initialize test environment + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + // Setup current test accounts from some arbitrary iExec accounts + ({ requester: holder, beneficiary: recipient, anyone } = accounts); + spender = recipient; + zeroAddressSigner = await ethers.getImpersonatedSigner(zeroAddress); + iexecWrapper = new IexecWrapper(proxyAddress, accounts); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + iexecPocoAsHolder = iexecPoco.connect(holder); + iexecPocoAsSpender = iexecPoco.connect(spender); + totalSupplyBeforeFirstDeposit = await iexecPoco.totalSupply(); + await iexecWrapper.depositInIexecAccount(holder, value); + } + + describe('Total supply', () => { + it('Should get total supply', async () => { + expect(await iexecPoco.totalSupply()).equal(totalSupplyBeforeFirstDeposit.add(value)); + }); + }); + + describe('Balance of', () => { + it('Should get balance when account has no tokens', async () => { + expect(await iexecPoco.balanceOf(anyone.address)).equal(0); + }); + it('Should get balance when account has some tokens', async () => { + expect(await iexecPoco.balanceOf(holder.address)).equal(value); + }); + }); + + describe('Transfer', () => { + it('Should transfer tokens', async () => { + const transferArgs = [recipient.address, BigNumber.from(value)] as [string, BigNumber]; + expect(await iexecPocoAsHolder.callStatic.transfer(...transferArgs)).to.be.true; + await expect(iexecPocoAsHolder.transfer(...transferArgs)) + .to.changeTokenBalances(iexecPoco, [holder, recipient], [-value, value]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(holder.address, recipient.address, value); + }); + it('Should transfer zero tokens', async () => { + await expect(iexecPocoAsHolder.transfer(recipient.address, 0)) + .to.changeTokenBalances(iexecPoco, [holder, recipient], [0, 0]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(holder.address, recipient.address, 0); + }); + it('Should not transfer from the zero address', async () => { + await expect( + iexecPoco.connect(zeroAddressSigner).transfer(recipient.address, value), + ).to.be.revertedWith('ERC20: transfer from the zero address'); + }); + it('Should not transfer to the zero address', async () => { + await expect(iexecPocoAsHolder.transfer(zeroAddress, value)).to.be.revertedWith( + 'ERC20: transfer to the zero address', + ); + }); + it('Should not transfer when sender balance is too low', async () => { + await expect( + iexecPocoAsHolder.transfer(recipient.address, value + 1), + ).to.be.revertedWithoutReason(); + }); + }); + + describe('Approve', () => { + it('Should approve tokens', async () => { + const approveArgs = [spender.address, BigNumber.from(value)] as [string, BigNumber]; + expect(await iexecPocoAsHolder.callStatic.approve(...approveArgs)).to.be.true; + await expect(iexecPocoAsHolder.approve(...approveArgs)) + .to.emit(iexecPoco, 'Approval') + .withArgs(holder.address, spender.address, value); + expect(await iexecPoco.allowance(holder.address, spender.address)).equal(value); + }); + it('Should not approve from the zero address', async () => { + await expect( + iexecPoco.connect(zeroAddressSigner).approve(spender.address, value), + ).to.be.revertedWith('ERC20: approve from the zero address'); + }); + it('Should not approve the zero address', async () => { + await expect(iexecPocoAsHolder.approve(zeroAddress, value)).to.be.revertedWith( + 'ERC20: approve to the zero address', + ); + }); + }); + + describe('Approve and call', () => { + const extraData = '0x'; + let testReceiver: TestReceiver; + + beforeEach('Init', async () => { + testReceiver = await new TestReceiver__factory() + .connect(anyone) + .deploy() + .then((instance) => instance.deployed()); + }); + + it('Should approve and call', async () => { + const approveAndCallArgs = [testReceiver.address, BigNumber.from(value), extraData] as [ + string, + BigNumber, + string, + ]; + expect(await iexecPocoAsHolder.callStatic.approveAndCall(...approveAndCallArgs)).to.be + .true; + await expect(iexecPocoAsHolder.approveAndCall(...approveAndCallArgs)) + .to.emit(iexecPoco, 'Approval') + .withArgs(holder.address, testReceiver.address, value) + .to.emit(testReceiver, 'GotApproval') + .withArgs(holder.address, value, proxyAddress, extraData); + expect(await iexecPoco.allowance(holder.address, testReceiver.address)).equal(value); + }); + it('Should not approve and call from the zero address', async () => { + await expect( + iexecPoco + .connect(zeroAddressSigner) + .approveAndCall(testReceiver.address, 0, extraData), + ).to.be.revertedWith('ERC20: approve from the zero address'); + }); + it('Should not approve and call for the zero address', async () => { + await expect( + iexecPocoAsHolder.approveAndCall(zeroAddress, 0, extraData), + ).to.be.revertedWith('ERC20: approve to the zero address'); + }); + it('Should not approve and call when receiver refuses approval', async () => { + await expect( + iexecPocoAsHolder.approveAndCall( + testReceiver.address, + 0, // TestReceiver will revert with this value + extraData, + ), + ).to.be.revertedWith('approval-refused'); + }); + }); + + describe('Transfer from', () => { + it('Should transferFrom some tokens', async () => { + await iexecPocoAsHolder.approve(spender.address, value).then((tx) => tx.wait()); + const transferFromArgs = [holder.address, spender.address, BigNumber.from(value)] as [ + string, + string, + BigNumber, + ]; + expect(await iexecPocoAsSpender.callStatic.transferFrom(...transferFromArgs)).to.be + .true; + await expect(iexecPocoAsSpender.transferFrom(...transferFromArgs)) + .to.changeTokenBalances(iexecPoco, [holder, spender], [-value, value]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(holder.address, spender.address, value) + .to.emit(iexecPoco, 'Approval') + .withArgs(holder.address, spender.address, 0); + expect(await iexecPoco.allowance(holder.address, spender.address)).equal(0); + }); + it('Should not transferFrom when owner is the zero address', async () => { + await expect( + iexecPocoAsSpender.transferFrom(zeroAddress, spender.address, value), + ).to.be.revertedWith('ERC20: transfer from the zero address'); + }); + it('Should not transferFrom to the zero address', async () => { + await expect( + iexecPocoAsSpender.transferFrom(holder.address, zeroAddress, value), + ).to.be.revertedWith('ERC20: transfer to the zero address'); + }); + it('Should not transferFrom when owner balance is too low', async () => { + await expect( + iexecPocoAsSpender.transferFrom(holder.address, spender.address, value + 1), + ).to.be.revertedWithoutReason(); + }); + it('Should not transferFrom when spender allowance is too low', async () => { + await iexecPocoAsHolder.approve(spender.address, value - 1).then((tx) => tx.wait()); + await expect( + iexecPocoAsSpender.transferFrom(holder.address, spender.address, value), + ).to.be.revertedWithoutReason(); + }); + }); + + describe('Increase allowance', () => { + it('Should increase allowance', async () => { + await iexecPocoAsHolder.approve(spender.address, value).then((tx) => tx.wait()); + const allowanceToIncrease = 1; + const increaseAllowanceArgs = [ + spender.address, + BigNumber.from(allowanceToIncrease), + ] as [string, BigNumber]; + expect(await iexecPocoAsHolder.callStatic.increaseAllowance(...increaseAllowanceArgs)) + .to.be.true; + await expect(iexecPocoAsHolder.increaseAllowance(...increaseAllowanceArgs)) + .to.emit(iexecPoco, 'Approval') + .withArgs(holder.address, spender.address, value + allowanceToIncrease); + expect(await iexecPoco.allowance(holder.address, spender.address)).equal( + value + allowanceToIncrease, + ); + }); + it('Should not increase allowance from the zero address', async () => { + await expect( + iexecPoco.connect(zeroAddressSigner).increaseAllowance(spender.address, value), + ).to.be.revertedWith('ERC20: approve from the zero address'); + }); + it('Should not increase allowance for the zero address', async () => { + await expect( + iexecPocoAsHolder.increaseAllowance(zeroAddress, value), + ).to.be.revertedWith('ERC20: approve to the zero address'); + }); + }); + + describe('Decrease allowance', () => { + it('Should decrease allowance', async () => { + await iexecPocoAsHolder.approve(spender.address, value).then((tx) => tx.wait()); + const allowanceToDecrease = 1; + const decreaseAllowanceArgs = [ + spender.address, + BigNumber.from(allowanceToDecrease), + ] as [string, BigNumber]; + expect(await iexecPocoAsHolder.callStatic.decreaseAllowance(...decreaseAllowanceArgs)) + .to.be.true; + await expect(iexecPocoAsHolder.decreaseAllowance(...decreaseAllowanceArgs)) + .to.emit(iexecPoco, 'Approval') + .withArgs(holder.address, spender.address, value - allowanceToDecrease); + expect(await iexecPoco.allowance(holder.address, spender.address)).equal( + value - allowanceToDecrease, + ); + }); + it('Should not decrease allowance of a value greater than old allowance', async () => { + await expect( + iexecPocoAsHolder.decreaseAllowance(spender.address, 1), + ).to.be.revertedWithoutReason(); + }); + it('Should not decrease allowance from the zero address', async () => { + await expect( + iexecPoco.connect(zeroAddressSigner).decreaseAllowance(spender.address, 0), + ).to.be.revertedWith('ERC20: approve from the zero address'); + }); + it('Should not decrease allowance for the zero address', async () => { + await expect(iexecPocoAsHolder.decreaseAllowance(zeroAddress, 0)).to.be.revertedWith( + 'ERC20: approve to the zero address', + ); + }); + }); +}); diff --git a/test/byContract/IexecEscrow/IexecEscrowNative.js b/test/byContract/IexecEscrow/IexecEscrowNative.js deleted file mode 100644 index 7b3b6ae2a..000000000 --- a/test/byContract/IexecEscrow/IexecEscrowNative.js +++ /dev/null @@ -1,318 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -if (DEPLOYMENT.asset == "Native") -contract('EscrowNative', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var categories = []; - - var migrationBalance = null; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - - migrationBalance = Number(await web3.eth.getBalance(IexecInstance.address)); - }); - - describe("fallback", async () => { - it("success", async () => { - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 0 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[0]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await web3.eth.sendTransaction({ from: accounts[0], to: IexecInstance.address, value: 100 * 10 ** 9 }); - - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 100 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[0]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - }); - }); - - describe("deposit", async () => { - it("success", async () => { - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 100 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - txMined = await IexecInstance.deposit({ from: accounts[1], value: 100 * 10 ** 9 }); - - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 200 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, accounts[1]); - assert.equal(events[0].args.value, 100); - }); - }); - - describe("depositFor", async () => { - it("success", async () => { - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 200 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[2]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[3]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - txMined = await IexecInstance.depositFor(accounts[3], { from: accounts[2], value: 100 * 10 ** 9 }); - - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 300 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[2]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[3]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, accounts[3]); - assert.equal(events[0].args.value, 100); - }); - }); - - describe("depositForArray", async () => { - describe("length missmatch", () => { - describe("amounts.length > target.length", () => { - it("reverts", async () => { - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 300 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[4]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await expectRevert.unspecified(IexecInstance.depositForArray( - [ 100, 100, ], - [ accounts[5] ], - { from: accounts[4], value: 200 * 10 ** 9 } - )); - - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 300 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[4]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - }); - - describe("amounts.length > target.length", () => { - it("reverts", async () => { - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 300 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[4]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await expectRevert.unspecified(IexecInstance.depositForArray( - [ 100 ], - [ accounts[5], accounts[6] ], - { from: accounts[4], value: 200 * 10 ** 9 } - )); - - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 300 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[4]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - }); - }); - - describe("length match", () => { - it("success", async () => { - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 300 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[4]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - txMined = await IexecInstance.depositForArray( - [ 100, 100 ], - [ accounts[5], accounts[6] ], - { from: accounts[4], value: 200 * 10 ** 9 } - ); - - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 500 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[4]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, accounts[5]); - assert.equal(events[0].args.value, 100); - assert.equal(events[1].args.from, constants.NULL.ADDRESS); - assert.equal(events[1].args.to, accounts[6]); - assert.equal(events[1].args.value, 100); - }); - }); - - describe("excess value", () => { - it("success", async () => { - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 500 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[8]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[9]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - txMined = await IexecInstance.depositForArray( - [ 100, 100 ], - [ accounts[8], accounts[9] ], - { from: accounts[7], value: 250 * 10 ** 9 } - ); - - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 700 * 10 ** 9); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[8]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[9]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events.length, 2); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, accounts[8]); - assert.equal(events[0].args.value, 100); - assert.equal(events[1].args.from, constants.NULL.ADDRESS); - assert.equal(events[1].args.to, accounts[9]); - assert.equal(events[1].args.value, 100); - }); - }); - }); - - describe("withdraw", async () => { - describe("empty balance", async () => { - it("reverts", async () => { - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[2]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 700 * 10 ** 9); - - await expectRevert.unspecified(IexecInstance.withdraw(100, { from: accounts[2] })); - - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[2]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 700 * 10 ** 9); - }); - }); - - describe("insufficient balance", async () => { - it("reverts", async () => { - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[0]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 700 * 10 ** 9); - - await expectRevert.unspecified(IexecInstance.withdraw(1000, { from: accounts[0] })); - - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[0]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 700 * 10 ** 9); - }); - }); - - describe("sufficient balance", async () => { - it("success", async () => { - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 700 * 10 ** 9); - - txMined = await IexecInstance.withdraw(100, { from: accounts[1] }); - - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.equal(await web3.eth.getBalance(IexecInstance.address), migrationBalance + 600 * 10 ** 9); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events[0].args.from, accounts[1]); - assert.equal(events[0].args.to, constants.NULL.ADDRESS); - assert.equal(events[0].args.value, 100); - }); - }); - - }); - - describe("recover", async () => { - describe("unauthorized access", async () => { - it("reverts", async () => { - await expectRevert(IexecInstance.recover({ from: accounts[9] }), "Ownable: caller is not the owner."); - }); - }); - - describe("no locked funds", async () => { - it("success", async () => { - txMined = await IexecInstance.recover({ from: accounts[0] }); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS, "check minter"); - assert.equal(events[0].args.to, accounts[0], "check owner"); - assert.equal(events[0].args.value, 0, "check amount"); - }); - }); - }); -}); diff --git a/test/byContract/IexecEscrow/IexecEscrowNative.test.ts b/test/byContract/IexecEscrow/IexecEscrowNative.test.ts new file mode 100644 index 000000000..6bed9aff3 --- /dev/null +++ b/test/byContract/IexecEscrow/IexecEscrowNative.test.ts @@ -0,0 +1,326 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { AddressZero } from '@ethersproject/constants'; +import { loadFixture, setStorageAt } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { BigNumber } from 'ethers'; +import { ethers, expect } from 'hardhat'; +import CONFIG from '../../../config/config.json'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { IexecInterfaceNative, IexecInterfaceNative__factory } from '../../../typechain'; +import { getIexecAccounts } from '../../../utils/poco-tools'; + +const depositAmount = BigNumber.from(100); +const nativeDepositAmount = toNativeAmount(depositAmount); +const depositArgs = [{ value: nativeDepositAmount }] as [{ value: BigNumber }]; +const withdrawAmount = BigNumber.from(100); +const withdrawArg = [withdrawAmount] as [BigNumber]; + +// TODO: remove this when poco is also available in Native mode +if (CONFIG.chains.default.asset === 'Native') { + describe('EscrowNative', () => { + let proxyAddress: string; + let [iexecPoco, , iexecPocoAsAccountA, iexecPocoAsAdmin]: IexecInterfaceNative[] = []; + let [iexecAdmin, accountA, accountB, anyone]: SignerWithAddress[] = []; + + beforeEach('Deploy', async () => { + proxyAddress = await loadHardhatFixtureDeployment(); + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ iexecAdmin, anyone: accountA, requester: accountB, anyone } = accounts); + + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + iexecPocoAsAccountA = iexecPoco.connect(accountA); + iexecPocoAsAdmin = iexecPoco.connect(iexecAdmin); + } + + describe('Receive and Fallback', () => { + it('Should receive', async () => { + await expect( + accountA.sendTransaction({ + to: iexecPoco.address, + value: nativeDepositAmount, + }), + ) + .to.changeEtherBalances( + [accountA, iexecPoco], + [-nativeDepositAmount, nativeDepositAmount], + ) + .to.changeTokenBalances(iexecPoco, [accountA], [depositAmount]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(AddressZero, accountA.address, depositAmount); + }); + + it('Should fallback', async () => { + const randomData = ethers.utils.hexlify( + ethers.utils.toUtf8Bytes((Math.random() * 0xfffff).toString(16)), + ); + + await expect( + accountA.sendTransaction({ + to: iexecPoco.address, + value: nativeDepositAmount, + data: randomData, + }), + ) + .to.changeEtherBalances( + [accountA, iexecPoco], + [-nativeDepositAmount, nativeDepositAmount], + ) + .to.changeTokenBalances(iexecPoco, [accountA], [depositAmount]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(AddressZero, accountA.address, depositAmount); + }); + }); + + // TODO 'Should deposit with zero value' + describe('Deposit', () => { + it('Should deposit native tokens', async () => { + expect(await iexecPocoAsAccountA.callStatic.deposit(...depositArgs)).to.be.true; + await expect(iexecPocoAsAccountA.deposit(...depositArgs)) + .to.changeEtherBalances( + [accountA, iexecPoco], + [-nativeDepositAmount, nativeDepositAmount], + ) + .to.changeTokenBalances(iexecPoco, [accountA], [depositAmount]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(AddressZero, accountA.address, depositAmount); + }); + + it('Should deposit native tokens and return remainder', async () => { + // Create a small remainder value using BigNumber, bypassing underflow error + const depositRemainder = BigNumber.from(10).div(BigNumber.from(100)); + const depositAmountWithRemainder = depositAmount.add(depositRemainder); + const nativeDepositAmountWithRemainder = toNativeAmount(depositAmountWithRemainder); + + await expect( + iexecPocoAsAccountA.deposit({ value: nativeDepositAmountWithRemainder }), + ) + .to.changeEtherBalances( + [accountA, iexecPoco], + [-nativeDepositAmount, nativeDepositAmount], + ) + .to.changeTokenBalances(iexecPoco, [accountA], [depositAmount]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(AddressZero, accountA.address, depositAmount); + }); + + it('Should not deposit native tokens when caller is address 0', async () => { + const iexecPocoAsAddress0 = iexecPoco.connect(await ethers.getSigner(AddressZero)); + + await expect(iexecPocoAsAddress0.deposit(...depositArgs)) + .to.changeEtherBalances( + [accountA, iexecPoco], + [-nativeDepositAmount, nativeDepositAmount], + ) + .to.be.revertedWith('ERC20: mint to the zero address'); + }); + }); + + describe('Deposit for', () => { + it('Should deposit native tokens for another address', async () => { + const depositForArgs = [accountB.address, ...depositArgs] as [ + string, + { value: BigNumber }, + ]; + expect(await iexecPocoAsAccountA.callStatic.depositFor(...depositForArgs)).to.be + .true; + await expect(iexecPocoAsAccountA.depositFor(...depositForArgs)) + .to.changeEtherBalances( + [accountA, iexecPoco], + [-nativeDepositAmount, nativeDepositAmount], + ) + .to.changeTokenBalances(iexecPoco, [accountB], [depositAmount]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(AddressZero, accountB.address, depositAmount); + }); + + it('Should not deposit native tokens for address 0', async () => { + const depositForArgs = [AddressZero, ...depositArgs] as [ + string, + { value: BigNumber }, + ]; + await expect(iexecPocoAsAccountA.depositFor(...depositForArgs)).to.be.revertedWith( + 'ERC20: mint to the zero address', + ); + }); + }); + + describe('Deposit for array', () => { + it('Should depositForArray with exact value and good array lengths', async () => { + const depositAmounts = [depositAmount.mul(2), depositAmount]; + const nativeDepositTotalAmount = toNativeAmount(getTotalAmount(depositAmounts)); + const targets = [iexecAdmin.address, accountB.address]; + const depositForArrayArgs = [ + depositAmounts, + targets, + { value: nativeDepositTotalAmount }, + ] as [BigNumber[], string[], { value: BigNumber }]; + + expect(await iexecPocoAsAccountA.callStatic.depositForArray(...depositForArrayArgs)) + .to.be.true; + await expect(iexecPocoAsAccountA.depositForArray(...depositForArrayArgs)) + .to.changeEtherBalances( + [accountA, iexecPoco], + [-nativeDepositTotalAmount, nativeDepositTotalAmount], + ) + .to.changeTokenBalances(iexecPoco, [iexecAdmin, accountB], [...depositAmounts]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(AddressZero, iexecAdmin.address, depositAmounts[0]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(AddressZero, accountB.address, depositAmounts[1]); + }); + + it('Should depositForArray with good array lengths and remainder value sent', async () => { + const depositAmounts = [depositAmount.mul(2), depositAmount]; + const remainderNativeAmount = toNativeAmount(depositAmount); + const nativeDepositTotalAmount = toNativeAmount( + getTotalAmount(depositAmounts).add(remainderNativeAmount), + ); + const targets = [iexecAdmin.address, accountB.address]; + const depositForArrayArgs = [ + depositAmounts, + targets, + { value: nativeDepositTotalAmount }, + ] as [BigNumber[], string[], { value: BigNumber }]; + await expect(iexecPocoAsAccountA.depositForArray(...depositForArrayArgs)) + .to.changeEtherBalances( + [accountA, iexecPoco], + [ + -nativeDepositTotalAmount.sub(remainderNativeAmount), + nativeDepositTotalAmount.sub(remainderNativeAmount), + ], + ) + .to.changeTokenBalances(iexecPoco, [iexecAdmin, accountB], [...depositAmounts]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(AddressZero, iexecAdmin.address, depositAmounts[0]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(AddressZero, accountB.address, depositAmounts[1]); + }); + + it('Should not depositForArray with mismatched array lengths', async () => { + const depositAmounts = [depositAmount.mul(2), depositAmount, depositAmount.div(2)]; + const nativeDepositTotalAmount = toNativeAmount(getTotalAmount(depositAmounts)); + const targets = [iexecAdmin.address, accountB.address]; + const depositForArrayArgs = [ + depositAmounts, + targets, + { value: nativeDepositTotalAmount }, + ] as [BigNumber[], string[], { value: BigNumber }]; + + await expect( + iexecPocoAsAccountA.depositForArray(...depositForArrayArgs), + ).to.be.revertedWith('invalid-array-length'); + }); + }); + + // TODO 'Should withdraw with zero value' + describe('Withdraw', () => { + it('Should withdraw native tokens', async () => { + await iexecPocoAsAccountA.deposit(...depositArgs); + + expect(await iexecPocoAsAccountA.callStatic.withdraw(...withdrawArg)).to.be.true; + await expect(iexecPocoAsAccountA.withdraw(...withdrawArg)) + .to.changeEtherBalances( + [accountA, iexecPoco], + [nativeDepositAmount, -nativeDepositAmount], + ) + .to.changeTokenBalances(iexecPoco, [accountA], [-withdrawAmount]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(accountA.address, AddressZero, withdrawAmount); + }); + + it('Should not withdraw native tokens with empty balance', async () => { + await expect( + iexecPocoAsAccountA.withdraw(...withdrawArg), + ).to.be.revertedWithoutReason(); + }); + + it('Should not withdraw native tokens with insufficient balance', async () => { + await iexecPocoAsAccountA.deposit(...depositArgs); + + await expect( + iexecPocoAsAccountA.withdraw(depositAmount.mul(2)), + ).to.be.revertedWithoutReason(); + }); + }); + + describe('Withdraw to', () => { + it('Should withdraw native tokens to another address', async () => { + await iexecPocoAsAccountA.deposit(...depositArgs); + const withdrawToArgs = [...withdrawArg, accountB.address] as [BigNumber, string]; + expect(await iexecPocoAsAccountA.callStatic.withdrawTo(...withdrawToArgs)).to.be + .true; + await expect(iexecPocoAsAccountA.withdrawTo(...withdrawToArgs)) + .to.changeEtherBalances( + [accountB, iexecPoco], + [nativeDepositAmount, -nativeDepositAmount], + ) + .to.changeTokenBalances(iexecPoco, [accountA], [-withdrawAmount]) + .to.emit(iexecPoco, 'Transfer') + .withArgs(accountA.address, AddressZero, withdrawAmount); + }); + + it('Should not withdraw To native tokens with empty balance', async () => { + const withdrawToArgs = [...withdrawArg, accountB.address] as [BigNumber, string]; + await expect( + iexecPocoAsAccountA.withdrawTo(...withdrawToArgs), + ).to.be.revertedWithoutReason(); + }); + + it('Should not withdraw To native tokens with insufficient balance', async () => { + await iexecPocoAsAccountA.deposit(...depositArgs); + const withdrawToArgs = [...withdrawArg, accountB.address] as [BigNumber, string]; + await expect( + iexecPocoAsAccountA.withdrawTo(withdrawToArgs[0].mul(2), withdrawToArgs[1]), + ).to.be.revertedWithoutReason(); + }); + }); + + describe('Recover', () => { + it('Should recover from balance deviation', async () => { + await iexecAdmin.sendTransaction({ + to: iexecPoco.address, + value: nativeDepositAmount, + }); + const initTotalSupply = await iexecPoco.totalSupply(); + expect(initTotalSupply).to.equal(depositAmount); + + const expectedDelta = BigNumber.from(5); + await setStorageAt( + proxyAddress, + '0x0c', // Slot index of `m_totalSupply` in Store + initTotalSupply.sub(expectedDelta).toHexString(), + ); + expect(await iexecPoco.totalSupply()).to.equal( + initTotalSupply.sub(expectedDelta).toHexString(), + ); + + expect(await iexecPocoAsAdmin.callStatic.recover()).to.equal(expectedDelta); + await expect(iexecPocoAsAdmin.recover()) + .to.emit(iexecPoco, 'Transfer') + .withArgs(AddressZero, iexecAdmin.address, expectedDelta); + + expect(await iexecPoco.totalSupply()).to.equal(initTotalSupply); + }); + + it('Should not recover extra balance when caller is not owner', async () => { + await expect(iexecPocoAsAccountA.recover()).to.be.revertedWith( + 'Ownable: caller is not the owner', + ); + }); + }); + }); +} + +function getTotalAmount(amounts: BigNumber[]) { + return amounts.reduce((a, b) => a.add(b), BigNumber.from(0)); +} + +function toNativeAmount(depositAmount: BigNumber) { + return ethers.utils.parseUnits(depositAmount.toString(), 9); +} diff --git a/test/byContract/IexecEscrow/IexecEscrowToken.js b/test/byContract/IexecEscrow/IexecEscrowToken.js index e54f8c181..25a2f1c01 100644 --- a/test/byContract/IexecEscrow/IexecEscrowToken.js +++ b/test/byContract/IexecEscrow/IexecEscrowToken.js @@ -1,461 +1,903 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../../../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; +var DEPLOYMENT = require('../../../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -if (DEPLOYMENT.asset == "Token") -contract('EscrowToken', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var categories = []; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - describe("fallback", async () => { - it("success", async () => { - await expectRevert.unspecified(web3.eth.sendTransaction({ from: accounts[0], to: IexecInstance.address, value: 100 })); - }); - }); - - describe("deposit", async () => { - describe("no tokens", async () => { - it("reverts", async () => { - assert.equal(await RLCInstance.balanceOf(accounts[1]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await expectRevert.unspecified(IexecInstance.deposit(100, { from: accounts[1] })); - - assert.equal(await RLCInstance.balanceOf(accounts[1]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - }); - - describe("not approved", async () => { - it("reverts", async () => { - await RLCInstance.transfer(accounts[1], 100, { from: accounts[0] }); - - assert.equal(await RLCInstance.balanceOf(accounts[1]), 100, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await expectRevert.unspecified(IexecInstance.deposit(100, { from: accounts[1] })); - - assert.equal(await RLCInstance.balanceOf(accounts[1]), 100, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - }); - - describe("approved", async () => { - it("success", async () => { - assert.equal(await RLCInstance.balanceOf(accounts[1]), 100, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await RLCInstance.approve(IexecInstance.address, 100, { from: accounts[1] }); - - txMined = await IexecInstance.deposit(100, { from: accounts[1] }); - - assert.equal(await RLCInstance.balanceOf(accounts[1]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, RLCInstance.address, "Transfer"); - assert.equal(events[0].args.from, accounts[1]); - assert.equal(events[0].args.to, IexecInstance.address); - assert.equal(events[0].args.value, 100); - - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, accounts[1]); - assert.equal(events[0].args.value, 100); - }); - }); - }); - - describe("depositFor", async () => { - describe("no tokens", async () => { - it("reverts", async () => { - assert.equal(await RLCInstance.balanceOf(accounts[2]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[3]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await expectRevert.unspecified(IexecInstance.depositFor(100, accounts[3], { from: accounts[2] })); - - assert.equal(await RLCInstance.balanceOf(accounts[2]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[3]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - }); - - describe("not approved", async () => { - it("reverts", async () => { - await RLCInstance.transfer(accounts[2], 100, { from: accounts[0] }); - - assert.equal(await RLCInstance.balanceOf(accounts[2]), 100, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[3]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await expectRevert.unspecified(IexecInstance.depositFor(100, accounts[3], { from: accounts[2] })); - - assert.equal(await RLCInstance.balanceOf(accounts[2]), 100, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[3]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - }); - - describe("approved", async () => { - it("success", async () => { - assert.equal(await RLCInstance.balanceOf(accounts[2]), 100, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[3]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await RLCInstance.approve(IexecInstance.address, 100, { from: accounts[2] }); - - txMined = await IexecInstance.depositFor(100, accounts[3], { from: accounts[2] }); - - assert.equal(await RLCInstance.balanceOf(accounts[2]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[3]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, RLCInstance.address, "Transfer"); - assert.equal(events[0].args.from, accounts[2]); - assert.equal(events[0].args.to, IexecInstance.address); - assert.equal(events[0].args.value, 100); - - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, accounts[3]); - assert.equal(events[0].args.value, 100); - }); - }); - }); - - describe("depositForArray", async () => { - describe("no tokens", async () => { - it("reverts", async () => { - assert.equal(await RLCInstance.balanceOf(accounts[4]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await expectRevert.unspecified(IexecInstance.depositForArray( - [ 100, 100, 100 ], - [ accounts[5], accounts[6], accounts[7] ], - { from: accounts[4] } - )); - - assert.equal(await RLCInstance.balanceOf(accounts[4]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - }); - - describe("not approved", async () => { - it("reverts", async () => { - await RLCInstance.transfer(accounts[4], 300, { from: accounts[0] }); - - assert.equal(await RLCInstance.balanceOf(accounts[4]), 300, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await expectRevert.unspecified(IexecInstance.depositForArray( - [ 100, 100, 100 ], - [ accounts[5], accounts[6], accounts[7] ], - { from: accounts[4] } - )); - - assert.equal(await RLCInstance.balanceOf(accounts[4]), 300, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - }); - - describe("approved", async () => { - describe("length missmatch", () => { - describe("amounts.length > target.length", () => { - it("reverts", async () => { - assert.equal(await RLCInstance.balanceOf(accounts[4]), 300, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await RLCInstance.approve(IexecInstance.address, 300, { from: accounts[4] }); - - await expectRevert.unspecified(IexecInstance.depositForArray( - [ 100, 100, 100 ], - [ accounts[5] ], - { from: accounts[4] } - )); - - assert.equal(await RLCInstance.balanceOf(accounts[4]), 300, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - }); - - describe("amounts.length > target.length", () => { - it("reverts", async () => { - assert.equal(await RLCInstance.balanceOf(accounts[4]), 300, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await RLCInstance.approve(IexecInstance.address, 300, { from: accounts[4] }); - - await expectRevert.unspecified(IexecInstance.depositForArray( - [ 100 ], - [ accounts[5], accounts[6], accounts[7] ], - { from: accounts[4] } - )); - - assert.equal(await RLCInstance.balanceOf(accounts[4]), 300, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - }); - }); - - describe("length match", () => { - it("success", async () => { - assert.equal(await RLCInstance.balanceOf(accounts[4]), 300, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await RLCInstance.approve(IexecInstance.address, 300, { from: accounts[4] }); - - txMined = await IexecInstance.depositForArray( - [ 100, 100, 100 ], - [ accounts[5], accounts[6], accounts[7] ], - { from: accounts[4] } - ); - - assert.equal(await RLCInstance.balanceOf(accounts[4]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[5]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[6]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[7]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, RLCInstance.address, "Transfer"); - assert.equal(events[0].args.from, accounts[4]); - assert.equal(events[0].args.to, IexecInstance.address); - assert.equal(events[0].args.value, 100); - assert.equal(events[1].args.from, accounts[4]); - assert.equal(events[1].args.to, IexecInstance.address); - assert.equal(events[1].args.value, 100); - assert.equal(events[2].args.from, accounts[4]); - assert.equal(events[2].args.to, IexecInstance.address); - assert.equal(events[2].args.value, 100); - - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS); - assert.equal(events[0].args.to, accounts[5]); - assert.equal(events[0].args.value, 100); - assert.equal(events[1].args.from, constants.NULL.ADDRESS); - assert.equal(events[1].args.to, accounts[6]); - assert.equal(events[1].args.value, 100); - assert.equal(events[2].args.from, constants.NULL.ADDRESS); - assert.equal(events[2].args.to, accounts[7]); - assert.equal(events[2].args.value, 100); - }); - }); - }); - }); - - describe("ApproveAndCall", async () => { - it("success", async () => { - const balanceBefore = await RLCInstance.balanceOf(accounts[0]); - const accountBefore = await IexecInstance.balanceOf(accounts[0]); - const amount = web3.utils.toBN(1000); - - await RLCInstance.approveAndCall(IexecInstance.address, amount, "0x", { from: accounts[0] }); - - assert.equal(await RLCInstance.balanceOf(accounts[0]), balanceBefore.sub(amount).toString()); - assert.equal(await IexecInstance.balanceOf(accounts[0]), accountBefore.add(amount).toString()); - }); - - describe("wrong token protection", async () => { - it("create dummy token", async () => { - DummyToken = await RLC.new({ from: accounts[9] }); - }); - - it("reverts", async () => { - const balanceBefore = await RLCInstance.balanceOf(accounts[0]); - const accountBefore = await IexecInstance.balanceOf(accounts[0]); - const amount = web3.utils.toBN(1000); - - await expectRevert(DummyToken.approveAndCall(IexecInstance.address, amount, "0x", { from: accounts[9] }), "wrong-token"); - - assert.equal(await RLCInstance.balanceOf(accounts[0]), balanceBefore.toString()); - assert.equal(await IexecInstance.balanceOf(accounts[0]), accountBefore.toString()); - }); - }); - }); - - describe("withdraw", async () => { - describe("empty balance", async () => { - it("reverts", async () => { - assert.equal(await RLCInstance.balanceOf(accounts[2]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[2]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - - await expectRevert.unspecified(IexecInstance.withdraw(100, { from: accounts[2] })); - - assert.equal(await RLCInstance.balanceOf(accounts[2]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[2]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - }); - - describe("insufficient balance", async () => { - it("reverts", async () => { - assert.equal(await RLCInstance.balanceOf(accounts[1]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - - await expectRevert.unspecified(IexecInstance.withdraw(1000, { from: accounts[1] })); - - assert.equal(await RLCInstance.balanceOf(accounts[1]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[1]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - }); - }); - - describe("sufficient balance", async () => { - it("success", async () => { - assert.equal(await RLCInstance.balanceOf(accounts[3]), 0, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[3]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 100, 0 ], "check balance"); - - txMined = await IexecInstance.withdraw(100, { from: accounts[3] }); - - assert.equal(await RLCInstance.balanceOf(accounts[3]), 100, "wrong rlc balance"); - assert.deepEqual(Object.extract(await IexecInstance.viewAccount(accounts[3]), [ 'stake', 'locked' ]).map(bn => Number(bn)), [ 0, 0 ], "check balance"); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, RLCInstance.address, "Transfer"); - assert.equal(events[0].args.from, IexecInstance.address); - assert.equal(events[0].args.to, accounts[3]); - assert.equal(events[0].args.value, 100); - - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events[0].args.from, accounts[3]); - assert.equal(events[0].args.to, constants.NULL.ADDRESS); - assert.equal(events[0].args.value, 100); - }); - }); - - }); - - describe("recover", async () => { - describe("unauthorized access", async () => { - it("reverts", async () => { - await expectRevert(IexecInstance.recover({ from: accounts[9] }), "Ownable: caller is not the owner."); - }); - }); - - describe("no locked funds", async () => { - it("success", async () => { - txMined = await IexecInstance.recover({ from: accounts[0] }); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS, "check minter"); - assert.equal(events[0].args.to, accounts[0], "check owner"); - assert.equal(events[0].args.value, 0, "check amount"); - }); - }); - - describe("locked funds", async () => { - it("locking funds", async () => { - await RLCInstance.transfer(IexecInstance.address, 1000, { from: accounts[0] }); - }); - - it("success", async () => { - txMined = await IexecInstance.recover({ from: accounts[0] }); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "Transfer"); - assert.equal(events[0].args.from, constants.NULL.ADDRESS, "check minter"); - assert.equal(events[0].args.to, accounts[0], "check owner"); - assert.equal(events[0].args.value, 1000, "check amount"); - }); - }); - }); -}); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../../../utils/tools'); +const enstools = require('../../../utils/ens-tools'); +const odbtools = require('../../../utils/odb-tools'); +const constants = require('../../../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); + +if (DEPLOYMENT.asset == 'Token') + contract('EscrowToken', async (accounts) => { + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var categories = []; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + }); + + describe('fallback', async () => { + it('success', async () => { + await expectRevert.unspecified( + web3.eth.sendTransaction({ + from: accounts[0], + to: IexecInstance.address, + value: 100, + }), + ); + }); + }); + + describe('deposit', async () => { + describe('no tokens', async () => { + it('reverts', async () => { + assert.equal(await RLCInstance.balanceOf(accounts[1]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[1]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await expectRevert.unspecified( + IexecInstance.deposit(100, { from: accounts[1] }), + ); + + assert.equal(await RLCInstance.balanceOf(accounts[1]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[1]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + }); + }); + + describe('not approved', async () => { + it('reverts', async () => { + await RLCInstance.transfer(accounts[1], 100, { from: accounts[0] }); + + assert.equal( + await RLCInstance.balanceOf(accounts[1]), + 100, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[1]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await expectRevert.unspecified( + IexecInstance.deposit(100, { from: accounts[1] }), + ); + + assert.equal( + await RLCInstance.balanceOf(accounts[1]), + 100, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[1]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + }); + }); + + describe('approved', async () => { + it('success', async () => { + assert.equal( + await RLCInstance.balanceOf(accounts[1]), + 100, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[1]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await RLCInstance.approve(IexecInstance.address, 100, { from: accounts[1] }); + + txMined = await IexecInstance.deposit(100, { from: accounts[1] }); + + assert.equal(await RLCInstance.balanceOf(accounts[1]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[1]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [100, 0], + 'check balance', + ); + }); + + it('emit events', async () => { + events = tools.extractEvents(txMined, RLCInstance.address, 'Transfer'); + assert.equal(events[0].args.from, accounts[1]); + assert.equal(events[0].args.to, IexecInstance.address); + assert.equal(events[0].args.value, 100); + + events = tools.extractEvents(txMined, IexecInstance.address, 'Transfer'); + assert.equal(events[0].args.from, constants.NULL.ADDRESS); + assert.equal(events[0].args.to, accounts[1]); + assert.equal(events[0].args.value, 100); + }); + }); + }); + + describe('depositFor', async () => { + describe('no tokens', async () => { + it('reverts', async () => { + assert.equal(await RLCInstance.balanceOf(accounts[2]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[3]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await expectRevert.unspecified( + IexecInstance.depositFor(100, accounts[3], { from: accounts[2] }), + ); + + assert.equal(await RLCInstance.balanceOf(accounts[2]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[3]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + }); + }); + + describe('not approved', async () => { + it('reverts', async () => { + await RLCInstance.transfer(accounts[2], 100, { from: accounts[0] }); + + assert.equal( + await RLCInstance.balanceOf(accounts[2]), + 100, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[3]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await expectRevert.unspecified( + IexecInstance.depositFor(100, accounts[3], { from: accounts[2] }), + ); + + assert.equal( + await RLCInstance.balanceOf(accounts[2]), + 100, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[3]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + }); + }); + + describe('approved', async () => { + it('success', async () => { + assert.equal( + await RLCInstance.balanceOf(accounts[2]), + 100, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[3]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await RLCInstance.approve(IexecInstance.address, 100, { from: accounts[2] }); + + txMined = await IexecInstance.depositFor(100, accounts[3], { + from: accounts[2], + }); + + assert.equal(await RLCInstance.balanceOf(accounts[2]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[3]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [100, 0], + 'check balance', + ); + }); + + it('emit events', async () => { + events = tools.extractEvents(txMined, RLCInstance.address, 'Transfer'); + assert.equal(events[0].args.from, accounts[2]); + assert.equal(events[0].args.to, IexecInstance.address); + assert.equal(events[0].args.value, 100); + + events = tools.extractEvents(txMined, IexecInstance.address, 'Transfer'); + assert.equal(events[0].args.from, constants.NULL.ADDRESS); + assert.equal(events[0].args.to, accounts[3]); + assert.equal(events[0].args.value, 100); + }); + }); + }); + + describe('depositForArray', async () => { + describe('no tokens', async () => { + it('reverts', async () => { + assert.equal(await RLCInstance.balanceOf(accounts[4]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[5]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[6]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[7]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await expectRevert.unspecified( + IexecInstance.depositForArray( + [100, 100, 100], + [accounts[5], accounts[6], accounts[7]], + { from: accounts[4] }, + ), + ); + + assert.equal(await RLCInstance.balanceOf(accounts[4]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[5]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[6]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[7]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + }); + }); + + describe('not approved', async () => { + it('reverts', async () => { + await RLCInstance.transfer(accounts[4], 300, { from: accounts[0] }); + + assert.equal( + await RLCInstance.balanceOf(accounts[4]), + 300, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[5]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[6]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[7]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await expectRevert.unspecified( + IexecInstance.depositForArray( + [100, 100, 100], + [accounts[5], accounts[6], accounts[7]], + { from: accounts[4] }, + ), + ); + + assert.equal( + await RLCInstance.balanceOf(accounts[4]), + 300, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[5]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[6]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[7]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + }); + }); + + describe('approved', async () => { + describe('length missmatch', () => { + describe('amounts.length > target.length', () => { + it('reverts', async () => { + assert.equal( + await RLCInstance.balanceOf(accounts[4]), + 300, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[5]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[6]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[7]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await RLCInstance.approve(IexecInstance.address, 300, { + from: accounts[4], + }); + + await expectRevert.unspecified( + IexecInstance.depositForArray([100, 100, 100], [accounts[5]], { + from: accounts[4], + }), + ); + + assert.equal( + await RLCInstance.balanceOf(accounts[4]), + 300, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[5]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[6]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[7]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + }); + }); + + describe('amounts.length > target.length', () => { + it('reverts', async () => { + assert.equal( + await RLCInstance.balanceOf(accounts[4]), + 300, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[5]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[6]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[7]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await RLCInstance.approve(IexecInstance.address, 300, { + from: accounts[4], + }); + + await expectRevert.unspecified( + IexecInstance.depositForArray( + [100], + [accounts[5], accounts[6], accounts[7]], + { from: accounts[4] }, + ), + ); + + assert.equal( + await RLCInstance.balanceOf(accounts[4]), + 300, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[5]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[6]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[7]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + }); + }); + }); + + describe('length match', () => { + it('success', async () => { + assert.equal( + await RLCInstance.balanceOf(accounts[4]), + 300, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[5]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[6]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[7]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await RLCInstance.approve(IexecInstance.address, 300, { + from: accounts[4], + }); + + txMined = await IexecInstance.depositForArray( + [100, 100, 100], + [accounts[5], accounts[6], accounts[7]], + { from: accounts[4] }, + ); + + assert.equal( + await RLCInstance.balanceOf(accounts[4]), + 0, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[5]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [100, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[6]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [100, 0], + 'check balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[7]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [100, 0], + 'check balance', + ); + }); + + it('emit events', async () => { + events = tools.extractEvents(txMined, RLCInstance.address, 'Transfer'); + assert.equal(events[0].args.from, accounts[4]); + assert.equal(events[0].args.to, IexecInstance.address); + assert.equal(events[0].args.value, 100); + assert.equal(events[1].args.from, accounts[4]); + assert.equal(events[1].args.to, IexecInstance.address); + assert.equal(events[1].args.value, 100); + assert.equal(events[2].args.from, accounts[4]); + assert.equal(events[2].args.to, IexecInstance.address); + assert.equal(events[2].args.value, 100); + + events = tools.extractEvents(txMined, IexecInstance.address, 'Transfer'); + assert.equal(events[0].args.from, constants.NULL.ADDRESS); + assert.equal(events[0].args.to, accounts[5]); + assert.equal(events[0].args.value, 100); + assert.equal(events[1].args.from, constants.NULL.ADDRESS); + assert.equal(events[1].args.to, accounts[6]); + assert.equal(events[1].args.value, 100); + assert.equal(events[2].args.from, constants.NULL.ADDRESS); + assert.equal(events[2].args.to, accounts[7]); + assert.equal(events[2].args.value, 100); + }); + }); + }); + }); + + describe('ApproveAndCall', async () => { + it('success', async () => { + const balanceBefore = await RLCInstance.balanceOf(accounts[0]); + const accountBefore = await IexecInstance.balanceOf(accounts[0]); + const amount = web3.utils.toBN(1000); + + await RLCInstance.approveAndCall(IexecInstance.address, amount, '0x', { + from: accounts[0], + }); + + assert.equal( + await RLCInstance.balanceOf(accounts[0]), + balanceBefore.sub(amount).toString(), + ); + assert.equal( + await IexecInstance.balanceOf(accounts[0]), + accountBefore.add(amount).toString(), + ); + }); + + describe('wrong token protection', async () => { + it('create dummy token', async () => { + DummyToken = await RLC.new({ from: accounts[9] }); + }); + + it('reverts', async () => { + const balanceBefore = await RLCInstance.balanceOf(accounts[0]); + const accountBefore = await IexecInstance.balanceOf(accounts[0]); + const amount = web3.utils.toBN(1000); + + //TODO: `expectRevert` on explicit "wrong-token" message + // instead of `expectRevert.assertion`. Cause: + // Error: VM Exception while processing transaction: invalid opcode + await expectRevert.assertion( + DummyToken.approveAndCall(IexecInstance.address, amount, '0x', { + from: accounts[9], + }), + ); + + assert.equal( + await RLCInstance.balanceOf(accounts[0]), + balanceBefore.toString(), + ); + assert.equal( + await IexecInstance.balanceOf(accounts[0]), + accountBefore.toString(), + ); + }); + }); + }); + + describe('withdraw', async () => { + describe('empty balance', async () => { + it('reverts', async () => { + assert.equal(await RLCInstance.balanceOf(accounts[2]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[2]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + + await expectRevert.unspecified( + IexecInstance.withdraw(100, { from: accounts[2] }), + ); + + assert.equal(await RLCInstance.balanceOf(accounts[2]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[2]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + }); + }); + + describe('insufficient balance', async () => { + it('reverts', async () => { + assert.equal(await RLCInstance.balanceOf(accounts[1]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[1]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [100, 0], + 'check balance', + ); + + await expectRevert.unspecified( + IexecInstance.withdraw(1000, { from: accounts[1] }), + ); + + assert.equal(await RLCInstance.balanceOf(accounts[1]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[1]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [100, 0], + 'check balance', + ); + }); + }); + + describe('sufficient balance', async () => { + it('success', async () => { + assert.equal(await RLCInstance.balanceOf(accounts[3]), 0, 'wrong rlc balance'); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[3]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [100, 0], + 'check balance', + ); + + txMined = await IexecInstance.withdraw(100, { from: accounts[3] }); + + assert.equal( + await RLCInstance.balanceOf(accounts[3]), + 100, + 'wrong rlc balance', + ); + assert.deepEqual( + Object.extract(await IexecInstance.viewAccount(accounts[3]), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)), + [0, 0], + 'check balance', + ); + }); + + it('emit events', async () => { + events = tools.extractEvents(txMined, RLCInstance.address, 'Transfer'); + assert.equal(events[0].args.from, IexecInstance.address); + assert.equal(events[0].args.to, accounts[3]); + assert.equal(events[0].args.value, 100); + + events = tools.extractEvents(txMined, IexecInstance.address, 'Transfer'); + assert.equal(events[0].args.from, accounts[3]); + assert.equal(events[0].args.to, constants.NULL.ADDRESS); + assert.equal(events[0].args.value, 100); + }); + }); + }); + + describe('recover', async () => { + describe('unauthorized access', async () => { + it('reverts', async () => { + await expectRevert( + IexecInstance.recover({ from: accounts[9] }), + 'Ownable: caller is not the owner', + ); + }); + }); + + describe('no locked funds', async () => { + it('success', async () => { + txMined = await IexecInstance.recover({ from: accounts[0] }); + }); + + it('emit events', async () => { + events = tools.extractEvents(txMined, IexecInstance.address, 'Transfer'); + assert.equal(events[0].args.from, constants.NULL.ADDRESS, 'check minter'); + assert.equal(events[0].args.to, accounts[0], 'check owner'); + assert.equal(events[0].args.value, 0, 'check amount'); + }); + }); + + describe('locked funds', async () => { + it('locking funds', async () => { + await RLCInstance.transfer(IexecInstance.address, 1000, { from: accounts[0] }); + }); + + it('success', async () => { + txMined = await IexecInstance.recover({ from: accounts[0] }); + }); + + it('emit events', async () => { + events = tools.extractEvents(txMined, IexecInstance.address, 'Transfer'); + assert.equal(events[0].args.from, constants.NULL.ADDRESS, 'check minter'); + assert.equal(events[0].args.to, accounts[0], 'check owner'); + assert.equal(events[0].args.value, 1000, 'check amount'); + }); + }); + }); + }); diff --git a/test/byContract/IexecMaintenance/IexecMaintenance.test.ts b/test/byContract/IexecMaintenance/IexecMaintenance.test.ts new file mode 100644 index 000000000..dad167cab --- /dev/null +++ b/test/byContract/IexecMaintenance/IexecMaintenance.test.ts @@ -0,0 +1,220 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { HashZero as hashZero } from '@ethersproject/constants'; +import { loadFixture, setStorageAt } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { + IexecInterfaceNative, + IexecInterfaceNative__factory, + IexecLibOrders_v5, + IexecMaintenanceExtra, + IexecMaintenanceExtra__factory, +} from '../../../typechain'; +import { getIexecAccounts } from '../../../utils/poco-tools'; + +const randomAddress = () => ethers.Wallet.createRandom().address; +const configureParams = { + token: randomAddress(), + name: 'some name', + symbol: 'some symbol', + decimals: 100, + appregistry: randomAddress(), + datasetregistry: randomAddress(), + workerpoolregistry: randomAddress(), + m_v3_iexecHub: randomAddress(), +}; +const configureArgs = Object.values(configureParams) as [ + string, + string, + string, + number, + string, + string, + string, + string, +]; +const someDomainSeparator = '0x0000000000000000000000000000000000000000000000000000000000000001'; + +describe('Maintenance', async () => { + let proxyAddress: string; + let [iexecPoco, iexecPocoAsAdmin]: IexecInterfaceNative[] = []; + let iexecMaintenanceExtra: IexecMaintenanceExtra; + let [iexecAdmin, worker, anyone]: SignerWithAddress[] = []; + + beforeEach('Deploy', async () => { + proxyAddress = await loadHardhatFixtureDeployment(); + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ iexecAdmin, worker, anyone } = accounts); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + iexecPocoAsAdmin = iexecPoco.connect(iexecAdmin); + iexecMaintenanceExtra = IexecMaintenanceExtra__factory.connect(proxyAddress, anyone); + } + + describe('Configure', () => { + it('Should configure', async () => { + await clearDomainSeparator(); + await iexecPocoAsAdmin.configure(...configureArgs).then((tx) => tx.wait()); + expect(await iexecPoco.eip712domain_separator()).equal( + await hashDomain(await iexecPoco.domain()), + ); + expect(await iexecPoco.token()).equal(configureParams.token); + expect(await iexecPoco.name()).equal(configureParams.name); + expect(await iexecPoco.symbol()).equal(configureParams.symbol); + expect(await iexecPoco.decimals()).equal(configureParams.decimals); + expect(await iexecPoco.appregistry()).equal(configureParams.appregistry); + expect(await iexecPoco.datasetregistry()).equal(configureParams.datasetregistry); + expect(await iexecPoco.workerpoolregistry()).equal(configureParams.workerpoolregistry); + // no getter for m_v3_iexecHub + expect(await iexecPoco.callbackgas()).equal(100000); + }); + it('Should not configure when sender is not owner', async () => { + await expect(iexecPoco.configure(...configureArgs)).to.be.revertedWith( + 'Ownable: caller is not the owner', + ); + }); + it('Should not configure when already configured', async () => { + await expect(iexecPocoAsAdmin.configure(...configureArgs)).to.be.revertedWith( + 'already-configured', + ); + }); + }); + + describe('Get domain', () => { + it('Should get domain', async () => { + const domain = await iexecPoco.domain(); + expect(domain.name).equal('iExecODB'); + expect(domain.version).equal('5.0.0'); + expect(domain.chainId).equal((await ethers.provider.getNetwork()).chainId); + expect(domain.verifyingContract).equal(proxyAddress); + }); + }); + + describe('Update domain separator', () => { + it('Should update domain separator', async () => { + await setDomainSeparatorInStorage(someDomainSeparator); + expect(await iexecPoco.eip712domain_separator()).equal(someDomainSeparator); + await iexecPoco.updateDomainSeparator().then((tx) => tx.wait()); + expect(await iexecPoco.eip712domain_separator()).equal( + await hashDomain(await iexecPoco.domain()), + ); + }); + it('Should not update domain separator when not configured', async () => { + await clearDomainSeparator(); + await expect(iexecPoco.updateDomainSeparator()).to.be.revertedWith('not-configured'); + }); + }); + + describe('Import score', () => { + it('[TODO] Should import score', async () => { + // Not tested + }); + it('Should not import score when no v3_iexecHub configured', async () => { + await expect(iexecPoco.importScore(worker.address)).to.be.revertedWithoutReason(); + }); + it('Should not import score when already imported', async () => { + const workerScoreImportedSlot = ethers.utils.hexStripZeros( + ethers.utils.keccak256( + ethers.utils.defaultAbiCoder.encode( + ['address', 'uint256'], + [ + worker.address, + 28, // Slot index of m_v3_scoreImported in Store + ], + ), + ), + ); + await setStorageAt( + proxyAddress, + workerScoreImportedSlot, + '0x01', // true: score already imported + ); + await expect(iexecPoco.importScore(worker.address)).to.be.revertedWith( + 'score-already-imported', + ); + }); + }); + + describe('Set TEE broker', () => { + it('Should set TEE broker', async () => { + const teeBrokerAddress = randomAddress(); + await iexecPocoAsAdmin.setTeeBroker(teeBrokerAddress).then((tx) => tx.wait()); + expect(await iexecPoco.teebroker()).equal(teeBrokerAddress); + }); + + it('Should not set TEE broker when sender is not the owner', async () => { + await expect(iexecPoco.setTeeBroker(randomAddress())).to.be.revertedWith( + 'Ownable: caller is not the owner', + ); + }); + }); + + describe('Set callback gas', () => { + const callbackGas = 1; + + it('Should set callback gas', async () => { + await iexecPocoAsAdmin.setCallbackGas(callbackGas).then((tx) => tx.wait()); + expect(await iexecPoco.callbackgas()).equal(callbackGas); + }); + + it('Should not set callback gas when sender is not the owner', async () => { + await expect(iexecPoco.setCallbackGas(callbackGas)).to.be.revertedWith( + 'Ownable: caller is not the owner', + ); + }); + }); + + describe('Change registries', () => { + it('Should change registries', async () => { + const appRegistry = randomAddress(); + const datasetRegistry = randomAddress(); + const workerpoolRegistry = randomAddress(); + await iexecMaintenanceExtra + .connect(iexecAdmin) + .changeRegistries(appRegistry, datasetRegistry, workerpoolRegistry) + .then((tx) => tx.wait()); + expect(await iexecPoco.appregistry()).equal(appRegistry); + expect(await iexecPoco.datasetregistry()).equal(datasetRegistry); + expect(await iexecPoco.workerpoolregistry()).equal(workerpoolRegistry); + }); + + it('Should not change registries when sender is not the owner', async () => { + await expect( + iexecMaintenanceExtra.changeRegistries( + randomAddress(), + randomAddress(), + randomAddress(), + ), + ).to.be.revertedWith('Ownable: caller is not the owner'); + }); + }); + + async function clearDomainSeparator() { + await setDomainSeparatorInStorage(hashZero); + } + + async function setDomainSeparatorInStorage(domainSeparator: string) { + await setStorageAt( + proxyAddress, + '0x10', // Slot index of EIP712DOMAIN_SEPARATOR in Store + domainSeparator, + ); + // Double check the update of the domain separator happened + expect(await iexecPoco.eip712domain_separator()).equal(domainSeparator); + } +}); + +async function hashDomain(domain: IexecLibOrders_v5.EIP712DomainStructOutput) { + return ethers.utils._TypedDataEncoder.hashDomain({ + name: domain.name, + version: domain.version, + chainId: domain.chainId, + verifyingContract: domain.verifyingContract, + }); +} diff --git a/test/byContract/IexecMaintenance/configure.js b/test/byContract/IexecMaintenance/configure.js deleted file mode 100644 index 7fe8a0ddc..000000000 --- a/test/byContract/IexecMaintenance/configure.js +++ /dev/null @@ -1,119 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Poco', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: internal methods * - ***************************************************************************/ - it("cannot reconfigure", async () => { - await expectRevert.unspecified(IexecInstance.configure( - RLCInstance.address, - "Hub RLC", - "hRLC", - 9, - AppRegistryInstance.address, - DatasetRegistryInstance.address, - WorkerpoolRegistryInstance.address, - constants.NULL.ADDRESS, - )); - }); - - it("domain", async () => { - domain = await IexecInstance.domain(); - assert.equal(domain.name, 'iExecODB'); - assert.equal(domain.version, '5.0.0'); - // assert.equal(domain.chainId, _); // TODO: waiting for ganache fix - assert.equal(domain.verifyingContract, IexecInstance.address); - - console.log('>>>>>> domain.chainId:', domain.chainId); - console.log('>>>>>> web.eth.net.getId:', await web3.eth.net.getId()); - }); - - it("updateChainId", async () => { - await IexecInstance.updateDomainSeparator(); - }); - -}); diff --git a/test/byContract/IexecOrderManagement/IexecOrderManagement.test.ts b/test/byContract/IexecOrderManagement/IexecOrderManagement.test.ts new file mode 100644 index 000000000..243f73868 --- /dev/null +++ b/test/byContract/IexecOrderManagement/IexecOrderManagement.test.ts @@ -0,0 +1,348 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { + IexecInterfaceNative, + IexecInterfaceNative__factory, + IexecLibOrders_v5, +} from '../../../typechain'; +import { NULL } from '../../../utils/constants'; +import { buildOrders, createOrderOperation } from '../../../utils/createOrders'; +import { OrderOperationEnum, getIexecAccounts } from '../../../utils/poco-tools'; +import { IexecWrapper } from '../../utils/IexecWrapper'; + +const volume = 3; +const someSignature = ethers.utils.hexZeroPad('0x1', 65); // non empty signature + +describe('OrderManagement', async () => { + let proxyAddress: string; + let [ + iexecPoco, + iexecPocoAsAppProvider, + iexecPocoAsDatasetProvider, + iexecPocoAsScheduler, + iexecPocoAsRequester, + ]: IexecInterfaceNative[] = []; + let iexecWrapper: IexecWrapper; + let [anyone, appProvider, datasetProvider, scheduler, requester]: SignerWithAddress[] = []; + let appOrder: IexecLibOrders_v5.AppOrderStruct; + let datasetOrder: IexecLibOrders_v5.DatasetOrderStruct; + let workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrderStruct; + let requestOrder: IexecLibOrders_v5.RequestOrderStruct; + let [appOrderHash, datasetOrderHash, workerpoolOrderHash, requestOrderHash]: string[] = []; + + beforeEach(async () => { + proxyAddress = await loadHardhatFixtureDeployment(); + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ appProvider, datasetProvider, scheduler, requester, anyone } = accounts); + iexecWrapper = new IexecWrapper(proxyAddress, accounts); + const { appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets(); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + iexecPocoAsAppProvider = iexecPoco.connect(appProvider); + iexecPocoAsDatasetProvider = iexecPoco.connect(datasetProvider); + iexecPocoAsScheduler = iexecPoco.connect(scheduler); + iexecPocoAsRequester = iexecPoco.connect(requester); + const appPrice = 1000; + const datasetPrice = 1_000_000; + const workerpoolPrice = 1_000_000_000; + const ordersAssets = { + app: appAddress, + dataset: datasetAddress, + workerpool: workerpoolAddress, + }; + const ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, + }; + ({ appOrder, datasetOrder, workerpoolOrder, requestOrder } = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + }).toObject()); + appOrderHash = iexecWrapper.hashOrder(appOrder); + datasetOrderHash = iexecWrapper.hashOrder(datasetOrder); + workerpoolOrderHash = iexecWrapper.hashOrder(workerpoolOrder); + requestOrderHash = iexecWrapper.hashOrder(requestOrder); + } + + describe('Presign orders when operations are sent by owners', () => { + it('Should presign app order when operation is sent by app provider', async () => { + await expect( + iexecPocoAsAppProvider.manageAppOrder( + createOrderOperation(appOrder, OrderOperationEnum.SIGN), + ), + ) + .to.emit(iexecPoco, 'SignedAppOrder') + .withArgs(appOrderHash); + expect(await iexecPoco.viewPresigned(appOrderHash)).equal(appProvider.address); + expect(await iexecPoco.verifyPresignature(appProvider.address, appOrderHash)).is.true; + expect( + await iexecPoco.verifyPresignatureOrSignature( + appProvider.address, + appOrderHash, + NULL.SIGNATURE, + ), + ).is.true; + }); + it('Should presign dataset order when operation is sent by dataset provider', async () => { + await expect( + iexecPocoAsDatasetProvider.manageDatasetOrder( + createOrderOperation(datasetOrder, OrderOperationEnum.SIGN), + ), + ) + .to.emit(iexecPoco, 'SignedDatasetOrder') + .withArgs(datasetOrderHash); + expect(await iexecPoco.viewPresigned(datasetOrderHash)).equal(datasetProvider.address); + expect(await iexecPoco.verifyPresignature(datasetProvider.address, datasetOrderHash)).is + .true; + expect( + await iexecPoco.verifyPresignatureOrSignature( + datasetProvider.address, + datasetOrderHash, + NULL.SIGNATURE, + ), + ).is.true; + }); + it('Should presign workerpool order when operation is sent by scheduler', async () => { + await expect( + iexecPocoAsScheduler.manageWorkerpoolOrder( + createOrderOperation(workerpoolOrder, OrderOperationEnum.SIGN), + ), + ) + .to.emit(iexecPoco, 'SignedWorkerpoolOrder') + .withArgs(workerpoolOrderHash); + expect(await iexecPoco.viewPresigned(workerpoolOrderHash)).equal(scheduler.address); + expect(await iexecPoco.verifyPresignature(scheduler.address, workerpoolOrderHash)).is + .true; + expect( + await iexecPoco.verifyPresignatureOrSignature( + scheduler.address, + workerpoolOrderHash, + NULL.SIGNATURE, + ), + ).is.true; + }); + it('Should presign request order when operation is sent by requester', async () => { + await expect( + iexecPocoAsRequester.manageRequestOrder( + createOrderOperation(requestOrder, OrderOperationEnum.SIGN), + ), + ) + .to.emit(iexecPoco, 'SignedRequestOrder') + .withArgs(requestOrderHash); + expect(await iexecPoco.viewPresigned(requestOrderHash)).equal(requester.address); + expect(await iexecPoco.verifyPresignature(requester.address, requestOrderHash)).is.true; + expect( + await iexecPoco.verifyPresignatureOrSignature( + requester.address, + requestOrderHash, + NULL.SIGNATURE, + ), + ).is.true; + }); + }); + + describe('Presign orders when operations are signed by owners', () => { + it('Should presign app order when operation is signed by app provider', async () => { + const orderOperation = createOrderOperation(appOrder, OrderOperationEnum.SIGN); + await iexecWrapper.signOrderOperation(orderOperation, appProvider); + + await expect(iexecPoco.manageAppOrder(orderOperation)) + .to.emit(iexecPoco, 'SignedAppOrder') + .withArgs(appOrderHash); + expect(await iexecPoco.viewPresigned(appOrderHash)).equal(appProvider.address); + expect(await iexecPoco.verifyPresignature(appProvider.address, appOrderHash)).is.true; + expect( + await iexecPoco.verifyPresignatureOrSignature( + appProvider.address, + appOrderHash, + NULL.SIGNATURE, + ), + ).is.true; + }); + it('Should presign dataset order when operation is signed by dataset provider', async () => { + const orderOperation = createOrderOperation(datasetOrder, OrderOperationEnum.SIGN); + await iexecWrapper.signOrderOperation(orderOperation, datasetProvider); + + await expect(iexecPoco.manageDatasetOrder(orderOperation)) + .to.emit(iexecPoco, 'SignedDatasetOrder') + .withArgs(datasetOrderHash); + expect(await iexecPoco.viewPresigned(datasetOrderHash)).equal(datasetProvider.address); + expect(await iexecPoco.verifyPresignature(datasetProvider.address, datasetOrderHash)).is + .true; + expect( + await iexecPoco.verifyPresignatureOrSignature( + datasetProvider.address, + datasetOrderHash, + NULL.SIGNATURE, + ), + ).is.true; + }); + it('Should presign workerpool order when operation is signed by workerpool provider', async () => { + const orderOperation = createOrderOperation(workerpoolOrder, OrderOperationEnum.SIGN); + await iexecWrapper.signOrderOperation(orderOperation, scheduler); + + await expect(iexecPoco.manageWorkerpoolOrder(orderOperation)) + .to.emit(iexecPoco, 'SignedWorkerpoolOrder') + .withArgs(workerpoolOrderHash); + expect(await iexecPoco.viewPresigned(workerpoolOrderHash)).equal(scheduler.address); + expect(await iexecPoco.verifyPresignature(scheduler.address, workerpoolOrderHash)).is + .true; + expect( + await iexecPoco.verifyPresignatureOrSignature( + scheduler.address, + workerpoolOrderHash, + NULL.SIGNATURE, + ), + ).is.true; + }); + it('Should presign request order when operation is signed by requester', async () => { + const orderOperation = createOrderOperation(requestOrder, OrderOperationEnum.SIGN); + await iexecWrapper.signOrderOperation(orderOperation, requester); + + await expect(iexecPoco.manageRequestOrder(orderOperation)) + .to.emit(iexecPoco, 'SignedRequestOrder') + .withArgs(requestOrderHash); + expect(await iexecPoco.viewPresigned(requestOrderHash)).equal(requester.address); + expect(await iexecPoco.verifyPresignature(requester.address, requestOrderHash)).is.true; + expect( + await iexecPoco.verifyPresignatureOrSignature( + requester.address, + requestOrderHash, + NULL.SIGNATURE, + ), + ).is.true; + }); + }); + + describe('Close orders when operations are sent by owners', () => { + it('Should close app order when operation is sent by app provider', async () => { + await expect( + iexecPocoAsAppProvider.manageAppOrder( + createOrderOperation(appOrder, OrderOperationEnum.CLOSE), + ), + ) + .to.emit(iexecPoco, 'ClosedAppOrder') + .withArgs(appOrderHash); + expect(await iexecPoco.viewConsumed(appOrderHash)).equal(volume); + }); + it('Should close dataset order when operation is sent by dataset provider', async () => { + await expect( + iexecPocoAsDatasetProvider.manageDatasetOrder( + createOrderOperation(datasetOrder, OrderOperationEnum.CLOSE), + ), + ) + .to.emit(iexecPoco, 'ClosedDatasetOrder') + .withArgs(datasetOrderHash); + expect(await iexecPoco.viewConsumed(datasetOrderHash)).equal(volume); + }); + it('Should close workerpool order when operation is sent by scheduler', async () => { + await expect( + iexecPocoAsScheduler.manageWorkerpoolOrder( + createOrderOperation(workerpoolOrder, OrderOperationEnum.CLOSE), + ), + ) + .to.emit(iexecPoco, 'ClosedWorkerpoolOrder') + .withArgs(workerpoolOrderHash); + expect(await iexecPoco.viewConsumed(workerpoolOrderHash)).equal(volume); + }); + it('Should close request order when operation is sent by requester', async () => { + await expect( + iexecPocoAsRequester.manageRequestOrder( + createOrderOperation(requestOrder, OrderOperationEnum.CLOSE), + ), + ) + .to.emit(iexecPoco, 'ClosedRequestOrder') + .withArgs(requestOrderHash); + expect(await iexecPoco.viewConsumed(requestOrderHash)).equal(volume); + }); + }); + + describe('Close orders when operations are signed by owners', () => { + it('Should close app order when operation is signed by app provider', async () => { + const orderOperation = createOrderOperation(appOrder, OrderOperationEnum.CLOSE); + await iexecWrapper.signOrderOperation(orderOperation, appProvider); + + await expect(iexecPoco.manageAppOrder(orderOperation)) + .to.emit(iexecPoco, 'ClosedAppOrder') + .withArgs(appOrderHash); + expect(await iexecPoco.viewConsumed(appOrderHash)).equal(volume); + }); + it('Should close dataset order when operation is signed by dataset provider', async () => { + const orderOperation = createOrderOperation(datasetOrder, OrderOperationEnum.CLOSE); + await iexecWrapper.signOrderOperation(orderOperation, datasetProvider); + + await expect(iexecPoco.manageDatasetOrder(orderOperation)) + .to.emit(iexecPoco, 'ClosedDatasetOrder') + .withArgs(datasetOrderHash); + expect(await iexecPoco.viewConsumed(datasetOrderHash)).equal(volume); + }); + it('Should close workerpool order when operation is signed by scheduler', async () => { + const orderOperation = createOrderOperation(workerpoolOrder, OrderOperationEnum.CLOSE); + await iexecWrapper.signOrderOperation(orderOperation, scheduler); + + await expect(iexecPoco.manageWorkerpoolOrder(orderOperation)) + .to.emit(iexecPoco, 'ClosedWorkerpoolOrder') + .withArgs(workerpoolOrderHash); + expect(await iexecPoco.viewConsumed(workerpoolOrderHash)).equal(volume); + }); + it('Should close request order when operation is signed by requester', async () => { + const orderOperation = createOrderOperation(requestOrder, OrderOperationEnum.CLOSE); + await iexecWrapper.signOrderOperation(orderOperation, requester); + + await expect(iexecPoco.manageRequestOrder(orderOperation)) + .to.emit(iexecPoco, 'ClosedRequestOrder') + .withArgs(requestOrderHash); + expect(await iexecPoco.viewConsumed(requestOrderHash)).equal(volume); + }); + }); + + describe('Should not manage orders when invalid sender or signature', () => { + it('Should not manage app order when invalid sender or signature', async () => { + await expect( + iexecPoco.manageAppOrder({ + order: appOrder, + operation: OrderOperationEnum.SIGN, // any is fine + sign: someSignature, + }), + ).to.be.revertedWith('invalid-sender-or-signature'); + }); + it('Should not manage dataset order when invalid sender or signature', async () => { + await expect( + iexecPoco.manageDatasetOrder({ + order: datasetOrder, + operation: OrderOperationEnum.SIGN, // any is fine + sign: someSignature, + }), + ).to.be.revertedWith('invalid-sender-or-signature'); + }); + it('Should not manage workerpool order when invalid sender or signature', async () => { + await expect( + iexecPoco.manageWorkerpoolOrder({ + order: workerpoolOrder, + operation: OrderOperationEnum.SIGN, // any is fine + sign: someSignature, + }), + ).to.be.revertedWith('invalid-sender-or-signature'); + }); + it('Should not manage request order when invalid sender or signature', async () => { + await expect( + iexecPoco.manageRequestOrder({ + order: requestOrder, + operation: OrderOperationEnum.SIGN, // any is fine + sign: someSignature, + }), + ).to.be.revertedWith('invalid-sender-or-signature'); + }); + }); +}); diff --git a/test/byContract/IexecOrderManagement/close.js b/test/byContract/IexecOrderManagement/close.js deleted file mode 100644 index 755f82aa6..000000000 --- a/test/byContract/IexecOrderManagement/close.js +++ /dev/null @@ -1,428 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require('../../../utils/ens-tools'); -const odbtools = require('../../../utils/odb-tools'); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('OrderManagement', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: creation * - ***************************************************************************/ - it("[Genesis] App Creation", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("[Genesis] Dataset Creation", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("[Genesis] Workerpool Creation", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - const generateAppOrder = () => { - const apporder = { - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: DatasetInstance.address, - workerpoolrestrict: WorkerpoolInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashAppOrder(ERC712_domain, apporder); - return { apporder, hash }; - } - - const generateDatasetOrder = () => { - const datasetorder = { - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: AppInstance.address, - workerpoolrestrict: WorkerpoolInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder); - return { datasetorder, hash }; - } - - const generateWorkerpoolOrder = () => { - const workerpoolorder = { - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 1000, - apprestrict: AppInstance.address, - datasetrestrict: DatasetInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder); - return { workerpoolorder, hash }; - } - - const generateRequestOrder = () => { - const requestorder = { - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: WorkerpoolInstance.address, - workerpoolmaxprice: 25, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 1000, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "app params", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashRequestOrder(ERC712_domain, requestorder); - return { requestorder, hash }; - } - - /*************************************************************************** - * TEST: App cancel * - ***************************************************************************/ - describe("cancel apporder", async () => { - it("unauthorized sender", async () => { - const { apporder, hash } = await generateAppOrder(); - const apporderoperation = { - order: apporder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in app order presign"); - await expectRevert.unspecified(IexecInstance.manageAppOrder(apporderoperation,{ from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in app order presign"); - }); - - it("unauthorized signature", async () => { - const { apporder, hash } = await generateAppOrder(); - const apporderoperation = await iexecAdmin.signAppOrderOperation({ - order: apporder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in app order presign"); - await expectRevert.unspecified(IexecInstance.manageAppOrder(apporderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in app order presign"); - }); - - it("authorized signature", async () => { - const { apporder, hash } = await generateAppOrder(); - const apporderoperation = await appProvider.signAppOrderOperation({ - order: apporder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in app order presign"); - await IexecInstance.manageAppOrder(apporderoperation, { from: iexecAdmin.address }); - assert.equal(await IexecInstance.viewConsumed(hash), apporder.volume, "Error in app order presign"); - }); - - it("authorized sender", async () => { - const { apporder, hash } = await generateAppOrder(); - const apporderoperation = { - order: apporder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in app order presign"); - await IexecInstance.manageAppOrder(apporderoperation, { from: appProvider.address }); - assert.equal(await IexecInstance.viewConsumed(hash), apporder.volume, "Error in app order presign"); - }); - }); - - /*************************************************************************** - * TEST: Dataset cancel * - ***************************************************************************/ - describe("cancel datasetorder", async () => { - it("unauthorized sender", async () => { - const { datasetorder, hash } = await generateDatasetOrder(); - const datasetorderoperation = { - order: datasetorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in dataset order presign"); - await expectRevert.unspecified(IexecInstance.manageDatasetOrder(datasetorderoperation,{ from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in dataset order presign"); - }); - - it("unauthorized signature", async () => { - const { datasetorder, hash } = await generateDatasetOrder(); - const datasetorderoperation = await iexecAdmin.signDatasetOrderOperation({ - order: datasetorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in dataset order presign"); - await expectRevert.unspecified(IexecInstance.manageDatasetOrder(datasetorderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in dataset order presign"); - }); - - it("authorized signature", async () => { - const { datasetorder, hash } = await generateDatasetOrder(); - const datasetorderoperation = await datasetProvider.signDatasetOrderOperation({ - order: datasetorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in dataset order presign"); - await IexecInstance.manageDatasetOrder(datasetorderoperation, { from: iexecAdmin.address }); - assert.equal(await IexecInstance.viewConsumed(hash), datasetorder.volume, "Error in dataset order presign"); - }); - - it("authorized sender", async () => { - const { datasetorder, hash } = await generateDatasetOrder(); - const datasetorderoperation = { - order: datasetorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in dataset order presign"); - await IexecInstance.manageDatasetOrder(datasetorderoperation, { from: datasetProvider.address }); - assert.equal(await IexecInstance.viewConsumed(hash), datasetorder.volume, "Error in dataset order presign"); - }); - }); - - /*************************************************************************** - * TEST: Workerpool cancel * - ***************************************************************************/ - describe("cancel workerpoolorder", async () => { - it("unauthorized sender", async () => { - const { workerpoolorder, hash } = await generateWorkerpoolOrder(); - const workerpoolorderoperation = { - order: workerpoolorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in workerpool order presign"); - await expectRevert.unspecified(IexecInstance.manageWorkerpoolOrder(workerpoolorderoperation,{ from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in workerpool order presign"); - }); - - it("unauthorized signature", async () => { - const { workerpoolorder, hash } = await generateWorkerpoolOrder(); - const workerpoolorderoperation = await iexecAdmin.signWorkerpoolOrderOperation({ - order: workerpoolorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in workerpool order presign"); - await expectRevert.unspecified(IexecInstance.manageWorkerpoolOrder(workerpoolorderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in workerpool order presign"); - }); - - it("authorized signature", async () => { - const { workerpoolorder, hash } = await generateWorkerpoolOrder(); - const workerpoolorderoperation = await scheduler.signWorkerpoolOrderOperation({ - order: workerpoolorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in workerpool order presign"); - await IexecInstance.manageWorkerpoolOrder(workerpoolorderoperation, { from: iexecAdmin.address }); - assert.equal(await IexecInstance.viewConsumed(hash), workerpoolorder.volume, "Error in workerpool order presign"); - }); - - it("authorized sender", async () => { - const { workerpoolorder, hash } = await generateWorkerpoolOrder(); - const workerpoolorderoperation = { - order: workerpoolorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in workerpool order presign"); - await IexecInstance.manageWorkerpoolOrder(workerpoolorderoperation, { from: scheduler.address }); - assert.equal(await IexecInstance.viewConsumed(hash), workerpoolorder.volume, "Error in workerpool order presign"); - }); - }); - - /*************************************************************************** - * TEST: Request cancel * - ***************************************************************************/ - describe("cancel requestorder", async () => { - it("unauthorized sender", async () => { - const { requestorder, hash } = await generateRequestOrder(); - const requestorderoperation = { - order: requestorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in request order presign"); - await expectRevert.unspecified(IexecInstance.manageRequestOrder(requestorderoperation,{ from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in request order presign"); - }); - - it("unauthorized signature", async () => { - const { requestorder, hash } = await generateRequestOrder(); - const requestorderoperation = await iexecAdmin.signRequestOrderOperation({ - order: requestorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in request order presign"); - await expectRevert.unspecified(IexecInstance.manageRequestOrder(requestorderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in request order presign"); - }); - - it("authorized signature", async () => { - const { requestorder, hash } = await generateRequestOrder(); - const requestorderoperation = await user.signRequestOrderOperation({ - order: requestorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in request order presign"); - await IexecInstance.manageRequestOrder(requestorderoperation, { from: iexecAdmin.address }); - assert.equal(await IexecInstance.viewConsumed(hash), requestorder.volume, "Error in request order presign"); - }); - - it("authorized sender", async () => { - const { requestorder, hash } = await generateRequestOrder(); - const requestorderoperation = { - order: requestorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewConsumed(hash), 0, "Error in request order presign"); - await IexecInstance.manageRequestOrder(requestorderoperation, { from: user.address }); - assert.equal(await IexecInstance.viewConsumed(hash), requestorder.volume, "Error in request order presign"); - }); - }); - -}); diff --git a/test/byContract/IexecOrderManagement/invalid.js b/test/byContract/IexecOrderManagement/invalid.js deleted file mode 100644 index 15926a336..000000000 --- a/test/byContract/IexecOrderManagement/invalid.js +++ /dev/null @@ -1,375 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('OrderManagement', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: deposit * - ***************************************************************************/ - it("[Genesis] deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - break; - - case "Token": - await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - break; - } - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); - }); - - /*************************************************************************** - * TEST: creation * - ***************************************************************************/ - it("[Genesis] App Creation", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("[Genesis] Dataset Creation", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("[Genesis] Workerpool Creation", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - const generateAppOrder = () => { - const apporder = { - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: DatasetInstance.address, - workerpoolrestrict: WorkerpoolInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashAppOrder(ERC712_domain, apporder); - return { apporder, hash }; - } - - const generateDatasetOrder = () => { - const datasetorder = { - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: AppInstance.address, - workerpoolrestrict: WorkerpoolInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder); - return { datasetorder, hash }; - } - - const generateWorkerpoolOrder = () => { - const workerpoolorder = { - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 1000, - apprestrict: AppInstance.address, - datasetrestrict: DatasetInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder); - return { workerpoolorder, hash }; - } - - const generateRequestOrder = () => { - const requestorder = { - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: WorkerpoolInstance.address, - workerpoolmaxprice: 25, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 1000, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "app params", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashRequestOrder(ERC712_domain, requestorder); - return { requestorder, hash }; - } - - /*************************************************************************** - * TEST: App * - ***************************************************************************/ - describe("apporder", async () => { - it("valid operation - sign", async () => { - const { apporder, hash } = await generateAppOrder(); - const apporderoperation = { - order: apporder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - await IexecInstance.manageAppOrder(apporderoperation, { from: appProvider.address }); - }); - - it("invalid operation", async () => { - const { apporder, hash } = await generateAppOrder(); - const apporderoperation = { - order: apporder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - await IexecInstance.manageAppOrder(apporderoperation, { from: appProvider.address }); - }); - - it("invalid operation", async () => { - const { apporder, hash } = await generateAppOrder(); - const apporderoperation = { - order: apporder, - operation: 0xFF, - sign: constants.NULL.SIGNATURE - }; - - await expectRevert.unspecified(IexecInstance.manageAppOrder(apporderoperation, { from: appProvider.address })); - }); - }); - - /*************************************************************************** - * TEST: Dataset * - ***************************************************************************/ - describe("datasetorder", async () => { - it("valid operation - sign", async () => { - const { datasetorder, hash } = await generateDatasetOrder(); - const datasetorderoperation = { - order: datasetorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - await IexecInstance.manageDatasetOrder(datasetorderoperation, { from: datasetProvider.address }); - }); - - it("invalid operation", async () => { - const { datasetorder, hash } = await generateDatasetOrder(); - const datasetorderoperation = { - order: datasetorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - await IexecInstance.manageDatasetOrder(datasetorderoperation, { from: datasetProvider.address }); - }); - - it("invalid operation", async () => { - const { datasetorder, hash } = await generateDatasetOrder(); - const datasetorderoperation = { - order: datasetorder, - operation: 0xFF, - sign: constants.NULL.SIGNATURE - }; - - await expectRevert.unspecified(IexecInstance.manageDatasetOrder(datasetorderoperation, { from: datasetProvider.address })); - }); - }); - - /*************************************************************************** - * TEST: Workerpool * - ***************************************************************************/ - describe("workerpoolorder", async () => { - it("valid operation - sign", async () => { - const { workerpoolorder, hash } = await generateWorkerpoolOrder(); - const workerpoolorderoperation = { - order: workerpoolorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - await IexecInstance.manageWorkerpoolOrder(workerpoolorderoperation, { from: scheduler.address }); - }); - - it("invalid operation", async () => { - const { workerpoolorder, hash } = await generateWorkerpoolOrder(); - const workerpoolorderoperation = { - order: workerpoolorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - await IexecInstance.manageWorkerpoolOrder(workerpoolorderoperation, { from: scheduler.address }); - }); - - it("invalid operation", async () => { - const { workerpoolorder, hash } = await generateWorkerpoolOrder(); - const workerpoolorderoperation = { - order: workerpoolorder, - operation: 0xFF, - sign: constants.NULL.SIGNATURE - }; - - await expectRevert.unspecified(IexecInstance.manageWorkerpoolOrder(workerpoolorderoperation, { from: scheduler.address })); - }); - }); - - /*************************************************************************** - * TEST: Request * - ***************************************************************************/ - describe("requestorder", async () => { - it("valid operation - sign", async () => { - const { requestorder, hash } = await generateRequestOrder(); - const requestorderoperation = { - order: requestorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - await IexecInstance.manageRequestOrder(requestorderoperation, { from: user.address }); - }); - - it("invalid operation", async () => { - const { requestorder, hash } = await generateRequestOrder(); - const requestorderoperation = { - order: requestorder, - operation: constants.OrderOperationEnum.CLOSE, - sign: constants.NULL.SIGNATURE - }; - - await IexecInstance.manageRequestOrder(requestorderoperation, { from: user.address }); - }); - - it("invalid operation", async () => { - const { requestorder, hash } = await generateRequestOrder(); - const requestorderoperation = { - order: requestorder, - operation: 0xFF, - sign: constants.NULL.SIGNATURE - }; - - await expectRevert.unspecified(IexecInstance.manageRequestOrder(requestorderoperation, { from: user.address })); - }); - }); - -}); diff --git a/test/byContract/IexecOrderManagement/sign.js b/test/byContract/IexecOrderManagement/sign.js deleted file mode 100644 index 594e14780..000000000 --- a/test/byContract/IexecOrderManagement/sign.js +++ /dev/null @@ -1,531 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('OrderManagement', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: deposit * - ***************************************************************************/ - it("[Genesis] deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - break; - - case "Token": - await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - break; - } - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); - }); - - /*************************************************************************** - * TEST: creation * - ***************************************************************************/ - it("[Genesis] App Creation", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("[Genesis] Dataset Creation", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("[Genesis] Workerpool Creation", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - const generateAppOrder = () => { - const apporder = { - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: DatasetInstance.address, - workerpoolrestrict: WorkerpoolInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashAppOrder(ERC712_domain, apporder); - return { apporder, hash }; - } - - const generateDatasetOrder = () => { - const datasetorder = { - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: AppInstance.address, - workerpoolrestrict: WorkerpoolInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder); - return { datasetorder, hash }; - } - - const generateWorkerpoolOrder = () => { - const workerpoolorder = { - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 1000, - apprestrict: AppInstance.address, - datasetrestrict: DatasetInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder); - return { workerpoolorder, hash }; - } - - const generateRequestOrder = () => { - const requestorder = { - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: WorkerpoolInstance.address, - workerpoolmaxprice: 25, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 1000, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "app params", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE - }; - const hash = odbtools.utils.hashRequestOrder(ERC712_domain, requestorder); - return { requestorder, hash }; - } - - /*************************************************************************** - * TEST: App sign * - ***************************************************************************/ - describe("sign apporder", async () => { - it("unauthorized sender", async () => { - const { apporder, hash } = await generateAppOrder(); - const apporderoperation = { - order: apporder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in app order presign"); - await expectRevert.unspecified(IexecInstance.manageAppOrder(apporderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in app order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isFalse(await IexecInstance.verifyPresignature (appProvider.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, apporder.sign)); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(appProvider.address, hash, apporder.sign)); - }); - - it("unauthorized signature", async () => { - const { apporder, hash } = await generateAppOrder(); - const apporderoperation = await iexecAdmin.signAppOrderOperation({ - order: apporder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in app order presign"); - await expectRevert.unspecified(IexecInstance.manageAppOrder(apporderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in app order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isFalse(await IexecInstance.verifyPresignature (appProvider.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, apporder.sign)); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(appProvider.address, hash, apporder.sign)); - }); - - it("authorized signature", async () => { - const { apporder, hash } = await generateAppOrder(); - const apporderoperation = await appProvider.signAppOrderOperation({ - order: apporder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in app order presign"); - await IexecInstance.manageAppOrder(apporderoperation, { from: iexecAdmin.address }); - assert.equal(await IexecInstance.viewPresigned(hash), appProvider.address, "Error in app order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isTrue (await IexecInstance.verifyPresignature (appProvider.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, apporder.sign)); - assert.isTrue (await IexecInstance.verifyPresignatureOrSignature (appProvider.address, hash, apporder.sign)); - }); - - it("authorized sender", async () => { - const { apporder, hash } = await generateAppOrder(); - const apporderoperation = { - order: apporder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in app order presign"); - await IexecInstance.manageAppOrder(apporderoperation, { from: appProvider.address }); - assert.equal(await IexecInstance.viewPresigned(hash), appProvider.address, "Error in app order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isTrue (await IexecInstance.verifyPresignature (appProvider.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, apporder.sign)); - assert.isTrue (await IexecInstance.verifyPresignatureOrSignature (appProvider.address, hash, apporder.sign)); - }); - }); - - /*************************************************************************** - * TEST: Dataset sign * - ***************************************************************************/ - describe("sign datasetorder", async () => { - it("unauthorized sender", async () => { - const { datasetorder, hash } = await generateDatasetOrder(); - const datasetorderoperation = { - order: datasetorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in dataset order presign"); - await expectRevert.unspecified(IexecInstance.manageDatasetOrder(datasetorderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in dataset order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isFalse(await IexecInstance.verifyPresignature (datasetProvider.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, datasetorder.sign)); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(datasetProvider.address, hash, datasetorder.sign)); - }); - - it("unauthorized signature", async () => { - const { datasetorder, hash } = await generateDatasetOrder(); - const datasetorderoperation = await iexecAdmin.signDatasetOrderOperation({ - order: datasetorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in dataset order presign"); - await expectRevert.unspecified(IexecInstance.manageDatasetOrder(datasetorderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in dataset order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isFalse(await IexecInstance.verifyPresignature (datasetProvider.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, datasetorder.sign)); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(datasetProvider.address, hash, datasetorder.sign)); - }); - - it("authorized signature", async () => { - const { datasetorder, hash } = await generateDatasetOrder(); - const datasetorderoperation = await datasetProvider.signDatasetOrderOperation({ - order: datasetorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in dataset order presign"); - await IexecInstance.manageDatasetOrder(datasetorderoperation, { from: iexecAdmin.address }); - assert.equal(await IexecInstance.viewPresigned(hash), datasetProvider.address, "Error in dataset order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isTrue (await IexecInstance.verifyPresignature (datasetProvider.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, datasetorder.sign)); - assert.isTrue (await IexecInstance.verifyPresignatureOrSignature (datasetProvider.address, hash, datasetorder.sign)); - }); - - it("authorized sender", async () => { - const { datasetorder, hash } = await generateDatasetOrder(); - const datasetorderoperation = { - order: datasetorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in dataset order presign"); - await IexecInstance.manageDatasetOrder(datasetorderoperation, { from: datasetProvider.address }); - assert.equal(await IexecInstance.viewPresigned(hash), datasetProvider.address, "Error in dataset order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isTrue (await IexecInstance.verifyPresignature (datasetProvider.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, datasetorder.sign)); - assert.isTrue (await IexecInstance.verifyPresignatureOrSignature (datasetProvider.address, hash, datasetorder.sign)); - }); - }); - - /*************************************************************************** - * TEST: Workerpool sign * - ***************************************************************************/ - describe("sign workerpoolorder", async () => { - it("unauthorized sender", async () => { - const { workerpoolorder, hash } = await generateWorkerpoolOrder(); - const workerpoolorderoperation = { - order: workerpoolorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in workerpool order presign"); - await expectRevert.unspecified(IexecInstance.manageWorkerpoolOrder(workerpoolorderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in workerpool order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isFalse(await IexecInstance.verifyPresignature (scheduler.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, workerpoolorder.sign)); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(scheduler.address, hash, workerpoolorder.sign)); - }); - - it("unauthorized signature", async () => { - const { workerpoolorder, hash } = await generateWorkerpoolOrder(); - const workerpoolorderoperation = await iexecAdmin.signWorkerpoolOrderOperation({ - order: workerpoolorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in workerpool order presign"); - await expectRevert.unspecified(IexecInstance.manageWorkerpoolOrder(workerpoolorderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in workerpool order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isFalse(await IexecInstance.verifyPresignature (scheduler.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, workerpoolorder.sign)); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(scheduler.address, hash, workerpoolorder.sign)); - }); - - it("authorized signature", async () => { - const { workerpoolorder, hash } = await generateWorkerpoolOrder(); - const workerpoolorderoperation = await scheduler.signWorkerpoolOrderOperation({ - order: workerpoolorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in workerpool order presign"); - await IexecInstance.manageWorkerpoolOrder(workerpoolorderoperation, { from: iexecAdmin.address }); - assert.equal(await IexecInstance.viewPresigned(hash), scheduler.address, "Error in workerpool order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isTrue (await IexecInstance.verifyPresignature (scheduler.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, workerpoolorder.sign)); - assert.isTrue (await IexecInstance.verifyPresignatureOrSignature (scheduler.address, hash, workerpoolorder.sign)); - }); - - it("authorized sender", async () => { - const { workerpoolorder, hash } = await generateWorkerpoolOrder(); - const workerpoolorderoperation = { - order: workerpoolorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in workerpool order presign"); - await IexecInstance.manageWorkerpoolOrder(workerpoolorderoperation, { from: scheduler.address }); - assert.equal(await IexecInstance.viewPresigned(hash), scheduler.address, "Error in workerpool order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isTrue (await IexecInstance.verifyPresignature (scheduler.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, workerpoolorder.sign)); - assert.isTrue (await IexecInstance.verifyPresignatureOrSignature (scheduler.address, hash, workerpoolorder.sign)); - }); - }); - - /*************************************************************************** - * TEST: Request sign * - ***************************************************************************/ - describe("sign requestorder", async () => { - it("unauthorized sender", async () => { - const { requestorder, hash } = await generateRequestOrder(); - const requestorderoperation = { - order: requestorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in request order presign"); - await expectRevert.unspecified(IexecInstance.manageRequestOrder(requestorderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in request order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isFalse(await IexecInstance.verifyPresignature (user.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, requestorder.sign)); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(user.address, hash, requestorder.sign)); - }); - - it("unauthorized signature", async () => { - const { requestorder, hash } = await generateRequestOrder(); - const requestorderoperation = await iexecAdmin.signRequestOrderOperation({ - order: requestorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in request order presign"); - await expectRevert.unspecified(IexecInstance.manageRequestOrder(requestorderoperation, { from: iexecAdmin.address })); - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in request order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isFalse(await IexecInstance.verifyPresignature (user.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, requestorder.sign)); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(user.address, hash, requestorder.sign)); - }); - - it("authorized signature", async () => { - const { requestorder, hash } = await generateRequestOrder(); - const requestorderoperation = await user.signRequestOrderOperation({ - order: requestorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }); - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in request order presign"); - await IexecInstance.manageRequestOrder(requestorderoperation, { from: iexecAdmin.address }); - assert.equal(await IexecInstance.viewPresigned(hash), user.address, "Error in request order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isTrue (await IexecInstance.verifyPresignature (user.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, requestorder.sign)); - assert.isTrue (await IexecInstance.verifyPresignatureOrSignature (user.address, hash, requestorder.sign)); - }); - - it("authorized sender", async () => { - const { requestorder, hash } = await generateRequestOrder(); - const requestorderoperation = { - order: requestorder, - operation: constants.OrderOperationEnum.SIGN, - sign: constants.NULL.SIGNATURE - }; - - assert.equal(await IexecInstance.viewPresigned(hash), constants.NULL.ADDRESS, "Error in request order presign"); - await IexecInstance.manageRequestOrder(requestorderoperation, { from: user.address }); - assert.equal(await IexecInstance.viewPresigned(hash), user.address, "Error in request order presign"); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, hash, )); - assert.isTrue (await IexecInstance.verifyPresignature (user.address, hash, )); - await expectRevert.unspecified(IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, hash, requestorder.sign)); - assert.isTrue (await IexecInstance.verifyPresignatureOrSignature (user.address, hash, requestorder.sign)); - }); - }); - - describe("matching presigned orders", async () => { - it("match", async () => { - const { apporder } = await generateAppOrder(); - const { datasetorder } = await generateDatasetOrder(); - const { workerpoolorder } = await generateWorkerpoolOrder(); - const { requestorder } = await generateRequestOrder(); - - await IexecInstance.manageAppOrder ({ order: apporder, operation: constants.OrderOperationEnum.SIGN, sign: constants.NULL.SIGNATURE }, { from: appProvider.address, }); - await IexecInstance.manageDatasetOrder ({ order: datasetorder, operation: constants.OrderOperationEnum.SIGN, sign: constants.NULL.SIGNATURE }, { from: datasetProvider.address }); - await IexecInstance.manageWorkerpoolOrder({ order: workerpoolorder, operation: constants.OrderOperationEnum.SIGN, sign: constants.NULL.SIGNATURE }, { from: scheduler.address, }); - await IexecInstance.manageRequestOrder ({ order: requestorder, operation: constants.OrderOperationEnum.SIGN, sign: constants.NULL.SIGNATURE }, { from: user.address, }); - - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - }); - }); - -}); diff --git a/test/byContract/IexecPoco/00_matchorders.js b/test/byContract/IexecPoco/00_matchorders.js deleted file mode 100644 index af3022825..000000000 --- a/test/byContract/IexecPoco/00_matchorders.js +++ /dev/null @@ -1,598 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract("Poco", async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: deposit * - ***************************************************************************/ - it("[Genesis] deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - break; - - case "Token": - await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - break; - } - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); - }); - - /*************************************************************************** - * TEST: creation * - ***************************************************************************/ - it("[Genesis] App Creation", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("[Genesis] Dataset Creation", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("[Genesis] Workerpool Creation", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("[Genesis] Workerpool configuration", async () => { - await WorkerpoolInstance.changePolicy(35, 5, { from: scheduler.address }); - }); - - matchOrders = async (appextra, datasetextra, workerpoolextra, userextra) => { - _apporder = { - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }; - _datasetorder = { - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }; - _workerpoolorder = { - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 1000, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }; - _requestorder = { - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 1000, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }; - for (key in appextra ) _apporder[key] = appextra[key]; - for (key in datasetextra ) _datasetorder[key] = datasetextra[key]; - for (key in workerpoolextra) _workerpoolorder[key] = workerpoolextra[key]; - for (key in userextra ) _requestorder[key] = userextra[key]; - await appProvider.signAppOrder(_apporder); - await datasetProvider.signDatasetOrder(_datasetorder); - await scheduler.signWorkerpoolOrder(_workerpoolorder); - await user.signRequestOrder(_requestorder); - return IexecInstance.matchOrders(_apporder, _datasetorder, _workerpoolorder, _requestorder, { from: user.address }); - }; - - it("[Match - app-dataset-workerpool-user]", async () => { - await matchOrders( - {}, - {}, - {}, - {}, - ); - - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, _requestorder)); - assert.equal(deals[0], web3.utils.soliditySha3({ t: "bytes32", v: odbtools.utils.hashRequestOrder(ERC712_domain, _requestorder) }, { t: "uint256", v: 0 }), "check dealid"); - - deal = await IexecInstance.viewDeal(deals[0]); - assert.equal ( deal.app.pointer, AppInstance.address ); - assert.equal ( deal.app.owner, appProvider.address ); - assert.equal (Number(deal.app.price), 3 ); - assert.equal ( deal.dataset.pointer, DatasetInstance.address ); - assert.equal ( deal.dataset.owner, datasetProvider.address ); - assert.equal (Number(deal.dataset.price), 1 ); - assert.equal ( deal.workerpool.pointer, WorkerpoolInstance.address); - assert.equal ( deal.workerpool.owner, scheduler.address ); - assert.equal (Number(deal.workerpool.price), 25 ); - assert.equal (Number(deal.trust), 1000 ); - assert.equal (Number(deal.category), 4 ); - assert.equal (Number(deal.tag), 0x0 ); - assert.equal ( deal.requester, user.address ); - assert.equal ( deal.beneficiary, user.address ); - assert.equal ( deal.callback, constants.NULL.ADDRESS ); - assert.equal ( deal.params, "" ); - assert.isAbove(Number(deal.startTime), 0 ); - assert.equal (Number(deal.botFirst), 0 ); - assert.equal (Number(deal.botSize), 1 ); - assert.equal (Number(deal.workerStake), 8 ); // 8 = floor(25*.3) - assert.equal (Number(deal.schedulerRewardRatio), 5 ); - }); - - it("[Match - app-workerpool-user]", async () => { - await matchOrders( - {}, - constants.NULL.DATAORDER, - {}, - { dataset: constants.NULL.ADDRESS }, - ); - - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, _requestorder)); - assert.equal(deals[0], web3.utils.soliditySha3({ t: "bytes32", v: odbtools.utils.hashRequestOrder(ERC712_domain, _requestorder) }, { t: "uint256", v: 0 }), "check dealid"); - - deal = await IexecInstance.viewDeal(deals[0]); - assert.equal ( deal.app.pointer, AppInstance.address ); - assert.equal ( deal.app.owner, appProvider.address ); - assert.equal (Number(deal.app.price), 3 ); - assert.equal ( deal.dataset.pointer, constants.NULL.ADDRESS ); - assert.equal ( deal.dataset.owner, constants.NULL.ADDRESS ); - assert.equal (Number(deal.dataset.price), 0 ); - assert.equal ( deal.workerpool.pointer, WorkerpoolInstance.address); - assert.equal ( deal.workerpool.owner, scheduler.address ); - assert.equal (Number(deal.workerpool.price), 25 ); - assert.equal (Number(deal.trust), 1000 ); - assert.equal (Number(deal.category), 4 ); - assert.equal (Number(deal.tag), 0x0 ); - assert.equal ( deal.requester, user.address ); - assert.equal ( deal.beneficiary, user.address ); - assert.equal ( deal.callback, constants.NULL.ADDRESS ); - assert.equal ( deal.params, "" ); - assert.isAbove(Number(deal.startTime), 0 ); - assert.equal (Number(deal.botFirst), 0 ); - assert.equal (Number(deal.botSize), 1 ); - assert.equal (Number(deal.workerStake), 8 ); // 8 = floor(25*.3) - assert.equal (Number(deal.schedulerRewardRatio), 5 ); - }); - - it("[Match - app-dataset-workerpool-user BOT]", async () => { - await matchOrders( - {}, - {}, - {}, - { volume: 10 }, - ); - - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, _requestorder)); - assert.equal(deals[0], web3.utils.soliditySha3({ t: "bytes32", v: odbtools.utils.hashRequestOrder(ERC712_domain, _requestorder) }, { t: "uint256", v: 0 }), "check dealid"); - - deal = await IexecInstance.viewDeal(deals[0]); - assert.equal ( deal.app.pointer, AppInstance.address ); - assert.equal ( deal.app.owner, appProvider.address ); - assert.equal (Number(deal.app.price), 3 ); - assert.equal ( deal.dataset.pointer, DatasetInstance.address ); - assert.equal ( deal.dataset.owner, datasetProvider.address ); - assert.equal (Number(deal.dataset.price), 1 ); - assert.equal ( deal.workerpool.pointer, WorkerpoolInstance.address); - assert.equal ( deal.workerpool.owner, scheduler.address ); - assert.equal (Number(deal.workerpool.price), 25 ); - assert.equal (Number(deal.trust), 1000 ); - assert.equal (Number(deal.category), 4 ); - assert.equal (Number(deal.tag), 0x0 ); - assert.equal ( deal.requester, user.address ); - assert.equal ( deal.beneficiary, user.address ); - assert.equal ( deal.callback, constants.NULL.ADDRESS ); - assert.equal ( deal.params, "" ); - assert.isAbove(Number(deal.startTime), 0 ); - assert.equal (Number(deal.botFirst), 0 ); - assert.equal (Number(deal.botSize), 10 ); - assert.equal (Number(deal.workerStake), 8 ); // 8 = floor(25*.3) - assert.equal (Number(deal.schedulerRewardRatio), 5 ); - }); - - it("[Match - Error - category]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - {}, - {}, - { category: 5 }, - )); - }); - - it("[Match - Error - trust]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - {}, - { trust: 100 }, - {}, - )); - }); - - it("[Match - Error - appprice]", async () => { - await expectRevert.unspecified(matchOrders( - { appprice: 1000 }, - {}, - {}, - {}, - )); - }); - - it("[Match - Error - datasetprice]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - { datasetprice: 1000 }, - {}, - {}, - )); - }); - - it("[Match - Error - workerpoolprice]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - {}, - { workerpoolprice: 1000 }, - {}, - )); - }); - - it("[Match - Error - apptag]", async () => { - await expectRevert.unspecified(matchOrders( - { tag: "0x0000000000000000000000000000000000000000000000000000000000000001" }, - {}, - {}, - {}, - )); - }); - - it("[Match - Error - datasettag]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - { tag: "0x0000000000000000000000000000000000000000000000000000000000000001" }, - {}, - {}, - )); - }); - - it("[Match - Ok - workerpooltag]", async () => { - await matchOrders( - {}, - {}, - { tag: "0x0000000000000000000000000000000000000000000000000000000000000001" }, - {}, - ); - }); - - it("[Match - Error - usertag]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - {}, - {}, - { tag: "0x0000000000000000000000000000000000000000000000000000000000000001" }, - )); - }); - - it("[Match - Error - requested app]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - {}, - {}, - { app: user.address }, - )); - }); - - it("[Match - Error - requested dataset]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - {}, - {}, - { dataset: user.address }, - )); - }); - - it("[Match - Error - workerpoolrequest]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - {}, - {}, - { workerpool: user.address }, - )); - }); - - it("[Match - Error - app-datasetrestrict]", async () => { - await expectRevert.unspecified(matchOrders( - { datasetrestrict: user.address }, - {}, - {}, - {}, - )); - }); - it("[Match - Ok - app-datasetrestrict]", async () => { - await matchOrders( - { datasetrestrict: DatasetInstance.address }, - {}, - {}, - {}, - ); - }); - - it("[Match - Error - app-workerpoolrestrict]", async () => { - await expectRevert.unspecified(matchOrders( - { workerpoolrestrict: user.address }, - {}, - {}, - {}, - )); - }); - it("[Match - Ok - app-workerpoolrestrict]", async () => { - await matchOrders( - { workerpoolrestrict: WorkerpoolInstance.address }, - {}, - {}, - {}, - ); - }); - - it("[Match - Error - app-requesterrestrict]", async () => { - await expectRevert.unspecified(matchOrders( - { requesterrestrict: iexecAdmin.address }, - {}, - {}, - {}, - )); - }); - it("[Match - Ok - app-requesterrestrict]", async () => { - await matchOrders( - { requesterrestrict: user.address }, - {}, - {}, - {}, - ); - }); - - it("[Match - Error - dataset-apprestrict]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - { apprestrict: user.address }, - {}, - {}, - )); - }); - it("[Match - Ok - dataset-apprestrict]", async () => { - await matchOrders( - {}, - { apprestrict: AppInstance.address }, - {}, - {}, - ); - }); - - it("[Match - Error - app-workerpoolrestrict]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - { workerpoolrestrict: user.address }, - {}, - {}, - )); - }); - it("[Match - Ok - app-workerpoolrestrict]", async () => { - await matchOrders( - {}, - { workerpoolrestrict: WorkerpoolInstance.address }, - {}, - {}, - ); - }); - - it("[Match - Error - app-requesterrestrict]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - { requesterrestrict: iexecAdmin.address }, - {}, - {}, - )); - }); - it("[Match - Ok - app-requesterrestrict]", async () => { - await matchOrders( - {}, - { requesterrestrict: user.address }, - {}, - {}, - ); - }); - - it("[Match - Error - workerpool-apprestrict]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - {}, - { apprestrict: user.address }, - {}, - )); - }); - it("[Match - Ok - workerpool-apprestrict]", async () => { - await matchOrders( - {}, - {}, - { apprestrict: AppInstance.address }, - {}, - ); - }); - - it("[Match - Error - workerpool-datasetrestrict]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - {}, - { datasetrestrict: user.address }, - {}, - )); - }); - it("[Match - Ok - workerpool-datasetrestrict]", async () => { - await matchOrders( - {}, - {}, - { datasetrestrict: DatasetInstance.address }, - {}, - ); - }); - - it("[Match - Error - workerpool-requesterrestrict]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - {}, - { requesterrestrict: iexecAdmin.address }, - {}, - )); - }); - it("[Match - Ok - workerpool-requesterrestrict]", async () => { - await matchOrders( - {}, - {}, - { requesterrestrict: user.address }, - {}, - ); - }); - - it("[Match - Error - volume null]", async () => { - await expectRevert.unspecified(matchOrders( - {}, - {}, - {}, - { volume: 0}, - )); - }); - -}); diff --git a/test/byContract/IexecPoco/01_initialize.js b/test/byContract/IexecPoco/01_initialize.js deleted file mode 100644 index 45bca17aa..000000000 --- a/test/byContract/IexecPoco/01_initialize.js +++ /dev/null @@ -1,254 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Poco', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder1 = null; - var workerpoolorder2 = null; - var requestorder = null; - - var deals = {} - var tasks = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: deposit * - ***************************************************************************/ - it("[Setup] deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - break; - - case "Token": - await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - break; - } - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); - }); - - /*************************************************************************** - * TEST: App creation (by appProvider) * - ***************************************************************************/ - it("[Setup]", async () => { - // Ressources - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - - // Orders - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder_offset = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 15, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 10, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 4, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - - // Market - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder_offset, requestorder, { from: user.address }); - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder)); - }); - - it("[1.1] Initialization - Correct", async () => { - txMined = await IexecInstance.initialize(deals[1], 1, { from: scheduler.address }); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize"); - assert.equal(events[0].args.workerpool, WorkerpoolInstance.address, "check workerpool"); - }); - - it("[1.2] Initialization - Error (low id)", async () => { - await expectRevert.unspecified(IexecInstance.initialize(deals[1], 0, { from: scheduler.address })); - }); - - it("[1.3] Initialization - Error (high id)", async () => { - await expectRevert.unspecified(IexecInstance.initialize(deals[1], 1000, { from: scheduler.address })); - }); - - it("[1.4] Initialization - Error (already initialized)", async () => { - await expectRevert.unspecified(IexecInstance.initialize(deals[1], 1, { from: scheduler.address })); - }); - -}); diff --git a/test/byContract/IexecPoco/01_initialize.test.ts b/test/byContract/IexecPoco/01_initialize.test.ts new file mode 100644 index 000000000..9e91063f3 --- /dev/null +++ b/test/byContract/IexecPoco/01_initialize.test.ts @@ -0,0 +1,221 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { IexecInterfaceNative, IexecInterfaceNative__factory } from '../../../typechain'; +import { + OrdersAssets, + OrdersPrices, + buildOrders, + createEmptyWorkerpoolOrder, +} from '../../../utils/createOrders'; +import { TaskStatusEnum, getIexecAccounts, getTaskId } from '../../../utils/poco-tools'; +import { IexecWrapper } from '../../utils/IexecWrapper'; + +const categoryTime = 300; +const maxDealDuration = 10 * categoryTime; +const appPrice = 1000; +const datasetPrice = 1_000_000; +const workerpoolPrice = 1_000_000_000; + +describe('IexecPoco2#initialize', async () => { + let proxyAddress: string; + let iexecPoco: IexecInterfaceNative; + let iexecPocoAsAnyone: IexecInterfaceNative; + let iexecWrapper: IexecWrapper; + let [appAddress, datasetAddress, workerpoolAddress]: string[] = []; + let [iexecAdmin, requester, anyone]: SignerWithAddress[] = []; + let ordersAssets: OrdersAssets; + let ordersPrices: OrdersPrices; + + beforeEach('Deploy', async () => { + // Deploy all contracts + proxyAddress = await loadHardhatFixtureDeployment(); + // Initialize test environment + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ iexecAdmin, requester, anyone } = accounts); + iexecWrapper = new IexecWrapper(proxyAddress, accounts); + ({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets()); + await iexecWrapper.setTeeBroker('0x0000000000000000000000000000000000000000'); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, iexecAdmin); + iexecPocoAsAnyone = iexecPoco.connect(anyone); + ordersAssets = { + app: appAddress, + dataset: datasetAddress, + workerpool: workerpoolAddress, + }; + ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, + }; + } + + describe('Initialize', function () { + it('Should initialize', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + }); + const { dealId, taskId, taskIndex, startTime } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + ); + expect((await iexecPoco.viewTask(taskId)).status).equal(TaskStatusEnum.UNSET); + + expect(await iexecPocoAsAnyone.callStatic.initialize(dealId, taskIndex)).to.equal( + taskId, + ); + const initialize = await iexecPocoAsAnyone.initialize(dealId, taskIndex); + await initialize.wait(); + await expect(initialize) + .to.emit(iexecPoco, 'TaskInitialize') + .withArgs(taskId, orders.workerpool.workerpool); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).equal(TaskStatusEnum.ACTIVE); + expect(task.dealid).equal(dealId); + expect(task.idx).equal(taskIndex); + expect(task.timeref).equal(categoryTime); + expect(task.contributionDeadline).equal(startTime + 7 * categoryTime); + expect(task.finalDeadline).equal(startTime + 10 * categoryTime); + // m_consensus does not have any getter + }); + + it('Should not initialize since index is too low', async function () { + const { appOrder, datasetOrder, requestOrder } = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume: 10, + }).toObject(); + const workerpoolOrder0 = { + ...createEmptyWorkerpoolOrder(), + workerpool: workerpoolAddress, + workerpoolPrice, + volume: 1, + }; + const workerpoolOrder1 = { + ...createEmptyWorkerpoolOrder(), + workerpool: workerpoolAddress, + workerpoolPrice, + volume: 9, + }; + // Request order is matched in 2 deals + const { dealId: dealId0 } = await iexecWrapper.signAndMatchOrders( + appOrder, + datasetOrder, + workerpoolOrder0, + requestOrder, + ); + const { dealId: dealId1 } = await iexecWrapper.signAndMatchOrders( + appOrder, + datasetOrder, + workerpoolOrder1, + requestOrder, + ); + expect((await iexecPoco.viewDeal(dealId0)).botFirst).equal(0); + expect((await iexecPoco.viewDeal(dealId1)).botFirst).equal(1); + + // Will fail since passed taskIndex is below deal1.botFirst + await expect(iexecPocoAsAnyone.initialize(dealId1, 0)).to.be.revertedWithoutReason(); + }); + + it('Should not initialize since index is too high', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + }); + const { dealId } = await iexecWrapper.signAndMatchOrders(...orders.toArray()); + const deal = await iexecPoco.viewDeal(dealId); + expect(deal.botFirst).equal(0); + expect(deal.botSize).equal(1); + + // Will fail since passed taskIndex is above offset + bot size + await expect(iexecPocoAsAnyone.initialize(dealId, 1)).to.be.revertedWithoutReason(); + }); + + it('Should not initialize twice', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + }); + const { dealId, taskId, taskIndex } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + ); + await iexecPocoAsAnyone.initialize(dealId, taskIndex).then((tx) => tx.wait()); + expect((await iexecPoco.viewTask(taskId)).status).equal(TaskStatusEnum.ACTIVE); + + await expect( + iexecPocoAsAnyone.initialize(dealId, taskIndex), + ).to.be.revertedWithoutReason(); + }); + }); + + describe('Initialize array', function () { + it('Should initialize array', async function () { + const volume = 3; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + }); + const { dealId } = await iexecWrapper.signAndMatchOrders(...orders.toArray()); + const dealIds = [dealId, dealId, dealId]; + const taskIndexes = [0, 1, 2]; + for (const taskIndex of taskIndexes) { + const taskId = getTaskId(dealId, taskIndex); + expect((await iexecPoco.viewTask(taskId)).status).equal(TaskStatusEnum.UNSET); + } + + expect(await iexecPocoAsAnyone.callStatic.initializeArray(dealIds, taskIndexes)).to.be + .true; + const initializeArrayTx = await iexecPocoAsAnyone.initializeArray(dealIds, taskIndexes); + await initializeArrayTx.wait(); + for (const taskIndex of taskIndexes) { + const taskId = getTaskId(dealId, taskIndex); + await expect(initializeArrayTx) + .to.emit(iexecPoco, 'TaskInitialize') + .withArgs(taskId, orders.workerpool.workerpool); + expect((await iexecPoco.viewTask(taskId)).status).equal(TaskStatusEnum.ACTIVE); + } + }); + + it('Should not initialize array if incompatible length of inputs', async function () { + const dealId = ethers.utils.hashMessage('dealId'); + await expect( + iexecPoco.initializeArray([dealId, dealId], [0]), + ).to.be.revertedWithoutReason(); + }); + + it('Should not initialize array if one specific fails', async function () { + const volume = 2; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + }); + const { dealId } = await iexecWrapper.signAndMatchOrders(...orders.toArray()); + const taskIndex0 = 0; + const taskIndex1 = 1; + await iexecPocoAsAnyone // Make first task already initialized + .initialize(dealId, taskIndex0) + .then((tx) => tx.wait()); + + // Will fail since first task is already initialized + await expect( + iexecPoco.initializeArray([dealId, dealId], [taskIndex0, taskIndex1]), + ).to.be.revertedWithoutReason(); + }); + }); +}); diff --git a/test/byContract/IexecPoco/02_contribute-tag.js b/test/byContract/IexecPoco/02_contribute-tag.js deleted file mode 100644 index b224e124b..000000000 --- a/test/byContract/IexecPoco/02_contribute-tag.js +++ /dev/null @@ -1,387 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Poco', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder1 = null; - var workerpoolorder2 = null; - var requestorder = null; - - var deals = {} - var tasks = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: deposit * - ***************************************************************************/ - it("[Setup] deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - break; - - case "Token": - await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - break; - } - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); - }); - - /*************************************************************************** - * TEST: App creation (by appProvider) * - ***************************************************************************/ - it("[Setup]", async () => { - // Ressources - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - - // Orders - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000001", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder_offset = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 15, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000001", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000001", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 10, - tag: "0x0000000000000000000000000000000000000000000000000000000000000001", - category: 4, - trust: 4, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - - // Market - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder_offset, requestorder, { from: user.address }); - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder)); - }); - - it("[setup] Initialization", async () => { - tasks[1] = tools.extractEvents(await IexecInstance.initialize(deals[1], 1, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[2] = tools.extractEvents(await IexecInstance.initialize(deals[1], 2, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[3] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[1] }, { t: 'uint256', v: 3 }); - tasks[4] = tools.extractEvents(await IexecInstance.initialize(deals[1], 4, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[5] = tools.extractEvents(await IexecInstance.initialize(deals[1], 5, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[6] = tools.extractEvents(await IexecInstance.initialize(deals[1], 6, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[7] = tools.extractEvents(await IexecInstance.initialize(deals[1], 7, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - }); - - function sendContribution(taskid, worker, results, authorization, enclave) - { - return IexecInstance.contribute( - taskid, // task (authorization) - results.hash, // common (result) - results.seal, // unique (result) - enclave, // address (enclave) - results.sign ? results.sign : constants.NULL.SIGNATURE, // signature (enclave) - authorization.sign, // signature (authorization) - { from: worker.address } - ); - } - - it("[2.1][TAG] Contribute - Error (missing sgx)", async () => { - __taskid = tasks[1]; - __worker = worker1; - __enclave = { address: constants.NULL.ADDRESS }; - __raw = "true"; - - await expectRevert.unspecified(sendContribution( - __taskid, - __worker, - odbtools.utils.sealResult(__taskid, __raw, __worker.address), - await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, scheduler.wallet), - __enclave.address - )); - }); - - it("[2.2][TAG] Contribute - Correct (sgx)", async () => { - __taskid = tasks[2]; - __worker = worker1; - __enclave = web3.eth.accounts.create(); - __raw = "true" - - txMined = await sendContribution( - __taskid, - __worker, - (await odbtools.utils.signContribution (odbtools.utils.sealResult(__taskid, __raw, __worker.address), __enclave)), - (await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, broker.wallet)), - __enclave.address - ); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, __taskid, "check taskid" ); - assert.equal(events[0].args.worker, __worker.address, "check worker" ); - assert.equal(events[0].args.hash, odbtools.utils.hashResult(__taskid, __raw).hash, "check resultHash"); - }); - - it("[2.3][TAG] Contribute - Error (unset)", async () => { - __taskid = tasks[3]; - __worker = worker1; - __enclave = web3.eth.accounts.create(); - __raw = "true" - - await expectRevert.unspecified(sendContribution( - __taskid, - __worker, - await odbtools.utils.signContribution (odbtools.utils.sealResult(__taskid, __raw, __worker.address), __enclave), - await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, broker.wallet), - __enclave.address - )); - }); - - it("[2.4][TAG] Contribute - Error (duplicate)", async () => { - __taskid = tasks[4]; - __worker = worker1; - __enclave = web3.eth.accounts.create(); - __raw = "true" - - results = (await odbtools.utils.signContribution (odbtools.utils.sealResult(__taskid, __raw, __worker.address), __enclave)), - authorization = (await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, broker.wallet)); - // First ok - await sendContribution( - __taskid, - __worker, - results, - authorization, - __enclave.address - ); - // Second error - await expectRevert.unspecified(sendContribution( - __taskid, - __worker, - results, - authorization, - __enclave.address - )); - }); - - it("[2.5][TAG] Contribute - Error (authorization)", async () => { - __taskid = tasks[5]; - __worker = worker1; - __enclave = web3.eth.accounts.create(); - __raw = "true" - - await expectRevert.unspecified(sendContribution( - __taskid, - __worker, - await odbtools.utils.signContribution (odbtools.utils.sealResult(__taskid, __raw, __worker.address), __enclave), - await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, scheduler.wallet), // signature: teebroker โ†’ scheduler - __enclave.address - )); - }); - - it("[2.6][TAG] Contribute - Error (enclave signature)", async () => { - __taskid = tasks[6]; - __worker = worker1; - __enclave = web3.eth.accounts.create(); - __raw = "true" - - await expectRevert.unspecified(sendContribution( - __taskid, - __worker, - odbtools.utils.sealResult(__taskid, __raw, __worker.address), // should be signed - await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, broker.wallet), - __enclave.address - )); - }); - - it("clock fast forward", async () => { - target = Number((await IexecInstance.viewTask(tasks[7])).finalDeadline); - - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_increaseTime", params: [ target - (await web3.eth.getBlock("latest")).timestamp ], id: 0 }, () => {}); - // workaround for https://github.com/trufflesuite/ganache/issues/1033 - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_mine", params: [ ], id: 0 }, () => {}); - }); - - it("[2.7][TAG] Contribute - Late", async () => { - __taskid = tasks[7]; - __worker = worker1; - __enclave = web3.eth.accounts.create(); - __raw = "true" - - await expectRevert.unspecified(sendContribution( - __taskid, - __worker, - await odbtools.utils.signContribution (odbtools.utils.sealResult(__taskid, __raw, __worker.address), __enclave), - await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, broker.wallet), // signature: scheduler โ†’ worker - __enclave.address - )); - }); - -}); diff --git a/test/byContract/IexecPoco/02_contribute.js b/test/byContract/IexecPoco/02_contribute.js deleted file mode 100644 index c2fc70ca0..000000000 --- a/test/byContract/IexecPoco/02_contribute.js +++ /dev/null @@ -1,393 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Poco', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder1 = null; - var workerpoolorder2 = null; - var requestorder = null; - - var deals = {} - var tasks = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: deposit * - ***************************************************************************/ - it("[Setup] deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - break; - - case "Token": - await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - break; - } - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); - }); - - /*************************************************************************** - * TEST: App creation (by appProvider) * - ***************************************************************************/ - it("[Setup]", async () => { - // Ressources - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - - // Orders - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder_offset = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 15, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 10, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 4, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - - // Market - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder_offset, requestorder, { from: user.address }); - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder)); - }); - - it("[setup] Initialization", async () => { - tasks[1] = tools.extractEvents(await IexecInstance.initialize(deals[1], 1, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[2] = tools.extractEvents(await IexecInstance.initialize(deals[1], 2, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[3] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[1] }, { t: 'uint256', v: 3 }); - tasks[4] = tools.extractEvents(await IexecInstance.initialize(deals[1], 4, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[5] = tools.extractEvents(await IexecInstance.initialize(deals[1], 5, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[6] = tools.extractEvents(await IexecInstance.initialize(deals[1], 6, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - tasks[7] = tools.extractEvents(await IexecInstance.initialize(deals[1], 7, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; - }); - - function sendContribution(taskid, worker, results, authorization, enclave) - { - return IexecInstance.contribute( - taskid, // task (authorization) - results.hash, // common (result) - results.seal, // unique (result) - enclave, // address (enclave) - results.sign ? results.sign : constants.NULL.SIGNATURE, // signature (enclave) - authorization.sign, // signature (authorization) - { from: worker.address } - ); - } - - it("[2.1] Contribute - Correct", async () => { - __taskid = tasks[1]; - __worker = worker1; - __enclave = { address: constants.NULL.ADDRESS }; - __raw = "true"; - - txMined = await sendContribution( - __taskid, - __worker, - odbtools.utils.sealResult(__taskid, __raw, __worker.address), - await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, scheduler.wallet), - __enclave.address - ); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, __taskid, "check taskid" ); - assert.equal(events[0].args.worker, __worker.address, "check worker" ); - assert.equal(events[0].args.hash, odbtools.utils.hashResult(__taskid, __raw).hash, "check resultHash"); - }); - - it("[2.2] Contribute - Correct (sgx)", async () => { - __taskid = tasks[2]; - __worker = worker1; - __enclave = web3.eth.accounts.create(); - __raw = "true" - - txMined = await sendContribution( - __taskid, - __worker, - await odbtools.utils.signContribution (odbtools.utils.sealResult(__taskid, __raw, __worker.address), __enclave), - await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, broker.wallet), - __enclave.address - ); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskContribute"); - assert.equal(events[0].args.taskid, __taskid, "check taskid" ); - assert.equal(events[0].args.worker, __worker.address, "check worker" ); - assert.equal(events[0].args.hash, odbtools.utils.hashResult(__taskid, __raw).hash, "check resultHash"); - }); - - it("[2.3] Contribute - Error (unset)", async () => { - __taskid = tasks[3]; - __worker = worker1; - __enclave = { address: constants.NULL.ADDRESS }; - __raw = "true" - - await expectRevert.unspecified(sendContribution( - __taskid, - __worker, - odbtools.utils.sealResult(__taskid, __raw, __worker.address), - await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, scheduler.wallet), - __enclave.address - )); - }); - - it("[2.4] Contribute - Error (duplicate)", async () => { - __taskid = tasks[4]; - __worker = worker1; - __enclave = { address: constants.NULL.ADDRESS }; - __raw = "true" - - results = odbtools.utils.sealResult(__taskid, __raw, __worker.address), - authorization = await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, scheduler.wallet); - // First ok - await sendContribution( - __taskid, - __worker, - results, - authorization, - __enclave.address - ); - // Second error - await expectRevert.unspecified(sendContribution( - __taskid, - __worker, - results, - authorization, - __enclave.address - )); - }); - - it("[2.5] Contribute - Error (authorization)", async () => { - __taskid = tasks[5]; - __worker = worker1; - __enclave = { address: constants.NULL.ADDRESS }; - __raw = "true" - - await expectRevert.unspecified(sendContribution( - __taskid, - __worker, - odbtools.utils.sealResult(__taskid, __raw, __worker.address), - await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, __worker.wallet), // signature: scheduler โ†’ worker - __enclave.address - )); - }); - - it("[2.6] Contribute - Error (enclave signature)", async () => { - __taskid = tasks[6]; - __worker = worker1; - __enclave = web3.eth.accounts.create(); - __raw = "true" - - await expectRevert.unspecified(sendContribution( - __taskid, - __worker, - odbtools.utils.sealResult(__taskid, __raw, __worker.address), // should be signed - await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, broker.wallet), - __enclave.address - )); - }); - - it("clock fast forward", async () => { - target = Number((await IexecInstance.viewTask(tasks[7])).finalDeadline); - - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_increaseTime", params: [ target - (await web3.eth.getBlock("latest")).timestamp ], id: 0 }, () => {}); - // workaround for https://github.com/trufflesuite/ganache/issues/1033 - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_mine", params: [ ], id: 0 }, () => {}); - }); - - it("[2.7] Contribute - Late", async () => { - __taskid = tasks[7]; - __worker = worker1; - __enclave = { address: constants.NULL.ADDRESS }; - __raw = "true" - - await expectRevert.unspecified(sendContribution( - __taskid, - __worker, - odbtools.utils.sealResult(__taskid, __raw, __worker.address), - await odbtools.utils.signAuthorization({ worker: __worker.address, taskid: __taskid, enclave: __enclave.address }, scheduler.wallet), - __enclave.address - )); - }); - -}); diff --git a/test/byContract/IexecPoco/02_contribute.test.ts b/test/byContract/IexecPoco/02_contribute.test.ts new file mode 100644 index 000000000..2abbde4c8 --- /dev/null +++ b/test/byContract/IexecPoco/02_contribute.test.ts @@ -0,0 +1,526 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { AddressZero, HashZero } from '@ethersproject/constants'; +import { loadFixture, time } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { assert, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { IexecInterfaceNative, IexecInterfaceNative__factory } from '../../../typechain'; +import { NULL } from '../../../utils/constants'; +import { IexecOrders, OrdersAssets, OrdersPrices, buildOrders } from '../../../utils/createOrders'; +import { + ContributionStatusEnum, + TaskStatusEnum, + buildAndSignContributionAuthorizationMessage, + buildAndSignPocoClassicEnclaveMessage, + buildResultHash, + buildResultHashAndResultSeal, + buildUtf8ResultAndDigest, + getIexecAccounts, + setNextBlockTimestamp, +} from '../../../utils/poco-tools'; +import { IexecWrapper } from '../../utils/IexecWrapper'; +const CONFIG = require('../../../config/config.json'); + +const timeRef = CONFIG.categories[0].workClockTimeRef; +const volume = 3; +const teeDealTag = '0x0000000000000000000000000000000000000000000000000000000000000001'; +const standardDealTag = HashZero; +const { resultDigest } = buildUtf8ResultAndDigest('result'); +const { resultDigest: badResultDigest } = buildUtf8ResultAndDigest('bad-result'); +const emptyEnclaveAddress = AddressZero; +const emptyEnclaveSignature = NULL.SIGNATURE; + +describe('IexecPoco2#contribute', () => { + let proxyAddress: string; + let [iexecPoco, iexecPocoAsWorker]: IexecInterfaceNative[] = []; + let iexecWrapper: IexecWrapper; + let [ + anyone, + scheduler, + worker, + worker1, + worker2, + worker3, + worker4, + enclave, + sms, + requester, + ]: SignerWithAddress[] = []; + let ordersAssets: OrdersAssets; + let ordersPrices: OrdersPrices; + let defaultOrders: IexecOrders; + + beforeEach(async () => { + proxyAddress = await loadHardhatFixtureDeployment(); + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ + scheduler, + worker, + worker1, + worker2, + worker3, + worker4, + enclave, + sms, + requester, + anyone, + } = accounts); + iexecWrapper = new IexecWrapper(proxyAddress, accounts); + const { appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets(); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + iexecPocoAsWorker = iexecPoco.connect(worker); + const appPrice = 1000; + const datasetPrice = 1_000_000; + const workerpoolPrice = 1_000_000_000; + ordersAssets = { + app: appAddress, + dataset: datasetAddress, + workerpool: workerpoolAddress, + }; + ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, + }; + defaultOrders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + trust: 0, + tag: standardDealTag, + }); + } + + describe('Contribute', () => { + it('Should contribute TEE task with multiple workers and broker', async () => { + await iexecWrapper.setTeeBroker(sms.address); + const { dealId, taskIndex, taskId } = await iexecWrapper.signAndMatchOrders( + ...buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + trust: 3, + tag: teeDealTag, + }).toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const workers = [ + { signer: worker1, resultDigest: resultDigest }, + { signer: worker2, resultDigest: badResultDigest }, + { signer: worker3, resultDigest: resultDigest }, + { signer: worker4, resultDigest: resultDigest }, + ]; + const winningWorkers = [worker1, worker3, worker4]; + // worker2 is a losing worker + let task; + let contributeBlockTimestamp; + const viewFrozenOf = (address: string) => + iexecPoco.frozenOf(address).then((frozen) => frozen.toNumber()); + for (let i = 0; i < workers.length; i++) { + const worker = workers[i]; + const workerAddress = worker.signer.address; + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + worker.resultDigest, + worker.signer, + ); + await iexecWrapper.depositInIexecAccount(worker.signer, workerTaskStake); + const frozenBefore = await viewFrozenOf(workerAddress); + contributeBlockTimestamp = await setNextBlockTimestamp(); + const tx = await iexecPoco + .connect(worker.signer) + .contribute( + taskId, + resultHash, + resultSeal, + enclave.address, + await buildAndSignPocoClassicEnclaveMessage( + resultHash, + resultSeal, + enclave, + ), + await buildAndSignContributionAuthorizationMessage( + workerAddress, + taskId, + enclave.address, + sms, + ), + ); + await tx.wait(); + const contribution = await iexecPoco.viewContribution(taskId, workerAddress); + expect(contribution.status).equal(ContributionStatusEnum.CONTRIBUTED); + expect(contribution.resultHash).equal(resultHash); + expect(contribution.resultSeal).equal(resultSeal); + expect(contribution.enclaveChallenge).equal(enclave.address); + task = await iexecPoco.viewTask(taskId); + expect(task.contributors.length).equal(i + 1); + expect(task.contributors[i]).equal(workerAddress); + await expect(tx) + .to.changeTokenBalances( + iexecPoco, + [workerAddress, proxyAddress], + [-workerTaskStake, workerTaskStake], + ) + .to.emit(iexecPoco, 'Transfer') + .withArgs(workerAddress, proxyAddress, workerTaskStake); + expect(await viewFrozenOf(workerAddress)).equal(frozenBefore + workerTaskStake); + await expect(tx) + .to.emit(iexecPoco, 'Lock') + .withArgs(workerAddress, workerTaskStake) + .to.emit(iexecPoco, 'TaskContribute') + .withArgs(taskId, workerAddress, resultHash); + expect(contribution.weight).equal(1); // no worker history + // m_consensus does not have any getter for checking group & total + const taskConsensusEvent: [contract: any, eventName: string] = [ + iexecPoco, + 'TaskConsensus', + ]; + if (i == workers.length - 1) { + // last worker settles the consensus (here worker4) + await expect(tx) + .to.emit(...taskConsensusEvent) + .withArgs(taskId, resultHash); + } else { + await expect(tx).to.not.emit(...taskConsensusEvent); + } + } + assert(task != undefined); + expect(task.status).equal(TaskStatusEnum.REVEALING); + expect(task.consensusValue).equal(buildResultHash(taskId, resultDigest)); + assert(contributeBlockTimestamp != undefined); + expect(task.revealDeadline).equal(contributeBlockTimestamp + timeRef * 2); + expect(task.revealCounter).equal(0); + expect(task.winnerCounter).equal(winningWorkers.length); + }); + + it('Should contribute TEE task with one worker', async () => { + const { dealId, taskIndex, taskId } = await iexecWrapper.signAndMatchOrders( + ...buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + trust: 0, + tag: teeDealTag, + }).toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + await iexecWrapper.depositInIexecAccount(worker, workerTaskStake); + await expect( + iexecPocoAsWorker.contribute( + taskId, + resultHash, + resultSeal, + enclave.address, + await buildAndSignPocoClassicEnclaveMessage(resultHash, resultSeal, enclave), + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclave.address, + scheduler, + ), + ), + ).to.emit(iexecPoco, 'TaskConsensus'); + }); + + it('Should contribute standard task', async () => { + const { dealId, taskIndex, taskId } = await iexecWrapper.signAndMatchOrders( + ...defaultOrders.toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + await iexecWrapper.depositInIexecAccount(worker, workerTaskStake); + await expect( + iexecPocoAsWorker.contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ), + ), + ).to.emit(iexecPoco, 'TaskConsensus'); + }); + + it('Should not contribute when task not active', async () => { + const { taskId } = await iexecWrapper.signAndMatchOrders(...defaultOrders.toArray()); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + await expect( + iexecPocoAsWorker.contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ), + ), + ).to.be.revertedWithoutReason(); // require#1 + }); + + it('Should not contribute after deadline', async () => { + const { dealId, taskIndex, taskId } = await iexecWrapper.signAndMatchOrders( + ...defaultOrders.toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + expect((await iexecPoco.viewTask(taskId)).status).equal(TaskStatusEnum.ACTIVE); + const task = await iexecPoco.viewTask(taskId); + await time.setNextBlockTimestamp(task.contributionDeadline); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + // active task + // but after deadline + await expect( + iexecPocoAsWorker.contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ), + ), + ).to.be.revertedWithoutReason(); // require#2 + }); + + it('Should not contribute twice', async () => { + const { dealId, taskIndex, taskId } = await iexecWrapper.signAndMatchOrders( + ...buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + trust: 3, // so consensus is not yet reached on first contribution + tag: standardDealTag, + }).toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + await iexecWrapper.depositInIexecAccount(worker, workerTaskStake); + await iexecPocoAsWorker + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ), + ) + .then((tx) => tx.wait()); + expect((await iexecPoco.viewContribution(taskId, worker.address)).status).equal( + ContributionStatusEnum.CONTRIBUTED, + ); + // active task, before deadline + // but already contributed + await expect( + iexecPocoAsWorker.contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ), + ), + ).to.be.revertedWithoutReason(); // require#3 + }); + + it('Should not contribute when enclave challenge for TEE task is missing', async () => { + const { dealId, taskIndex, taskId } = await iexecWrapper.signAndMatchOrders( + ...buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + trust: 0, + tag: teeDealTag, + }).toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + // active task, before deadline, not contributed + // but no TEE enclave challenge + await expect( + iexecPocoAsWorker.contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ), + ), + ).to.be.revertedWithoutReason(); // require#4 + }); + + it('Should not contribute when scheduler signature is invalid', async () => { + const { dealId, taskIndex, taskId } = await iexecWrapper.signAndMatchOrders( + ...defaultOrders.toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + // active task, before deadline, not contributed, enclave challenge not required + // but invalid scheduler signature + await expect( + iexecPocoAsWorker.contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + anyone, // authorization not signed by scheduler + ), + ), + ).to.be.revertedWithoutReason(); // require#5 + }); + + it('Should not contribute when enclave signature is invalid', async () => { + const { dealId, taskIndex, taskId } = await iexecWrapper.signAndMatchOrders( + ...buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + trust: 0, + tag: teeDealTag, + }).toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + // active task, before deadline, not contributed, enclave challenge set, + // valid scheduler signature + // but invalid enclave signature + await expect( + iexecPocoAsWorker.contribute( + taskId, + resultHash, + resultSeal, + enclave.address, + await buildAndSignPocoClassicEnclaveMessage( + resultHash, + resultSeal, + anyone, // enclave message signed by someone else + ), + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclave.address, + scheduler, + ), + ), + ).to.be.revertedWithoutReason(); // require#6 + }); + + it('Should not contribute when no deposit', async () => { + const { dealId, taskIndex, taskId } = await iexecWrapper.signAndMatchOrders( + ...defaultOrders.toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + // active task, before deadline, not contributed, enclave challenge + // not required, valid scheduler signature, enclave signature not required + // but worker deposit missing + await expect( + iexecPocoAsWorker.contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ), + ), + ).to.be.revertedWith('IexecEscrow: Transfer amount exceeds balance'); + }); + }); +}); diff --git a/test/byContract/IexecPoco/03_reveal.js b/test/byContract/IexecPoco/03_reveal.js deleted file mode 100644 index 6fc64dd63..000000000 --- a/test/byContract/IexecPoco/03_reveal.js +++ /dev/null @@ -1,452 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Poco', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder1 = null; - var workerpoolorder2 = null; - var requestorder = null; - - var deals = {} - var tasks = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: deposit * - ***************************************************************************/ - it("[Setup] deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - break; - - case "Token": - await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - break; - } - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); - }); - - /*************************************************************************** - * TEST: App creation (by appProvider) * - ***************************************************************************/ - it("[Setup]", async () => { - // Ressources - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - - // Orders - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder_offset = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 15, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 10, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 4, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - - // Market - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder_offset, requestorder, { from: user.address }); - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder)); - }); - - it("[setup] Initialization", async () => { - tasks[1] = tools.extractEvents(await IexecInstance.initialize(deals[1], 1, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // good - tasks[2] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[1] }, { t: 'uint256', v: 2 }); // uninitialized - tasks[3] = tools.extractEvents(await IexecInstance.initialize(deals[1], 3, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // no consensus - tasks[4] = tools.extractEvents(await IexecInstance.initialize(deals[1], 4, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // bad contrib - tasks[5] = tools.extractEvents(await IexecInstance.initialize(deals[1], 5, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // bad hash - tasks[6] = tools.extractEvents(await IexecInstance.initialize(deals[1], 6, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // bad seal - tasks[7] = tools.extractEvents(await IexecInstance.initialize(deals[1], 7, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // late - }); - - function sendContribution(taskid, worker, results, authorization, enclave) - { - return IexecInstance.contribute( - taskid, // task (authorization) - results.hash, // common (result) - results.seal, // unique (result) - enclave, // address (enclave) - results.sign ? results.sign : constants.NULL.SIGNATURE, // signature (enclave) - authorization.sign, // signature (authorization) - { from: worker.address } - ); - } - - it("[setup] Contribute", async () => { - await sendContribution( - tasks[1], - worker1, - odbtools.utils.sealResult(tasks[1], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[1], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[1], - worker2, - odbtools.utils.sealResult(tasks[1], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[1], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[3], - worker1, - odbtools.utils.sealResult(tasks[3], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[3], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[4], - worker1, - odbtools.utils.sealResult(tasks[4], "false", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[4], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[4], - worker2, - odbtools.utils.sealResult(tasks[4], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[4], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[4], - worker3, - odbtools.utils.sealResult(tasks[4], "true", worker3.address), - await odbtools.utils.signAuthorization({ worker: worker3.address, taskid: tasks[4], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[4], - worker4, - odbtools.utils.sealResult(tasks[4], "true", worker4.address), - await odbtools.utils.signAuthorization({ worker: worker4.address, taskid: tasks[4], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[4], - worker5, - odbtools.utils.sealResult(tasks[4], "true", worker5.address), - await odbtools.utils.signAuthorization({ worker: worker5.address, taskid: tasks[4], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[5], - worker1, - odbtools.utils.sealResult(tasks[5], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[5], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[5], - worker2, - odbtools.utils.sealResult(tasks[5], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[5], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[6], - worker1, - odbtools.utils.sealResult(tasks[6], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[6], - worker2, - odbtools.utils.sealResult(tasks[6], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[7], - worker1, - odbtools.utils.sealResult(tasks[7], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[7], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[7], - worker2, - odbtools.utils.sealResult(tasks[7], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[7], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - }); - - it("[3.1] Reveal - Correct", async () => { - txMined = await IexecInstance.reveal( - tasks[1], - odbtools.utils.hashResult(tasks[1], "true").digest, - { from: worker1.address } - ); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReveal"); - assert.equal(events[0].args.taskid, tasks[1], "check taskid"); - assert.equal(events[0].args.worker, worker1.address, "check worker"); - assert.equal(events[0].args.digest, odbtools.utils.hashResult(tasks[1], "true").digest, "check result"); - }); - - it("[3.2] Reveal - Error (unset)", async () => { - await expectRevert.unspecified(IexecInstance.reveal( - tasks[2], - odbtools.utils.hashResult(tasks[2], "true").digest, - { from: worker1.address } - )); - }); - - it("[3.3] Reveal - Error (no consensus)", async () => { - await expectRevert.unspecified(IexecInstance.reveal( - tasks[3], - odbtools.utils.hashResult(tasks[3], "true").digest, - { from: worker1.address } - )); - }); - - it("[3.4] Reveal - Error (contribution value)", async () => { - await IexecInstance.reveal( - tasks[4], - odbtools.utils.hashResult(tasks[4], "true").digest, - { from: worker2.address } - ); - await IexecInstance.reveal( - tasks[4], - odbtools.utils.hashResult(tasks[4], "true").digest, - { from: worker3.address } - ); - await IexecInstance.reveal( - tasks[4], - odbtools.utils.hashResult(tasks[4], "true").digest, - { from: worker4.address } - ); - await expectRevert.unspecified(IexecInstance.reveal( - tasks[4], - odbtools.utils.hashResult(tasks[4], "true").digest, - { from: worker1.address } - )); - }); - - it("[3.6] Reveal - Error .hash)", async () => { - await expectRevert.unspecified(IexecInstance.reveal( - tasks[5], - odbtools.utils.hashResult(tasks[5], "nottrue").digest, - { from: worker1.address } - )); - }); - - it("[3.6] Reveal - Error .seal)", async () => { - await IexecInstance.reveal( - tasks[6], - odbtools.utils.hashResult(tasks[6], "true").digest, - { from: worker1.address } - ); - await expectRevert.unspecified(IexecInstance.reveal( - tasks[6], - odbtools.utils.hashResult(tasks[6], "true").digest, - { from: worker2.address } - )); - }); - - it("clock fast forward", async () => { - target = Number((await IexecInstance.viewTask(tasks[7])).revealDeadline); - - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_increaseTime", params: [ target - (await web3.eth.getBlock("latest")).timestamp ], id: 0 }, () => {}); - // workaround for https://github.com/trufflesuite/ganache/issues/1033 - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_mine", params: [ ], id: 0 }, () => {}); - }); - - it("[3.7] Reveal - Error (late for reveal)", async () => { - await expectRevert.unspecified(IexecInstance.reveal( - tasks[7], - odbtools.utils.hashResult(tasks[7], "true").digest, - { from: worker1.address } - )); - }); -}); diff --git a/test/byContract/IexecPoco/03_reveal.test.ts b/test/byContract/IexecPoco/03_reveal.test.ts new file mode 100644 index 000000000..f275cb7b4 --- /dev/null +++ b/test/byContract/IexecPoco/03_reveal.test.ts @@ -0,0 +1,308 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { AddressZero, HashZero } from '@ethersproject/constants'; +import { loadFixture, time } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { IexecInterfaceNative, IexecInterfaceNative__factory } from '../../../typechain'; +import { NULL } from '../../../utils/constants'; +import { IexecOrders, OrdersAssets, OrdersPrices, buildOrders } from '../../../utils/createOrders'; +import { + ContributionStatusEnum, + TaskStatusEnum, + buildAndSignContributionAuthorizationMessage, + buildResultHash, + buildResultHashAndResultSeal, + buildUtf8ResultAndDigest, + getIexecAccounts, +} from '../../../utils/poco-tools'; +import { IexecWrapper } from '../../utils/IexecWrapper'; + +const volume = 1; +const standardDealTag = HashZero; +const { resultDigest } = buildUtf8ResultAndDigest('result'); +const { resultDigest: badResultDigest } = buildUtf8ResultAndDigest('bad-result'); +const emptyEnclaveAddress = AddressZero; +const emptyEnclaveSignature = NULL.SIGNATURE; + +describe('IexecPoco2#reveal', () => { + let proxyAddress: string; + let [iexecPoco, iexecPocoAsWorker]: IexecInterfaceNative[] = []; + let iexecWrapper: IexecWrapper; + let [ + anyone, + scheduler, + worker, + worker1, + worker2, + worker3, + worker4, + requester, + ]: SignerWithAddress[] = []; + let ordersAssets: OrdersAssets; + let ordersPrices: OrdersPrices; + let orders: IexecOrders; + let [dealId, taskId]: string[] = []; + let taskIndex: number; + let [resultHash, resultSeal]: string[] = []; + let schedulerSignature: string; + + beforeEach(async () => { + proxyAddress = await loadHardhatFixtureDeployment(); + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ scheduler, worker, worker1, worker2, worker3, worker4, requester, anyone } = accounts); + iexecWrapper = new IexecWrapper(proxyAddress, accounts); + const { appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets(); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + iexecPocoAsWorker = iexecPoco.connect(worker); + const appPrice = 1000; + const datasetPrice = 1_000_000; + const workerpoolPrice = 1_000_000_000; + ordersAssets = { + app: appAddress, + dataset: datasetAddress, + workerpool: workerpoolAddress, + }; + ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, + }; + orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + trust: 1, + tag: standardDealTag, + }); + ({ dealId, taskIndex, taskId } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + )); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + await iexecWrapper.depositInIexecAccount(worker, workerTaskStake); + ({ resultHash, resultSeal } = buildResultHashAndResultSeal(taskId, resultDigest, worker)); + schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ); + } + + it('Should reveal task contribution', async () => { + await iexecPocoAsWorker + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + + await expect(iexecPocoAsWorker.reveal(taskId, resultDigest)) + .to.emit(iexecPoco, 'TaskReveal') + .withArgs(taskId, worker.address, resultDigest); + const contribution = await iexecPoco.viewContribution(taskId, worker.address); + expect(contribution.status).equal(ContributionStatusEnum.PROVED); + const task = await iexecPoco.viewTask(taskId); + expect(task.revealCounter).equal(1); + expect(task.resultDigest).equal(resultDigest); + }); + + it('Should not reveal when task is not in revealing status', async () => { + const task = await iexecPoco.viewTask(taskId); + expect(task.status).equal(TaskStatusEnum.ACTIVE); + + await expect(iexecPocoAsWorker.reveal(taskId, resultDigest)).to.be.revertedWithoutReason(); // require#1 + }); + + it('Should not reveal after deadline', async () => { + await iexecPocoAsWorker + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).equal(TaskStatusEnum.REVEALING); + await time.setNextBlockTimestamp(task.revealDeadline); + // revealing task + // but after deadline + await expect(iexecPocoAsWorker.reveal(taskId, resultDigest)).to.be.revertedWithoutReason(); // require#2 + }); + + it('Should not reveal when did not contribute', async () => { + await iexecPocoAsWorker + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).equal(TaskStatusEnum.REVEALING); + const contribution = await iexecPoco.viewContribution(taskId, worker2.address); + expect(contribution.status).equal(ContributionStatusEnum.UNSET); + // revealing task, before deadline + // but worker2 did not contribute before revealing + await expect( + iexecPoco.connect(worker2).reveal(taskId, resultDigest), + ).to.be.revertedWithoutReason(); // require#3 + }); + + it('Should not reveal twice', async () => { + await iexecPocoAsWorker + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).equal(TaskStatusEnum.REVEALING); + await iexecPocoAsWorker.reveal(taskId, resultDigest).then((tx) => tx.wait()); + const contribution = await iexecPoco.viewContribution(taskId, worker.address); + expect(contribution.status).equal(ContributionStatusEnum.PROVED); + // revealing task, before deadline + // but contribution status not contributed anymore (since already proved) + await expect(iexecPocoAsWorker.reveal(taskId, resultDigest)).to.be.revertedWithoutReason(); // require#3 + }); + + it('Should not reveal when outside consensus', async () => { + const { dealId, taskIndex, taskId } = await iexecWrapper.signAndMatchOrders( + ...buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + trust: 3, + tag: standardDealTag, + salt: ethers.utils.hexZeroPad('0x' + Date.now().toString(), 32), // make + }).toArray(), // app and dataset orders unique since already matched in + // beforeEach. A useless salt is also added to workerpool and request + // orders to get an easy one-liner declaration. + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const workers = [ + { signer: worker1, resultDigest: resultDigest }, + { signer: worker2, resultDigest: badResultDigest }, + { signer: worker3, resultDigest: resultDigest }, + { signer: worker4, resultDigest: resultDigest }, + ]; + const loosingWorker = worker2; + // winning workers are worker1, worker3 & worker4 + for (let i = 0; i < workers.length; i++) { + const worker = workers[i]; + const workerAddress = worker.signer.address; + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + worker.resultDigest, + worker.signer, + ); + await iexecWrapper.depositInIexecAccount(worker.signer, workerTaskStake); + await iexecPoco + .connect(worker.signer) + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + await buildAndSignContributionAuthorizationMessage( + workerAddress, + taskId, + emptyEnclaveAddress, + scheduler, + ), + ) + .then((tx) => tx.wait()); + } + const task = await iexecPoco.viewTask(taskId); + expect(task.status).equal(TaskStatusEnum.REVEALING); + const contribution = await iexecPoco.viewContribution(taskId, loosingWorker.address); + expect(contribution.status).equal(ContributionStatusEnum.CONTRIBUTED); + expect(contribution.resultHash).not.equal(task.consensusValue); + // revealing task, before deadline, contribution status is contributed + // but contribution outside consensus + await expect( + iexecPoco.connect(loosingWorker).reveal(taskId, resultDigest), + ).to.be.revertedWithoutReason(); // require#4 + }); + + it('Should not reveal when unable to prove result value', async () => { + await iexecPocoAsWorker + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).equal(TaskStatusEnum.REVEALING); + const contribution = await iexecPoco.viewContribution(taskId, worker.address); + expect(contribution.status).equal(ContributionStatusEnum.CONTRIBUTED); + expect(contribution.resultHash).equal(task.consensusValue); + expect(contribution.resultHash).not.equal(buildResultHash(taskId, badResultDigest)); + // revealing task, before deadline, contribution status is contributed + // contribution is part of the consensus + // but unable to prove result value + await expect( + iexecPocoAsWorker.reveal(taskId, badResultDigest), + ).to.be.revertedWithoutReason(); // require#5 + }); + + it('Should not reveal when unable to prove result ownership', async () => { + await iexecPocoAsWorker + .contribute( + taskId, + resultHash, + // stolen result seal from another worker + buildResultHashAndResultSeal(taskId, resultDigest, worker2).resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).equal(TaskStatusEnum.REVEALING); + const contribution = await iexecPoco.viewContribution(taskId, worker.address); + expect(contribution.status).equal(ContributionStatusEnum.CONTRIBUTED); + expect(contribution.resultHash).equal(task.consensusValue); + expect(contribution.resultHash).equal(buildResultHash(taskId, resultDigest)); + expect(contribution.resultSeal).not.equal( + buildResultHashAndResultSeal(taskId, resultDigest, worker).resultSeal, + ); + // revealing task, before deadline, contribution status is contributed + // contribution is part of the consensus, result proof is valid + // but unable to prove result ownership + await expect(iexecPocoAsWorker.reveal(taskId, resultDigest)).to.be.revertedWithoutReason(); // require#6 + }); +}); diff --git a/test/byContract/IexecPoco/04_finalize.js b/test/byContract/IexecPoco/04_finalize.js deleted file mode 100644 index 1cee3626a..000000000 --- a/test/byContract/IexecPoco/04_finalize.js +++ /dev/null @@ -1,402 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Poco', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder1 = null; - var workerpoolorder2 = null; - var requestorder = null; - - var deals = {} - var tasks = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: deposit * - ***************************************************************************/ - it("[Setup] deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - break; - - case "Token": - await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - break; - } - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); - }); - - /*************************************************************************** - * TEST: App creation (by appProvider) * - ***************************************************************************/ - it("[Setup]", async () => { - // Ressources - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - - // Orders - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder_offset = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 15, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 10, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 4, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - - // Market - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder_offset, requestorder, { from: user.address }); - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder)); - }); - - it("[setup] Initialization", async () => { - tasks[1] = tools.extractEvents(await IexecInstance.initialize(deals[1], 1, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // full - tasks[2] = tools.extractEvents(await IexecInstance.initialize(deals[1], 2, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // partial to soon - tasks[3] = tools.extractEvents(await IexecInstance.initialize(deals[1], 3, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // partial ok - tasks[4] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[1] }, { t: 'uint256', v: 4 }); // uninitialized - tasks[5] = tools.extractEvents(await IexecInstance.initialize(deals[1], 5, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // no consensus - tasks[6] = tools.extractEvents(await IexecInstance.initialize(deals[1], 6, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // no reveal - tasks[7] = tools.extractEvents(await IexecInstance.initialize(deals[1], 7, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // late - }); - - function sendContribution(taskid, worker, results, authorization, enclave) - { - return IexecInstance.contribute( - taskid, // task (authorization) - results.hash, // common (result) - results.seal, // unique (result) - enclave, // address (enclave) - results.sign ? results.sign : constants.NULL.SIGNATURE, // signature (enclave) - authorization.sign, // signature (authorization) - { from: worker.address } - ); - } - - it("[setup] Contribute", async () => { - await sendContribution( - tasks[1], - worker1, - odbtools.utils.sealResult(tasks[1], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[1], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[1], - worker2, - odbtools.utils.sealResult(tasks[1], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[1], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[2], - worker1, - odbtools.utils.sealResult(tasks[2], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[2], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[2], - worker2, - odbtools.utils.sealResult(tasks[2], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[2], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[3], - worker1, - odbtools.utils.sealResult(tasks[3], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[3], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[3], - worker2, - odbtools.utils.sealResult(tasks[3], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[3], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[5], - worker1, - odbtools.utils.sealResult(tasks[5], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[5], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[6], - worker1, - odbtools.utils.sealResult(tasks[6], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[6], - worker2, - odbtools.utils.sealResult(tasks[6], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[7], - worker1, - odbtools.utils.sealResult(tasks[7], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[7], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[7], - worker2, - odbtools.utils.sealResult(tasks[7], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[7], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - }); - - it("[setup] Reveal", async () => { - await IexecInstance.reveal(tasks[1], odbtools.utils.hashResult(tasks[1], "true").digest, { from: worker1.address }); - await IexecInstance.reveal(tasks[1], odbtools.utils.hashResult(tasks[1], "true").digest, { from: worker2.address }); - await IexecInstance.reveal(tasks[2], odbtools.utils.hashResult(tasks[2], "true").digest, { from: worker1.address }); - await IexecInstance.reveal(tasks[3], odbtools.utils.hashResult(tasks[3], "true").digest, { from: worker1.address }); - await IexecInstance.reveal(tasks[7], odbtools.utils.hashResult(tasks[7], "true").digest, { from: worker1.address }); - }); - - it("[4.1] Finalize - Correct (full)", async () => { - txMined = await IexecInstance.finalize(tasks[1], web3.utils.utf8ToHex("aResult 1"), "0x", { from: scheduler.address }); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[1], "check taskid"); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 1"), "check consensus (results)"); - }); - - it("[4.2] Finalize - Error (partial - soon)", async () => { - await expectRevert.unspecified(IexecInstance.finalize(tasks[2], web3.utils.utf8ToHex("aResult 2"), "0x", { from: scheduler.address })); - }); - - it("clock fast forward", async () => { - target = Number((await IexecInstance.viewTask(tasks[3])).revealDeadline); - - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_increaseTime", params: [ target - (await web3.eth.getBlock("latest")).timestamp ], id: 0 }, () => {}); - // workaround for https://github.com/trufflesuite/ganache/issues/1033 - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_mine", params: [ ], id: 0 }, () => {}); - }); - - it("[4.3] Finalize - Correct (partial - wait)", async () => { - txMined = await IexecInstance.finalize(tasks[3], web3.utils.utf8ToHex("aResult 3"), "0x", { from: scheduler.address }); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskFinalize"); - assert.equal(events[0].args.taskid, tasks[3], "check taskid"); - assert.equal(events[0].args.results, web3.utils.utf8ToHex("aResult 3"), "check consensus (results)"); - }); - - it("[4.4] Finalize - Error (no contribution)", async () => { - await expectRevert.unspecified(IexecInstance.finalize(tasks[4], web3.utils.utf8ToHex("aResult 4"), "0x", { from: scheduler.address })); - }); - - it("[4.5] Finalize - Error (no consensus)", async () => { - await expectRevert.unspecified(IexecInstance.finalize(tasks[5], web3.utils.utf8ToHex("aResult 5"), "0x", { from: scheduler.address })); - }); - - it("[4.6] Finalize - Error (no reveal)", async () => { - await expectRevert.unspecified(IexecInstance.finalize(tasks[6], web3.utils.utf8ToHex("aResult 6"), "0x", { from: scheduler.address })); - }); - - it("clock fast forward", async () => { - target = Number((await IexecInstance.viewTask(tasks[7])).finalDeadline); - - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_increaseTime", params: [ target - (await web3.eth.getBlock("latest")).timestamp ], id: 0 }, () => {}); - // workaround for https://github.com/trufflesuite/ganache/issues/1033 - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_mine", params: [ ], id: 0 }, () => {}); - }); - - it("[4.7] Finalize - Error (late)", async () => { - await expectRevert.unspecified(IexecInstance.finalize(tasks[7], web3.utils.utf8ToHex("aResult 7"), "0x", { from: scheduler.address })); - }); -}); diff --git a/test/byContract/IexecPoco/04_finalize.test.ts b/test/byContract/IexecPoco/04_finalize.test.ts new file mode 100644 index 000000000..1705f2644 --- /dev/null +++ b/test/byContract/IexecPoco/04_finalize.test.ts @@ -0,0 +1,606 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { AddressZero } from '@ethersproject/constants'; +import { loadFixture, setStorageAt, time } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { + IexecInterfaceNative, + IexecInterfaceNative__factory, + TestClient__factory, +} from '../../../typechain'; +import { OrdersAssets, OrdersPrices, buildOrders } from '../../../utils/createOrders'; +import { + TaskStatusEnum, + buildAndSignContributionAuthorizationMessage, + buildResultCallbackAndDigest, + buildResultHashAndResultSeal, + buildUtf8ResultAndDigest, + getIexecAccounts, +} from '../../../utils/poco-tools'; +import { IexecWrapper } from '../../utils/IexecWrapper'; + +const { results, resultDigest } = buildUtf8ResultAndDigest('result'); +const hexResults = ethers.utils.hexlify(results); +const { resultsCallback, callbackResultDigest } = buildResultCallbackAndDigest(123); + +const appPrice = 1000; +const datasetPrice = 1_000_000; +const workerpoolPrice = 1_000_000_000; +const taskPrice = appPrice + datasetPrice + workerpoolPrice; +const emptyEnclaveAddress = AddressZero; +const emptyEnclaveSignature = '0x'; + +describe('IexecPoco2#finalize', async () => { + let proxyAddress: string; + let [iexecPoco, iexecPocoAsScheduler]: IexecInterfaceNative[] = []; + let iexecWrapper: IexecWrapper; + let [appAddress, datasetAddress, workerpoolAddress]: string[] = []; + let [ + requester, + sponsor, + appProvider, + datasetProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + anyone, + ]: SignerWithAddress[] = []; + let ordersAssets: OrdersAssets; + let ordersPrices: OrdersPrices; + + beforeEach('Deploy', async () => { + // Deploy all contracts + proxyAddress = await loadHardhatFixtureDeployment(); + // Initialize test environment + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ + requester, + sponsor, + appProvider, + datasetProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + anyone, + } = accounts); + iexecWrapper = new IexecWrapper(proxyAddress, accounts); + ({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets()); + await iexecWrapper.setTeeBroker('0x0000000000000000000000000000000000000000'); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + iexecPocoAsScheduler = iexecPoco.connect(scheduler); + ordersAssets = { + app: appAddress, + dataset: datasetAddress, + workerpool: workerpoolAddress, + }; + ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, + }; + } + it('Should finalize task of deal payed by sponsor (with callback)', async () => { + const oracleConsumerInstance = await new TestClient__factory() + .connect(anyone) + .deploy() + .then((contract) => contract.deployed()); + const expectedVolume = 3; // > 1 to explicit taskPrice vs dealPrice + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume: expectedVolume, + trust: 3, + callback: oracleConsumerInstance.address, + }); + const { dealId, taskId, taskIndex, dealPrice } = + await iexecWrapper.signAndSponsorMatchOrders(...orders.toArray()); + const schedulerDealStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + expectedVolume, + ); + const schedulerTaskStake = schedulerDealStake / expectedVolume; + const kittyAddress = await iexecPoco.kitty_address(); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const { callbackResultDigest: wrongCallbackResultDigest } = + buildResultCallbackAndDigest(567); + const workers = [ + { signer: worker1, callbackResultDigest: callbackResultDigest }, + { signer: worker2, callbackResultDigest: wrongCallbackResultDigest }, + { signer: worker3, callbackResultDigest: callbackResultDigest }, + { signer: worker4, callbackResultDigest: callbackResultDigest }, + ]; + const winningWorkers = [worker1, worker3, worker4]; + const losingWorker = worker2; + // Set same non-zero score to each worker. + // Each winning worker should win 1 workerScore point. + // Losing worker should loose at least 33% of its workerScore (here + // it will loose 1 point since score is an integer). + for (const worker of workers) { + await setWorkerScoreInStorage(worker.signer.address, 1); + } + for (const worker of workers) { + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + worker.callbackResultDigest, + worker.signer, + ); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.signer.address, + taskId, + emptyEnclaveAddress, + scheduler, + ); + await iexecWrapper.depositInIexecAccount(worker.signer, workerTaskStake); + await iexecPoco + .connect(worker.signer) + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + } + for (const worker of winningWorkers) { + await iexecPoco + .connect(worker) + .reveal(taskId, callbackResultDigest) + .then((tx) => tx.wait()); + } + const requesterFrozenBefore = await iexecPoco.frozenOf(requester.address); + const sponsorFrozenBefore = (await iexecPoco.frozenOf(sponsor.address)).toNumber(); + const schedulerFrozenBefore = (await iexecPoco.frozenOf(scheduler.address)).toNumber(); + const workersFrozenBefore: { [name: string]: number } = {}; + for (const worker of workers) { + const workerAddress = worker.signer.address; + workersFrozenBefore[workerAddress] = await iexecPoco + .frozenOf(workerAddress) + .then((frozen) => frozen.toNumber()); + expect(await iexecPoco.viewScore(workerAddress)).to.be.equal(1); + } + const kittyFrozenBefore = await iexecPoco.frozenOf(kittyAddress); + const taskBefore = await iexecPoco.viewTask(taskId); + expect(taskBefore.status).to.equal(TaskStatusEnum.REVEALING); + expect(taskBefore.revealCounter).to.equal(taskBefore.winnerCounter); + + const finalizeTx = await iexecPocoAsScheduler.finalize(taskId, results, resultsCallback); + await finalizeTx.wait(); + await expect(finalizeTx) + .to.emit(iexecPoco, 'Seize') + .withArgs(sponsor.address, taskPrice, taskId) + .to.emit(iexecPoco, 'Transfer') + .withArgs(iexecPoco.address, appProvider.address, appPrice) + .to.emit(iexecPoco, 'Reward') + .withArgs(appProvider.address, appPrice, taskId) + .to.emit(iexecPoco, 'Transfer') + .withArgs(iexecPoco.address, datasetProvider.address, datasetPrice) + .to.emit(iexecPoco, 'Reward') + .withArgs(datasetProvider.address, datasetPrice, taskId) + .to.emit(iexecPoco, 'Transfer') + .withArgs(iexecPoco.address, scheduler.address, schedulerTaskStake) + .to.emit(iexecPoco, 'Unlock') + .withArgs(scheduler.address, schedulerTaskStake); + const workerReward = 429000000; + for (const worker of winningWorkers) { + await expect(finalizeTx) + .to.emit(iexecPoco, 'Transfer') + .withArgs(iexecPoco.address, worker.address, workerTaskStake) + .to.emit(iexecPoco, 'Unlock') + .withArgs(worker.address, workerTaskStake) + .to.emit(iexecPoco, 'Transfer') + .withArgs(iexecPoco.address, worker.address, workerReward) + .to.emit(iexecPoco, 'Reward') + .withArgs(worker.address, workerReward, taskId) + .to.emit(iexecPoco, 'AccurateContribution') + .withArgs(worker.address, taskId); + } + await expect(finalizeTx) + .to.emit(iexecPoco, 'Seize') + .withArgs(losingWorker.address, workerTaskStake, taskId) + .to.emit(iexecPoco, 'FaultyContribution') + .withArgs(losingWorker.address, taskId); + const schedulerReward = + workerpoolPrice - + winningWorkers.length * workerReward + // winning workers rewards + workerTaskStake; // losing worker stake + await expect(finalizeTx) + .to.emit(iexecPoco, 'Transfer') + .withArgs(iexecPoco.address, scheduler.address, schedulerReward) + .to.emit(iexecPoco, 'Reward') + .withArgs(scheduler.address, schedulerReward, taskId) + .to.emit(iexecPoco, 'TaskFinalize') + .withArgs(taskId, hexResults) + .to.emit(oracleConsumerInstance, 'GotResult') + .withArgs(taskId, resultsCallback); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).equal(TaskStatusEnum.COMPLETED); + expect(task.results).equal(hexResults); + expect(task.resultsCallback).equal(resultsCallback); + await expect(finalizeTx).to.changeTokenBalances( + iexecPoco, + [ + iexecPoco, + requester, + sponsor, + appProvider, + datasetProvider, + scheduler, + worker1, + worker2, + worker3, + worker4, + kittyAddress, + ], + [ + -( + appPrice + // iExec Poco rewards asset providers and unlock/seize stakes + datasetPrice + + workerpoolPrice + + schedulerTaskStake + + workerTaskStake * workers.length + ), + 0, // requester is unrelated to this test + 0, // sponsor balance is unchanged, only frozen is changed + appPrice, // app provider is rewarded + datasetPrice, // dataset provider is rewarded + schedulerReward + // scheduler is rewarded for first task + schedulerTaskStake, // and also get unlocked stake for first task + workerTaskStake + workerReward, // worker1 is a winning worker + 0, // worker2 is a losing worker + workerTaskStake + workerReward, // worker3 is a winning worker + workerTaskStake + workerReward, // worker4 is a winning worker + 0, // TODO: Update test with non-empty kitty + ], + ); + expect(await iexecPoco.frozenOf(requester.address)).to.be.equal(requesterFrozenBefore); + expect(await iexecPoco.frozenOf(sponsor.address)).to.be.equal( + sponsorFrozenBefore - taskPrice, + ); + expect(await iexecPoco.frozenOf(scheduler.address)).to.be.equal( + schedulerFrozenBefore - schedulerTaskStake, + ); + for (const worker of workers) { + expect(await iexecPoco.frozenOf(worker.signer.address)).to.be.equal( + workersFrozenBefore[worker.signer.address] - workerTaskStake, + ); + } + for (const worker of winningWorkers) { + expect(await iexecPoco.viewScore(worker.address)).to.be.equal(2); + } + expect(await iexecPoco.viewScore(losingWorker.address)).to.be.equal(0); + expect(await iexecPoco.frozenOf(kittyAddress)).to.be.equal(kittyFrozenBefore); + }); + + it('Should finalize task of deal payed by requester (no callback, no dataset)', async () => { + const orders = buildOrders({ + assets: { + app: appAddress, + dataset: AddressZero, + workerpool: workerpoolAddress, + }, + requester: requester.address, + prices: ordersPrices, + }); + const taskPrice = appPrice + workerpoolPrice; + const { dealId, taskId, taskIndex } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker1, + ); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker1.address, + taskId, + emptyEnclaveAddress, + scheduler, + ); + await iexecWrapper.depositInIexecAccount(worker1, workerTaskStake); + await iexecPoco + .connect(worker1) + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + await iexecPoco + .connect(worker1) + .reveal(taskId, resultDigest) + .then((tx) => tx.wait()); + const requesterFrozenBefore = (await iexecPoco.frozenOf(requester.address)).toNumber(); + const sponsorFrozenBefore = await iexecPoco.frozenOf(sponsor.address); + + await expect(iexecPocoAsScheduler.finalize(taskId, results, '0x')) + .to.emit(iexecPoco, 'TaskFinalize') + .to.changeTokenBalances( + iexecPoco, + [requester, sponsor, appProvider, datasetProvider], + [ + 0, // requester balance is unchanged, only frozen is changed + 0, + appPrice, // app provider is rewarded + 0, // but dataset provider is not rewarded + ], + ); + expect(await iexecPoco.frozenOf(requester.address)).to.be.equal( + requesterFrozenBefore - taskPrice, + ); + expect(await iexecPoco.frozenOf(sponsor.address)).to.be.equal(sponsorFrozenBefore); + const task = await iexecPoco.viewTask(taskId); + expect(task.resultsCallback).to.equal('0x'); // deal without callback + }); + + it('Should finalize task after reveal deadline with at least one reveal', async () => { + const volume = 1; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + trust: 3, + }); + const { dealId, taskId, taskIndex } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const workers = [worker1, worker2]; + for (const worker of workers) { + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ); + await iexecWrapper.depositInIexecAccount(worker, workerTaskStake); + await iexecPoco + .connect(worker) + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + } + await iexecPoco + .connect(worker1) + .reveal(taskId, resultDigest) + .then((tx) => tx.wait()); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).to.equal(TaskStatusEnum.REVEALING); + expect(task.revealCounter).to.equal(1); + await time.setNextBlockTimestamp(task.revealDeadline); + // worker2 did not reveal + // so task can be finalized after revealDeadline + await expect(iexecPocoAsScheduler.finalize(taskId, results, '0x')).to.emit( + iexecPoco, + 'TaskFinalize', + ); + }); + + it('Should not finalize when caller is not scheduler', async () => { + const { dealId, taskId } = await iexecWrapper.signAndMatchOrders( + ...buildOrders({ + assets: ordersAssets, + requester: requester.address, + }).toArray(), + ); + const deal = await iexecPoco.viewDeal(dealId); + expect(deal.workerpool.owner).to.equal(scheduler.address).not.equal(anyone.address); + // caller is not scheduler + await expect( + iexecPoco.connect(anyone).finalize(taskId, results, '0x'), + ).to.be.revertedWithoutReason(); // onlyScheduler modifier + }); + + it('Should not finalize task when task status is not revealing', async () => { + const { dealId, taskId, taskIndex } = await iexecWrapper.signAndMatchOrders( + ...buildOrders({ + assets: ordersAssets, + requester: requester.address, + }).toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).to.equal(TaskStatusEnum.ACTIVE); + // caller is scheduler + // but task status is not revealing + await expect( + iexecPocoAsScheduler.finalize(taskId, results, '0x'), + ).to.be.revertedWithoutReason(); // require#1 + }); + + it('Should not finalize task after final deadline', async () => { + const { dealId, taskId, taskIndex } = await iexecWrapper.signAndMatchOrders( + ...buildOrders({ + assets: ordersAssets, + requester: requester.address, + }).toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker1, + ); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker1.address, + taskId, + emptyEnclaveAddress, + scheduler, + ); + await iexecWrapper.depositInIexecAccount(worker1, workerTaskStake); + await iexecPoco + .connect(worker1) + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).to.equal(TaskStatusEnum.REVEALING); + await time.setNextBlockTimestamp(task.finalDeadline); + // caller is scheduler, task status is revealing + // but after final deadline + await expect( + iexecPocoAsScheduler.finalize(taskId, results, '0x'), + ).to.be.revertedWithoutReason(); // require#2 + }); + + it('Should not finalize when winner counter is not reached nor at least one worker revealed', async () => { + const { dealId, taskId, taskIndex } = await iexecWrapper.signAndMatchOrders( + ...buildOrders({ + assets: ordersAssets, + requester: requester.address, + trust: 3, + }).toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const workers = [worker1, worker2]; + for (const worker of workers) { + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ); + await iexecWrapper.depositInIexecAccount(worker, workerTaskStake); + await iexecPoco + .connect(worker) + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + } + const task = await iexecPoco.viewTask(taskId); + expect(task.status).to.equal(TaskStatusEnum.REVEALING); + expect(task.winnerCounter).to.equal(2).not.equal(task.revealCounter); + await time.setNextBlockTimestamp(task.revealDeadline); + // caller is scheduler, task status is revealing, before final deadline + // winner counter is not reached and reveal deadline is reached but not + // even one worker revealed + await expect( + iexecPocoAsScheduler.finalize(taskId, results, '0x'), + ).to.be.revertedWithoutReason(); // require#3 + }); + + it('Should not finalize task when resultsCallback is not expected', async () => { + const { dealId, taskId, taskIndex } = await iexecWrapper.signAndMatchOrders( + ...buildOrders({ + assets: ordersAssets, + requester: requester.address, + }).toArray(), + ); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker1, + ); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker1.address, + taskId, + emptyEnclaveAddress, + scheduler, + ); + await iexecWrapper.depositInIexecAccount(worker1, workerTaskStake); + await iexecPoco + .connect(worker1) + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + await iexecPoco + .connect(worker1) + .reveal(taskId, resultDigest) + .then((tx) => tx.wait()); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).to.equal(TaskStatusEnum.REVEALING); + expect(task.revealCounter).to.equal(1); + // caller is scheduler, task status is revealing, before final deadline, + // reveal counter is reached + // but resultsCallback is not expected + await expect( + iexecPocoAsScheduler.finalize(taskId, results, '0x01'), + ).to.be.revertedWithoutReason(); // require#4 + }); + + async function setWorkerScoreInStorage(worker: string, score: number) { + const workerScoreSlot = ethers.utils.hexStripZeros( + ethers.utils.keccak256( + ethers.utils.defaultAbiCoder.encode( + ['address', 'uint256'], + [ + worker, + 23, // Slot index of m_workerScores in Store + ], + ), + ), + ); + await setStorageAt(proxyAddress, workerScoreSlot, score); + } +}); diff --git a/test/byContract/IexecPoco/05_reopen.js b/test/byContract/IexecPoco/05_reopen.js deleted file mode 100644 index d73d33c19..000000000 --- a/test/byContract/IexecPoco/05_reopen.js +++ /dev/null @@ -1,375 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -//.wallet Conf.addressig -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Poco', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder1 = null; - var workerpoolorder2 = null; - var requestorder = null; - - var deals = {} - var tasks = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: deposit * - ***************************************************************************/ - it("[Setup] deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - break; - - case "Token": - await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - break; - } - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); - }); - - /*************************************************************************** - * TEST: App creation (by appProvider) * - ***************************************************************************/ - it("[Setup]", async () => { - // Ressources - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - - // Orders - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder_offset = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 15, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 10, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 4, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - - // Market - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder_offset, requestorder, { from: user.address }); - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder)); - }); - - it("[setup] Initialization", async () => { - tasks[1] = tools.extractEvents(await IexecInstance.initialize(deals[1], 1, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // early - tasks[2] = tools.extractEvents(await IexecInstance.initialize(deals[1], 2, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // correct - tasks[3] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[1] }, { t: 'uint256', v: 3 }); // unitialized - tasks[4] = tools.extractEvents(await IexecInstance.initialize(deals[1], 4, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // active - tasks[5] = tools.extractEvents(await IexecInstance.initialize(deals[1], 5, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // got reveal (error) - tasks[6] = tools.extractEvents(await IexecInstance.initialize(deals[1], 6, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // to late - }); - - function sendContribution(taskid, worker, results, authorization, enclave) - { - return IexecInstance.contribute( - taskid, // task (authorization) - results.hash, // common (result) - results.seal, // unique (result) - enclave, // address (enclave) - results.sign ? results.sign : constants.NULL.SIGNATURE, // signature (enclave) - authorization.sign, // signature (authorization) - { from: worker.address } - ); - } - - it("[setup] Contribute", async () => { - await sendContribution( - tasks[1], - worker1, - odbtools.utils.sealResult(tasks[1], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[1], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[1], - worker2, - odbtools.utils.sealResult(tasks[1], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[1], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[2], - worker1, - odbtools.utils.sealResult(tasks[2], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[2], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[2], - worker2, - odbtools.utils.sealResult(tasks[2], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[2], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[4], - worker1, - odbtools.utils.sealResult(tasks[4], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[4], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[5], - worker1, - odbtools.utils.sealResult(tasks[5], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[5], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[5], - worker2, - odbtools.utils.sealResult(tasks[5], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[5], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[6], - worker1, - odbtools.utils.sealResult(tasks[6], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[6], - worker2, - odbtools.utils.sealResult(tasks[6], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - }); - - it("[setup] Reveal", async () => { - await IexecInstance.reveal(tasks[5], odbtools.utils.hashResult(tasks[5], "true").digest, { from: worker1.address }); - }); - - - it("[5.1] Reopen - Error (early)", async () => { - await expectRevert.unspecified(IexecInstance.reopen(tasks[1], { from: scheduler.address })); - }); - - it("clock fast forward", async () => { - target = Number((await IexecInstance.viewTask(tasks[2])).revealDeadline); - - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_increaseTime", params: [ target - (await web3.eth.getBlock("latest")).timestamp ], id: 0 }, () => {}); - // workaround for https://github.com/trufflesuite/ganache/issues/1033 - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_mine", params: [ ], id: 0 }, () => {}); - }); - - it("[5.2] Reopen - Correct", async () => { - txMined = await IexecInstance.reopen(tasks[2], { from: scheduler.address }); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskReopen"); - assert.equal(events[0].args.taskid, tasks[2], "check taskid"); - }); - - it("[5.3] Reopen - Error (status #1 - currently unset)", async () => { - await expectRevert.unspecified(IexecInstance.reopen(tasks[3], { from: scheduler.address })); - }); - - it("[5.4] Reopen - Error (status #2 - currently active)", async () => { - await expectRevert.unspecified(IexecInstance.reopen(tasks[4], { from: scheduler.address })); - }); - - it("[5.5] Reopen - Error (counter)", async () => { - await expectRevert.unspecified(IexecInstance.reopen(tasks[5], { from: scheduler.address })); - }); - - it("clock fast forward", async () => { - target = Number((await IexecInstance.viewTask(tasks[6])).finalDeadline); - - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_increaseTime", params: [ target - (await web3.eth.getBlock("latest")).timestamp ], id: 0 }, () => {}); - // workaround for https://github.com/trufflesuite/ganache/issues/1033 - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_mine", params: [ ], id: 0 }, () => {}); - }); - - it("[5.6] Reopen - Error (late)", async () => { - await expectRevert.unspecified(IexecInstance.reopen(tasks[6], { from: scheduler.address })); - }); - -}); diff --git a/test/byContract/IexecPoco/05_reopen.js.skip b/test/byContract/IexecPoco/05_reopen.js.skip new file mode 100644 index 000000000..b14231ec5 --- /dev/null +++ b/test/byContract/IexecPoco/05_reopen.js.skip @@ -0,0 +1,453 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +const loadTruffleFixtureDeployment = require('../../../scripts/truffle-fixture-deployer'); +//.wallet Conf.addressig +var DEPLOYMENT = require('../../../config/config.json').chains.default; +// Artefacts +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../../../utils/tools'); +const enstools = require('../../../utils/ens-tools'); +const odbtools = require('../../../utils/odb-tools'); +const constants = require('../../../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); + +contract('Poco', async (accounts) => { + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder1 = null; + var workerpoolorder2 = null; + var requestorder = null; + + var deals = {}; + var tasks = {}; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + }); + + /*************************************************************************** + * TEST: deposit * + ***************************************************************************/ + it('[Setup] deposit', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + break; + + case 'Token': + await RLCInstance.approveAndCall(IexecInstance.address, 10000000, '0x', { + from: iexecAdmin.address, + }); + break; + } + await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); + await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); + await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); + await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); + await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); + await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); + await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); + }); + + /*************************************************************************** + * TEST: App creation (by appProvider) * + ***************************************************************************/ + it('[Setup]', async () => { + // Ressources + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents(txMined, DatasetRegistryInstance.address, 'Transfer'); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, 'Transfer'); + WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); + + await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + + // Orders + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + workerpoolorder_offset = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 15, + volume: 1, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 10, + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 10, + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 10, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 4, + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + + // Market + await IexecInstance.matchOrders( + apporder, + datasetorder, + workerpoolorder_offset, + requestorder, + { from: user.address }, + ); + await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { + from: user.address, + }); + + deals = await odbtools.utils.requestToDeal( + IexecInstance, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + ); + }); + + it('[setup] Initialization', async () => { + tasks[1] = tools.extractEvents( + await IexecInstance.initialize(deals[1], 1, { from: scheduler.address }), + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; // early + tasks[2] = tools.extractEvents( + await IexecInstance.initialize(deals[1], 2, { from: scheduler.address }), + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; // correct + tasks[3] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[1] }, { t: 'uint256', v: 3 }); // unitialized + tasks[4] = tools.extractEvents( + await IexecInstance.initialize(deals[1], 4, { from: scheduler.address }), + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; // active + tasks[5] = tools.extractEvents( + await IexecInstance.initialize(deals[1], 5, { from: scheduler.address }), + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; // got reveal (error) + tasks[6] = tools.extractEvents( + await IexecInstance.initialize(deals[1], 6, { from: scheduler.address }), + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; // to late + }); + + function sendContribution(taskid, worker, results, authorization, enclave) { + return IexecInstance.contribute( + taskid, // task (authorization) + results.hash, // common (result) + results.seal, // unique (result) + enclave, // address (enclave) + results.sign ? results.sign : constants.NULL.SIGNATURE, // signature (enclave) + authorization.sign, // signature (authorization) + { from: worker.address }, + ); + } + + it('[setup] Contribute', async () => { + await sendContribution( + tasks[1], + worker1, + odbtools.utils.sealResult(tasks[1], 'true', worker1.address), + await odbtools.utils.signAuthorization( + { worker: worker1.address, taskid: tasks[1], enclave: constants.NULL.ADDRESS }, + scheduler.wallet, + ), + constants.NULL.ADDRESS, + ); + await sendContribution( + tasks[1], + worker2, + odbtools.utils.sealResult(tasks[1], 'true', worker2.address), + await odbtools.utils.signAuthorization( + { worker: worker2.address, taskid: tasks[1], enclave: constants.NULL.ADDRESS }, + scheduler.wallet, + ), + constants.NULL.ADDRESS, + ); + + await sendContribution( + tasks[2], + worker1, + odbtools.utils.sealResult(tasks[2], 'true', worker1.address), + await odbtools.utils.signAuthorization( + { worker: worker1.address, taskid: tasks[2], enclave: constants.NULL.ADDRESS }, + scheduler.wallet, + ), + constants.NULL.ADDRESS, + ); + await sendContribution( + tasks[2], + worker2, + odbtools.utils.sealResult(tasks[2], 'true', worker2.address), + await odbtools.utils.signAuthorization( + { worker: worker2.address, taskid: tasks[2], enclave: constants.NULL.ADDRESS }, + scheduler.wallet, + ), + constants.NULL.ADDRESS, + ); + + await sendContribution( + tasks[4], + worker1, + odbtools.utils.sealResult(tasks[4], 'true', worker1.address), + await odbtools.utils.signAuthorization( + { worker: worker1.address, taskid: tasks[4], enclave: constants.NULL.ADDRESS }, + scheduler.wallet, + ), + constants.NULL.ADDRESS, + ); + + await sendContribution( + tasks[5], + worker1, + odbtools.utils.sealResult(tasks[5], 'true', worker1.address), + await odbtools.utils.signAuthorization( + { worker: worker1.address, taskid: tasks[5], enclave: constants.NULL.ADDRESS }, + scheduler.wallet, + ), + constants.NULL.ADDRESS, + ); + await sendContribution( + tasks[5], + worker2, + odbtools.utils.sealResult(tasks[5], 'true', worker2.address), + await odbtools.utils.signAuthorization( + { worker: worker2.address, taskid: tasks[5], enclave: constants.NULL.ADDRESS }, + scheduler.wallet, + ), + constants.NULL.ADDRESS, + ); + + await sendContribution( + tasks[6], + worker1, + odbtools.utils.sealResult(tasks[6], 'true', worker1.address), + await odbtools.utils.signAuthorization( + { worker: worker1.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, + scheduler.wallet, + ), + constants.NULL.ADDRESS, + ); + await sendContribution( + tasks[6], + worker2, + odbtools.utils.sealResult(tasks[6], 'true', worker2.address), + await odbtools.utils.signAuthorization( + { worker: worker2.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, + scheduler.wallet, + ), + constants.NULL.ADDRESS, + ); + }); + + it('[setup] Reveal', async () => { + await IexecInstance.reveal(tasks[5], odbtools.utils.hashResult(tasks[5], 'true').digest, { + from: worker1.address, + }); + }); + + it('[5.1] Reopen - Error (early)', async () => { + await expectRevert.unspecified(IexecInstance.reopen(tasks[1], { from: scheduler.address })); + }); + + it('clock fast forward', async () => { + target = Number((await IexecInstance.viewTask(tasks[2])).revealDeadline); + + await web3.currentProvider.send( + { + jsonrpc: '2.0', + method: 'evm_increaseTime', + params: [target - (await web3.eth.getBlock('latest')).timestamp], + id: 0, + }, + () => {}, + ); + // workaround for https://github.com/trufflesuite/ganache/issues/1033 + await web3.currentProvider.send( + { jsonrpc: '2.0', method: 'evm_mine', params: [], id: 0 }, + () => {}, + ); + }); + + it('[5.2] Reopen - Correct', async () => { + txMined = await IexecInstance.reopen(tasks[2], { from: scheduler.address }); + events = tools.extractEvents(txMined, IexecInstance.address, 'TaskReopen'); + assert.equal(events[0].args.taskid, tasks[2], 'check taskid'); + }); + + it('[5.3] Reopen - Error (status #1 - currently unset)', async () => { + await expectRevert.unspecified(IexecInstance.reopen(tasks[3], { from: scheduler.address })); + }); + + it('[5.4] Reopen - Error (status #2 - currently active)', async () => { + await expectRevert.unspecified(IexecInstance.reopen(tasks[4], { from: scheduler.address })); + }); + + it('[5.5] Reopen - Error (counter)', async () => { + await expectRevert.unspecified(IexecInstance.reopen(tasks[5], { from: scheduler.address })); + }); + + it('clock fast forward', async () => { + target = Number((await IexecInstance.viewTask(tasks[6])).finalDeadline); + + await web3.currentProvider.send( + { + jsonrpc: '2.0', + method: 'evm_increaseTime', + params: [target - (await web3.eth.getBlock('latest')).timestamp], + id: 0, + }, + () => {}, + ); + // workaround for https://github.com/trufflesuite/ganache/issues/1033 + await web3.currentProvider.send( + { jsonrpc: '2.0', method: 'evm_mine', params: [], id: 0 }, + () => {}, + ); + }); + + it('[5.6] Reopen - Error (late)', async () => { + await expectRevert.unspecified(IexecInstance.reopen(tasks[6], { from: scheduler.address })); + }); +}); diff --git a/test/byContract/IexecPoco/05_reopen.test.ts b/test/byContract/IexecPoco/05_reopen.test.ts new file mode 100644 index 000000000..46d6c8821 --- /dev/null +++ b/test/byContract/IexecPoco/05_reopen.test.ts @@ -0,0 +1,274 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { AddressZero, HashZero } from '@ethersproject/constants'; +import { loadFixture, mine, time } from '@nomicfoundation/hardhat-network-helpers'; +import { setNextBlockTimestamp } from '@nomicfoundation/hardhat-network-helpers/dist/src/helpers/time'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { IexecInterfaceNative, IexecInterfaceNative__factory } from '../../../typechain'; +import { OrdersAssets, OrdersPrices, buildOrders } from '../../../utils/createOrders'; +import { + ContributionStatusEnum, + TaskStatusEnum, + buildAndSignContributionAuthorizationMessage, + buildResultHash, + buildResultHashAndResultSeal, + buildUtf8ResultAndDigest, + getIexecAccounts, +} from '../../../utils/poco-tools'; +import { IexecWrapper } from '../../utils/IexecWrapper'; + +const appPrice = 1000; +const datasetPrice = 1_000_000; +const workerpoolPrice = 1_000_000_000; +const resultDigest = buildUtf8ResultAndDigest('result').resultDigest; + +describe('IexecPoco2#reopen', async () => { + let proxyAddress: string; + let [iexecPoco, iexecPocoAsScheduler, iexecPocoAsWorker]: IexecInterfaceNative[] = []; + let iexecWrapper: IexecWrapper; + let [appAddress, datasetAddress, workerpoolAddress]: string[] = []; + let [ + requester, + scheduler, + worker, + worker1, + worker2, + worker3, + worker4, + anyone, + ]: SignerWithAddress[] = []; + let ordersAssets: OrdersAssets; + let ordersPrices: OrdersPrices; + let [dealId, taskId]: string[] = []; + let taskIndex: number; + + beforeEach('Deploy', async () => { + // Deploy all contracts + proxyAddress = await loadHardhatFixtureDeployment(); + // Initialize test environment + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ requester, scheduler, worker, worker1, worker2, worker3, worker4, anyone } = accounts); + iexecWrapper = new IexecWrapper(proxyAddress, accounts); + ({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets()); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + iexecPocoAsScheduler = iexecPoco.connect(scheduler); + iexecPocoAsWorker = iexecPoco.connect(worker); + ordersAssets = { + app: appAddress, + dataset: datasetAddress, + workerpool: workerpoolAddress, + }; + ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, + }; + } + + it('Should reopen task after reveal deadline', async () => { + await matchOrdersAndInitializeTask(3); // Multiple workers. + const resultHash = buildResultHash(taskId, resultDigest); + const badResultDigest = buildUtf8ResultAndDigest('bad-result').resultDigest; + const contributions = [ + { signer: worker1, resultDigest: resultDigest }, + { signer: worker2, resultDigest: badResultDigest }, + { signer: worker3, resultDigest: resultDigest }, + { signer: worker4, resultDigest: resultDigest }, + ]; + const winningWorkers = [worker1, worker3, worker4]; + const losingWorkers = [worker2]; + for (const contribution of contributions) { + await contribute(contribution.signer, contribution.resultDigest); + const onchainContributionBefore = await iexecPoco.viewContribution( + taskId, + contribution.signer.address, + ); + expect(onchainContributionBefore.status).to.equal(ContributionStatusEnum.CONTRIBUTED); + } + const taskBefore = await iexecPoco.viewTask(taskId); + expect(taskBefore.status).to.equal(TaskStatusEnum.REVEALING); + expect(taskBefore.consensusValue).to.equal(resultHash); + expect(taskBefore.revealCounter).to.equal(0); + expect(taskBefore.winnerCounter).to.equal(3); + // Time travel beyond reveal deadline but before final deadline. + await setNextBlockTimestamp(taskBefore.revealDeadline).then(() => mine()); + const latestBlockTimestamp = await time.latest(); + expect(taskBefore.status).to.equal(TaskStatusEnum.REVEALING); // require 1 + expect(latestBlockTimestamp).to.be.lessThan(taskBefore.finalDeadline); // require 2 + expect(latestBlockTimestamp).to.be.greaterThanOrEqual(taskBefore.revealDeadline); // require 3.1 + expect(taskBefore.revealCounter).to.equal(0); // require 3.2 + // Reopen + await expect(iexecPocoAsScheduler.reopen(taskId)) + .to.emit(iexecPoco, 'TaskReopen') + .withArgs(taskId); + for (const worker of winningWorkers) { + const onchainContributionAfter = await iexecPoco.viewContribution( + taskId, + worker.address, + ); + expect(onchainContributionAfter.status).to.equal(ContributionStatusEnum.REJECTED); + } + for (const worker of losingWorkers) { + const onchainContributionAfter = await iexecPoco.viewContribution( + taskId, + worker.address, + ); + expect(onchainContributionAfter.status).to.equal(ContributionStatusEnum.CONTRIBUTED); + } + // No getter for m_consensus. + const taskAfter = await iexecPoco.viewTask(taskId); + expect(taskAfter.status).to.equal(TaskStatusEnum.ACTIVE); + expect(taskAfter.consensusValue).to.equal(HashZero); + expect(taskAfter.revealCounter).to.equal(0); + expect(taskAfter.winnerCounter).to.equal(0); + }); + + it('Should not reopen task when sender is not the scheduler', async () => { + await matchOrdersAndInitializeTask(1); + await contribute(worker, resultDigest); + const task = await iexecPoco.viewTask(taskId); + // Time travel beyond reveal deadline but before final deadline. + await setNextBlockTimestamp(task.revealDeadline).then(() => mine()); + const latestBlockTimestamp = await time.latest(); + expect(task.status).to.equal(TaskStatusEnum.REVEALING); // require 1 + expect(latestBlockTimestamp).to.be.lessThan(task.finalDeadline); // require 2 + expect(latestBlockTimestamp).to.be.greaterThanOrEqual(task.revealDeadline); // require 3.1 + expect(task.revealCounter).to.equal(0); // require 3.2 + await expect(iexecPoco.reopen(taskId)).to.revertedWithoutReason(); + }); + + it('Should not reopen task when status is before revealing', async () => { + await matchOrdersAndInitializeTask(3); + // Only 1 contribution, consensus not reached yet. + await contribute(worker1, resultDigest); + const task = await iexecPoco.viewTask(taskId); + expect(task.status).to.be.lessThan(TaskStatusEnum.REVEALING); // require 1 <-- + expect(await time.latest()).to.be.lessThan(task.finalDeadline); // require 2 + expect(task.revealCounter).to.equal(0); // require 3.2 + await expect(iexecPoco.reopen(taskId)).to.revertedWithoutReason(); + }); + + it('Should not reopen task when status is after revealing', async () => { + await matchOrdersAndInitializeTask(1); + const { results, resultDigest } = buildUtf8ResultAndDigest('result'); + await contribute(worker, resultDigest); + // Move task to the next status (COMPLETED). + await iexecPocoAsWorker.reveal(taskId, resultDigest).then((tx) => tx.wait()); + await iexecPocoAsScheduler.finalize(taskId, results, '0x'); + const task = await iexecPoco.viewTask(taskId); + // Time travel beyond reveal deadline but before final deadline. + await setNextBlockTimestamp(task.revealDeadline).then(() => mine()); + const latestBlockTimestamp = await time.latest(); + expect(task.status).to.be.greaterThan(TaskStatusEnum.REVEALING); // require 1 <-- + expect(latestBlockTimestamp).to.be.lessThan(task.finalDeadline); // require 2 + expect(latestBlockTimestamp).to.be.greaterThanOrEqual(task.revealDeadline); // require 3.1 + await expect(iexecPoco.reopen(taskId)).to.revertedWithoutReason(); + }); + + it('Should not reopen task after final deadline', async () => { + await matchOrdersAndInitializeTask(1); + await contribute(worker, resultDigest); + const task = await iexecPoco.viewTask(taskId); + // Time travel beyond final deadline. + await setNextBlockTimestamp(task.finalDeadline).then(() => mine(2)); + const latestBlockTimestamp = await time.latest(); + expect(task.status).to.equal(TaskStatusEnum.REVEALING); // require 1 + expect(latestBlockTimestamp).to.be.greaterThan(task.finalDeadline); // require 2 <-- + expect(latestBlockTimestamp).to.be.greaterThan(task.revealDeadline); // require 3.1 + expect(task.revealCounter).to.equal(0); // require 3.2 + await expect(iexecPoco.reopen(taskId)).to.revertedWithoutReason(); + }); + + it('Should not reopen task before reveal deadline', async () => { + await matchOrdersAndInitializeTask(1); + await contribute(worker, resultDigest); + const task = await iexecPoco.viewTask(taskId); + // No time travel. + const latestBlockTimestamp = await time.latest(); + expect(task.status).to.equal(TaskStatusEnum.REVEALING); // require 1 + expect(latestBlockTimestamp).to.be.lessThan(task.finalDeadline); // require 2 + expect(latestBlockTimestamp).to.be.lessThan(task.revealDeadline); // require 3.1 <-- + expect(task.revealCounter).to.equal(0); // require 3.2 + await expect(iexecPoco.reopen(taskId)).to.revertedWithoutReason(); + }); + + it('Should not reopen task with at least 1 reveal', async () => { + await matchOrdersAndInitializeTask(3); + await contribute(worker1, resultDigest); + await contribute(worker2, resultDigest); + // Consensus reached, reveal for worker 1. + await iexecPoco + .connect(worker1) + .reveal(taskId, resultDigest) + .then((tx) => tx.wait()); + const task = await iexecPoco.viewTask(taskId); + // Time travel beyond reveal deadline but before final deadline. + await setNextBlockTimestamp(task.revealDeadline).then(() => mine()); + const latestBlockTimestamp = await time.latest(); + expect(task.status).to.equal(TaskStatusEnum.REVEALING); // require 1 + expect(latestBlockTimestamp).to.be.lessThan(task.finalDeadline); // require 2 + expect(latestBlockTimestamp).to.be.greaterThanOrEqual(task.revealDeadline); // require 3.1 + expect(task.revealCounter).to.be.greaterThan(0); // require 3.2 <-- + await expect(iexecPoco.reopen(taskId)).to.revertedWithoutReason(); + }); + + /** + * Create orders with the provided trust, match deal, and initialize task. + * @param trust + */ + async function matchOrdersAndInitializeTask(trust: number) { + const orders = buildOrders({ + assets: ordersAssets, + prices: ordersPrices, + requester: requester.address, + trust, + }); + ({ dealId, taskId, taskIndex } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + )); + await iexecPoco.initialize(dealId, taskIndex).then((tx) => tx.wait()); + } + + /** + * Send contribution of the specified worker. + * @param worker + * @param resultDigest + */ + async function contribute(worker: SignerWithAddress, resultDigest: string) { + const emptyEnclaveAddress = AddressZero; + const emptyEnclaveSignature = '0x'; + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + await iexecWrapper.depositInIexecAccount(worker, workerTaskStake); + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ); + await iexecPoco + .connect(worker) + .contribute( + taskId, + resultHash, + resultSeal, + emptyEnclaveAddress, + emptyEnclaveSignature, + schedulerSignature, + ) + .then((tx) => tx.wait()); + } +}); diff --git a/test/byContract/IexecPoco/06_claim.js b/test/byContract/IexecPoco/06_claim.js deleted file mode 100644 index 923db5189..000000000 --- a/test/byContract/IexecPoco/06_claim.js +++ /dev/null @@ -1,386 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Poco', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder1 = null; - var workerpoolorder2 = null; - var requestorder = null; - - var deals = {} - var tasks = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: deposit * - ***************************************************************************/ - it("[Setup] deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - break; - - case "Token": - await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - break; - } - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); - }); - - /*************************************************************************** - * TEST: App creation (by appProvider) * - ***************************************************************************/ - it("[Setup]", async () => { - // Ressources - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - - // Orders - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder_offset = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 15, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 10, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 4, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - - // Market - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder_offset, requestorder, { from: user.address }); - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder)); - }); - - it("[setup] Initialization", async () => { - tasks[1] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[1] }, { t: 'uint256', v: 1 }); // uninitialized - tasks[2] = tools.extractEvents(await IexecInstance.initialize(deals[1], 2, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // initialized - tasks[3] = tools.extractEvents(await IexecInstance.initialize(deals[1], 3, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // contributions - tasks[4] = tools.extractEvents(await IexecInstance.initialize(deals[1], 4, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // consensus - tasks[5] = tools.extractEvents(await IexecInstance.initialize(deals[1], 5, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // reveal - tasks[6] = tools.extractEvents(await IexecInstance.initialize(deals[1], 6, { from: scheduler.address }), IexecInstance.address, "TaskInitialize")[0].args.taskid; // finalized - });66 - - function sendContribution(taskid, worker, results, authorization, enclave) - { - return IexecInstance.contribute( - taskid, // task (authorization) - results.hash, // common (result) - results.seal, // unique (result) - enclave, // address (enclave) - results.sign ? results.sign : constants.NULL.SIGNATURE, // signature (enclave) - authorization.sign, // signature (authorization) - { from: worker.address } - ); - } - - it("[setup] Contribute", async () => { - await sendContribution( - tasks[3], - worker1, - odbtools.utils.sealResult(tasks[3], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[3], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[4], - worker1, - odbtools.utils.sealResult(tasks[4], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[4], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[4], - worker2, - odbtools.utils.sealResult(tasks[4], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[4], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[5], - worker1, - odbtools.utils.sealResult(tasks[5], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[5], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[5], - worker2, - odbtools.utils.sealResult(tasks[5], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[5], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[6], - worker1, - odbtools.utils.sealResult(tasks[6], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[6], - worker2, - odbtools.utils.sealResult(tasks[6], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - }); - - it("[setup] Reveal", async () => { - await IexecInstance.reveal(tasks[5], odbtools.utils.hashResult(tasks[5], "true").digest, { from: worker1.address }); - await IexecInstance.reveal(tasks[6], odbtools.utils.hashResult(tasks[6], "true").digest, { from: worker1.address }); - await IexecInstance.reveal(tasks[6], odbtools.utils.hashResult(tasks[6], "true").digest, { from: worker2.address }); - }); - it("[setup] Finalize", async () => { - await IexecInstance.finalize(tasks[6], web3.utils.utf8ToHex("aResult 6"), "0x", { from: scheduler.address }); - }); - - - it("[6.1a] Claim - Error (soon #1)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[1], { from: user.address })); - }); - it("[6.2a] Claim - Error (soon #2)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[2], { from: user.address })); - }); - it("[6.3a] Claim - Error (soon #3)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[3], { from: user.address })); - }); - it("[6.4a] Claim - Error (soon #4)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[4], { from: user.address })); - }); - it("[6.5a] Claim - Error (soon #5)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[5], { from: user.address })); - }); - it("[6.6a] Claim - Error (soon & finalized)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[6], { from: user.address })); - }); - - it("clock fast forward", async () => { - target = Number((await IexecInstance.viewTask(tasks[2])).finalDeadline); - - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_increaseTime", params: [ target - (await web3.eth.getBlock("latest")).timestamp ], id: 0 }, () => {}); - // workaround for https://github.com/trufflesuite/ganache/issues/1033 - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_mine", params: [ ], id: 0 }, () => {}); - }); - - it("[6.1b] Claim - Correct (#1)", async () => { - // needs late Initialization by the user - await IexecInstance.initialize(deals[1], 1, { from: user.address }); - txMined = await IexecInstance.claim(tasks[1], { from: user.address }); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskClaimed"); - assert.equal(events[0].args.taskid, tasks[1], "check taskid"); - }); - it("[6.2b] Claim - Correct (#2)", async () => { - txMined = await IexecInstance.claim(tasks[2], { from: user.address }); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskClaimed"); - assert.equal(events[0].args.taskid, tasks[2], "check taskid"); - }); - it("[6.3b] Claim - Correct (#3)", async () => { - txMined = await IexecInstance.claim(tasks[3], { from: user.address }); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskClaimed"); - assert.equal(events[0].args.taskid, tasks[3], "check taskid"); - }); - it("[6.4b] Claim - Correct (#4)", async () => { - txMined = await IexecInstance.claim(tasks[4], { from: user.address }); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskClaimed"); - assert.equal(events[0].args.taskid, tasks[4], "check taskid"); - }); - it("[6.5b] Claim - Correct (#5)", async () => { - txMined = await IexecInstance.claim(tasks[5], { from: user.address }); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskClaimed"); - assert.equal(events[0].args.taskid, tasks[5], "check taskid"); - }); - it("[6.6b] Claim - Error (finalized #7)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[6], { from: user.address })); - }); - -}); diff --git a/test/byContract/IexecPoco/06_claim.test.ts b/test/byContract/IexecPoco/06_claim.test.ts new file mode 100644 index 000000000..707dcb7fe --- /dev/null +++ b/test/byContract/IexecPoco/06_claim.test.ts @@ -0,0 +1,424 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { loadFixture, mine, time } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { IexecInterfaceNative, IexecInterfaceNative__factory } from '../../../typechain'; +import { OrdersAssets, OrdersPrices, buildOrders } from '../../../utils/createOrders'; +import { + TaskStatusEnum, + buildAndSignContributionAuthorizationMessage, + buildResultHashAndResultSeal, + buildUtf8ResultAndDigest, + getIexecAccounts, + getTaskId, +} from '../../../utils/poco-tools'; +import { IexecWrapper } from '../../utils/IexecWrapper'; +import constants from './../../../utils/constants'; + +const categoryTime = 300; +const maxDealDuration = 10 * categoryTime; +const { results, resultDigest } = buildUtf8ResultAndDigest('result'); +const appPrice = 1000; +const datasetPrice = 1_000_000; +const workerpoolPrice = 1_000_000_000; +const taskPrice = appPrice + datasetPrice + workerpoolPrice; +const enclaveAddress = ethers.constants.AddressZero; + +describe('IexecPoco2#claim', async () => { + let proxyAddress: string; + let iexecPoco: IexecInterfaceNative; + let iexecPocoAsAnyone: IexecInterfaceNative; + let iexecWrapper: IexecWrapper; + let [appAddress, datasetAddress, workerpoolAddress]: string[] = []; + let [iexecAdmin, requester, sponsor, scheduler, worker1, worker2, anyone]: SignerWithAddress[] = + []; + let ordersAssets: OrdersAssets; + let ordersPrices: OrdersPrices; + + beforeEach('Deploy', async () => { + // Deploy all contracts + proxyAddress = await loadHardhatFixtureDeployment(); + // Initialize test environment + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ iexecAdmin, requester, sponsor, scheduler, worker1, worker2, anyone } = accounts); + iexecWrapper = new IexecWrapper(proxyAddress, accounts); + ({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets()); + await iexecWrapper.setTeeBroker('0x0000000000000000000000000000000000000000'); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, iexecAdmin); + iexecPocoAsAnyone = iexecPoco.connect(anyone); + ordersAssets = { + app: appAddress, + dataset: datasetAddress, + workerpool: workerpoolAddress, + }; + ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, + }; + } + + /** + * Generic claim test (longest code path) where it should claim a revealing + * task after deadline. The task comes from a deal payed by a sponsor. + */ + it('Should claim task of deal payed by sponsor', async () => { + const expectedVolume = 3; // > 1 to explicit taskPrice vs dealPrice + const claimedTasks = 1; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume: expectedVolume, + trust: 4, // Consensus is reachable with 2 fresh workers + }); + const { dealId, taskId, taskIndex, dealPrice, startTime } = + await iexecWrapper.signAndSponsorMatchOrders(...orders.toArray()); + const schedulerDealStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + expectedVolume, + ); + const schedulerTaskStake = schedulerDealStake / expectedVolume; + const kittyAddress = await iexecPoco.kitty_address(); + await iexecPocoAsAnyone.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + const workers = [worker1, worker2]; + for (const worker of workers) { + const { resultHash, resultSeal } = buildResultHashAndResultSeal( + taskId, + resultDigest, + worker, + ); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclaveAddress, + scheduler, + ); + await iexecWrapper.depositInIexecAccount(worker, workerTaskStake); + await iexecPoco + .connect(worker) + .contribute( + taskId, + resultHash, + resultSeal, + ethers.constants.AddressZero, + '0x', + schedulerSignature, + ) + .then((tx) => tx.wait()); + } + expect(await iexecPoco.balanceOf(iexecPoco.address)).to.be.equal( + dealPrice + schedulerDealStake + workerTaskStake * workers.length, + ); + expect(await iexecPoco.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecPoco.frozenOf(requester.address)).to.be.equal(0); + expect(await iexecPoco.balanceOf(sponsor.address)).to.be.equal(0); + expect(await iexecPoco.frozenOf(sponsor.address)).to.be.equal(dealPrice); + expect(await iexecPoco.balanceOf(scheduler.address)).to.be.equal(0); + expect(await iexecPoco.frozenOf(scheduler.address)).to.be.equal(schedulerDealStake); + for (const worker of workers) { + expect(await iexecPoco.balanceOf(worker.address)).to.be.equal(0); + expect(await iexecPoco.frozenOf(worker.address)).to.be.equal(workerTaskStake); + } + expect(await iexecPoco.balanceOf(kittyAddress)).to.be.equal(0); + expect(await iexecPoco.frozenOf(kittyAddress)).to.be.equal(0); + expect((await iexecPoco.viewTask(taskId)).status).to.equal(TaskStatusEnum.REVEALING); + await time.setNextBlockTimestamp(startTime + maxDealDuration); + + const claimTx = await iexecPocoAsAnyone.claim(taskId); + await claimTx.wait(); + await expect(claimTx) + .to.emit(iexecPoco, 'Transfer') + .withArgs(iexecPoco.address, sponsor.address, taskPrice) + .to.emit(iexecPoco, 'Unlock') + .withArgs(sponsor.address, taskPrice) + .to.emit(iexecPoco, 'Seize') + .withArgs(scheduler.address, schedulerTaskStake, taskId) + .to.emit(iexecPoco, 'Transfer') + .withArgs(iexecPoco.address, kittyAddress, schedulerTaskStake) + .to.emit(iexecPoco, 'Reward') + .withArgs(kittyAddress, schedulerTaskStake, taskId) + .to.emit(iexecPoco, 'Transfer') + .withArgs(kittyAddress, iexecPoco.address, schedulerTaskStake) + .to.emit(iexecPoco, 'Lock') + .withArgs(kittyAddress, schedulerTaskStake); + for (const worker of workers) { + await expect(claimTx) + .to.emit(iexecPoco, 'Transfer') + .withArgs(iexecPoco.address, worker.address, workerTaskStake) + .to.emit(iexecPoco, 'Unlock') + .withArgs(worker.address, workerTaskStake); + } + await expect(claimTx).to.emit(iexecPoco, 'TaskClaimed').withArgs(taskId); + + expect((await iexecPoco.viewTask(taskId)).status).to.equal(TaskStatusEnum.FAILED); + const remainingTasksToClaim = expectedVolume - claimedTasks; + expect(await iexecPoco.balanceOf(iexecPoco.address)).to.be.equal( + taskPrice * remainingTasksToClaim + // sponsor has 2nd & 3rd task locked + schedulerDealStake, // kitty value since 1st task seized + ); + // 2nd & 3rd tasks can still be claimed. + expect(await iexecPoco.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecPoco.frozenOf(requester.address)).to.be.equal(0); + expect(await iexecPoco.balanceOf(sponsor.address)).to.be.equal(taskPrice * claimedTasks); + expect(await iexecPoco.frozenOf(sponsor.address)).to.be.equal( + taskPrice * remainingTasksToClaim, + ); + expect(await iexecPoco.balanceOf(scheduler.address)).to.be.equal(0); + expect(await iexecPoco.frozenOf(scheduler.address)).to.be.equal( + schedulerTaskStake * remainingTasksToClaim, + ); + for (const worker of workers) { + expect(await iexecPoco.balanceOf(worker.address)).to.be.equal(workerTaskStake); + expect(await iexecPoco.frozenOf(worker.address)).to.be.equal(0); + } + expect(await iexecPoco.balanceOf(kittyAddress)).to.be.equal(0); + expect(await iexecPoco.frozenOf(kittyAddress)).to.be.equal( + schedulerTaskStake * claimedTasks, + ); + // And should not claim twice + await expect(iexecPocoAsAnyone.claim(taskId)).to.be.revertedWithoutReason(); + }); + + it('Should claim task of deal payed by requester', async () => { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + }); + const { dealId, taskId, taskIndex, dealPrice, startTime } = + await iexecWrapper.signAndMatchOrders(...orders.toArray()); + await iexecPocoAsAnyone.initialize(dealId, taskIndex).then((tx) => tx.wait()); + expect(await iexecPoco.balanceOf(requester.address)).to.be.equal(0); + expect(await iexecPoco.frozenOf(requester.address)).to.be.equal(dealPrice); + expect(await iexecPoco.balanceOf(sponsor.address)).to.be.equal(0); + expect(await iexecPoco.frozenOf(sponsor.address)).to.be.equal(0); + await time.setNextBlockTimestamp(startTime + maxDealDuration); + + await expect(iexecPocoAsAnyone.claim(taskId)) + .to.emit(iexecPoco, 'Transfer') + .withArgs(iexecPoco.address, requester.address, taskPrice) + .to.emit(iexecPoco, 'Unlock') + .withArgs(requester.address, taskPrice) + .to.emit(iexecPoco, 'TaskClaimed'); + expect(await iexecPoco.balanceOf(requester.address)).to.be.equal(dealPrice); + expect(await iexecPoco.frozenOf(requester.address)).to.be.equal(0); + expect(await iexecPoco.balanceOf(sponsor.address)).to.be.equal(0); + expect(await iexecPoco.frozenOf(sponsor.address)).to.be.equal(0); + }); + + it('Should claim active task after deadline', async () => { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + }); + const { dealId, taskId, taskIndex, startTime } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + ); + await iexecPocoAsAnyone.initialize(dealId, taskIndex).then((tx) => tx.wait()); + expect((await iexecPoco.viewTask(taskId)).status).to.equal(TaskStatusEnum.ACTIVE); + await time.setNextBlockTimestamp(startTime + maxDealDuration); + + await expect(iexecPocoAsAnyone.claim(taskId)).to.emit(iexecPoco, 'TaskClaimed'); + }); + + it('Should not claim unset task', async () => { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + }); + const { taskId } = await iexecWrapper.signAndMatchOrders(...orders.toArray()); + expect((await iexecPoco.viewTask(taskId)).status).to.equal(TaskStatusEnum.UNSET); + + await expect(iexecPocoAsAnyone.claim(taskId)).to.be.revertedWithoutReason(); + }); + + it('Should not claim completed task', async () => { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + trust: 0, + }); + const { dealId, taskId, taskIndex } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + ); + await iexecPocoAsAnyone.initialize(dealId, taskIndex).then((tx) => tx.wait()); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker1.address, + taskId, + enclaveAddress, + scheduler, + ); + const workerTaskStake = await iexecPoco + .viewDeal(dealId) + .then((deal) => deal.workerStake.toNumber()); + await iexecWrapper.depositInIexecAccount(worker1, workerTaskStake); + await iexecPoco + .connect(worker1) + .contributeAndFinalize( + taskId, + resultDigest, + results, + '0x', + enclaveAddress, + constants.NULL.SIGNATURE, + schedulerSignature, + ) + .then((tx) => tx.wait()); + expect((await iexecPoco.viewTask(taskId)).status).to.equal(TaskStatusEnum.COMPLETED); + + await expect(iexecPocoAsAnyone.claim(taskId)).to.be.revertedWithoutReason(); + }); + + it('Should not claim before deadline', async () => { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + }); + const { dealId, taskId, taskIndex } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + ); + await iexecPocoAsAnyone.initialize(dealId, taskIndex).then((tx) => tx.wait()); + // No time traveling after deadline + + await expect(iexecPocoAsAnyone.claim(taskId)).to.be.revertedWithoutReason(); + }); + + describe('Claim array', () => { + it('Should claim array', async () => { + const volume = 3; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + }); + const { dealId, startTime } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + ); + const taskIds = []; + for (let taskIndex = 0; taskIndex < volume; taskIndex++) { + taskIds.push(getTaskId(dealId, taskIndex)); + await iexecPocoAsAnyone.initialize(dealId, taskIndex).then((tx) => tx.wait()); + } + await time.setNextBlockTimestamp(startTime + maxDealDuration); + // Mine empty block so timestamp is accurate when static call is made + await mine(); + + expect(await iexecPocoAsAnyone.callStatic.claimArray(taskIds)).to.be.true; + const claimArrayTx = await iexecPocoAsAnyone.claimArray(taskIds); + await claimArrayTx.wait(); + for (let taskId of taskIds) { + await expect(claimArrayTx).to.emit(iexecPoco, 'TaskClaimed').withArgs(taskId); + } + }); + + it('Should not claim array when one is not claimable', async () => { + const volume = 2; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + }); + const { dealId, startTime } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + ); + const taskIndex1 = 0; + const taskIndex2 = 1; + const taskId1 = getTaskId(dealId, taskIndex1); + const taskId2 = getTaskId(dealId, taskIndex2); + // Initialize only 1 task. + await iexecPocoAsAnyone.initialize(dealId, taskIndex1).then((tx) => tx.wait()); + await time.setNextBlockTimestamp(startTime + maxDealDuration); + + // Check first task is claimable and second task is not claimable + await expect(iexecPoco.estimateGas.claim(taskId1)).to.not.be.revertedWithoutReason(); + await expect(iexecPoco.estimateGas.claim(taskId2)).to.be.revertedWithoutReason(); + // Claim array will fail + await expect(iexecPoco.claimArray([taskId1, taskId2])).to.be.revertedWithoutReason(); + }); + + describe('Initialize and claim array', () => { + it('Should initialize and claim array', async () => { + const volume = 3; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + }); + const { dealId, startTime } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + ); + const dealIds = [dealId, dealId, dealId]; + const taskIndexes = [0, 1, 2]; + await time.setNextBlockTimestamp(startTime + maxDealDuration).then(() => mine()); + + expect( + await iexecPoco + .connect(anyone) + .callStatic.initializeAndClaimArray(dealIds, taskIndexes), + ).to.be.true; + const initializeAndClaimArrayTx = await iexecPoco + .connect(anyone) + .initializeAndClaimArray(dealIds, taskIndexes); + await initializeAndClaimArrayTx.wait(); + for (const taskIndex of taskIndexes) { + const taskId = getTaskId(dealId, taskIndex); + await expect(initializeAndClaimArrayTx) + .to.emit(iexecPoco, 'TaskInitialize') + .withArgs(taskId, orders.workerpool.workerpool) + .to.emit(iexecPoco, 'TaskClaimed') + .withArgs(taskId); + } + }); + + it('Should not initialize and claim array if incompatible length of inputs', async () => { + const dealId = ethers.utils.hashMessage('dealId'); + await expect( + iexecPoco.initializeAndClaimArray([dealId, dealId], [0]), + ).to.be.revertedWithoutReason(); + }); + + it('Should not initialize and claim array if one specific fails', async () => { + const volume = 2; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume, + }); + const { dealId, startTime } = await iexecWrapper.signAndMatchOrders( + ...orders.toArray(), + ); + const taskIndex0 = 0; + const taskIndex1 = 1; + await iexecPoco // Make first task already initialized + .connect(scheduler) + .initialize(dealId, taskIndex0) + .then((tx) => tx.wait()); + await time.setNextBlockTimestamp(startTime + maxDealDuration); + + // Will fail since first task is already initialized + await expect( + iexecPoco.initializeAndClaimArray([dealId, dealId], [taskIndex0, taskIndex1]), + ).to.be.revertedWithoutReason(); + }); + }); + }); +}); diff --git a/test/byContract/IexecPoco/07_array.js b/test/byContract/IexecPoco/07_array.js deleted file mode 100644 index bea17d80e..000000000 --- a/test/byContract/IexecPoco/07_array.js +++ /dev/null @@ -1,401 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Poco', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder1 = null; - var workerpoolorder2 = null; - var requestorder = null; - - var deals = {} - var tasks = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: deposit * - ***************************************************************************/ - it("[Setup] deposit", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - break; - - case "Token": - await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - break; - } - await IexecInstance.transfer(scheduler.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 1000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 1000, { from: iexecAdmin.address }); - }); - - /*************************************************************************** - * TEST: App creation (by appProvider) * - ***************************************************************************/ - it("[Setup]", async () => { - // Ressources - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - - // Orders - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder_offset = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 15, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 10, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 10, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 4, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - - // Market - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder_offset, requestorder, { from: user.address }); - await IexecInstance.matchOrders(apporder, datasetorder, workerpoolorder, requestorder, { from: user.address }); - - deals = await odbtools.utils.requestToDeal(IexecInstance, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder)); - }); - - it("[setup] Initialization", async () => { - txMined = await IexecInstance.initializeArray( - [ /*deals[1],*/ deals[1], deals[1], deals[1], deals[1], deals[1], ], - [ /*1, */ 2, 3, 4, 5, 6, ], - { from: scheduler.address } - ); - - tasks[1] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[1] }, { t: 'uint256', v: 1 }); // uninitialized - tasks[2] = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize")[0].args.taskid; // initialized - tasks[3] = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize")[1].args.taskid; // contributions - tasks[4] = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize")[2].args.taskid; // consensus - tasks[5] = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize")[3].args.taskid; // reveal - tasks[6] = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize")[4].args.taskid; // finalized - tasks[7] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[1] }, { t: 'uint256', v: 7 }); // uninitialized - tasks[8] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[1] }, { t: 'uint256', v: 8 }); // uninitialized - tasks[9] = web3.utils.soliditySha3({ t: 'bytes32', v: deals[1] }, { t: 'uint256', v: 9 }); // uninitialized - }); - - function sendContribution(taskid, worker, results, authorization, enclave) - { - return IexecInstance.contribute( - taskid, // task (authorization) - results.hash, // common (result) - results.seal, // unique (result) - enclave, // address (enclave) - results.sign ? results.sign : constants.NULL.SIGNATURE, // signature (enclave) - authorization.sign, // signature (authorization) - { from: worker.address } - ); - } - - it("[setup] Contribute", async () => { - await sendContribution( - tasks[3], - worker1, - odbtools.utils.sealResult(tasks[3], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[3], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[4], - worker1, - odbtools.utils.sealResult(tasks[4], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[4], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[4], - worker2, - odbtools.utils.sealResult(tasks[4], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[4], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[5], - worker1, - odbtools.utils.sealResult(tasks[5], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[5], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[5], - worker2, - odbtools.utils.sealResult(tasks[5], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[5], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - - await sendContribution( - tasks[6], - worker1, - odbtools.utils.sealResult(tasks[6], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - await sendContribution( - tasks[6], - worker2, - odbtools.utils.sealResult(tasks[6], "true", worker2.address), - await odbtools.utils.signAuthorization({ worker: worker2.address, taskid: tasks[6], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - }); - - it("[setup] Reveal", async () => { - await IexecInstance.reveal(tasks[5], odbtools.utils.hashResult(tasks[5], "true").digest, { from: worker1.address }); - await IexecInstance.reveal(tasks[6], odbtools.utils.hashResult(tasks[6], "true").digest, { from: worker1.address }); - await IexecInstance.reveal(tasks[6], odbtools.utils.hashResult(tasks[6], "true").digest, { from: worker2.address }); - }); - it("[setup] Finalize", async () => { - await IexecInstance.finalize(tasks[6], web3.utils.utf8ToHex("aResult 6"), "0x", { from: scheduler.address }); - }); - - - it("[7.1a] Claim - Error (soon #1)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[1], { from: user.address })); - }); - it("[7.2a] Claim - Error (soon #2)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[2], { from: user.address })); - }); - it("[7.3a] Claim - Error (soon #3)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[3], { from: user.address })); - }); - it("[7.4a] Claim - Error (soon #4)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[4], { from: user.address })); - }); - it("[7.5a] Claim - Error (soon #5)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[5], { from: user.address })); - }); - it("[7.6a] Claim - Error (soon & finalized)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[6], { from: user.address })); - }); - it("[7.7a] Claim - Error (soon #6)", async () => { - await expectRevert.unspecified(IexecInstance.initializeAndClaimArray( - [ deals[1], deals[1], deals[1] ], - [ 7, 8, 9 ], - { from: user.address } - )); - }); - - it("clock fast forward", async () => { - target = Number((await IexecInstance.viewTask(tasks[2])).finalDeadline); - - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_increaseTime", params: [ target - (await web3.eth.getBlock("latest")).timestamp ], id: 0 }, () => {}); - // workaround for https://github.com/trufflesuite/ganache/issues/1033 - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_mine", params: [ ], id: 0 }, () => {}); - }); - - it("[7.1b] Claim - Correct", async () => { - // needs late Initialization by the user - await IexecInstance.initializeArray( - [ deals[1] ], - [ 1 ], - { from: user.address } - ); - // claim - txMined = await IexecInstance.claimArray( - [ tasks[1], tasks[2], tasks[3], tasks[4], tasks[5] ], - { from: user.address } - ); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskClaimed"); - assert.equal(events[0].args.taskid, tasks[1], "check taskid"); - assert.equal(events[1].args.taskid, tasks[2], "check taskid"); - assert.equal(events[2].args.taskid, tasks[3], "check taskid"); - assert.equal(events[3].args.taskid, tasks[4], "check taskid"); - assert.equal(events[4].args.taskid, tasks[5], "check taskid"); - }); - - it("[7.6b] Claim - Error (finalized #7)", async () => { - await expectRevert.unspecified(IexecInstance.claim(tasks[6], { from: user.address })); - }); - - it("[7.7a] Claim - Correct", async () => { - txMined = await IexecInstance.initializeAndClaimArray( - [ deals[1], deals[1], deals[1] ], - [ 7, 8, 9 ], - { from: user.address } - ); - events = tools.extractEvents(txMined, IexecInstance.address, "TaskClaimed"); - assert.equal(events[0].args.taskid, tasks[7], "check taskid"); - assert.equal(events[1].args.taskid, tasks[8], "check taskid"); - assert.equal(events[2].args.taskid, tasks[9], "check taskid"); - }); -}); diff --git a/test/byContract/IexecPoco/08_kitty.js b/test/byContract/IexecPoco/08_kitty.js index f20260122..0a3daa543 100644 --- a/test/byContract/IexecPoco/08_kitty.js +++ b/test/byContract/IexecPoco/08_kitty.js @@ -1,355 +1,424 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../../../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; +var DEPLOYMENT = require('../../../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); + +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../../../utils/tools'); +const enstools = require('../../../utils/ens-tools'); +const odbtools = require('../../../utils/odb-tools'); +const constants = require('../../../utils/constants'); + +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Poco', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; - - var apporder = null; - var datasetorder = null; - var workerpoolorder1 = null; - var workerpoolorder2 = null; - var requestorder = null; - - var deals = {} - var tasks = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - function sendContribution(taskid, worker, results, authorization, enclave) - { - return IexecInstance.contribute( - taskid, // task (authorization) - results.hash, // common (result) - results.seal, // unique (result) - enclave, // address (enclave) - results.sign ? results.sign : constants.NULL.SIGNATURE, // signature (enclave) - authorization.sign, // signature (authorization) - { from: worker.address } - ); - } - - describe("โ†’ setup", async () => { - describe("tokens", async () => { - it("distribute", async () => { - switch (DEPLOYMENT.asset) - { - case "Native": - txMined = await IexecInstance.deposit({ from: iexecAdmin.address, value: 10000000 * 10 ** 9 }); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - break; - - case "Token": - txMined = await RLCInstance.approveAndCall(IexecInstance.address, 10000000, "0x", { from: iexecAdmin.address }); - assert.isBelow(txMined.receipt.gasUsed, constants.AMOUNT_GAS_PROVIDED, "should not use all gas"); - break; - } - - await IexecInstance.transfer(scheduler.address, 100000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker1.address, 100000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker2.address, 100000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker3.address, 100000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker4.address, 100000, { from: iexecAdmin.address }); - await IexecInstance.transfer(worker5.address, 100000, { from: iexecAdmin.address }); - await IexecInstance.transfer(user.address, 100000, { from: iexecAdmin.address }); - }); - - it("balances", async () => { - assert.deepEqual(await appProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await datasetProvider.viewAccount(), [ 0, 0 ], "check balance"); - assert.deepEqual(await scheduler.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 100000, 0 ], "check balance"); - }) - }); - - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); - - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); - - it("change policy", async () => { - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - }); - }); - }); - - describe("orders", async () => { - it("app", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 0, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("workerpool", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 100, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 0, - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - - it("requester", async () => { - requestorder1 = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 0, - dataset: constants.NULL.ADDRESS, - datasetmaxprice: 0, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 100, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 0, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - requestorder2 = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 0, - dataset: constants.NULL.ADDRESS, - datasetmaxprice: 0, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 100, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 0, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - }); - }); - - describe("โ†’ fill Kitty", async () => { - it("[8.1a] match order", async () => { - txMined = await IexecInstance.matchOrders(apporder, constants.NULL.DATAORDER, workerpoolorder, requestorder1, { from: user.address }); - deals[0] = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice")[0].args.dealid; - }); - - it("[8.2a] initialize", async () => { - txMined = await IexecInstance.initialize(deals[0], 0, { from: user.address }); - tasks[0] = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize")[0].args.taskid; - }); - - it("wait", async () => { - target = Number((await IexecInstance.viewTask(tasks[0])).finalDeadline); - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_increaseTime", params: [ target - (await web3.eth.getBlock("latest")).timestamp ], id: 0 }, () => {}); - // workaround for https://github.com/trufflesuite/ganache/issues/1033 - await web3.currentProvider.send({ jsonrpc: "2.0", method: "evm_mine", params: [ ], id: 0 }, () => {}); - }); - - it("[8.3a] claim", async () => { - await IexecInstance.claim(tasks[0], { from: user.address }); - }); - - it("kitty balance", async () => { - kitty_address = await IexecInstance.kitty_address(); - kitty_content = await IexecInstance.frozenOf(kitty_address); - assert.equal(kitty_content, 30); - }); - - it("balances", async () => { - assert.deepEqual(await scheduler.viewAccount(), [ 99970, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 100000, 0 ], "check balance"); - }) - }); - - describe("โ†’ drain Kitty", async () => { - it("[8.1b] match order", async () => { - txMined = await IexecInstance.matchOrders(apporder, constants.NULL.DATAORDER, workerpoolorder, requestorder2, { from: user.address }); - deals[1] = tools.extractEvents(txMined, IexecInstance.address, "SchedulerNotice")[0].args.dealid; - }); - - it("[8.2b] initialize", async () => { - txMined = await IexecInstance.initialize(deals[1], 0, { from: user.address }); - tasks[1] = tools.extractEvents(txMined, IexecInstance.address, "TaskInitialize")[0].args.taskid; - }); - - it("[8.3b] contribute", async () => { - await sendContribution( - tasks[1], - worker1, - odbtools.utils.sealResult(tasks[1], "true", worker1.address), - await odbtools.utils.signAuthorization({ worker: worker1.address, taskid: tasks[1], enclave: constants.NULL.ADDRESS }, scheduler.wallet), - constants.NULL.ADDRESS - ); - }); - - it("[8.4b] reveal", async () => { - await IexecInstance.reveal(tasks[1], odbtools.utils.hashResult(tasks[1], "true").digest, { from: worker1.address }); - }); - - it("[8.5b] finalize", async () => { - await IexecInstance.finalize(tasks[1], web3.utils.utf8ToHex("result"), "0x", { from: scheduler.address }); - }); - - it("kitty balance", async () => { - kitty_address = await IexecInstance.kitty_address(); - assert.equal(await IexecInstance.frozenOf(kitty_address), 0); - }); - - it("balances", async () => { - assert.deepEqual(await scheduler.viewAccount(), [ 100005, 0 ], "check balance"); - assert.deepEqual(await worker1.viewAccount(), [ 100095, 0 ], "check balance"); - assert.deepEqual(await worker2.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker3.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker4.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await worker5.viewAccount(), [ 100000, 0 ], "check balance"); - assert.deepEqual(await user.viewAccount(), [ 99900, 0 ], "check balance"); - }) - }); + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; + + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; + + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; + + var apporder = null; + var datasetorder = null; + var workerpoolorder1 = null; + var workerpoolorder2 = null; + var requestorder = null; + + var deals = {}; + var tasks = {}; + + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); + + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); + + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + }); + + function sendContribution(taskid, worker, results, authorization, enclave) { + return IexecInstance.contribute( + taskid, // task (authorization) + results.hash, // common (result) + results.seal, // unique (result) + enclave, // address (enclave) + results.sign ? results.sign : constants.NULL.SIGNATURE, // signature (enclave) + authorization.sign, // signature (authorization) + { from: worker.address }, + ); + } + + describe('โ†’ setup', async () => { + describe('tokens', async () => { + it('distribute', async () => { + switch (DEPLOYMENT.asset) { + case 'Native': + txMined = await IexecInstance.deposit({ + from: iexecAdmin.address, + value: 10000000 * 10 ** 9, + }); + assert.isBelow( + txMined.receipt.gasUsed, + constants.AMOUNT_GAS_PROVIDED, + 'should not use all gas', + ); + break; + + case 'Token': + txMined = await RLCInstance.approveAndCall( + IexecInstance.address, + 10000000, + '0x', + { from: iexecAdmin.address }, + ); + assert.isBelow( + txMined.receipt.gasUsed, + constants.AMOUNT_GAS_PROVIDED, + 'should not use all gas', + ); + break; + } + + await IexecInstance.transfer(scheduler.address, 100000, { + from: iexecAdmin.address, + }); + await IexecInstance.transfer(worker1.address, 100000, { from: iexecAdmin.address }); + await IexecInstance.transfer(worker2.address, 100000, { from: iexecAdmin.address }); + await IexecInstance.transfer(worker3.address, 100000, { from: iexecAdmin.address }); + await IexecInstance.transfer(worker4.address, 100000, { from: iexecAdmin.address }); + await IexecInstance.transfer(worker5.address, 100000, { from: iexecAdmin.address }); + await IexecInstance.transfer(user.address, 100000, { from: iexecAdmin.address }); + }); + + it('balances', async () => { + assert.deepEqual(await appProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await datasetProvider.viewAccount(), [0, 0], 'check balance'); + assert.deepEqual(await scheduler.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [100000, 0], 'check balance'); + }); + }); + + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); + + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); + + it('change policy', async () => { + await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + }); + }); + }); + + describe('orders', async () => { + it('app', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 0, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('workerpool', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 100, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 0, + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + + it('requester', async () => { + requestorder1 = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 0, + dataset: constants.NULL.ADDRESS, + datasetmaxprice: 0, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 100, + volume: 1, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 0, + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + requestorder2 = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 0, + dataset: constants.NULL.ADDRESS, + datasetmaxprice: 0, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 100, + volume: 1, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 0, + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + }); + }); + + describe('โ†’ fill Kitty', async () => { + it('[8.1a] match order', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + constants.NULL.DATAORDER, + workerpoolorder, + requestorder1, + { from: user.address }, + ); + deals[0] = tools.extractEvents( + txMined, + IexecInstance.address, + 'SchedulerNotice', + )[0].args.dealid; + }); + + it('[8.2a] initialize', async () => { + txMined = await IexecInstance.initialize(deals[0], 0, { from: user.address }); + tasks[0] = tools.extractEvents( + txMined, + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; + }); + + it('wait', async () => { + target = Number((await IexecInstance.viewTask(tasks[0])).finalDeadline); + await web3.currentProvider.send( + { + jsonrpc: '2.0', + method: 'evm_increaseTime', + params: [target - (await web3.eth.getBlock('latest')).timestamp], + id: 0, + }, + () => {}, + ); + // workaround for https://github.com/trufflesuite/ganache/issues/1033 + await web3.currentProvider.send( + { jsonrpc: '2.0', method: 'evm_mine', params: [], id: 0 }, + () => {}, + ); + }); + + it('[8.3a] claim', async () => { + await IexecInstance.claim(tasks[0], { from: user.address }); + }); + + it('kitty balance', async () => { + kitty_address = await IexecInstance.kitty_address(); + kitty_content = await IexecInstance.frozenOf(kitty_address); + assert.equal(kitty_content, 30); + }); + + it('balances', async () => { + assert.deepEqual(await scheduler.viewAccount(), [99970, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [100000, 0], 'check balance'); + }); + }); + + describe('โ†’ drain Kitty', async () => { + it('[8.1b] match order', async () => { + txMined = await IexecInstance.matchOrders( + apporder, + constants.NULL.DATAORDER, + workerpoolorder, + requestorder2, + { from: user.address }, + ); + deals[1] = tools.extractEvents( + txMined, + IexecInstance.address, + 'SchedulerNotice', + )[0].args.dealid; + }); + + it('[8.2b] initialize', async () => { + txMined = await IexecInstance.initialize(deals[1], 0, { from: user.address }); + tasks[1] = tools.extractEvents( + txMined, + IexecInstance.address, + 'TaskInitialize', + )[0].args.taskid; + }); + + it('[8.3b] contribute', async () => { + await sendContribution( + tasks[1], + worker1, + odbtools.utils.sealResult(tasks[1], 'true', worker1.address), + await odbtools.utils.signAuthorization( + { worker: worker1.address, taskid: tasks[1], enclave: constants.NULL.ADDRESS }, + scheduler.wallet, + ), + constants.NULL.ADDRESS, + ); + }); + + it('[8.4b] reveal', async () => { + await IexecInstance.reveal( + tasks[1], + odbtools.utils.hashResult(tasks[1], 'true').digest, + { from: worker1.address }, + ); + }); + + it('[8.5b] finalize', async () => { + await IexecInstance.finalize(tasks[1], web3.utils.utf8ToHex('result'), '0x', { + from: scheduler.address, + }); + }); + + it('kitty balance', async () => { + kitty_address = await IexecInstance.kitty_address(); + assert.equal(await IexecInstance.frozenOf(kitty_address), 0); + }); + + it('balances', async () => { + assert.deepEqual(await scheduler.viewAccount(), [100005, 0], 'check balance'); + assert.deepEqual(await worker1.viewAccount(), [100095, 0], 'check balance'); + assert.deepEqual(await worker2.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker3.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker4.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await worker5.viewAccount(), [100000, 0], 'check balance'); + assert.deepEqual(await user.viewAccount(), [99900, 0], 'check balance'); + }); + }); }); diff --git a/test/byContract/IexecPoco/IexecPoco1.test.ts b/test/byContract/IexecPoco/IexecPoco1.test.ts new file mode 100644 index 000000000..889439bc0 --- /dev/null +++ b/test/byContract/IexecPoco/IexecPoco1.test.ts @@ -0,0 +1,929 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { AddressZero, HashZero } from '@ethersproject/constants'; +import { Contract } from '@ethersproject/contracts'; +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { + ERC1271Mock, + ERC1271Mock__factory, + IERC721__factory, + IexecInterfaceNative, + IexecInterfaceNative__factory, + IexecPocoAccessors__factory, + OwnableMock, + OwnableMock__factory, +} from '../../../typechain'; +import { IexecPoco1 } from '../../../typechain/contracts/modules/interfaces/IexecPoco1.v8.sol'; +import { IexecPoco1__factory } from '../../../typechain/factories/contracts/modules/interfaces/IexecPoco1.v8.sol'; +import { + IexecOrders, + OrdersActors, + OrdersAssets, + OrdersPrices, + buildOrders, + hashOrder, + signOrder, + signOrders, +} from '../../../utils/createOrders'; +import { getDealId, getIexecAccounts, setNextBlockTimestamp } from '../../../utils/poco-tools'; +import { compactSignature } from '../../../utils/tools'; +import { IexecWrapper } from '../../utils/IexecWrapper'; + +/* + * TODO add Standard tests. + */ + +const appPrice = 1000; +const datasetPrice = 1_000_000; +const workerpoolPrice = 1_000_000_000; +const standardDealTag = '0x0000000000000000000000000000000000000000000000000000000000000000'; +const teeDealTag = '0x0000000000000000000000000000000000000000000000000000000000000001'; +const volume = 1; +const botVolume = 321; +const someMessage = 'some-message'; +const someWallet = ethers.Wallet.createRandom(); + +/** + * Note: TEE is the default in tests. + */ + +describe('IexecPoco1', () => { + let proxyAddress: string; + let [iexecPoco, iexecPocoAsRequester]: IexecInterfaceNative[] = []; + let iexecPocoAsSponsor: IexecPoco1; // Sponsor function not available yet in IexecInterfaceNative. + let iexecPocoContract: Contract; + let iexecWrapper: IexecWrapper; + let [appAddress, datasetAddress, workerpoolAddress]: string[] = []; + let [ + requester, + sponsor, + beneficiary, + appProvider, + datasetProvider, + scheduler, + anyone, + ]: SignerWithAddress[] = []; + let ordersActors: OrdersActors; + let ordersAssets: OrdersAssets; + let ordersPrices: OrdersPrices; + let orders: IexecOrders; + let [randomAddress, randomSignature]: string[] = []; + let randomContract: OwnableMock; + let erc1271MockContract: ERC1271Mock; + + beforeEach('Deploy', async () => { + // Deploy all contracts + proxyAddress = await loadHardhatFixtureDeployment(); + // Initialize test environment + await loadFixture(initFixture); + }); + + async function initFixture() { + const accounts = await getIexecAccounts(); + ({ requester, sponsor, beneficiary, appProvider, datasetProvider, scheduler, anyone } = + accounts); + iexecWrapper = new IexecWrapper(proxyAddress, accounts); + ({ appAddress, datasetAddress, workerpoolAddress } = await iexecWrapper.createAssets()); + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + iexecPocoAsRequester = iexecPoco.connect(requester); + iexecPocoAsSponsor = IexecPoco1__factory.connect(proxyAddress, sponsor); + iexecPocoContract = iexecPoco as Contract; + ordersActors = { + appOwner: appProvider, + datasetOwner: datasetProvider, + workerpoolOwner: scheduler, + requester: requester, + }; + ordersAssets = { + app: appAddress, + dataset: datasetAddress, + workerpool: workerpoolAddress, + }; + ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, + }; + orders = buildOrders({ + assets: ordersAssets, + prices: ordersPrices, + requester: requester.address, + tag: teeDealTag, + volume: volume, + }); + const randomWallet = ethers.Wallet.createRandom(); + randomAddress = randomWallet.address; + randomSignature = await randomWallet.signMessage('random'); + randomContract = await new OwnableMock__factory() + .connect(anyone) + .deploy() + .then((contract) => contract.deployed()); + erc1271MockContract = await new ERC1271Mock__factory() + .connect(anyone) + .deploy() + .then((contract) => contract.deployed()); + } + + describe('Verify signature', () => { + ['verifySignature', 'verifyPresignatureOrSignature'].forEach((verifySignatureFunction) => { + it(`Should ${verifySignatureFunction} of smart contract`, async () => { + expect( + await iexecPocoContract[verifySignatureFunction]( + erc1271MockContract.address, + HashZero, // any is fine here + ethers.utils.id('valid-signature'), + ), + ).to.be.true; + }); + + it(`Should fail to ${verifySignatureFunction} of smart contract when validation returns false`, async () => { + expect( + await iexecPocoContract[verifySignatureFunction]( + erc1271MockContract.address, + HashZero, // any is fine here + ethers.utils.id('invalid-signature'), + ), + ).to.be.false; + }); + + it(`Should fail to ${verifySignatureFunction} of smart contract when validation reverts`, async () => { + expect( + await iexecPocoContract[verifySignatureFunction]( + erc1271MockContract.address, + HashZero, // any is fine here + ethers.utils.id('reverting-signature'), + ), + ).to.be.false; + }); + + it(`Should ${verifySignatureFunction} of EoA`, async () => { + expect( + await iexecPocoContract[verifySignatureFunction]( + someWallet.address, + ethers.utils.hashMessage(someMessage), + someWallet.signMessage(someMessage), + ), + ).to.be.true; + }); + + it(`Should ${verifySignatureFunction} of EoA when compact signature`, async () => { + const compactEoaSignature = compactSignature( + await someWallet.signMessage(someMessage), + ); + expect(ethers.utils.arrayify(compactEoaSignature).length).equal(64); + expect( + await iexecPocoContract[verifySignatureFunction]( + someWallet.address, + ethers.utils.hashMessage(someMessage), + compactEoaSignature, + ), + ).to.be.true; + }); + + it(`Should fail to ${verifySignatureFunction} of EoA when invalid format`, async () => { + await expect( + iexecPocoContract[verifySignatureFunction]( + someWallet.address, + ethers.utils.hashMessage(someMessage), + '0x01', // bad signature format + ), + ).to.be.revertedWith('invalid-signature-format'); + }); + + it(`Should fail to ${verifySignatureFunction} of EoA when bad signer`, async () => { + expect( + await iexecPocoContract[verifySignatureFunction]( + someWallet.address, // some EOA + ethers.utils.hashMessage(someMessage), + ethers.Wallet.createRandom() // signature from another EOA + .signMessage(someMessage), + ), + ).to.be.false; + }); + }); + }); + // TODO + describe('Verify presignature', () => {}); + describe('Verify presignature or signature', () => {}); + + describe('Match orders', () => { + it('Should match orders with: all assets, beneficiary, BoT, callback, replication', async () => { + const trust = 3; + const category = 2; + const params = ''; + // Use orders with full configuration. + const fullConfigOrders = buildOrders({ + assets: ordersAssets, + prices: ordersPrices, + requester: requester.address, + beneficiary: beneficiary.address, + tag: teeDealTag, + volume: botVolume, + callback: randomAddress, + trust: trust, + category: category, + params: params, + }); + // Compute prices, stakes, rewards, ... + const dealPrice = + (appPrice + datasetPrice + workerpoolPrice) * // task price + botVolume; + const schedulerStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + botVolume, + ); + const workerStakePerTask = await iexecWrapper.computeWorkerTaskStake( + workerpoolAddress, + workerpoolPrice, + ); + const schedulerRewardByTask = + await iexecWrapper.getSchedulerTaskRewardRatio(workerpoolAddress); + // Deposit required amounts. + await iexecWrapper.depositInIexecAccount(requester, dealPrice); + await iexecWrapper.depositInIexecAccount(scheduler, schedulerStake); + // Save frozen balances before match. + const requesterFrozenBefore = (await iexecPoco.frozenOf(requester.address)).toNumber(); + const schedulerFrozenBefore = (await iexecPoco.frozenOf(scheduler.address)).toNumber(); + // Sign and match orders. + const startTime = await setNextBlockTimestamp(); + await signOrders(iexecWrapper.getDomain(), fullConfigOrders, ordersActors); + const { appOrderHash, datasetOrderHash, workerpoolOrderHash, requestOrderHash } = + iexecWrapper.hashOrders(fullConfigOrders); + const dealId = getDealId(iexecWrapper.getDomain(), fullConfigOrders.requester); + expect( + await IexecPocoAccessors__factory.connect(proxyAddress, anyone).computeDealVolume( + ...fullConfigOrders.toArray(), + ), + ).to.equal(botVolume); + + expect(await iexecPoco.callStatic.matchOrders(...fullConfigOrders.toArray())).to.equal( + dealId, + ); + const tx = iexecPocoAsRequester.matchOrders(...fullConfigOrders.toArray()); + // Check balances and frozen. + await expect(tx).to.changeTokenBalances( + iexecPoco, + [iexecPoco, requester, scheduler], + [dealPrice + schedulerStake, -dealPrice, -schedulerStake], + ); + // TODO use predicate `(change) => boolean` when migrating to a recent version of Hardhat. + // See https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-chai-matchers/src/internal/changeTokenBalance.ts#L42 + expect(await iexecPoco.frozenOf(requester.address)).to.equal( + requesterFrozenBefore + dealPrice, + ); + expect(await iexecPoco.frozenOf(scheduler.address)).to.equal( + schedulerFrozenBefore + schedulerStake, + ); + // Check events. + await expect(tx) + .to.emit(iexecPoco, 'SchedulerNotice') + .withArgs(workerpoolAddress, dealId) + .to.emit(iexecPoco, 'OrdersMatched') + .withArgs( + dealId, + appOrderHash, + datasetOrderHash, + workerpoolOrderHash, + requestOrderHash, + botVolume, + ); + // Check deal + const deal = await iexecPoco.viewDeal(dealId); + expect(deal.app.pointer).to.equal(appAddress); + expect(deal.app.owner).to.equal(appProvider.address); + expect(deal.app.price).to.equal(appPrice); + expect(deal.dataset.pointer).to.equal(datasetAddress); + expect(deal.dataset.owner).to.equal(datasetProvider.address); + expect(deal.dataset.price).to.equal(datasetPrice); + expect(deal.workerpool.pointer).to.equal(workerpoolAddress); + expect(deal.workerpool.owner).to.equal(scheduler.address); + expect(deal.workerpool.price).to.equal(workerpoolPrice); + expect(deal.trust).to.equal(trust); + expect(deal.category).to.equal(category); + expect(deal.tag).to.equal(teeDealTag); + expect(deal.requester).to.equal(requester.address); + expect(deal.beneficiary).to.equal(beneficiary.address); + expect(deal.callback).to.equal(randomAddress); + expect(deal.params).to.equal(params); + expect(deal.startTime).to.equal(startTime); + expect(deal.botFirst).to.equal(0); + expect(deal.botSize).to.equal(botVolume); + expect(deal.workerStake).to.equal(workerStakePerTask); + expect(deal.schedulerRewardRatio).to.equal(schedulerRewardByTask); + expect(deal.sponsor).to.equal(requester.address); + }); + + it('[Standard] Should match orders with: all assets, beneficiary, BoT, callback, replication', async () => { + const trust = 3; + const category = 2; + const params = ''; + // Use orders with full configuration. + const standardOrders = buildOrders({ + assets: ordersAssets, + prices: ordersPrices, + requester: requester.address, + beneficiary: beneficiary.address, + tag: standardDealTag, + volume: botVolume, + callback: randomAddress, + trust: trust, + category: category, + params: params, + }); + await depositForRequesterAndSchedulerWithDefaultPrices(botVolume); + // Sign and match orders. + const startTime = await setNextBlockTimestamp(); + await signOrders(iexecWrapper.getDomain(), standardOrders, ordersActors); + const dealId = getDealId(iexecWrapper.getDomain(), standardOrders.requester); + await expect(iexecPocoAsRequester.matchOrders(...standardOrders.toArray())).to.emit( + iexecPoco, + 'OrdersMatched', + ); + // Check deal + const deal = await iexecPoco.viewDeal(dealId); + expect(deal.app.pointer).to.equal(appAddress); + expect(deal.app.owner).to.equal(appProvider.address); + expect(deal.app.price).to.equal(appPrice); + expect(deal.dataset.pointer).to.equal(datasetAddress); + expect(deal.dataset.owner).to.equal(datasetProvider.address); + expect(deal.dataset.price).to.equal(datasetPrice); + expect(deal.workerpool.pointer).to.equal(workerpoolAddress); + expect(deal.workerpool.owner).to.equal(scheduler.address); + expect(deal.workerpool.price).to.equal(workerpoolPrice); + expect(deal.trust).to.equal(trust); + expect(deal.category).to.equal(category); + expect(deal.tag).to.equal(standardDealTag); + expect(deal.requester).to.equal(requester.address); + expect(deal.beneficiary).to.equal(beneficiary.address); + expect(deal.callback).to.equal(randomAddress); + expect(deal.params).to.equal(params); + expect(deal.startTime).to.equal(startTime); + expect(deal.botFirst).to.equal(0); + expect(deal.botSize).to.equal(botVolume); + expect(deal.workerStake).to.equal( + await iexecWrapper.computeWorkerTaskStake(workerpoolAddress, workerpoolPrice), + ); + expect(deal.schedulerRewardRatio).to.equal( + await iexecWrapper.getSchedulerTaskRewardRatio(workerpoolAddress), + ); + expect(deal.sponsor).to.equal(requester.address); + }); + + it('Should match orders without: beneficiary, BoT, callback, replication', async () => { + await depositForRequesterAndSchedulerWithDefaultPrices(volume); + // Sign and match orders. + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + const dealId = getDealId(iexecWrapper.getDomain(), orders.requester); + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.emit( + iexecPoco, + 'OrdersMatched', + ); + // Check deal + const deal = await iexecPoco.viewDeal(dealId); + expect(deal.beneficiary).to.equal(AddressZero); + expect(deal.botSize).to.equal(1); + expect(deal.callback).to.equal(AddressZero); + expect(deal.trust).to.equal(1); + }); + + it('Should match orders without: dataset', async () => { + orders.dataset.dataset = AddressZero; + orders.requester.dataset = AddressZero; + // Set dataset volume lower than other assets to make sure + // it does not impact final volume computation. + orders.dataset.volume = botVolume - 1; + orders.app.volume = botVolume; + orders.workerpool.volume = botVolume; + orders.requester.volume = botVolume; + // Compute prices, stakes, rewards, ... + const dealPrice = (appPrice + workerpoolPrice) * botVolume; // no dataset price + const schedulerStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + botVolume, + ); + // Deposit required amounts. + await iexecWrapper.depositInIexecAccount(requester, dealPrice); + await iexecWrapper.depositInIexecAccount(scheduler, schedulerStake); + // Save frozen balances before match. + const requesterFrozenBefore = (await iexecPoco.frozenOf(requester.address)).toNumber(); + // Sign and match orders. + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + const dealId = getDealId(iexecWrapper.getDomain(), orders.requester); + const tx = iexecPocoAsRequester.matchOrders(...orders.toArray()); + // Check balances and frozen. + // Dataset price shouldn't be included. + await expect(tx).to.changeTokenBalances( + iexecPoco, + [iexecPoco, requester, scheduler], + [dealPrice + schedulerStake, -dealPrice, -schedulerStake], + ); + expect(await iexecPoco.frozenOf(requester.address)).to.equal( + requesterFrozenBefore + dealPrice, + ); + // Check events. + await expect(tx).to.emit(iexecPoco, 'OrdersMatched'); + // Check deal + const deal = await iexecPoco.viewDeal(dealId); + expect(deal.dataset.pointer).to.equal(AddressZero); + expect(deal.dataset.owner).to.equal(AddressZero); + expect(deal.dataset.price).to.equal(0); + // BoT size should not be impacted even if the dataset order is the order with the lowest volume + expect(deal.botSize).to.equal(botVolume); + }); + + it(`Should match orders with full restrictions in all orders`, async () => { + orders.app.datasetrestrict = orders.dataset.dataset; + orders.app.workerpoolrestrict = orders.workerpool.workerpool; + orders.app.requesterrestrict = orders.requester.requester; + + orders.dataset.apprestrict = orders.app.app; + orders.dataset.workerpoolrestrict = orders.workerpool.workerpool; + orders.dataset.requesterrestrict = orders.requester.requester; + + orders.workerpool.apprestrict = orders.app.app; + orders.workerpool.datasetrestrict = orders.dataset.dataset; + orders.workerpool.requesterrestrict = orders.requester.requester; + + // requestOrder.workerpool is a restriction. + orders.requester.workerpool = orders.workerpool.workerpool; + + await depositForRequesterAndSchedulerWithDefaultPrices(volume); + // Sign and match orders. + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.emit( + iexecPoco, + 'OrdersMatched', + ); + }); + + /** + * Successful match orders with partial restrictions. + * Note: Workerpool is the only restriction in request order and it is + * tested elsewhere. + */ + ['app', 'dataset', 'workerpool'].forEach((orderName) => { + ['app', 'dataset', 'workerpool', 'requester'].forEach((assetName) => { + // Filter irrelevant cases (e.g. app - app). + if (orderName.includes(assetName)) { + return; + } + it(`Should match orders with ${assetName} restriction in ${orderName} order`, async () => { + // e.g. orders.app.datasetrestrict = orders.dataset.dataset + // @ts-ignore + orders[orderName][assetName + 'restrict'] = orders[assetName][assetName]; + await depositForRequesterAndSchedulerWithDefaultPrices(volume); + // Sign and match orders. + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.emit( + iexecPoco, + 'OrdersMatched', + ); + }); + }); + }); + + it(`Should match orders with any workerpool when request order has no workerpool restriction`, async () => { + orders.requester.workerpool = AddressZero; // No restriction. + await depositForRequesterAndSchedulerWithDefaultPrices(volume); + // Sign and match orders. + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.emit( + iexecPoco, + 'OrdersMatched', + ); + }); + + // TODO add success tests for: + // - identity groups + // - pre-signatures + // - low orders volumes + // - multiple matches of the same order + + it('Should fail when categories are different', async () => { + orders.requester.category = Number(orders.workerpool.category) + 1; // Valid but different category. + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x00', + ); + }); + + it('Should fail when category is unknown', async () => { + const lastCategoryIndex = (await iexecPoco.countCategory()).toNumber() - 1; + orders.requester.category = lastCategoryIndex + 1; + orders.workerpool.category = lastCategoryIndex + 1; + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x01', + ); + }); + + it('Should fail when requested trust is above workerpool trust', async () => { + orders.requester.trust = Number(orders.workerpool.trust) + 1; + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x02', + ); + }); + + it('Should fail when app max price is less than app price', async () => { + orders.requester.appmaxprice = Number(orders.app.appprice) - 1; + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x03', + ); + }); + + it('Should fail when dataset max price is less than dataset price', async () => { + orders.requester.datasetmaxprice = Number(orders.dataset.datasetprice) - 1; + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x04', + ); + }); + + it('Should fail when workerpool max price is less than workerpool price', async () => { + orders.requester.workerpoolmaxprice = Number(orders.workerpool.workerpoolprice) - 1; + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x05', + ); + }); + + it('Should fail when workerpool tag does not satisfy app, dataset and request requirements', async () => { + orders.app.tag = '0x0000000000000000000000000000000000000000000000000000000000000001'; // 0b0001 + orders.dataset.tag = + '0x0000000000000000000000000000000000000000000000000000000000000002'; // 0b0010 + orders.requester.tag = + '0x0000000000000000000000000000000000000000000000000000000000000003'; // 0b0011 + // Workerpool order is supposed to satisfy conditions of all actors. + // Bad tag, correct tag should be 0b0011. + orders.workerpool.tag = + '0x0000000000000000000000000000000000000000000000000000000000000004'; // 0b0100 + // Match orders. + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x06', + ); + }); + + it('Should fail when the last bit of app tag does not satisfy dataset or request requirements', async () => { + // The last bit of dataset and request tag is 1, but app tag does not set it + orders.app.tag = '0x0000000000000000000000000000000000000000000000000000000000000002'; // 0b0010 + orders.dataset.tag = + '0x0000000000000000000000000000000000000000000000000000000000000003'; // 0b0011 + orders.requester.tag = + '0x0000000000000000000000000000000000000000000000000000000000000003'; // 0b0011 + // Set the workerpool tag in a way to pass first tag check. + orders.workerpool.tag = + '0x0000000000000000000000000000000000000000000000000000000000000003'; // 0b0011 + // Match orders. + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x07', + ); + }); + + it('Should fail when apps are different', async () => { + orders.requester.app = randomAddress; + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x10', + ); + }); + + it('Should fail when datasets are different', async () => { + orders.requester.dataset = randomAddress; + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x11', + ); + }); + + it('Should fail when request order mismatches workerpool restriction (EOA, SC)', async () => { + orders.requester.workerpool = randomAddress; + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x12', + ); + orders.requester.workerpool = randomContract.address; + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x12', + ); + }); + + /** + * Failed match orders because of restriction mismatch (apprestrict, + * datasetrestrict, workerpoolrestrict, requesterrestrict). + * Note: Workerpool is the only restriction in request order and it is + * tested elsewhere. + */ + const revertMessages: { [key: string]: { [key: string]: string } } = { + app: { + dataset: 'iExecV5-matchOrders-0x13', + workerpool: 'iExecV5-matchOrders-0x14', + requester: 'iExecV5-matchOrders-0x15', + }, + dataset: { + app: 'iExecV5-matchOrders-0x16', + workerpool: 'iExecV5-matchOrders-0x17', + requester: 'iExecV5-matchOrders-0x18', + }, + workerpool: { + app: 'iExecV5-matchOrders-0x19', + dataset: 'iExecV5-matchOrders-0x1a', + requester: 'iExecV5-matchOrders-0x1b', + }, + }; + ['app', 'dataset', 'workerpool'].forEach((orderName) => { + ['app', 'dataset', 'workerpool', 'requester'].forEach((assetName) => { + // Filter irrelevant cases (e.g. app - app). + if (orderName.includes(assetName)) { + return; + } + it(`Should fail when ${orderName} order mismatches ${assetName} restriction (EOA, SC)`, async () => { + const message = revertMessages[orderName][assetName]; + // EOA + // @ts-ignore + orders[orderName][assetName + 'restrict'] = randomAddress; // e.g. orders.app.datasetrestrict = 0xEOA + await expect(iexecPoco.matchOrders(...orders.toArray())).to.be.revertedWith( + message, + ); + // SC + // @ts-ignore + orders[orderName][assetName + 'restrict'] = randomContract.address; // e.g. orders.app.datasetrestrict = 0xSC + await expect(iexecPoco.matchOrders(...orders.toArray())).to.be.revertedWith( + message, + ); + }); + }); + }); + + it('Should fail when app is not registered', async () => { + orders.app.app = randomContract.address; // Must be an Ownable contract. + orders.requester.app = randomContract.address; + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x20', + ); + }); + + it('Should fail when invalid app order signature from EOA', async () => { + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + orders.app.sign = randomSignature; // Override signature. + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x21', + ); + }); + + it('Should fail when invalid app order signature from SC', async () => { + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + orders.app.sign = randomSignature; // Override signature. + // Transfer ownership of the app to the ERC1271 contract. + await IERC721__factory.connect(await iexecPoco.appregistry(), appProvider) + .transferFrom( + appProvider.address, + erc1271MockContract.address, + appAddress, // tokenId + ) + .then((tx) => tx.wait()); + // Make sure the test does not fail because of another reason. + const signerAddress = ethers.utils.verifyMessage( + hashOrder(iexecWrapper.getDomain(), orders.app), + orders.app.sign as any, + ); + expect(signerAddress).to.not.equal(erc1271MockContract.address); // owner of app. + // Match orders. + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x21', + ); + }); + + it('Should fail when dataset is not registered', async () => { + orders.dataset.dataset = randomContract.address; // Must be an Ownable contract. + orders.requester.dataset = randomContract.address; + await signOrder(iexecWrapper.getDomain(), orders.app, appProvider); + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x30', + ); + }); + + it('Should fail when invalid dataset order signature from EOA', async () => { + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + orders.dataset.sign = randomSignature; // Override signature. + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x31', + ); + }); + + it('Should fail when invalid dataset order signature from SC', async () => { + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + orders.dataset.sign = randomSignature; // Override signature. + // Transfer ownership of the dataset to the ERC1271 contract. + await IERC721__factory.connect(await iexecPoco.datasetregistry(), datasetProvider) + .transferFrom( + datasetProvider.address, + erc1271MockContract.address, + datasetAddress, // tokenId + ) + .then((tx) => tx.wait()); + // Make sure the test does not fail because of another reason. + const signerAddress = ethers.utils.verifyMessage( + hashOrder(iexecWrapper.getDomain(), orders.dataset), + orders.dataset.sign as any, + ); + expect(signerAddress).to.not.equal(erc1271MockContract.address); // owner of dataset. + // Match orders. + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x31', + ); + }); + + it('Should fail when workerpool is not registered', async () => { + orders.workerpool.workerpool = randomContract.address; // Must be an Ownable contract. + orders.requester.workerpool = randomContract.address; + await signOrder(iexecWrapper.getDomain(), orders.app, appProvider); + await signOrder(iexecWrapper.getDomain(), orders.dataset, datasetProvider); + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x40', + ); + }); + + it('Should fail when invalid workerpool order signature from EOA', async () => { + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + orders.workerpool.sign = randomSignature; // Override signature. + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x41', + ); + }); + + it('Should fail when invalid workerpool order signature from SC', async () => { + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + orders.workerpool.sign = randomSignature; // Override signature. + // Transfer ownership of the workerpool to the ERC1271 contract. + await IERC721__factory.connect(await iexecPoco.workerpoolregistry(), scheduler) + .transferFrom( + scheduler.address, + erc1271MockContract.address, + workerpoolAddress, // tokenId + ) + .then((tx) => tx.wait()); + // Make sure the test does not fail because of another reason. + const signerAddress = ethers.utils.verifyMessage( + hashOrder(iexecWrapper.getDomain(), orders.workerpool), + orders.workerpool.sign as any, + ); + expect(signerAddress).to.not.equal(erc1271MockContract.address); // owner of workerpool. + // Match orders. + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x41', + ); + }); + + it('Should fail when invalid request order signature from EOA', async () => { + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + orders.requester.sign = randomSignature; // Override signature. + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x50', + ); + }); + + it('Should fail when invalid request order signature from SC', async () => { + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + orders.requester.sign = randomSignature; // Override signature. + // Set the smart contract as the requester. + orders.requester.requester = erc1271MockContract.address; + // Make sure the test does not fail because of another reason. + const signerAddress = ethers.utils.verifyMessage( + hashOrder(iexecWrapper.getDomain(), orders.requester), + orders.requester.sign as any, + ); + expect(signerAddress).to.not.equal(erc1271MockContract.address); // Requester. + // Match orders. + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x50', + ); + }); + + it('Should fail if one or more orders are consumed', async () => { + orders.app.volume = 0; + // TODO Set order as consumed directly in storage using the following code. + // Needs more debugging. + // + // const appOrderHash = iexecWrapper.hashOrder(orders.app); + // const appOrderConsumedSlotIndex = ethers.utils.keccak256( + // ethers.utils.concat([ + // appOrderHash, // key in the mapping. + // '0x12', // m_consumed mapping index. + // ]) + // ); + // // Set order as fully consumed. + // await setStorageAt( + // iexecPoco.address, + // appOrderConsumedSlotIndex, + // ethers.utils.hexlify(Number(orders.app.volume)), + // ); + await depositForRequesterAndSchedulerWithDefaultPrices(botVolume); + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'iExecV5-matchOrders-0x60', + ); + }); + + it('Should fail when requester has insufficient balance', async () => { + const dealPrice = (appPrice + datasetPrice + workerpoolPrice) * volume; + const schedulerStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + volume, + ); + // Deposit less than deal price in the requester's account. + await iexecWrapper.depositInIexecAccount(requester, dealPrice - 1); + await iexecWrapper.depositInIexecAccount(scheduler, schedulerStake); + expect(await iexecPoco.balanceOf(requester.address)).to.be.lessThan(dealPrice); + expect(await iexecPoco.balanceOf(scheduler.address)).to.equal(schedulerStake); + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'IexecEscrow: Transfer amount exceeds balance', + ); + }); + + it('Should fail when scheduler has insufficient balance', async () => { + const dealPrice = (appPrice + datasetPrice + workerpoolPrice) * volume; + const schedulerStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + volume, + ); + await iexecWrapper.depositInIexecAccount(requester, dealPrice); + // Deposit less than stake value in the scheduler's account. + await iexecWrapper.depositInIexecAccount(scheduler, schedulerStake - 1); + expect(await iexecPoco.balanceOf(requester.address)).to.equal(dealPrice); + expect(await iexecPoco.balanceOf(scheduler.address)).to.be.lessThan(schedulerStake); + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + await expect(iexecPocoAsRequester.matchOrders(...orders.toArray())).to.be.revertedWith( + 'IexecEscrow: Transfer amount exceeds balance', + ); + }); + }); + + describe('Sponsor match orders', () => { + it('Should sponsor match orders', async () => { + // Compute prices, stakes, rewards, ... + const dealPrice = + (appPrice + datasetPrice + workerpoolPrice) * // task price + volume; + const schedulerStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + volume, + ); + // Deposit required amounts. + await iexecWrapper.depositInIexecAccount(sponsor, dealPrice); + await iexecWrapper.depositInIexecAccount(scheduler, schedulerStake); + // Save frozen balances before match. + const sponsorFrozenBefore = (await iexecPoco.frozenOf(sponsor.address)).toNumber(); + // Sign and match orders. + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + const dealId = getDealId(iexecWrapper.getDomain(), orders.requester); + const tx = iexecPocoAsSponsor.sponsorMatchOrders(...orders.toArray()); + // Check balances and frozen. + await expect(tx).to.changeTokenBalances( + iexecPoco, + [iexecPoco, sponsor, scheduler, requester], + [dealPrice + schedulerStake, -dealPrice, -schedulerStake, 0], + ); + expect(await iexecPoco.frozenOf(requester.address)).to.equal(0); + expect(await iexecPoco.frozenOf(sponsor.address)).to.equal( + sponsorFrozenBefore + dealPrice, + ); + // Check events. + await expect(tx).to.emit(iexecPoco, 'OrdersMatched'); + // Check deal + const deal = await iexecPoco.viewDeal(dealId); + expect(deal.sponsor).to.equal(sponsor.address); + }); + + it('Should fail when sponsor has insufficient balance', async () => { + // Compute prices, stakes, rewards, ... + const dealPrice = + (appPrice + datasetPrice + workerpoolPrice) * // task price + volume; + const schedulerStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + volume, + ); + // Deposit less than deal price in the sponsor's account. + await iexecWrapper.depositInIexecAccount(sponsor, dealPrice - 1); + await iexecWrapper.depositInIexecAccount(scheduler, schedulerStake); + // Sign and match orders. + await signOrders(iexecWrapper.getDomain(), orders, ordersActors); + await expect( + iexecPocoAsSponsor.sponsorMatchOrders(...orders.toArray()), + ).to.be.revertedWith('IexecEscrow: Transfer amount exceeds balance'); + }); + }); + + /** + * Helper function to deposit requester and scheduler stakes with + * default prices for tests that do not rely on price changes. + */ + async function depositForRequesterAndSchedulerWithDefaultPrices(volume: number) { + const dealPrice = (appPrice + datasetPrice + workerpoolPrice) * volume; + const schedulerStake = await iexecWrapper.computeSchedulerDealStake( + workerpoolPrice, + volume, + ); + // Deposit required amounts. + await iexecWrapper.depositInIexecAccount(requester, dealPrice); + await iexecWrapper.depositInIexecAccount(scheduler, schedulerStake); + } +}); diff --git a/test/byContract/IexecPoco/IexecPocoDelegate.test.ts b/test/byContract/IexecPoco/IexecPocoDelegate.test.ts new file mode 100644 index 000000000..2db8fdbd0 --- /dev/null +++ b/test/byContract/IexecPoco/IexecPocoDelegate.test.ts @@ -0,0 +1,329 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { FakeContract, MockContract, smock } from '@defi-wonderland/smock'; +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import chai, { expect } from 'chai'; +import { ethers } from 'hardhat'; +import { + App, + AppRegistry, + AppRegistry__factory, + App__factory, + Dataset, + DatasetRegistry, + DatasetRegistry__factory, + Dataset__factory, + IexecLibOrders_v5__factory, + IexecPoco1Delegate, + IexecPocoAccessorsDelegate__factory, + IexecPocoCompositeDelegate, + IexecPocoCompositeDelegate__factory, + Workerpool, + WorkerpoolRegistry, + WorkerpoolRegistry__factory, + Workerpool__factory, +} from '../../../typechain'; +import { + OrdersActors, + OrdersAssets, + buildDomain, + buildOrders, + hashOrder, + signOrders, +} from '../../../utils/createOrders'; +import { createMock } from '../../../utils/mock-tools'; +import { getDealId } from '../../../utils/poco-tools'; + +chai.use(smock.matchers); + +const teeDealTag = '0x0000000000000000000000000000000000000000000000000000000000000001'; +const taskIndex = 0; +const schedulerRewardRatio = 1; +const EIP712DOMAIN_SEPARATOR = 'EIP712DOMAIN_SEPARATOR'; +const BALANCES = 'm_balances'; +const FROZENS = 'm_frozens'; +const WORKERPOOL_STAKE_RATIO = 30; +const CALLBACK_GAS = 100000; +const { domain, domainSeparator } = buildDomain(); +const appPrice = 1000; +const datasetPrice = 1_000_000; +const workerpoolPrice = 1_000_000_000; +const ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, +}; +let [admin, requester, sponsor, beneficiary, appProvider, datasetProvider, scheduler, anyone] = + [] as SignerWithAddress[]; +let ordersActors: OrdersActors; +let iexecPocoInstance: MockContract; +let appRegistry: FakeContract; +let appInstance: MockContract; +let datasetRegistry: FakeContract; +let datasetInstance: MockContract; +let workerpoolRegistry: FakeContract; +let workerpoolInstance: MockContract; +let ordersAssets: OrdersAssets; + +describe('IexecPocoDelegate', function () { + beforeEach('Setup accounts & contracts', async () => { + // Setup accounts + [admin, requester, sponsor, beneficiary, appProvider, datasetProvider, scheduler, anyone] = + await ethers.getSigners(); + ordersActors = { + appOwner: appProvider, + datasetOwner: datasetProvider, + workerpoolOwner: scheduler, + requester: requester, + }; + // Deploy contracts with fixture to ensure blockchain is always restored + // to a snapshot without redeploying everything + const deployFixture = async () => { + const iexecLibOrdersInstanceAddress = await new IexecLibOrders_v5__factory() + .connect(admin) + .deploy() + .then((instance) => instance.deployed()) + .then((instance) => instance.address); + // Using native smock call here for understandability purposes (also works with + // the custom `createMock` method) + iexecPocoInstance = (await smock + .mock('IexecPocoCompositeDelegate', { + libraries: { + ['contracts/libs/IexecLibOrders_v5.sol:IexecLibOrders_v5']: + iexecLibOrdersInstanceAddress, + }, + }) + .then((instance) => instance.deploy()) + .then((instance) => + instance.deployed(), + )) as MockContract; + // A global domain separator needs to be set since current contract is being + // unit tested here (hence no proxy) + await iexecPocoInstance.setVariable('m_callbackgas', CALLBACK_GAS); + await iexecPocoInstance.setVariable(EIP712DOMAIN_SEPARATOR, domainSeparator); + await iexecPocoInstance.setVariable('m_categories', [ + { + // Category 0 + name: 'some-name', + description: 'some-description', + workClockTimeRef: 60, + }, + ]); + }; + await loadFixture(deployFixture); + // Setup app registry and add app entry + appRegistry = await smock.fake(AppRegistry__factory); + await iexecPocoInstance.setVariable('m_appregistry', appRegistry.address); + appInstance = await createMock('App'); + appRegistry.isRegistered.whenCalledWith(appInstance.address).returns(true); + appInstance.owner.returns(appProvider.address); + // Setup dataset registry and add dataset entry + datasetInstance = await createMock('Dataset'); + datasetRegistry = await smock.fake(DatasetRegistry__factory); + await iexecPocoInstance.setVariable('m_datasetregistry', datasetRegistry.address); + datasetRegistry.isRegistered.whenCalledWith(datasetInstance.address).returns(true); + datasetInstance.owner.returns(datasetProvider.address); + // Setup workerpool registry and add workerpool entry + workerpoolRegistry = await smock.fake(WorkerpoolRegistry__factory); + await iexecPocoInstance.setVariable('m_workerpoolregistry', workerpoolRegistry.address); + workerpoolInstance = await createMock('Workerpool'); + workerpoolRegistry.isRegistered.whenCalledWith(workerpoolInstance.address).returns(true); + workerpoolInstance.owner.returns(scheduler.address); + workerpoolInstance.m_schedulerRewardRatioPolicy.returns(schedulerRewardRatio); + // Bundle assets together for simplicity purposes + ordersAssets = { + app: appInstance.address, + dataset: datasetInstance.address, + workerpool: workerpoolInstance.address, + }; + }); + + describe('Match orders', function () { + it('Should sponsor match orders ', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + beneficiary: beneficiary.address, + tag: teeDealTag, + prices: ordersPrices, + callback: ethers.Wallet.createRandom().address, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + // Set volumes for each order + appOrder.volume = 2; // smallest unconsumed volume among all orders + datasetOrder.volume = 3; + workerpoolOrder.volume = 4; + requestOrder.volume = 5; + const expectedVolume = 2; + // Set balance & frozen for each actor + const dealPrice = (appPrice + datasetPrice + workerpoolPrice) * expectedVolume; + const initialIexecPocoBalance = 1; + const initialRequesterBalance = 2; + const initialRequesterFrozen = 3; + const initialSchedulerBalance = 4; + const initialSchedulerFrozen = 5; + const initialSponsorBalance = 6; + const initialSponsorFrozen = 7; + const schedulerStake = computeSchedulerDealStake(workerpoolPrice, expectedVolume); + await iexecPocoInstance.setVariables({ + [BALANCES]: { + [iexecPocoInstance.address]: initialIexecPocoBalance, + [requester.address]: initialRequesterBalance, + [sponsor.address]: initialSponsorBalance + dealPrice, + [scheduler.address]: initialSchedulerBalance + schedulerStake, + }, + [FROZENS]: { + [requester.address]: initialRequesterFrozen, + [sponsor.address]: initialSponsorFrozen, + [scheduler.address]: initialSchedulerFrozen, + }, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const appOrderHash = hashOrder(domain, appOrder); + const datasetOrderHash = hashOrder(domain, datasetOrder); + const workerpoolOrderHash = hashOrder(domain, workerpoolOrder); + const requestOrderHash = hashOrder(domain, requestOrder); + expect( + await iexecPocoInstance + .connect(sponsor) + .callStatic.sponsorMatchOrders(...orders.toArray()), + ).to.equal(dealId); + expect( + await iexecPocoInstance.callStatic.computeDealVolume(...orders.toArray()), + ).to.equal(expectedVolume); + // Send tx + await expect(iexecPocoInstance.connect(sponsor).sponsorMatchOrders(...orders.toArray())) + .to.emit(iexecPocoInstance, 'OrdersMatched') + .withArgs( + dealId, + appOrderHash, + datasetOrderHash, + workerpoolOrderHash, + requestOrderHash, + expectedVolume, + ) + .to.emit(iexecPocoInstance, 'DealSponsored') + .withArgs(dealId, sponsor.address); + // Verify Poco contract balance + await expectBalance( + iexecPocoInstance, + iexecPocoInstance.address, + initialIexecPocoBalance + dealPrice + schedulerStake, + ); + // Verify requester balance & frozen + await expectBalance(iexecPocoInstance, requester.address, initialRequesterBalance); + await expectFrozen(iexecPocoInstance, requester.address, initialRequesterFrozen); + // Verify sponsor balance & frozen + await expectBalance(iexecPocoInstance, sponsor.address, initialSponsorBalance); + await expectFrozen( + iexecPocoInstance, + sponsor.address, + initialSponsorFrozen + dealPrice, + ); + // Verify scheduler balance & frozen + await expectBalance(iexecPocoInstance, scheduler.address, initialSchedulerBalance); + await expectFrozen( + iexecPocoInstance, + scheduler.address, + initialSchedulerFrozen + schedulerStake, + ); + // Verify stored deal + expect((await viewDeal(dealId)).sponsor).to.equal(sponsor.address); + }); + + it('Should get task', async function () { + const randomBytes = ethers.utils.randomBytes; + const hexlify = ethers.utils.hexlify; + + const taskId = hexlify(randomBytes(32)); + const dealId = hexlify(randomBytes(32)); + const index = 3; + const timeref = 250; + const contributionDeadline = Date.now() + 1; + const revealDeadline = Date.now() + 2; + const finalDeadline = Date.now() + 3; + const consensusValue = hexlify(randomBytes(32)); + const revealCounter = 2; + const winnerCounter = 2; + const contributor = ethers.Wallet.createRandom().address; + const resultDigest = hexlify(randomBytes(32)); + const results = hexlify(randomBytes(9)); + const resultsTimestamp = Date.now() + 4; + const resultsCallback = hexlify(randomBytes(9)); + + await iexecPocoInstance.setVariables({ + m_tasks: { + [taskId]: { + // status => Enum causes a smock error. + dealid: dealId, + idx: index, + timeref: timeref, + contributionDeadline: contributionDeadline, + revealDeadline: revealDeadline, + finalDeadline: finalDeadline, + consensusValue: consensusValue, + revealCounter: revealCounter, + winnerCounter: winnerCounter, + contributors: [contributor], + resultDigest: resultDigest, + results: results, + resultsTimestamp: resultsTimestamp, + resultsCallback: resultsCallback, + }, + }, + }); + const task = await IexecPocoAccessorsDelegate__factory.connect( + iexecPocoInstance.address, + anyone, + ).viewTask(taskId); + + expect(task.dealid).to.equal(dealId); + expect(task.idx).to.equal(index); + expect(task.timeref).to.equal(timeref); + expect(task.contributionDeadline).to.equal(contributionDeadline); + expect(task.revealDeadline).to.equal(revealDeadline); + expect(task.finalDeadline).to.equal(finalDeadline); + expect(task.consensusValue).to.equal(consensusValue); + expect(task.revealCounter).to.equal(revealCounter); + expect(task.winnerCounter).to.equal(winnerCounter); + expect(task.contributors[0]).to.equal(contributor); + expect(task.resultDigest).to.equal(resultDigest); + expect(task.results).to.equal(results); + expect(task.resultsTimestamp).to.equal(resultsTimestamp); + expect(task.resultsCallback).to.equal(resultsCallback); + }); + }); + + /** + * @notice Smock does not support getting struct variable from a mapping. + */ + async function viewDeal(dealId: string) { + return await IexecPocoAccessorsDelegate__factory.connect( + iexecPocoInstance.address, + anyone, + ).viewDeal(dealId); + } +}); + +function computeSchedulerDealStake(workerpoolPrice: number, volume: number) { + return ((workerpoolPrice * WORKERPOOL_STAKE_RATIO) / 100) * volume; +} + +async function expectBalance( + iexecPocoInstance: MockContract, + account: string, + expectedBalanceValue: number, +) { + expect(await iexecPocoInstance.getVariable(BALANCES, [account])).to.equal(expectedBalanceValue); +} + +async function expectFrozen( + iexecPocoInstance: MockContract, + account: string, + expectedFrozenValue: number, +) { + expect(await iexecPocoInstance.getVariable(FROZENS, [account])).to.equal(expectedFrozenValue); +} diff --git a/test/byContract/IexecPoco/verify.js b/test/byContract/IexecPoco/verify.js index 620e47c3a..f21a09a04 100644 --- a/test/byContract/IexecPoco/verify.js +++ b/test/byContract/IexecPoco/verify.js @@ -1,291 +1,1250 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../../../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; +var DEPLOYMENT = require('../../../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../../../utils/tools'); +const enstools = require('../../../utils/ens-tools'); +const odbtools = require('../../../utils/odb-tools'); +const constants = require('../../../utils/constants'); -Object.extract = (obj, keys) => keys.map(key => obj[key]); +Object.extract = (obj, keys) => keys.map((key) => obj[key]); -contract("Poco", async (accounts) => { +contract('Poco', async (accounts) => { + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + }); - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); + /*************************************************************************** + * TEST: internal methods * + ***************************************************************************/ + it('check signature mechanism', async () => { + entry = { msg: web3.utils.randomHex(32) }; + await iexecAdmin.signMessage(entry, entry.msg); + entry.hash = web3.eth.accounts.hashMessage(entry.msg); - /*************************************************************************** - * TEST: internal methods * - ***************************************************************************/ - it("check signature mechanism", async () => { - entry = { msg: web3.utils.randomHex(32) }; - await iexecAdmin.signMessage(entry, entry.msg); - entry.hash = web3.eth.accounts.hashMessage(entry.msg); + assert.equal(await IexecInstance.viewPresigned(entry.hash), constants.NULL.ADDRESS); + assert.isFalse(await IexecInstance.verifyPresignature(iexecAdmin.address, entry.hash)); + assert.isTrue( + await IexecInstance.verifyPresignatureOrSignature( + iexecAdmin.address, + entry.hash, + entry.sign, + ), + ); + assert.isTrue( + await IexecInstance.verifyPresignatureOrSignature( + iexecAdmin.address, + entry.hash, + tools.compactSignature(entry.sign), + ), + ); + assert.isFalse( + await IexecInstance.verifyPresignatureOrSignature(user.address, entry.hash, entry.sign), + ); + assert.isFalse( + await IexecInstance.verifyPresignatureOrSignature( + constants.NULL.ADDRESS, + entry.hash, + entry.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifyPresignatureOrSignature( + iexecAdmin.address, + web3.utils.randomHex(32), + entry.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifyPresignatureOrSignature( + iexecAdmin.address, + constants.NULL.BYTES32, + entry.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifyPresignatureOrSignature( + iexecAdmin.address, + entry.hash, + web3.utils.randomHex(64), + ), + ); + assert.isFalse( + await IexecInstance.verifyPresignatureOrSignature( + iexecAdmin.address, + entry.hash, + web3.utils.randomHex(64) + '1b', + ), + ); + assert.isFalse( + await IexecInstance.verifyPresignatureOrSignature( + iexecAdmin.address, + entry.hash, + web3.utils.randomHex(64) + '1a', + ), + ); + await expectRevert( + IexecInstance.verifyPresignatureOrSignature( + iexecAdmin.address, + entry.hash, + constants.NULL.SIGNATURE, + ), + 'invalid-signature-format', + ); + }); - assert.equal (await IexecInstance.viewPresigned (entry.hash), constants.NULL.ADDRESS ); - assert.isFalse(await IexecInstance.verifyPresignature (iexecAdmin.address, entry.hash, )); - assert.isTrue (await IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, entry.hash, entry.sign, )); - assert.isTrue (await IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, entry.hash, tools.compactSignature(entry.sign), )); - assert.isFalse(await IexecInstance.verifyPresignatureOrSignature(user.address, entry.hash, entry.sign, )); - assert.isFalse(await IexecInstance.verifyPresignatureOrSignature(constants.NULL.ADDRESS, entry.hash, entry.sign, )); - assert.isFalse(await IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, web3.utils.randomHex(32), entry.sign, )); - assert.isFalse(await IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, constants.NULL.BYTES32, entry.sign, )); - assert.isFalse(await IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, entry.hash, web3.utils.randomHex(64) )); - assert.isFalse(await IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, entry.hash, web3.utils.randomHex(64)+"1b" )); - await expectRevert( IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, entry.hash, web3.utils.randomHex(64)+"1a" ), "invalid-signature-v"); - await expectRevert( IexecInstance.verifyPresignatureOrSignature(iexecAdmin.address, entry.hash, constants.NULL.SIGNATURE ), "invalid-signature-format"); - }); + /*************************************************************************** + * TEST: creation * + ***************************************************************************/ + it('[Genesis] App Creation', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + it('[Genesis] Dataset Creation', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents(txMined, DatasetRegistryInstance.address, 'Transfer'); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); - /*************************************************************************** - * TEST: creation * - ***************************************************************************/ - it("[Genesis] App Creation", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); + it('[Genesis] Workerpool Creation', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, 'Transfer'); + WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); + }); - it("[Genesis] Dataset Creation", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); + /*************************************************************************** + * TEST: App hash * + ***************************************************************************/ + it('check app hash', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: DatasetInstance.address, + workerpoolrestrict: WorkerpoolInstance.address, + requesterrestrict: user.address, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + apporder_hash = odbtools.utils.hashAppOrder(ERC712_domain, apporder); - it("[Genesis] Workerpool Creation", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + tools.compactSignature(apporder.sign), + ), + ); + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, { + app: apporder.app, + appprice: apporder.appprice, + volume: apporder.volume, + tag: apporder.tag, + datasetrestrict: apporder.datasetrestrict, + workerpoolrestrict: apporder.workerpoolrestrict, + requesterrestrict: apporder.requesterrestrict, + salt: apporder.salt, + }), + apporder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, { + app: constants.NULL.ADDRESS, + appprice: apporder.appprice, + volume: apporder.volume, + tag: apporder.tag, + datasetrestrict: apporder.datasetrestrict, + workerpoolrestrict: apporder.workerpoolrestrict, + requesterrestrict: apporder.requesterrestrict, + salt: apporder.salt, + }), + apporder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, { + app: apporder.app, + appprice: 0, + volume: apporder.volume, + tag: apporder.tag, + datasetrestrict: apporder.datasetrestrict, + workerpoolrestrict: apporder.workerpoolrestrict, + requesterrestrict: apporder.requesterrestrict, + salt: apporder.salt, + }), + apporder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, { + app: apporder.app, + appprice: apporder.appprice, + volume: 0xffffff, + tag: apporder.tag, + datasetrestrict: apporder.datasetrestrict, + workerpoolrestrict: apporder.workerpoolrestrict, + requesterrestrict: apporder.requesterrestrict, + salt: apporder.salt, + }), + apporder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, { + app: apporder.app, + appprice: apporder.appprice, + volume: apporder.volume, + tag: '0x0000000000000000000000000000000000000000000000000000000000000001', + datasetrestrict: apporder.datasetrestrict, + workerpoolrestrict: apporder.workerpoolrestrict, + requesterrestrict: apporder.requesterrestrict, + salt: apporder.salt, + }), + apporder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, { + app: apporder.app, + appprice: apporder.appprice, + volume: apporder.volume, + tag: apporder.tag, + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: apporder.workerpoolrestrict, + requesterrestrict: apporder.requesterrestrict, + salt: apporder.salt, + }), + apporder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, { + app: apporder.app, + appprice: apporder.appprice, + volume: apporder.volume, + tag: apporder.tag, + datasetrestrict: apporder.datasetrestrict, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: apporder.requesterrestrict, + salt: apporder.salt, + }), + apporder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, { + app: apporder.app, + appprice: apporder.appprice, + volume: apporder.volume, + tag: apporder.tag, + datasetrestrict: apporder.datasetrestrict, + workerpoolrestrict: apporder.workerpoolrestrict, + requesterrestrict: constants.NULL.ADDRESS, + salt: apporder.salt, + }), + apporder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, { + app: apporder.app, + appprice: apporder.appprice, + volume: apporder.volume, + tag: apporder.tag, + datasetrestrict: apporder.datasetrestrict, + workerpoolrestrict: apporder.workerpoolrestrict, + requesterrestrict: apporder.requesterrestrict, + salt: web3.utils.randomHex(32), + }), + apporder.sign, + ), + ); + await expectRevert( + IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, { + app: apporder.app, + appprice: apporder.appprice, + volume: apporder.volume, + tag: apporder.tag, + datasetrestrict: apporder.datasetrestrict, + workerpoolrestrict: apporder.workerpoolrestrict, + requesterrestrict: apporder.requesterrestrict, + salt: apporder.salt, + }), + constants.NULL.SIGNATURE, + ), + 'invalid-signature-format', + ); + }); - /*************************************************************************** - * TEST: App hash * - ***************************************************************************/ - it("check app hash", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: DatasetInstance.address, - workerpoolrestrict: WorkerpoolInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - apporder_hash = odbtools.utils.hashAppOrder(ERC712_domain, apporder); + /*************************************************************************** + * TEST: Dataset hash * + ***************************************************************************/ + it('check dataset hash', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: AppInstance.address, + workerpoolrestrict: WorkerpoolInstance.address, + requesterrestrict: user.address, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + datasetorder_hash = odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder); - assert.isTrue (await IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, apporder ), apporder.sign )); - assert.isTrue (await IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, apporder ), tools.compactSignature(apporder.sign))); - assert.isTrue (await IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, { app: apporder.app, appprice: apporder.appprice, volume: apporder.volume, tag: apporder.tag, datasetrestrict: apporder.datasetrestrict, workerpoolrestrict: apporder.workerpoolrestrict, requesterrestrict: apporder.requesterrestrict, salt: apporder.salt }), apporder.sign )); - assert.isFalse(await IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, { app: constants.NULL.ADDRESS, appprice: apporder.appprice, volume: apporder.volume, tag: apporder.tag, datasetrestrict: apporder.datasetrestrict, workerpoolrestrict: apporder.workerpoolrestrict, requesterrestrict: apporder.requesterrestrict, salt: apporder.salt }), apporder.sign )); - assert.isFalse(await IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, { app: apporder.app, appprice: 0, volume: apporder.volume, tag: apporder.tag, datasetrestrict: apporder.datasetrestrict, workerpoolrestrict: apporder.workerpoolrestrict, requesterrestrict: apporder.requesterrestrict, salt: apporder.salt }), apporder.sign )); - assert.isFalse(await IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, { app: apporder.app, appprice: apporder.appprice, volume: 0xFFFFFF, tag: apporder.tag, datasetrestrict: apporder.datasetrestrict, workerpoolrestrict: apporder.workerpoolrestrict, requesterrestrict: apporder.requesterrestrict, salt: apporder.salt }), apporder.sign )); - assert.isFalse(await IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, { app: apporder.app, appprice: apporder.appprice, volume: apporder.volume, tag: "0x1", datasetrestrict: apporder.datasetrestrict, workerpoolrestrict: apporder.workerpoolrestrict, requesterrestrict: apporder.requesterrestrict, salt: apporder.salt }), apporder.sign )); - assert.isFalse(await IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, { app: apporder.app, appprice: apporder.appprice, volume: apporder.volume, tag: apporder.tag, datasetrestrict: constants.NULL.ADDRESS, workerpoolrestrict: apporder.workerpoolrestrict, requesterrestrict: apporder.requesterrestrict, salt: apporder.salt }), apporder.sign )); - assert.isFalse(await IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, { app: apporder.app, appprice: apporder.appprice, volume: apporder.volume, tag: apporder.tag, datasetrestrict: apporder.datasetrestrict, workerpoolrestrict: constants.NULL.ADDRESS, requesterrestrict: apporder.requesterrestrict, salt: apporder.salt }), apporder.sign )); - assert.isFalse(await IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, { app: apporder.app, appprice: apporder.appprice, volume: apporder.volume, tag: apporder.tag, datasetrestrict: apporder.datasetrestrict, workerpoolrestrict: apporder.workerpoolrestrict, requesterrestrict: constants.NULL.ADDRESS, salt: apporder.salt }), apporder.sign )); - assert.isFalse(await IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, { app: apporder.app, appprice: apporder.appprice, volume: apporder.volume, tag: apporder.tag, datasetrestrict: apporder.datasetrestrict, workerpoolrestrict: apporder.workerpoolrestrict, requesterrestrict: apporder.requesterrestrict, salt: web3.utils.randomHex(32) }), apporder.sign )); - await expectRevert( IexecInstance.verifySignature(appProvider.address, odbtools.utils.hashAppOrder(ERC712_domain, { app: apporder.app, appprice: apporder.appprice, volume: apporder.volume, tag: apporder.tag, datasetrestrict: apporder.datasetrestrict, workerpoolrestrict: apporder.workerpoolrestrict, requesterrestrict: apporder.requesterrestrict, salt: apporder.salt }), constants.NULL.SIGNATURE ), "invalid-signature-format"); - }); + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + tools.compactSignature(datasetorder.sign), + ), + ); + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, { + dataset: datasetorder.dataset, + datasetprice: datasetorder.datasetprice, + volume: datasetorder.volume, + tag: datasetorder.tag, + apprestrict: datasetorder.apprestrict, + workerpoolrestrict: datasetorder.workerpoolrestrict, + requesterrestrict: datasetorder.requesterrestrict, + salt: datasetorder.salt, + }), + datasetorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, { + dataset: constants.NULL.ADDRESS, + datasetprice: datasetorder.datasetprice, + volume: datasetorder.volume, + tag: datasetorder.tag, + apprestrict: datasetorder.apprestrict, + workerpoolrestrict: datasetorder.workerpoolrestrict, + requesterrestrict: datasetorder.requesterrestrict, + salt: datasetorder.salt, + }), + datasetorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, { + dataset: datasetorder.dataset, + datasetprice: 0, + volume: datasetorder.volume, + tag: datasetorder.tag, + apprestrict: datasetorder.apprestrict, + workerpoolrestrict: datasetorder.workerpoolrestrict, + requesterrestrict: datasetorder.requesterrestrict, + salt: datasetorder.salt, + }), + datasetorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, { + dataset: datasetorder.dataset, + datasetprice: datasetorder.datasetprice, + volume: 0xffffff, + tag: datasetorder.tag, + apprestrict: datasetorder.apprestrict, + workerpoolrestrict: datasetorder.workerpoolrestrict, + requesterrestrict: datasetorder.requesterrestrict, + salt: datasetorder.salt, + }), + datasetorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, { + dataset: datasetorder.dataset, + datasetprice: datasetorder.datasetprice, + volume: datasetorder.volume, + tag: '0x0000000000000000000000000000000000000000000000000000000000000001', + apprestrict: datasetorder.apprestrict, + workerpoolrestrict: datasetorder.workerpoolrestrict, + requesterrestrict: datasetorder.requesterrestrict, + salt: datasetorder.salt, + }), + datasetorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, { + dataset: datasetorder.dataset, + datasetprice: datasetorder.datasetprice, + volume: datasetorder.volume, + tag: datasetorder.tag, + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: datasetorder.workerpoolrestrict, + requesterrestrict: datasetorder.requesterrestrict, + salt: datasetorder.salt, + }), + datasetorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, { + dataset: datasetorder.dataset, + datasetprice: datasetorder.datasetprice, + volume: datasetorder.volume, + tag: datasetorder.tag, + apprestrict: datasetorder.apprestrict, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: datasetorder.requesterrestrict, + salt: datasetorder.salt, + }), + datasetorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, { + dataset: datasetorder.dataset, + datasetprice: datasetorder.datasetprice, + volume: datasetorder.volume, + tag: datasetorder.tag, + apprestrict: datasetorder.apprestrict, + workerpoolrestrict: datasetorder.workerpoolrestrict, + requesterrestrict: constants.NULL.ADDRESS, + salt: datasetorder.salt, + }), + datasetorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, { + dataset: datasetorder.dataset, + datasetprice: datasetorder.datasetprice, + volume: datasetorder.volume, + tag: datasetorder.tag, + apprestrict: datasetorder.apprestrict, + workerpoolrestrict: datasetorder.workerpoolrestrict, + requesterrestrict: datasetorder.requesterrestrict, + salt: web3.utils.randomHex(32), + }), + datasetorder.sign, + ), + ); + await expectRevert( + IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, { + dataset: datasetorder.dataset, + datasetprice: datasetorder.datasetprice, + volume: datasetorder.volume, + tag: datasetorder.tag, + apprestrict: datasetorder.apprestrict, + workerpoolrestrict: datasetorder.workerpoolrestrict, + requesterrestrict: datasetorder.requesterrestrict, + salt: datasetorder.salt, + }), + constants.NULL.SIGNATURE, + ), + 'invalid-signature-format', + ); + }); - /*************************************************************************** - * TEST: Dataset hash * - ***************************************************************************/ - it("check dataset hash", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: AppInstance.address, - workerpoolrestrict: WorkerpoolInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - datasetorder_hash = odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder); + /*************************************************************************** + * TEST: Workerpool hash * + ***************************************************************************/ + it('check workerpool hash', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 1000, + apprestrict: AppInstance.address, + datasetrestrict: DatasetInstance.address, + requesterrestrict: user.address, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + workerpoolorder_hash = odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder); - assert.isTrue (await IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder ), datasetorder.sign )); - assert.isTrue (await IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder ), tools.compactSignature(datasetorder.sign))); - assert.isTrue (await IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, { dataset: datasetorder.dataset, datasetprice: datasetorder.datasetprice, volume: datasetorder.volume, tag: datasetorder.tag, apprestrict: datasetorder.apprestrict, workerpoolrestrict: datasetorder.workerpoolrestrict, requesterrestrict: datasetorder.requesterrestrict, salt: datasetorder.salt }), datasetorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, { dataset: constants.NULL.ADDRESS, datasetprice: datasetorder.datasetprice, volume: datasetorder.volume, tag: datasetorder.tag, apprestrict: datasetorder.apprestrict, workerpoolrestrict: datasetorder.workerpoolrestrict, requesterrestrict: datasetorder.requesterrestrict, salt: datasetorder.salt }), datasetorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, { dataset: datasetorder.dataset, datasetprice: 0, volume: datasetorder.volume, tag: datasetorder.tag, apprestrict: datasetorder.apprestrict, workerpoolrestrict: datasetorder.workerpoolrestrict, requesterrestrict: datasetorder.requesterrestrict, salt: datasetorder.salt }), datasetorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, { dataset: datasetorder.dataset, datasetprice: datasetorder.datasetprice, volume: 0xFFFFFF, tag: datasetorder.tag, apprestrict: datasetorder.apprestrict, workerpoolrestrict: datasetorder.workerpoolrestrict, requesterrestrict: datasetorder.requesterrestrict, salt: datasetorder.salt }), datasetorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, { dataset: datasetorder.dataset, datasetprice: datasetorder.datasetprice, volume: datasetorder.volume, tag: "0x1", apprestrict: datasetorder.apprestrict, workerpoolrestrict: datasetorder.workerpoolrestrict, requesterrestrict: datasetorder.requesterrestrict, salt: datasetorder.salt }), datasetorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, { dataset: datasetorder.dataset, datasetprice: datasetorder.datasetprice, volume: datasetorder.volume, tag: datasetorder.tag, apprestrict: constants.NULL.ADDRESS, workerpoolrestrict: datasetorder.workerpoolrestrict, requesterrestrict: datasetorder.requesterrestrict, salt: datasetorder.salt }), datasetorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, { dataset: datasetorder.dataset, datasetprice: datasetorder.datasetprice, volume: datasetorder.volume, tag: datasetorder.tag, apprestrict: datasetorder.apprestrict, workerpoolrestrict: constants.NULL.ADDRESS, requesterrestrict: datasetorder.requesterrestrict, salt: datasetorder.salt }), datasetorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, { dataset: datasetorder.dataset, datasetprice: datasetorder.datasetprice, volume: datasetorder.volume, tag: datasetorder.tag, apprestrict: datasetorder.apprestrict, workerpoolrestrict: datasetorder.workerpoolrestrict, requesterrestrict: constants.NULL.ADDRESS, salt: datasetorder.salt }), datasetorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, { dataset: datasetorder.dataset, datasetprice: datasetorder.datasetprice, volume: datasetorder.volume, tag: datasetorder.tag, apprestrict: datasetorder.apprestrict, workerpoolrestrict: datasetorder.workerpoolrestrict, requesterrestrict: datasetorder.requesterrestrict, salt: web3.utils.randomHex(32) }), datasetorder.sign )); - await expectRevert( IexecInstance.verifySignature(datasetProvider.address, odbtools.utils.hashDatasetOrder(ERC712_domain, { dataset: datasetorder.dataset, datasetprice: datasetorder.datasetprice, volume: datasetorder.volume, tag: datasetorder.tag, apprestrict: datasetorder.apprestrict, workerpoolrestrict: datasetorder.workerpoolrestrict, requesterrestrict: datasetorder.requesterrestrict, salt: datasetorder.salt }), constants.NULL.SIGNATURE ), "invalid-signature-format"); - }); + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + tools.compactSignature(workerpoolorder.sign), + ), + ); + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { + workerpool: workerpoolorder.workerpool, + workerpoolprice: workerpoolorder.workerpoolprice, + volume: workerpoolorder.volume, + category: workerpoolorder.category, + trust: workerpoolorder.trust, + tag: workerpoolorder.tag, + apprestrict: workerpoolorder.apprestrict, + datasetrestrict: workerpoolorder.datasetrestrict, + requesterrestrict: workerpoolorder.requesterrestrict, + salt: workerpoolorder.salt, + }), + workerpoolorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { + workerpool: constants.NULL.ADDRESS, + workerpoolprice: workerpoolorder.workerpoolprice, + volume: workerpoolorder.volume, + category: workerpoolorder.category, + trust: workerpoolorder.trust, + tag: workerpoolorder.tag, + apprestrict: workerpoolorder.apprestrict, + datasetrestrict: workerpoolorder.datasetrestrict, + requesterrestrict: workerpoolorder.requesterrestrict, + salt: workerpoolorder.salt, + }), + workerpoolorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { + workerpool: workerpoolorder.workerpool, + workerpoolprice: 0, + volume: workerpoolorder.volume, + category: workerpoolorder.category, + trust: workerpoolorder.trust, + tag: workerpoolorder.tag, + apprestrict: workerpoolorder.apprestrict, + datasetrestrict: workerpoolorder.datasetrestrict, + requesterrestrict: workerpoolorder.requesterrestrict, + salt: workerpoolorder.salt, + }), + workerpoolorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { + workerpool: workerpoolorder.workerpool, + workerpoolprice: workerpoolorder.workerpoolprice, + volume: 0xffffff, + category: workerpoolorder.category, + trust: workerpoolorder.trust, + tag: workerpoolorder.tag, + apprestrict: workerpoolorder.apprestrict, + datasetrestrict: workerpoolorder.datasetrestrict, + requesterrestrict: workerpoolorder.requesterrestrict, + salt: workerpoolorder.salt, + }), + workerpoolorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { + workerpool: workerpoolorder.workerpool, + workerpoolprice: workerpoolorder.workerpoolprice, + volume: workerpoolorder.volume, + category: 5, + trust: workerpoolorder.trust, + tag: workerpoolorder.tag, + apprestrict: workerpoolorder.apprestrict, + datasetrestrict: workerpoolorder.datasetrestrict, + requesterrestrict: workerpoolorder.requesterrestrict, + salt: workerpoolorder.salt, + }), + workerpoolorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { + workerpool: workerpoolorder.workerpool, + workerpoolprice: workerpoolorder.workerpoolprice, + volume: workerpoolorder.volume, + category: workerpoolorder.category, + trust: workerpoolorder.trust, + tag: '0x0000000000000000000000000000000000000000000000000000000000000001', + apprestrict: workerpoolorder.apprestrict, + datasetrestrict: workerpoolorder.datasetrestrict, + requesterrestrict: workerpoolorder.requesterrestrict, + salt: workerpoolorder.salt, + }), + workerpoolorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { + workerpool: workerpoolorder.workerpool, + workerpoolprice: workerpoolorder.workerpoolprice, + volume: workerpoolorder.volume, + category: workerpoolorder.category, + trust: workerpoolorder.trust, + tag: workerpoolorder.tag, + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: workerpoolorder.datasetrestrict, + requesterrestrict: workerpoolorder.requesterrestrict, + salt: workerpoolorder.salt, + }), + workerpoolorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { + workerpool: workerpoolorder.workerpool, + workerpoolprice: workerpoolorder.workerpoolprice, + volume: workerpoolorder.volume, + category: workerpoolorder.category, + trust: workerpoolorder.trust, + tag: workerpoolorder.tag, + apprestrict: workerpoolorder.apprestrict, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: workerpoolorder.requesterrestrict, + salt: workerpoolorder.salt, + }), + workerpoolorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { + workerpool: workerpoolorder.workerpool, + workerpoolprice: workerpoolorder.workerpoolprice, + volume: workerpoolorder.volume, + category: workerpoolorder.category, + trust: workerpoolorder.trust, + tag: workerpoolorder.tag, + apprestrict: workerpoolorder.apprestrict, + datasetrestrict: workerpoolorder.datasetrestrict, + requesterrestrict: constants.NULL.ADDRESS, + salt: workerpoolorder.salt, + }), + workerpoolorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { + workerpool: workerpoolorder.workerpool, + workerpoolprice: workerpoolorder.workerpoolprice, + volume: workerpoolorder.volume, + category: workerpoolorder.category, + trust: workerpoolorder.trust, + tag: workerpoolorder.tag, + apprestrict: workerpoolorder.apprestrict, + datasetrestrict: workerpoolorder.datasetrestrict, + requesterrestrict: workerpoolorder.requesterrestrict, + salt: web3.utils.randomHex(32), + }), + workerpoolorder.sign, + ), + ); + await expectRevert( + IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { + workerpool: workerpoolorder.workerpool, + workerpoolprice: workerpoolorder.workerpoolprice, + volume: workerpoolorder.volume, + category: workerpoolorder.category, + trust: workerpoolorder.trust, + tag: workerpoolorder.tag, + apprestrict: workerpoolorder.apprestrict, + datasetrestrict: workerpoolorder.datasetrestrict, + requesterrestrict: workerpoolorder.requesterrestrict, + salt: workerpoolorder.salt, + }), + constants.NULL.SIGNATURE, + ), + 'invalid-signature-format', + ); + }); - /*************************************************************************** - * TEST: Workerpool hash * - ***************************************************************************/ - it("check workerpool hash", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 1000, - apprestrict: AppInstance.address, - datasetrestrict: DatasetInstance.address, - requesterrestrict: user.address, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - workerpoolorder_hash = odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder); - - assert.isTrue (await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), workerpoolorder.sign)); - assert.isTrue (await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), tools.compactSignature(workerpoolorder.sign))); - assert.isTrue (await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { workerpool: workerpoolorder.workerpool, workerpoolprice: workerpoolorder.workerpoolprice, volume: workerpoolorder.volume, category: workerpoolorder.category, trust: workerpoolorder.trust, tag: workerpoolorder.tag, apprestrict: workerpoolorder.apprestrict, datasetrestrict: workerpoolorder.datasetrestrict, requesterrestrict: workerpoolorder.requesterrestrict, salt: workerpoolorder.salt }), workerpoolorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { workerpool: constants.NULL.ADDRESS, workerpoolprice: workerpoolorder.workerpoolprice, volume: workerpoolorder.volume, category: workerpoolorder.category, trust: workerpoolorder.trust, tag: workerpoolorder.tag, apprestrict: workerpoolorder.apprestrict, datasetrestrict: workerpoolorder.datasetrestrict, requesterrestrict: workerpoolorder.requesterrestrict, salt: workerpoolorder.salt }), workerpoolorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { workerpool: workerpoolorder.workerpool, workerpoolprice: 0, volume: workerpoolorder.volume, category: workerpoolorder.category, trust: workerpoolorder.trust, tag: workerpoolorder.tag, apprestrict: workerpoolorder.apprestrict, datasetrestrict: workerpoolorder.datasetrestrict, requesterrestrict: workerpoolorder.requesterrestrict, salt: workerpoolorder.salt }), workerpoolorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { workerpool: workerpoolorder.workerpool, workerpoolprice: workerpoolorder.workerpoolprice, volume: 0xFFFFFF, category: workerpoolorder.category, trust: workerpoolorder.trust, tag: workerpoolorder.tag, apprestrict: workerpoolorder.apprestrict, datasetrestrict: workerpoolorder.datasetrestrict, requesterrestrict: workerpoolorder.requesterrestrict, salt: workerpoolorder.salt }), workerpoolorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { workerpool: workerpoolorder.workerpool, workerpoolprice: workerpoolorder.workerpoolprice, volume: workerpoolorder.volume, category: 5, trust: workerpoolorder.trust, tag: workerpoolorder.tag, apprestrict: workerpoolorder.apprestrict, datasetrestrict: workerpoolorder.datasetrestrict, requesterrestrict: workerpoolorder.requesterrestrict, salt: workerpoolorder.salt }), workerpoolorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { workerpool: workerpoolorder.workerpool, workerpoolprice: workerpoolorder.workerpoolprice, volume: workerpoolorder.volume, category: workerpoolorder.category, trust: workerpoolorder.trust, tag: "0x1", apprestrict: workerpoolorder.apprestrict, datasetrestrict: workerpoolorder.datasetrestrict, requesterrestrict: workerpoolorder.requesterrestrict, salt: workerpoolorder.salt }), workerpoolorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { workerpool: workerpoolorder.workerpool, workerpoolprice: workerpoolorder.workerpoolprice, volume: workerpoolorder.volume, category: workerpoolorder.category, trust: workerpoolorder.trust, tag: workerpoolorder.tag, apprestrict: constants.NULL.ADDRESS, datasetrestrict: workerpoolorder.datasetrestrict, requesterrestrict: workerpoolorder.requesterrestrict, salt: workerpoolorder.salt }), workerpoolorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { workerpool: workerpoolorder.workerpool, workerpoolprice: workerpoolorder.workerpoolprice, volume: workerpoolorder.volume, category: workerpoolorder.category, trust: workerpoolorder.trust, tag: workerpoolorder.tag, apprestrict: workerpoolorder.apprestrict, datasetrestrict: constants.NULL.ADDRESS, requesterrestrict: workerpoolorder.requesterrestrict, salt: workerpoolorder.salt }), workerpoolorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { workerpool: workerpoolorder.workerpool, workerpoolprice: workerpoolorder.workerpoolprice, volume: workerpoolorder.volume, category: workerpoolorder.category, trust: workerpoolorder.trust, tag: workerpoolorder.tag, apprestrict: workerpoolorder.apprestrict, datasetrestrict: workerpoolorder.datasetrestrict, requesterrestrict: constants.NULL.ADDRESS, salt: workerpoolorder.salt }), workerpoolorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { workerpool: workerpoolorder.workerpool, workerpoolprice: workerpoolorder.workerpoolprice, volume: workerpoolorder.volume, category: workerpoolorder.category, trust: workerpoolorder.trust, tag: workerpoolorder.tag, apprestrict: workerpoolorder.apprestrict, datasetrestrict: workerpoolorder.datasetrestrict, requesterrestrict: workerpoolorder.requesterrestrict, salt: web3.utils.randomHex(32) }), workerpoolorder.sign )); - await expectRevert( IexecInstance.verifySignature(scheduler.address, odbtools.utils.hashWorkerpoolOrder(ERC712_domain, { workerpool: workerpoolorder.workerpool, workerpoolprice: workerpoolorder.workerpoolprice, volume: workerpoolorder.volume, category: workerpoolorder.category, trust: workerpoolorder.trust, tag: workerpoolorder.tag, apprestrict: workerpoolorder.apprestrict, datasetrestrict: workerpoolorder.datasetrestrict, requesterrestrict: workerpoolorder.requesterrestrict, salt: workerpoolorder.salt }), constants.NULL.SIGNATURE), "invalid-signature-format"); - }); - - /*************************************************************************** - * TEST: Request hash * - ***************************************************************************/ - it("check request hash", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: WorkerpoolInstance.address, - workerpoolmaxprice: 25, - volume: 1, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - category: 4, - trust: 1000, - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "app params", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - requestorder_hash = odbtools.utils.hashRequestOrder(ERC712_domain, requestorder); - - assert.isTrue (await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), requestorder.sign)); - assert.isTrue (await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), tools.compactSignature(requestorder.sign))); - assert.isTrue (await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: constants.NULL.ADDRESS, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: 1000, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: constants.NULL.ADDRESS, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: 1000, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: constants.NULL.ADDRESS, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: 1000, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: 0xFFFFFF, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: 3, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: 0, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: "0x1", requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: constants.NULL.ADDRESS, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: constants.NULL.ADDRESS, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: user.address, params: requestorder.params, salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: "wrong params", salt: requestorder.salt }), requestorder.sign )); - assert.isFalse(await IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: web3.utils.randomHex(32) }), requestorder.sign )); - await expectRevert( IexecInstance.verifySignature(user.address, odbtools.utils.hashRequestOrder(ERC712_domain, { app: requestorder.app, appmaxprice: requestorder.appmaxprice, dataset: requestorder.dataset, datasetmaxprice: requestorder.datasetmaxprice, workerpool: requestorder.workerpool, workerpoolmaxprice: requestorder.workerpoolmaxprice, volume: requestorder.volume, category: requestorder.category, trust: requestorder.trust, tag: requestorder.tag, requester: requestorder.requester, beneficiary: requestorder.beneficiary, callback: requestorder.callback, params: requestorder.params, salt: requestorder.salt }), constants.NULL.SIGNATURE), "invalid-signature-format"); - }); + /*************************************************************************** + * TEST: Request hash * + ***************************************************************************/ + it('check request hash', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: WorkerpoolInstance.address, + workerpoolmaxprice: 25, + volume: 1, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + category: 4, + trust: 1000, + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: 'app params', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + requestorder_hash = odbtools.utils.hashRequestOrder(ERC712_domain, requestorder); + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + tools.compactSignature(requestorder.sign), + ), + ); + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: constants.NULL.ADDRESS, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: 1000, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: constants.NULL.ADDRESS, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: 1000, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: 1000, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: 0xffffff, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: 3, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: 0, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: '0x0000000000000000000000000000000000000000000000000000000000000001', + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: constants.NULL.ADDRESS, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: constants.NULL.ADDRESS, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: user.address, + params: requestorder.params, + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: 'wrong params', + salt: requestorder.salt, + }), + requestorder.sign, + ), + ); + assert.isFalse( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: web3.utils.randomHex(32), + }), + requestorder.sign, + ), + ); + await expectRevert( + IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, { + app: requestorder.app, + appmaxprice: requestorder.appmaxprice, + dataset: requestorder.dataset, + datasetmaxprice: requestorder.datasetmaxprice, + workerpool: requestorder.workerpool, + workerpoolmaxprice: requestorder.workerpoolmaxprice, + volume: requestorder.volume, + category: requestorder.category, + trust: requestorder.trust, + tag: requestorder.tag, + requester: requestorder.requester, + beneficiary: requestorder.beneficiary, + callback: requestorder.callback, + params: requestorder.params, + salt: requestorder.salt, + }), + constants.NULL.SIGNATURE, + ), + 'invalid-signature-format', + ); + }); }); diff --git a/test/byContract/IexecPocoBoost/IexecEscrow.v8.test.ts b/test/byContract/IexecPocoBoost/IexecEscrow.v8.test.ts new file mode 100644 index 000000000..41529a691 --- /dev/null +++ b/test/byContract/IexecPocoBoost/IexecEscrow.v8.test.ts @@ -0,0 +1,179 @@ +import { MockContract, smock } from '@defi-wonderland/smock'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { constants } from 'ethers'; +import { ethers, expect } from 'hardhat'; +import { IexecEscrowTestContract, IexecEscrowTestContract__factory } from '../../../typechain'; + +const BALANCES = 'm_balances'; +const FROZENS = 'm_frozens'; + +describe('IexecEscrow.v8', function () { + // Using 0 causes an error when checking initial balance. + const initialEscrowBalance = 10; + const initialUserBalance = 20; + const initialUserFrozen = 30; + const amount = 3; + const ref = constants.HashZero; + + let deployer: SignerWithAddress; + let user: SignerWithAddress; + let iexecEscrow: MockContract; + + beforeEach(async function () { + // Get wallets. + [deployer, user] = await ethers.getSigners(); + // Deploy the contract to be tested as a mock. + iexecEscrow = (await smock + .mock('IexecEscrowTestContract') + .then((instance) => instance.deploy()) + .then((contract) => contract.deployed())) as MockContract; + // Set initial state of contract. + await iexecEscrow.setVariables({ + [BALANCES]: { + [iexecEscrow.address]: initialEscrowBalance, + [user.address]: initialUserBalance, + }, + [FROZENS]: { + [user.address]: initialUserFrozen, + }, + }); + }); + + describe('Lock', function () { + it('Should lock funds', async function () { + // Check balances before the operation. + await checkInitialBalancesAndFrozens(); + // Run operation. + await expect(iexecEscrow.lock_(user.address, amount)) + .to.emit(iexecEscrow, 'Transfer') + .withArgs(user.address, iexecEscrow.address, amount) + .to.emit(iexecEscrow, 'Lock') + .withArgs(user.address, amount); + // Check balances after the operation. + await checkBalancesAndFrozens( + initialEscrowBalance + amount, + initialUserBalance - amount, + initialUserFrozen + amount, + ); + }); + + it('Should not lock funds for empty address', async function () { + await expect(iexecEscrow.lock_(constants.AddressZero, amount)).to.be.revertedWith( + 'IexecEscrow: Transfer from empty address', + ); + }); + + it('Should not lock funds when insufficient balance', async function () { + await expect( + iexecEscrow.lock_(user.address, initialUserBalance + 1), + ).to.be.revertedWith('IexecEscrow: Transfer amount exceeds balance'); + }); + }); + + describe('Unlock', function () { + it('Should unlock funds', async function () { + // Check balances before the operation. + await checkInitialBalancesAndFrozens(); + // Run operation. + await expect(iexecEscrow.unlock_(user.address, amount)) + .to.emit(iexecEscrow, 'Transfer') + .withArgs(iexecEscrow.address, user.address, amount) + .to.emit(iexecEscrow, 'Unlock') + .withArgs(user.address, amount); + // Check balances after the operation. + await checkBalancesAndFrozens( + initialEscrowBalance - amount, + initialUserBalance + amount, + initialUserFrozen - amount, + ); + }); + + it('Should not unlock funds for empty address', async function () { + await expect(iexecEscrow.unlock_(constants.AddressZero, amount)).to.be.revertedWith( + 'IexecEscrow: Transfer to empty address', + ); + }); + + it('Should not unlock funds when insufficient balance', async function () { + await expect( + iexecEscrow.unlock_(user.address, initialUserFrozen + 1), + ).to.be.revertedWith('IexecEscrow: Transfer amount exceeds balance'); + }); + }); + + describe('Reward', function () { + it('Should reward', async function () { + // Check balances before the operation. + await checkInitialBalancesAndFrozens(); + // Run operation. + await expect(iexecEscrow.reward_(user.address, amount, ref)) + .to.emit(iexecEscrow, 'Transfer') + .withArgs(iexecEscrow.address, user.address, amount) + .to.emit(iexecEscrow, 'Reward') + .withArgs(user.address, amount, ref); + // Check balances after the operation. + await checkBalancesAndFrozens( + initialEscrowBalance - amount, + initialUserBalance + amount, + initialUserFrozen, + ); + }); + + it('Should not reward empty address', async function () { + await expect( + iexecEscrow.reward_(constants.AddressZero, amount, ref), + ).to.be.revertedWith('IexecEscrow: Transfer to empty address'); + }); + + it('Should not reward when insufficient balance', async function () { + await expect( + iexecEscrow.reward_(user.address, initialEscrowBalance + 1, ref), + ).to.be.revertedWith('IexecEscrow: Transfer amount exceeds balance'); + }); + }); + + describe('Seize', function () { + it('Should seize funds', async function () { + // Check balances before the operation. + await checkInitialBalancesAndFrozens(); + // Run operation. + await expect(iexecEscrow.seize_(user.address, amount, ref)) + .to.emit(iexecEscrow, 'Seize') + .withArgs(user.address, amount, ref); + // Check balances after the operation. + await checkBalancesAndFrozens( + initialEscrowBalance, + initialUserBalance, + initialUserFrozen - amount, + ); + }); + + it('Should not seize funds for empty address', async function () { + await expect( + iexecEscrow.seize_(constants.AddressZero, amount, ref), + ).to.be.revertedWithPanic(0x11); + }); + + it('Should not seize funds when insufficient balance', async function () { + await expect( + iexecEscrow.seize_(user.address, initialUserFrozen + 1, ref), + ).to.be.revertedWithPanic(0x11); + }); + }); + + async function checkInitialBalancesAndFrozens() { + checkBalancesAndFrozens(initialEscrowBalance, initialUserBalance, initialUserFrozen); + } + + async function checkBalancesAndFrozens( + escrowBalance: number, + userBalance: number, + userFrozen: number, + ) { + expect(await iexecEscrow.getVariable(BALANCES, [iexecEscrow.address])).to.be.equal( + escrowBalance, + ); + expect(await iexecEscrow.getVariable(BALANCES, [user.address])).to.be.equal(userBalance); + expect(await iexecEscrow.getVariable(FROZENS, [user.address])).to.be.equal(userFrozen); + } +}); diff --git a/test/byContract/IexecPocoBoost/IexecPocoBoostDelegate.test.ts b/test/byContract/IexecPocoBoost/IexecPocoBoostDelegate.test.ts new file mode 100644 index 000000000..7c46e81ea --- /dev/null +++ b/test/byContract/IexecPocoBoost/IexecPocoBoostDelegate.test.ts @@ -0,0 +1,2973 @@ +// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { FakeContract, MockContract, smock } from '@defi-wonderland/smock'; +import { BigNumber, BigNumberish } from '@ethersproject/bignumber'; +import { BytesLike } from '@ethersproject/bytes'; +import { loadFixture, time } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import chai, { expect } from 'chai'; +import { assert, ethers } from 'hardhat'; +import { + App, + AppRegistry, + AppRegistry__factory, + App__factory, + Dataset, + DatasetRegistry, + DatasetRegistry__factory, + Dataset__factory, + GasWasterClient, + GasWasterClient__factory, + IERC734, + IERC734__factory, + IexecLibOrders_v5__factory, + IexecPocoBoostAccessorsDelegate__factory, + IexecPocoBoostCompositeDelegate__factory, + IexecPocoBoostDelegate, + TestClient, + TestClient__factory, + Workerpool, + WorkerpoolRegistry, + WorkerpoolRegistry__factory, + Workerpool__factory, +} from '../../../typechain'; +import { IERC1271 } from '../../../typechain/@openzeppelin/contracts-v5/interfaces'; +import { IERC1271__factory } from '../../../typechain/factories/@openzeppelin/contracts-v5/interfaces'; +import constants from '../../../utils/constants'; +import { + IexecOrders, + OrdersActors, + OrdersAssets, + OrdersPrices, + buildDomain, + buildOrders, + createEmptyAppOrder, + createEmptyDatasetOrder, + createEmptyRequestOrder, + createEmptyWorkerpoolOrder, + hashOrder, + signOrder, + signOrders, +} from '../../../utils/createOrders'; +import { createMock } from '../../../utils/mock-tools'; +import { + buildAndSignContributionAuthorizationMessage, + buildAndSignEnclaveMessage, + buildResultCallbackAndDigest, + buildUtf8ResultAndDigest, + getDealId, + getTaskId, + setNextBlockTimestamp, +} from '../../../utils/poco-tools'; + +chai.use(smock.matchers); + +const teeDealTag = '0x0000000000000000000000000000000000000000000000000000000000000001'; +const taskIndex = 0; +const volume = taskIndex + 1; +const schedulerRewardRatio = 1; +const { results, resultDigest } = buildUtf8ResultAndDigest('result'); +const EIP712DOMAIN_SEPARATOR = 'EIP712DOMAIN_SEPARATOR'; +const BALANCES = 'm_balances'; +const FROZENS = 'm_frozens'; +const WORKERPOOL_STAKE_RATIO = 30; +const CALLBACK_GAS = 100000; +const kittyAddress = '0x99c2268479b93fDe36232351229815DF80837e23'; +const groupMemberPurpose = 4; // See contracts/Store.v8.sol#GROUPMEMBER_PURPOSE +const { domain, domainSeparator } = buildDomain(); +const appPrice = 1000; +const datasetPrice = 1_000_000; +const workerpoolPrice = 1_000_000_000; +const someSignature = '0xabcd'; // contract signatures could have arbitrary formats +const randomEOAAddress = '0xc0ffee254729296a45a3885639AC7E10F9d54979'; + +async function deployBoostFixture() { + const [ + admin, + requester, + sponsor, + beneficiary, + appProvider, + datasetProvider, + scheduler, + worker1, + worker2, + enclave, + anyone, + teeBroker, + ] = await ethers.getSigners(); + const iexecLibOrdersInstanceAddress = await new IexecLibOrders_v5__factory() + .connect(admin) + .deploy() + .then((instance) => instance.deployed()) + .then((instance) => instance.address); + // Using native smock call here for understandability purposes (also works with + // the custom `createMock` method) + const iexecPocoBoostInstance = (await smock + .mock('IexecPocoBoostCompositeDelegate', { + libraries: { + ['contracts/libs/IexecLibOrders_v5.sol:IexecLibOrders_v5']: + iexecLibOrdersInstanceAddress, + }, + }) + .then((instance) => instance.deploy()) + .then((instance) => instance.deployed())) as MockContract; + // A global domain separator needs to be set since current contract is being + // unit tested here (hence no proxy) + await iexecPocoBoostInstance.setVariable('m_callbackgas', CALLBACK_GAS); + await iexecPocoBoostInstance.setVariable(EIP712DOMAIN_SEPARATOR, domainSeparator); + await iexecPocoBoostInstance.setVariable('m_categories', [ + { + // Category 0 + name: 'some-name', + description: 'some-description', + workClockTimeRef: 60, + }, + ]); + return { + iexecPocoBoostInstance, + admin, + requester, + sponsor, + beneficiary, + appProvider, + datasetProvider, + scheduler, + worker: worker1, + worker1, + worker2, + enclave, + anyone, + teeBroker, + }; +} + +describe('IexecPocoBoostDelegate', function () { + let iexecPocoBoostInstance: MockContract; + let oracleConsumerInstance: FakeContract; + let gasWasterClientInstance: MockContract; + let appInstance: MockContract; + let workerpoolInstance: MockContract; + let datasetInstance: MockContract; + let appRegistry: FakeContract; + let datasetRegistry: FakeContract; + let workerpoolRegistry: FakeContract; + let someContractInstance: MockContract; + let [ + appProvider, + datasetProvider, + scheduler, + worker, + enclave, + requester, + sponsor, + beneficiary, + anyone, + teeBroker, + ] = [] as SignerWithAddress[]; + let ordersActors: OrdersActors; + let ordersAssets: OrdersAssets; + let ordersPrices: OrdersPrices; + + beforeEach('set up contract instances and mock app', async () => { + const fixtures = await loadFixture(deployBoostFixture); + iexecPocoBoostInstance = fixtures.iexecPocoBoostInstance; + appProvider = fixtures.appProvider; + datasetProvider = fixtures.datasetProvider; + scheduler = fixtures.scheduler; + worker = fixtures.worker; + enclave = fixtures.enclave; + requester = fixtures.requester; + sponsor = fixtures.sponsor; + beneficiary = fixtures.beneficiary; + anyone = fixtures.anyone; + teeBroker = fixtures.teeBroker; + ordersActors = { + appOwner: appProvider, + datasetOwner: datasetProvider, + workerpoolOwner: scheduler, + requester: requester, + }; + oracleConsumerInstance = await smock.fake(TestClient__factory); + gasWasterClientInstance = await createMock( + 'GasWasterClient', + ); // Deploy a real but nevertheless observable contract + appInstance = await createMock('App'); + workerpoolInstance = await createMock('Workerpool'); + datasetInstance = await createMock('Dataset'); + someContractInstance = await createMock('TestClient'); // any other deployed contract would be fine + ordersAssets = { + app: appInstance.address, + dataset: datasetInstance.address, + workerpool: workerpoolInstance.address, + }; + ordersPrices = { + app: appPrice, + dataset: datasetPrice, + workerpool: workerpoolPrice, + }; + appRegistry = await smock.fake(AppRegistry__factory); + await iexecPocoBoostInstance.setVariable('m_appregistry', appRegistry.address); + datasetRegistry = await smock.fake(DatasetRegistry__factory); + await iexecPocoBoostInstance.setVariable('m_datasetregistry', datasetRegistry.address); + workerpoolRegistry = await smock.fake(WorkerpoolRegistry__factory); + await iexecPocoBoostInstance.setVariable( + 'm_workerpoolregistry', + workerpoolRegistry.address, + ); + + appRegistry.isRegistered.whenCalledWith(appInstance.address).returns(true); + datasetRegistry.isRegistered.whenCalledWith(datasetInstance.address).returns(true); + workerpoolRegistry.isRegistered.whenCalledWith(workerpoolInstance.address).returns(true); + }); + + describe('Match orders Boost', function () { + it('Should match orders (TEE)', async function () { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + workerpoolInstance.m_schedulerRewardRatioPolicy.returns(schedulerRewardRatio); + + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + beneficiary: beneficiary.address, + tag: teeDealTag, + prices: ordersPrices, + callback: ethers.Wallet.createRandom().address, + }); + const { + appOrder, + datasetOrder, + workerpoolOrder, + requesterOrder: requestOrder, + } = orders.toObject(); + // Should match orders with low app order volume + // Set volumes + appOrder.volume = 2; // smallest unconsumed volume among all orders + datasetOrder.volume = 3; + workerpoolOrder.volume = 4; + requestOrder.volume = 5; + const expectedVolume = 2; + const dealPrice = (appPrice + datasetPrice + workerpoolPrice) * expectedVolume; + const initialIexecPocoBalance = 1; + const initialRequesterBalance = 2; + const initialRequesterFrozen = 3; + const initialSchedulerBalance = 4; + const initialSchedulerFrozen = 5; + const schedulerStake = computeSchedulerDealStake(workerpoolPrice, expectedVolume); + await iexecPocoBoostInstance.setVariables({ + [BALANCES]: { + [iexecPocoBoostInstance.address]: initialIexecPocoBalance, + [requester.address]: initialRequesterBalance + dealPrice, + [scheduler.address]: initialSchedulerBalance + schedulerStake, + }, + [FROZENS]: { + [requester.address]: initialRequesterFrozen, + [scheduler.address]: initialSchedulerFrozen, + }, + }); + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance, + ); + await expectBalance( + iexecPocoBoostInstance, + requester.address, + initialRequesterBalance + dealPrice, + ); + await expectFrozen(iexecPocoBoostInstance, requester.address, initialRequesterFrozen); + await expectBalance( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerBalance + schedulerStake, + ); + await expectFrozen(iexecPocoBoostInstance, scheduler.address, initialSchedulerFrozen); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const appOrderHash = hashOrder(domain, appOrder); + const datasetOrderHash = hashOrder(domain, datasetOrder); + const workerpoolOrderHash = hashOrder(domain, workerpoolOrder); + const requestOrderHash = hashOrder(domain, requestOrder); + await expectOrderConsumed(iexecPocoBoostInstance, appOrderHash, undefined); + await expectOrderConsumed(iexecPocoBoostInstance, datasetOrderHash, undefined); + await expectOrderConsumed(iexecPocoBoostInstance, workerpoolOrderHash, undefined); + await expectOrderConsumed(iexecPocoBoostInstance, requestOrderHash, undefined); + const startTime = await setNextBlockTimestamp(); + + expect( + await iexecPocoBoostInstance.callStatic.matchOrdersBoost(...orders.toArray()), + ).to.equal(dealId); + await expect(iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray())) + .to.emit(iexecPocoBoostInstance, 'SchedulerNoticeBoost') + .withArgs( + workerpoolInstance.address, + dealId, + appInstance.address, + datasetInstance.address, + requestOrder.category, + teeDealTag, + requestOrder.params, + beneficiary.address, + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId, + appOrderHash, + datasetOrderHash, + workerpoolOrderHash, + requestOrderHash, + expectedVolume, + ) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(requester.address, iexecPocoBoostInstance.address, dealPrice) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(requester.address, dealPrice) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(scheduler.address, iexecPocoBoostInstance.address, schedulerStake) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(scheduler.address, schedulerStake); + await expectOrderConsumed(iexecPocoBoostInstance, appOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, datasetOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, workerpoolOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, requestOrderHash, expectedVolume); + const deal = await viewDealBoost(dealId); + // Check addresses. + expect(deal.requester).to.be.equal(requestOrder.requester, 'Requester mismatch'); + expect(deal.appOwner).to.be.equal(appProvider.address, 'App owner mismatch'); + expect(deal.datasetOwner).to.be.equal( + datasetProvider.address, + 'Dataset owner mismatch', + ); + expect(deal.workerpoolOwner).to.be.equal( + scheduler.address, + 'Workerpool owner mismatch', + ); + expect(deal.workerReward).to.be.equal( + (workerpoolPrice * // reward depends on + (100 - schedulerRewardRatio)) / // worker ratio + 100, + ); + expect(deal.deadline).to.be.equal( + startTime + // match order block timestamp + 7 * // contribution deadline ratio + 60, // requested category time reference + ); + expect(deal.callback) + .to.be.equal(requestOrder.callback, 'Callback mismatch') + .to.not.be.equal(constants.NULL.ADDRESS); + // Check prices. + expect(deal.workerpoolPrice).to.be.equal( + workerpoolOrder.workerpoolprice, + 'Workerpool price mismatch', + ); + expect(deal.appPrice).to.be.equal(appOrder.appprice, 'App price mismatch'); + expect(deal.datasetPrice).to.be.equal( + datasetOrder.datasetprice, + 'Dataset price mismatch', + ); + expect(deal.botFirst).to.be.equal(0); + expect(deal.botSize).to.be.equal(expectedVolume); + expect(deal.shortTag).to.be.equal('0x000001'); + expect(deal.sponsor).to.be.equal(requestOrder.requester, 'Sponsor mismatch'); + + // Check balances. + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance + dealPrice + schedulerStake, + ); + await expectBalance(iexecPocoBoostInstance, requester.address, initialRequesterBalance); + await expectFrozen( + iexecPocoBoostInstance, + requester.address, + initialRequesterFrozen + dealPrice, + ); + await expectBalance(iexecPocoBoostInstance, scheduler.address, initialSchedulerBalance); + await expectFrozen( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerFrozen + schedulerStake, + ); + }); + + it('Should sponsor match orders (TEE)', async function () { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + workerpoolInstance.m_schedulerRewardRatioPolicy.returns(schedulerRewardRatio); + + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + beneficiary: beneficiary.address, + tag: teeDealTag, + prices: ordersPrices, + callback: ethers.Wallet.createRandom().address, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + // Should match orders with low app order volume + // Set volumes + appOrder.volume = 2; // smallest unconsumed volume among all orders + datasetOrder.volume = 3; + workerpoolOrder.volume = 4; + requestOrder.volume = 5; + const expectedVolume = 2; + const dealPrice = (appPrice + datasetPrice + workerpoolPrice) * expectedVolume; + const initialIexecPocoBalance = 1; + const initialRequesterBalance = 2; + const initialRequesterFrozen = 3; + const initialSchedulerBalance = 4; + const initialSchedulerFrozen = 5; + const initialSponsorBalance = 6; + const initialSponsorFrozen = 7; + const schedulerStake = computeSchedulerDealStake(workerpoolPrice, expectedVolume); + await iexecPocoBoostInstance.setVariables({ + [BALANCES]: { + [iexecPocoBoostInstance.address]: initialIexecPocoBalance, + [requester.address]: initialRequesterBalance, + [sponsor.address]: initialSponsorBalance + dealPrice, + [scheduler.address]: initialSchedulerBalance + schedulerStake, + }, + [FROZENS]: { + [requester.address]: initialRequesterFrozen, + [sponsor.address]: initialSponsorFrozen, + [scheduler.address]: initialSchedulerFrozen, + }, + }); + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance, + ); + await expectBalance(iexecPocoBoostInstance, requester.address, initialRequesterBalance); + await expectFrozen(iexecPocoBoostInstance, requester.address, initialRequesterFrozen); + await expectBalance( + iexecPocoBoostInstance, + sponsor.address, + initialSponsorBalance + dealPrice, + ); + await expectFrozen(iexecPocoBoostInstance, sponsor.address, initialSponsorFrozen); + await expectBalance( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerBalance + schedulerStake, + ); + await expectFrozen(iexecPocoBoostInstance, scheduler.address, initialSchedulerFrozen); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const appOrderHash = hashOrder(domain, appOrder); + const datasetOrderHash = hashOrder(domain, datasetOrder); + const workerpoolOrderHash = hashOrder(domain, workerpoolOrder); + const requestOrderHash = hashOrder(domain, requestOrder); + await expectOrderConsumed(iexecPocoBoostInstance, appOrderHash, undefined); + await expectOrderConsumed(iexecPocoBoostInstance, datasetOrderHash, undefined); + await expectOrderConsumed(iexecPocoBoostInstance, workerpoolOrderHash, undefined); + await expectOrderConsumed(iexecPocoBoostInstance, requestOrderHash, undefined); + const startTime = await setNextBlockTimestamp(); + + expect( + await iexecPocoBoostInstance + .connect(sponsor) + .callStatic.sponsorMatchOrdersBoost(...orders.toArray()), + ).to.equal(dealId); + expect( + await iexecPocoBoostInstance.callStatic.computeDealVolume(...orders.toArray()), + ).to.equal(expectedVolume); + await expect( + iexecPocoBoostInstance + .connect(sponsor) + .sponsorMatchOrdersBoost(...orders.toArray()), + ) + .to.emit(iexecPocoBoostInstance, 'SchedulerNoticeBoost') + .withArgs( + workerpoolInstance.address, + dealId, + appInstance.address, + datasetInstance.address, + requestOrder.category, + teeDealTag, + requestOrder.params, + beneficiary.address, + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId, + appOrderHash, + datasetOrderHash, + workerpoolOrderHash, + requestOrderHash, + expectedVolume, + ) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(sponsor.address, iexecPocoBoostInstance.address, dealPrice) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(sponsor.address, dealPrice) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(scheduler.address, iexecPocoBoostInstance.address, schedulerStake) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(scheduler.address, schedulerStake) + .to.emit(iexecPocoBoostInstance, 'DealSponsoredBoost') + .withArgs(dealId, sponsor.address); + await expectOrderConsumed(iexecPocoBoostInstance, appOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, datasetOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, workerpoolOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, requestOrderHash, expectedVolume); + const deal = await viewDealBoost(dealId); + // Check addresses. + expect(deal.requester).to.be.equal(requestOrder.requester); + expect(deal.appOwner).to.be.equal(appProvider.address); + expect(deal.datasetOwner).to.be.equal(datasetProvider.address); + expect(deal.workerpoolOwner).to.be.equal(scheduler.address); + expect(deal.workerReward).to.be.equal( + (workerpoolPrice * // reward depends on + (100 - schedulerRewardRatio)) / // worker ratio + 100, + ); + expect(deal.deadline).to.be.equal( + startTime + // match order block timestamp + 7 * // contribution deadline ratio + 60, // requested category time reference + ); + expect(deal.callback) + .to.be.equal(requestOrder.callback) + .to.not.be.equal(constants.NULL.ADDRESS); + // Check prices. + expect(deal.workerpoolPrice).to.be.equal(workerpoolOrder.workerpoolprice); + expect(deal.appPrice).to.be.equal(appOrder.appprice); + expect(deal.datasetPrice).to.be.equal(datasetOrder.datasetprice); + expect(deal.botFirst).to.be.equal(0); + expect(deal.botSize).to.be.equal(expectedVolume); + expect(deal.shortTag).to.be.equal('0x000001'); + expect(deal.sponsor).to.be.equal(sponsor.address); + + // Check balances. + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance + dealPrice + schedulerStake, + ); + await expectBalance(iexecPocoBoostInstance, requester.address, initialRequesterBalance); + await expectFrozen(iexecPocoBoostInstance, requester.address, initialRequesterFrozen); + await expectBalance(iexecPocoBoostInstance, sponsor.address, initialSponsorBalance); + await expectFrozen( + iexecPocoBoostInstance, + sponsor.address, + initialSponsorFrozen + dealPrice, + ); + await expectBalance(iexecPocoBoostInstance, scheduler.address, initialSchedulerBalance); + await expectFrozen( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerFrozen + schedulerStake, + ); + }); + + it('Should match orders with trust equals 1', async function () { + // Mock owner() method of assets contracts. + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + // Build orders + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + // Change trust. + requestOrder.trust = 1; + // Sign & hash orders. + await signOrders(domain, orders, ordersActors); + // Run & verify. + await expect( + iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ), + ).to.emit(iexecPocoBoostInstance, 'OrdersMatched'); + }); + + it('Should match orders when assets and requester belongs to identity groups', async function () { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + let appOrder = createEmptyAppOrder(); + let datasetOrder = createEmptyDatasetOrder(); + let workerpoolOrder = createEmptyWorkerpoolOrder(); + let requestOrder = createEmptyRequestOrder(); + // App + const appGroupIdentityInstance = await createFakeErc734IdentityInstance(); + appOrder.app = appInstance.address; + datasetOrder.apprestrict = appGroupIdentityInstance.address; + workerpoolOrder.apprestrict = appGroupIdentityInstance.address; + const expectedCallsToAppGroup = 2; + requestOrder.app = appOrder.app; + whenIdentityContractCalledForCandidateInGroupThenReturnTrue( + appGroupIdentityInstance, + appOrder.app, + ); + // Dataset + const datasetGroupIdentityInstance = await createFakeErc734IdentityInstance(); + datasetOrder.dataset = datasetInstance.address; + appOrder.datasetrestrict = datasetGroupIdentityInstance.address; + workerpoolOrder.datasetrestrict = datasetGroupIdentityInstance.address; + const expectedCallsToDatasetGroup = 2; + requestOrder.dataset = datasetOrder.dataset; + whenIdentityContractCalledForCandidateInGroupThenReturnTrue( + datasetGroupIdentityInstance, + datasetOrder.dataset, + ); + // Workerpool + const workerpoolGroupIdentityInstance = await createFakeErc734IdentityInstance(); + workerpoolOrder.workerpool = workerpoolInstance.address; + appOrder.workerpoolrestrict = workerpoolGroupIdentityInstance.address; + datasetOrder.workerpoolrestrict = workerpoolGroupIdentityInstance.address; + requestOrder.workerpool = workerpoolGroupIdentityInstance.address; + const expectedCallsToWorkerpoolGroup = 3; + whenIdentityContractCalledForCandidateInGroupThenReturnTrue( + workerpoolGroupIdentityInstance, + workerpoolOrder.workerpool, + ); + // Requester + const requesterGroupIdentityInstance = await createFakeErc734IdentityInstance(); + requestOrder.requester = requester.address; + appOrder.requesterrestrict = requesterGroupIdentityInstance.address; + datasetOrder.requesterrestrict = requesterGroupIdentityInstance.address; + workerpoolOrder.requesterrestrict = requesterGroupIdentityInstance.address; + const expectedCallsToRequesterGroup = 3; + whenIdentityContractCalledForCandidateInGroupThenReturnTrue( + requesterGroupIdentityInstance, + requester.address, + ); + // Finish orders setup + appOrder.volume = volume; + datasetOrder.volume = volume; + workerpoolOrder.volume = volume; + requestOrder.volume = volume; + await signOrders( + domain, + new IexecOrders(appOrder, datasetOrder, workerpoolOrder, requestOrder), + ordersActors, + ); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ), + ).to.emit(iexecPocoBoostInstance, 'OrdersMatched'); + expectIdentityContractCalledForCandidateInGroup( + appGroupIdentityInstance, + appOrder.app, + expectedCallsToAppGroup, + ); + expectIdentityContractCalledForCandidateInGroup( + datasetGroupIdentityInstance, + datasetOrder.dataset, + expectedCallsToDatasetGroup, + ); + expectIdentityContractCalledForCandidateInGroup( + workerpoolGroupIdentityInstance, + workerpoolOrder.workerpool, + expectedCallsToWorkerpoolGroup, + ); + expectIdentityContractCalledForCandidateInGroup( + requesterGroupIdentityInstance, + requestOrder.requester, + expectedCallsToRequesterGroup, + ); + }); + + it('Should match orders if signers are smart contracts', async function () { + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }).toObject(); + const erc1271Instance = await createFakeERC1271(); + erc1271Instance.isValidSignature.returns('0x1626ba7e'); + appInstance.owner.returns(erc1271Instance.address); + datasetInstance.owner.returns(erc1271Instance.address); + workerpoolInstance.owner.returns(erc1271Instance.address); + requestOrder.requester = erc1271Instance.address; + appOrder.sign = someSignature; + datasetOrder.sign = someSignature; + workerpoolOrder.sign = someSignature; + requestOrder.sign = someSignature; + + await expect( + iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ), + ).to.emit(iexecPocoBoostInstance, 'OrdersMatched'); + expect(erc1271Instance.isValidSignature) + .to.have.been.calledWith(hashOrder(domain, appOrder), someSignature) + .to.have.been.calledWith(hashOrder(domain, datasetOrder), someSignature) + .to.have.been.calledWith(hashOrder(domain, workerpoolOrder), someSignature) + .to.have.been.calledWith(hashOrder(domain, requestOrder), someSignature) + .callCount(4); + }); + + it('Should match orders with pre-signatures (TEE)', async function () { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = buildOrders({ + assets: ordersAssets, + requester: requester.address, + beneficiary: beneficiary.address, + tag: teeDealTag, + }).toObject(); + const appOrderHash = hashOrder(domain, appOrder); + const datasetOrderHash = hashOrder(domain, datasetOrder); + const workerpoolOrderHash = hashOrder(domain, workerpoolOrder); + const requestOrderHash = hashOrder(domain, requestOrder); + await iexecPocoBoostInstance.setVariable('m_presigned', { + [appOrderHash]: appProvider.address, + [datasetOrderHash]: datasetProvider.address, + [workerpoolOrderHash]: scheduler.address, + [requestOrderHash]: requester.address, + }); + const dealId = getDealId(domain, requestOrder, taskIndex); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ), + ) + .to.emit(iexecPocoBoostInstance, 'SchedulerNoticeBoost') + .withArgs( + workerpoolInstance.address, + dealId, + appInstance.address, + datasetInstance.address, + requestOrder.category, + teeDealTag, + requestOrder.params, + beneficiary.address, + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId, + hashOrder(domain, appOrder), + hashOrder(domain, datasetOrder), + hashOrder(domain, workerpoolOrder), + hashOrder(domain, requestOrder), + volume, + ); + }); + + it('Should match orders without dataset (TEE)', async function () { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + const dealPrice = (appPrice + workerpoolPrice) * volume; + await iexecPocoBoostInstance.setVariable(BALANCES, { + [requester.address]: dealPrice, + [scheduler.address]: computeSchedulerDealStake(workerpoolPrice, volume), + }); + + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = buildOrders({ + assets: { + app: appInstance.address, + dataset: constants.NULL.ADDRESS, // No dataset. + workerpool: workerpoolInstance.address, + }, + requester: requester.address, + beneficiary: beneficiary.address, + prices: { + app: appPrice, + dataset: 0, + workerpool: workerpoolPrice, + }, + tag: teeDealTag, + }).toObject(); + await signOrder(domain, appOrder, appProvider); + await signOrder(domain, workerpoolOrder, scheduler); + await signOrder(domain, requestOrder, requester); + const dealId = getDealId(domain, requestOrder, taskIndex); + const emptyDatasetOrderHash = hashOrder(domain, datasetOrder); + await expectOrderConsumed(iexecPocoBoostInstance, emptyDatasetOrderHash, undefined); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ), + ) + .to.emit(iexecPocoBoostInstance, 'SchedulerNoticeBoost') + .withArgs( + workerpoolInstance.address, + dealId, + appInstance.address, + constants.NULL.ADDRESS, // No dataset. + requestOrder.category, + teeDealTag, + requestOrder.params, + beneficiary.address, + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId, + hashOrder(domain, appOrder), + constants.NULL.BYTES32, + hashOrder(domain, workerpoolOrder), + hashOrder(domain, requestOrder), + volume, + ); + await expectOrderConsumed(iexecPocoBoostInstance, emptyDatasetOrderHash, undefined); + const deal = await viewDealBoost(dealId); + expect(deal.datasetPrice).to.be.equal(0); + }); + + it('Should match orders with low workerpool order volume', async function () { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + // Set volumes + appOrder.volume = 5; + datasetOrder.volume = 4; + workerpoolOrder.volume = 3; // smallest unconsumed volume among all orders + requestOrder.volume = 6; + const expectedVolume = 3; + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const appOrderHash = hashOrder(domain, appOrder); + const datasetOrderHash = hashOrder(domain, datasetOrder); + const workerpoolOrderHash = hashOrder(domain, workerpoolOrder); + const requestOrderHash = hashOrder(domain, requestOrder); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ), + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId, + appOrderHash, + datasetOrderHash, + workerpoolOrderHash, + requestOrderHash, + expectedVolume, + ); + await expectOrderConsumed(iexecPocoBoostInstance, appOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, datasetOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, workerpoolOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, requestOrderHash, expectedVolume); + const deal = await viewDealBoost(dealId); + expect(deal.botFirst).to.be.equal(0); + expect(deal.botSize).to.be.equal(expectedVolume); + }); + + it('Should match orders with low request order volume', async function () { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + // Set volumes + appOrder.volume = 7; + datasetOrder.volume = 6; + workerpoolOrder.volume = 5; + requestOrder.volume = 4; // smallest unconsumed volume among all orders + const expectedVolume = 4; + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const appOrderHash = hashOrder(domain, appOrder); + const datasetOrderHash = hashOrder(domain, datasetOrder); + const workerpoolOrderHash = hashOrder(domain, workerpoolOrder); + const requestOrderHash = hashOrder(domain, requestOrder); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ), + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId, + appOrderHash, + datasetOrderHash, + workerpoolOrderHash, + requestOrderHash, + expectedVolume, + ); + await expectOrderConsumed(iexecPocoBoostInstance, appOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, datasetOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, workerpoolOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, requestOrderHash, expectedVolume); + const deal = await viewDealBoost(dealId); + expect(deal.botFirst).to.be.equal(0); + expect(deal.botSize).to.be.equal(expectedVolume); + }); + + it('Should match orders with low dataset order volume', async function () { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + // Set volumes + appOrder.volume = 6; + datasetOrder.volume = 5; // smallest unconsumed volume among all orders + workerpoolOrder.volume = 7; + requestOrder.volume = 8; + const expectedVolume = 5; + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, requestOrder, taskIndex); + const appOrderHash = hashOrder(domain, appOrder); + const datasetOrderHash = hashOrder(domain, datasetOrder); + const workerpoolOrderHash = hashOrder(domain, workerpoolOrder); + const requestOrderHash = hashOrder(domain, requestOrder); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ), + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId, + appOrderHash, + datasetOrderHash, + workerpoolOrderHash, + requestOrderHash, + expectedVolume, + ); + await expectOrderConsumed(iexecPocoBoostInstance, appOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, datasetOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, workerpoolOrderHash, expectedVolume); + await expectOrderConsumed(iexecPocoBoostInstance, requestOrderHash, expectedVolume); + const deal = await viewDealBoost(dealId); + expect(deal.botFirst).to.be.equal(0); + expect(deal.botSize).to.be.equal(expectedVolume); + }); + + it('Should match request order multiple times until fully consumed', async function () { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + const { appOrder, datasetOrder, workerpoolOrder, requestOrder } = orders.toObject(); + appOrder.volume = 8; + datasetOrder.volume = 8; + requestOrder.volume = 8; + // Partially consume orders in a first batch + workerpoolOrder.volume = 3; // 3 now and 5 later + await signOrders(domain, orders, ordersActors); + const dealId1 = getDealId(domain, requestOrder, taskIndex); + const appOrderHash = hashOrder(domain, appOrder); + const datasetOrderHash = hashOrder(domain, datasetOrder); + const workerpoolOrderHash = hashOrder(domain, workerpoolOrder); + const requestOrderHash = hashOrder(domain, requestOrder); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder, + requestOrder, + ), + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId1, + appOrderHash, + datasetOrderHash, + workerpoolOrderHash, + requestOrderHash, + 3, + ); + const deal = await viewDealBoost(dealId1); + expect(deal.botFirst).to.be.equal(0); + expect(deal.botSize).to.be.equal(3); + + // Fully consume orders in a second and last batch + const workerpoolOrder2 = workerpoolOrder; + workerpoolOrder2.volume = 5; + const workerpoolOrderHash2 = hashOrder(domain, workerpoolOrder2); + await signOrder(domain, workerpoolOrder2, scheduler); + const dealId2 = getDealId(domain, requestOrder, 3); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost( + appOrder, + datasetOrder, + workerpoolOrder2, + requestOrder, + ), + ) + .to.emit(iexecPocoBoostInstance, 'OrdersMatched') + .withArgs( + dealId2, + appOrderHash, + datasetOrderHash, + workerpoolOrderHash2, + requestOrderHash, + 5, + ); + const deal2 = await viewDealBoost(dealId2); + expect(deal2.botFirst).to.be.equal(3); // next index after last task of deal1:{0, 1, 2} + expect(deal2.botSize).to.be.equal(5); + // Verify request is fully consumed + await expectOrderConsumed(iexecPocoBoostInstance, requestOrderHash, 8); + }); + + it('Should fail when trust is greater than 1', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + // Set bad trust (> 1). + orders.requester.trust = 2; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Bad trust level'); + }); + + it('Should fail when categories are different', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + // Set different categories + orders.requester.category = 1; + orders.workerpool.category = 2; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Category mismatch'); + }); + + it('Should fail when category unknown', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + // Unknown category + orders.requester.category = 1; + orders.workerpool.category = 1; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Unknown category'); + }); + + it('Should fail when app max price is less than app price', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + orders.app.appprice = 200; + orders.requester.appmaxprice = 100; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Overpriced app'); + }); + + it('Should fail when dataset max price is less than dataset price', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + // Set dataset price higher than dataset max price + orders.dataset.datasetprice = 300; + orders.requester.datasetmaxprice = 200; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Overpriced dataset'); + }); + + it('Should fail when workerpool max price is less than workerpool price', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + // Set workerpool price higher than workerpool max price + orders.workerpool.workerpoolprice = 400; + orders.requester.workerpoolmaxprice = 300; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Overpriced workerpool'); + }); + + it('Should fail when workerpool tag does not satisfy app, dataset and request requirements', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + }); + // Manually set the tags for app, dataset, and request orders + orders.app.tag = '0x0000000000000000000000000000000000000000000000000000000000000001'; // 0b0001 + orders.dataset.tag = + '0x0000000000000000000000000000000000000000000000000000000000000002'; // 0b0010 + orders.requester.tag = + '0x0000000000000000000000000000000000000000000000000000000000000003'; // 0b0011 + // Set the workerpool tag to a different value + orders.workerpool.tag = + '0x0000000000000000000000000000000000000000000000000000000000000004'; // 0b0100 + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Workerpool tag does not match demand'); + }); + + it('Should fail when the last bit of app tag does not satisfy dataset or request requirements', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + }); + // Manually set the tags for app, dataset, and request orders + // The last bit of dataset and request tag is 1, but app tag does not set it + orders.app.tag = '0x0000000000000000000000000000000000000000000000000000000000000002'; // 0b0010 + orders.dataset.tag = + '0x0000000000000000000000000000000000000000000000000000000000000003'; // 0b0011 + orders.requester.tag = + '0x0000000000000000000000000000000000000000000000000000000000000003'; // 0b0011 + // Set the workerpool tag to pass first tag check + orders.workerpool.tag = + '0x0000000000000000000000000000000000000000000000000000000000000003'; // 0b0011 + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: App tag does not match demand'); + }); + + it('Should fail when app are different', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + // Request another app address + orders.requester.app = '0x0000000000000000000000000000000000000001'; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: App mismatch'); + }); + + it('Should fail when dataset are different', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + // Request another dataset address + orders.requester.dataset = '0x0000000000000000000000000000000000000001'; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Dataset mismatch'); + }); + + it('Should fail when request order workerpool mismatches workerpool order workerpool (EOA, SC)', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + // EOA + orders.requester.workerpool = randomEOAAddress; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Workerpool restricted by request order'); + // SC + orders.requester.workerpool = someContractInstance.address; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Workerpool restricted by request order'); + }); + + /** + * Dynamically generated tests for all different restrictions in orders + * (requesterrestrict, apprestrict, workerpoolrestrict, datasetrestrict). + */ + ['app', 'workerpool', 'dataset'].forEach((orderName) => { + // No request order + ['requester', 'app', 'workerpool', 'dataset'].forEach((assetName) => { + // Filter irrelevant cases. E.g. no need to change the app address in the app order. + if (orderName.includes(assetName)) { + return; + } + it(`Should fail when ${orderName} order mismatch ${assetName} restriction (EOA, SC)`, async function () { + const capitalizedAssetName = + assetName.charAt(0).toUpperCase() + assetName.substring(1); // app => App + const revertMessage = `PocoBoost: ${capitalizedAssetName} restricted by ${orderName} order`; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + // EOA + // E.g. changes orders['app']['apprestrict'] = 0xAddress + // @ts-ignore + orders[orderName][assetName + 'restrict'] = randomEOAAddress; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith(revertMessage); + // SC + // @ts-ignore + orders[orderName][assetName + 'restrict'] = someContractInstance.address; + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith(revertMessage); + }); + }); + }); + + it('Should fail when app not registered', async function () { + appRegistry.isRegistered.whenCalledWith(appInstance.address).returns(false); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrder(domain, orders.app, anyone); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: App not registered'); + }); + + it('Should fail when invalid app order signature from EOA', async function () { + appInstance.owner.returns(appProvider.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrder(domain, orders.app, anyone); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Invalid app order signature'); + }); + + it('Should fail when invalid app order signature from contract', async function () { + const erc1271Instance = await createFakeERC1271(); + appInstance.owner.returns(erc1271Instance.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + orders.app.sign = someSignature; + const appOrderHash = hashOrder(domain, orders.app); + whenERC1271CalledThenReplyInvalidSignature( + erc1271Instance, + appOrderHash, + someSignature, + ); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Invalid app order signature'); + await expectERC1271CalledOnceWith(erc1271Instance, appOrderHash, someSignature); + }); + + it('Should fail when dataset not registered', async function () { + appInstance.owner.returns(appProvider.address); + datasetRegistry.isRegistered.whenCalledWith(datasetInstance.address).returns(false); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrders(domain, orders, ordersActors); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Dataset not registered'); + }); + + it('Should fail when invalid dataset order signature from EOA', async function () { + appInstance.owner.returns(appProvider.address); + datasetInstance.owner.returns(datasetProvider.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrder(domain, orders.app, appProvider); + await signOrder(domain, orders.dataset, anyone); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Invalid dataset order signature'); + }); + + it('Should fail when invalid dataset order signature from contract', async function () { + const erc1271Instance = await createFakeERC1271(); + appInstance.owner.returns(appProvider.address); + datasetInstance.owner.returns(erc1271Instance.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrder(domain, orders.app, appProvider); + orders.dataset.sign = someSignature; + const datasetOrderHash = hashOrder(domain, orders.dataset); + whenERC1271CalledThenReplyInvalidSignature( + erc1271Instance, + datasetOrderHash, + someSignature, + ); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Invalid dataset order signature'); + await expectERC1271CalledOnceWith(erc1271Instance, datasetOrderHash, someSignature); + }); + + it('Should fail when workerpool not registered', async function () { + appInstance.owner.returns(appProvider.address); + datasetInstance.owner.returns(datasetProvider.address); + workerpoolRegistry.isRegistered + .whenCalledWith(workerpoolInstance.address) + .returns(false); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrders(domain, orders, ordersActors); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Workerpool not registered'); + }); + + it('Should fail when invalid workerpool order signature from EOA', async function () { + appInstance.owner.returns(appProvider.address); + datasetInstance.owner.returns(datasetProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrder(domain, orders.app, appProvider); + await signOrder(domain, orders.dataset, datasetProvider); + await signOrder(domain, orders.workerpool, anyone); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Invalid workerpool order signature'); + }); + + it('Should fail when invalid workerpool order signature from contract', async function () { + const erc1271Instance = await createFakeERC1271(); + appInstance.owner.returns(appProvider.address); + datasetInstance.owner.returns(datasetProvider.address); + workerpoolInstance.owner.returns(erc1271Instance.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrder(domain, orders.app, appProvider); + await signOrder(domain, orders.dataset, datasetProvider); + orders.workerpool.sign = someSignature; + const workerpoolOrderHash = hashOrder(domain, orders.workerpool); + whenERC1271CalledThenReplyInvalidSignature( + erc1271Instance, + workerpoolOrderHash, + someSignature, + ); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Invalid workerpool order signature'); + await expectERC1271CalledOnceWith(erc1271Instance, workerpoolOrderHash, someSignature); + }); + + it('Should fail when invalid request order signature from EOA', async function () { + appInstance.owner.returns(appProvider.address); + datasetInstance.owner.returns(datasetProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrder(domain, orders.app, appProvider); + await signOrder(domain, orders.dataset, datasetProvider); + await signOrder(domain, orders.workerpool, scheduler); + await signOrder(domain, orders.requester, anyone); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Invalid request order signature'); + }); + + it('Should fail when invalid request order signature from contract', async function () { + const erc1271Instance = await createFakeERC1271(); + appInstance.owner.returns(appProvider.address); + datasetInstance.owner.returns(datasetProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: erc1271Instance.address, + }); + await signOrder(domain, orders.app, appProvider); + await signOrder(domain, orders.dataset, datasetProvider); + await signOrder(domain, orders.workerpool, scheduler); + orders.requester.sign = someSignature; + const requestOrderHash = hashOrder(domain, orders.requester); + whenERC1271CalledThenReplyInvalidSignature( + erc1271Instance, + requestOrderHash, + someSignature, + ); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: Invalid request order signature'); + await expectERC1271CalledOnceWith(erc1271Instance, requestOrderHash, someSignature); + }); + + it('Should fail if one or more orders are consumed', async function () { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + // Set volumes + orders.app.volume = 0; // nothing to consume + await signOrders(domain, orders, ordersActors); + + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('PocoBoost: One or more orders consumed'); + }); + + it('Should fail when requester has insufficient balance', async () => { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + + const dealPrice = (appPrice + datasetPrice + workerpoolPrice) * volume; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + }); + + const initialRequesterBalance = 2; + await iexecPocoBoostInstance.setVariables({ + [BALANCES]: { + [requester.address]: initialRequesterBalance, // Way less than dealPrice. + }, + }); + expect( + await iexecPocoBoostInstance.getVariable(BALANCES, [requester.address]), + ).to.be.lessThan(dealPrice); + + await signOrders(domain, orders, ordersActors); + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('IexecEscrow: Transfer amount exceeds balance'); + }); + + it('Should fail when scheduler has insufficient balance', async () => { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + const dealPrice = (appPrice + datasetPrice + workerpoolPrice) * volume; + const schedulerStake = computeSchedulerDealStake(workerpoolPrice, volume); + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + }); + + const initialRequesterBalance = 2; + const initialSchedulerBalance = 3; // Way less than what is needed as stake. + await iexecPocoBoostInstance.setVariables({ + [BALANCES]: { + [requester.address]: initialRequesterBalance + dealPrice, + [scheduler.address]: initialSchedulerBalance, + }, + }); + // Make sure the tx does not fail because of requester's balance. + expect( + await iexecPocoBoostInstance.getVariable(BALANCES, [requester.address]), + ).to.be.greaterThan(dealPrice); + // Make sure the scheduler does not have enough to stake. + expect( + await iexecPocoBoostInstance.getVariable(BALANCES, [scheduler.address]), + ).to.be.lessThan(schedulerStake); + + await signOrders(domain, orders, ordersActors); + await expect( + iexecPocoBoostInstance.matchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('IexecEscrow: Transfer amount exceeds balance'); + }); + it('Should fail when sponsor has insufficient balance', async () => { + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + + const dealPrice = (appPrice + datasetPrice + workerpoolPrice) * volume; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + }); + + const initialSponsorBalance = 2; + await iexecPocoBoostInstance.setVariables({ + [BALANCES]: { + [sponsor.address]: initialSponsorBalance, // Way less than dealPrice. + }, + }); + expect( + await iexecPocoBoostInstance.getVariable(BALANCES, [sponsor.address]), + ).to.be.lessThan(dealPrice); + + await signOrders(domain, orders, ordersActors); + await expect( + iexecPocoBoostInstance + .connect(sponsor) + .sponsorMatchOrdersBoost(...orders.toArray()), + ).to.be.revertedWith('IexecEscrow: Transfer amount exceeds balance'); + }); + }); + + describe('Push Result Boost', function () { + beforeEach('mock app, dataset and workerpool', async () => { + // Mock app, dataset and workerpool here before each test so + // matchOrdersBoost setup will be lighter when unit testing + // pushResultBoost + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + }); + + it('Should push result (TEE & callback)', async function () { + workerpoolInstance.m_schedulerRewardRatioPolicy.returns(schedulerRewardRatio); + const taskPrice = appPrice + datasetPrice + workerpoolPrice; + const volume = 3; + const dealPrice = taskPrice * volume; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + prices: ordersPrices, + volume: volume, + callback: oracleConsumerInstance.address, + }); + const initialIexecPocoBalance = 1; + const initialRequesterBalance = 2; + const initialRequesterFrozen = 3; + const initialWorkerBalance = 4; + const initialAppOwnerBalance = 5; + const initialDatasetOwnerBalance = 6; + const initialSchedulerBalance = 7; + const initialKitty = 10_000_000_010; // MIN_KITTY * 10 + 10, + const schedulerDealStake = computeSchedulerDealStake(workerpoolPrice, volume); + const schedulerTaskStake = schedulerDealStake / volume; + // Setup: MIN_REWARD < reward < available + // Further assertion on scheduler kitty reward will fail if the + // KITTY_RATIO constant is someday updated in the source code. + const expectedSchedulerKittyRewardForTask1 = + (initialKitty * // total kitty + 10) / // KITTY_RATIO + 100; // percentage + + await iexecPocoBoostInstance.setVariables({ + [BALANCES]: { + [iexecPocoBoostInstance.address]: initialIexecPocoBalance + initialKitty, + [requester.address]: initialRequesterBalance + dealPrice, + [worker.address]: initialWorkerBalance, + [scheduler.address]: initialSchedulerBalance + schedulerDealStake, + [appProvider.address]: initialAppOwnerBalance, + [datasetProvider.address]: initialDatasetOwnerBalance, + }, + [FROZENS]: { + [requester.address]: initialRequesterFrozen, + [kittyAddress]: initialKitty, + }, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + const startTime = await setNextBlockTimestamp(); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclave.address, + scheduler, + ); + const { resultsCallback, callbackResultDigest } = buildResultCallbackAndDigest(123); + const enclaveSignature = await buildAndSignEnclaveMessage( + worker.address, + taskId, + callbackResultDigest, + enclave, + ); + await time.setNextBlockTimestamp( + startTime + + 7 * 60 - // deadline + 1, // push result 1 second before deadline + ); + // Check pocoboost smart contract balance + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance + dealPrice + schedulerDealStake + initialKitty, + ); + // Check requester balance and frozen + await expectBalance(iexecPocoBoostInstance, requester.address, initialRequesterBalance); + await expectFrozen( + iexecPocoBoostInstance, + requester.address, + initialRequesterFrozen + dealPrice, + ); + // Check worker balance + await expectBalance(iexecPocoBoostInstance, worker.address, initialWorkerBalance); + // Check scheduler balance and frozen + await expectBalance(iexecPocoBoostInstance, scheduler.address, initialSchedulerBalance); + await expectFrozen(iexecPocoBoostInstance, scheduler.address, schedulerDealStake); + // Check kitty frozen + await expectFrozen(iexecPocoBoostInstance, kittyAddress, initialKitty); + // Check app provider balance + await expectBalance( + iexecPocoBoostInstance, + appProvider.address, + initialAppOwnerBalance, + ); + // Check dataset provider balance + await expectBalance( + iexecPocoBoostInstance, + datasetProvider.address, + initialDatasetOwnerBalance, + ); + const expectedWorkerReward = (await viewDealBoost(dealId)).workerReward.toNumber(); + // Worker reward formula already checked in match orders test, hence + // we just need to verify here that some worker reward value will be + // transferred + expect(expectedWorkerReward).to.be.greaterThan(0); + const expectedSchedulerBaseReward = workerpoolPrice - expectedWorkerReward; + const expectedSchedulerFullReward = + expectedSchedulerBaseReward + expectedSchedulerKittyRewardForTask1; + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + resultsCallback, + schedulerSignature, + enclave.address, + enclaveSignature, + ), + ) + .to.emit(iexecPocoBoostInstance, 'Seize') + .withArgs(requester.address, taskPrice, taskId) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecPocoBoostInstance.address, worker.address, expectedWorkerReward) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(worker.address, expectedWorkerReward, taskId) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecPocoBoostInstance.address, appProvider.address, appPrice) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(appProvider.address, appPrice, taskId) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecPocoBoostInstance.address, datasetProvider.address, datasetPrice) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(datasetProvider.address, datasetPrice, taskId) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecPocoBoostInstance.address, scheduler.address, schedulerTaskStake) + .to.emit(iexecPocoBoostInstance, 'Unlock') + .withArgs(scheduler.address, schedulerTaskStake) + .to.emit(iexecPocoBoostInstance, 'Seize') + .withArgs(kittyAddress, expectedSchedulerKittyRewardForTask1, taskId) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs( + iexecPocoBoostInstance.address, + scheduler.address, + expectedSchedulerFullReward, + ) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(scheduler.address, expectedSchedulerFullReward, taskId) + .to.emit(iexecPocoBoostInstance, 'ResultPushedBoost') + .withArgs(dealId, taskIndex, results); + expect(oracleConsumerInstance.receiveResult).to.have.been.calledOnceWith( + taskId, + resultsCallback, + ); + /** + * Task status verification is delegated to related integration test. + * + * Smock does not support getting struct variable from a mapping: + * https://github.com/defi-wonderland/smock/blame/v2.3.5/docs/source/mocks.rst#L141 + * + * 1.`IexecAccessors` contract is not deployed within this unit test + * suite, hence `viewTask` method is not available. + * 2. Another option would be to duplicate the `viewTask` method in + * `IexecPocoBoostDelegate` contract but this method is not required + * in production. + * 3. It could be also possible to create a new contract for unit test + * to wrap `IexecPocoBoostDelegate` and attach `viewTask` feature. + */ + const remainingTasksToPush = volume - 1; + // Check PoCo boost smart contract balance + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance + + (taskPrice + schedulerTaskStake) * remainingTasksToPush + + initialKitty - + expectedSchedulerKittyRewardForTask1, + ); + // Check requester balance and frozen + await expectBalance(iexecPocoBoostInstance, requester.address, initialRequesterBalance); + await expectFrozen( + iexecPocoBoostInstance, + requester.address, + initialRequesterFrozen + taskPrice * remainingTasksToPush, + ); + // Check worker balance + await expectBalance( + iexecPocoBoostInstance, + worker.address, + initialWorkerBalance + expectedWorkerReward, + ); + // Check app provider balance + await expectBalance( + iexecPocoBoostInstance, + appProvider.address, + initialAppOwnerBalance + appPrice, + ); + // Check dataset provider balance + await expectBalance( + iexecPocoBoostInstance, + datasetProvider.address, + initialDatasetOwnerBalance + datasetPrice, + ); + // Check scheduler balance and frozen + await expectBalance( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerBalance + schedulerTaskStake + expectedSchedulerFullReward, + ); + await expectFrozen( + iexecPocoBoostInstance, + scheduler.address, + schedulerTaskStake * remainingTasksToPush, + ); + // Check kitty frozen + await expectFrozen( + iexecPocoBoostInstance, + kittyAddress, + initialKitty - expectedSchedulerKittyRewardForTask1, + ); + }); + + it('Should push result (TEE with contribution authorization signed by scheduler)', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclave.address, + scheduler, + ); + const enclaveSignature = await buildAndSignEnclaveMessage( + worker.address, + taskId, + resultDigest, + enclave, + ); + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + constants.NULL.BYTES32, + schedulerSignature, + enclave.address, + enclaveSignature, + ), + ) + .to.emit(iexecPocoBoostInstance, 'ResultPushedBoost') + .withArgs(dealId, taskIndex, results); + }); + + it('Should push result (TEE with contribution authorization signed by broker)', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + }); + const teeBrokerAddr = teeBroker.address; + await iexecPocoBoostInstance.setVariable('m_teebroker', teeBrokerAddr); + + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const teeBrokerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclave.address, + teeBroker, + ); + const enclaveSignature = await buildAndSignEnclaveMessage( + worker.address, + taskId, + resultDigest, + enclave, + ); + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + constants.NULL.BYTES32, + teeBrokerSignature, + enclave.address, + enclaveSignature, + ), + ) + .to.emit(iexecPocoBoostInstance, 'ResultPushedBoost') + .withArgs(dealId, taskIndex, results); + }); + + it('Should push result', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const emptyEnclaveAddress = constants.NULL.ADDRESS; + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ); + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + constants.NULL.BYTES32, + schedulerSignature, + emptyEnclaveAddress, + constants.NULL.SIGNATURE, + ), + ) + .to.emit(iexecPocoBoostInstance, 'ResultPushedBoost') + .withArgs(dealId, taskIndex, results); + }); + + it('Should push result even if callback target is not a contract', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + callback: ethers.Wallet.createRandom().address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const resultsCallback = '0xab'; + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + resultsCallback, + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclave.address, + scheduler, + ), + enclave.address, + await buildAndSignEnclaveMessage( + worker.address, + taskId, + ethers.utils.keccak256(resultsCallback), + enclave, + ), + ), + ).to.emit(iexecPocoBoostInstance, 'ResultPushedBoost'); + }); + + it('Should push result even if callback reverts', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + callback: oracleConsumerInstance.address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const resultsCallback = '0xab'; + oracleConsumerInstance.receiveResult.reverts(); + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + resultsCallback, + await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclave.address, + scheduler, + ), + enclave.address, + await buildAndSignEnclaveMessage( + worker.address, + taskId, + ethers.utils.keccak256(resultsCallback), + enclave, + ), + ), + ) + .to.emit(iexecPocoBoostInstance, 'ResultPushedBoost') + /** + * Oracle consumer has been called but did not succeed. + */ + .to.not.emit(oracleConsumerInstance, 'GotResult'); + expect(oracleConsumerInstance.receiveResult).to.have.been.calledOnceWith( + taskId, + resultsCallback, + ); + }); + + it('Should push result even if callback consumes maximum gas', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + callback: gasWasterClientInstance.address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const { resultsCallback } = buildResultCallbackAndDigest(123); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + constants.NULL.ADDRESS, + scheduler, + ); + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + resultsCallback, + schedulerSignature, + constants.NULL.ADDRESS, + constants.NULL.SIGNATURE, + ), + ) + .to.emit(iexecPocoBoostInstance, 'ResultPushedBoost') + /** + * Gas waster client has been called but run out-of-gas. + */ + .to.not.emit(gasWasterClientInstance, 'GotResult'); + expect(gasWasterClientInstance.receiveResult).to.have.been.calledOnceWith( + taskId, + resultsCallback, + ); + }); + + it('Should not push result if wrong deal ID', async function () { + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + '0x00000000000000000000000000000000000000000000000000000000fac6dea1', + taskIndex, + '0x', + constants.NULL.BYTES32, + constants.NULL.SIGNATURE, + constants.NULL.ADDRESS, + constants.NULL.SIGNATURE, + ), + ).to.be.revertedWith('PocoBoost: Unknown task'); + }); + + it('Should not push result if out-of-range task index', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + + await expect( + iexecPocoBoostInstance.connect(worker).pushResultBoost( + dealId, // existing deal + 1, // only task index 0 would be authorized with this deal volume of 1 + '0x', + constants.NULL.BYTES32, + constants.NULL.SIGNATURE, + constants.NULL.ADDRESS, + constants.NULL.SIGNATURE, + ), + ).to.be.revertedWith('PocoBoost: Unknown task'); + }); + + it('Should not push result twice', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const emptyEnclaveAddress = constants.NULL.ADDRESS; + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + emptyEnclaveAddress, + scheduler, + ); + const pushResultBoost: () => Promise = () => + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + constants.NULL.BYTES32, + schedulerSignature, + emptyEnclaveAddress, + constants.NULL.SIGNATURE, + ); + + // Push result + await expect(pushResultBoost()).to.emit(iexecPocoBoostInstance, 'ResultPushedBoost'); + // Push result a second time + await expect(pushResultBoost()).to.be.revertedWith('PocoBoost: Task status not unset'); + }); + + it('Should not push result after deadline', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrders(domain, orders, ordersActors); + const startTime = await setNextBlockTimestamp(); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + await time.setNextBlockTimestamp(startTime + 7 * 60); // push result on deadline + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + getDealId(domain, orders.requester, taskIndex), + taskIndex, + results, + constants.NULL.BYTES32, + constants.NULL.SIGNATURE, + enclave.address, + constants.NULL.SIGNATURE, + ), + ).to.be.revertedWith('PocoBoost: Deadline reached'); + }); + + it('Should not push result without enclave challenge for TEE task', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + constants.NULL.BYTES32, + constants.NULL.SIGNATURE, + constants.NULL.ADDRESS, + constants.NULL.SIGNATURE, + ), + ).to.be.revertedWith('PocoBoost: Tag requires enclave challenge'); + }); + + it('Should not push result with invalid scheduler signature', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrders(domain, orders, ordersActors); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const anyoneSignature = anyone.signMessage(constants.NULL.BYTES32); + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + getDealId(domain, orders.requester, taskIndex), + taskIndex, + results, + constants.NULL.BYTES32, + anyoneSignature, + enclave.address, + constants.NULL.SIGNATURE, + ), + ).to.be.revertedWith('PocoBoost: Invalid contribution authorization signature'); + }); + + it('Should not push result with invalid broker signature', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await iexecPocoBoostInstance.setVariable('m_teebroker', teeBroker.address); + + await signOrders(domain, orders, ordersActors); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const anyoneSignature = anyone.signMessage(constants.NULL.BYTES32); + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + getDealId(domain, orders.requester, taskIndex), + taskIndex, + results, + constants.NULL.BYTES32, + anyoneSignature, + enclave.address, + constants.NULL.SIGNATURE, + ), + ).to.be.revertedWith('PocoBoost: Invalid contribution authorization signature'); + }); + + it('Should not push result with invalid enclave signature', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + }); + + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + getTaskId(dealId, taskIndex), + enclave.address, + scheduler, + ); + const anyoneSignature = anyone.signMessage(constants.NULL.BYTES32); + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + constants.NULL.BYTES32, + schedulerSignature, + enclave.address, + anyoneSignature, + ), + ).to.be.revertedWith('PocoBoost: Invalid enclave signature'); + }); + + it('Should not push result with missing data for callback', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + tag: teeDealTag, + callback: ethers.Wallet.createRandom().address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + enclave.address, + scheduler, + ); + const resultsCallback = '0x'; + const enclaveSignature = await buildAndSignEnclaveMessage( + worker.address, + taskId, + ethers.utils.keccak256(resultsCallback), + enclave, + ); + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + resultsCallback, + schedulerSignature, + enclave.address, + enclaveSignature, + ), + ).to.be.revertedWith('PocoBoost: Callback requires data'); + }); + + it('Should not push result without enough gas for callback', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + callback: gasWasterClientInstance.address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const { resultsCallback } = buildResultCallbackAndDigest(123); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + constants.NULL.ADDRESS, + scheduler, + ); + const pushResultArgs = [ + dealId, + taskIndex, + results, + resultsCallback, + schedulerSignature, + constants.NULL.ADDRESS, + constants.NULL.SIGNATURE, + ] as [BytesLike, BigNumberish, BytesLike, BytesLike, BytesLike, string, BytesLike]; + const successfulTxGasLimit = await iexecPocoBoostInstance + .connect(worker) + .estimateGas.pushResultBoost(...pushResultArgs); + const failingTxGaslimit = successfulTxGasLimit.sub( + BigNumber.from(CALLBACK_GAS).div(63), + ); // Forward to consumer contract less gas than it has the right to consume + + await expect( + iexecPocoBoostInstance + .connect(worker) + .pushResultBoost(...pushResultArgs, { gasLimit: failingTxGaslimit }), + ).to.be.revertedWith('PocoBoost: Not enough gas after callback'); + }); + }); + + describe('Claim task Boost', function () { + beforeEach('mock app, dataset and workerpool', async () => { + // Mock app, dataset and workerpool here before each test so + // matchOrdersBoost setup will be lighter when unit testing + // claimBoost + appInstance.owner.returns(appProvider.address); + workerpoolInstance.owner.returns(scheduler.address); + datasetInstance.owner.returns(datasetProvider.address); + }); + + it('Should claim', async function () { + const expectedVolume = 3; // > 1 to explicit taskPrice vs dealPrice + const claimedTasks = 1; + const taskPrice = appPrice + datasetPrice + workerpoolPrice; + const dealPrice = taskPrice * expectedVolume; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume: expectedVolume, + }); + await signOrders(domain, orders, ordersActors); + const initialIexecPocoBalance = 1; + const initialRequesterBalance = 2; + const initialRequesterFrozen = 3; + const initialSchedulerBalance = 4; + const initialSchedulerFrozen = 5; + const initialKitty = 6; + const initialFrozenKitty = 6; + const schedulerDealStake = computeSchedulerDealStake(workerpoolPrice, expectedVolume); + const schedulerTaskStake = schedulerDealStake / expectedVolume; + await iexecPocoBoostInstance.setVariables({ + [BALANCES]: { + [iexecPocoBoostInstance.address]: initialIexecPocoBalance, + [requester.address]: initialRequesterBalance + dealPrice, + [scheduler.address]: initialSchedulerBalance + schedulerDealStake, + [kittyAddress]: initialKitty, + }, + [FROZENS]: { + [requester.address]: initialRequesterFrozen, + [scheduler.address]: initialSchedulerFrozen, + [kittyAddress]: initialFrozenKitty, + }, + }); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + const startTime = await setNextBlockTimestamp(); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + // Check poco boost balance + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance + dealPrice + schedulerDealStake, + ); + // Check requester balance and frozen + await expectBalance(iexecPocoBoostInstance, requester.address, initialRequesterBalance); + await expectFrozen( + iexecPocoBoostInstance, + requester.address, + initialRequesterFrozen + dealPrice, + ); + // Check scheduler balance and frozen + await expectBalance(iexecPocoBoostInstance, scheduler.address, initialSchedulerBalance); + await expectFrozen( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerFrozen + schedulerDealStake, + ); + + // Check kitty balance and frozen + await expectBalance(iexecPocoBoostInstance, kittyAddress, initialKitty); + await expectFrozen(iexecPocoBoostInstance, kittyAddress, initialFrozenKitty); + await time.setNextBlockTimestamp(startTime + 7 * 60); // claim on deadline + + await expect(iexecPocoBoostInstance.connect(worker).claimBoost(dealId, taskIndex)) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecPocoBoostInstance.address, requester.address, taskPrice) + .to.emit(iexecPocoBoostInstance, 'Unlock') + .withArgs(requester.address, taskPrice) + .to.emit(iexecPocoBoostInstance, 'Seize') + .withArgs(scheduler.address, schedulerTaskStake, taskId) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(kittyAddress, schedulerTaskStake, taskId) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(kittyAddress, schedulerTaskStake) + .to.emit(iexecPocoBoostInstance, 'TaskClaimed') + .withArgs(taskId); + + const remainingTasksToClaim = expectedVolume - claimedTasks; + // Task status verification is delegated to related integration test. + // Check poco boost balance + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance + + taskPrice * remainingTasksToClaim + // requester has 2nd & 3rd task locked + schedulerDealStake, // kitty value since 1st task seized + ); + // Check requester balance and frozen + await expectBalance( + iexecPocoBoostInstance, + requester.address, + initialRequesterBalance + taskPrice * claimedTasks, + ); + await expectFrozen( + iexecPocoBoostInstance, + requester.address, + initialRequesterFrozen + taskPrice * remainingTasksToClaim, // 2nd & 3rd tasks can still be claimed + ); + // Check scheduler balance and frozen + await expectBalance(iexecPocoBoostInstance, scheduler.address, initialSchedulerBalance); + await expectFrozen( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerFrozen + schedulerTaskStake * remainingTasksToClaim, + ); + // Check kitty reward balance and frozen + await expectBalance(iexecPocoBoostInstance, kittyAddress, initialKitty); + await expectFrozen( + iexecPocoBoostInstance, + kittyAddress, + initialFrozenKitty + schedulerTaskStake * claimedTasks, + ); + }); + + it('Should claim two tasks', async function () { + const expectedVolume = 3; // > 1 to explicit taskPrice vs dealPrice + const tasksToClaim = 2; + const taskPrice = appPrice + datasetPrice + workerpoolPrice; + const dealPrice = taskPrice * expectedVolume; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume: expectedVolume, + }); + await signOrders(domain, orders, ordersActors); + const initialIexecPocoBalance = 1; + const initialRequesterBalance = 2; + const initialRequesterFrozen = 3; + const initialSchedulerBalance = 4; + const initialSchedulerFrozen = 5; + const initialKitty = 6; + const initialFrozenKitty = 6; + const schedulerDealStake = computeSchedulerDealStake(workerpoolPrice, expectedVolume); + const schedulerTaskStake = schedulerDealStake / expectedVolume; + await iexecPocoBoostInstance.setVariables({ + [BALANCES]: { + [iexecPocoBoostInstance.address]: initialIexecPocoBalance, + [requester.address]: initialRequesterBalance + dealPrice, + [scheduler.address]: initialSchedulerBalance + schedulerDealStake, + [kittyAddress]: initialKitty, + }, + [FROZENS]: { + [requester.address]: initialRequesterFrozen, + [scheduler.address]: initialSchedulerFrozen, + [kittyAddress]: initialFrozenKitty, + }, + }); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + const startTime = await setNextBlockTimestamp(); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + // Check poco boost balance + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance + dealPrice + schedulerDealStake, + ); + // Check requester balance and frozen + await expectBalance(iexecPocoBoostInstance, requester.address, initialRequesterBalance); + await expectFrozen( + iexecPocoBoostInstance, + requester.address, + initialRequesterFrozen + dealPrice, + ); + // Check scheduler balance and frozen + await expectBalance(iexecPocoBoostInstance, scheduler.address, initialSchedulerBalance); + await expectFrozen( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerFrozen + schedulerDealStake, + ); + // Check kitty balance and frozen + await expectBalance(iexecPocoBoostInstance, kittyAddress, initialKitty); + await expectFrozen(iexecPocoBoostInstance, kittyAddress, initialFrozenKitty); + await time.setNextBlockTimestamp(startTime + 7 * 60); // claim on deadline + for (let index = 0; index < tasksToClaim; index++) { + await iexecPocoBoostInstance.connect(worker).claimBoost(dealId, index); + const claimedTasks = index + 1; + const remainingTasksToClaim = expectedVolume - claimedTasks; + // Verifications after claiming "claimedTasks" tasks. + // Check poco boost balance + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance + + taskPrice * remainingTasksToClaim + // requester has still remainingTasksToClaim task locked + schedulerDealStake, // stake of remaining tasks to claim + seized stake of claimed tasks moved to kitty + ); + // Check requester balance and frozen. + await expectBalance( + iexecPocoBoostInstance, + requester.address, + initialRequesterBalance + taskPrice * claimedTasks, + ); + await expectFrozen( + iexecPocoBoostInstance, + requester.address, + initialRequesterFrozen + taskPrice * remainingTasksToClaim, + ); + // Check scheduler balance and frozen + await expectBalance( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerBalance, + ); + await expectFrozen( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerFrozen + schedulerTaskStake * remainingTasksToClaim, + ); + // Check kitty reward balance and frozen + await expectBalance(iexecPocoBoostInstance, kittyAddress, initialKitty); + await expectFrozen( + iexecPocoBoostInstance, + kittyAddress, + initialFrozenKitty + schedulerTaskStake * claimedTasks, + ); + } + }); + + it('Should claim by anyone when match orders is sponsored', async function () { + const expectedVolume = 3; // > 1 to explicit taskPrice vs dealPrice + const claimedTasks = 1; + const taskPrice = appPrice + datasetPrice + workerpoolPrice; + const dealPrice = taskPrice * expectedVolume; + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + prices: ordersPrices, + volume: expectedVolume, + }); + await signOrders(domain, orders, ordersActors); + const initialIexecPocoBalance = 1; + const initialRequesterBalance = 2; + const initialRequesterFrozen = 3; + const initialSchedulerBalance = 4; + const initialSchedulerFrozen = 5; + const initialKitty = 6; + const initialFrozenKitty = 6; + const initialSponsorBalance = 7; + const initialSponsorFrozen = 8; + const schedulerDealStake = computeSchedulerDealStake(workerpoolPrice, expectedVolume); + const schedulerTaskStake = schedulerDealStake / expectedVolume; + await iexecPocoBoostInstance.setVariables({ + [BALANCES]: { + [iexecPocoBoostInstance.address]: initialIexecPocoBalance, + [requester.address]: initialRequesterBalance, + [sponsor.address]: initialSponsorBalance + dealPrice, + [scheduler.address]: initialSchedulerBalance + schedulerDealStake, + [kittyAddress]: initialKitty, + }, + [FROZENS]: { + [requester.address]: initialRequesterFrozen, + [sponsor.address]: initialSponsorFrozen, + [scheduler.address]: initialSchedulerFrozen, + [kittyAddress]: initialFrozenKitty, + }, + }); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + const startTime = await setNextBlockTimestamp(); + await iexecPocoBoostInstance + .connect(sponsor) + .sponsorMatchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + // Check poco boost balance + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance + dealPrice + schedulerDealStake, + ); + // Check requester balance and frozen + await expectBalance(iexecPocoBoostInstance, requester.address, initialRequesterBalance); + await expectFrozen(iexecPocoBoostInstance, requester.address, initialRequesterFrozen); + // Check sponsor balance and frozen + await expectBalance(iexecPocoBoostInstance, sponsor.address, initialSponsorBalance); + await expectFrozen( + iexecPocoBoostInstance, + sponsor.address, + initialSponsorFrozen + dealPrice, + ); + // Check scheduler balance and frozen + await expectBalance(iexecPocoBoostInstance, scheduler.address, initialSchedulerBalance); + await expectFrozen( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerFrozen + schedulerDealStake, + ); + + // Check kitty balance and frozen + await expectBalance(iexecPocoBoostInstance, kittyAddress, initialKitty); + await expectFrozen(iexecPocoBoostInstance, kittyAddress, initialFrozenKitty); + await time.setNextBlockTimestamp(startTime + 7 * 60); // claim on deadline + + await expect(iexecPocoBoostInstance.connect(anyone).claimBoost(dealId, taskIndex)) + .to.emit(iexecPocoBoostInstance, 'Transfer') + .withArgs(iexecPocoBoostInstance.address, sponsor.address, taskPrice) + .to.emit(iexecPocoBoostInstance, 'Unlock') + .withArgs(sponsor.address, taskPrice) + .to.emit(iexecPocoBoostInstance, 'Seize') + .withArgs(scheduler.address, schedulerTaskStake, taskId) + .to.emit(iexecPocoBoostInstance, 'Reward') + .withArgs(kittyAddress, schedulerTaskStake, taskId) + .to.emit(iexecPocoBoostInstance, 'Lock') + .withArgs(kittyAddress, schedulerTaskStake) + .to.emit(iexecPocoBoostInstance, 'TaskClaimed') + .withArgs(taskId); + + const remainingTasksToClaim = expectedVolume - claimedTasks; + // Task status verification is delegated to related integration test. + // Check poco boost balance + await expectBalance( + iexecPocoBoostInstance, + iexecPocoBoostInstance.address, + initialIexecPocoBalance + + taskPrice * remainingTasksToClaim + // requester has 2nd & 3rd task locked + schedulerDealStake, // kitty value since 1st task seized + ); + // Check requester balance and frozen + await expectBalance(iexecPocoBoostInstance, requester.address, initialRequesterBalance); + await expectFrozen(iexecPocoBoostInstance, requester.address, initialRequesterFrozen); + // Check sponsor balance and frozen + await expectBalance( + iexecPocoBoostInstance, + sponsor.address, + initialSponsorBalance + taskPrice * claimedTasks, + ); + await expectFrozen( + iexecPocoBoostInstance, + sponsor.address, + initialSponsorFrozen + taskPrice * remainingTasksToClaim, // 2nd & 3rd tasks can still be claimed + ); + // Check scheduler balance and frozen + await expectBalance(iexecPocoBoostInstance, scheduler.address, initialSchedulerBalance); + await expectFrozen( + iexecPocoBoostInstance, + scheduler.address, + initialSchedulerFrozen + schedulerTaskStake * remainingTasksToClaim, + ); + // Check kitty reward balance and frozen + await expectBalance(iexecPocoBoostInstance, kittyAddress, initialKitty); + await expectFrozen( + iexecPocoBoostInstance, + kittyAddress, + initialFrozenKitty + schedulerTaskStake * claimedTasks, + ); + }); + + it('Should not claim if wrong deal ID', async function () { + await expect( + iexecPocoBoostInstance + .connect(worker) + .claimBoost( + '0x00000000000000000000000000000000000000000000000000000000fac6dea1', + 0, + ), + ).to.be.revertedWith('PocoBoost: Unknown task'); + }); + + it('Should not claim if out-of-range task index', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + + await expect( + iexecPocoBoostInstance.connect(worker).claimBoost( + dealId, // existing deal + 1, // only task index 0 would be authorized with this deal volume of 1 + ), + ).to.be.revertedWith('PocoBoost: Unknown task'); + }); + + // Different test than other `Should not claim if task not unset` test + it('Should not claim twice', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const startTime = await setNextBlockTimestamp(); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + await time.setNextBlockTimestamp(startTime + 7 * 60); + // Claim + await expect( + iexecPocoBoostInstance.connect(worker).claimBoost(dealId, taskIndex), + ).to.emit(iexecPocoBoostInstance, 'TaskClaimed'); + // Claim a second time + await expect( + iexecPocoBoostInstance.connect(worker).claimBoost(dealId, taskIndex), + ).to.be.revertedWith('PocoBoost: Task status not unset'); + }); + + it('Should not claim if task not unset', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + const schedulerSignature = await buildAndSignContributionAuthorizationMessage( + worker.address, + taskId, + constants.NULL.ADDRESS, + scheduler, + ); + await iexecPocoBoostInstance + .connect(worker) + .pushResultBoost( + dealId, + taskIndex, + results, + constants.NULL.BYTES32, + schedulerSignature, + constants.NULL.ADDRESS, + constants.NULL.SIGNATURE, + ); + + await expect( + iexecPocoBoostInstance.connect(worker).claimBoost(dealId, taskIndex), + ).to.be.revertedWith('PocoBoost: Task status not unset'); + }); + + it('Should not claim before deadline', async function () { + const orders = buildOrders({ + assets: ordersAssets, + requester: requester.address, + }); + await signOrders(domain, orders, ordersActors); + const dealId = getDealId(domain, orders.requester, taskIndex); + const startTime = await setNextBlockTimestamp(); + await iexecPocoBoostInstance + .matchOrdersBoost(...orders.toArray()) + .then((tx) => tx.wait()); + await time.setNextBlockTimestamp( + startTime + + 7 * 60 - // claim + 1, // just before deadline + ); + + await expect( + iexecPocoBoostInstance.connect(worker).claimBoost(dealId, taskIndex), + ).to.be.revertedWith('PocoBoost: Deadline not reached'); + }); + }); + + /** + * @notice Smock does not support getting struct variable from a mapping. + */ + async function viewDealBoost(dealId: string) { + return await IexecPocoBoostAccessorsDelegate__factory.connect( + iexecPocoBoostInstance.address, + anyone, + ).viewDealBoost(dealId); + } +}); + +/** + * Create a fake ERC734 identity contract instance. + * @returns A fake ERC734 identity contract instance. + */ +async function createFakeErc734IdentityInstance() { + return await smock.fake(IERC734__factory); +} + +/** + * If the ERC734 identity contract is asked if a given candidate is in a group, then + * return true. + * @param erc734IdentityContractInstance A fake ERC734 identity contract instance. + * @param candidate The candidate that should belong to the group. + */ +function whenIdentityContractCalledForCandidateInGroupThenReturnTrue( + erc734IdentityContractInstance: FakeContract, + candidate: string, +) { + erc734IdentityContractInstance.keyHasPurpose + .whenCalledWith(addressToBytes32(candidate), groupMemberPurpose) + .returns(true); +} + +/** + * Expect that an ERC734 identity contract has been called a specific number of times + * for a given candidate in a group. + * @param erc734IdentityContractInstance A fake ERC734 identity contract instance. + * @param candidate The candidate that should belong to the group. + * @param expectedCalledCount The expected number of calls. + */ +function expectIdentityContractCalledForCandidateInGroup( + erc734IdentityContractInstance: FakeContract, + candidate: string, + expectedCalledCount: number, +) { + expect(erc734IdentityContractInstance.keyHasPurpose) + .to.have.been.calledWith(addressToBytes32(candidate), groupMemberPurpose) + .callCount(expectedCalledCount); +} + +/** + * Convert an address to a bytes32 prefixed with zeros. + * @param address The address to convert to bytes32. + * @returns The address in bytes32 format. + */ +function addressToBytes32(address: string): string { + return ethers.utils.hexZeroPad(address, 32).toLowerCase(); +} + +/** + * Create a fake ERC1271 contract. + * @returns A fake ERC1271 contract instance. + */ +async function createFakeERC1271() { + return await smock.fake(IERC1271__factory); +} + +/** + * Expect that an ERC1271 contract has been called once and replied that the + * signature was invalid. + * @param erc1271Instance A fake ERC1271 contract instance. + * @param orderHash The hash of the order. + * @param signature The signature to be considered as invalid. + */ +function whenERC1271CalledThenReplyInvalidSignature( + erc1271Instance: FakeContract, + orderHash: string, + signature: string, +) { + erc1271Instance.isValidSignature.whenCalledWith(orderHash, signature).returns('0x00000000'); +} + +/** + * Expect an ERC1271 contract to have been called once. + * @param erc1271Instance A fake ERC1271 contract instance. + * @param orderHash The hash of the order. + */ +async function expectERC1271CalledOnceWith( + erc1271Instance: FakeContract, + orderHash: string, + signature: string, +) { + expect(erc1271Instance.isValidSignature).be.have.been.calledOnceWith(orderHash, signature); +} + +/** + * Compute the amount of RLC to be staked by the scheduler + * for a deal. We first compute the percentage by task + * (See contracts/Store.sol#WORKERPOOL_STAKE_RATIO), then + * compute the total amount according to the volume. + * @param workerpoolPrice + * @param volume number of tasks in the deal + * @returns amount of total stake + */ +function computeSchedulerDealStake(workerpoolPrice: number, volume: number) { + return ((workerpoolPrice * WORKERPOOL_STAKE_RATIO) / 100) * volume; +} + +async function expectOrderConsumed( + iexecPocoInstance: MockContract, + orderHash: string, + expectedConsumedVolume: number | undefined, +) { + try { + expect(await iexecPocoInstance.getVariable('m_consumed', [orderHash])).to.equal( + expectedConsumedVolume, + ); + } catch (e) { + if (expectedConsumedVolume == undefined) { + expect((e as Error).message).to.contain( + 'invalid BigNumber string (argument="value", value="0x"', + ); + return; + } + assert(false); //revert + } +} + +async function expectBalance( + iexecPocoInstance: MockContract, + account: string, + expectedBalanceValue: number, +) { + expect(await iexecPocoInstance.getVariable(BALANCES, [account])).to.equal(expectedBalanceValue); +} + +async function expectFrozen( + iexecPocoInstance: MockContract, + account: string, + expectedFrozenValue: number, +) { + expect(await iexecPocoInstance.getVariable(FROZENS, [account])).to.equal(expectedFrozenValue); +} diff --git a/test/byContract/IexecRelay/IexecRelay.js b/test/byContract/IexecRelay/IexecRelay.js index d011973c5..9b497c0a0 100644 --- a/test/byContract/IexecRelay/IexecRelay.js +++ b/test/byContract/IexecRelay/IexecRelay.js @@ -1,345 +1,403 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 +const loadTruffleFixtureDeployment = require('../../../scripts/truffle-fixture-deployer'); // Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; +var DEPLOYMENT = require('../../../config/config.json').chains.default; // Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); +var RLC = artifacts.require('rlc-faucet-contract/contracts/RLC'); +var ERC1538Proxy = artifacts.require('iexec-solidity/ERC1538Proxy'); +var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); +var AppRegistry = artifacts.require('AppRegistry'); +var DatasetRegistry = artifacts.require('DatasetRegistry'); +var WorkerpoolRegistry = artifacts.require('WorkerpoolRegistry'); +var App = artifacts.require('App'); +var Dataset = artifacts.require('Dataset'); +var Workerpool = artifacts.require('Workerpool'); -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); +const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); +const tools = require('../../../utils/tools'); +const enstools = require('../../../utils/ens-tools'); +const odbtools = require('../../../utils/odb-tools'); +const constants = require('../../../utils/constants'); -Object.extract = (obj, keys) => keys.map(key => obj[key]); +Object.extract = (obj, keys) => keys.map((key) => obj[key]); contract('Relay', async (accounts) => { + assert.isAtLeast(accounts.length, 10, 'should have at least 10 accounts'); + let iexecAdmin = null; + let appProvider = null; + let datasetProvider = null; + let scheduler = null; + let worker1 = null; + let worker2 = null; + let worker3 = null; + let worker4 = null; + let worker5 = null; + let user = null; - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; + var RLCInstance = null; + var IexecInstance = null; + var AppRegistryInstance = null; + var DatasetRegistryInstance = null; + var WorkerpoolRegistryInstance = null; - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; + var AppInstance = null; + var DatasetInstance = null; + var WorkerpoolInstance = null; - var AppInstance = null; - var DatasetInstance = null; - var WorkerpoolInstance = null; + var apporder = null; + var datasetorder = null; + var workerpoolorder = null; + var requestorder = null; - var apporder = null; - var datasetorder = null; - var workerpoolorder = null; - var requestorder = null; + /*************************************************************************** + * Environment configuration * + ***************************************************************************/ + before('configure', async () => { + await loadTruffleFixtureDeployment(); + console.log('# web3 version:', web3.version); - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); + /** + * Retreive deployed contracts + */ + IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); + AppRegistryInstance = await AppRegistry.deployed(); + DatasetRegistryInstance = await DatasetRegistry.deployed(); + WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); + ERC712_domain = await IexecInstance.domain(); + RLCInstance = + DEPLOYMENT.asset == 'Native' + ? { address: constants.NULL.ADDRESS } + : await RLC.at(await IexecInstance.token()); - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); + broker = new odbtools.Broker(IexecInstance); + iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); + appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); + datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); + scheduler = new odbtools.Scheduler(IexecInstance, accounts[3]); + worker1 = new odbtools.Worker(IexecInstance, accounts[4]); + worker2 = new odbtools.Worker(IexecInstance, accounts[5]); + worker3 = new odbtools.Worker(IexecInstance, accounts[6]); + worker4 = new odbtools.Worker(IexecInstance, accounts[7]); + worker5 = new odbtools.Worker(IexecInstance, accounts[8]); + user = new odbtools.iExecAgent(IexecInstance, accounts[9]); + await broker.initialize(); + }); - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); + describe('โ†’ setup', async () => { + describe('assets', async () => { + describe('app', async () => { + it('create', async () => { + txMined = await AppRegistryInstance.createApp( + appProvider.address, + 'R Clifford Attractors', + 'DOCKER', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + '0x', + { from: appProvider.address }, + ); + events = tools.extractEvents(txMined, AppRegistryInstance.address, 'Transfer'); + AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); - describe("โ†’ setup", async () => { - describe("assets", async () => { - describe("app", async () => { - it("create", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "R Clifford Attractors", - "DOCKER", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - "0x", - { from: appProvider.address } - ); - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - AppInstance = await App.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); + describe('dataset', async () => { + it('create', async () => { + txMined = await DatasetRegistryInstance.createDataset( + datasetProvider.address, + 'Pi', + constants.MULTIADDR_BYTES, + constants.NULL.BYTES32, + { from: datasetProvider.address }, + ); + events = tools.extractEvents( + txMined, + DatasetRegistryInstance.address, + 'Transfer', + ); + DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); + }); + }); - describe("dataset", async () => { - it("create", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Pi", - constants.MULTIADDR_BYTES, - constants.NULL.BYTES32, - { from: datasetProvider.address } - ); - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - DatasetInstance = await Dataset.at(tools.BN2Address(events[0].args.tokenId)); - }); - }); + describe('workerpool', async () => { + it('create', async () => { + txMined = await WorkerpoolRegistryInstance.createWorkerpool( + scheduler.address, + 'A test workerpool', + { from: scheduler.address }, + ); + events = tools.extractEvents( + txMined, + WorkerpoolRegistryInstance.address, + 'Transfer', + ); + WorkerpoolInstance = await Workerpool.at( + tools.BN2Address(events[0].args.tokenId), + ); + }); - describe("workerpool", async () => { - it("create", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "A test workerpool", - { from: scheduler.address } - ); - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - WorkerpoolInstance = await Workerpool.at(tools.BN2Address(events[0].args.tokenId)); - }); + it('change policy', async () => { + await WorkerpoolInstance.changePolicy( + /* worker stake ratio */ 35, + /* scheduler reward ratio */ 5, + { from: scheduler.address }, + ); + }); + }); + }); - it("change policy", async () => { - await WorkerpoolInstance.changePolicy(/* worker stake ratio */ 35, /* scheduler reward ratio */ 5, { from: scheduler.address }); - }); - }); - }); + describe('orders', async () => { + describe('app', async () => { + it('sign', async () => { + apporder = await appProvider.signAppOrder({ + app: AppInstance.address, + appprice: 3, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); - describe("orders", async () => { - describe("app", async () => { - it("sign", async () => { - apporder = await appProvider.signAppOrder({ - app: AppInstance.address, - appprice: 3, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - datasetrestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + appProvider.address, + odbtools.utils.hashAppOrder(ERC712_domain, apporder), + apporder.sign, + ), + ); + }); + }); - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - appProvider.address, - odbtools.utils.hashAppOrder(ERC712_domain, apporder), - apporder.sign - )); - }); - }); + describe('dataset', async () => { + it('sign', async () => { + datasetorder = await datasetProvider.signDatasetOrder({ + dataset: DatasetInstance.address, + datasetprice: 1, + volume: 1000, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); - describe("dataset", async () => { - it("sign", async () => { - datasetorder = await datasetProvider.signDatasetOrder({ - dataset: DatasetInstance.address, - datasetprice: 1, - volume: 1000, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - workerpoolrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + datasetProvider.address, + odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), + datasetorder.sign, + ), + ); + }); + }); - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - datasetProvider.address, - odbtools.utils.hashDatasetOrder(ERC712_domain, datasetorder), - datasetorder.sign - )); - }); - }); + describe('workerpool', async () => { + it('sign', async () => { + workerpoolorder = await scheduler.signWorkerpoolOrder({ + workerpool: WorkerpoolInstance.address, + workerpoolprice: 25, + volume: 3, + category: 4, + trust: 0, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); - describe("workerpool", async () => { - it("sign", async () => { - workerpoolorder = await scheduler.signWorkerpoolOrder({ - workerpool: WorkerpoolInstance.address, - workerpoolprice: 25, - volume: 3, - category: 4, - trust: 0, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: constants.NULL.ADDRESS, - datasetrestrict: constants.NULL.ADDRESS, - requesterrestrict: constants.NULL.ADDRESS, - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + scheduler.address, + odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), + workerpoolorder.sign, + ), + ); + }); + }); - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - scheduler.address, - odbtools.utils.hashWorkerpoolOrder(ERC712_domain, workerpoolorder), - workerpoolorder.sign - )); - }); - }); + describe('request', async () => { + it('sign', async () => { + requestorder = await user.signRequestOrder({ + app: AppInstance.address, + appmaxprice: 3, + dataset: DatasetInstance.address, + datasetmaxprice: 1, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 25, + volume: 1, // CHANGE FOR BOT + category: 4, + trust: 0, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + requester: user.address, + beneficiary: user.address, + callback: constants.NULL.ADDRESS, + params: '', + salt: web3.utils.randomHex(32), + sign: constants.NULL.SIGNATURE, + }); + }); + it('verify', async () => { + assert.isTrue( + await IexecInstance.verifySignature( + user.address, + odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), + requestorder.sign, + ), + ); + }); + }); + }); + }); - describe("request", async () => { - it("sign", async () => { - requestorder = await user.signRequestOrder({ - app: AppInstance.address, - appmaxprice: 3, - dataset: DatasetInstance.address, - datasetmaxprice: 1, - workerpool: constants.NULL.ADDRESS, - workerpoolmaxprice: 25, - volume: 1, // CHANGE FOR BOT - category: 4, - trust: 0, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - requester: user.address, - beneficiary: user.address, - callback: constants.NULL.ADDRESS, - params: "", - salt: web3.utils.randomHex(32), - sign: constants.NULL.SIGNATURE, - }); - }); - it("verify", async () => { - assert.isTrue(await IexecInstance.verifySignature( - user.address, - odbtools.utils.hashRequestOrder(ERC712_domain, requestorder), - requestorder.sign - )); - }); - }); - }); - }); + describe('braodcasting', async () => { + describe('broadcastAppOrder', async () => { + it('success', async () => { + txMined = await IexecInstance.broadcastAppOrder(apporder, { from: user.address }); + }); - describe("braodcasting", async () => { - describe("broadcastAppOrder", async () => { - it("success", async () => { - txMined = await IexecInstance.broadcastAppOrder(apporder, { from: user.address }); - }); + it('emit events', async () => { + events = tools.extractEvents(txMined, IexecInstance.address, 'BroadcastAppOrder'); + assert.equal(events[0].args.apporder.app, apporder.app); + assert.equal(events[0].args.apporder.appprice, apporder.appprice); + assert.equal(events[0].args.apporder.volume, apporder.volume); + assert.equal(events[0].args.apporder.datasetrestrict, apporder.datasetrestrict); + assert.equal( + events[0].args.apporder.workerpoolrestrict, + apporder.workerpoolrestrict, + ); + assert.equal(events[0].args.apporder.requesterrestrict, apporder.requesterrestrict); + assert.equal(events[0].args.apporder.salt, apporder.salt); + assert.equal(events[0].args.apporder.sign.v, apporder.sign.v); + assert.equal(events[0].args.apporder.sign.r, apporder.sign.r); + assert.equal(events[0].args.apporder.sign.s, apporder.sign.s); + }); + }); - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "BroadcastAppOrder"); - assert.equal(events[0].args.apporder.app, apporder.app ); - assert.equal(events[0].args.apporder.appprice, apporder.appprice ); - assert.equal(events[0].args.apporder.volume, apporder.volume ); - assert.equal(events[0].args.apporder.datasetrestrict, apporder.datasetrestrict ); - assert.equal(events[0].args.apporder.workerpoolrestrict, apporder.workerpoolrestrict); - assert.equal(events[0].args.apporder.requesterrestrict, apporder.requesterrestrict ); - assert.equal(events[0].args.apporder.salt, apporder.salt ); - assert.equal(events[0].args.apporder.sign.v, apporder.sign.v ); - assert.equal(events[0].args.apporder.sign.r, apporder.sign.r ); - assert.equal(events[0].args.apporder.sign.s, apporder.sign.s ); - }); - }); + describe('broadcastDatasetOrder', async () => { + it('success', async () => { + txMined = await IexecInstance.broadcastDatasetOrder(datasetorder, { + from: user.address, + }); + }); - describe("broadcastDatasetOrder", async () => { - it("success", async () => { - txMined = await IexecInstance.broadcastDatasetOrder(datasetorder, { from: user.address }); - }); + it('emit events', async () => { + events = tools.extractEvents( + txMined, + IexecInstance.address, + 'BroadcastDatasetOrder', + ); + assert.equal(events[0].args.datasetorder.dataset, datasetorder.dataset); + assert.equal(events[0].args.datasetorder.datasetprice, datasetorder.datasetprice); + assert.equal(events[0].args.datasetorder.volume, datasetorder.volume); + assert.equal(events[0].args.datasetorder.apprestrict, datasetorder.apprestrict); + assert.equal( + events[0].args.datasetorder.workerpoolrestrict, + datasetorder.workerpoolrestrict, + ); + assert.equal( + events[0].args.datasetorder.requesterrestrict, + datasetorder.requesterrestrict, + ); + assert.equal(events[0].args.datasetorder.salt, datasetorder.salt); + assert.equal(events[0].args.datasetorder.sign.v, datasetorder.sign.v); + assert.equal(events[0].args.datasetorder.sign.r, datasetorder.sign.r); + assert.equal(events[0].args.datasetorder.sign.s, datasetorder.sign.s); + }); + }); - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "BroadcastDatasetOrder"); - assert.equal(events[0].args.datasetorder.dataset, datasetorder.dataset ); - assert.equal(events[0].args.datasetorder.datasetprice, datasetorder.datasetprice ); - assert.equal(events[0].args.datasetorder.volume, datasetorder.volume ); - assert.equal(events[0].args.datasetorder.apprestrict, datasetorder.apprestrict ); - assert.equal(events[0].args.datasetorder.workerpoolrestrict, datasetorder.workerpoolrestrict); - assert.equal(events[0].args.datasetorder.requesterrestrict, datasetorder.requesterrestrict ); - assert.equal(events[0].args.datasetorder.salt, datasetorder.salt ); - assert.equal(events[0].args.datasetorder.sign.v, datasetorder.sign.v ); - assert.equal(events[0].args.datasetorder.sign.r, datasetorder.sign.r ); - assert.equal(events[0].args.datasetorder.sign.s, datasetorder.sign.s ); - }); - }); + describe('broadcastWorkerpoolOrder', async () => { + it('success', async () => { + txMined = await IexecInstance.broadcastWorkerpoolOrder(workerpoolorder, { + from: user.address, + }); + }); - describe("broadcastWorkerpoolOrder", async () => { - it("success", async () => { - txMined = await IexecInstance.broadcastWorkerpoolOrder(workerpoolorder, { from: user.address }); - }); + it('emit events', async () => { + events = tools.extractEvents( + txMined, + IexecInstance.address, + 'BroadcastWorkerpoolOrder', + ); + assert.equal(events[0].args.workerpoolorder.workerpool, workerpoolorder.workerpool); + assert.equal( + events[0].args.workerpoolorder.workerpoolprice, + workerpoolorder.workerpoolprice, + ); + assert.equal(events[0].args.workerpoolorder.volume, workerpoolorder.volume); + assert.equal(events[0].args.workerpoolorder.category, workerpoolorder.category); + assert.equal(events[0].args.workerpoolorder.trust, workerpoolorder.trust); + assert.equal(events[0].args.workerpoolorder.tag, workerpoolorder.tag); + assert.equal( + events[0].args.workerpoolorder.apprestrict, + workerpoolorder.apprestrict, + ); + assert.equal( + events[0].args.workerpoolorder.datasetrestrict, + workerpoolorder.datasetrestrict, + ); + assert.equal( + events[0].args.workerpoolorder.requesterrestrict, + workerpoolorder.requesterrestrict, + ); + assert.equal(events[0].args.workerpoolorder.salt, workerpoolorder.salt); + assert.equal(events[0].args.workerpoolorder.sign.v, workerpoolorder.sign.v); + assert.equal(events[0].args.workerpoolorder.sign.r, workerpoolorder.sign.r); + assert.equal(events[0].args.workerpoolorder.sign.s, workerpoolorder.sign.s); + }); + }); - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "BroadcastWorkerpoolOrder"); - assert.equal(events[0].args.workerpoolorder.workerpool, workerpoolorder.workerpool ); - assert.equal(events[0].args.workerpoolorder.workerpoolprice, workerpoolorder.workerpoolprice ); - assert.equal(events[0].args.workerpoolorder.volume, workerpoolorder.volume ); - assert.equal(events[0].args.workerpoolorder.category, workerpoolorder.category ); - assert.equal(events[0].args.workerpoolorder.trust, workerpoolorder.trust ); - assert.equal(events[0].args.workerpoolorder.tag, workerpoolorder.tag ); - assert.equal(events[0].args.workerpoolorder.apprestrict, workerpoolorder.apprestrict ); - assert.equal(events[0].args.workerpoolorder.datasetrestrict, workerpoolorder.datasetrestrict ); - assert.equal(events[0].args.workerpoolorder.requesterrestrict, workerpoolorder.requesterrestrict); - assert.equal(events[0].args.workerpoolorder.salt, workerpoolorder.salt ); - assert.equal(events[0].args.workerpoolorder.sign.v, workerpoolorder.sign.v ); - assert.equal(events[0].args.workerpoolorder.sign.r, workerpoolorder.sign.r ); - assert.equal(events[0].args.workerpoolorder.sign.s, workerpoolorder.sign.s ); - }); - }); + describe('broadcastRequestOrder', async () => { + it('success', async () => { + txMined = await IexecInstance.broadcastRequestOrder(requestorder, { + from: user.address, + }); + }); - describe("broadcastRequestOrder", async () => { - it("success", async () => { - txMined = await IexecInstance.broadcastRequestOrder(requestorder, { from: user.address }); - }); - - it("emit events", async () => { - events = tools.extractEvents(txMined, IexecInstance.address, "BroadcastRequestOrder"); - assert.equal(events[0].args.requestorder.app, requestorder.app ); - assert.equal(events[0].args.requestorder.appmaxprice, requestorder.appmaxprice ); - assert.equal(events[0].args.requestorder.dataset, requestorder.dataset ); - assert.equal(events[0].args.requestorder.datasetmaxprice, requestorder.datasetmaxprice ); - assert.equal(events[0].args.requestorder.workerpool, requestorder.workerpool ); - assert.equal(events[0].args.requestorder.workerpoolmaxprice, requestorder.workerpoolmaxprice); - assert.equal(events[0].args.requestorder.volume, requestorder.volume ); - assert.equal(events[0].args.requestorder.category, requestorder.category ); - assert.equal(events[0].args.requestorder.trust, requestorder.trust ); - assert.equal(events[0].args.requestorder.tag, requestorder.tag ); - assert.equal(events[0].args.requestorder.requester, requestorder.requester ); - assert.equal(events[0].args.requestorder.beneficiary, requestorder.beneficiary ); - assert.equal(events[0].args.requestorder.callback, requestorder.callback ); - assert.equal(events[0].args.requestorder.params, requestorder.params ); - assert.equal(events[0].args.requestorder.salt, requestorder.salt ); - assert.equal(events[0].args.requestorder.sign.v, requestorder.sign.v ); - assert.equal(events[0].args.requestorder.sign.r, requestorder.sign.r ); - assert.equal(events[0].args.requestorder.sign.s, requestorder.sign.s ); - }); - }); - }); + it('emit events', async () => { + events = tools.extractEvents( + txMined, + IexecInstance.address, + 'BroadcastRequestOrder', + ); + assert.equal(events[0].args.requestorder.app, requestorder.app); + assert.equal(events[0].args.requestorder.appmaxprice, requestorder.appmaxprice); + assert.equal(events[0].args.requestorder.dataset, requestorder.dataset); + assert.equal( + events[0].args.requestorder.datasetmaxprice, + requestorder.datasetmaxprice, + ); + assert.equal(events[0].args.requestorder.workerpool, requestorder.workerpool); + assert.equal( + events[0].args.requestorder.workerpoolmaxprice, + requestorder.workerpoolmaxprice, + ); + assert.equal(events[0].args.requestorder.volume, requestorder.volume); + assert.equal(events[0].args.requestorder.category, requestorder.category); + assert.equal(events[0].args.requestorder.trust, requestorder.trust); + assert.equal(events[0].args.requestorder.tag, requestorder.tag); + assert.equal(events[0].args.requestorder.requester, requestorder.requester); + assert.equal(events[0].args.requestorder.beneficiary, requestorder.beneficiary); + assert.equal(events[0].args.requestorder.callback, requestorder.callback); + assert.equal(events[0].args.requestorder.params, requestorder.params); + assert.equal(events[0].args.requestorder.salt, requestorder.salt); + assert.equal(events[0].args.requestorder.sign.v, requestorder.sign.v); + assert.equal(events[0].args.requestorder.sign.r, requestorder.sign.r); + assert.equal(events[0].args.requestorder.sign.s, requestorder.sign.s); + }); + }); + }); }); diff --git a/test/byContract/registries/assets.test.ts b/test/byContract/registries/assets.test.ts new file mode 100644 index 000000000..876734418 --- /dev/null +++ b/test/byContract/registries/assets.test.ts @@ -0,0 +1,296 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { BytesLike } from '@ethersproject/bytes'; +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { deployments, ethers, expect } from 'hardhat'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { + App, + AppRegistry, + AppRegistry__factory, + App__factory, + Dataset, + DatasetRegistry, + DatasetRegistry__factory, + Dataset__factory, + ENSRegistry, + ENSRegistry__factory, + IexecInterfaceNative, + IexecInterfaceNative__factory, + PublicResolver, + PublicResolver__factory, + ReverseRegistrar__factory, + Workerpool, + WorkerpoolRegistry, + WorkerpoolRegistry__factory, + Workerpool__factory, +} from '../../../typechain'; +import { MULTIADDR_BYTES } from '../../../utils/constants'; +import { getIexecAccounts } from '../../../utils/poco-tools'; + +describe('Assets', () => { + let proxyAddress: string; + let iexecPoco: IexecInterfaceNative; + let [appProvider, datasetProvider, scheduler, anyone]: SignerWithAddress[] = []; + + let ensRegistry: ENSRegistry; + let reverseResolver: PublicResolver; + let appRegistry: AppRegistry; + let datasetRegistry: DatasetRegistry; + let workerpoolRegistry: WorkerpoolRegistry; + + let app: App; + let dataset: Dataset; + let workerpool: Workerpool; + + beforeEach(async () => { + proxyAddress = await loadHardhatFixtureDeployment(); + await loadFixture(initFixture); + }); + + async function initFixture() { + ({ appProvider, datasetProvider, scheduler, anyone } = await getIexecAccounts()); + const ensRegistryAddress = (await deployments.get('ENSRegistry')).address; + + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + + appRegistry = AppRegistry__factory.connect(await iexecPoco.appregistry(), anyone); + datasetRegistry = DatasetRegistry__factory.connect( + await iexecPoco.datasetregistry(), + anyone, + ); + workerpoolRegistry = WorkerpoolRegistry__factory.connect( + await iexecPoco.workerpoolregistry(), + anyone, + ); + + ensRegistry = ENSRegistry__factory.connect(ensRegistryAddress, anyone); + const reverseRootNameHash = ethers.utils.namehash('addr.reverse'); + const reverseRegistrarAddress = await ensRegistry.owner(reverseRootNameHash); + const reverseResolverAddress = await ReverseRegistrar__factory.connect( + reverseRegistrarAddress, + anyone, + ).defaultResolver(); + reverseResolver = PublicResolver__factory.connect(reverseResolverAddress, anyone); + } + + describe('App', () => { + const createAppParams = { + name: 'My app', + type: 'DOCKER', + multiaddr: MULTIADDR_BYTES, + checksum: ethers.utils.id('My app checksum'), + mreclave: '0x1234', + }; + const createAppArgs = Object.values(createAppParams) as [ + string, + string, + BytesLike, + BytesLike, + BytesLike, + ]; + beforeEach(async () => { + const appAddress = await appRegistry.callStatic.createApp( + appProvider.address, + ...createAppArgs, + ); + await appRegistry + .createApp(appProvider.address, ...createAppArgs) + .then((tx) => tx.wait()); + app = App__factory.connect(appAddress, anyone); + }); + + describe('creation and initialization', () => { + it('Should read initialized app details', async () => { + expect(await app.registry()).to.equal(appRegistry.address); + expect(await app.owner()).to.equal(appProvider.address); + expect(await app.m_appName()).to.equal(createAppParams.name); + expect(await app.m_appType()).to.equal(createAppParams.type); + expect(await app.m_appMultiaddr()).to.equal(createAppParams.multiaddr); + expect(await app.m_appChecksum()).to.equal(createAppParams.checksum); + expect(await app.m_appMREnclave()).to.equal(createAppParams.mreclave); + }); + + it('Should not reinitialize created app', async () => { + await expect(app.initialize(...createAppArgs)).to.be.revertedWith( + 'already initialized', + ); + }); + }); + + describe('setName', () => { + it('Should set name for the ENS reverse registration of the app', async () => { + const newENSName = 'myApp.eth'; + await app + .connect(appProvider) + .setName(ensRegistry.address, newENSName) + .then((tx) => tx.wait()); + expect(await reverseResolver.name(computeNameHash(app.address))).to.equal( + newENSName, + ); + }); + + it('Should not set name when send is not the owner', async () => { + const newENSName = 'unauthorized.eth'; + await expect(app.setName(ensRegistry.address, newENSName)).to.be.revertedWith( + 'caller is not the owner', + ); + }); + }); + }); + + describe('Dataset', () => { + const createDatasetParams = { + name: 'My dataset', + multiaddr: MULTIADDR_BYTES, + checksum: ethers.utils.id('My dataset checksum'), + }; + const createDatasetArgs = Object.values(createDatasetParams) as [ + string, + BytesLike, + BytesLike, + ]; + beforeEach(async () => { + const datasetAddress = await datasetRegistry.callStatic.createDataset( + datasetProvider.address, + ...createDatasetArgs, + ); + await datasetRegistry + .createDataset(datasetProvider.address, ...createDatasetArgs) + .then((tx) => tx.wait()); + dataset = Dataset__factory.connect(datasetAddress, anyone); + }); + + describe('creation and initialization', () => { + it('Should read initialized dataset details', async () => { + expect(await dataset.registry()).to.equal(datasetRegistry.address); + expect(await dataset.owner()).to.equal(datasetProvider.address); + expect(await dataset.m_datasetName()).to.equal(createDatasetParams.name); + expect(await dataset.m_datasetMultiaddr()).to.equal(createDatasetParams.multiaddr); + expect(await dataset.m_datasetChecksum()).to.equal(createDatasetParams.checksum); + }); + + it('Should not reinitialize created dataset', async () => { + await expect(dataset.initialize(...createDatasetArgs)).to.be.revertedWith( + 'already initialized', + ); + }); + }); + + describe('setName', () => { + it('Should set name for the ENS reverse registration of the dataset', async () => { + const newENSName = 'myDataset.eth'; + await dataset + .connect(datasetProvider) + .setName(ensRegistry.address, newENSName) + .then((tx) => tx.wait()); + expect(await reverseResolver.name(computeNameHash(dataset.address))).to.equal( + newENSName, + ); + }); + + it('Should not set name when send is not the owner', async () => { + const newENSName = 'unauthorized.eth'; + await expect(dataset.setName(ensRegistry.address, newENSName)).to.be.revertedWith( + 'caller is not the owner', + ); + }); + }); + }); + + describe('Workerpool', () => { + const createWorkerpoolParams = { + description: 'Workerpool description', + }; + const createWorkerpoolArgs = Object.values(createWorkerpoolParams) as [string]; + beforeEach(async () => { + const workerpoolAddress = await workerpoolRegistry.callStatic.createWorkerpool( + scheduler.address, + ...createWorkerpoolArgs, + ); + await workerpoolRegistry + .createWorkerpool(scheduler.address, ...createWorkerpoolArgs) + .then((tx) => tx.wait()); + workerpool = Workerpool__factory.connect(workerpoolAddress, anyone); + }); + + describe('creation and initialization', () => { + it('Should read initialized workerpool details', async () => { + expect(await workerpool.registry()).to.equal(workerpoolRegistry.address); + expect(await workerpool.owner()).to.equal(scheduler.address); + expect(await workerpool.m_workerpoolDescription()).to.equal( + createWorkerpoolParams.description, + ); + expect(await workerpool.m_workerStakeRatioPolicy()).to.equal(30); + expect(await workerpool.m_schedulerRewardRatioPolicy()).to.equal(1); + }); + + it('Should not reinitialize created workerpool', async () => { + await expect(workerpool.initialize(...createWorkerpoolArgs)).to.be.revertedWith( + 'already initialized', + ); + }); + }); + + describe('setName', () => { + it('Should set name for the ENS reverse registration of the workerpool', async () => { + const newENSName = 'myWorkerpool.eth'; + await workerpool + .connect(scheduler) + .setName(ensRegistry.address, newENSName) + .then((tx) => tx.wait()); + expect(await reverseResolver.name(computeNameHash(workerpool.address))).to.equal( + newENSName, + ); + }); + + it('Should not set name when send is not the owner', async () => { + const newENSName = 'unauthorized.eth'; + await expect( + workerpool.setName(ensRegistry.address, newENSName), + ).to.be.revertedWith('caller is not the owner'); + }); + }); + + describe('changePolicy', () => { + it('Should update workerpool policy configuration', async () => { + const previousWorkerStakeRatioPolicy = await workerpool.m_workerStakeRatioPolicy(); + const previousSchedulerRewardRatioPolicy = + await workerpool.m_schedulerRewardRatioPolicy(); + await expect( + await workerpool + .connect(scheduler) + .changePolicy(35, 5, { from: scheduler.address }), + ) + .to.emit(workerpool, 'PolicyUpdate') + .withArgs( + previousWorkerStakeRatioPolicy, + 35, + previousSchedulerRewardRatioPolicy, + 5, + ); + expect(await workerpool.m_workerStakeRatioPolicy()).to.equal(35); + expect(await workerpool.m_schedulerRewardRatioPolicy()).to.equal(5); + }); + + it('Should not update policy configuration when sender is not the owner', async () => { + await expect( + workerpool.changePolicy(0, 0, { from: anyone.address }), + ).to.be.revertedWith('caller is not the owner'); + }); + + it('Should reject invalid configuration', async () => { + await expect( + workerpool + .connect(scheduler) + .changePolicy(100, 150, { from: scheduler.address }), + ).to.be.revertedWithoutReason(); + }); + }); + }); + + const computeNameHash = (address: string) => + ethers.utils.namehash(`${address.substring(2)}.addr.reverse`); +}); diff --git a/test/byContract/registries/registies.js b/test/byContract/registries/registies.js deleted file mode 100644 index cc9d49cdc..000000000 --- a/test/byContract/registries/registies.js +++ /dev/null @@ -1,335 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Registries', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - - var AppInstances = {}; - var DatasetInstances = {}; - var WorkerpoolInstances = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - describe("Registry", async () => { - it("cannot reinitialize", async () => { - await expectRevert.unspecified(AppRegistryInstance.initialize(constants.NULL.ADDRESS)); - await expectRevert.unspecified(DatasetRegistryInstance.initialize(constants.NULL.ADDRESS)); - await expectRevert.unspecified(WorkerpoolRegistryInstance.initialize(constants.NULL.ADDRESS)); - }); - it("baseURI", async () => { - const chainid = await web3.eth.net.getId(); - assert.equal(await AppRegistryInstance.baseURI(), `https://nfts-metadata.iex.ec/app/${chainid}/`); - assert.equal(await DatasetRegistryInstance.baseURI(), `https://nfts-metadata.iex.ec/dataset/${chainid}/`); - assert.equal(await WorkerpoolRegistryInstance.baseURI(), `https://nfts-metadata.iex.ec/workerpool/${chainid}/`); - }); - }); - - /*************************************************************************** - * TEST: App creation (by appProvider) * - ***************************************************************************/ - describe("Apps", async () => { - Array(8).fill().map((_, i) => { - describe(`app #${i}`, async () => { - it("creation", async () => { - const code = await AppRegistryInstance.proxyCode(); - const args = web3.eth.abi.encodeFunctionCall( - App.abi.find(e => e.name == 'initialize'), - [ - "App #"+i, - "DOCKER", - constants.MULTIADDR_BYTES, - web3.utils.keccak256("Content of app #"+i), - "0x1234", - ] - ); - const salt = web3.utils.soliditySha3( - { t: 'bytes', v: args }, - { t: 'address', v: appProvider.address }, - ); - const predictedAddress = tools.create2(AppRegistryInstance.address, code, salt); - - assert.equal(await AppRegistryInstance.predictApp( - appProvider.address, - "App #"+i, - "DOCKER", - constants.MULTIADDR_BYTES, - web3.utils.keccak256("Content of app #"+i), - "0x1234" - ), - predictedAddress - ); - - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "App #"+i, - "DOCKER", - constants.MULTIADDR_BYTES, - web3.utils.keccak256("Content of app #"+i), - "0x1234", - { from: appProvider.address } - ); - - events = tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer"); - assert.equal (events[0].args.from, constants.NULL.ADDRESS); - assert.equal (events[0].args.to, appProvider.address); - assert.deepEqual(events[0].args.tokenId, web3.utils.toBN(predictedAddress)); - AppInstances[i] = await App.at(predictedAddress); - }); - - it("content", async () => { - assert.equal (await AppInstances[i].registry(), AppRegistryInstance.address ); - assert.equal (await AppInstances[i].owner(), appProvider.address ); - assert.equal (await AppInstances[i].m_appName(), "App #"+i ); - assert.equal (await AppInstances[i].m_appType(), "DOCKER" ); - assert.equal (await AppInstances[i].m_appMultiaddr(), constants.MULTIADDR_BYTES ); - assert.equal (await AppInstances[i].m_appChecksum(), web3.utils.keccak256("Content of app #"+i)); - assert.equal (await AppInstances[i].m_appMREnclave(), "0x1234" ); - }); - - it("token details", async () => { - assert.equal (await AppRegistryInstance.ownerOf(AppInstances[i].address), appProvider.address); - assert.equal (await AppRegistryInstance.balanceOf(appProvider.address), i+1); - assert.isTrue(await AppRegistryInstance.isRegistered(AppInstances[i].address)); - assert.equal (tools.BN2Address(await AppRegistryInstance.tokenOfOwnerByIndex(appProvider.address, i)), AppInstances[i].address); - assert.equal (await AppRegistryInstance.tokenURI(AppInstances[i].address), (await AppRegistryInstance.baseURI()) + web3.utils.toBN(AppInstances[i].address) ); - }); - - it("duplicate protection", async () => { - await expectRevert.unspecified( - AppRegistryInstance.createApp( - appProvider.address, - "App #"+i, - "DOCKER", - constants.MULTIADDR_BYTES, - web3.utils.keccak256("Content of app #"+i), - "0x1234", - ) - ); - }); - }); - }); - }); - - /*************************************************************************** - * TEST: Dataset creation (by datasetProvider) * - ***************************************************************************/ - describe("Datasets", async () => { - Array(8).fill().map((_, i) => { - describe(`dataset #${i}`, async () => { - it("creation", async () => { - const code = await AppRegistryInstance.proxyCode(); - const args = web3.eth.abi.encodeFunctionCall( - Dataset.abi.find(e => e.name == 'initialize'), - [ - "Dataset #"+i, - constants.MULTIADDR_BYTES, - web3.utils.keccak256("Content of dataset #"+i), - ] - ); - const salt = web3.utils.soliditySha3( - { t: 'bytes', v: args }, - { t: 'address', v: datasetProvider.address }, - ); - const predictedAddress = tools.create2(DatasetRegistryInstance.address, code, salt); - - assert.equal(await DatasetRegistryInstance.predictDataset( - datasetProvider.address, - "Dataset #"+i, - constants.MULTIADDR_BYTES, - web3.utils.keccak256("Content of dataset #"+i) - ), - predictedAddress - ); - - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Dataset #"+i, - constants.MULTIADDR_BYTES, - web3.utils.keccak256("Content of dataset #"+i), - { from: datasetProvider.address } - ); - - events = tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer"); - assert.equal (events[0].args.from, constants.NULL.ADDRESS); - assert.equal (events[0].args.to, datasetProvider.address); - assert.deepEqual(events[0].args.tokenId, web3.utils.toBN(predictedAddress)); - DatasetInstances[i] = await Dataset.at(predictedAddress); - }); - - it("content", async () => { - assert.equal (await DatasetInstances[i].registry(), DatasetRegistryInstance.address ); - assert.equal (await DatasetInstances[i].owner(), datasetProvider.address ); - assert.equal (await DatasetInstances[i].m_datasetName(), "Dataset #"+i ); - assert.equal (await DatasetInstances[i].m_datasetMultiaddr(), constants.MULTIADDR_BYTES ); - assert.equal (await DatasetInstances[i].m_datasetChecksum(), web3.utils.keccak256("Content of dataset #"+i)); - }); - - it("token details", async () => { - assert.equal (await DatasetRegistryInstance.ownerOf(DatasetInstances[i].address), datasetProvider.address); - assert.equal (await DatasetRegistryInstance.balanceOf(datasetProvider.address), i+1); - assert.isTrue(await DatasetRegistryInstance.isRegistered(DatasetInstances[i].address)); - assert.equal (tools.BN2Address(await DatasetRegistryInstance.tokenOfOwnerByIndex(datasetProvider.address, i)), DatasetInstances[i].address); - assert.equal (await DatasetRegistryInstance.tokenURI(DatasetInstances[i].address), (await DatasetRegistryInstance.baseURI()) + web3.utils.toBN(DatasetInstances[i].address) ); - }); - - it("duplicate protection", async () => { - await expectRevert.unspecified( - DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Dataset #"+i, - constants.MULTIADDR_BYTES, - web3.utils.keccak256("Content of dataset #"+i), - ) - ); - }); - }); - }); - }); - - /*************************************************************************** - * TEST: Workerpool creation (by scheduler) * - ***************************************************************************/ - describe("Workerpools", async () => { - Array(8).fill().map((_, i) => { - describe(`workerpool #${i}`, async () => { - it("creation", async () => { - const code = await AppRegistryInstance.proxyCode(); - const args = web3.eth.abi.encodeFunctionCall( - Workerpool.abi.find(e => e.name == 'initialize'), - [ - "Workerpool #"+i, - ] - ); - const salt = web3.utils.soliditySha3( - { t: 'bytes', v: args }, - { t: 'address', v: scheduler.address }, - ); - const predictedAddress = tools.create2(WorkerpoolRegistryInstance.address, code, salt); - - assert.equal(await WorkerpoolRegistryInstance.predictWorkerpool( - scheduler.address, - "Workerpool #"+i - ), - predictedAddress - ); - - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "Workerpool #"+i, - { from: scheduler.address } - ); - - events = tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer"); - assert.equal (events[0].args.from, constants.NULL.ADDRESS); - assert.equal (events[0].args.to, scheduler.address); - assert.deepEqual(events[0].args.tokenId, web3.utils.toBN(predictedAddress)); - WorkerpoolInstances[i] = await Workerpool.at(predictedAddress); - }); - - it("content", async () => { - assert.equal (await WorkerpoolInstances[i].registry(), WorkerpoolRegistryInstance.address); - assert.equal (await WorkerpoolInstances[i].owner(), scheduler.address ); - assert.equal (await WorkerpoolInstances[i].m_workerpoolDescription(), "Workerpool #"+i ); - assert.equal (await WorkerpoolInstances[i].m_workerStakeRatioPolicy(), 30 ); - assert.equal (await WorkerpoolInstances[i].m_schedulerRewardRatioPolicy(), 1 ); - }); - - it("token details", async () => { - assert.equal (await WorkerpoolRegistryInstance.ownerOf(WorkerpoolInstances[i].address), scheduler.address); - assert.equal (await WorkerpoolRegistryInstance.balanceOf(scheduler.address), i+1); - assert.isTrue(await WorkerpoolRegistryInstance.isRegistered(WorkerpoolInstances[i].address)); - assert.equal (tools.BN2Address(await WorkerpoolRegistryInstance.tokenOfOwnerByIndex(scheduler.address, i)), WorkerpoolInstances[i].address); - assert.equal (await WorkerpoolRegistryInstance.tokenURI(WorkerpoolInstances[i].address), (await WorkerpoolRegistryInstance.baseURI()) + web3.utils.toBN(WorkerpoolInstances[i].address) ); - }); - - it("duplicate protection", async () => { - await expectRevert.unspecified( - WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "Workerpool #"+i, - ) - ); - }); - }); - }); - }); -}); diff --git a/test/byContract/registries/registries.test.ts b/test/byContract/registries/registries.test.ts new file mode 100644 index 000000000..5919e51b6 --- /dev/null +++ b/test/byContract/registries/registries.test.ts @@ -0,0 +1,568 @@ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { BytesLike } from '@ethersproject/bytes'; +import { AddressZero } from '@ethersproject/constants'; +import { loadFixture } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import hre, { deployments, ethers, expect } from 'hardhat'; +import CONFIG from '../../../config/config.json'; +import { loadHardhatFixtureDeployment } from '../../../scripts/hardhat-fixture-deployer'; +import { + AppRegistry, + AppRegistry__factory, + App__factory, + DatasetRegistry, + DatasetRegistry__factory, + Dataset__factory, + ENSRegistry, + ENSRegistry__factory, + IexecInterfaceNative, + IexecInterfaceNative__factory, + InitializableUpgradeabilityProxy__factory, + PublicResolver, + PublicResolver__factory, + ReverseRegistrar__factory, + WorkerpoolRegistry, + WorkerpoolRegistry__factory, + Workerpool__factory, +} from '../../../typechain'; +import { MULTIADDR_BYTES } from '../../../utils/constants'; +import { getIexecAccounts } from '../../../utils/poco-tools'; +import { BN2Address } from '../../../utils/tools'; +const randomAddress = () => ethers.Wallet.createRandom().address; + +describe('Registries', () => { + let proxyAddress: string; + let iexecPoco: IexecInterfaceNative; + let [iexecAdmin, appProvider, datasetProvider, scheduler, anyone]: SignerWithAddress[] = []; + + let ensRegistry: ENSRegistry; + let [appRegistry, appRegistryAsAdmin]: AppRegistry[] = []; + let [datasetRegistry, datasetRegistryAsAdmin]: DatasetRegistry[] = []; + let [workerpoolRegistry, workerpoolRegistryAsAdmin]: WorkerpoolRegistry[] = []; + + beforeEach(async () => { + proxyAddress = await loadHardhatFixtureDeployment(); + await loadFixture(initFixture); + }); + + async function initFixture() { + ({ iexecAdmin, appProvider, datasetProvider, scheduler, anyone } = + await getIexecAccounts()); + const ensRegistryAddress = (await deployments.get('ENSRegistry')).address; + ensRegistry = ENSRegistry__factory.connect(ensRegistryAddress, anyone); + + iexecPoco = IexecInterfaceNative__factory.connect(proxyAddress, anyone); + + appRegistry = AppRegistry__factory.connect(await iexecPoco.appregistry(), anyone); + appRegistryAsAdmin = appRegistry.connect(iexecAdmin); + datasetRegistry = DatasetRegistry__factory.connect( + await iexecPoco.datasetregistry(), + anyone, + ); + datasetRegistryAsAdmin = datasetRegistry.connect(iexecAdmin); + workerpoolRegistry = WorkerpoolRegistry__factory.connect( + await iexecPoco.workerpoolregistry(), + anyone, + ); + workerpoolRegistryAsAdmin = workerpoolRegistry.connect(iexecAdmin); + } + + describe('initialize', () => { + it('Should initialize new deployed registries', async () => { + const newAppRegistry = await new AppRegistry__factory() + .connect(iexecAdmin) + .deploy() + .then((contract) => contract.deployed()); + await newAppRegistry.initialize(appRegistry.address).then((tx) => tx.wait()); + expect(await newAppRegistry.initialized()).to.be.true; + expect(await newAppRegistry.previous()).to.equal(appRegistry.address); + + const newDatasetRegistry = await new DatasetRegistry__factory() + .connect(iexecAdmin) + .deploy() + .then((contract) => contract.deployed()); + await newDatasetRegistry.initialize(datasetRegistry.address).then((tx) => tx.wait()); + expect(await newDatasetRegistry.initialized()).to.be.true; + expect(await newDatasetRegistry.previous()).to.equal(datasetRegistry.address); + + const newWorkerpoolRegistry = await new WorkerpoolRegistry__factory() + .connect(iexecAdmin) + .deploy() + .then((contract) => contract.deployed()); + await newWorkerpoolRegistry + .initialize(workerpoolRegistry.address) + .then((tx) => tx.wait()); + expect(await newWorkerpoolRegistry.initialized()).to.be.true; + expect(await newWorkerpoolRegistry.previous()).to.equal(workerpoolRegistry.address); + }); + + it('Should not initialize when user is not the owner', async () => { + await expect(appRegistry.initialize(AddressZero)).to.be.revertedWith( + 'Ownable: caller is not the owner', + ); + await expect(datasetRegistry.initialize(AddressZero)).to.be.revertedWith( + 'Ownable: caller is not the owner', + ); + await expect(workerpoolRegistry.initialize(AddressZero)).to.be.revertedWith( + 'Ownable: caller is not the owner', + ); + }); + + it('Should not reinitialize', async () => { + await expect(appRegistryAsAdmin.initialize(AddressZero)).to.be.revertedWithoutReason(); + await expect( + datasetRegistryAsAdmin.initialize(AddressZero), + ).to.be.revertedWithoutReason(); + await expect( + workerpoolRegistryAsAdmin.initialize(AddressZero), + ).to.be.revertedWithoutReason(); + }); + }); + + describe('setName', () => { + let reverseResolver: PublicResolver; + let [appRegistryNameHash, datasetRegistryNameHash, workerpoolRegistryNameHash]: string[] = + []; + + beforeEach(async () => { + const reverseRootNameHash = ethers.utils.namehash('addr.reverse'); + const reverseRegistrarAddress = await ensRegistry.owner(reverseRootNameHash); + const reverseResolverAddress = await ReverseRegistrar__factory.connect( + reverseRegistrarAddress, + anyone, + ).defaultResolver(); + reverseResolver = PublicResolver__factory.connect(reverseResolverAddress, anyone); + appRegistryNameHash = computeNameHash(appRegistry.address); + datasetRegistryNameHash = computeNameHash(datasetRegistry.address); + workerpoolRegistryNameHash = computeNameHash(workerpoolRegistry.address); + }); + + it('Should retrieve the ENS name for registries', async () => { + expect(await reverseResolver.name(appRegistryNameHash)).to.equal('apps.v5.iexec.eth'); + expect(await reverseResolver.name(datasetRegistryNameHash)).to.equal( + 'datasets.v5.iexec.eth', + ); + expect(await reverseResolver.name(workerpoolRegistryNameHash)).to.equal( + 'workerpools.v5.iexec.eth', + ); + }); + + it('Should set name for the ENS reverse registration of registries', async () => { + const appRegistryEnsName = 'myAppRegistry.eth'; + const datasetRegistryEnsName = 'myDatasetRegistry.eth'; + const workerpoolRegistryEnsName = 'myWorkerpoolRegistry.eth'; + + await appRegistryAsAdmin + .setName(ensRegistry.address, appRegistryEnsName) + .then((tx) => tx.wait()); + expect(await reverseResolver.name(appRegistryNameHash)).to.equal(appRegistryEnsName); + + await datasetRegistryAsAdmin + .setName(ensRegistry.address, datasetRegistryEnsName) + .then((tx) => tx.wait()); + expect(await reverseResolver.name(datasetRegistryNameHash)).to.equal( + datasetRegistryEnsName, + ); + + await workerpoolRegistryAsAdmin + .setName(ensRegistry.address, workerpoolRegistryEnsName) + .then((tx) => tx.wait()); + expect(await reverseResolver.name(workerpoolRegistryNameHash)).to.equal( + workerpoolRegistryEnsName, + ); + }); + + it('Should not set name when user is not the owner', async () => { + await expect( + appRegistry.setName(ensRegistry.address, 'new.app.registry.eth'), + ).to.be.revertedWith('Ownable: caller is not the owner'); + await expect( + datasetRegistry.setName(ensRegistry.address, 'new.dataset.registry.eth'), + ).to.be.revertedWith('Ownable: caller is not the owner'); + await expect( + workerpoolRegistry.setName(ensRegistry.address, 'new.workerpool.registry.eth'), + ).to.be.revertedWith('Ownable: caller is not the owner'); + }); + }); + + describe('setBaseURI', () => { + it('Should retrieve base URI', async () => { + const chainId = hre.network.config.chainId; + const baseURIApp = CONFIG.registriesBaseUri.app; + const baseURIDataset = CONFIG.registriesBaseUri.dataset; + const baseURIWorkerpool = CONFIG.registriesBaseUri.workerpool; + expect(await appRegistry.baseURI()).to.equal(`${baseURIApp}/${chainId}/`); + expect(await datasetRegistry.baseURI()).to.equal(`${baseURIDataset}/${chainId}/`); + expect(await workerpoolRegistry.baseURI()).to.equal(`${baseURIWorkerpool}/${chainId}/`); + }); + + it('Should not set base URI when user is not the owner', async () => { + await expect(appRegistry.setBaseURI(`https://new.url.iex.ec/app/`)).to.be.revertedWith( + 'Ownable: caller is not the owner', + ); + await expect( + datasetRegistry.setBaseURI(`https://new.url.iex.ec/dataset/`), + ).to.be.revertedWith('Ownable: caller is not the owner'); + await expect( + workerpoolRegistry.setBaseURI(`https://new.url.iex.ec/workerpool/`), + ).to.be.revertedWith('Ownable: caller is not the owner'); + }); + }); + + describe('Registry Getters', () => { + it('Should check that masters are deployed at master addresses', async () => { + const appCode = App__factory.bytecode.replace('0x', ''); + const datasetCode = Dataset__factory.bytecode.replace('0x', ''); + const workerpoolCode = Workerpool__factory.bytecode.replace('0x', ''); + + const deployedCodeAtAppRegistryMaster = ( + await ethers.provider.getCode(await appRegistry.master()) + ).replace('0x', ''); + const deployedCodeAtDatasetRegistryMaster = ( + await ethers.provider.getCode(await datasetRegistry.master()) + ).replace('0x', ''); + const deployedCodeAtWorkerpoolRegistryMaster = ( + await ethers.provider.getCode(await workerpoolRegistry.master()) + ).replace('0x', ''); + + expect(appCode.includes(deployedCodeAtAppRegistryMaster)).to.be.true; + expect(datasetCode.includes(deployedCodeAtDatasetRegistryMaster)).to.be.true; + expect(workerpoolCode.includes(deployedCodeAtWorkerpoolRegistryMaster)).to.be.true; + }); + + it('Should retrieve correct ERC 721 name', async () => { + expect(await appRegistry.name()).to.equal('iExec Application Registry (V5)'); + expect(await datasetRegistry.name()).to.equal('iExec Dataset Registry (V5)'); + expect(await workerpoolRegistry.name()).to.equal('iExec Workerpool Registry (V5)'); + }); + + it('Should retrieve correct ERC 721 symbol', async () => { + expect(await appRegistry.symbol()).to.equal('iExecAppsV5'); + expect(await datasetRegistry.symbol()).to.equal('iExecDatasetsV5'); + expect(await workerpoolRegistry.symbol()).to.equal('iExecWorkerpoolV5'); + }); + + it('Should return the correct value for proxyCode', async () => { + const expectedProxyCode = InitializableUpgradeabilityProxy__factory.bytecode; + expect(await appRegistry.proxyCode()).to.equal(expectedProxyCode); + expect(await datasetRegistry.proxyCode()).to.equal(expectedProxyCode); + expect(await workerpoolRegistry.proxyCode()).to.equal(expectedProxyCode); + }); + + it('Should return the correct value for proxyCodeHash', async () => { + const proxyCode = InitializableUpgradeabilityProxy__factory.bytecode; + expect(await appRegistry.proxyCodeHash()).to.equal(ethers.utils.keccak256(proxyCode)); + expect(await datasetRegistry.proxyCodeHash()).to.equal( + ethers.utils.keccak256(proxyCode), + ); + expect(await workerpoolRegistry.proxyCodeHash()).to.equal( + ethers.utils.keccak256(proxyCode), + ); + }); + + it('Should return the correct value for previous registry', async () => { + expect(await appRegistry.previous()).to.equal(AddressZero); + expect(await datasetRegistry.previous()).to.equal(AddressZero); + expect(await workerpoolRegistry.previous()).to.equal(AddressZero); + }); + + it('Should current regitries be initialized', async () => { + expect(await appRegistry.initialized()).to.be.true; + expect(await datasetRegistry.initialized()).to.be.true; + expect(await workerpoolRegistry.initialized()).to.be.true; + }); + }); + + describe('App Registry', () => { + const createAppArgs = [ + `App`, + 'DOCKER', + MULTIADDR_BYTES, + ethers.utils.id(`My app checksum`), + '0x1234', + ] as [string, string, BytesLike, BytesLike, BytesLike]; + it('Should predict the correct address for future app creation', async () => { + const code = await appRegistry.proxyCode(); + const proxyCodeHash = ethers.utils.keccak256(code); + const encodedInitializer = App__factory.createInterface().encodeFunctionData( + 'initialize', + createAppArgs, + ); + const salt = ethers.utils.solidityKeccak256( + ['bytes', 'address'], + [encodedInitializer, appProvider.address], + ); + + const predictedAddress = ethers.utils.getCreate2Address( + appRegistry.address, + salt, + proxyCodeHash, + ); + expect(await appRegistry.predictApp(appProvider.address, ...createAppArgs)).to.equal( + predictedAddress, + ); + }); + + it('Should create the app and check token details', async () => { + const initialAppBalance = await appRegistry.balanceOf(appProvider.address); + expect(initialAppBalance).to.equal(0); + + const predictedAddress = await appRegistry.predictApp( + appProvider.address, + ...createAppArgs, + ); + await expect(appRegistry.createApp(appProvider.address, ...createAppArgs)) + .to.emit(appRegistry, 'Transfer') + .withArgs( + AddressZero, + appProvider.address, + ethers.BigNumber.from(predictedAddress).toString(), + ); + expect(await appRegistry.balanceOf(appProvider.address)).to.equal( + initialAppBalance.add(1), + ); + expect(await appRegistry.ownerOf(predictedAddress)).to.equal(appProvider.address); + + const tokenAtIndex = await appRegistry.tokenOfOwnerByIndex(appProvider.address, 0); + expect(ethers.utils.getAddress(BN2Address(tokenAtIndex))).to.equal( + ethers.utils.getAddress(predictedAddress), + ); + + const tokenURI = await appRegistry.tokenURI(predictedAddress); + const baseURI = await appRegistry.baseURI(); + expect(tokenURI).to.equal(baseURI + ethers.BigNumber.from(predictedAddress).toString()); + }); + + it('Should check that a new app is well registered', async () => { + const appCreatedAddress = await appRegistry.callStatic.createApp( + appProvider.address, + ...createAppArgs, + ); + await appRegistry + .createApp(appProvider.address, ...createAppArgs) + .then((tx) => tx.wait()); + const isRegistered = await appRegistry.isRegistered(appCreatedAddress); + expect(isRegistered).to.be.true; + }); + + it('Should not have a random address registered in app registry', async () => { + expect(await appRegistry.isRegistered(randomAddress())).to.be.false; + }); + + it('Should not allow creating the same app twice', async () => { + await appRegistry + .createApp(appProvider.address, ...createAppArgs) + .then((tx) => tx.wait()); + + await expect( + appRegistry.createApp(appProvider.address, ...createAppArgs), + ).to.be.revertedWith('Create2: Failed on deploy'); + }); + + it('Should check that a new app is well registered on new app registry', async () => { + const appCreatedAddress = await appRegistry.callStatic.createApp( + appProvider.address, + ...createAppArgs, + ); + await appRegistry + .createApp(appProvider.address, ...createAppArgs) + .then((tx) => tx.wait()); + + const newAppRegistry = await new AppRegistry__factory() + .connect(iexecAdmin) + .deploy() + .then((contract) => contract.deployed()); + + await newAppRegistry.initialize(appRegistry.address).then((tx) => tx.wait()); + const isRegistered = await newAppRegistry.isRegistered(appCreatedAddress); + expect(isRegistered).to.be.true; + }); + }); + + describe('Dataset Registry', () => { + const createDatasetArgs = [ + `Dataset`, + MULTIADDR_BYTES, + ethers.utils.id(`My dataset checksum`), + ] as [string, BytesLike, BytesLike]; + it('Should predict the correct address for future dataset creation', async () => { + const code = await datasetRegistry.proxyCode(); + const proxyCodeHash = ethers.utils.keccak256(code); + const encodedInitializer = Dataset__factory.createInterface().encodeFunctionData( + 'initialize', + createDatasetArgs, + ); + const salt = ethers.utils.solidityKeccak256( + ['bytes', 'address'], + [encodedInitializer, datasetProvider.address], + ); + + const predictedAddress = ethers.utils.getCreate2Address( + datasetRegistry.address, + salt, + proxyCodeHash, + ); + expect( + await datasetRegistry.predictDataset(datasetProvider.address, ...createDatasetArgs), + ).to.equal(predictedAddress); + }); + + it('Should create the dataset and check token details', async () => { + const initialDatasetBalance = await datasetRegistry.balanceOf(datasetProvider.address); + expect(initialDatasetBalance).to.equal(0); + + const predictedAddress = await datasetRegistry.predictDataset( + datasetProvider.address, + ...createDatasetArgs, + ); + await expect( + await datasetRegistry.createDataset(datasetProvider.address, ...createDatasetArgs), + ) + .to.emit(datasetRegistry, 'Transfer') + .withArgs( + AddressZero, + datasetProvider.address, + ethers.BigNumber.from(predictedAddress).toString(), + ); + expect(await datasetRegistry.balanceOf(datasetProvider.address)).to.equal( + initialDatasetBalance.add(1), + ); + expect(await datasetRegistry.ownerOf(predictedAddress)).to.equal( + datasetProvider.address, + ); + + const tokenAtIndex = await datasetRegistry.tokenOfOwnerByIndex( + datasetProvider.address, + 0, + ); + expect(ethers.utils.getAddress(BN2Address(tokenAtIndex))).to.equal( + ethers.utils.getAddress(predictedAddress), + ); + + const tokenURI = await datasetRegistry.tokenURI(predictedAddress); + const baseURI = await datasetRegistry.baseURI(); + expect(tokenURI).to.equal(baseURI + ethers.BigNumber.from(predictedAddress).toString()); + }); + + it('Should check that a new dataset is well registered', async () => { + const datasetCreatedAddress = await datasetRegistry.callStatic.createDataset( + datasetProvider.address, + ...createDatasetArgs, + ); + await datasetRegistry + .createDataset(datasetProvider.address, ...createDatasetArgs) + .then((tx) => tx.wait()); + const isRegistered = await datasetRegistry.isRegistered(datasetCreatedAddress); + expect(isRegistered).to.be.true; + }); + + it('Should not have a random address registered in dataset registry', async () => { + expect(await datasetRegistry.isRegistered(randomAddress())).to.be.false; + }); + + it('Should not allow creating the same dataset twice', async () => { + await datasetRegistry + .createDataset(datasetProvider.address, ...createDatasetArgs) + .then((tx) => tx.wait()); + + await expect( + datasetRegistry.createDataset(datasetProvider.address, ...createDatasetArgs), + ).to.be.revertedWith('Create2: Failed on deploy'); + }); + }); + + describe('Workerpool Registry', () => { + const createWorkerpoolArgs = [`Workerpool description`] as [string]; + it('Should predict the correct address for future workerpool creation', async () => { + const proxyCode = await workerpoolRegistry.proxyCode(); + const proxyCodeHash = ethers.utils.keccak256(proxyCode); + const encodedInitializer = Workerpool__factory.createInterface().encodeFunctionData( + 'initialize', + createWorkerpoolArgs, + ); + const salt = ethers.utils.solidityKeccak256( + ['bytes', 'address'], + [encodedInitializer, scheduler.address], + ); + + const expectedAddress = ethers.utils.getCreate2Address( + workerpoolRegistry.address, + salt, + proxyCodeHash, + ); + + const predictedAddress = await workerpoolRegistry.predictWorkerpool( + scheduler.address, + ...createWorkerpoolArgs, + ); + + expect(predictedAddress).to.equal(expectedAddress); + }); + + it('Should create the workerpool and check token details', async () => { + const initialWorkerpoolBalance = await workerpoolRegistry.balanceOf(scheduler.address); + expect(initialWorkerpoolBalance).to.equal(0); + + const predictedAddress = await workerpoolRegistry.predictWorkerpool( + scheduler.address, + ...createWorkerpoolArgs, + ); + await expect( + await workerpoolRegistry.createWorkerpool( + scheduler.address, + ...createWorkerpoolArgs, + ), + ) + .to.emit(workerpoolRegistry, 'Transfer') + .withArgs( + AddressZero, + scheduler.address, + ethers.BigNumber.from(predictedAddress).toString(), + ); + expect(await workerpoolRegistry.balanceOf(scheduler.address)).to.equal( + initialWorkerpoolBalance.add(1), + ); + expect(await workerpoolRegistry.ownerOf(predictedAddress)).to.equal(scheduler.address); + + const tokenAtIndex = await workerpoolRegistry.tokenOfOwnerByIndex(scheduler.address, 0); + expect(ethers.utils.getAddress(BN2Address(tokenAtIndex))).to.equal( + ethers.utils.getAddress(predictedAddress), + ); + + const tokenURI = await workerpoolRegistry.tokenURI(predictedAddress); + const baseURI = await workerpoolRegistry.baseURI(); + expect(tokenURI).to.equal(baseURI + ethers.BigNumber.from(predictedAddress).toString()); + }); + + it('Should check that a new workerpool is well registered', async () => { + const workerpoolCreatedAddress = await workerpoolRegistry.callStatic.createWorkerpool( + scheduler.address, + ...createWorkerpoolArgs, + ); + await workerpoolRegistry + .createWorkerpool(scheduler.address, ...createWorkerpoolArgs) + .then((tx) => tx.wait()); + const isRegistered = await workerpoolRegistry.isRegistered(workerpoolCreatedAddress); + expect(isRegistered).to.be.true; + }); + + it('Should not have a random address registered in workerpool registry', async () => { + expect(await workerpoolRegistry.isRegistered(randomAddress())).to.be.false; + }); + + it('Should not allow creating the same workerpool twice', async () => { + await workerpoolRegistry + .createWorkerpool(scheduler.address, ...createWorkerpoolArgs) + .then((tx) => tx.wait()); + + await expect( + workerpoolRegistry.createWorkerpool(scheduler.address, ...createWorkerpoolArgs), + ).to.be.revertedWith('Create2: Failed on deploy'); + }); + }); + + const computeNameHash = (address: string) => + ethers.utils.namehash(`${address.substring(2)}.addr.reverse`); +}); diff --git a/test/byContract/registries/resources.js b/test/byContract/registries/resources.js deleted file mode 100644 index fab327d39..000000000 --- a/test/byContract/registries/resources.js +++ /dev/null @@ -1,245 +0,0 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ - -// Config -var DEPLOYMENT = require("../../../config/config.json").chains.default; -// Artefacts -var RLC = artifacts.require("rlc-faucet-contract/contracts/RLC"); -var ERC1538Proxy = artifacts.require("iexec-solidity/ERC1538Proxy"); -var IexecInterface = artifacts.require(`IexecInterface${DEPLOYMENT.asset}`); -var AppRegistry = artifacts.require("AppRegistry"); -var DatasetRegistry = artifacts.require("DatasetRegistry"); -var WorkerpoolRegistry = artifacts.require("WorkerpoolRegistry"); -var App = artifacts.require("App"); -var Dataset = artifacts.require("Dataset"); -var Workerpool = artifacts.require("Workerpool"); -var ENSRegistry = artifacts.require("@ensdomains/ens/ENSRegistry"); - -const { BN, expectEvent, expectRevert } = require("patched-openzeppelin-test-helpers"); -const tools = require("../../../utils/tools"); -const enstools = require("../../../utils/ens-tools"); -const odbtools = require("../../../utils/odb-tools"); -const constants = require("../../../utils/constants"); - -Object.extract = (obj, keys) => keys.map(key => obj[key]); - -contract('Ressources', async (accounts) => { - - assert.isAtLeast(accounts.length, 10, "should have at least 10 accounts"); - let iexecAdmin = null; - let appProvider = null; - let datasetProvider = null; - let scheduler = null; - let worker1 = null; - let worker2 = null; - let worker3 = null; - let worker4 = null; - let worker5 = null; - let user = null; - - var RLCInstance = null; - var IexecInstance = null; - var AppRegistryInstance = null; - var DatasetRegistryInstance = null; - var WorkerpoolRegistryInstance = null; - var ENSInstance = null; - - var AppInstances = {}; - var DatasetInstances = {}; - var WorkerpoolInstances = {}; - - /*************************************************************************** - * Environment configuration * - ***************************************************************************/ - before("configure", async () => { - console.log("# web3 version:", web3.version); - - /** - * Retreive deployed contracts - */ - IexecInstance = await IexecInterface.at((await ERC1538Proxy.deployed()).address); - AppRegistryInstance = await AppRegistry.deployed(); - DatasetRegistryInstance = await DatasetRegistry.deployed(); - WorkerpoolRegistryInstance = await WorkerpoolRegistry.deployed(); - ERC712_domain = await IexecInstance.domain(); - ENSInstance = await ENSRegistry.deployed(); - RLCInstance = DEPLOYMENT.asset == "Native" ? { address: constants.NULL.ADDRESS } : await RLC.at(await IexecInstance.token()); - - broker = new odbtools.Broker (IexecInstance); - iexecAdmin = new odbtools.iExecAgent(IexecInstance, accounts[0]); - appProvider = new odbtools.iExecAgent(IexecInstance, accounts[1]); - datasetProvider = new odbtools.iExecAgent(IexecInstance, accounts[2]); - scheduler = new odbtools.Scheduler (IexecInstance, accounts[3]); - worker1 = new odbtools.Worker (IexecInstance, accounts[4]); - worker2 = new odbtools.Worker (IexecInstance, accounts[5]); - worker3 = new odbtools.Worker (IexecInstance, accounts[6]); - worker4 = new odbtools.Worker (IexecInstance, accounts[7]); - worker5 = new odbtools.Worker (IexecInstance, accounts[8]); - user = new odbtools.iExecAgent(IexecInstance, accounts[9]); - await broker.initialize(); - }); - - /*************************************************************************** - * TEST: App creation (by appProvider) * - ***************************************************************************/ - describe("Apps", async () => { - Array(8).fill().map((_, i) => { - describe(`app #${i}`, async () => { - it("creation", async () => { - txMined = await AppRegistryInstance.createApp( - appProvider.address, - "App #"+i, - "DOCKER", - constants.MULTIADDR_BYTES, - web3.utils.keccak256("Content of app #"+i), - "0x1234", - { from: appProvider.address } - ); - AppInstances[i] = await App.at(tools.BN2Address(tools.extractEvents(txMined, AppRegistryInstance.address, "Transfer")[0].args.tokenId)); - }); - - it("content", async () => { - assert.equal(await AppInstances[i].registry(), AppRegistryInstance.address ); - assert.equal(await AppInstances[i].owner(), appProvider.address ); - assert.equal(await AppInstances[i].m_appName(), "App #"+i ); - assert.equal(await AppInstances[i].m_appType(), "DOCKER" ); - assert.equal(await AppInstances[i].m_appMultiaddr(), constants.MULTIADDR_BYTES ); - assert.equal(await AppInstances[i].m_appChecksum(), web3.utils.keccak256("Content of app #"+i)); - assert.equal(await AppInstances[i].m_appMREnclave(), "0x1234" ); - }); - - it("reverse registration", async () => { - ensname = "app#"+i+".apps.iexec.eth"; - await AppInstances[i].setName(ENSInstance.address, ensname, { from: appProvider.address }); - assert.equal(await enstools.lookup(AppInstances[i].address), ensname); - }); - }); - }); - }); - - /*************************************************************************** - * TEST: Dataset creation (by datasetProvider) * - ***************************************************************************/ - describe("Datasets", async () => { - Array(8).fill().map((_, i) => { - describe(`dataset #${i}`, async () => { - it("creation", async () => { - txMined = await DatasetRegistryInstance.createDataset( - datasetProvider.address, - "Dataset #"+i, - constants.MULTIADDR_BYTES, - web3.utils.keccak256("Content of dataset #"+i), - { from: datasetProvider.address } - ); - DatasetInstances[i] = await Dataset.at(tools.BN2Address(tools.extractEvents(txMined, DatasetRegistryInstance.address, "Transfer")[0].args.tokenId)); - }); - - it("content", async () => { - assert.equal(await DatasetInstances[i].registry(), DatasetRegistryInstance.address ); - assert.equal(await DatasetInstances[i].owner(), datasetProvider.address ); - assert.equal(await DatasetInstances[i].m_datasetName(), "Dataset #"+i ); - assert.equal(await DatasetInstances[i].m_datasetMultiaddr(), constants.MULTIADDR_BYTES ); - assert.equal(await DatasetInstances[i].m_datasetChecksum(), web3.utils.keccak256("Content of dataset #"+i)); - }); - - it("reverse registration", async () => { - ensname = "dataset#"+i+".datasets.iexec.eth"; - await DatasetInstances[i].setName(ENSInstance.address, ensname, { from: datasetProvider.address }); - assert.equal(await enstools.lookup(DatasetInstances[i].address), ensname); - }); - }); - }); - }); - - /*************************************************************************** - * TEST: Workerpool creation (by scheduler) * - ***************************************************************************/ - describe("Workerpools", async () => { - Array(8).fill().map((_, i) => { - describe(`workerpool #${i}`, async () => { - it("creation", async () => { - txMined = await WorkerpoolRegistryInstance.createWorkerpool( - scheduler.address, - "Workerpool #"+i, - { from: scheduler.address } - ); - WorkerpoolInstances[i] = await Workerpool.at(tools.BN2Address(tools.extractEvents(txMined, WorkerpoolRegistryInstance.address, "Transfer")[0].args.tokenId)); - }); - - it("content", async () => { - assert.equal(await WorkerpoolInstances[i].registry(), WorkerpoolRegistryInstance.address); - assert.equal(await WorkerpoolInstances[i].owner(), scheduler.address ); - assert.equal(await WorkerpoolInstances[i].m_workerpoolDescription(), "Workerpool #"+i ); - assert.equal(await WorkerpoolInstances[i].m_workerStakeRatioPolicy(), 30 ); - assert.equal(await WorkerpoolInstances[i].m_schedulerRewardRatioPolicy(), 1 ); - }); - - it("reverse registration", async () => { - ensname = "workerpools#"+i+".workerpools.iexec.eth"; - await WorkerpoolInstances[i].setName(ENSInstance.address, ensname, { from: scheduler.address }); - assert.equal(await enstools.lookup(WorkerpoolInstances[i].address), ensname); - }); - }); - }); - - describe("configuration", async () => { - it("owner can configure", async () => { - txMined = await WorkerpoolInstances[1].changePolicy( - 35, // worker stake ratio - 5, // scheduler reward ratio - { from: scheduler.address } - ); - - events = tools.extractEvents(txMined, WorkerpoolInstances[1].address, "PolicyUpdate"); - assert.equal(events[0].args.oldWorkerStakeRatioPolicy, 30 ); - assert.equal(events[0].args.newWorkerStakeRatioPolicy, 35 ); - assert.equal(events[0].args.oldSchedulerRewardRatioPolicy, 1 ); - assert.equal(events[0].args.newSchedulerRewardRatioPolicy, 5 ); - - assert.equal(await WorkerpoolInstances[1].owner(), scheduler.address); - assert.equal(await WorkerpoolInstances[1].m_workerpoolDescription(), "Workerpool #1" ); - assert.equal(await WorkerpoolInstances[1].m_workerStakeRatioPolicy(), 35 ); - assert.equal(await WorkerpoolInstances[1].m_schedulerRewardRatioPolicy(), 5 ); - }); - - it("owner restriction apply", async () => { - await expectRevert.unspecified(WorkerpoolInstances[1].changePolicy( - 0, - 0, - { from: user.address } - )); - - assert.equal(await WorkerpoolInstances[1].owner(), scheduler.address); - assert.equal(await WorkerpoolInstances[1].m_workerpoolDescription(), "Workerpool #1" ); - assert.equal(await WorkerpoolInstances[1].m_workerStakeRatioPolicy(), 35 ); - assert.equal(await WorkerpoolInstances[1].m_schedulerRewardRatioPolicy(), 5 ); - }); - - it("invalid configuration refused", async () => { - await expectRevert.unspecified(WorkerpoolInstances[1].changePolicy( - 100, // worker stake ratio - 150, // scheduler reward ratio (should not be above 100%) - { from: scheduler.address } - )); - - assert.equal(await WorkerpoolInstances[1].owner(), scheduler.address); - assert.equal(await WorkerpoolInstances[1].m_workerpoolDescription(), "Workerpool #1" ); - assert.equal(await WorkerpoolInstances[1].m_workerStakeRatioPolicy(), 35 ); - assert.equal(await WorkerpoolInstances[1].m_schedulerRewardRatioPolicy(), 5 ); - }); - }); - }); -}); diff --git a/test/utils/IexecWrapper.ts b/test/utils/IexecWrapper.ts new file mode 100644 index 000000000..fac69ee9e --- /dev/null +++ b/test/utils/IexecWrapper.ts @@ -0,0 +1,325 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { TypedDataDomain } from '@ethersproject/abstract-signer'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { BigNumber, ContractReceipt } from 'ethers'; +import hre, { ethers } from 'hardhat'; +import config from '../../config/config.json'; +import { + AppRegistry, + AppRegistry__factory, + DatasetRegistry, + DatasetRegistry__factory, + IexecAccessors__factory, + IexecInterfaceNative__factory, + IexecLibOrders_v5, + IexecMaintenanceDelegate__factory, + RLC__factory, + WorkerpoolRegistry, + WorkerpoolRegistry__factory, + Workerpool__factory, +} from '../../typechain'; +import { IexecPoco1__factory } from '../../typechain/factories/contracts/modules/interfaces/IexecPoco1.v8.sol'; +import { + IexecOrders, + OrderOperation, + hashOrder, + signOrderOperation, + signOrders, +} from '../../utils/createOrders'; +import { IexecAccounts, getDealId, getTaskId, setNextBlockTimestamp } from '../../utils/poco-tools'; +import { extractEventsFromReceipt } from '../../utils/tools'; +const DEPLOYMENT_CONFIG = config.chains.default; + +export class IexecWrapper { + proxyAddress: string; + accounts: IexecAccounts; + domain: TypedDataDomain; + + constructor(proxyAddress: string, accounts: IexecAccounts) { + this.proxyAddress = proxyAddress; + this.accounts = accounts; + this.domain = { + name: 'iExecODB', + version: '5.0.0', + chainId: hre.network.config.chainId, + verifyingContract: this.proxyAddress, + }; + } + + /** + * Get configured domain. + * @returns domain object + */ + getDomain() { + return this.domain; + } + + /** + * Deposit value in iExec account. + * @param value The value to deposit. + * @param account Deposit value for an account. + */ + async depositInIexecAccount(account: SignerWithAddress, value: number) { + switch (DEPLOYMENT_CONFIG.asset) { + case 'Native': + await IexecInterfaceNative__factory.connect(this.proxyAddress, account) + .deposit({ + value: (value * 10 ** 9).toString(), + }) + .then((tx) => tx.wait()); + break; + case 'Token': + const rlc = RLC__factory.connect( + await IexecAccessors__factory.connect( + this.proxyAddress, + this.accounts.anyone, + ).token(), + this.accounts.iexecAdmin, + ); + // Transfer RLC from owner to recipient + await rlc.transfer(account.address, value); + // Deposit + await rlc.connect(account).approveAndCall(this.proxyAddress, value, '0x'); + break; + default: + break; + } + } + + /** + * Compute the amount of RLCs to be staked by the scheduler + * for a deal. We first compute the percentage by task + * (See contracts/Store.sol#WORKERPOOL_STAKE_RATIO), then + * compute the total amount according to the volume. + * @param workerpoolPrice + * @param volume number of tasks of a deal + * @returns total amount to stake by the scheduler + */ + async computeSchedulerDealStake(workerpoolPrice: number, volume: number): Promise { + const stakeRatio = ( + await IexecAccessors__factory.connect( + this.proxyAddress, + this.accounts.anyone, + ).workerpool_stake_ratio() + ).toNumber(); + return ((workerpoolPrice * stakeRatio) / 100) * volume; + } + + /** + * Compute the amount of RLC tokens to be staked by the + * worker in order to contribute to a task. + * @param workerpoolAddress address of the workerpool + * @param workerpoolPrice price of the workerpool + * @returns value of worker stake + */ + async computeWorkerTaskStake(workerpoolAddress: string, workerpoolPrice: number) { + // TODO make "m_workerStakeRatioPolicy()" as view function in IWorkerpool.v8 and use it. + const workerStakeRatio = ( + await Workerpool__factory.connect( + workerpoolAddress, + this.accounts.anyone, + ).m_workerStakeRatioPolicy() + ).toNumber(); + return (workerpoolPrice * workerStakeRatio) / 100; + } + + /** + * Compute the amount of RLC tokens that the scheduler receives + * as a reward by task. + * @param workerpoolAddress address of the workerpool + * @returns value of the reward + */ + async getSchedulerTaskRewardRatio(workerpoolAddress: string) { + return ( + await Workerpool__factory.connect( + workerpoolAddress, + this.accounts.anyone, + ).m_schedulerRewardRatioPolicy() + ).toNumber(); + } + + async setTeeBroker(brokerAddress: string) { + await IexecMaintenanceDelegate__factory.connect(this.proxyAddress, this.accounts.iexecAdmin) + .setTeeBroker(brokerAddress) + .then((tx) => tx.wait()); + } + + /** + * Hash all orders using current domain. + */ + hashOrders(orders: IexecOrders) { + return { + appOrderHash: this.hashOrder(orders.app), + datasetOrderHash: this.hashOrder(orders.dataset), + workerpoolOrderHash: this.hashOrder(orders.workerpool), + requestOrderHash: this.hashOrder(orders.requester), + }; + } + + /** + * Hash an order using current domain. + */ + hashOrder(order: Record) { + return hashOrder(this.domain, order); + } + + /** + * Sign an order operation using current domain. + */ + async signOrderOperation( + orderOperation: OrderOperation, + signer: SignerWithAddress, + ): Promise { + return signOrderOperation(this.domain, orderOperation, signer); + } + + async signAndSponsorMatchOrders( + appOrder: IexecLibOrders_v5.AppOrderStruct, + datasetOrder: IexecLibOrders_v5.DatasetOrderStruct, + workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrderStruct, + requestOrder: IexecLibOrders_v5.RequestOrderStruct, + ) { + return this._signAndMatchOrders( + new IexecOrders(appOrder, datasetOrder, workerpoolOrder, requestOrder), + true, + ); + } + + async signAndMatchOrders( + appOrder: IexecLibOrders_v5.AppOrderStruct, + datasetOrder: IexecLibOrders_v5.DatasetOrderStruct, + workerpoolOrder: IexecLibOrders_v5.WorkerpoolOrderStruct, + requestOrder: IexecLibOrders_v5.RequestOrderStruct, + ) { + return this._signAndMatchOrders( + new IexecOrders(appOrder, datasetOrder, workerpoolOrder, requestOrder), + false, + ); + } + + /** + * @notice Before properly matching orders, this method takes care of + * signing orders and depositing required stakes. + * A sponsor will be in charge of paying for the deal if `withSponsor` is enabled. + * Otherwise the requester will be in charge of paying for the deal. + */ + private async _signAndMatchOrders(orders: IexecOrders, withSponsor: boolean) { + await signOrders(this.domain, orders, { + appOwner: this.accounts.appProvider, + datasetOwner: this.accounts.datasetProvider, + workerpoolOwner: this.accounts.scheduler, + requester: this.accounts.requester, + }); + const appOrder = orders.app; + const datasetOrder = orders.dataset; + const workerpoolOrder = orders.workerpool; + const requestOrder = orders.requester; + const taskIndex = ( + await IexecAccessors__factory.connect( + this.proxyAddress, + this.accounts.anyone, + ).viewConsumed(this.hashOrder(requestOrder)) + ).toNumber(); + const dealId = getDealId(this.domain, requestOrder, taskIndex); + const taskId = getTaskId(dealId, taskIndex); + const volume = Number(requestOrder.volume); + const taskPrice = + Number(appOrder.appprice) + + Number(datasetOrder.datasetprice) + + Number(workerpoolOrder.workerpoolprice); + const dealPrice = taskPrice * volume; + const dealPayer = withSponsor ? this.accounts.sponsor : this.accounts.requester; + await this.depositInIexecAccount(dealPayer, dealPrice); + await this.computeSchedulerDealStake(Number(workerpoolOrder.workerpoolprice), volume).then( + (stake) => this.depositInIexecAccount(this.accounts.scheduler, stake), + ); + const startTime = await setNextBlockTimestamp(); + const iexecPocoAsDealPayer = IexecPoco1__factory.connect(this.proxyAddress, dealPayer); + await ( + withSponsor + ? iexecPocoAsDealPayer.sponsorMatchOrders(...orders.toArray()) + : iexecPocoAsDealPayer.matchOrders(...orders.toArray()) + ).then((tx) => tx.wait()); + return { dealId, taskId, taskIndex, dealPrice, startTime }; + } + + async createAssets() { + return { + appAddress: await this.createApp(), + datasetAddress: await this.createDataset(), + workerpoolAddress: await this.createWorkerpool(), + }; + } + + async createApp() { + const iexec = IexecAccessors__factory.connect(this.proxyAddress, this.accounts.anyone); + const appRegistry: AppRegistry = AppRegistry__factory.connect( + await iexec.appregistry(), + this.accounts.appProvider, + ); + const appReceipt = await appRegistry + .createApp( + this.accounts.appProvider.address, + 'my-app', + 'APP_TYPE_0', + ethers.constants.HashZero, + ethers.constants.HashZero, + ethers.constants.HashZero, + ) + .then((tx) => tx.wait()); + return await extractRegistryEntryAddress(appReceipt, appRegistry.address); + } + + async createDataset() { + const iexec = IexecAccessors__factory.connect(this.proxyAddress, this.accounts.anyone); + const datasetRegistry: DatasetRegistry = DatasetRegistry__factory.connect( + await iexec.datasetregistry(), + this.accounts.datasetProvider, + ); + const datasetReceipt = await datasetRegistry + .createDataset( + this.accounts.datasetProvider.address, + 'my-dataset', + ethers.constants.HashZero, + ethers.constants.HashZero, + ) + .then((tx) => tx.wait()); + return await extractRegistryEntryAddress(datasetReceipt, datasetRegistry.address); + } + + async createWorkerpool() { + const iexec = IexecAccessors__factory.connect(this.proxyAddress, this.accounts.anyone); + const workerpoolRegistry: WorkerpoolRegistry = WorkerpoolRegistry__factory.connect( + await iexec.workerpoolregistry(), + this.accounts.scheduler, + ); + const workerpoolReceipt = await workerpoolRegistry + .createWorkerpool(this.accounts.scheduler.address, 'my-workerpool') + .then((tx) => tx.wait()); + return await extractRegistryEntryAddress(workerpoolReceipt, workerpoolRegistry.address); + } +} + +/** + * Extract address of a newly created entry in a registry contract + * from the tx receipt. + * @param receipt contract receipt + * @param registryInstanceAddress address of the registry contract + * @returns address of the entry in checksum format. + */ +async function extractRegistryEntryAddress( + receipt: ContractReceipt, + registryInstanceAddress: string, +): Promise { + const events = extractEventsFromReceipt(receipt, registryInstanceAddress, 'Transfer'); + if (events && events[0].args) { + const lowercaseAddress = ethers.utils.hexZeroPad( + BigNumber.from(events[0].args['tokenId']).toHexString(), + 20, + ); + return ethers.utils.getAddress(lowercaseAddress); + } + return ''; +} diff --git a/testchains/Dockerfile_native_ganache b/testchains/Dockerfile_native_ganache deleted file mode 100644 index 8b87ac9fe..000000000 --- a/testchains/Dockerfile_native_ganache +++ /dev/null @@ -1,21 +0,0 @@ -FROM trufflesuite/ganache:latest as build - -USER root - -RUN apt update -RUN apt install -y make gcc g++ python git bash jq -RUN mkdir /iexec-poco -COPY . /iexec-poco -RUN mv /iexec-poco/config/config_native.json /iexec-poco/config/config.json - -ARG MNEMONIC - -RUN mkdir /ganachedb -RUN bash /iexec-poco/testchains/ganache/migrate.sh - -FROM trufflesuite/ganache:latest as runtime - -COPY --from=build "/ganachedb" "/ganachedb" - -ENTRYPOINT ["node", "/app/dist/node/cli.js", "--chain.networkId", "65535", "--chain.chainId", "65535", "--chain.hardfork", "berlin", "--database.dbPath", "/ganachedb"] -CMD [] diff --git a/testchains/Dockerfile_token_ganache b/testchains/Dockerfile_token_ganache deleted file mode 100644 index ce5b2eaef..000000000 --- a/testchains/Dockerfile_token_ganache +++ /dev/null @@ -1,21 +0,0 @@ -FROM trufflesuite/ganache:latest as build - -USER root - -RUN apt update -RUN apt install -y make gcc g++ python git bash jq -RUN mkdir /iexec-poco -COPY . /iexec-poco -RUN mv /iexec-poco/config/config_token.json /iexec-poco/config/config.json - -ARG MNEMONIC - -RUN mkdir /ganachedb -RUN bash /iexec-poco/testchains/ganache/migrate-all.sh - -FROM trufflesuite/ganache:latest as runtime - -COPY --from=build "/ganachedb" "/ganachedb" - -ENTRYPOINT ["node", "/app/dist/node/cli.js", "--chain.networkId", "65535", "--chain.chainId", "65535", "--chain.hardfork", "london", "--database.dbPath", "/ganachedb"] -CMD [] diff --git a/testchains/ganache/migrate-all.sh b/testchains/ganache/migrate-all.sh deleted file mode 100644 index 08266b559..000000000 --- a/testchains/ganache/migrate-all.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -echo "========== STARTING BLOCKCHAIN =========="; -nohup node /app/dist/node/cli.js --wallet.mnemonic "$MNEMONIC" --chain.networkId 65535 --chain.chainId 65535 --chain.hardfork london --database.dbPath "/ganachedb" > deployed.txt 2>&1 & -sleep 4 - -cd /iexec-poco && \ - echo "========== INSTALL DEPENDENCIES ==========" && \ - bash -i -c "npm ci --production=false" && \ - echo "========== STANDARD DEPLOYMENT ==========" && \ - jq . config/config.json && \ - bash -i -c "./node_modules/.bin/truffle migrate" && \ - echo "========== SET RLC IN CONFIG ==========" && \ - echo $(jq ". | .chains.default.token = $(jq '.networks."65535".address' build/contracts/RLC.json)" config/config.json) > config/config.json && \ - rm -R build && \ - echo "========== ENTERPRISE DEPLOYMENT ==========" && \ - jq . config/config.json && \ - bash -i -c "KYC=1 PROXY_SALT=0x0000000000000000000000000000000000000000000000000000000000000001 ./node_modules/.bin/truffle migrate" && \ - echo "========== CLEANUP ==========" && \ - rm -R build && \ - rm -R contracts && \ - echo "========== DONE =========="; diff --git a/testchains/ganache/migrate.sh b/testchains/ganache/migrate.sh deleted file mode 100644 index f677e203a..000000000 --- a/testchains/ganache/migrate.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -echo "========== STARTING BLOCKCHAIN =========="; -nohup node /app/dist/node/cli.js --wallet.mnemonic "$MNEMONIC" --chain.networkId 65535 --chain.chainId 65535 --chain.hardfork berlin --database.dbPath "/ganachedb" > deployed.txt 2>&1 & -sleep 4 - -cd /iexec-poco && \ - echo "========== INSTALL DEPENDENCIES ==========" && \ - bash -i -c "npm ci --production=false" && \ - echo "========== STANDARD DEPLOYMENT ==========" && \ - jq . config/config.json && \ - bash -i -c "./node_modules/.bin/truffle migrate" && \ - echo "========== CLEANUP ==========" && \ - rm -R build && \ - rm -R contracts && \ - echo "========== DONE =========="; diff --git a/testchains/nethermind.dockerfile b/testchains/nethermind.dockerfile deleted file mode 100644 index 77ccc833b..000000000 --- a/testchains/nethermind.dockerfile +++ /dev/null @@ -1,102 +0,0 @@ -### -## docker image build \ -## --file testchains/nethermind.dockerfile \ -## --tag nexus.intra.iex.ec/poco-chain:native-vX.Y.Z-alpha.0-5s \ -## --build-arg MNEMONIC="actual surround disorder swim upgrade devote digital misery truly verb slide final" \ -## --build-arg CHAIN_TYPE=native \ -## --build-arg CHAIN_BLOCK_TIME=5 \ -## --build-arg CHAIN_FORCE_SEALING=true \ -## . -### - -FROM nexus.intra.iex.ec/nethermind:1.18.x-0 AS builder - -RUN apt-get update && apt-get -y install bash jq nodejs npm git -RUN echo -e "Node: `node -v` - npm: `npm -v`" - -### -## Get build configuration. -### -# Type of the blockchain to build. -# "native" or "token". -ARG CHAIN_TYPE=native -RUN echo "CHAIN_TYPE: ${CHAIN_TYPE}" -# New blocks creation interval in seconds. -# "1", "5", "20", ... -ARG CHAIN_BLOCK_TIME=5 -RUN echo "CHAIN_BLOCK_TIME: ${CHAIN_BLOCK_TIME}" -# Always create new blocks (even without txs). -# "true" or "false" -ARG CHAIN_FORCE_SEALING=true -RUN echo "CHAIN_FORCE_SEALING: ${CHAIN_FORCE_SEALING}" - -### -## Install npm packages -### -WORKDIR /iexec-poco -COPY package.json package-lock.json ./ -# Remove ethereumjs-util for sidechains -RUN if [ "${CHAIN_TYPE}" = "native" ] ; \ - then \ - sed -i '/ethereumjs-util/d' package.json; \ - fi -RUN npm ci --production=false - -### -## Copy chain config. -### -COPY testchains/nethermind/poco-chain.json /nethermind/chainspec/poco-chain.json -COPY testchains/nethermind/poco-chain.cfg /nethermind/configs/poco-chain.cfg -COPY testchains/nethermind/keystore /nethermind/keystore -RUN sed -i "s/@stepDuration@/${CHAIN_BLOCK_TIME}/" /nethermind/chainspec/poco-chain.json -RUN sed -i "s/@forceSealing@/${CHAIN_FORCE_SEALING}/" /nethermind/configs/poco-chain.cfg -# Remove eip1559 for sidechains -RUN if [ "${CHAIN_TYPE}" = "native" ] ; \ - then \ - sed -i "/eip1559/d" /nethermind/chainspec/poco-chain.json; \ - fi - -### -## Copy project files -## Copy only needed files to make use -## of Docker's build cache. -### -COPY config config -COPY contracts contracts -COPY migrations migrations -COPY scripts scripts -COPY utils utils -COPY truffle-security.json truffle-security.json -COPY truffle.js truffle.js -COPY testchains/nethermind/migrate-all.sh migrate-all.sh -COPY testchains/nethermind/migrate.sh migrate.sh -RUN mv config/config_${CHAIN_TYPE}.json config/config.json - -### -## Deploy contracts -### -ARG DEV_NODE -ARG MNEMONIC -RUN echo "MNEMONIC: ${MNEMONIC}" -# Choose migration file according to chain type. -# native -> migrate.sh -# token -> migrate-all.sh -RUN if [ "${CHAIN_TYPE}" = "native" ] ; \ - then \ - echo "Migration file: migrate.sh"; \ - bash migrate.sh; \ - else \ - echo "Migration file: migrate-all.sh"; \ - bash migrate-all.sh; \ - fi - -FROM nexus.intra.iex.ec/nethermind:1.18.x-0 - -COPY --from=builder /nethermind /nethermind -COPY --from=builder /iexec-poco/build /build - -### -## Configure entrypoint -### -ENTRYPOINT [ "/nethermind/Nethermind.Runner" ] -CMD [ "--config", "poco-chain" ] diff --git a/testchains/nethermind/README.md b/testchains/nethermind/README.md deleted file mode 100644 index 6e404fd7d..000000000 --- a/testchains/nethermind/README.md +++ /dev/null @@ -1,7 +0,0 @@ -This folder contains a ready to use docker-compose file that starts: -* `poco-chain` service. Accessible on http://localhost:8545/ -* `netstats` dashboard to monitor the network status. Accessible on http://localhost:8080. -* `grafana` to display gas usage and other metrics of the chain. Accessible on http://localhost:8081. -* `prometheus` and `pushgateway` used to collect metrics from `poco-chain`. - -Note: uncomment Docker volumes in compose file to persist data. diff --git a/testchains/nethermind/docker-compose.yml b/testchains/nethermind/docker-compose.yml deleted file mode 100644 index 43c9f7f44..000000000 --- a/testchains/nethermind/docker-compose.yml +++ /dev/null @@ -1,74 +0,0 @@ -version: "3.4" - -volumes: - nethermind-db: - keystore: - prometheus-data: - -services: - poco-chain: - image: nexus.intra.iex.ec/poco-chain: - container_name: poco-chain - environment: - # Netstats - - NETHERMIND_ETHSTATSCONFIG_ENABLED=true - - NETHERMIND_ETHSTATSCONFIG_CONTACT= - - NETHERMIND_ETHSTATSCONFIG_SERVER=ws://netstats:3000/api - - NETHERMIND_ETHSTATSCONFIG_SECRET=whatever - # Metrics - - NETHERMIND_METRICSCONFIG_ENABLED=true - - NETHERMIND_METRICSCONFIG_PUSHGATEWAYURL=http://pushgateway:9091/metrics - ports: - - 8545:8545 - # volumes: - # - nethermind-db:/nethermind/nethermind_db/poco-chain - # - keystore:/nethermind/keystore - depends_on: - - netstats - - pushgateway - - netstats: - image: docker-regis.iex.ec/netstats:0.1.0 - container_name: netstats - ports: - - 8080:3000 - environment: - - WS_SECRET=whatever - restart: always - - grafana: - image: grafana/grafana:9.4.3 - container_name: grafana - environment: - # Disable authentication. - - GF_AUTH_ANONYMOUS_ENABLED=true - - GF_AUTH_ANONYMOUS_ORG_NAME=Main Org. - - GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer - ports: - - 8081:3000 - volumes: - - ./metrics/grafana/:/etc/grafana/provisioning/ - - prometheus: - image: prom/prometheus:v2.42.0 - container_name: prometheus - command: - - '--config.file=/etc/prometheus/prometheus.yml' - - '--storage.tsdb.path=/prometheus' - - '--web.console.libraries=/etc/prometheus/console_libraries' - - '--web.console.templates=/etc/prometheus/consoles' - - '--storage.tsdb.retention=200h' - - '--web.enable-lifecycle' - restart: unless-stopped - expose: - - 9090 - volumes: - - ./metrics/prometheus/:/etc/prometheus/ - # - prometheus-data:/prometheus - - pushgateway: - image: prom/pushgateway:v1.5.1 - container_name: pushgateway - restart: unless-stopped - expose: - - 9091 diff --git a/testchains/nethermind/keystore/key-c08c3def622af1476f2db0e3cc8ccaead07be3bb b/testchains/nethermind/keystore/key-c08c3def622af1476f2db0e3cc8ccaead07be3bb deleted file mode 100644 index 25c505c1a..000000000 --- a/testchains/nethermind/keystore/key-c08c3def622af1476f2db0e3cc8ccaead07be3bb +++ /dev/null @@ -1 +0,0 @@ -{"id":"42dd2cfb-ac7c-6682-1c2d-43d4b5eebb44","version":3,"crypto":{"cipher":"aes-128-ctr","cipherparams":{"iv":"e2e45028efacbbddf28480e38a8cb124"},"ciphertext":"a3e5739c698512ab7dd1815036d6d540134678d72f7d7323a4305f97022f2ce7","kdf":"pbkdf2","kdfparams":{"c":10240,"dklen":32,"prf":"hmac-sha256","salt":"a1795024f43c9a6b21709fcdcf28ef7b43130b045ecbf74fdd18b71e7046df3e"},"mac":"e151f9a0131e4cc109fea27a41338c18453026dea43a12717cda17d8b797c8a7"},"address":"c08c3def622af1476f2db0e3cc8ccaead07be3bb","name":"","meta":"{}"} \ No newline at end of file diff --git a/testchains/nethermind/keystore/validator-wallet-password b/testchains/nethermind/keystore/validator-wallet-password deleted file mode 100644 index 6b8e7113e..000000000 --- a/testchains/nethermind/keystore/validator-wallet-password +++ /dev/null @@ -1 +0,0 @@ -cLYaO6/petgU0NqdvQo6i6bBWDM7SzZw diff --git a/testchains/nethermind/metrics/grafana/dashboards/dashboard.yml b/testchains/nethermind/metrics/grafana/dashboards/dashboard.yml deleted file mode 100644 index 95188e86a..000000000 --- a/testchains/nethermind/metrics/grafana/dashboards/dashboard.yml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: 1 - -providers: -- name: 'Prometheus' - orgId: 1 - folder: '' - type: file - disableDeletion: false - editable: true - options: - path: /etc/grafana/provisioning/dashboards/ \ No newline at end of file diff --git a/testchains/nethermind/metrics/grafana/dashboards/nethermind.json b/testchains/nethermind/metrics/grafana/dashboards/nethermind.json deleted file mode 100644 index 7e49aed32..000000000 --- a/testchains/nethermind/metrics/grafana/dashboards/nethermind.json +++ /dev/null @@ -1,6061 +0,0 @@ -{ - "annotations": { - "list": [ - { - "$$hashKey": "object:13", - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 0, - "links": [], - "liveNow": false, - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 144, - "panels": [], - "title": "Gas usage", - "type": "row" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 1 - }, - "id": 146, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "9.3.6", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", - "expr": "nethermind_gas_limit", - "legendFormat": "__auto", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "builder", - "expr": "nethermind_gas_used", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "Gas used", - "type": "timeseries" - }, - { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 9 - }, - "id": 118, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 0, - "y": 17 - }, - "id": 49, - "links": [], - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.3.6", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_sync_peers{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "format": "time_series", - "intervalFactor": 1, - "refId": "A" - } - ], - "title": "Sync Peers", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 3, - "y": 17 - }, - "id": 16, - "links": [], - "options": { - "colorMode": "value", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ] - }, - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "max" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "9.3.6", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_blocks{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "B" - } - ], - "title": "Block Number", - "type": "stat" - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 21 - }, - "hiddenSeries": false, - "id": 136, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": false - }, - "percentage": false, - "pluginVersion": "9.3.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_json_rpc_bytes_sent{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "interval": "", - "legendFormat": "RPC Sent", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_json_rpc_bytes_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "RPC Received", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_discovery_bytes_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Dscv Sent", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_discovery_bytes_sent{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Dscv Received", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_p2pbytes_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "P2P Received", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_p2pbytes_sent{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "P2P Sent", - "refId": "F" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Traffic", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:209", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:210", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 27 - }, - "hiddenSeries": false, - "id": 73, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.3.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_version{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Version", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:79", - "decimals": 3, - "format": "short", - "label": "", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:80", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "Basic Parameters", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 86, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Total number of sealed blocks", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-green" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 18 - }, - "id": 88, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.5.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_blocks_sealed{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Blocks Sealed (total)", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Total number of failed block seals", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - }, - { - "color": "semi-dark-red", - "value": 10000 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 18 - }, - "id": 90, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.5.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_failed_block_seals{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Failed Block Seals (total)", - "type": "stat" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Current AuRa step", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 18 - }, - "hiddenSeries": false, - "id": 93, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "maxDataPoints": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_au_ra_step{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Aura Step", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:373", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:374", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Indicator if blocks can be produced", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 26 - }, - "id": 92, - "maxDataPoints": 1, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.5.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_can_produce_blocks{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Blocks Production Indicator", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Number of reported malicious misbehaviour validators", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "semi-dark-red" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 26 - }, - "id": 95, - "maxDataPoints": 1, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.5.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_reported_malicious_misbehaviour{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Reported Malicious Misbehaviour", - "type": "stat" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Number of sealed transactions generated by engine", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 26 - }, - "hiddenSeries": false, - "id": 97, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "maxDataPoints": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_sealed_transactions{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "hide": false, - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Sealed Transactions", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1610", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1611", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Number of reported benign misbehaviour validators", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 0, - "y": 34 - }, - "id": 94, - "maxDataPoints": 1, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.5.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_reported_benign_misbehaviour{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Reported Benign Misbehaviour", - "type": "stat" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Number of current AuRa validators", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 6, - "x": 6, - "y": 34 - }, - "id": 96, - "maxDataPoints": 1, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "text": {}, - "textMode": "auto" - }, - "pluginVersion": "7.5.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_validators_count{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "Validators Count", - "type": "stat" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "RANDAO number of reveal number transactions", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 34 - }, - "hiddenSeries": false, - "id": 99, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "maxDataPoints": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_reveal_number{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "RANDAO Reveal Number", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1967", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1968", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "POSDAO number of emit init change transactions", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 42 - }, - "hiddenSeries": false, - "id": 100, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "maxDataPoints": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_emit_initiate_change{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "POSDAO Emit Initiate Change", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2069", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:2070", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "RANDAO number of commit hash transactions", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 42 - }, - "hiddenSeries": false, - "id": 98, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "maxDataPoints": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_commit_hash_transaction{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "RANDAO Commit Hash Transaction", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1661", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:1662", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "AuRa Specific", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 11 - }, - "id": 132, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 19 - }, - "hiddenSeries": false, - "id": 65, - "legend": { - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "dotnet_total_memory_bytes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "Managed Memory", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": " process_working_set_bytes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"} - dotnet_total_memory_bytes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "legendFormat": "Unmanaged Memory", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Memory", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:450", - "format": "bytes", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:451", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 3, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 26 - }, - "hiddenSeries": false, - "id": 2, - "legend": { - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "total": true, - "values": true - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "deriv(dotnet_total_memory_bytes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m]) > 0", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Managed Memory", - "refId": "A", - "target": "*.Nethermind_Runner.*.*.*.*.gauge.*.Process_Physical_Memory" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Memory Growth (per second)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2264", - "format": "Bps", - "logBase": 1, - "max": "8000000", - "min": "0", - "show": true - }, - { - "$$hashKey": "object:2265", - "format": "bytes", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 33 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(dotnet_collection_count_total{generation=\"0\",job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "hide": false, - "instant": false, - "intervalFactor": 1, - "legendFormat": "Gen 0", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(dotnet_collection_count_total{generation=\"1\",job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Gen 1", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(dotnet_collection_count_total{generation=\"2\",job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Gen 2", - "refId": "C" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "GC (per minute)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "ops", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "Memory", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 12 - }, - "id": 105, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 25 - }, - "hiddenSeries": false, - "id": 116, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": true, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_loaded_from_db_nodes_count{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "DB", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_loaded_from_rlp_cache_nodes_count{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "RLP Cache", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_loaded_from_cache_nodes_count{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Node Cache", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "", - "interval": "", - "legendFormat": "", - "refId": "D" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Caching Efficiency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:126", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:127", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 33 - }, - "hiddenSeries": false, - "id": 128, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_memory_used_by_cache{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Pruning Cache", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:64", - "format": "decbytes", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:65", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 40 - }, - "hiddenSeries": false, - "id": 122, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": true, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_committed_nodes_count{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Committed", - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_persisted_node_count{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "Persisted", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_pruned_nodes_count{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "hide": true, - "instant": false, - "interval": "", - "legendFormat": "Pruned", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_cached_nodes_count{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Cached", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_replaced_nodes_count{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "Replaced", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_pruned_persisted_nodes_count{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "Pruned Persisted", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_pruned_transient_nodes_count{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "instant": false, - "interval": "", - "legendFormat": "Pruned Transient", - "refId": "F" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Pruning Levels", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:773", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:774", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 47 - }, - "hiddenSeries": false, - "id": 120, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_snapshot_persistence_time{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Persistence", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_pruning_time{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Pruning", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_deep_pruning_time{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "", - "refId": "C" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Times", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:545", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:546", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "Pruning", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 13 - }, - "id": 59, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 37 - }, - "hiddenSeries": false, - "id": 102, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_last_block_processing_time_in_ms{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Block processing time (ms)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:112", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:113", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 3, - "gridPos": { - "h": 5, - "w": 24, - "x": 0, - "y": 46 - }, - "hiddenSeries": false, - "id": 39, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_blocks{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Blocks", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Blocks (per second)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:247", - "format": "pps", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:248", - "format": "short", - "logBase": 1, - "show": false - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 51 - }, - "hiddenSeries": false, - "id": 45, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": true, - "min": true, - "show": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_sync_peers{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Sync Peers", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Sync Peers", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:1769", - "format": "short", - "label": "Sync Peers", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:1770", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 57 - }, - "hiddenSeries": false, - "id": 79, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_state_synced{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "hide": false, - "interval": "", - "legendFormat": "State", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_state_synced{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[60m])*3600", - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "State Synced (in bytes)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:412", - "format": "decbytes", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:413", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 63 - }, - "hiddenSeries": false, - "id": 75, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_fast_headers{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Headers", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_fast_bodies{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Bodies", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_fast_receipts{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Receipts", - "refId": "C" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Fast Blocks", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transformations": [ - { - "id": "seriesToColumns", - "options": {} - } - ], - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:134", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:135", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 71 - }, - "hiddenSeries": false, - "id": 69, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_blocks{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Blocks", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 78 - }, - "hiddenSeries": false, - "id": 67, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "process_cpu_seconds_total{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "legendFormat": "Uptime", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "CPU time (tracks restarts)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "Sync", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 14 - }, - "id": 130, - "panels": [ - { - "aliasColors": { - "Deserialization Failures": "purple", - "Invalid Requests": "purple", - "RPC Errors": "red", - "RPC Requests": "green", - "RPC Successes": "green" - }, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 27 - }, - "hiddenSeries": false, - "id": 61, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_json_rpc_requests{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "hide": true, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "RPC Requests", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_json_rpc_successes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "RPC Successes", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_json_rpc_errors{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "RPC Errors", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_json_rpc_request_deserialization_failures{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Deserialization Failures", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_json_rpc_invalid_requests{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Invalid Requests", - "refId": "D" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "JSON RPC (per minute)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:374", - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:375", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [], - "mappings": [], - "thresholds": { - "mode": "percentage", - "steps": [ - { - "color": "green" - }, - { - "color": "semi-dark-orange", - "value": 95 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 34 - }, - "id": 126, - "links": [], - "options": { - "displayMode": "gradient", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "sum" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "text": {} - }, - "pluginVersion": "7.5.3", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_json_rpc_requests{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "RPC Requests", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_json_rpc_successes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "RPC Successes", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_json_rpc_errors{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "RPC Errors", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_json_rpc_request_deserialization_failures{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Deserialization Failures", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_json_rpc_invalid_requests{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Invalid Requests", - "refId": "D" - } - ], - "title": "JSON RPC (total)", - "transparent": true, - "type": "bargauge" - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "JSON RPC", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 15 - }, - "id": 134, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 28 - }, - "hiddenSeries": false, - "id": 80, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_beamed_transactions{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Transactions", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Beamed Transactions", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 28 - }, - "hiddenSeries": false, - "id": 82, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_beamed_blocks{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Blocks", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Beamed Blocks", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 35 - }, - "hiddenSeries": false, - "id": 83, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_beamed_requests{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Requests", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Beamed Requests", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 35 - }, - "hiddenSeries": false, - "id": 84, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "nethermind_beamed_trie_nodes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Trie Nodes", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Beamed Trie Nodes", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "Beam", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 16 - }, - "id": 55, - "panels": [ - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 5, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 40 - }, - "hiddenSeries": false, - "id": 47, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.2", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_incoming_connections{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Incoming Connections", - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_outgoing_connections{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Outgoing Connections", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_handshakes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Handshakes", - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_hellos_sent{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Hellos Sent", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_hellos_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Hellos Received", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_statuses_sent{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "hide": false, - "intervalFactor": 1, - "legendFormat": "Statuses Sent", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_statuses_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Statuses Received", - "refId": "D" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Connections (per minute)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 5, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 48 - }, - "hiddenSeries": false, - "id": 27, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.2", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_pending_transactions_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Received", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_pending_transactions_known{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Already Known", - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_pending_transactions_discarded{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "instant": false, - "intervalFactor": 1, - "legendFormat": "Discarded", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_pending_transactions_too_far_in_future{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Too far in future", - "refId": "J" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_pending_transactions_too_low_fee{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Too low fee", - "refId": "K" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_pending_transactions_added{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Added (all)", - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_pending1559transactions_added{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Added (1559)", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_pending_transactions_evicted{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Evicted", - "refId": "H" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_pending_transactions_sent{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Sent txs", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_pending_transactions_hashes_sent{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Sent hashes", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Pending Txs (per minute)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "min": "0", - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 5, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 55 - }, - "hiddenSeries": false, - "id": 51, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.2", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_too_many_peers_disconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Too Many Peers", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_client_quitting_disconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Client Quitting", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_receive_message_timeout_disconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Receive Timeouts", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_already_connected_disconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Already Connected", - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_breach_of_protocol_disconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Breach of Protocol", - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_incompatible_p2pdisconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Incompatible P2P", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_null_node_identity_disconnects{job=\"nethermind\",_instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Null Identity", - "refId": "H" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_unexpected_identity_disconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Unexpected Identity", - "refId": "I" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_useless_peer_disconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Useless Peer", - "refId": "J" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_diconnect_requested_disconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Requested", - "refId": "K" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_tcp_subsystem_error_disconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "TCP Error", - "refId": "L" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_same_as_self_disconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Same as Self", - "refId": "M" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_other_disconnects{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Other", - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Disconnects (per minute)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 62 - }, - "hiddenSeries": false, - "id": 63, - "legend": { - "alignAsTable": false, - "avg": false, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.1.2", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth62get_block_headers_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "GetBlockHeaders eth62", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth62block_headers_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "BlockHeaders eth62", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth62get_block_bodies_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "GetBlockBodies eth62", - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth62block_bodies_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "BlockBodies eth62", - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth62transactions_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Txs received eth62", - "refId": "E" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth65get_pooled_transactions_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Txs requests received eth65", - "refId": "U" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth65get_pooled_transactions_requested{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Txs requested eth65", - "refId": "L" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth65pooled_transactions_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Txs received eth65", - "refId": "K" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth62new_block_hashes_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "NewBlockHashes eth62", - "refId": "F" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth62new_block_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "NewBlock eth62", - "refId": "G" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth63get_node_data_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "GetNodeData eth63", - "refId": "H" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth63node_data_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "interval": "", - "legendFormat": "NodeData eth63", - "refId": "J" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth63get_receipts_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "GetReceipts eth63", - "refId": "I" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth63receipts_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Receipts eth63", - "refId": "M" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth66get_block_headers_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "GetBlockHeaders eth66", - "refId": "N" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth66block_headers_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "BlockHeaders eth66", - "refId": "O" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth66get_block_bodies_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "GetBlockBodies eth66", - "refId": "P" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth66block_bodies_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "BlockBodies eth66", - "refId": "Q" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth66get_pooled_transactions_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Txs requests received eth66", - "refId": "V" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth66get_pooled_transactions_requested{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Txs requested eth66", - "refId": "R" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth66pooled_transactions_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Txs received eth66", - "refId": "S" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth66get_node_data_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "GetNodeData eth66", - "refId": "T" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth66node_data_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "NodeData eth66", - "refId": "W" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth66get_receipts_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "GetReceipts eth66", - "refId": "X" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_eth66receipts_received{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "hide": false, - "interval": "", - "legendFormat": "Receipts eth66", - "refId": "Y" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Eth62, Eth63, Eth65, Eth66 (per minute)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "Network", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 17 - }, - "id": 53, - "panels": [ - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 89 - }, - "hiddenSeries": false, - "id": 22, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_receipts_db_reads{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[10s])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Reads", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_receipts_db_writes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[10s])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Writes", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Receipts DB", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 95 - }, - "hiddenSeries": false, - "id": 21, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_code_db_reads{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Reads", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_code_db_writes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Writes", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Code DB", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 101 - }, - "hiddenSeries": false, - "id": 24, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_state_tree_reads{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Reads", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_state_tree_writes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Writes", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "State Tree", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 6, - "w": 24, - "x": 0, - "y": 107 - }, - "hiddenSeries": false, - "id": 23, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_block_infos_db_reads{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Reads", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_block_infos_db_writes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Writes", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Block Info DB", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "logBase": 1, - "show": true - }, - { - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 113 - }, - "hiddenSeries": false, - "id": 25, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_state_db_reads{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Reads", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_state_db_writes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Writes", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "rate(nethermind_state_db_in_pruning_writes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Pruning Writes", - "refId": "C" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "State DB", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:121", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:122", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 121 - }, - "hiddenSeries": false, - "id": 8, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_storage_tree_reads{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Reads", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_storage_tree_writes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Writes", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Storage Tree", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 128 - }, - "hiddenSeries": false, - "id": 29, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_tree_node_rlp_decodings{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "RLP.Encode", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_tree_node_rlp_encodings{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "RLP.Decode", - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_tree_node_hash_calculations{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Keccak", - "refId": "C" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Trie Operations", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 135 - }, - "hiddenSeries": false, - "id": 28, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_other_db_reads{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[10s])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Reads", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_other_db_writes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[10s])", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Writes", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Other DB", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "show": true - }, - { - "format": "short", - "label": "", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 142 - }, - "hiddenSeries": false, - "id": 20, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "8.0.6", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_blocks_db_reads{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "Reads", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "expr": "rate(nethermind_blocks_db_writes{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}[1m])*60", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "Writes", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Blocks DB (per minute)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:150", - "format": "short", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:151", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "Data", - "type": "row" - }, - { - "collapsed": true, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 18 - }, - "id": 138, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Unknown transactions in blocks", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 19 - }, - "hiddenSeries": false, - "id": 140, - "legend": { - "avg": true, - "current": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "9.3.6", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "nethermind_dark_pool_ratio_level1{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "Level1 (not known)", - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "nethermind_dark_pool_ratio_level2{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "hide": false, - "interval": "", - "legendFormat": "level2 (not pending)", - "refId": "B" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "DarkPool", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:149", - "format": "percentunit", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:150", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "Ratio of 1559-type transactions in the block.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMax": 1, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 26 - }, - "id": 142, - "options": { - "legend": { - "calcs": [ - "mean" - ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "exemplar": true, - "expr": "nethermind_eip1559transactions_ratio{job=\"nethermind\",instance=\"$enode\",nethermind_group=\"$group\"}", - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "title": "1559-type transactions ratio", - "type": "timeseries" - } - ], - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "refId": "A" - } - ], - "title": "TxPool", - "type": "row" - } - ], - "refresh": "10s", - "schemaVersion": 37, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "nethermind", - "value": "nethermind" - }, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "definition": "", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "group", - "options": [], - "query": { - "query": "label_values(nethermind_group)", - "refId": "Prometheus-group-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": { - "selected": true, - "text": "Nethermind Bellecour", - "value": "Nethermind Bellecour" - }, - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "definition": "label_values({nethermind_group=\"$group\"}, instance)", - "hide": 0, - "includeAll": false, - "multi": false, - "name": "enode", - "options": [], - "query": { - "query": "label_values({nethermind_group=\"$group\"}, instance)", - "refId": "Prometheus-enode-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "Nethermind", - "uid": "nQaRO6Yiz", - "version": 1, - "weekStart": "" -} \ No newline at end of file diff --git a/testchains/nethermind/metrics/grafana/datasources/datasource.yml b/testchains/nethermind/metrics/grafana/datasources/datasource.yml deleted file mode 100644 index f00154790..000000000 --- a/testchains/nethermind/metrics/grafana/datasources/datasource.yml +++ /dev/null @@ -1,34 +0,0 @@ -apiVersion: 1 - -deleteDatasources: - - name: Prometheus - orgId: 1 - -datasources: -- name: Prometheus - type: prometheus - access: proxy - orgId: 1 - url: http://prometheus:9090 - # database password, if used - password: - # database user, if used - user: - # database name, if used - database: - # enable/disable basic auth - basicAuth: true - # basic auth username - basicAuthUser: - # basic auth password - basicAuthPassword: - jsonData: - timeInterval: "5s" - # enable/disable with credentials headers - withCredentials: - # mark as default datasource. Max one per org - isDefault: - # fields that will be converted to json and stored in json_data - version: 1 - # allow users to edit datasources from the UI. - editable: true \ No newline at end of file diff --git a/testchains/nethermind/metrics/prometheus/prometheus.yml b/testchains/nethermind/metrics/prometheus/prometheus.yml deleted file mode 100644 index 5a21976b2..000000000 --- a/testchains/nethermind/metrics/prometheus/prometheus.yml +++ /dev/null @@ -1,9 +0,0 @@ -global: - scrape_interval: 5s - evaluation_interval: 5s - -scrape_configs: - - job_name: 'pushgateway' - honor_labels: true - static_configs: - - targets: ['pushgateway:9091'] \ No newline at end of file diff --git a/testchains/nethermind/migrate-all.sh b/testchains/nethermind/migrate-all.sh deleted file mode 100644 index 65e070330..000000000 --- a/testchains/nethermind/migrate-all.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -echo "### Starting chain" -/nethermind/Nethermind.Runner --config poco-chain &> /nethermind/chain.log & - -# Wait for the chain to start -sleep 5 - -# Install node packages and deploy PoCo's smart contracts -echo "### Running migration" -cd /iexec-poco && \ - echo "========== STANDARD DEPLOYMENT ==========" && \ - jq . config/config.json && \ - bash -i -c "./node_modules/.bin/truffle migrate" && \ - echo "========== SET RLC IN CONFIG ==========" && \ - echo $(jq ". | .chains.default.token = $(jq '.networks."65535".address' build/contracts/RLC.json)" config/config.json) > config/config.json && \ - rm -R build && \ - echo "========== ENTERPRISE DEPLOYMENT ==========" && \ - jq . config/config.json && \ - bash -i -c "KYC=1 PROXY_SALT=0x0000000000000000000000000000000000000000000000000000000000000001 ./node_modules/.bin/truffle migrate" diff --git a/testchains/nethermind/migrate.sh b/testchains/nethermind/migrate.sh deleted file mode 100644 index 60a7cd1ca..000000000 --- a/testchains/nethermind/migrate.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -echo "### Starting chain" -/nethermind/Nethermind.Runner --config poco-chain &> /nethermind/chain.log & - -# Wait for the chain to start -sleep 5 - -# Install node packages and deploy PoCo's smart contracts -echo "### Running migration" -cd /iexec-poco && bash -i -c "./node_modules/.bin/truffle migrate" diff --git a/testchains/nethermind/poco-chain.cfg b/testchains/nethermind/poco-chain.cfg deleted file mode 100644 index c6ca93e4d..000000000 --- a/testchains/nethermind/poco-chain.cfg +++ /dev/null @@ -1,45 +0,0 @@ -{ - "Init": { - "MemoryHint": 768000000, - "ChainSpecPath": "/nethermind/chainspec/poco-chain.json", - "BaseDbPath": "/nethermind/nethermind_db/poco-chain", - "LogFileName": "/nethermind/poco-chain.logs.txt", - "IsMining": true, - }, - "Mining": { - "MinGasPrice": 0, - }, - "JsonRpc": { - "Enabled": true, - "Host": "0.0.0.0", - }, - "Sync": { - "FastSync": true, - "FastBlocks": true, - "FastSyncCatchUpHeightDelta": "10000000000", - }, - "Aura": { - "ForceSealing": @forceSealing@, - "AllowAuraPrivateChains": true, - }, - "EthStats": { - "Name": "Nethermind PoCo Chain", - }, - "Metrics": { - "NodeName": "Nethermind PoCo Chain", - }, - "Bloom": { - "IndexLevelBucketSizes": [ - 16, - 16, - 16 - ] - }, - "KeyStore": { - "BlockAuthorAccount": "0xc08c3def622af1476f2db0e3cc8ccaead07be3bb", - "UnlockAccounts": ["0xc08c3def622af1476f2db0e3cc8ccaead07be3bb"], - "PasswordFiles": "/nethermind/keystore/validator-wallet-password", - "EnodeAccount": "0xc08c3def622af1476f2db0e3cc8ccaead07be3bb", - "EnodeKeyFile": "/nethermind/keystore/validator-wallet-password", - }, -} diff --git a/testchains/nethermind/poco-chain.json b/testchains/nethermind/poco-chain.json deleted file mode 100644 index 43913e5cc..000000000 --- a/testchains/nethermind/poco-chain.json +++ /dev/null @@ -1,934 +0,0 @@ -{ - "name": "poco-chain", - "engine": { - "authorityRound": { - "params": { - "stepDuration": "@stepDuration@", - "blockReward": "0x0", - "maximumUncleCountTransition": 0, - "maximumUncleCount": 0, - "validators": { - "list": ["0xc08c3def622af1476f2db0e3cc8ccaead07be3bb"] - } - } - } - }, - "params": { - "gasLimitBoundDivisor": "0x400", - "maximumExtraDataSize": "0x20", - "minGasLimit": "0x1388", - "networkID": "0xffff", - "eip140Transition": "0x0", - "eip145Transition": "0x0", - "eip150Transition": "0x0", - "eip155Transition": "0x0", - "eip160Transition": "0x0", - "eip161abcTransition": "0x0", - "eip161dTransition": "0x0", - "eip211Transition": "0x0", - "eip214Transition": "0x0", - "eip658Transition": "0x0", - "eip1014Transition": "0x0", - "eip1052Transition": "0x0", - "eip1283Transition": "0x0", - "eip1283DisableTransition": "0x0", - "eip1344Transition": "0x0", - "eip1706Transition": "0x0", - "eip1884Transition": "0x0", - "eip2028Transition": "0x0", - "eip2929Transition": "0x0", - "eip2930Transition": "0x0", - "eip1559Transition": "0x1", - "eip1559BaseFeeMaxChangeDenominator": "0x8", - "eip1559ElasticityMultiplier": "0x2", - "eip1559BaseFeeInitialValue": "0x3B9ACA00", - "eip3541Transition": "0x0", - "eip3529Transition": "0x0" - }, - "genesis": { - "seal": { - "authorityRound": { - "step": "0x0", - "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - } - }, - "difficulty": "0x20000", - "gasLimit": "0x663BE0" - }, - "accounts": { - "0x0000000000000000000000000000000000000001": { - "balance": "1", - "builtin": { - "name": "ecrecover", - "pricing": { - "linear": { - "base": 3000, - "word": 0 - } - } - } - }, - "0x0000000000000000000000000000000000000002": { - "balance": "1", - "builtin": { - "name": "sha256", - "pricing": { - "linear": { - "base": 60, - "word": 12 - } - } - } - }, - "0x0000000000000000000000000000000000000003": { - "balance": "1", - "builtin": { - "name": "ripemd160", - "pricing": { - "linear": { - "base": 600, - "word": 120 - } - } - } - }, - "0x0000000000000000000000000000000000000004": { - "balance": "1", - "builtin": { - "name": "identity", - "pricing": { - "linear": { - "base": 15, - "word": 3 - } - } - } - }, - "0x0000000000000000000000000000000000000005": { - "builtin": { - "name": "modexp", - "activate_at": "0x0", - "pricing": { - "0x0": { - "info": "EIP-2565: ModExp Gas Cost. Berlin hardfork (4_460_644) / skip first pricing (EIP-198: Big integer modular exponentiation. Byzantium hardfork)", - "price": { - "modexp2565": {} - } - } - } - } - }, - "0x0000000000000000000000000000000000000006": { - "builtin": { - "name": "alt_bn128_add", - "activate_at": "0x0", - "pricing": { - "linear": { - "base": 500, - "word": 0 - } - } - } - }, - "0x0000000000000000000000000000000000000007": { - "builtin": { - "name": "alt_bn128_mul", - "activate_at": "0x0", - "pricing": { - "linear": { - "base": 40000, - "word": 0 - } - } - } - }, - "0x0000000000000000000000000000000000000008": { - "builtin": { - "name": "alt_bn128_pairing", - "activate_at": "0x0", - "pricing": { - "alt_bn128_pairing": { - "base": 100000, - "pair": 80000 - } - } - } - }, - "0x0000000000000000000000000000000000000009": { - "builtin": { - "name": "blake2_f", - "activate_at": "0x0", - "pricing": { - "blake2_f": { - "gas_per_round": 1 - } - } - } - }, - "0x7bd4783FDCAD405A28052a0d1f11236A741da593": { - "balance": "1606938044258990275541962092341162602522202993782792835301376" - }, - "0x0513425AE000f5bAEaD0ed485ED8c36E737e3586": { - "balance": "1606938044258990275541962092341162602522202993782792835301376" - }, - "0xC08C3def622Af1476f2Db0E3CC8CcaeAd07BE3bB": { - "balance": "1000000000000000000000000000000000000000000" - }, - "0xabcd1339ec7e762e639f4887e2bfe5ee8023e23e": { - "balance": "1000000000000000000000000000000000000000000" - }, - "0x000a9c787a972F70F0903890E266F41c795C4DcA": { - "balance": "1000000000000000000000000000000000000000000" - }, - "0x1a69b2eb604db8eba185df03ea4f5288dcbbd248": { - "balance": "1000000000000000000000" - }, - "0x2Ab2674aA374Fe6415d11f0a8FcbD8027fc1e6A9": { - "balance": "1000000000000000000000" - }, - "0x3A3406E69ADf886c442Ff1791cbf67CEA679275D": { - "balance": "1000000000000000000000" - }, - "0x4AEF50214110FdaD4e8B9128347F2Ba1eC72F614": { - "balance": "1000000000000000000000" - }, - "0x5AF4eef749db212C594EFAc14C056a05261deDA9": { - "balance": "1000000000000000000000" - }, - "0x6A5A96F946b6d5054B3eAf032D30744A3818f81F": { - "balance": "1000000000000000000000" - }, - "0x7A9519E67F552f154657D65C2efe88D52bFeb025": { - "balance": "1000000000000000000000" - }, - "0x8a5fDA948126db50687Ba100F7D6555ea92Ec841": { - "balance": "1000000000000000000000" - }, - "0x9A2Df059ddFC9937d6673a7C6786E71F98b7f1cf": { - "balance": "1000000000000000000000" - }, - "0x10aa7Fc6B27aEfF79Ff52924AfC23Da40A8261ca": { - "balance": "1000000000000000000000" - }, - "0x11aCBF759A658c229F4bE1Adb9aAB1CF660FF192": { - "balance": "1000000000000000000000" - }, - "0x12aa1fec8Ad2FD03157A11A6825DD9feB24D0b34": { - "balance": "1000000000000000000000" - }, - "0x13aE3ce3DC8b9D8401894Bc178a1E48a7dce2218": { - "balance": "1000000000000000000000" - }, - "0x14a60197Ed9cd183e4275c207CA8B1c594016392": { - "balance": "1000000000000000000000" - }, - "0x15a7853A3E9EA1bBae16935f5f32207030cCFbAc": { - "balance": "1000000000000000000000" - }, - "0x16a1E3872210A20F99307E6b716f87F247dB11C8": { - "balance": "1000000000000000000000" - }, - "0x17A7212Bea68Ac0588bEA6e575a9f320C3640EA5": { - "balance": "1000000000000000000000" - }, - "0x18a9b259Bb67Fe5d19281c341f868dEb2bD86343": { - "balance": "1000000000000000000000" - }, - "0x19A1fAad2a0E0e3201fd0c8ea0EE465735225853": { - "balance": "1000000000000000000000" - }, - "0x20ae0f1D4659AD306b6960237FFc90Ef0c2f280f": { - "balance": "1000000000000000000000" - }, - "0x21A4d0C871fA050Fb1452BD19293A25bFC4D5702": { - "balance": "1000000000000000000000" - }, - "0x22A0689175038c13523c646924f86e1857284619": { - "balance": "1000000000000000000000" - }, - "0x23aeD71591b1b3a67CBEd6C6262137Be7cBd59e3": { - "balance": "1000000000000000000000" - }, - "0x24A854e8701b9Bf212F87EA11713c41d3f05966c": { - "balance": "1000000000000000000000" - }, - "0x25A643502C3EbcF3d2754423d5330213024A0cBA": { - "balance": "1000000000000000000000" - }, - "0x26aCa9d1b57f35FF51BB7C485e78B4E44E962357": { - "balance": "1000000000000000000000" - }, - "0x27ABdc52E2A4Fd3eE7D925BF1df3cf53572bC477": { - "balance": "1000000000000000000000" - }, - "0x28aDC8519C97f1BC958202aEAC903F1d0ab47F8C": { - "balance": "1000000000000000000000" - }, - "0x29A338B1b1c236CCb1cF3cB1E0651B450E430317": { - "balance": "1000000000000000000000" - }, - "0x30A5EE7052E49788188e61169B5D6B005a8b5d2F": { - "balance": "1000000000000000000000" - }, - "0x31A4d10b5E3a9e31F63e5999607894F48eD882eA": { - "balance": "1000000000000000000000" - }, - "0x32A41A8ddE2380cEF575395B5791324c577d71a6": { - "balance": "1000000000000000000000" - }, - "0x33A52EF23051e987f3E09DE1cF1a67162F70482d": { - "balance": "1000000000000000000000" - }, - "0x34a12776b37209328a8e5163C1702863d418e955": { - "balance": "1000000000000000000000" - }, - "0x35AE22B5E0a41C7A9d85D4Fa6a837090Ca79e993": { - "balance": "1000000000000000000000" - }, - "0x36A1b8383fed641503e98b179494Bbf5F27AaF8c": { - "balance": "1000000000000000000000" - }, - "0x37aDF6AE77f17A4Cc0C8389d8c3D230c11Ac5bF8": { - "balance": "1000000000000000000000" - }, - "0x38a0C2964A4cd8512174A0Cd0e803BBa4e267076": { - "balance": "1000000000000000000000" - }, - "0x39Af7D9b9cC9a68674E243Cf0CcDBd6ea8a2357f": { - "balance": "1000000000000000000000" - }, - "0x40a7c92Bf935A4818Effc7817EC00C4C240632D6": { - "balance": "1000000000000000000000" - }, - "0x41A5dE13C0A709776619c5A1a882d716199bC6ad": { - "balance": "1000000000000000000000" - }, - "0x42a6957A345bd26218FdAA3Fb2fcD30cEDFF7FAc": { - "balance": "1000000000000000000000" - }, - "0x43A21F43B8425299B8604954A847a392DA294ab4": { - "balance": "1000000000000000000000" - }, - "0x44a95B35B96f707119f6c339417E17B7B12E621b": { - "balance": "1000000000000000000000" - }, - "0x45a5C24eFf3F2BeB48d98ED528c6A1c0670aD068": { - "balance": "1000000000000000000000" - }, - "0x46a63E885A308A1815A3b6a6A57563999123d7Eb": { - "balance": "1000000000000000000000" - }, - "0x47A226F54A079263b29A9a230CF46f7bd844D576": { - "balance": "1000000000000000000000" - }, - "0x48A8C9183A7Af6e7C9A4fAbd7aD620e81d00A33f": { - "balance": "1000000000000000000000" - }, - "0x49a215ac86A096219188427De3FD6690072cB855": { - "balance": "1000000000000000000000" - }, - "0x50ad6FeE6402bf20D6302cA5C7E00a9b8639Fdc3": { - "balance": "1000000000000000000000" - }, - "0x51AfC7821A57fBc594E1a34650fbB1766D776182": { - "balance": "1000000000000000000000" - }, - "0x52A6E86048296FC020CBA86BcBd33D532E551db8": { - "balance": "1000000000000000000000" - }, - "0x53a3A945aB61e629dbE3F74aee63c5947A98f67B": { - "balance": "1000000000000000000000" - }, - "0x54a96145bDAc3e25b84C1aD24679b3823e90312b": { - "balance": "1000000000000000000000" - }, - "0x55a77232ef101de4D346a16b2b9A07E9a566ac9C": { - "balance": "1000000000000000000000" - }, - "0x56a65029221167a44d341359944Bfb775A4DB68f": { - "balance": "1000000000000000000000" - }, - "0x57Aa7b7621a36FE71FfED623C7E611F75C9802cE": { - "balance": "1000000000000000000000" - }, - "0x58a02eDFa30C9F56EBe0D4d58164dA4e35c7aABd": { - "balance": "1000000000000000000000" - }, - "0x59A71610cCfa580d6aFe9bF2CC4D5f8Ab48c71b1": { - "balance": "1000000000000000000000" - }, - "0x60A6F7dC4B69d815D40f18feddc149Df456D2118": { - "balance": "1000000000000000000000" - }, - "0x61A10043CEaB4FbA94FeEfF78888484DD7575a9A": { - "balance": "1000000000000000000000" - }, - "0x62aE40A538345BcEC2b2A73f441B0AD7C4e1D667": { - "balance": "1000000000000000000000" - }, - "0x63Abae0eEbCD23Bb84FB88Be6Fe6fbfBf0c16EF7": { - "balance": "1000000000000000000000" - }, - "0x64a230bca31dCe0Ce78F46C55f338564881A6B7e": { - "balance": "1000000000000000000000" - }, - "0x65a6802FC9Cc481762A691B01fccf8DB2aA36e60": { - "balance": "1000000000000000000000" - }, - "0x66A5165E97869b09e4a55b25d5E0c6c3daAa85E9": { - "balance": "1000000000000000000000" - }, - "0x67aaba1Efa65c308dE1Df6b952271Fc2b0742c3a": { - "balance": "1000000000000000000000" - }, - "0x68A19Af4fcA17311b4be6AF8AE2309E3055cfABd": { - "balance": "1000000000000000000000" - }, - "0x69A8093b4f44fE25274a26330be0fB2D4B5857BB": { - "balance": "1000000000000000000000" - }, - "0x70a0B33623839c1a0f952c51Ae13Efd745e6d2c7": { - "balance": "1000000000000000000000" - }, - "0x71ac40D0eb099182868d3D947Bdf92804A478C4f": { - "balance": "1000000000000000000000" - }, - "0x72ac54F114EE0dfB4EC56B183a0c7Bb85f779168": { - "balance": "1000000000000000000000" - }, - "0x73A834A6c616899A7484E1f6eA36BA737Fb948e1": { - "balance": "1000000000000000000000" - }, - "0x74a100c60966b833b63FFa9F32f54D2ab5AFfD49": { - "balance": "1000000000000000000000" - }, - "0x75aa687E0E68f57587F8de8aF873d1d2DE5c397b": { - "balance": "1000000000000000000000" - }, - "0x76a6C64a9a26246571C8769bc3258F1F3fFdDE8B": { - "balance": "1000000000000000000000" - }, - "0x77a220e10dD3698d86A46E0781EA787024278DC7": { - "balance": "1000000000000000000000" - }, - "0x78A974a701275Ee61714842B9cFA04731C55A8Ca": { - "balance": "1000000000000000000000" - }, - "0x79AFF737E77Da55ABA900177A06936CAa1048D31": { - "balance": "1000000000000000000000" - }, - "0x80aFf346ECf0D1499A9C1A3A0c9EBb70318769D3": { - "balance": "1000000000000000000000" - }, - "0x81A3cae5ACCa20B1f9Bfb07fcDD1D329621E895B": { - "balance": "1000000000000000000000" - }, - "0x82A5157d6A66c28d7C2bEE46b7eBAEB77052ba75": { - "balance": "1000000000000000000000" - }, - "0x83a0D67107a4D65C0f47AaF1A804450BaFf71b20": { - "balance": "1000000000000000000000" - }, - "0x84A69E2BE32d26ea10CFFE138E50797412A7B44F": { - "balance": "1000000000000000000000" - }, - "0x85a724eC22872A20d7B038e8A8216582Da0C64eF": { - "balance": "1000000000000000000000" - }, - "0x86a0AB0Df4EbC6E5307E689f9360F59FF965d4b2": { - "balance": "1000000000000000000000" - }, - "0x87aa664CACf8e28B951186329420D96bDC8F70F5": { - "balance": "1000000000000000000000" - }, - "0x88AFd7E3d6eF74Dd8d56F6FD4181733127807A6d": { - "balance": "1000000000000000000000" - }, - "0x89A7cf637A5f6caAC2FC3F47Cdaac9Fcc3574e10": { - "balance": "1000000000000000000000" - }, - "0x90AcB3C757F6F3060043Bd533548D9c0aF13dC8E": { - "balance": "1000000000000000000000" - }, - "0x91aEE896557143b7FCda0372ec6673aB213B1469": { - "balance": "1000000000000000000000" - }, - "0x92a909d30C710fA4DB53b863Fe07e065E4C7f17A": { - "balance": "1000000000000000000000" - }, - "0x93aA915f4D9265be9a9d3bc4D6C131c79BDDfE7b": { - "balance": "1000000000000000000000" - }, - "0x94a5a325c5953240F33fb44d325f64374687f449": { - "balance": "1000000000000000000000" - }, - "0x95ADFFb8CF8754d6Cb67c71A46F07aA667D6fFE1": { - "balance": "1000000000000000000000" - }, - "0x96aEa88341402f4ab071eb15b76061E5CEBA0eBE": { - "balance": "1000000000000000000000" - }, - "0x97a7EC10d982e97E514cB96E65a796b437157e3c": { - "balance": "1000000000000000000000" - }, - "0x98Ad26771c4a990e0e166925Cc8aD0BC5Ce5848F": { - "balance": "1000000000000000000000" - }, - "0x99afcbb25Ccb26d09982342b1a14c306Bf38bb0f": { - "balance": "1000000000000000000000" - }, - "0x100Ad00aF2144cD3D65A3789a09C05684463a4c5": { - "balance": "1000000000000000000000" - }, - "0x101AF8cD450eAa0b596585aF7078b08Ea46eC55f": { - "balance": "1000000000000000000000" - }, - "0x102aD376f258b4e0CcC25069B8d78E828F96DF16": { - "balance": "1000000000000000000000" - }, - "0x103af1BdF6C91f8d99D2287C3e3d7df6CCF25C37": { - "balance": "1000000000000000000000" - }, - "0x104A77819dE2FEE866fc7003897F808ACc5BD225": { - "balance": "1000000000000000000000" - }, - "0x105A03787f89DCBF418d79965490815F609a636a": { - "balance": "1000000000000000000000" - }, - "0x106ae86bE3D46Ac4211f4950318A728C2aeD5048": { - "balance": "1000000000000000000000" - }, - "0x107AD4F890b9B8842BB3ee587dD547bffB4A42b9": { - "balance": "1000000000000000000000" - }, - "0x108A359CBDBFD92527B6d098e8456cC3121ECdF5": { - "balance": "1000000000000000000000" - }, - "0x109aa7B2e94dEAf1FF3002FAB13278EF354e8e1d": { - "balance": "1000000000000000000000" - }, - "0x110a268dEb44734E9884c9f6e7241dEB3e757aFc": { - "balance": "1000000000000000000000" - }, - "0x111A35B42Bb128A0b7d4272dE8AB5e4D71224540": { - "balance": "1000000000000000000000" - }, - "0x112A60b70F2835B053b62f17DFCf651BBA8143E8": { - "balance": "1000000000000000000000" - }, - "0x113adECfad0B63f1bd0c4D5D03B00A1b12263339": { - "balance": "1000000000000000000000" - }, - "0x114a72518770E64c2063c5A87F3F00Cf9dF78C2b": { - "balance": "1000000000000000000000" - }, - "0x115A664e8c254a6042d48cdBfB9249fC55baF2B5": { - "balance": "1000000000000000000000" - }, - "0x116a0A6815076224Bb1C8570Da56288a4C2617b3": { - "balance": "1000000000000000000000" - }, - "0x117a0eE6a85c40F0570E285D7E022226ABe160a5": { - "balance": "1000000000000000000000" - }, - "0x118A935490A6C110E0bA6654d8aF992647796f77": { - "balance": "1000000000000000000000" - }, - "0x119aE6a195b3048e05206B9EAF3012723b52aD38": { - "balance": "1000000000000000000000" - }, - "0x120Ae1332E852118074632F1188ce8B5548A9cE8": { - "balance": "1000000000000000000000" - }, - "0x121a9CBa5f33Ea435153a62FADA442a263290bD5": { - "balance": "1000000000000000000000" - }, - "0x122aF4bb0c562029eA5333D2B6364dfb558Ab88A": { - "balance": "1000000000000000000000" - }, - "0x123a783F50437633D120088C45706D99D9C8c163": { - "balance": "1000000000000000000000" - }, - "0x124A7a834D29f7D979AD125FA41c5be121493124": { - "balance": "1000000000000000000000" - }, - "0x125ad0ca6EE6eAd3328da248eB1640604b6Aeecb": { - "balance": "1000000000000000000000" - }, - "0x126a3f609bf8EDcfD3a336c4E833Bae2952408db": { - "balance": "1000000000000000000000" - }, - "0x127a064b169d38C0B322D722dA84cDa991Bd315e": { - "balance": "1000000000000000000000" - }, - "0x128a75434761b0CD9840132958A9cacEFC4bf072": { - "balance": "1000000000000000000000" - }, - "0x129Af5D4C362F0522875938ACfaefcD459Bb6253": { - "balance": "1000000000000000000000" - }, - "0x130Acec95F4C11C317Ef7F00Be692686d5ae5A44": { - "balance": "1000000000000000000000" - }, - "0x131A707664eeE61139118945DB112D85302f78A9": { - "balance": "1000000000000000000000" - }, - "0x132a0bB6E3A40cb412E4ad125ED0954C01b91b67": { - "balance": "1000000000000000000000" - }, - "0x133AA93376306658C09e2f187BF934E3C134c239": { - "balance": "1000000000000000000000" - }, - "0x134A365E26b5dbd1BaCA93AB46c0d35a992D095a": { - "balance": "1000000000000000000000" - }, - "0x135AD7C99a99405C5D8783D78614FEAE8c0961E7": { - "balance": "1000000000000000000000" - }, - "0x136aB508Bf8A3dBCe300F0e4991876202FC80CB9": { - "balance": "1000000000000000000000" - }, - "0x137A88fB258F66D2817E33366b065C723a7F0704": { - "balance": "1000000000000000000000" - }, - "0x138a285dE4EC9437CC5aE6072c3B17D6BF03eDfc": { - "balance": "1000000000000000000000" - }, - "0x139ADD64267eE1e217B2183D874a6E87f2273c49": { - "balance": "1000000000000000000000" - }, - "0x140a3Db8f02E3de807908A1C269508B7dBCDefeC": { - "balance": "1000000000000000000000" - }, - "0x141Aa5767D71c5e08bcC52B63aD4a51a82910cee": { - "balance": "1000000000000000000000" - }, - "0x142ab121D4d641e2Ab82aC7A45d13FDAb9d432ee": { - "balance": "1000000000000000000000" - }, - "0x143a2313b3e966DBA3854A02d6aeFd0c23489B82": { - "balance": "1000000000000000000000" - }, - "0x144af280E84341cCeaDFb7B317c18B880A228b6f": { - "balance": "1000000000000000000000" - }, - "0x145abBf00384cAf891aF1623B7B240ef5f0E36D4": { - "balance": "1000000000000000000000" - }, - "0x146aeFb264ca2b94cA807186c16EE2B687ec039C": { - "balance": "1000000000000000000000" - }, - "0x147AdCA34520bd99E1f1C03A71831cCEf2CA5f4c": { - "balance": "1000000000000000000000" - }, - "0x148abcD2674Ed44893dcFeAA509cA87FD46f16f5": { - "balance": "1000000000000000000000" - }, - "0x149aAECDaD6cfeb5bB105b80d5c3539E948644fc": { - "balance": "1000000000000000000000" - }, - "0x150a93c20AE038ea7453856b907321908C48f72e": { - "balance": "1000000000000000000000" - }, - "0x151A4D3c898bA7639EdE5083448b904C713A92F5": { - "balance": "1000000000000000000000" - }, - "0x152A3ce83261FDfa77c2930770C5d23342bbf088": { - "balance": "1000000000000000000000" - }, - "0x153AC70724B2033a7Fcbe969193786BA33fb4d8C": { - "balance": "1000000000000000000000" - }, - "0x154A03b6C9352dd18C7343096FA372f1030D6D48": { - "balance": "1000000000000000000000" - }, - "0x155A99EC6c6f91D531EfEEA2bEd728232859B198": { - "balance": "1000000000000000000000" - }, - "0x156AbA3eFF44957e8D746754C72F67a455a07508": { - "balance": "1000000000000000000000" - }, - "0x157a5135F0eEf861972fBc24A9BF381918eA2FdF": { - "balance": "1000000000000000000000" - }, - "0x158ADd5AEc7dC30aA90589B99e09065eCFF8BDAd": { - "balance": "1000000000000000000000" - }, - "0x159AB5f6b9cB33ab5B83144bFC636069d5670A01": { - "balance": "1000000000000000000000" - }, - "0x160adEA2A9399AeB5758B622B84335DA13047A0E": { - "balance": "1000000000000000000000" - }, - "0x161AA2012F3825c28cAa62A52E13aAF8F1140E4c": { - "balance": "1000000000000000000000" - }, - "0x162AbD33846ca2fD2195A3e47A241693625c14f1": { - "balance": "1000000000000000000000" - }, - "0x163aF6A07C41a9DEC559EB7F95eeeb54439A986d": { - "balance": "1000000000000000000000" - }, - "0x164Aec18D489Ac1833092517fA9AC1729D43CFCe": { - "balance": "1000000000000000000000" - }, - "0x165aD5fA053cbea3af07E07165B641B6858AD97d": { - "balance": "1000000000000000000000" - }, - "0x166A3B3A5efDb986c4014E375506ca944Fc169b1": { - "balance": "1000000000000000000000" - }, - "0x167a69Dbc31B55CD8973538692d9678263DE0f92": { - "balance": "1000000000000000000000" - }, - "0x168aE3966e0dab4C71AA5fC49D6BB162Adb6ea1E": { - "balance": "1000000000000000000000" - }, - "0x169A022f508d0733F2F05F9A6828372829A14D3C": { - "balance": "1000000000000000000000" - }, - "0x170a1E89e460F145fA602B28c82f39A63147dff5": { - "balance": "1000000000000000000000" - }, - "0x171ACC73D210772D9d83B71a435e163FB62F805F": { - "balance": "1000000000000000000000" - }, - "0x172af2f797afb825e17988DFD595Fe2edF5b078F": { - "balance": "1000000000000000000000" - }, - "0x173A8e207FF51e5ac17Da7E7B0020e5a595f216C": { - "balance": "1000000000000000000000" - }, - "0x174A04c0e4f46f750b8F3Bcee2654EAF1cD3A3C0": { - "balance": "1000000000000000000000" - }, - "0x175A3765Af6B1658828A42dF38D760Ef038Bd6c6": { - "balance": "1000000000000000000000" - }, - "0x176A3d1a06E30846d6Cc5a698a04E0a036ce8822": { - "balance": "1000000000000000000000" - }, - "0x177A4d59Ce426745F4a84b6e54c0Cf89de40627C": { - "balance": "1000000000000000000000" - }, - "0x178a81324F7d58E955eA0A310cadD86AFcd25F37": { - "balance": "1000000000000000000000" - }, - "0x179Ac618B76EA27be5e7d5Ec5C8761B72d61C01d": { - "balance": "1000000000000000000000" - }, - "0x180A829B7F62Ef0516B826fab14847b9EAa04552": { - "balance": "1000000000000000000000" - }, - "0x181a030FDa05E906833aD2A1DB4A9bD8Bde23FF4": { - "balance": "1000000000000000000000" - }, - "0x182a4696A1ce62FBd44702E8085DB15d31C00bd2": { - "balance": "1000000000000000000000" - }, - "0x183AD0FE4abfd421F2974C8E69aE544FE70d6642": { - "balance": "1000000000000000000000" - }, - "0x184aC75B5d0124BA0411972Ac28819deC2f71F9e": { - "balance": "1000000000000000000000" - }, - "0x185a5d55e9B0FfFEF4934c8e8c8bb46D8e1Cc319": { - "balance": "1000000000000000000000" - }, - "0x186A4287430A7F279A75d78b3Df5F80602F045C6": { - "balance": "1000000000000000000000" - }, - "0x187A9A44f2a536ad170f65139f80D3Da421401d2": { - "balance": "1000000000000000000000" - }, - "0x188a9b9Ca5C589299Ee4C853B800dF6E3208C47f": { - "balance": "1000000000000000000000" - }, - "0x189A02cbA4a1a842EB307886D9C233Bf8eB342eb": { - "balance": "1000000000000000000000" - }, - "0x190aa36be17a7067C46cb241916554F3b8F5f8fC": { - "balance": "1000000000000000000000" - }, - "0x191Ae12537940d8a68007772DcA660cAD28E24CE": { - "balance": "1000000000000000000000" - }, - "0x192a5313a6997B4E9993aAD011c9E3015Ff15fFe": { - "balance": "1000000000000000000000" - }, - "0x193A1621298978848381Ca6FDe161B648a071387": { - "balance": "1000000000000000000000" - }, - "0x194A92602C770eCe78eF575A3C31A2A8ad34284d": { - "balance": "1000000000000000000000" - }, - "0x195A18fB280ED190f30Be8CD80C3eE851d414d5e": { - "balance": "1000000000000000000000" - }, - "0x196A7cA3529049B48C9372c0c039F2741F817090": { - "balance": "1000000000000000000000" - }, - "0x197A37eD6552f3Dbd5B4C37865379Bc711cfE523": { - "balance": "1000000000000000000000" - }, - "0x198a3588f389F32f18C8B6832cC1C38BC2b468F5": { - "balance": "1000000000000000000000" - }, - "0x199a3aE634249Aa216FAFD76fff9be7721b64E50": { - "balance": "1000000000000000000000" - }, - "0x200Ac17Cae67a7A10372d7262D31972fD2b59809": { - "balance": "1000000000000000000000" - }, - "0x201a31d8db88ddA273E1f84cCd63A81743Ad57b8": { - "balance": "1000000000000000000000" - }, - "0x202A44a04A03cBC6BbbAd505BCc31EAd6c48F31C": { - "balance": "1000000000000000000000" - }, - "0x203aD2082639D49594a733e4b6ECb5a2029226a1": { - "balance": "1000000000000000000000" - }, - "0x204Af0eEE643Dc3fbE59fe6802E0a6756c43BCEc": { - "balance": "1000000000000000000000" - }, - "0x205A96e5B1E4dd880FFB163A9909E4dE2C4663d5": { - "balance": "1000000000000000000000" - }, - "0x206aDB086bD6D07663623d9097CC87Db2ACfC0eE": { - "balance": "1000000000000000000000" - }, - "0x207aD2d733f74C1f81Ab9Bf88fFa8cE6B24107C7": { - "balance": "1000000000000000000000" - }, - "0x208a2864F33022A1520915671557dC660aD10eEA": { - "balance": "1000000000000000000000" - }, - "0x209Adc0230b4d47388CF15a778106F0289584eDc": { - "balance": "1000000000000000000000" - }, - "0x210AF403293e0f4bc55f04cebBb5a957ae57fF6d": { - "balance": "1000000000000000000000" - }, - "0x211ACC33CaD39F8f5A58e9Bc1E6BAA9e87692574": { - "balance": "1000000000000000000000" - }, - "0x212ad4Ba61aF5C5963F6234B7B5c7b745EC2a0D5": { - "balance": "1000000000000000000000" - }, - "0x213A008eAdC9e886De32b3BEe6d9b0b762FA6107": { - "balance": "1000000000000000000000" - }, - "0x214aA361cAeD44920b7673E25f2a20AB807B2d8E": { - "balance": "1000000000000000000000" - }, - "0x215Ac7e465e109A8e678534623700d89cDdB7B47": { - "balance": "1000000000000000000000" - }, - "0x216aA1642df616ACeC88A9E0ccAB40BfeE5E4670": { - "balance": "1000000000000000000000" - }, - "0x217a025c0ddf3832c0B32A36C597665cB25769Fb": { - "balance": "1000000000000000000000" - }, - "0x218AA95a897F2289708910803ACa10570E1eB951": { - "balance": "1000000000000000000000" - }, - "0x219a156696E6F12C07EE7F2348660C995D3fca3F": { - "balance": "1000000000000000000000" - }, - "0x220aaE72C25f536aE648206DE1aDA44c98f9EB2f": { - "balance": "1000000000000000000000" - }, - "0x221a4A36271EC5811cA22A330EDe98914d1dE1Bc": { - "balance": "1000000000000000000000" - }, - "0x222A0Aa930caB0e4023778A3d9eB1625D963c300": { - "balance": "1000000000000000000000" - }, - "0x223a8a303Ca0f37E668ea7A54A0dC67579Ee1d28": { - "balance": "1000000000000000000000" - }, - "0x224a6142263d4107a2709A01Bc66BDc2b55Cd376": { - "balance": "1000000000000000000000" - }, - "0x225a7A70E4afaE96d3Dd137dE102F8b6043DeAc1": { - "balance": "1000000000000000000000" - }, - "0x226A8b66628ca81e3Bf35D0CEe77781e6291646D": { - "balance": "1000000000000000000000" - }, - "0x227AD65232ad8804f19Dee818109eAB63AdeBFfb": { - "balance": "1000000000000000000000" - }, - "0x228A19dDF28B6766b91EABeb2e31862f643f473B": { - "balance": "1000000000000000000000" - }, - "0x229A7A304474016C8A2fEe2FA7668f0c021f2092": { - "balance": "1000000000000000000000" - }, - "0x230AdD06091495cC05053Cf3fe01961C7f0d3F71": { - "balance": "1000000000000000000000" - }, - "0x231Ad4FF515e7c713a6123d413e167E22dF6a6B1": { - "balance": "1000000000000000000000" - }, - "0x232A24fE2768C4F55009434B5d70Fc4Fe9e6Ec6b": { - "balance": "1000000000000000000000" - }, - "0x233aF87AE95093B7893D4366218e72253dd6bF6B": { - "balance": "1000000000000000000000" - }, - "0x234Acfafb44241Dfb3885D2575e4271B024EEe92": { - "balance": "1000000000000000000000" - }, - "0x235aBDAa4A17cCBE7Ae45FAcD5421b6941349a03": { - "balance": "1000000000000000000000" - }, - "0x236aA1eF8661ab1f62d00ed5c2ed54018C9617d8": { - "balance": "1000000000000000000000" - }, - "0x237a8f766ee194b8f89E907d1653442B004dd5cA": { - "balance": "1000000000000000000000" - }, - "0x238ae320D6A38bFA9BD51D2347c2B6C6a3cc64e9": { - "balance": "1000000000000000000000" - }, - "0x239Ab6Ed796C8Dc882Cbf699498aD786Cf4DD0A9": { - "balance": "1000000000000000000000" - }, - "0x240a500c9b3D45678D5F7e14401F138b9296A213": { - "balance": "1000000000000000000000" - }, - "0x241AF60fc6A83274698b04e139dc8D6144A0B8e4": { - "balance": "1000000000000000000000" - }, - "0x242a4299EE6b1E467a7b3d4Bf9DC7F5Bf694AC98": { - "balance": "1000000000000000000000" - }, - "0x243a1360Eb0bdB806DFE3a7b9A1EbB5Ef05BdD0F": { - "balance": "1000000000000000000000" - }, - "0x244a4644EE0B41E5Bb8061A9C6dD7b97EAaF7137": { - "balance": "1000000000000000000000" - }, - "0x245aA01A0Fe737cDe0ca670b354ab5842696FAE3": { - "balance": "1000000000000000000000" - }, - "0x246A5c3bd98A3c83A107134Eb3a297d2fAa811Fa": { - "balance": "1000000000000000000000" - }, - "0x247AA64022f7E59B9476341B05c1A1184e5FF54B": { - "balance": "1000000000000000000000" - }, - "0x248A3E336c7B37319C40c7aEe4F09E86125699B1": { - "balance": "1000000000000000000000" - }, - "0x249AaB1b71Dc59c682e7Ad24089372BE22591A7a": { - "balance": "1000000000000000000000" - }, - "0x250a3919982ca7CEF58960fF716122dbb4514036": { - "balance": "1000000000000000000000" - } - } -} diff --git a/tools/puml-to-links.mjs b/tools/puml-to-links.mjs new file mode 100644 index 000000000..378a746ee --- /dev/null +++ b/tools/puml-to-links.mjs @@ -0,0 +1,23 @@ +#!/usr/bin/env zx + +// TODO: Add this script to pre-commit hook in order to keep up-to-date links + +// Render .puml files (referenced in markdown comments) to web links +// Usage: "npm run puml2links" or "npx zx tools/puml-to-links.mjs" +// Note: +// Using server-side rendering with `puml-for-markdown` since `node-plantuml`` +// requires Java on host. See https://github.com/danielyaa5/puml-for-markdown +// Note: +// To ensure freshness of a parent diagram, it might be necessary to +// remove everything before from +// [![ABC](https://tinyurl.com/abcdef)](https://tinyurl.com/abcdef) +// in order to force recreation of this parent diagram made of updated and +// included child diagrams. + + +$.verbose = false // Disable bash commands logging. + +const projectRootDir = await $`dirname ${__dirname}` +// Search for markdown files and update puml links. +const output = await $`npx puml-for-markdown -x ${projectRootDir}/docs/` +console.log(output.toString()); diff --git a/tools/sol-to-uml.mjs b/tools/sol-to-uml.mjs new file mode 100644 index 000000000..a4cd4b670 --- /dev/null +++ b/tools/sol-to-uml.mjs @@ -0,0 +1,61 @@ +#!/usr/bin/env zx + +// Usage: "npm run sol-to-uml" or "npx zx tools/solidity-to-uml.mjs" +// For sol2uml documentation, see https://github.com/naddison36/sol2uml#usage + + +$.verbose = false // Disable bash commands logging. + +const projectRootDir = await $`dirname ${__dirname}` + +await generateClassDiagramOfDirectory('libs') +await generateClassDiagramOfDirectory('modules') +await generateClassDiagramOfDirectory('registries') + +await generateClassDiagramOfContracts( + [ + 'IexecPoco1Delegate', + 'IexecPoco2Delegate' + ], + 'IexecPocoDelegates', +) + +await generateClassDiagramOfContracts( + [ + 'IexecEscrowNativeDelegate', + 'IexecEscrowTokenDelegate', + 'IexecEscrowTokenSwapDelegate', + 'IexecEscrow', + ], + 'IexecEscrows', +) + +await generateClassDiagramOfContracts( + ['IexecPocoBoostDelegate'], + 'IexecPocoBoostDelegate', +) + +/** + * Generate UML class diagrams for contracts in a given directory. + * @param directory + */ +async function generateClassDiagramOfDirectory(directory) { + console.log(`Generating class diagram for directory : ${directory}`); + const diagramName = directory.replace('/', '-'); + await $`cd ${projectRootDir}/ && + npx sol2uml class contracts/${directory}/ -o docs/uml/class-uml-dir-${diagramName}.svg` +} + +/** + * Generate UML class diagrams for a set of given contracts. + * @param contractsList + * @param diagramName + */ +async function generateClassDiagramOfContracts(contractsList, diagramName) { + console.log(`Generating class diagram for contracts : ${contractsList}`); + const baseContracts = contractsList.join(','); // => c1,c2,c3 + // -b, --baseContractNames + // only output contracts connected to these comma separated base contract names + await $`cd ${projectRootDir}/ && + npx sol2uml class contracts/ -b ${baseContracts} -o docs/uml/class-uml-${diagramName}.svg` +} diff --git a/tools/storage-to-diagrams.mjs b/tools/storage-to-diagrams.mjs new file mode 100644 index 000000000..c9e1706e9 --- /dev/null +++ b/tools/storage-to-diagrams.mjs @@ -0,0 +1,20 @@ +#!/usr/bin/env zx + +// Usage: "npm run storage-to-diagrams" or "npx zx tools/storage-to-diagrams" +// Check sol2uml documentation at https://github.com/naddison36/sol2uml#storage-usage. + + +$.verbose = false // Disable bash commands logging. + +const projectRootDir = await $`dirname ${__dirname}` +generateStorageDiagram('IexecPocoBoostDelegate') + +/** + * Generate storage diagram of a given contract. + * @param contractName + */ +async function generateStorageDiagram(contractName) { + console.log(`Generating storage diagram for contract : ${contractName}`); + await $`cd ${projectRootDir} && + npx sol2uml storage -c ${contractName} -o docs/uml/storage-${contractName}.svg .` +} diff --git a/truffle-security.json b/truffle-security.json deleted file mode 100644 index 06d8bf620..000000000 --- a/truffle-security.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "swc-blacklist": [103] -} diff --git a/truffle.js b/truffle.js deleted file mode 100644 index 0cc2a1603..000000000 --- a/truffle.js +++ /dev/null @@ -1,98 +0,0 @@ -var HDWalletProvider = require("@truffle/hdwallet-provider"); - -var useEnv = !!process.env.MNEMONIC; - -module.exports = -{ - plugins: - [ - "solidity-coverage", - "truffle-plugin-verify" - ], - api_keys: - { - etherscan: process.env.ETHERSCAN - }, - networks: - { - docker: - { - host: "iexec-geth-local", - port: 8545, - network_id: "*", // Match any network id, - gasPrice: "8000000000", // 8 Gwei - }, - development: - { - provider: useEnv ? () => new HDWalletProvider(process.env.MNEMONIC, process.env.DEV_NODE || "http://localhost:8545") : undefined, - host: useEnv ? undefined : "localhost", - port: useEnv ? undefined : 8545, - network_id: "*", - gasPrice: "8000000000", // 8 Gwei - disableConfirmationListener: true, - }, - mainnet: - { - provider: () => new HDWalletProvider(process.env.MNEMONIC, process.env.MAINNET_NODE), - network_id: "1", - gasPrice: "100000000000", // 100 Gwei - disableConfirmationListener: true, - }, - ropsten: - { - provider: () => new HDWalletProvider(process.env.MNEMONIC, process.env.ROPSTEN_NODE), - network_id: "3", - gasPrice: "8000000000", // 8 Gwei - disableConfirmationListener: true, - }, - rinkeby: - { - provider: () => new HDWalletProvider(process.env.MNEMONIC, process.env.RINKEBY_NODE), - network_id: "4", - gasPrice: "8000000000", // 8 Gwei - disableConfirmationListener: true, - }, - goerli: - { - provider: () => new HDWalletProvider(process.env.MNEMONIC, process.env.GOERLI_NODE), - network_id: "5", - gasPrice: "8000000000", // 8 Gwei - disableConfirmationListener: true, - }, - kovan: { - provider: () => new HDWalletProvider(process.env.MNEMONIC, process.env.KOVAN_NODE), - network_id: "42", - gasPrice: "8000000000", // 8 Gwei - disableConfirmationListener: true, - }, - viviani: { - provider: () => new HDWalletProvider(process.env.MNEMONIC, process.env.VIVIANI_NODE), - network_id: "133", - gasPrice: "0", // 0 Gwei - gas: "6700000", - disableConfirmationListener: true, - }, - bellecour: { - provider: () => new HDWalletProvider(process.env.MNEMONIC, process.env.BELLECOUR_NODE), - network_id: "134", - gasPrice: "0", // 0 Gwei - gas: "6700000", - disableConfirmationListener: true, - } - }, - compilers: { - solc: { - version: "0.6.12", - settings: { - optimizer: { - enabled: true, - runs: 200 - } - } - } - }, - mocha: - { - enableTimeouts: false - } -}; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..94cfea909 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es2020", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true + }, + "include": ["./hardhat.config.ts", "./scripts", "./deploy", "./test", "utils/"] +} diff --git a/uml/architecture-ODB.png b/uml/architecture-ODB.png deleted file mode 100644 index 0f1a156dd..000000000 Binary files a/uml/architecture-ODB.png and /dev/null differ diff --git a/uml/architecture-ODB.puml b/uml/architecture-ODB.puml deleted file mode 100644 index 75e4446e5..000000000 --- a/uml/architecture-ODB.puml +++ /dev/null @@ -1,64 +0,0 @@ -@startuml -:iExecCloudUser: -:iExecSCUser: -:DappProvider: -:DataProvider: -:ScheduleProvider: -:ResourceProvider: -:Broker: - -cloud { - [IexecRelay] -} -component [IexecRelay] -iExecSCUser -down-> [IexecRelay]: use - -component [Marketplace] -[IexecRelay] -down-> [Marketplace]: broadcast userorder -iExecCloudUser -down-> [Marketplace]: broadcast userorder -DappProvider -down-> [Marketplace]: broadcast dapporder -DataProvider -down-> [Marketplace]: broadcast dataorder -ScheduleProvider -down-> [Marketplace]: broadcast poolorder -Broker -up-> [Marketplace]: read order - -cloud { - [IexecClerk] - [IexecHub] - [RLC Token] -} -component [IexecClerk] -component [IexecHub] -component [RLC Token] -[IexecHub] <-right-> [IexecClerk] -[IexecClerk] <-right-> [RLC Token] - -Broker -down-> [IexecClerk]: push matched orders -[IexecClerk] -up-> [Marketplace]: notification events - -[iexec-scheduler] <-up-> [IexecHub] -[iexec-worker] <-up-> [IexecHub] - - - - - -component [AppRepository] -component [DatasetRepository] -component [iexec-scheduler] -component [iexec-worker] -component [ResultRepository] - -DappProvider -down-> AppRepository: expose -DataProvider -down-> DatasetRepository: expose -ScheduleProvider -down-> [iexec-scheduler]: control -ScheduleProvider -down-> [ResultRepository]: control and expose -ResultRepository <-right-> [iexec-scheduler] - - - -[ResourceProvider] -right-> [iexec-worker]: control - -[iexec-worker] <-right-> [iexec-scheduler] -[iexec-worker] <-up-> [AppRepository] -[iexec-worker] <-up-> [DatasetRepository] -@enduml diff --git a/uml/nominalworkflow-ODB+TEE.png b/uml/nominalworkflow-ODB+TEE.png deleted file mode 100644 index f1f861c20..000000000 Binary files a/uml/nominalworkflow-ODB+TEE.png and /dev/null differ diff --git a/uml/nominalworkflow-ODB+TEE.puml b/uml/nominalworkflow-ODB+TEE.puml deleted file mode 100644 index f8b5954eb..000000000 --- a/uml/nominalworkflow-ODB+TEE.puml +++ /dev/null @@ -1,185 +0,0 @@ -@startuml -scale 2000 width - -skinparam sequence { - ArrowColor black - ParticipantBorderColor black - LifeLineBorderColor grey - BoxBorderColor white -} - -box "Smart contracts" #LightBlue - participant SMSRegistry - participant IexecClerk - participant IexecHub -end box - -box "Off chain" #TECHNOLOGY - participant Marketplace -end box - -box "iExec Infra" #Bisque - participant SMS - participant Scheduler - participant Worker -end box - -box "Repository" #LightSalmon - participant App - participant Dataset - participant Results -end box - -box "Users" - participant AppOwner - participant DatasetOwner - participant Requester - participant anyone -end box - -skinparam sequenceGroupBodyBackgroundColor transparent - -autonumber - -== Ressources deployment == - -AppOwner -> App : Push application -activate AppOwner -AppOwner --> IexecHub : Register application -deactivate AppOwner - -DatasetOwner -> DatasetOwner : Generate encryption key (Kd) -activate DatasetOwner -DatasetOwner -> DatasetOwner : Encrypt Dataset with Kd -DatasetOwner -> Dataset : Push dataset -DatasetOwner --> IexecHub : Register dataset -DatasetOwner -> SMSRegistry : Setup SMS -group for each application - DatasetOwner -> App : Get application signature - DatasetOwner -[#red]> SMS : Authorize application to use Kd - DatasetOwner -> DatasetOwner : Add application to whitelist -end -deactivate DatasetOwner - -Requester -> Requester : Generate encryption key (Kr) -activate Requester -Requester -> SMSRegistry : Setup SMS -group for each application - Requester -[#red]> SMS: Authorize application to use Kr -end -deactivate Requester - -== Brokering == - -AppOwner -> AppOwner : sign apporder -activate AppOwner -AppOwner --> Marketplace : publish apporder -deactivate AppOwner - -DatasetOwner -> DatasetOwner : sign datasetorder -activate DatasetOwner -DatasetOwner --> Marketplace : publish datasetorder -deactivate DatasetOwner - -Scheduler -> Scheduler : checks availability -activate Scheduler -Scheduler -> Scheduler : sign workerpoolorder -Scheduler --> Marketplace : publish workerpoolorder -deactivate Scheduler - -Requester -> Requester : sign requestorder -activate Requester -Requester --> Marketplace : publish requestorder -deactivate Requester - -== Matching & Execution == -group Order matching - Marketplace --> anyone : read orders - activate anyone - anyone -> anyone : match orders - activate IexecClerk - anyone --> IexecClerk : matchOrders() - deactivate anyone - activate IexecClerk #lightgrey - IexecClerk <--> IexecClerk : emit OrdersMatched() - IexecClerk <--> IexecClerk : emit SchedulerNotice() -end - -IexecClerk o-> Marketplace : watch OrdersMatched() -IexecClerk o-> Scheduler : watch SchedulerNotice() -activate Scheduler -deactivate IexecClerk - -loop for all task in bag - - Scheduler -> Scheduler : Instanciate task - activate IexecHub - Scheduler --> IexecHub : initialize() - deactivate Scheduler - activate IexecHub #lightgrey - IexecHub <--> IexecHub : emit TaskInitialize() - IexecHub o-> Scheduler : watch TaskInitialize() - activate Scheduler - deactivate IexecHub - - Scheduler -[#red]> SMS : Get address of signing key (Ke) for application (Generate key pair if needed) - Scheduler -> Scheduler : randomly choose worker - Scheduler -> Scheduler : build signed authorization - group Worker execution - - Scheduler --> Worker : send signed authorization + SMS location - activate Worker - - Worker -> App : Get app - - Worker -> Worker : Spinup Enclave - activate Worker #lightgrey - - group Secrets - Worker -[#red]> SMS : Authenticate enclave & get Ke - - Worker -> SMSRegistry : Get Dataset SMS - Worker -[#red]> SMS : Authenticate enclave & get Kd - - Worker -> SMSRegistry : Get Requester SMS - Worker -[#red]> SMS : Authenticate enclave & get Kr - end group - - Worker -> Dataset : Get dataset - Worker -> Worker : Decrypt dataset with Kd - - Worker -> Worker : execute the asked work โ†’ Results //(raw dataset or uri)// - Worker -> Worker : encrypt Results with Kr - Worker -> Worker : resultDigest = hash(E(Results) or E(/iexec/consensus.iexec)) - Worker -> Worker : resultHash = hash(taskid | ResultDigest) //(vote)// - Worker -> Worker : resultSeal = hash(address | taskid | ResultDigest) //(proof of knowledge)// - Worker -> Worker : sign Hash and Seal with Ke - Worker --> IexecHub : contribute() - activate IexecHub #lightgrey - IexecHub <--> IexecHub : emit TaskContribute() - IexecHub o-> Scheduler : watch TaskContribute() - IexecHub <--> IexecHub : emit TaskConsensus() - IexecHub o-> Worker : watch TaskConsensus() - deactivate IexecHub - Worker -> Worker : value to reveal is resultDigest - Worker --> IexecHub : reveal() - Worker -> Results : push encrypted results - deactivate Worker - activate IexecHub #lightgrey - IexecHub <--> IexecHub : emit TaskReveal() - end - - IexecHub o-> Scheduler : watch TaskReveal() - deactivate IexecHub - Scheduler --> IexecHub : finalize() - deactivate Scheduler - activate IexecHub #lightgrey - IexecHub --> IexecClerk : notify - note over IexecClerk : RLC reward/seize for actors - deactivate IexecClerk - IexecHub <--> IexecHub : emit TaskFinalize() - deactivate IexecHub - deactivate IexecHub - -end -@enduml diff --git a/uml/nominalworkflow-ODB.png b/uml/nominalworkflow-ODB.png deleted file mode 100644 index e1719a6cf..000000000 Binary files a/uml/nominalworkflow-ODB.png and /dev/null differ diff --git a/uml/nominalworkflow-ODB.puml b/uml/nominalworkflow-ODB.puml deleted file mode 100644 index 20796285f..000000000 --- a/uml/nominalworkflow-ODB.puml +++ /dev/null @@ -1,125 +0,0 @@ -@startuml -box "Smart contracts" #LightBlue - participant IexecClerk - participant IexecHub -end box - -box "Off chain" #TECHNOLOGY - participant Marketplace -end box - -box "iExec Core" #Bisque - participant Scheduler - participant Worker -end box - -box "Ressources" #LightSalmon - participant App - participant Dataset -end box - -box "Users" - participant Requester - participant anyone -end box - -skinparam sequenceGroupBodyBackgroundColor transparent - -autonumber - -activate Marketplace - -activate App -App -> App : sign apporder -App --> Marketplace : publish apporder -deactivate App - -activate Dataset -Dataset -> Dataset : sign datasetorder -Dataset --> Marketplace : publish datasetorder -deactivate Dataset - -activate Scheduler -Scheduler -> Scheduler : checks availability -Scheduler -> Scheduler : sign workerpoolorder -Scheduler --> Marketplace : publish workerpoolorder -deactivate Scheduler - -activate Requester -Requester -> Requester : sign requestorder -Requester --> Marketplace : publish requestorder -deactivate Requester - -activate anyone -Marketplace --> anyone : read orders -anyone -> anyone : match orders -activate IexecClerk - -group Brokering - anyone --> IexecClerk : matchOrders() - activate IexecClerk #lightgrey - deactivate anyone - IexecClerk <--> IexecClerk : emit OrdersMatched() - IexecClerk <--> IexecClerk : emit SchedulerNotice() -end - -IexecClerk o-> Marketplace : watch OrdersMatched() -deactivate Marketplace -activate Scheduler -IexecClerk o-> Scheduler : watch SchedulerNotice() -deactivate IexecClerk - -loop for all task in bag - - activate IexecHub - Scheduler --> IexecHub : initialize() - activate IexecHub #lightgrey - deactivate Scheduler - IexecHub <--> IexecHub : emit TaskInitialize() - activate Scheduler - IexecHub o-> Scheduler : watch TaskInitialize() - deactivate IexecHub - - group workorder processing - Scheduler -> Scheduler : randomly choose worker - Scheduler -> Scheduler : build signed authorization - activate Worker - Scheduler --> Worker : send signed authorization - - group Worker execution - Worker <--> App : getApp - Worker <--> Dataset : getDataset - Worker -> Worker : execute the asked work โ†’ Results //(raw dataset or uri)// - Worker -> Worker : resultDigest = hash(Results) //(overwriten by iexecConsensus)// - Worker -> Worker : resultHash = hash(taskid | ResultDigest) //(vote)// - Worker -> Worker : resultSeal = hash(address | taskid | ResultDigest) //(proof of knowledge)// - Worker --> IexecHub : contribute() - activate IexecHub #lightgrey - IexecHub <--> IexecHub : emit TaskContribute() - IexecHub o-> Scheduler : watch TaskContribute() - IexecHub <--> IexecHub : emit TaskConsensus() - IexecHub o-> Worker : watch TaskConsensus() - deactivate IexecHub - Worker -> Worker : value to reveal is resultDigest - Worker --> IexecHub : reveal() - activate IexecHub #lightgrey - IexecHub <--> IexecHub : emit TaskReveal() - end - - deactivate Worker - - IexecHub o-> Scheduler : watch TaskReveal() - deactivate IexecHub - Scheduler --> IexecHub : finalize() - activate IexecHub #lightgrey - deactivate Scheduler - IexecHub --> IexecClerk : notify - note over IexecClerk : RLC reward/seize for actors - deactivate IexecClerk - IexecHub <--> IexecHub : emit TaskFinalize() - deactivate IexecHub - deactivate IexecHub - - end -end -@enduml diff --git a/utils/FactoryDeployer.js b/utils/FactoryDeployer.js index 0850889f0..3cdd7fe19 100644 --- a/utils/FactoryDeployer.js +++ b/utils/FactoryDeployer.js @@ -1,110 +1,144 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 const { ethers } = require('ethers'); -const FACTORY = require('@iexec/solidity/deployment/factory.json') +const FACTORY = + require('../config/config.json').chains.default.asset == 'Token' && + hre.network.name.includes('hardhat') // Required until dev-token chain EIPs are updated + ? require('@amxx/factory/deployments/GenericFactory_shanghai.json') + : require('@amxx/factory/deployments/GenericFactory.json'); -async function waitTx(txPromise) { await (await txPromise).wait() } +async function waitTx(txPromise) { + await (await txPromise).wait(); +} + +class EthersDeployer { + // factory: ethers.Contract + // factoryAsPromise: Promise + + constructor(wallet, options = {}) { + this.options = options; + this.factoryAsPromise = new Promise(async (resolve, reject) => { + if ((await wallet.provider.getCode(FACTORY.address)) !== '0x') { + console.debug(`โ†’ Factory is available on this network`); + } else { + try { + console.debug(`โ†’ Factory is not yet deployed on this network`); + await waitTx( + wallet.sendTransaction({ to: FACTORY.deployer, value: FACTORY.cost }), + ); + await waitTx(wallet.provider.sendTransaction(FACTORY.tx)); + console.debug(`โ†’ Factory successfully deployed`); + } catch (e) { + console.debug(`โ†’ Error deploying the factory`); + reject(e); + } + } + this.factory = new ethers.Contract(FACTORY.address, FACTORY.abi, wallet); + resolve(this.factory); + }); + } -class EthersDeployer -{ - // factory: ethers.Contract - // factoryAsPromise: Promise + async ready() { + await this.factoryAsPromise; + } - constructor(wallet, options = {}) - { - this.options = options; - this.factoryAsPromise = new Promise(async (resolve, reject) => { - if (await wallet.provider.getCode(FACTORY.address) !== "0x") - { - console.debug(`โ†’ Factory is available on this network`); - } - else - { - try - { - console.debug(`โ†’ Factory is not yet deployed on this network`); - await waitTx(wallet.sendTransaction({ to: FACTORY.deployer, value: FACTORY.cost })); - await waitTx(wallet.provider.sendTransaction(FACTORY.tx)); - console.debug(`โ†’ Factory successfully deployed`); - } - catch (e) - { - console.debug(`โ†’ Error deploying the factory`); - reject(e); - } - } - this.factory = new ethers.Contract(FACTORY.address, FACTORY.abi, wallet); - resolve(this.factory); - }) - } + async deploy(artefact, ...extra) { + await this.ready(); + console.log(`[factoryDeployer] ${artefact.contractName}`); + const constructorABI = artefact.abi.find((e) => e.type == 'constructor'); + const argsCount = constructorABI ? constructorABI.inputs.length : 0; + const args = extra.slice(0, argsCount); + const options = { ...this.options, ...extra[argsCount] }; + var librariesLinkPlaceHolderAndAddress = []; + if (options.libraries) { + librariesLinkPlaceHolderAndAddress = await Promise.all( + options.libraries.map(async (library) => { + const linkPlaceholder = this.getLinkPlaceholder(library, artefact); + if (linkPlaceholder) { + return { + linkPlaceholder: linkPlaceholder, + address: (await library.deployed()).address, + }; + } + }), + ); + } + var coreCode = artefact.bytecode; + librariesLinkPlaceHolderAndAddress + .filter((data) => data != undefined) + .forEach((element) => { + // Replace `__$9d824026d0515d8abd681f0f0f4707f16a$__` + // by address library without 0x prefix + coreCode = coreCode.replaceAll( + element.linkPlaceholder, + element.address.slice(2).toLowerCase(), + ); + }); - async ready() - { - await this.factoryAsPromise; - } + const argsCode = constructorABI + ? ethers.utils.defaultAbiCoder + .encode( + constructorABI.inputs.map((e) => e.type), + args, + ) + .slice(2) + : ''; + const code = coreCode + argsCode; + const salt = options.salt || ethers.constants.HashZero; + const contractAddress = options.call + ? await this.factory.predictAddressWithCall(code, salt, options.call) + : await this.factory.predictAddress(code, salt); - async deploy(artefact, ...extra) - { - await this.ready(); - console.log(`[factoryDeployer] ${artefact.contractName}`); - const constructorABI = artefact.abi.find(e => e.type == 'constructor'); - const argsCount = constructorABI ? constructorABI.inputs.length : 0; - const args = extra.slice(0, argsCount); - const options = { ...this.options, ...extra[argsCount] }; - const libraryAddresses = await Promise.all( - (options.libraries || []) - .filter(({ contractName }) => artefact.bytecode.search(contractName) != -1) - .map(async ({ contractName, deployed }) => ({ - pattern: new RegExp(`__${contractName}${'_'.repeat(38-contractName.length)}`, 'g'), - ...await deployed(), - })) - ); - const coreCode = libraryAddresses.reduce((code, { pattern, address }) => code.replace(pattern, address.slice(2).toLowerCase()), artefact.bytecode); - const argsCode = constructorABI ? ethers.utils.defaultAbiCoder.encode(constructorABI.inputs.map(e => e.type), args).slice(2) : ''; - const code = coreCode + argsCode; - const salt = options.salt || ethers.constants.HashZero; - artefact.address = options.call - ? await this.factory.predictAddressWithCall(code, salt, options.call) - : await this.factory.predictAddress(code, salt); + if ((await this.factory.provider.getCode(contractAddress)) == '0x') { + console.log(`[factory] Preparing to deploy ${artefact.contractName} ...`); + await waitTx( + options.call + ? this.factory.createContractAndCall(code, salt, options.call) + : this.factory.createContract(code, salt), + ); + console.log( + `[factory] ${artefact.contractName} successfully deployed at ${contractAddress}`, + ); + } else { + console.log( + `[factory] ${artefact.contractName} already deployed at ${contractAddress}`, + ); + } + const instance = await artefact.at(contractAddress); + artefact.setAsDeployed(instance); + } - if (await this.factory.provider.getCode(artefact.address) == '0x') - { - console.log(`[factory] Preparing to deploy ${artefact.contractName} ...`); - await waitTx( - options.call - ? this.factory.createContractAndCall(code, salt, options.call) - : this.factory.createContract(code, salt) - ); - console.log(`[factory] ${artefact.contractName} successfully deployed at ${artefact.address}`); - } - else - { - console.log(`[factory] ${artefact.contractName} already deployed at ${artefact.address}`); - } - } + /** + * Get placeholder to be replaced with library address for a given contract. + * @param libraryArtefact artefact of the library + * @param contractArtefact artefact of the contract to be linked with the library + * @returns the placeholder to be replaced + */ + getLinkPlaceholder(libraryArtefact, contractArtefact) { + const hardhatLibraryArtifact = libraryArtefact._hArtifact; + const hardhatContractArtifact = contractArtefact._hArtifact; + if (hardhatContractArtifact.linkReferences) { + const linkSourceName = + hardhatContractArtifact.linkReferences[hardhatLibraryArtifact.sourceName]; + if (linkSourceName) { + const firstLinkData = linkSourceName[hardhatLibraryArtifact.contractName][0]; + // linkPlaceholder code from: + // https://github.com/NomicFoundation/hardhat/blob/v1.3.3/packages/buidler-truffle5/src/artifacts.ts#L123 + return contractArtefact.bytecode.substr( + firstLinkData.start * 2 + 2, + firstLinkData.length * 2, + ); + } + } + } } -class TruffleDeployer extends EthersDeployer -{ - constructor(web3, wallet = 0, options = {}) - { - const provider = new ethers.providers.Web3Provider(web3.currentProvider) - super(provider.getSigner(wallet), options) - } +class TruffleDeployer extends EthersDeployer { + constructor(web3, wallet = 0, options = {}) { + const provider = new ethers.providers.Web3Provider(web3.currentProvider); + super(provider.getSigner(wallet), options); + } } -module.exports = { EthersDeployer, TruffleDeployer } +module.exports = { EthersDeployer, TruffleDeployer, factoryAddress: FACTORY.address }; diff --git a/utils/FactoryDeployerHelper.ts b/utils/FactoryDeployerHelper.ts new file mode 100644 index 000000000..f39d5db03 --- /dev/null +++ b/utils/FactoryDeployerHelper.ts @@ -0,0 +1,59 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { ContractFactory } from '@ethersproject/contracts'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { deployments, ethers } from 'hardhat'; +import { GenericFactory, GenericFactory__factory } from '../typechain'; +import { getBaseNameFromContractFactory } from './deploy-tools'; +const { EthersDeployer: Deployer, factoryAddress } = require('../utils/FactoryDeployer'); + +export class FactoryDeployerHelper { + salt: string; + init: any; + genericFactory: GenericFactory; + + constructor(owner: SignerWithAddress, salt: string) { + this.salt = salt; + this.init = new Deployer(owner); + this.genericFactory = GenericFactory__factory.connect(factoryAddress, owner); + } + + /** + * Deploy a contract through GenericFactory [and optionally trigger a call] + */ + async deployWithFactory( + contractFactory: ContractFactory, + constructorArgs?: any[], + call?: string, + ) { + await this.init.ready(); // Deploy GenericFactory if not already done + let bytecode = contractFactory.getDeployTransaction(...(constructorArgs ?? [])).data; + if (!bytecode) { + throw new Error('Failed to prepare bytecode'); + } + let contractAddress = await (call + ? this.genericFactory.predictAddressWithCall(bytecode, this.salt, call) + : this.genericFactory.predictAddress(bytecode, this.salt)); + const previouslyDeployed = (await ethers.provider.getCode(contractAddress)) !== '0x'; + if (!previouslyDeployed) { + await ( + call + ? this.genericFactory.createContractAndCall(bytecode, this.salt, call) + : this.genericFactory.createContract(bytecode, this.salt) + ).then((tx) => tx.wait()); + } + const contractName = getBaseNameFromContractFactory(contractFactory); + console.log( + `${contractName}: ${contractAddress} ${ + previouslyDeployed ? ' (previously deployed)' : '' + }`, + ); + await deployments.save(contractName, { + // abi field is not used but is a required arg. Empty abi would be fine + abi: (contractFactory as any).constructor.abi, + address: contractAddress, + }); + return contractAddress; + } +} diff --git a/utils/constants.d.ts b/utils/constants.d.ts new file mode 100644 index 000000000..37441f3b4 --- /dev/null +++ b/utils/constants.d.ts @@ -0,0 +1,10 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +export declare const NULL: { + ADDRESS: string; + BYTES32: string; + SIGNATURE: string; +}; + +export declare const MULTIADDR_BYTES: string; diff --git a/utils/constants.js b/utils/constants.js index 4801fcb14..5123a5ebd 100644 --- a/utils/constants.js +++ b/utils/constants.js @@ -1,64 +1,53 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 -function define(name, value) -{ - Object.defineProperty(exports, name, { value: value, enumerable: true }); +function define(name, value) { + Object.defineProperty(exports, name, { value: value, enumerable: true }); } //config -define("EVENT_WAIT_TIMEOUT", 100000); -define("AMOUNT_GAS_PROVIDED", 4500000); +define('EVENT_WAIT_TIMEOUT', 100000); +define('AMOUNT_GAS_PROVIDED', 4500000); //define("AMOUNT_GAS_PROVIDED", 0xFFFFFFFFFFFFFFFF); -define("NULL", { - ADDRESS: "0x0000000000000000000000000000000000000000", - BYTES32: "0x0000000000000000000000000000000000000000000000000000000000000000", - SIGNATURE: "0x", - DATAORDER: { - dataset: "0x0000000000000000000000000000000000000000", - datasetprice: 0, - volume: 0, - tag: "0x0000000000000000000000000000000000000000000000000000000000000000", - apprestrict: "0x0000000000000000000000000000000000000000", - workerpoolrestrict: "0x0000000000000000000000000000000000000000", - requesterrestrict: "0x0000000000000000000000000000000000000000", - salt: "0x0000000000000000000000000000000000000000000000000000000000000000", - sign: "0x", - } +define('NULL', { + ADDRESS: '0x0000000000000000000000000000000000000000', + BYTES32: '0x0000000000000000000000000000000000000000000000000000000000000000', + SIGNATURE: '0x', + DATAORDER: { + dataset: '0x0000000000000000000000000000000000000000', + datasetprice: 0, + volume: 0, + tag: '0x0000000000000000000000000000000000000000000000000000000000000000', + apprestrict: '0x0000000000000000000000000000000000000000', + workerpoolrestrict: '0x0000000000000000000000000000000000000000', + requesterrestrict: '0x0000000000000000000000000000000000000000', + salt: '0x0000000000000000000000000000000000000000000000000000000000000000', + sign: '0x', + }, }); // ENUM -define("OrderOperationEnum", { - SIGN: 0, - CLOSE: 1 +define('OrderOperationEnum', { + SIGN: 0, + CLOSE: 1, }); -define("TaskStatusEnum", { - UNSET: 0, - ACTIVE: 1, - REVEALING: 2, - COMPLETED: 3, - FAILED: 4 +define('TaskStatusEnum', { + UNSET: 0, + ACTIVE: 1, + REVEALING: 2, + COMPLETED: 3, + FAILED: 4, }); -define("ContributionStatusEnum", { - UNSET : 0, - CONTRIBUTED : 1, - PROVED : 2, - REJECTED : 3 +define('ContributionStatusEnum', { + UNSET: 0, + CONTRIBUTED: 1, + PROVED: 2, + REJECTED: 3, }); -define("MULTIADDR", "/ipfs/QmRwwTz9Chq4Y7F7ReKKcx1GV6s3H7egmNGrku9XrwiDa8"); -define("MULTIADDR_BYTES", "0xa503221220359d55f58a43126d4ba446a35940265eb2dab57ecbc439e7f105c558f8774819"); +define('MULTIADDR', '/ipfs/QmRwwTz9Chq4Y7F7ReKKcx1GV6s3H7egmNGrku9XrwiDa8'); +define( + 'MULTIADDR_BYTES', + '0xa503221220359d55f58a43126d4ba446a35940265eb2dab57ecbc439e7f105c558f8774819', +); diff --git a/utils/createOrders.ts b/utils/createOrders.ts new file mode 100644 index 000000000..e33e4e0ea --- /dev/null +++ b/utils/createOrders.ts @@ -0,0 +1,342 @@ +// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { TypedDataDomain } from '@ethersproject/abstract-signer'; +import { BigNumber } from '@ethersproject/bignumber'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { ethers } from 'hardhat'; +import { IexecLibOrders_v5 } from '../typechain'; +import constants, { NULL } from './constants'; +import { utils } from './odb-tools'; +import { OrderOperationEnum } from './poco-tools'; + +export interface OrdersAssets { + app: string; + dataset: string; + workerpool: string; +} + +export interface OrdersPrices { + app?: number; + dataset?: number; + workerpool?: number; +} + +export interface MatchOrdersArgs { + assets: OrdersAssets; + requester: string; + beneficiary?: string; + tag?: string; + prices?: OrdersPrices; + volume?: number; + callback?: string; + trust?: number; + category?: number; + params?: string; + salt?: string; +} + +export interface OrdersActors { + appOwner: SignerWithAddress; + datasetOwner: SignerWithAddress; + workerpoolOwner: SignerWithAddress; + requester: SignerWithAddress; +} + +export class IexecOrders { + app: IexecLibOrders_v5.AppOrderStruct; + dataset: IexecLibOrders_v5.DatasetOrderStruct; + workerpool: IexecLibOrders_v5.WorkerpoolOrderStruct; + requester: IexecLibOrders_v5.RequestOrderStruct; + + constructor( + app: IexecLibOrders_v5.AppOrderStruct, + dataset: IexecLibOrders_v5.DatasetOrderStruct, + workerpool: IexecLibOrders_v5.WorkerpoolOrderStruct, + requester: IexecLibOrders_v5.RequestOrderStruct, + ) { + this.app = app; + this.dataset = dataset; + this.workerpool = workerpool; + this.requester = requester; + } + + /** + * Convert this instance to an array to simplify spreading. + * foo(...orders.toArray()); + * @returns an array with all orders + */ + toArray() { + return [this.app, this.dataset, this.workerpool, this.requester] as [ + IexecLibOrders_v5.AppOrderStruct, + IexecLibOrders_v5.DatasetOrderStruct, + IexecLibOrders_v5.WorkerpoolOrderStruct, + IexecLibOrders_v5.RequestOrderStruct, + ]; + } + + /** + * Convert this instance to a JS object to simplify destructuring. + * const { appOrder } = orders.toObject(); + * @returns an object with all orders + */ + toObject() { + return { + appOrder: this.app, + datasetOrder: this.dataset, + workerpoolOrder: this.workerpool, + requesterOrder: this.requester, + // An alias for convenience + // TODO use requestOrder instead of requesterOrder everywhere. + requestOrder: this.requester, + }; + } +} + +export interface OrderOperation { + order: Record; + operation: BigNumber; + sign: string; +} + +export function createEmptyAppOrder(): IexecLibOrders_v5.AppOrderStruct { + return { + app: constants.NULL.ADDRESS, + appprice: 0, + volume: 1, + tag: constants.NULL.BYTES32, + datasetrestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: constants.NULL.BYTES32, + sign: constants.NULL.SIGNATURE, + }; +} + +export function createEmptyRequestOrder(): IexecLibOrders_v5.RequestOrderStruct { + return { + app: constants.NULL.ADDRESS, + appmaxprice: 0, + dataset: constants.NULL.ADDRESS, + datasetmaxprice: 0, + workerpool: constants.NULL.ADDRESS, + workerpoolmaxprice: 0, + volume: 1, + tag: constants.NULL.BYTES32, + category: 0, + trust: 0, + requester: constants.NULL.ADDRESS, + beneficiary: constants.NULL.ADDRESS, + callback: constants.NULL.ADDRESS, + params: '', + salt: constants.NULL.BYTES32, + sign: constants.NULL.SIGNATURE, + }; +} + +export function createEmptyWorkerpoolOrder(): IexecLibOrders_v5.WorkerpoolOrderStruct { + return { + workerpool: constants.NULL.ADDRESS, + workerpoolprice: 0, + volume: 1, + tag: constants.NULL.BYTES32, + category: 0, + trust: 0, + apprestrict: constants.NULL.ADDRESS, + datasetrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: constants.NULL.BYTES32, + sign: constants.NULL.SIGNATURE, + }; +} + +export function createEmptyDatasetOrder(): IexecLibOrders_v5.DatasetOrderStruct { + return { + dataset: constants.NULL.ADDRESS, + datasetprice: 0, + volume: 1, + tag: constants.NULL.BYTES32, + apprestrict: constants.NULL.ADDRESS, + workerpoolrestrict: constants.NULL.ADDRESS, + requesterrestrict: constants.NULL.ADDRESS, + salt: constants.NULL.BYTES32, + sign: constants.NULL.SIGNATURE, + }; +} + +/** + * Create an order operation from an existing order. + */ +export function createOrderOperation(order: OrderType, operation: OrderOperationEnum) { + return { order, operation: BigNumber.from(operation), sign: NULL.SIGNATURE }; +} + +export function buildOrders(matchOrdersArgs: MatchOrdersArgs) { + let requestOrder = createEmptyRequestOrder(); + let appOrder = createEmptyAppOrder(); + let workerpoolOrder = createEmptyWorkerpoolOrder(); + let datasetOrder = createEmptyDatasetOrder(); + const assets = matchOrdersArgs.assets; + // Set app + appOrder.app = assets.app; + requestOrder.app = assets.app; + // Set workerpool + workerpoolOrder.workerpool = assets.workerpool; + requestOrder.workerpool = assets.workerpool; + // Set dataset + datasetOrder.dataset = assets.dataset; + requestOrder.dataset = assets.dataset; + // Set requester + requestOrder.requester = matchOrdersArgs.requester; + // Set beneficiary + if (matchOrdersArgs.beneficiary) { + requestOrder.beneficiary = matchOrdersArgs.beneficiary; + } + // Set tag + if (matchOrdersArgs.tag) { + appOrder.tag = matchOrdersArgs.tag; + requestOrder.tag = matchOrdersArgs.tag; + datasetOrder.tag = matchOrdersArgs.tag; + workerpoolOrder.tag = matchOrdersArgs.tag; + } + // Set prices + const prices = matchOrdersArgs.prices; + if (prices) { + if (prices.app) { + appOrder.appprice = prices.app; + requestOrder.appmaxprice = prices.app; + } + if (prices.dataset && assets.dataset != constants.NULL.ADDRESS) { + datasetOrder.datasetprice = prices.dataset; + requestOrder.datasetmaxprice = prices.dataset; + } + if (prices.workerpool) { + workerpoolOrder.workerpoolprice = prices.workerpool; + requestOrder.workerpoolmaxprice = prices.workerpool; + } + } + // Set volume + if (matchOrdersArgs.volume) { + appOrder.volume = matchOrdersArgs.volume; + datasetOrder.volume = matchOrdersArgs.volume; + workerpoolOrder.volume = matchOrdersArgs.volume; + requestOrder.volume = matchOrdersArgs.volume; + } + // Set callback + if (matchOrdersArgs.callback) { + requestOrder.callback = matchOrdersArgs.callback; + } + // Set trust + if (matchOrdersArgs.trust) { + requestOrder.trust = matchOrdersArgs.trust; + workerpoolOrder.trust = matchOrdersArgs.trust; + } + // Set category + if (matchOrdersArgs.category) { + requestOrder.category = matchOrdersArgs.category; + workerpoolOrder.category = matchOrdersArgs.category; + } + // Set params + if (matchOrdersArgs.params) { + requestOrder.params = matchOrdersArgs.params; + } + // Set salt + if (matchOrdersArgs.salt) { + appOrder.salt = matchOrdersArgs.salt; + datasetOrder.salt = matchOrdersArgs.salt; + workerpoolOrder.salt = matchOrdersArgs.salt; + requestOrder.salt = matchOrdersArgs.salt; + } + return new IexecOrders(appOrder, datasetOrder, workerpoolOrder, requestOrder); +} + +/** + * Build a domain separator from a given domain of create them for testing purposes + * @returns a domain and a domain separator + */ +export function buildDomain(domain?: TypedDataDomain | undefined) { + if (!domain) { + domain = { + name: 'domain-name', + version: 'domain-version', + chainId: 123, + verifyingContract: '0x0000000000000000000000000000000000000001', + }; // testing purposes + } + const domainSeparator = ethers.utils._TypedDataEncoder.hashDomain(domain); + return { domain, domainSeparator }; +} + +/** + * Sign all orders required by `matchOrder` calls. + * @param domain typed data domain for EIP-712 signature + * @param orders orders to sign (app, dataset, workerpool and requester orders) + * @param signers accounts which will respectively sign orders according to their + * role + */ +export async function signOrders( + domain: TypedDataDomain, + orders: IexecOrders, + signers: OrdersActors, +): Promise { + await signOrder(domain, orders.app, signers.appOwner); + if (orders.dataset) { + await signOrder(domain, orders.dataset, signers.datasetOwner); + } + await signOrder(domain, orders.workerpool, signers.workerpoolOwner); + await signOrder(domain, orders.requester, signers.requester); +} + +/** + * Sign an iExec EIP712 order: app, dataset, workerpool or request + */ +export async function signOrder( + domain: TypedDataDomain, + order: Record, + signer: SignerWithAddress, +): Promise { + return utils.signStruct(getTypeOf(order), order, domain, signer); +} + +/** + * Sign an iExec EIP712 order operation for app, dataset, workerpool or request + * order operations. + */ +export async function signOrderOperation( + domain: TypedDataDomain, + orderOperation: OrderOperation, + signer: SignerWithAddress, +): Promise { + return utils.signStruct( + getTypeOf(orderOperation.order) + 'Operation', + orderOperation, + domain, + signer, + ); +} + +/** + * Get typed data hash of order: app, dataset, workerpool or request + * @returns order hash + */ +export function hashOrder(domain: TypedDataDomain, order: Record): string { + return utils.hashStruct(getTypeOf(order), order, domain); +} + +/** + * Retrieve specific order type from generic order instance + * @param order iExec order (app, dataset, workerpool or request orders) + * @returns class type + */ +function getTypeOf(order: Record): string { + if ('requester' in order) { + return 'RequestOrder'; + } else if ('app' in order) { + return 'AppOrder'; + } else if ('dataset' in order) { + return 'DatasetOrder'; + } else if ('workerpool' in order) { + return 'WorkerpoolOrder'; + } + return ''; +} diff --git a/utils/deploy-tools.ts b/utils/deploy-tools.ts new file mode 100644 index 000000000..45e500e2a --- /dev/null +++ b/utils/deploy-tools.ts @@ -0,0 +1,44 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { ContractFactory } from '@ethersproject/contracts'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { deployments } from 'hardhat'; + +/** + * Deploy a contract. + * @param contractFactory The contract to deploy + * @param deployer The signer to deploy the contract + * @param constructorArgs Arguments passed to the contract constructor at deployment + * @param opts Additional options + * @returns an instance of the deployed contract + */ +export async function deploy( + contractFactory: ContractFactory, + deployer: SignerWithAddress, + constructorArgs?: any[], + opts?: { quiet: boolean }, +) { + const contractInstance = await contractFactory + .connect(deployer) + .deploy(...(constructorArgs ?? [])) + .then((x) => x.deployed()); + const contractName = getBaseNameFromContractFactory(contractFactory); + await deployments.save(contractName, { + abi: (contractFactory as any).constructor.abi, + address: contractInstance.address, + }); + if (!opts || (opts && !opts.quiet)) { + console.log(`${contractName}: ${contractInstance.address}`); + } + return contractInstance; +} + +/** + * Extract base contract name from contract factory name. + * Inputting `MyBoxContract__factory` returns `MyBoxContract`. + */ +export function getBaseNameFromContractFactory(contractFactory: any) { + const name = contractFactory.constructor.name; + return name.replace('__factory', ''); +} diff --git a/utils/ens-tools.js b/utils/ens-tools.js index 294e44d74..8c3ff8173 100644 --- a/utils/ens-tools.js +++ b/utils/ens-tools.js @@ -1,61 +1,47 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 -var ENSRegistry = artifacts.require("./ENSRegistry.sol"); -var PublicResolver = artifacts.require("./PublicResolver.sol"); -var FIFSRegistrar = artifacts.require("./FIFSRegistrar.sol"); +var ENSRegistry = artifacts.require('@ensdomains/ens-contracts/contracts/registry/ENSRegistry'); +var PublicResolver = artifacts.require( + '@ensdomains/ens-contracts/contracts/resolvers/PublicResolver', +); module.exports = { - - labelhash: function(label) - { - return web3.utils.keccak256(label.toLowerCase()) - }, - - compose: function(labelHash, rootHash) - { - return web3.utils.keccak256(web3.eth.abi.encodeParameters([ "bytes32", "bytes32" ], [ rootHash, labelHash ])); - }, - - namehash: function(domain) - { - return domain.split('.').reverse().reduce( - (hash, label) => this.compose(this.labelhash(label), hash), - "0x0000000000000000000000000000000000000000000000000000000000000000" - ); - }, - - resolve: async function(name) - { - node = this.namehash(name); - registry = await ENSRegistry.deployed(); - resolveraddr = await registry.resolver(node); - resolver = await PublicResolver.at(resolveraddr); - addr = await resolver.addr(node); - return addr; - }, - - lookup: async function(addr) - { - node = this.namehash(`${addr.substring(2)}.addr.reverse`); - registry = await ENSRegistry.deployed(); - resolveraddr = await registry.resolver(node); - resolver = await PublicResolver.at(resolveraddr); - name = await resolver.name(node); - return name; - }, - + labelhash: function (label) { + return web3.utils.keccak256(label.toLowerCase()); + }, + + compose: function (labelHash, rootHash) { + return web3.utils.keccak256( + web3.eth.abi.encodeParameters(['bytes32', 'bytes32'], [rootHash, labelHash]), + ); + }, + + namehash: function (domain) { + return domain + .split('.') + .reverse() + .reduce( + (hash, label) => this.compose(this.labelhash(label), hash), + '0x0000000000000000000000000000000000000000000000000000000000000000', + ); + }, + + resolve: async function (name) { + node = this.namehash(name); + registry = await ENSRegistry.deployed(); + resolveraddr = await registry.resolver(node); + resolver = await PublicResolver.at(resolveraddr); + addr = await resolver.addr(node); + return addr; + }, + + lookup: async function (addr) { + node = this.namehash(`${addr.substring(2)}.addr.reverse`); + registry = await ENSRegistry.deployed(); + resolveraddr = await registry.resolver(node); + resolver = await PublicResolver.at(resolveraddr); + name = await resolver.name(node); + return name; + }, }; diff --git a/utils/mock-tools.ts b/utils/mock-tools.ts new file mode 100644 index 000000000..28d61d8f6 --- /dev/null +++ b/utils/mock-tools.ts @@ -0,0 +1,17 @@ +// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { MockContract, smock } from '@defi-wonderland/smock'; +import { Contract, ContractFactory } from '@ethersproject/contracts'; +import { FactoryOptions } from '@nomiclabs/hardhat-ethers/types'; + +export async function createMock( + contractName: string, + factoryOptions?: FactoryOptions, + ...args: Parameters +): Promise> { + return (await smock + .mock(contractName, factoryOptions) + .then((contract) => contract.deploy(...args)) + .then((instance) => instance.deployed())) as MockContract; +} diff --git a/utils/odb-tools.js b/utils/odb-tools.js index 09fb5768f..6702b4e14 100644 --- a/utils/odb-tools.js +++ b/utils/odb-tools.js @@ -1,397 +1,399 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 -const sigUtil = require('eth-sig-util'); const constants = require('./constants'); +const ethers = require('ethers'); +const TYPES = { + EIP712Domain: [ + { type: 'string', name: 'name' }, + { type: 'string', name: 'version' }, + { type: 'uint256', name: 'chainId' }, + { type: 'address', name: 'verifyingContract' }, + ], + AppOrder: [ + { type: 'address', name: 'app' }, + { type: 'uint256', name: 'appprice' }, + { type: 'uint256', name: 'volume' }, + { type: 'bytes32', name: 'tag' }, + { type: 'address', name: 'datasetrestrict' }, + { type: 'address', name: 'workerpoolrestrict' }, + { type: 'address', name: 'requesterrestrict' }, + { type: 'bytes32', name: 'salt' }, + ], + DatasetOrder: [ + { type: 'address', name: 'dataset' }, + { type: 'uint256', name: 'datasetprice' }, + { type: 'uint256', name: 'volume' }, + { type: 'bytes32', name: 'tag' }, + { type: 'address', name: 'apprestrict' }, + { type: 'address', name: 'workerpoolrestrict' }, + { type: 'address', name: 'requesterrestrict' }, + { type: 'bytes32', name: 'salt' }, + ], + WorkerpoolOrder: [ + { type: 'address', name: 'workerpool' }, + { type: 'uint256', name: 'workerpoolprice' }, + { type: 'uint256', name: 'volume' }, + { type: 'bytes32', name: 'tag' }, + { type: 'uint256', name: 'category' }, + { type: 'uint256', name: 'trust' }, + { type: 'address', name: 'apprestrict' }, + { type: 'address', name: 'datasetrestrict' }, + { type: 'address', name: 'requesterrestrict' }, + { type: 'bytes32', name: 'salt' }, + ], + RequestOrder: [ + { type: 'address', name: 'app' }, + { type: 'uint256', name: 'appmaxprice' }, + { type: 'address', name: 'dataset' }, + { type: 'uint256', name: 'datasetmaxprice' }, + { type: 'address', name: 'workerpool' }, + { type: 'uint256', name: 'workerpoolmaxprice' }, + { type: 'address', name: 'requester' }, + { type: 'uint256', name: 'volume' }, + { type: 'bytes32', name: 'tag' }, + { type: 'uint256', name: 'category' }, + { type: 'uint256', name: 'trust' }, + { type: 'address', name: 'beneficiary' }, + { type: 'address', name: 'callback' }, + { type: 'string', name: 'params' }, + { type: 'bytes32', name: 'salt' }, + ], + AppOrderOperation: [ + { type: 'AppOrder', name: 'order' }, + { type: 'uint256', name: 'operation' }, + ], + DatasetOrderOperation: [ + { type: 'DatasetOrder', name: 'order' }, + { type: 'uint256', name: 'operation' }, + ], + WorkerpoolOrderOperation: [ + { type: 'WorkerpoolOrder', name: 'order' }, + { type: 'uint256', name: 'operation' }, + ], + RequestOrderOperation: [ + { type: 'RequestOrder', name: 'order' }, + { type: 'uint256', name: 'operation' }, + ], +}; - -const TYPES = -{ - EIP712Domain: [ - { type: "string", name: "name" }, - { type: "string", name: "version" }, - { type: "uint256", name: "chainId" }, - { type: "address", name: "verifyingContract" }, - ], - AppOrder: [ - { type: "address", name: "app" }, - { type: "uint256", name: "appprice" }, - { type: "uint256", name: "volume" }, - { type: "bytes32", name: "tag" }, - { type: "address", name: "datasetrestrict" }, - { type: "address", name: "workerpoolrestrict" }, - { type: "address", name: "requesterrestrict" }, - { type: "bytes32", name: "salt" }, - ], - DatasetOrder: [ - { type: "address", name: "dataset" }, - { type: "uint256", name: "datasetprice" }, - { type: "uint256", name: "volume" }, - { type: "bytes32", name: "tag" }, - { type: "address", name: "apprestrict" }, - { type: "address", name: "workerpoolrestrict" }, - { type: "address", name: "requesterrestrict" }, - { type: "bytes32", name: "salt" }, - ], - WorkerpoolOrder: [ - { type: "address", name:"workerpool" }, - { type: "uint256", name:"workerpoolprice" }, - { type: "uint256", name:"volume" }, - { type: "bytes32", name:"tag" }, - { type: "uint256", name:"category" }, - { type: "uint256", name:"trust" }, - { type: "address", name:"apprestrict" }, - { type: "address", name:"datasetrestrict" }, - { type: "address", name:"requesterrestrict" }, - { type: "bytes32", name:"salt" }, - ], - RequestOrder: [ - { type: "address", name: "app" }, - { type: "uint256", name: "appmaxprice" }, - { type: "address", name: "dataset" }, - { type: "uint256", name: "datasetmaxprice" }, - { type: "address", name: "workerpool" }, - { type: "uint256", name: "workerpoolmaxprice" }, - { type: "address", name: "requester" }, - { type: "uint256", name: "volume" }, - { type: "bytes32", name: "tag" }, - { type: "uint256", name: "category" }, - { type: "uint256", name: "trust" }, - { type: "address", name: "beneficiary" }, - { type: "address", name: "callback" }, - { type: "string", name: "params" }, - { type: "bytes32", name: "salt" }, - ], - AppOrderOperation: [ - { type: "AppOrder", name: "order" }, - { type: "uint256", name: "operation" }, - ], - DatasetOrderOperation: [ - { type: "DatasetOrder", name: "order" }, - { type: "uint256", name: "operation" }, - ], - WorkerpoolOrderOperation: [ - { type: "WorkerpoolOrder", name: "order" }, - { type: "uint256", name: "operation" }, - ], - RequestOrderOperation: [ - { type: "RequestOrder", name: "order" }, - { type: "uint256", name: "operation" }, - ], +function eth_sign(hash, wallet) { + return new Promise((resolve, reject) => { + if (wallet.sign) { + resolve(wallet.sign(hash).signature); + } else { + web3.eth.sign(hash, wallet.address).then(resolve).catch(reject); + } + }); } -function eth_sign(hash, wallet) -{ - return new Promise((resolve, reject) => { - if (wallet.sign) - { - resolve(wallet.sign(hash).signature) - } - else - { - web3.eth.sign(hash, wallet.address).then(resolve).catch(reject); - } - }); +function buildTypes(primaryType) { + const OPERATION = 'Operation'; + const types = { + [primaryType]: TYPES[primaryType], + }; + + // Check if primaryType ends with 'Operation' + if (primaryType.endsWith(OPERATION)) { + const referredType = primaryType.slice(0, -OPERATION.length); + types[referredType] = TYPES[referredType]; + } + + return types; } -function eth_signTypedData(primaryType, message, domain, wallet) -{ - return new Promise((resolve, reject) => { - const data = { - types: TYPES, - primaryType, - domain: - { - name: domain.name, - version: domain.version, - chainId: domain.chainId, - verifyingContract: domain.verifyingContract, - }, - message, - }; - if (wallet.privateKey) - { - resolve(sigUtil.signTypedData(Buffer.from(wallet.privateKey.substring(2), 'hex'), { data })); - } - else - { - web3.currentProvider.send({ - method: "eth_signTypedData", - params: [ wallet.address, data ], - from: wallet.address, - }, (err, result) => { - if (!err) - { - resolve(result.result); - } - else - { - reject(err); - } - }); - } - }); +function eth_signTypedData(primaryType, message, domain, wallet) { + return new Promise((resolve, reject) => { + const typedDataDomain = { + name: domain.name, + version: domain.version, + chainId: domain.chainId, + verifyingContract: domain.verifyingContract, + }; + const types = buildTypes(primaryType); + + let signerPromise; + + if (wallet.privateKey) { + const walletInstance = new ethers.Wallet(wallet.privateKey, hre.ethers.provider); + signerPromise = Promise.resolve(walletInstance); + } else { + signerPromise = hre.ethers.getSigner(wallet.address); + } + + signerPromise + .then((signer) => signer._signTypedData(typedDataDomain, types, message)) + .then(resolve) + .catch(reject); + }); } -function signMessage(obj, hash, wallet) -{ - return eth_sign(hash, wallet).then(sign => { - obj.sign = sign; - return obj; - }); +function signMessage(obj, hash, wallet) { + return eth_sign(hash, wallet).then((sign) => { + obj.sign = sign; + return obj; + }); } -function signStruct(primaryType, message, domain, wallet) -{ - return eth_signTypedData(primaryType, message, domain, wallet).then(sign => { - message.sign = sign; - return message; - }); +function signStruct(primaryType, message, domain, wallet) { + return eth_signTypedData(primaryType, message, domain, wallet).then((sign) => { + message.sign = sign; + return message; + }); } -function hashStruct(primaryType, message, domain) -{ - return '0x' + sigUtil.TypedDataUtils.sign({ - types: TYPES, - primaryType, - message, - domain, - }).toString('hex'); +function hashStruct(primaryType, message, domain) { + let typedDataDomain = { + name: domain.name, + version: domain.version, + chainId: domain.chainId, + verifyingContract: domain.verifyingContract, + }; + const types = { + [primaryType]: TYPES[primaryType], + }; + + return ethers.utils._TypedDataEncoder.hash(typedDataDomain, types, message); } /* NOT EIP712 compliant */ -function hashAuthorization(authorization) -{ - return web3.utils.soliditySha3( - { t: 'address', v: authorization.worker }, - { t: 'bytes32', v: authorization.taskid }, - { t: 'address', v: authorization.enclave }, - ); +function hashAuthorization(authorization) { + return web3.utils.soliditySha3( + { t: 'address', v: authorization.worker }, + { t: 'bytes32', v: authorization.taskid }, + { t: 'address', v: authorization.enclave }, + ); } /* NOT EIP712 compliant */ -function hashContribution(result) -{ - return web3.utils.soliditySha3( - { t: 'bytes32', v: result.hash }, - { t: 'bytes32', v: result.seal }, - ); +function hashContribution(result) { + return web3.utils.soliditySha3( + { t: 'bytes32', v: result.hash }, + { t: 'bytes32', v: result.seal }, + ); } -function signAuthorization(obj, wallet) -{ - return signMessage(obj, hashAuthorization(obj), wallet); +function signAuthorization(obj, wallet) { + return signMessage(obj, hashAuthorization(obj), wallet); } -function signContribution(obj, wallet) -{ - return signMessage(obj, hashContribution (obj), wallet); +function signContribution(obj, wallet) { + return signMessage(obj, hashContribution(obj), wallet); } -function hashByteResult(taskid, byteresult) -{ - return { - digest: byteresult, - hash: web3.utils.soliditySha3({ t: 'bytes32', v: taskid }, { t: 'bytes32', v: byteresult }), - }; +function hashByteResult(taskid, byteresult) { + return { + digest: byteresult, + hash: web3.utils.soliditySha3({ t: 'bytes32', v: taskid }, { t: 'bytes32', v: byteresult }), + }; } -function sealByteResult(taskid, byteresult, address) -{ - return { - digest: byteresult, - hash: web3.utils.soliditySha3( { t: 'bytes32', v: taskid }, { t: 'bytes32', v: byteresult }), - seal: web3.utils.soliditySha3({ t: 'address', v: address }, { t: 'bytes32', v: taskid }, { t: 'bytes32', v: byteresult }), - }; +function sealByteResult(taskid, byteresult, address) { + return { + digest: byteresult, + hash: web3.utils.soliditySha3({ t: 'bytes32', v: taskid }, { t: 'bytes32', v: byteresult }), + seal: web3.utils.soliditySha3( + { t: 'address', v: address }, + { t: 'bytes32', v: taskid }, + { t: 'bytes32', v: byteresult }, + ), + }; } -function hashResult(taskid, result) -{ - return hashByteResult(taskid, web3.utils.soliditySha3({t: 'string', v: result })); +function hashResult(taskid, result) { + return hashByteResult(taskid, web3.utils.soliditySha3({ t: 'string', v: result })); } -function sealResult(taskid, result, address) -{ - return sealByteResult(taskid, web3.utils.soliditySha3({t: 'string', v: result }), address); +function sealResult(taskid, result, address) { + return sealByteResult(taskid, web3.utils.soliditySha3({ t: 'string', v: result }), address); } -async function requestToDeal(IexecClerk, requestHash) -{ - let idx = 0; - let dealids = []; - while (true) - { - let dealid = web3.utils.soliditySha3({ t: 'bytes32', v: requestHash }, { t: 'uint256', v: idx }); - let deal = await IexecClerk.viewDeal(dealid); - if (deal.botSize == 0) - { - return dealids; - } - else - { - dealids.push(dealid); - idx += deal.botSize; - } - } +async function requestToDeal(IexecClerk, requestHash) { + let idx = 0; + let dealids = []; + while (true) { + let dealid = web3.utils.soliditySha3( + { t: 'bytes32', v: requestHash }, + { t: 'uint256', v: idx }, + ); + let deal = await IexecClerk.viewDeal(dealid); + if (deal.botSize == 0) { + return dealids; + } else { + dealids.push(dealid); + idx += deal.botSize; + } + } } - - - /***************************************************************************** * MOCK AGENT * *****************************************************************************/ -class iExecAgent -{ - constructor(iexec, account) - { - this.iexec = iexec; - this.wallet = account - ? { address: account } - : web3.eth.accounts.create(); - this.address = this.wallet.address; - } - async domain() { return await this.iexec.domain(); } - async signMessage (obj, hash) { return signMessage(obj, hash, this.wallet); } - async signAppOrder (struct) { return signStruct("AppOrder", struct, await this.domain(), this.wallet); } - async signDatasetOrder (struct) { return signStruct("DatasetOrder", struct, await this.domain(), this.wallet); } - async signWorkerpoolOrder (struct) { return signStruct("WorkerpoolOrder", struct, await this.domain(), this.wallet); } - async signRequestOrder (struct) { return signStruct("RequestOrder", struct, await this.domain(), this.wallet); } - async signAppOrderOperation (struct) { return signStruct("AppOrderOperation", struct, await this.domain(), this.wallet); } - async signDatasetOrderOperation (struct) { return signStruct("DatasetOrderOperation", struct, await this.domain(), this.wallet); } - async signWorkerpoolOrderOperation(struct) { return signStruct("WorkerpoolOrderOperation", struct, await this.domain(), this.wallet); } - async signRequestOrderOperation (struct) { return signStruct("RequestOrderOperation", struct, await this.domain(), this.wallet); } +class iExecAgent { + constructor(iexec, account) { + this.iexec = iexec; + this.wallet = account ? { address: account } : web3.eth.accounts.create(); + this.address = this.wallet.address; + } + async domain() { + return await this.iexec.domain(); + } + async signMessage(obj, hash) { + return signMessage(obj, hash, this.wallet); + } + async signAppOrder(struct) { + return signStruct('AppOrder', struct, await this.domain(), this.wallet); + } + async signDatasetOrder(struct) { + return signStruct('DatasetOrder', struct, await this.domain(), this.wallet); + } + async signWorkerpoolOrder(struct) { + return signStruct('WorkerpoolOrder', struct, await this.domain(), this.wallet); + } + async signRequestOrder(struct) { + return signStruct('RequestOrder', struct, await this.domain(), this.wallet); + } + async signAppOrderOperation(struct) { + return signStruct('AppOrderOperation', struct, await this.domain(), this.wallet); + } + async signDatasetOrderOperation(struct) { + return signStruct('DatasetOrderOperation', struct, await this.domain(), this.wallet); + } + async signWorkerpoolOrderOperation(struct) { + return signStruct('WorkerpoolOrderOperation', struct, await this.domain(), this.wallet); + } + async signRequestOrderOperation(struct) { + return signStruct('RequestOrderOperation', struct, await this.domain(), this.wallet); + } - async viewAccount() - { - return Object.extract(await this.iexec.viewAccount(this.wallet.address), [ 'stake', 'locked' ]).map(bn => Number(bn)); - } - async viewScore() - { - return Number(await this.iexec.viewScore(this.wallet.address)); - } + async viewAccount() { + return Object.extract(await this.iexec.viewAccount(this.wallet.address), [ + 'stake', + 'locked', + ]).map((bn) => Number(bn)); + } + async viewScore() { + return Number(await this.iexec.viewScore(this.wallet.address)); + } } /***************************************************************************** * MOCK BROKER * *****************************************************************************/ -class Broker extends iExecAgent -{ - constructor(iexec) - { - super(iexec); - } +class Broker extends iExecAgent { + constructor(iexec) { + super(iexec); + } - async initialize() - { - await this.iexec.setTeeBroker(this.wallet.address); - } + async initialize() { + await this.iexec.setTeeBroker(this.wallet.address); + } - async signAuthorization(preauth) - { - const task = await this.iexec.viewTask(preauth.taskid); - const deal = await this.iexec.viewDeal(task.dealid); - const signer = web3.eth.accounts.recover(hashAuthorization(preauth), preauth.sign); - if (signer == deal.workerpool.owner) - { - const enclaveWallet = web3.eth.accounts.create(); - const auth = await signAuthorization({ ...preauth, enclave: enclaveWallet.address }, this.wallet); - return [ auth, enclaveWallet ]; - } - else - { - return [ null, null ]; - } - } + async signAuthorization(preauth) { + const task = await this.iexec.viewTask(preauth.taskid); + const deal = await this.iexec.viewDeal(task.dealid); + const signer = web3.eth.accounts.recover(hashAuthorization(preauth), preauth.sign); + if (signer == deal.workerpool.owner) { + const enclaveWallet = web3.eth.accounts.create(); + const auth = await signAuthorization( + { ...preauth, enclave: enclaveWallet.address }, + this.wallet, + ); + return [auth, enclaveWallet]; + } else { + return [null, null]; + } + } } /***************************************************************************** * MOCK SCHEDULER * *****************************************************************************/ -class Scheduler extends iExecAgent -{ - constructor(iexec, wallet) - { - super(iexec, wallet); - } +class Scheduler extends iExecAgent { + constructor(iexec, wallet) { + super(iexec, wallet); + } - async signPreAuthorization(taskid, worker) - { - return await signAuthorization({ taskid, worker, enclave: constants.NULL.ADDRESS }, this.wallet); - } + async signPreAuthorization(taskid, worker) { + return await signAuthorization( + { taskid, worker, enclave: constants.NULL.ADDRESS }, + this.wallet, + ); + } } /***************************************************************************** * MOCK WORKER * *****************************************************************************/ -class Worker extends iExecAgent -{ - constructor(iexec, wallet) - { - super(iexec, wallet); - } +class Worker extends iExecAgent { + constructor(iexec, wallet) { + super(iexec, wallet); + } - async run(auth, enclaveWallet, result, callback) - { - const contribution = sealByteResult( - auth.taskid, - callback ? web3.utils.soliditySha3({t: 'bytes', v: callback }) : web3.utils.soliditySha3({t: 'string', v: result }), - this.wallet.address - ); - if (auth.enclave == constants.NULL.ADDRESS) // Classic - { - contribution.sign = constants.NULL.SIGNATURE; - } - else // TEE - { - await signContribution(contribution, enclaveWallet); - } - return contribution; - } + async run(auth, enclaveWallet, result, callback) { + const contribution = sealByteResult( + auth.taskid, + callback + ? web3.utils.soliditySha3({ t: 'bytes', v: callback }) + : web3.utils.soliditySha3({ t: 'string', v: result }), + this.wallet.address, + ); + if (auth.enclave == constants.NULL.ADDRESS) { + // Classic + contribution.sign = constants.NULL.SIGNATURE; + } // TEE + else { + await signContribution(contribution, enclaveWallet); + } + return contribution; + } } /***************************************************************************** * MODULE * *****************************************************************************/ module.exports = { - /* mocks */ - iExecAgent, - Scheduler, - Broker, - Worker, - /* utils */ - utils: { - signStruct, - hashStruct, - signMessage, - hashAuthorization, - hashContribution, - signAuthorization, - signContribution, - hashByteResult, - sealByteResult, - hashResult, - sealResult, - hashConsensus: hashResult, - hashAppOrder: function(domain, struct) { return hashStruct("AppOrder", struct, domain); }, - hashDatasetOrder: function(domain, struct) { return hashStruct("DatasetOrder", struct, domain); }, - hashWorkerpoolOrder: function(domain, struct) { return hashStruct("WorkerpoolOrder", struct, domain); }, - hashRequestOrder: function(domain, struct) { return hashStruct("RequestOrder", struct, domain); }, - hashAppOrderOperation: function(domain, struct) { return hashStruct("AppOrderOperation", struct, domain); }, - hashDatasetOrderOperation: function(domain, struct) { return hashStruct("DatasetOrderOperation", struct, domain); }, - hashWorkerpoolOrderOperation: function(domain, struct) { return hashStruct("WorkerpoolOrderOperation", struct, domain); }, - hashRequestOrderOperation: function(domain, struct) { return hashStruct("RequestOrderOperation", struct, domain); }, - requestToDeal, - }, + /* mocks */ + iExecAgent, + Scheduler, + Broker, + Worker, + /* utils */ + utils: { + signStruct, + hashStruct, + signMessage, + hashAuthorization, + hashContribution, + signAuthorization, + signContribution, + hashByteResult, + sealByteResult, + hashResult, + sealResult, + hashConsensus: hashResult, + hashAppOrder: function (domain, struct) { + return hashStruct('AppOrder', struct, domain); + }, + hashDatasetOrder: function (domain, struct) { + return hashStruct('DatasetOrder', struct, domain); + }, + hashWorkerpoolOrder: function (domain, struct) { + return hashStruct('WorkerpoolOrder', struct, domain); + }, + hashRequestOrder: function (domain, struct) { + return hashStruct('RequestOrder', struct, domain); + }, + hashAppOrderOperation: function (domain, struct) { + return hashStruct('AppOrderOperation', struct, domain); + }, + hashDatasetOrderOperation: function (domain, struct) { + return hashStruct('DatasetOrderOperation', struct, domain); + }, + hashWorkerpoolOrderOperation: function (domain, struct) { + return hashStruct('WorkerpoolOrderOperation', struct, domain); + }, + hashRequestOrderOperation: function (domain, struct) { + return hashStruct('RequestOrderOperation', struct, domain); + }, + requestToDeal, + }, }; diff --git a/utils/poco-tools.ts b/utils/poco-tools.ts new file mode 100644 index 000000000..ab5cd56f2 --- /dev/null +++ b/utils/poco-tools.ts @@ -0,0 +1,218 @@ +// SPDX-FileCopyrightText: 2023-2024 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { TypedDataDomain } from '@ethersproject/abstract-signer'; +import { time } from '@nomicfoundation/hardhat-network-helpers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { ethers } from 'hardhat'; +import { IexecLibOrders_v5 } from '../typechain'; +import { hashOrder } from './createOrders'; + +export interface Category { + name: string; + description: string; + workClockTimeRef: number; +} + +export enum TaskStatusEnum { + UNSET, + ACTIVE, + REVEALING, + COMPLETED, + FAILED, +} + +export enum ContributionStatusEnum { + UNSET, + CONTRIBUTED, + PROVED, + REJECTED, +} + +export enum OrderOperationEnum { + SIGN, + CLOSE, +} + +export interface IexecAccounts { + iexecAdmin: SignerWithAddress; + requester: SignerWithAddress; + sponsor: SignerWithAddress; + beneficiary: SignerWithAddress; + appProvider: SignerWithAddress; + datasetProvider: SignerWithAddress; + scheduler: SignerWithAddress; + worker: SignerWithAddress; + worker1: SignerWithAddress; + worker2: SignerWithAddress; + worker3: SignerWithAddress; + worker4: SignerWithAddress; + enclave: SignerWithAddress; + sms: SignerWithAddress; + anyone: SignerWithAddress; +} + +export async function getIexecAccounts(): Promise { + const signers = await ethers.getSigners(); + return { + iexecAdmin: signers[0], + requester: signers[1], + sponsor: signers[2], + beneficiary: signers[3], + appProvider: signers[4], + datasetProvider: signers[5], + scheduler: signers[6], + worker: signers[7], // same as worker1 + worker1: signers[7], + worker2: signers[8], + worker3: signers[9], + worker4: signers[10], + enclave: signers[11], + sms: signers[12], + anyone: signers[13], + }; +} + +export function getDealId( + domain: TypedDataDomain, + requestOrder: IexecLibOrders_v5.RequestOrderStruct, + taskIndex: number = 0, +): string { + return ethers.utils.solidityKeccak256( + ['bytes32', 'uint256'], + [hashOrder(domain, requestOrder), taskIndex], + ); +} + +export function getTaskId(dealId: string, taskIndex: number): string { + return ethers.utils.solidityKeccak256(['bytes32', 'uint256'], [dealId, taskIndex]); +} + +export async function buildAndSignContributionAuthorizationMessage( + worker: string, + taskId: string, + enclave: string, + authorizer: SignerWithAddress, +) { + const schedulerMessage = buildContributionAuthorizationMessage(worker, taskId, enclave); + return await signMessage(authorizer, schedulerMessage); +} + +function buildContributionAuthorizationMessage( + workerAddress: string, + taskId: string, + enclaveAddress: string, +) { + return ethers.utils.solidityKeccak256( + ['address', 'bytes32', 'address'], + [workerAddress, taskId, enclaveAddress], + ); +} + +export function buildUtf8ResultAndDigest(resultPayload: string) { + const results = ethers.utils.toUtf8Bytes(resultPayload); + const resultDigest = ethers.utils.keccak256(results); + return { results, resultDigest }; +} + +/** + * See `buildResultCallbackAndDigestForIntegerOracle` method. + * Build a default date internally for a lighter usage from caller. + */ +export function buildResultCallbackAndDigest(oracleCallValue: number) { + return buildResultCallbackAndDigestForIntegerOracle( + new Date(1672531200 * 1000), // random date (January 1, 2023 12:00:00 AM) + oracleCallValue, + ); +} + +/** + * Build callback and digest for an oracle accepting integer values + * (e.g: price oracle). + * + * @param oracleCallDate date when the value was obtained + * @param oracleCallValue oracle call value to report + * @returns result callback to forward and result digest required for later + * signature + */ +export function buildResultCallbackAndDigestForIntegerOracle( + oracleCallDate: Date, + oracleCallValue: number, +) { + const resultsCallback = ethers.utils.solidityPack( + ['uint256', 'uint256'], + [oracleCallDate.getTime(), oracleCallValue], + ); + const callbackResultDigest = ethers.utils.keccak256(resultsCallback); + return { resultsCallback, callbackResultDigest }; +} + +export function buildResultHash(taskId: string, resultDigest: string) { + return ethers.utils.solidityKeccak256(['bytes32', 'bytes'], [taskId, resultDigest]); +} + +export function buildResultHashAndResultSeal( + taskId: string, + resultDigest: string, + worker: SignerWithAddress, +) { + const resultHash = buildResultHash(taskId, resultDigest); + const resultSeal = ethers.utils.solidityKeccak256( + ['address', 'bytes32', 'bytes'], + [worker.address, taskId, resultDigest], + ); + return { resultHash, resultSeal }; +} + +/** + * Build & sign enclave message in Poco Classic mode. + */ +export async function buildAndSignPocoClassicEnclaveMessage( + resultHash: string, + resultSeal: string, + enclave: SignerWithAddress, +) { + return await signMessage( + enclave, + ethers.utils.solidityKeccak256(['bytes32', 'bytes32'], [resultHash, resultSeal]), + ); +} + +/** + * Build & sign enclave message in Poco Boost mode. + */ +//TODO: Harmonize naming of buildAndSignEnclaveMessage in Classic & Boost modes +export async function buildAndSignEnclaveMessage( + workerAddress: string, + taskId: string, + resultDigest: string, + enclave: SignerWithAddress, +) { + const enclaveMessage = buildEnclaveMessage(workerAddress, taskId, resultDigest); + return await signMessage(enclave, enclaveMessage); +} + +function buildEnclaveMessage(workerAddress: string, taskId: string, resultDigest: string) { + return ethers.utils.solidityKeccak256( + ['address', 'bytes32', 'bytes32'], + [workerAddress, taskId, resultDigest], + ); +} + +export async function signMessage(signerAccount: SignerWithAddress, message: string) { + return signerAccount.signMessage(ethers.utils.arrayify(message)); +} + +/** + * Mine the next block with a timestamp corresponding to an arbitrary but known + * date in the future (10 seconds later). + * It fixes the `Timestamp is lower than the previous block's timestamp` error. + * Originally this method was a fix for UT but then it has been also used for IT. + * e.g: This Error has been seen when running tests with `npm run coverage`. + * @returns timestamp of the next block. + */ +export async function setNextBlockTimestamp() { + const startTime = (await time.latest()) + 10; + await time.setNextBlockTimestamp(startTime); + return startTime; +} diff --git a/utils/tools.d.ts b/utils/tools.d.ts new file mode 100644 index 000000000..81a29e778 --- /dev/null +++ b/utils/tools.d.ts @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: 2023 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 + +import { BigNumber } from '@ethersproject/bignumber'; +import { ContractReceipt, Event } from '@ethersproject/contracts'; + +export function extractEventsFromReceipt( + txReceipt: ContractReceipt, + address: string, + name: string, +): Event[]; + +export function compactSignature(signature: string): string; +export function BN2Address(n: BigNumber): string; diff --git a/utils/tools.js b/utils/tools.js index 3f9f5c842..f59d1ca76 100644 --- a/utils/tools.js +++ b/utils/tools.js @@ -1,49 +1,49 @@ -/****************************************************************************** - * Copyright 2020 IEXEC BLOCKCHAIN TECH * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - ******************************************************************************/ +// SPDX-FileCopyrightText: 2020 IEXEC BLOCKCHAIN TECH +// SPDX-License-Identifier: Apache-2.0 const { ethers } = require('ethers'); +function _extractEvents(data, address, name) { + const events = data.filter((ev) => { + return ev.address == address && ev.event == name; + }); + assert.isNotEmpty(events, `Fail to extract '${name}' event`); + return events; +} + module.exports = { - extractEvents: function(txMined, address, name) - { - return txMined.logs.filter((ev) => { return ev.address == address && ev.event == name }); - }, + extractEvents: function (txMined, address, name) { + return _extractEvents(txMined.logs, address, name); + }, - BN2Address: function(n) - { - const x = web3.utils.toHex(n) - return web3.utils.toChecksumAddress('0x' + "0".repeat(42 - x.length) + x.slice(2)) - }, + extractEventsFromReceipt: function (txReceipt, address, name) { + return _extractEvents(txReceipt.events, address, name); + }, - create2: function(creator, code, salt) - { - return web3.utils.toChecksumAddress(web3.utils.soliditySha3( - { t: 'bytes1', v: '0xff' }, - { t: 'address', v: creator }, - { t: 'bytes32', v: salt }, - { t: 'bytes32', v: web3.utils.keccak256(code) }, - ).slice(26)); - }, + BN2Address: function (n) { + const x = web3.utils.toHex(n); + return web3.utils.toChecksumAddress('0x' + '0'.repeat(42 - x.length) + x.slice(2)); + }, - compactSignature: function(signature) - { - let split = ethers.utils.splitSignature(signature); - let vs = ethers.utils.arrayify(split.s); - if (split.v == 1 || split.v == 28) { vs[0] |= 0x80; } - return ethers.utils.hexlify(ethers.utils.concat([ split.r, vs ])); - }, + create2: function (creator, code, salt) { + return web3.utils.toChecksumAddress( + web3.utils + .soliditySha3( + { t: 'bytes1', v: '0xff' }, + { t: 'address', v: creator }, + { t: 'bytes32', v: salt }, + { t: 'bytes32', v: web3.utils.keccak256(code) }, + ) + .slice(26), + ); + }, + compactSignature: function (signature) { + let split = ethers.utils.splitSignature(signature); + let vs = ethers.utils.arrayify(split.s); + if (split.v == 1 || split.v == 28) { + vs[0] |= 0x80; + } + return ethers.utils.hexlify(ethers.utils.concat([split.r, vs])); + }, }; diff --git a/verify.sh b/verify.sh index 2df693333..adb14f027 100755 --- a/verify.sh +++ b/verify.sh @@ -1,3 +1,5 @@ +# TODO migrate + #!/usr/bin/env bash NETWORKS=(