From c582e58f691cc0cc7df1c85b6ac07267f8861520 Mon Sep 17 00:00:00 2001 From: Aloysius Chan Date: Wed, 27 Mar 2024 14:14:11 -0700 Subject: [PATCH] Modernize development environment Co-authored-by: Yvonne Zhang Co-authored-by: Alex Kroeger --- .babelrc | 3 - .env.example | 78 + .eslintignore | 16 +- .eslintrc.js | 6 +- .github/composite-actions/setup-ci/action.yml | 52 + .github/resources/coverage-report-template.md | 33 + .github/workflows/ci.yml | 93 +- .github/workflows/coverage.yml | 60 + .gitignore | 34 +- .gitmodules | 7 +- .licenseignore | 3 + .prettierignore | 19 +- .solcover.js | 14 +- .vscode/settings.json | 5 +- @types/AnyFiatTokenV2Instance.d.ts | 20 +- @types/TransactionRawLog.d.ts | 6 +- README.md | 70 +- SECURITY.md | 8 + blacklist.test.json | 8 - config.js.example | 57 - contracts/Migrations.sol | 41 - contracts/interface/IERC1271.sol | 6 +- contracts/minting/Controller.sol | 6 +- contracts/minting/MasterMinter.sol | 6 +- contracts/minting/MintController.sol | 6 +- .../minting/MinterManagementInterface.sol | 6 +- .../test/ContractThatCallsPublicFunctions.sol | 6 +- contracts/test/ContractThatReverts.sol | 6 +- .../test/ContractWithExternalFunctions.sol | 6 +- .../test/ContractWithPublicFunctions.sol | 6 +- contracts/test/DummyERC20.sol | 6 +- contracts/test/ECRecoverTest.sol | 6 +- contracts/test/EIP712Test.sol | 6 +- contracts/test/MessageHashUtilsTest.sol | 6 +- contracts/test/MockERC1271Wallet.sol | 6 +- ...nWithEditableBalanceAndBlacklistStates.sol | 6 +- .../test/MockFiatTokenWithEditableChainId.sol | 6 +- ...UpgradedFiatTokenNewFieldsNewLogicTest.sol | 6 +- .../test/UpgradedFiatTokenNewFieldsTest.sol | 6 +- contracts/test/UpgradedFiatTokenV2_2.sol | 29 - .../UpgradedFiatTokenV2_2NewFieldsTest.sol | 6 +- .../AdminUpgradeabilityProxy.sol | 6 +- contracts/upgradeability/Proxy.sol | 6 +- .../upgradeability/UpgradeabilityProxy.sol | 6 +- contracts/util/ECRecover.sol | 6 +- contracts/util/EIP712.sol | 6 +- contracts/util/MessageHashUtils.sol | 6 +- contracts/util/SignatureChecker.sol | 6 +- contracts/v1.1/FiatTokenV1_1.sol | 6 +- contracts/v1.1/Rescuable.sol | 6 +- contracts/v1/AbstractFiatTokenV1.sol | 6 +- contracts/v1/Blacklistable.sol | 6 +- contracts/v1/FiatTokenProxy.sol | 6 +- contracts/v1/FiatTokenV1.sol | 6 +- contracts/v2/AbstractFiatTokenV2.sol | 6 +- contracts/v2/EIP2612.sol | 6 +- contracts/v2/EIP3009.sol | 6 +- contracts/v2/EIP712Domain.sol | 6 +- contracts/v2/FiatTokenUtil.sol | 6 +- contracts/v2/FiatTokenV2.sol | 6 +- contracts/v2/FiatTokenV2_1.sol | 6 +- contracts/v2/FiatTokenV2_2.sol | 6 +- contracts/v2/upgrader/AbstractV2Upgrader.sol | 6 +- contracts/v2/upgrader/V2Upgrader.sol | 6 +- contracts/v2/upgrader/V2_1Upgrader.sol | 6 +- contracts/v2/upgrader/V2_2Upgrader.sol | 6 +- .../helpers/AbstractUpgraderHelper.sol | 6 +- .../v2/upgrader/helpers/V2UpgraderHelper.sol | 6 +- .../upgrader/helpers/V2_2UpgraderHelper.sol | 6 +- doc/bridged_USDC_standard.md | 244 +- doc/v2.1_upgrade.md | 68 - doc/v2.2_upgrade.md | 176 +- doc/v2_upgrade.md | 68 - echidna_tests/README.md | 40 - echidna_tests/config.yaml | 33 - echidna_tests/negative.sol | 75 - echidna_tests/positive.sol | 98 - stop-ganache.sh => flatten-generated-types.sh | 25 +- foundry.toml | 35 + hardhat.config.ts | 103 + lib/forge-std | 1 + migrations/direct/1_initial_migration.js | 23 - .../2_deploy_implementation_and_proxy.js | 179 - .../versioned/10_deploy_master_minter.js | 58 - migrations/versioned/1_initial_migration.js | 23 - migrations/versioned/2_deploy_v1.js | 136 - migrations/versioned/3_deploy_v2.js | 84 - migrations/versioned/4_deploy_v2_upgrader.js | 73 - migrations/versioned/5_deploy_v2_1.js | 77 - .../versioned/6_deploy_v2_1_upgrader.js | 78 - migrations/versioned/7_deploy_v2_2.js | 78 - .../versioned/8_deploy_v2_2_upgrader.js | 89 - .../versioned/9_deploy_erc1271_wallet.js | 55 - package.json | 64 +- scripts/callContractROFunctions.js | 137 - scripts/deploy/DeployImpl.sol | 66 + scripts/deploy/deploy-fiat-token.s.sol | 174 + scripts/deploy/deploy-impl-and-upgrader.s.sol | 121 + scripts/deploy/deploy-master-minter.s.sol | 64 + scripts/getBlacklistedAccounts.js | 218 - scripts/getContractCreationBlock.js | 106 - scripts/git/diff-check.sh | 6 +- scripts/git/rebase.sh | 10 +- .../hardhat/downloadBlacklistedAccounts.ts | 193 + scripts/hardhat/getContractCreationBlock.ts | 100 + scripts/hardhat/hardhatArgumentTypes.ts | 60 + .../hardhat/helpers.ts | 18 +- scripts/hardhat/readValuesFromContract.ts | 116 + .../hardhat/validateAccountsToBlacklist.ts | 178 + scripts/hardhat/verifyBytecodeOnChain.ts | 180 + scripts/validateAccountsToBlacklist.js | 206 - setup.sh | 48 + slither.config.json | 3 - start-ganache.sh | 115 - test/helpers/constants.ts | 132 +- test/helpers/index.ts | 36 +- test/helpers/storageSlots.behavior.ts | 234 +- test/minting/AccountUtils.js | 10 +- test/minting/ControllerTestUtils.js | 6 +- test/minting/MintControllerTests.js | 10 +- test/minting/MintControllerUtils.js | 6 +- test/minting/MintP0_ArgumentTests.js | 10 +- test/minting/MintP0_BasicTests.js | 10 +- test/minting/MintP0_EndToEndTests.js | 10 +- test/minting/MintP0_EventsTests.js | 6 +- test/misc/gas.ts | 325 ++ test/misc/publicToExternal.test.ts | 13 +- test/scripts/deploy/TestUtils.sol | 84 + test/scripts/deploy/deploy-fiat-token.t.sol | 81 + .../deploy/deploy-impl-and-upgrader.t.sol | 77 + .../scripts/deploy/deploy-master-minter.t.sol | 47 + test/util/ECRecover.test.ts | 10 +- test/util/EIP712Test.ts | 18 +- test/util/MessageHashUtils.test.ts | 8 +- test/util/SignatureChecker.test.ts | 24 +- test/v1.1/FiatTokenV1_1.test.ts | 19 +- test/v1.1/Rescuable.behavior.ts | 26 +- test/v1.1/Rescuable.test.ts | 12 +- test/v1/FiatTokenV1.test.ts | 9 +- test/v1/Pausable.test.js | 8 +- test/v1/TokenTestUtils.js | 38 +- test/v1/abiHacking.test.js | 149 +- test/v1/events.test.js | 8 +- test/v1/extendedPositive.test.js | 8 +- test/v1/helpers/abi.js | 41 +- test/v1/helpers/tokenTest.js | 55 +- test/v1/helpers/wrapTests.js | 37 +- test/v1/legacy.test.js | 34 +- test/v1/misc.test.js | 11 +- test/v1/negative.test.js | 25 +- test/v1/positive.test.js | 8 +- test/v1/proxyNegative.test.js | 11 +- test/v1/proxyPositive.test.js | 39 +- test/v2/FiatTokenV2.test.ts | 93 +- test/v2/FiatTokenV2_1.test.ts | 29 +- test/v2/FiatTokenV2_2.test.ts | 221 +- .../GasAbstraction/GasAbstraction.behavior.ts | 6 +- test/v2/GasAbstraction/helpers.ts | 12 +- .../GasAbstraction/testCancelAuthorization.ts | 26 +- test/v2/GasAbstraction/testPermit.ts | 20 +- .../testReceiveWithAuthorization.ts | 30 +- .../testTransferWithAuthorization.ts | 30 +- .../testTransferWithMultipleAuthorizations.ts | 21 +- ...hEditableBalanceAndBlacklistStates.test.ts | 33 +- .../MockFiatTokenWithEditableChainId.test.ts | 23 +- test/v2/V2Upgrader.test.ts | 64 +- test/v2/V2_1Upgrader.test.ts | 67 +- test/v2/V2_2Upgrader.test.ts | 87 +- test/v2/safeAllowance.behavior.ts | 20 +- test/v2/v2.behavior.ts | 92 + test/v2/v2_2.behavior.ts | 202 + truffle-config.js | 93 - tsconfig.json | 2 +- utils.js | 6 +- validate/FiatTokenProxy.etherscan | 329 -- validate/FiatTokenV1.etherscan | 606 -- validate/MasterMinter.etherscan | 561 -- validate/README.contractDiff.md | 57 - validate/README.validate.md | 32 - validate/contractDiff.js | 137 - validate/validate.js | 171 - verification/GoogleSheets/index.js | 275 - verification/README.verification.txt | 102 - verification/verification_reporter.js | 324 -- yarn.lock | 5061 ++++++++++------- 185 files changed, 7220 insertions(+), 8353 deletions(-) delete mode 100644 .babelrc create mode 100644 .env.example create mode 100644 .github/composite-actions/setup-ci/action.yml create mode 100644 .github/resources/coverage-report-template.md create mode 100644 .github/workflows/coverage.yml create mode 100644 .licenseignore create mode 100644 SECURITY.md delete mode 100644 blacklist.test.json delete mode 100644 config.js.example delete mode 100644 contracts/Migrations.sol delete mode 100644 contracts/test/UpgradedFiatTokenV2_2.sol delete mode 100644 doc/v2.1_upgrade.md delete mode 100644 doc/v2_upgrade.md delete mode 100644 echidna_tests/README.md delete mode 100644 echidna_tests/config.yaml delete mode 100644 echidna_tests/negative.sol delete mode 100644 echidna_tests/positive.sol rename stop-ganache.sh => flatten-generated-types.sh (53%) create mode 100644 foundry.toml create mode 100644 hardhat.config.ts create mode 160000 lib/forge-std delete mode 100644 migrations/direct/1_initial_migration.js delete mode 100644 migrations/direct/2_deploy_implementation_and_proxy.js delete mode 100644 migrations/versioned/10_deploy_master_minter.js delete mode 100644 migrations/versioned/1_initial_migration.js delete mode 100644 migrations/versioned/2_deploy_v1.js delete mode 100644 migrations/versioned/3_deploy_v2.js delete mode 100644 migrations/versioned/4_deploy_v2_upgrader.js delete mode 100644 migrations/versioned/5_deploy_v2_1.js delete mode 100644 migrations/versioned/6_deploy_v2_1_upgrader.js delete mode 100644 migrations/versioned/7_deploy_v2_2.js delete mode 100644 migrations/versioned/8_deploy_v2_2_upgrader.js delete mode 100644 migrations/versioned/9_deploy_erc1271_wallet.js delete mode 100644 scripts/callContractROFunctions.js create mode 100644 scripts/deploy/DeployImpl.sol create mode 100644 scripts/deploy/deploy-fiat-token.s.sol create mode 100644 scripts/deploy/deploy-impl-and-upgrader.s.sol create mode 100644 scripts/deploy/deploy-master-minter.s.sol delete mode 100644 scripts/getBlacklistedAccounts.js delete mode 100644 scripts/getContractCreationBlock.js create mode 100644 scripts/hardhat/downloadBlacklistedAccounts.ts create mode 100644 scripts/hardhat/getContractCreationBlock.ts create mode 100644 scripts/hardhat/hardhatArgumentTypes.ts rename contracts/test/UpgradedFiatToken.sol => scripts/hardhat/helpers.ts (64%) create mode 100644 scripts/hardhat/readValuesFromContract.ts create mode 100644 scripts/hardhat/validateAccountsToBlacklist.ts create mode 100644 scripts/hardhat/verifyBytecodeOnChain.ts delete mode 100644 scripts/validateAccountsToBlacklist.js create mode 100755 setup.sh delete mode 100644 slither.config.json delete mode 100755 start-ganache.sh create mode 100644 test/misc/gas.ts create mode 100644 test/scripts/deploy/TestUtils.sol create mode 100644 test/scripts/deploy/deploy-fiat-token.t.sol create mode 100644 test/scripts/deploy/deploy-impl-and-upgrader.t.sol create mode 100644 test/scripts/deploy/deploy-master-minter.t.sol create mode 100644 test/v2/v2.behavior.ts create mode 100644 test/v2/v2_2.behavior.ts delete mode 100644 truffle-config.js delete mode 100644 validate/FiatTokenProxy.etherscan delete mode 100644 validate/FiatTokenV1.etherscan delete mode 100644 validate/MasterMinter.etherscan delete mode 100644 validate/README.contractDiff.md delete mode 100644 validate/README.validate.md delete mode 100644 validate/contractDiff.js delete mode 100644 validate/validate.js delete mode 100644 verification/GoogleSheets/index.js delete mode 100644 verification/README.verification.txt delete mode 100644 verification/verification_reporter.js diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 0a3aa4659..000000000 --- a/.babelrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "presets": ["es2015", "stage-2", "stage-3", "env"] -} diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..544add783 --- /dev/null +++ b/.env.example @@ -0,0 +1,78 @@ +# Copyright 2024 Circle Internet Financial, LTD. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +############################## +# Private Key Configurations # +##############################= +# The key to a pre-funded deployer address +DEPLOYER_PRIVATE_KEY= + +############################ +# FiatToken Configurations # +############################ +# The ERC20 name of the FiatToken. +TOKEN_NAME=USDC + +# The ERC20 symbol of the FiatToken. +TOKEN_SYMBOL=USDC + +# The fiat currency that that FiatToken represents. +TOKEN_CURRENCY=USD + +# The ERC20 decimals for the FiatToken. +TOKEN_DECIMALS=6 + +# [OPTIONAL] The address to a deployed FiatTokenProxy contract. +# FIAT_TOKEN_PROXY_ADDRESS= + +# [OPTIONAL] The address to a deployed FiatToken implementation contract. +# FIAT_TOKEN_IMPLEMENTATION_ADDRESS= + +# The address of the FiatTokenProxy's admin. +PROXY_ADMIN_ADDRESS= + +# The address of the FiatToken's owner. +OWNER_ADDRESS= + +# The address of the MasterMinter's owner. +MASTER_MINTER_OWNER_ADDRESS= + +# [OPTIONAL] The address of the FiatToken's pauser. Defaults to the owner address. +# PAUSER_ADDRESS= + +# [OPTIONAL] The address of the FiatToken's blacklister. Defaults to the owner address. +# BLACKLISTER_ADDRESS= + +# [OPTIONAL] The address to which locked funds are sent to. Only applicable for version 2 -> 2.1 upgrades. Defaults to the owner address. +# LOST_AND_FOUND_ADDRESS= + +########################## +# Network Configurations # +########################## +# [OPTIONAL] The URL to a mainnet JSON-RPC node. +# MAINNET_RPC_URL= + +# [OPTIONAL] The URL to a testnet JSON-RPC node. +# TESTNET_RPC_URL= + +# The percentage to multiply gas usage estimations by (eg. 200 to double the estimation). Defaults to 130. +GAS_MULTIPLIER=110 + +################################ +# Miscellaneous Configurations # +################################ +# [OPTIONAL] The API key to an Etherscan flavor block explorer. +# ETHERSCAN_KEY= diff --git a/.eslintignore b/.eslintignore index 6fb3e25a1..87892309b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,16 @@ -.DS_Store +.idea/ +**/.DS_Store + +artifacts/ +cache/ +@types/generated/ + node_modules/ +yarn-error.log + coverage/ -@types/generated/ +coverage.json + +blacklist.*.json + +LICENSE diff --git a/.eslintrc.js b/.eslintrc.js index 974aad2c0..c0f2eb1ed 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/.github/composite-actions/setup-ci/action.yml b/.github/composite-actions/setup-ci/action.yml new file mode 100644 index 000000000..f07d4cda0 --- /dev/null +++ b/.github/composite-actions/setup-ci/action.yml @@ -0,0 +1,52 @@ +# Copyright 2024 Circle Internet Financial, LTD. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +name: Setup CI +runs: + using: composite + steps: + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: "16.14.0" + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + + - name: Update submodules + run: git submodule update --init --recursive + shell: bash + + - name: Install Yarn + run: npm install -g yarn@1.22.19 + shell: bash + + - name: Get Yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + shell: bash + + - name: Retrieve cache + uses: actions/cache@v3 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install packages & Setup repository + run: yarn install --frozen-lockfile + shell: bash diff --git a/.github/resources/coverage-report-template.md b/.github/resources/coverage-report-template.md new file mode 100644 index 000000000..9a0c5ddc0 --- /dev/null +++ b/.github/resources/coverage-report-template.md @@ -0,0 +1,33 @@ + + +## Coverage Report + +Commit: [{{short_commit_sha}}]({{commit_link}}) + +| Type | Coverage | +| ------------------------- | ------------------------------------- | +| Total Statements Coverage | {{total_statements_coverage_percent}} | +| Total Branches Coverage | {{total_branches_coverage_percent}} | +| Total Functions Coverage | {{total_functions_coverage_percent}} | +| Total Lines Coverage | {{total_lines_coverage_percent}} | + +
+Details +{{files_coverage_table}} +
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a5f25827..648bdabf0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,20 @@ -name: Continuous Integration +# Copyright 2024 Circle Internet Financial, LTD. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +name: CI on: push: branches: [master] @@ -11,19 +27,11 @@ jobs: - name: Check out repository code uses: actions/checkout@v3 - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: "16.14.0" - - - name: Install Yarn - run: npm install -g yarn@1.22.19 + - name: Setup CI Environment + uses: ./.github/composite-actions/setup-ci - - name: Install packages - run: yarn install --frozen-lockfile - - - name: Setup local environment - run: cp config.js.example config.js && ./start-ganache.sh + - name: Compile contracts + run: yarn compile - name: Run static checks run: yarn static-check @@ -31,15 +39,66 @@ jobs: - name: Run size check run: yarn contract-size - - name: Run tests - run: yarn test + - name: Run forge tests + run: forge test + + - name: Generate gas report + run: yarn gas-report + env: + ENABLE_GAS_REPORTER: true + + run_hardhat_tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + test-groups: + - grep: "FiatTokenV1:.*" + - grep: "FiatTokenV1_1:.*" + - grep: "FiatTokenV2:.*" + - grep: "FiatTokenV2_1:.*" + - grep: "FiatTokenV2_2:.*" + - grep: "FiatTokenV1:.*|FiatTokenV1_1:.*|FiatTokenV2:.*|FiatTokenV2_1:.*|FiatTokenV2_2:.*|gas costs" + invert: true + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Setup CI Environment + uses: ./.github/composite-actions/setup-ci + + - name: Run hardhat tests + run: HARDHAT_TEST_GREP='${{ matrix.test-groups.grep }}' HARDHAT_TEST_INVERT='${{ matrix.test-groups.invert }}' yarn test + + - name: Upload test results to artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: junit-report-${{ hashFiles('report/junit.xml') }} + path: report/junit.xml + + post_run_hardhat_tests: + runs-on: ubuntu-latest + needs: [run_hardhat_tests] + if: always() + steps: + - name: Download test results + uses: actions/download-artifact@v4 + with: + pattern: junit-report-* + + - name: Publish combined test report + uses: mikepenz/action-junit-report@v4 + with: + check_name: upload_test_results + job_summary: true + detailed_summary: true + report_paths: "./junit-report-*/junit.xml" scan: - needs: run_ci_tests if: github.event_name == 'pull_request' uses: circlefin/circle-public-github-workflows/.github/workflows/pr-scan.yaml@v1 release-sbom: - needs: run_ci_tests if: github.event_name == 'push' uses: circlefin/circle-public-github-workflows/.github/workflows/attach-release-assets.yaml@v1 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..0bbc91c7f --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,60 @@ +# Copyright 2024 Circle Internet Financial, LTD. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +name: Coverage +on: + pull_request: + types: [labeled] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + run_coverage: + runs-on: ubuntu-latest + if: ${{ github.event.label.name == 'needs_coverage' }} + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Setup CI Environment + uses: ./.github/composite-actions/setup-ci + + - name: Compile contracts + run: yarn compile + + - name: Run coverage + run: yarn coverage + + - name: Report coverage to PR + id: report-coverage + uses: sidx1024/report-nyc-coverage-github-action@v1.2.7 + with: + coverage_file: "coverage/coverage-summary.json" + base_coverage_file: "" + comment_template_file: ".github/resources/coverage-report-template.md" + + - name: Check coverage + if: | + fromJSON(steps.report-coverage.outputs.total_lines_coverage_percent_raw) < 100 || + fromJSON(steps.report-coverage.outputs.total_branches_coverage_percent_raw) < 98 || + fromJSON(steps.report-coverage.outputs.total_statements_coverage_percent_raw) < 100 || + fromJSON(steps.report-coverage.outputs.total_functions_coverage_percent_raw) < 100 + uses: actions/github-script@v7 + with: + script: | + core.setFailed('Test coverage is under the threshold') diff --git a/.gitignore b/.gitignore index b929e43d0..bf0ca40d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,29 +1,17 @@ -.DS_Store -build/ -node_modules/ -coverage/ -coverage.json -package-lock.json .idea/ +.env* +!.env.example +**/.DS_Store + artifacts/ -contracts/.DS_Store -token.json -credentials.json -echidna/ -validate/apikey.infura -ganache-blockchain-log.txt -.coverage_artifacts -.coverage_contracts -@types/generated/ -config.js -blacklist.*.json -!blacklist.test.json -out/ +broadcast/ cache/ +@types/generated/ -# Yarn & Node Modules -yarn-error.log node_modules/ +yarn-error.log + +coverage/ +coverage.json -logs/ -pids/ +blacklist.*.json diff --git a/.gitmodules b/.gitmodules index bf1389467..281fbe379 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ -[submodule "echidna"] - path = echidna - url = git@github.com:trailofbits/echidna.git +[submodule "lib/forge-std"] + path = lib/forge-std + url = https://github.com/foundry-rs/forge-std + ignore = dirty diff --git a/.licenseignore b/.licenseignore new file mode 100644 index 000000000..45cef508b --- /dev/null +++ b/.licenseignore @@ -0,0 +1,3 @@ +pkg:npm/pako +pkg:npm/highlightjs-solidity +pkg:npm/ethereum-ens diff --git a/.prettierignore b/.prettierignore index e21033ef9..ea2c3c9be 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,9 +1,18 @@ -.DS_Store +.idea/ +**/.DS_Store + +artifacts/ +cache/ +broadcast/ +@types/generated/ + node_modules/ +lib/ +yarn-error.log + coverage/ coverage.json -@types/generated/ -build/ -.coverage_contracts/ -.coverage_artifacts/ + +blacklist.*.json + LICENSE diff --git a/.solcover.js b/.solcover.js index 30a3b29db..ab6fb6eda 100644 --- a/.solcover.js +++ b/.solcover.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -17,12 +17,6 @@ */ module.exports = { - providerOptions: { - port: 8555, - seed: "TestRPC is awesome!", - total_accounts: 15, - default_balance_ether: 1000000, - }, skipFiles: ["test/", "v2/upgrader/"], - copyPackages: ["openzeppelin-solidity", "zos-lib"], + istanbulReporter: ["text", "json-summary"], }; diff --git a/.vscode/settings.json b/.vscode/settings.json index ebce079ab..72c0bf191 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -25,7 +25,8 @@ }, "typescript.tsdk": "node_modules/typescript/lib", "licenser.license": "Custom", - "licenser.customHeader": "SPDX-License-Identifier: Apache-2.0\n\nCopyright (c) @YEAR@, Circle Internet Financial, LLC.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.", + "licenser.customHeader": "Copyright @YEAR@ Circle Internet Financial, LTD. All rights reserved.\n\nSPDX-License-Identifier: Apache-2.0\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.", "licenser.useSingleLineStyle": false, - "files.autoSave": "onFocusChange" + "files.autoSave": "onFocusChange", + "solidity.compileUsingRemoteVersion": "v0.6.12+commit.27d51765" } diff --git a/@types/AnyFiatTokenV2Instance.d.ts b/@types/AnyFiatTokenV2Instance.d.ts index 7c7590984..ad49b8938 100644 --- a/@types/AnyFiatTokenV2Instance.d.ts +++ b/@types/AnyFiatTokenV2Instance.d.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -16,13 +16,11 @@ * limitations under the License. */ -import { - FiatTokenV2Instance, - FiatTokenV21Instance, - FiatTokenV22Instance, -} from "./generated"; +import { FiatTokenV2Instance } from "./generated/FiatTokenV2"; +import { FiatTokenV2_1Instance } from "./generated/FiatTokenV2_1"; +import { FiatTokenV2_2Instance } from "./generated/FiatTokenV2_2"; -export interface FiatTokenV22InstanceExtended extends FiatTokenV22Instance { +export interface FiatTokenV2_2InstanceExtended extends FiatTokenV2_2Instance { permit?: typeof FiatTokenV2Instance.permit; transferWithAuthorization?: typeof FiatTokenV2Instance.transferWithAuthorization; receiveWithAuthorization?: typeof FiatTokenV2Instance.receiveWithAuthorization; @@ -31,5 +29,5 @@ export interface FiatTokenV22InstanceExtended extends FiatTokenV22Instance { export type AnyFiatTokenV2Instance = | FiatTokenV2Instance - | FiatTokenV21Instance - | FiatTokenV22InstanceExtended; + | FiatTokenV2_1Instance + | FiatTokenV2_2InstanceExtended; diff --git a/@types/TransactionRawLog.d.ts b/@types/TransactionRawLog.d.ts index e6bae8dac..891613bca 100644 --- a/@types/TransactionRawLog.d.ts +++ b/@types/TransactionRawLog.d.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/README.md b/README.md index 21a9bf476..5f14a2283 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This repository contains the smart contracts used by [Circle's](https://www.circle.com/) stablecoins on EVM-compatible blockchains. All contracts are written in [Solidity](https://soliditylang.org/) and managed -by the [Truffle](https://trufflesuite.com/) framework. +by the [Hardhat](https://hardhat.org/) framework. @@ -39,13 +39,14 @@ Requirements: - Node 16.14.0 - Yarn 1.22.19 +- [Foundry@2cf84d9](https://github.com/foundry-rs/foundry/releases/tag/nightly-2cf84d9f3ba7b6f4a9296299e7036ecc24cfa1da) ```sh $ git clone git@github.com:circlefin/stablecoin-evm.git $ cd stablecoin-evm $ nvm use $ npm i -g yarn@1.22.19 # Install yarn if you don't already have it -$ yarn install # Install dependencies +$ yarn install # Install npm packages and other dependencies listed in setup.sh ``` ### IDE @@ -57,10 +58,16 @@ We recommend using VSCode for the project here with these ### TypeScript type definition files for the contracts -To generate type definitions: +Types are automatically generated as a part of contract compilation: ```sh -$ yarn typechain +$ yarn compile +``` + +To generate typing without re-compiling, run + +```sh +$ yarn hardhat typechain ``` ### Linting and Formatting @@ -78,7 +85,6 @@ $ yarn typecheck # Type-check TypeScript code $ yarn lint # Check JavaScript and TypeScript code $ yarn lint --fix # Fix problems where possible $ yarn solhint # Check Solidity code -$ yarn slither # Run Slither ``` To auto-format code: @@ -89,12 +95,6 @@ $ yarn fmt ### Testing -First, make sure Ganache is running. - -```sh -$ yarn ganache -``` - Run all tests: ```sh @@ -117,24 +117,46 @@ To check the size of contracts in the repo, run the following command. ```sh $ yarn contract-size # Ignores tests -$ yarn contract-size:all # Includes all contracts ``` ## Deployment -Create a copy of the file `config.js.example`, and name it `config.js`. Enter -the BIP39 mnemonic phrase, the INFURA API key to use for deployment, and the -addresses of proxy admin, owner, master minter, blacklister, and pauser in -`config.js`. This file must not be checked into the repository. To prevent -accidental check-ins, `config.js` is in `.gitignore`. +1. Create a copy of the file `.env.example`, and name it `.env`. Fill in + appropriate values in the `.env` file. This file must not be checked into the + repository. + +```sh +cp .env.example .env +``` -Create a copy of the file `blacklist.test.json`, and name it -`blacklist.remote.json`. Fill in `blacklist.remote.json` with the list addresses -to blacklist. This file must not be checked into the repository. To prevent -accidental check-ins, `blacklist.remote.json` is in `.gitignore`. +2. Create a `blacklist.remote.json` file and populate it with a list of + addresses to be blacklisted. This file must not be checked into the + repository. -Run `yarn migrate --network NETWORK`, where NETWORK is either `mainnet` or -`ropsten`. +```sh +echo "[]" > blacklist.remote.json +``` + +3. Simulate a deployment by running the following command + +```sh +yarn forge:simulate scripts/deploy/deploy-fiat-token.s.sol --rpc-url +``` + +4. Validate that all transactions to be broadcasted are filled in with the + correct values +5. Deploy the contracts by running the following command + +```sh +yarn forge:broadcast scripts/deploy/deploy-fiat-token.s.sol --rpc-url +``` + +6. Verify the contracts on an Etherscan flavored block explorer by running the + following command. Ensure that `ETHERSCAN_KEY` is set in the `.env` file. + +```sh +yarn forge:verify scripts/deploy/deploy-fiat-token.s.sol --rpc-url +``` ## Contracts @@ -200,6 +222,4 @@ address. - [Bridged USDC Standard](./doc/bridged_USDC_standard.md) - [Deployment process](./doc/deployment.md) - [Preparing an upgrade](./doc/upgrade.md) -- [Upgrading from v1 to v2](./doc/v2_upgrade.md) -- [Upgrading from v2 to v2.1](./doc/v2.1_upgrade.md) - [Upgrading from v2.1 to v2.2](./doc/v2.2_upgrade.md) diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..2a76a9169 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,8 @@ +# Security Policy + +## Reporting a Vulnerability + +Please do not file public issues on Github for security vulnerabilities. All +security vulnerabilities should be reported to Circle privately, through +Circle's [Vulnerability Disclosure Program](https://hackerone.com/circle). +Please read through the program policy before submitting a report. diff --git a/blacklist.test.json b/blacklist.test.json deleted file mode 100644 index f5a6efd41..000000000 --- a/blacklist.test.json +++ /dev/null @@ -1,8 +0,0 @@ -[ - "0x04dba1194ee10112fe6c3207c0687def0e78bacf", - "0x08a8a2436fc920e6c73c3a9e9a00b8d937812ee0", - "0xb6f5ec1a0a9cd1526536d3f0426c429529471f40", - "0xbf4f36efa3ac655a1d86f6c32b648a90271443f4", - "0xf8a9ab377ce63592583767b34602e130e38ebdca", - "0xfc672c73ca5c7234edc82552e4a0c8fc247d32ac" -] diff --git a/config.js.example b/config.js.example deleted file mode 100644 index 93f3cf1a5..000000000 --- a/config.js.example +++ /dev/null @@ -1,57 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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. - */ - -module.exports = { - // BIP39 mnemonic phrase - MNEMONIC: "", - // INFURA API key - INFURA_KEY: "", - // FiatTokenProxy admin - can upgrade implementation contract - PROXY_ADMIN_ADDRESS: "", - // Owner - can configure master minter, pauser, and blacklister - OWNER_ADDRESS: "", - // Master Minter - can configure minters and minter allowance - MASTERMINTER_ADDRESS: "", - // Master Minter Owner - owner of master minter contract - MASTERMINTER_OWNER_ADDRESS: "", - // Pauser - can pause the contract - PAUSER_ADDRESS: "", - // Blacklister - can blacklist addresses - BLACKLISTER_ADDRESS: "", - // FiatTokenProxy contract - override the contract address used in migrations - PROXY_CONTRACT_ADDRESS: "", - // FiatToken Implementation contract - deploy new proxy with an existing implementation contract - FIAT_TOKEN_IMPLEMENTATION_ADDRESS: "", - // LostAndFound - tokens that were locked in the contract are sent to this - LOST_AND_FOUND_ADDRESS: "", - // MockERC1271WalletOwner - can deploy and send transactions from a sample ERC1271 wallet - MOCK_ERC1271_WALLET_OWNER_ADDRESS: "", - - // TokenName - ERC20 name of the token e.g. "USD Coin" - TOKEN_NAME: "USD Coin", - // TokenSymbol - Symbol of the token e.g. "USDC" - TOKEN_SYMBOL: "USDC", - // TokenCurrency - Currency of the token e.g. "USD" - TOKEN_CURRENCY: "USD", - // TokenDecimals - Number of decimals for the token e.g. 6 - TOKEN_DECIMALS: 6, - - // USE_VERSIONED_MIGRATIONS - whether or not to use migrations in migrations/versioned directory. - // These migrations deploy each version of FiatToken separately. - USE_VERSIONED_MIGRATIONS: true, -}; diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol deleted file mode 100644 index fdac39399..000000000 --- a/contracts/Migrations.sol +++ /dev/null @@ -1,41 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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.12; - -contract Migrations { - address public owner; - uint256 public last_completed_migration; - - modifier restricted() { - if (msg.sender == owner) _; - } - - constructor() public { - owner = msg.sender; - } - - function setCompleted(uint256 completed) external restricted { - last_completed_migration = completed; - } - - function upgrade(address new_address) external restricted { - Migrations upgraded = Migrations(new_address); - upgraded.setCompleted(last_completed_migration); - } -} diff --git a/contracts/interface/IERC1271.sol b/contracts/interface/IERC1271.sol index 74b848806..80c410de5 100644 --- a/contracts/interface/IERC1271.sol +++ b/contracts/interface/IERC1271.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/minting/Controller.sol b/contracts/minting/Controller.sol index cb8ad02ce..fa063428d 100644 --- a/contracts/minting/Controller.sol +++ b/contracts/minting/Controller.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/minting/MasterMinter.sol b/contracts/minting/MasterMinter.sol index 4c759d828..2e8d896f0 100644 --- a/contracts/minting/MasterMinter.sol +++ b/contracts/minting/MasterMinter.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/minting/MintController.sol b/contracts/minting/MintController.sol index dce3986e0..69151b63f 100644 --- a/contracts/minting/MintController.sol +++ b/contracts/minting/MintController.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/minting/MinterManagementInterface.sol b/contracts/minting/MinterManagementInterface.sol index 1da53d6ca..397ec8c14 100644 --- a/contracts/minting/MinterManagementInterface.sol +++ b/contracts/minting/MinterManagementInterface.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/ContractThatCallsPublicFunctions.sol b/contracts/test/ContractThatCallsPublicFunctions.sol index 7b50f02b0..9fb681a95 100644 --- a/contracts/test/ContractThatCallsPublicFunctions.sol +++ b/contracts/test/ContractThatCallsPublicFunctions.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/ContractThatReverts.sol b/contracts/test/ContractThatReverts.sol index 1f909e6d5..46d92d54a 100644 --- a/contracts/test/ContractThatReverts.sol +++ b/contracts/test/ContractThatReverts.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/ContractWithExternalFunctions.sol b/contracts/test/ContractWithExternalFunctions.sol index b92994721..12e0a799d 100644 --- a/contracts/test/ContractWithExternalFunctions.sol +++ b/contracts/test/ContractWithExternalFunctions.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/ContractWithPublicFunctions.sol b/contracts/test/ContractWithPublicFunctions.sol index 07ad85fd0..2293638f3 100644 --- a/contracts/test/ContractWithPublicFunctions.sol +++ b/contracts/test/ContractWithPublicFunctions.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/DummyERC20.sol b/contracts/test/DummyERC20.sol index f94eacdd2..9c86fb527 100644 --- a/contracts/test/DummyERC20.sol +++ b/contracts/test/DummyERC20.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/ECRecoverTest.sol b/contracts/test/ECRecoverTest.sol index e202d3e29..086d0e221 100644 --- a/contracts/test/ECRecoverTest.sol +++ b/contracts/test/ECRecoverTest.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/EIP712Test.sol b/contracts/test/EIP712Test.sol index e74411967..95a6e9c31 100644 --- a/contracts/test/EIP712Test.sol +++ b/contracts/test/EIP712Test.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/MessageHashUtilsTest.sol b/contracts/test/MessageHashUtilsTest.sol index 0ae762466..076540ec4 100644 --- a/contracts/test/MessageHashUtilsTest.sol +++ b/contracts/test/MessageHashUtilsTest.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/MockERC1271Wallet.sol b/contracts/test/MockERC1271Wallet.sol index fab304a2c..06e6a834b 100644 --- a/contracts/test/MockERC1271Wallet.sol +++ b/contracts/test/MockERC1271Wallet.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/MockFiatTokenWithEditableBalanceAndBlacklistStates.sol b/contracts/test/MockFiatTokenWithEditableBalanceAndBlacklistStates.sol index d84741c60..62ccb5a71 100644 --- a/contracts/test/MockFiatTokenWithEditableBalanceAndBlacklistStates.sol +++ b/contracts/test/MockFiatTokenWithEditableBalanceAndBlacklistStates.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/MockFiatTokenWithEditableChainId.sol b/contracts/test/MockFiatTokenWithEditableChainId.sol index b6bf2d20e..1df5ace41 100644 --- a/contracts/test/MockFiatTokenWithEditableChainId.sol +++ b/contracts/test/MockFiatTokenWithEditableChainId.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol b/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol index 69aa8e238..6137fc2a1 100644 --- a/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol +++ b/contracts/test/UpgradedFiatTokenNewFieldsNewLogicTest.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/UpgradedFiatTokenNewFieldsTest.sol b/contracts/test/UpgradedFiatTokenNewFieldsTest.sol index 19bf117b7..9989df593 100644 --- a/contracts/test/UpgradedFiatTokenNewFieldsTest.sol +++ b/contracts/test/UpgradedFiatTokenNewFieldsTest.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/test/UpgradedFiatTokenV2_2.sol b/contracts/test/UpgradedFiatTokenV2_2.sol deleted file mode 100644 index ef43c38fc..000000000 --- a/contracts/test/UpgradedFiatTokenV2_2.sol +++ /dev/null @@ -1,29 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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.12; - -import { FiatTokenV2_2 } from "../v2/FiatTokenV2_2.sol"; - -/** - * @title UpgradedFiatTokenV2_2 - * @dev ERC20 Token backed by fiat reserves - */ -contract UpgradedFiatTokenV2_2 is FiatTokenV2_2 { - -} diff --git a/contracts/test/UpgradedFiatTokenV2_2NewFieldsTest.sol b/contracts/test/UpgradedFiatTokenV2_2NewFieldsTest.sol index 906f41158..24c855698 100644 --- a/contracts/test/UpgradedFiatTokenV2_2NewFieldsTest.sol +++ b/contracts/test/UpgradedFiatTokenV2_2NewFieldsTest.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/upgradeability/AdminUpgradeabilityProxy.sol b/contracts/upgradeability/AdminUpgradeabilityProxy.sol index 3aa44758b..497870d13 100644 --- a/contracts/upgradeability/AdminUpgradeabilityProxy.sol +++ b/contracts/upgradeability/AdminUpgradeabilityProxy.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/upgradeability/Proxy.sol b/contracts/upgradeability/Proxy.sol index 850292b8c..fda5249c6 100644 --- a/contracts/upgradeability/Proxy.sol +++ b/contracts/upgradeability/Proxy.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/upgradeability/UpgradeabilityProxy.sol b/contracts/upgradeability/UpgradeabilityProxy.sol index 389b598d9..b2273d72e 100644 --- a/contracts/upgradeability/UpgradeabilityProxy.sol +++ b/contracts/upgradeability/UpgradeabilityProxy.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/util/ECRecover.sol b/contracts/util/ECRecover.sol index df5c8f0d6..2ec8ddfdc 100644 --- a/contracts/util/ECRecover.sol +++ b/contracts/util/ECRecover.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/util/EIP712.sol b/contracts/util/EIP712.sol index bd01b2f74..950b41b70 100644 --- a/contracts/util/EIP712.sol +++ b/contracts/util/EIP712.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/util/MessageHashUtils.sol b/contracts/util/MessageHashUtils.sol index 9b80f352e..3e1043231 100644 --- a/contracts/util/MessageHashUtils.sol +++ b/contracts/util/MessageHashUtils.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/util/SignatureChecker.sol b/contracts/util/SignatureChecker.sol index b66fa080b..9fcf56ff9 100644 --- a/contracts/util/SignatureChecker.sol +++ b/contracts/util/SignatureChecker.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v1.1/FiatTokenV1_1.sol b/contracts/v1.1/FiatTokenV1_1.sol index 854664ecf..dbf763c28 100644 --- a/contracts/v1.1/FiatTokenV1_1.sol +++ b/contracts/v1.1/FiatTokenV1_1.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v1.1/Rescuable.sol b/contracts/v1.1/Rescuable.sol index 3b23aa07e..60c434f89 100644 --- a/contracts/v1.1/Rescuable.sol +++ b/contracts/v1.1/Rescuable.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v1/AbstractFiatTokenV1.sol b/contracts/v1/AbstractFiatTokenV1.sol index bb64da5a3..4b318c7e8 100644 --- a/contracts/v1/AbstractFiatTokenV1.sol +++ b/contracts/v1/AbstractFiatTokenV1.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v1/Blacklistable.sol b/contracts/v1/Blacklistable.sol index b555cb6df..f24f5b572 100644 --- a/contracts/v1/Blacklistable.sol +++ b/contracts/v1/Blacklistable.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v1/FiatTokenProxy.sol b/contracts/v1/FiatTokenProxy.sol index 83f0ee481..7b1ebe141 100644 --- a/contracts/v1/FiatTokenProxy.sol +++ b/contracts/v1/FiatTokenProxy.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v1/FiatTokenV1.sol b/contracts/v1/FiatTokenV1.sol index cfec563ea..fc51aef3e 100644 --- a/contracts/v1/FiatTokenV1.sol +++ b/contracts/v1/FiatTokenV1.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/AbstractFiatTokenV2.sol b/contracts/v2/AbstractFiatTokenV2.sol index 4a0e9a721..4f0e448ca 100644 --- a/contracts/v2/AbstractFiatTokenV2.sol +++ b/contracts/v2/AbstractFiatTokenV2.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/EIP2612.sol b/contracts/v2/EIP2612.sol index 455b1ca16..0523d8efd 100644 --- a/contracts/v2/EIP2612.sol +++ b/contracts/v2/EIP2612.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/EIP3009.sol b/contracts/v2/EIP3009.sol index 17e3d5a00..a76b0975f 100644 --- a/contracts/v2/EIP3009.sol +++ b/contracts/v2/EIP3009.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/EIP712Domain.sol b/contracts/v2/EIP712Domain.sol index 4513d8c36..a3a0e85ad 100644 --- a/contracts/v2/EIP712Domain.sol +++ b/contracts/v2/EIP712Domain.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/FiatTokenUtil.sol b/contracts/v2/FiatTokenUtil.sol index 4030a97fa..c0df40bff 100644 --- a/contracts/v2/FiatTokenUtil.sol +++ b/contracts/v2/FiatTokenUtil.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/FiatTokenV2.sol b/contracts/v2/FiatTokenV2.sol index 152d90eb9..0919ff8a0 100644 --- a/contracts/v2/FiatTokenV2.sol +++ b/contracts/v2/FiatTokenV2.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/FiatTokenV2_1.sol b/contracts/v2/FiatTokenV2_1.sol index 38fe992c6..c52f85fa3 100644 --- a/contracts/v2/FiatTokenV2_1.sol +++ b/contracts/v2/FiatTokenV2_1.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/FiatTokenV2_2.sol b/contracts/v2/FiatTokenV2_2.sol index 41260cb02..3ba66608a 100644 --- a/contracts/v2/FiatTokenV2_2.sol +++ b/contracts/v2/FiatTokenV2_2.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/upgrader/AbstractV2Upgrader.sol b/contracts/v2/upgrader/AbstractV2Upgrader.sol index f4ebd6cd7..45b0446ae 100644 --- a/contracts/v2/upgrader/AbstractV2Upgrader.sol +++ b/contracts/v2/upgrader/AbstractV2Upgrader.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/upgrader/V2Upgrader.sol b/contracts/v2/upgrader/V2Upgrader.sol index e3f6ecff7..1cfdf04d2 100644 --- a/contracts/v2/upgrader/V2Upgrader.sol +++ b/contracts/v2/upgrader/V2Upgrader.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/upgrader/V2_1Upgrader.sol b/contracts/v2/upgrader/V2_1Upgrader.sol index 64ed69e3e..f1e2730f3 100644 --- a/contracts/v2/upgrader/V2_1Upgrader.sol +++ b/contracts/v2/upgrader/V2_1Upgrader.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/upgrader/V2_2Upgrader.sol b/contracts/v2/upgrader/V2_2Upgrader.sol index 1a6878385..beb3c52af 100644 --- a/contracts/v2/upgrader/V2_2Upgrader.sol +++ b/contracts/v2/upgrader/V2_2Upgrader.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/upgrader/helpers/AbstractUpgraderHelper.sol b/contracts/v2/upgrader/helpers/AbstractUpgraderHelper.sol index e93987872..4017493ba 100644 --- a/contracts/v2/upgrader/helpers/AbstractUpgraderHelper.sol +++ b/contracts/v2/upgrader/helpers/AbstractUpgraderHelper.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/upgrader/helpers/V2UpgraderHelper.sol b/contracts/v2/upgrader/helpers/V2UpgraderHelper.sol index 67a172921..dd56e2743 100644 --- a/contracts/v2/upgrader/helpers/V2UpgraderHelper.sol +++ b/contracts/v2/upgrader/helpers/V2UpgraderHelper.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/contracts/v2/upgrader/helpers/V2_2UpgraderHelper.sol b/contracts/v2/upgrader/helpers/V2_2UpgraderHelper.sol index 6a218c132..d4a58632e 100644 --- a/contracts/v2/upgrader/helpers/V2_2UpgraderHelper.sol +++ b/contracts/v2/upgrader/helpers/V2_2UpgraderHelper.sol @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/doc/bridged_USDC_standard.md b/doc/bridged_USDC_standard.md index d42254b81..46f1de959 100644 --- a/doc/bridged_USDC_standard.md +++ b/doc/bridged_USDC_standard.md @@ -1,123 +1,257 @@ # Bridged USDC Standard -[Bridged USDC Standard](https://circle.com/blog/bridged-usdc-standard) is a specification and process for deploying a bridged form of USDC on EVM blockchains with optionality for Circle to seamlessly upgrade to native issuance in the future.1 +[Bridged USDC Standard](https://circle.com/blog/bridged-usdc-standard) is a +specification and process for deploying a bridged form of USDC on EVM +blockchains with optionality for Circle to seamlessly upgrade to native issuance +in the future.1 -The result is a secure and standardized way for any EVM blockchain and rollup team to transfer ownership of a bridged USDC token contract to Circle to facilitate an upgrade to native USDC, if and when both parties deem appropriate.2 +The result is a secure and standardized way for any EVM blockchain and rollup +team to transfer ownership of a bridged USDC token contract to Circle to +facilitate an upgrade to native USDC, if and when both parties deem +appropriate.2 -This document provides a high-level overview of the process. Note that this also applies to implementations of bridged EURC (Circle’s euro-backed stablecoin), as they follow the same implementation. +This document provides a high-level overview of the process. Note that this also +applies to implementations of bridged EURC (Circle’s euro-backed stablecoin), as +they follow the same implementation. ## How it works -1. Third-party team follows the standard to deploy their bridge contracts, or retains the ability to upgrade their bridge contracts in the future to incorporate the required functionality. (See [Bridge Contracts](#bridge-contracts)) -2. Third-party team follows the standard to deploy their bridged USDC token contract. (See [Token Deployment](#token-deployment)) -3. If and when a joint decision is made by the third-party team and Circle to securely transfer ownership of the bridged USDC token contract to Circle and perform an upgrade to native USDC, the following will take place: - - Third-party team will pause bridging activity and reconcile in-flight bridging activity to harmonize the total supply of native USDC locked on the origin chain with the total supply of bridged USDC on the destination chain. - - Third-party team will securely re-assign the contract roles of the bridged USDC token contract to Circle. - - Circle and the third-party team will jointly coordinate to burn the supply of native USDC locked in the bridge contract on the origin chain and upgrade the bridged USDC token contract on the destination chain to native USDC. -4. The native USDC token contract seamlessly retains the existing supply, holders, and app integrations of the original bridged USDC token contract. +1. Third-party team follows the standard to deploy their bridge contracts, or + retains the ability to upgrade their bridge contracts in the future to + incorporate the required functionality. (See + [Bridge Contracts](#bridge-contracts)) +2. Third-party team follows the standard to deploy their bridged USDC token + contract. (See [Token Deployment](#token-deployment)) +3. If and when a joint decision is made by the third-party team and Circle to + securely transfer ownership of the bridged USDC token contract to Circle and + perform an upgrade to native USDC, the following will take place: + - Third-party team will pause bridging activity and reconcile in-flight + bridging activity to harmonize the total supply of native USDC locked on + the origin chain with the total supply of bridged USDC on the destination + chain. + - Third-party team will securely re-assign the contract roles of the bridged + USDC token contract to Circle. + - Circle and the third-party team will jointly coordinate to burn the supply + of native USDC locked in the bridge contract on the origin chain and + upgrade the bridged USDC token contract on the destination chain to native + USDC. +4. The native USDC token contract seamlessly retains the existing supply, + holders, and app integrations of the original bridged USDC token contract. ## Bridge Contracts -The third-party team’s bridge contracts play an integral role in the process, and must be upgradable in order to add the following functionality, which is required to support the upgrade process. +The third-party team’s bridge contracts play an integral role in the process, +and must be upgradable in order to add the following functionality, which is +required to support the upgrade process. -1. (*Source and destination blockchains*) Ability to pause USDC bridging to create a lock on the supply. -2. (*Source blockchain*) Ability to burn locked USDC. +1. (_Source and destination blockchains_) Ability to pause USDC bridging to + create a lock on the supply. +2. (_Source blockchain_) Ability to burn locked USDC. -Circle recommends deferring adding this functionality to a later time through a contract upgrade after Circle and the third-party team have jointly agreed to proceed with an upgrade. +Circle recommends deferring adding this functionality to a later time through a +contract upgrade after Circle and the third-party team have jointly agreed to +proceed with an upgrade. ### 1) Ability to pause USDC bridging -The bridges must be able to support a USDC supply lock, whereby the USDC locked on the source blockchain will (at some point soon after) precisely match the circulating bridged USDC supply on the destination blockchain. How this is implemented is up to the third-party team, but this functionality must be present before an upgrade can take place. +The bridges must be able to support a USDC supply lock, whereby the USDC locked +on the source blockchain will (at some point soon after) precisely match the +circulating bridged USDC supply on the destination blockchain. How this is +implemented is up to the third-party team, but this functionality must be +present before an upgrade can take place. ### 2) Ability to burn locked USDC -A final step during the upgrade is to burn locked USDC in the source blockchain bridge contract. To support this, Circle will temporarily assign the bridge contract holding the USDC balance the role of a zero-allowance USDC minter. This means that the bridge may burn its own held balance but not mint new supply. +A final step during the upgrade is to burn locked USDC in the source blockchain +bridge contract. To support this, Circle will temporarily assign the bridge +contract holding the USDC balance the role of a zero-allowance USDC minter. This +means that the bridge may burn its own held balance but not mint new supply. -To execute the burn, the bridge contract must expose a single function, only callable by a Circle-controlled account. The signature of this function will be: +To execute the burn, the bridge contract must expose a single function, only +callable by a Circle-controlled account. The signature of this function will be: ``` function burnLockedUSDC() external; ``` -The specific implementation details are left up to the third-party team, but at a minimum, the function must: -1. Be only callable by an address that Circle specifies closer to the time of the upgrade. -2. Burn the amount of USDC held by the bridge that corresponds precisely to the circulating total supply of bridged USDC established by the supply lock. +The specific implementation details are left up to the third-party team, but at +a minimum, the function must: +1. Be only callable by an address that Circle specifies closer to the time of + the upgrade. +2. Burn the amount of USDC held by the bridge that corresponds precisely to the + circulating total supply of bridged USDC established by the supply lock. ## Token Deployment -The third-party team’s bridged USDC token contract is expected to be identical to native USDC token contracts on other EVM blockchains. USDC uses a proxy pattern, so the standard applies to both the implementation contract code and the token proxy. +The third-party team’s bridged USDC token contract is expected to be identical +to native USDC token contracts on other EVM blockchains. USDC uses a proxy +pattern, so the standard applies to both the implementation contract code and +the token proxy. ### Token Contract Code -Using identical code facilitates trustless contract verification by Circle and supports a seamless integration with existing USDC services. To facilitate this, the third-party team may choose one of the following: -- Copy previously deployed bytecode from a recent, native USDC token contract deployment (both proxy and implementation) on an EVM blockchain, for example [Arbitrum](https://arbiscan.io/token/0xaf88d065e77c8cc2239327c5edb3a432268e5831), [Base](https://basescan.org/token/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913), [OP Mainnet](https://optimistic.etherscan.io/token/0x0b2c639c533813f4aa9d7837caf62653d097ff85), or [Polygon PoS](https://polygonscan.com/token/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359). Note that you must supply different constructor and initializer parameters where needed. - - For EURC, please reference the bytecode from the [Ethereum](https://etherscan.io/token/0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c) implementation -- Build the [FiatToken contracts](https://github.com/circlefin/stablecoin-evm#contracts) from source. In this case, the compiler [metadata](https://docs.soliditylang.org/en/latest/metadata.html) must be published or made available to support full contract verification. Various suggested compiler settings that Circle uses can be found [here](https://github.com/circlefin/stablecoin-evm/blob/35d66ae39f7038e30f04f87635f8bca6f8e38b04/truffle-config.js#L34-L45), which will allow the third-party team to reach the same bytecode if followed consistently. +Using identical code facilitates trustless contract verification by Circle and +supports a seamless integration with existing USDC services. To facilitate this, +the third-party team may choose one of the following: + +- Copy previously deployed bytecode from a recent, native USDC token contract + deployment (both proxy and implementation) on an EVM blockchain, for example + [Arbitrum](https://arbiscan.io/token/0xaf88d065e77c8cc2239327c5edb3a432268e5831), + [Base](https://basescan.org/token/0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913), + [OP Mainnet](https://optimistic.etherscan.io/token/0x0b2c639c533813f4aa9d7837caf62653d097ff85), + or + [Polygon PoS](https://polygonscan.com/token/0x3c499c542cef5e3811e1192ce70d8cc03d5c3359). + Note that you must supply different constructor and initializer parameters + where needed. + - For EURC, please reference the bytecode from the + [Ethereum](https://etherscan.io/token/0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c) + implementation +- Build the + [FiatToken contracts](https://github.com/circlefin/stablecoin-evm#contracts) + from source. In this case, the compiler + [metadata](https://docs.soliditylang.org/en/latest/metadata.html) must be + published or made available to support full contract verification. Various + suggested compiler settings that Circle uses can be found + [here](https://github.com/circlefin/stablecoin-evm/blob/35d66ae39f7038e30f04f87635f8bca6f8e38b04/truffle-config.js#L34-L45), + which will allow the third-party team to reach the same bytecode if followed + consistently. ### Token Naming -Circle has recommended [naming guidelines](https://brand.circle.com/d/M9z54TaEwsWL/stablecoins#/usdc-brand-guide/usdc-naming-guidelines) for the Token Name and Token Symbol attributes of a bridged USDC or EURC token contract that third-party teams are encouraged to follow. It is often the case that USDC and EURC are bridged from Ethereum to a new destination blockchain, and as such, the following is commonly used: +Circle has recommended +[naming guidelines](https://brand.circle.com/d/M9z54TaEwsWL/stablecoins#/usdc-brand-guide/usdc-naming-guidelines) +for the Token Name and Token Symbol attributes of a bridged USDC or EURC token +contract that third-party teams are encouraged to follow. It is often the case +that USDC and EURC are bridged from Ethereum to a new destination blockchain, +and as such, the following is commonly used: USDC + - Token Name: Bridged USDC (Third-Party Team) - Token Symbol: USDC.e EURC + - Token Name: Bridged EURC (Third-Party Team) - Token Symbol: EURC.e - -Note that the text shown in parentheses above would be the third-party team’s company name. +Note that the text shown in parentheses above would be the third-party team’s +company name. ### IMPORTANT NOTE: -- Once deployed, the bridged token contract must not be upgraded to a new or different implementation at any time, outside of subsequent FiatToken versions authored by Circle. -- FiatToken has a number of one-time use initialization functions (listed below) that are not permissioned, and therefore should be called during contract deployment. - - Due to the proxy pattern used by FiatToken, after (or while) specifying the current implementation that the proxy points to, these initialization functions must be called to set the values correctly on the proxy's storage. If not, then any caller could invoke them in the future. - - It is also recommended to call these functions directly on the implementation contract itself, separately from the proxy, to disallow any outside caller invoking them later. At the timing of writing, these initialization functions include: - - [initialize](https://github.com/circlefin/stablecoin-evm/blob/405efc100c016ed1a437063b6274b4e24ea7b8b1/contracts/v1/FiatTokenV1.sol#L67) - - [initializeV2](https://github.com/circlefin/stablecoin-evm/blob/405efc100c016ed1a437063b6274b4e24ea7b8b1/contracts/v2/FiatTokenV2.sol#L37) - - [initializeV2_1](https://github.com/circlefin/stablecoin-evm/blob/405efc100c016ed1a437063b6274b4e24ea7b8b1/contracts/v2/FiatTokenV2_1.sol#L34) - - [initializeV2_2](https://github.com/circlefin/stablecoin-evm/blob/405efc100c016ed1a437063b6274b4e24ea7b8b1/contracts/v2/FiatTokenV2_2.sol#L41) - -There are a number of reference [deployment scripts](https://github.com/circlefin/stablecoin-evm/tree/35d66ae39f7038e30f04f87635f8bca6f8e38b04/migrations/direct) in the repository that demonstrate patterns for deploying USDC/EURC and configuring the implementation. For instance, there’s an [upgrader pattern](https://github.com/circlefin/stablecoin-evm/blob/35d66ae39f7038e30f04f87635f8bca6f8e38b04/migrations/versioned/8_deploy_v2_2_upgrader.js), where a smart contract sets the FiatToken implementation contract and calls the initialize functions within a single transaction. +- Once deployed, the bridged token contract must not be upgraded to a new or + different implementation at any time, outside of subsequent FiatToken versions + authored by Circle. +- FiatToken has a number of one-time use initialization functions (listed below) + that are not permissioned, and therefore should be called during contract + deployment. + - Due to the proxy pattern used by FiatToken, after (or while) specifying the + current implementation that the proxy points to, these initialization + functions must be called to set the values correctly on the proxy's storage. + If not, then any caller could invoke them in the future. + - It is also recommended to call these functions directly on the + implementation contract itself, separately from the proxy, to disallow any + outside caller invoking them later. At the timing of writing, these + initialization functions include: + - [initialize](https://github.com/circlefin/stablecoin-evm/blob/405efc100c016ed1a437063b6274b4e24ea7b8b1/contracts/v1/FiatTokenV1.sol#L67) + - [initializeV2](https://github.com/circlefin/stablecoin-evm/blob/405efc100c016ed1a437063b6274b4e24ea7b8b1/contracts/v2/FiatTokenV2.sol#L37) + - [initializeV2_1](https://github.com/circlefin/stablecoin-evm/blob/405efc100c016ed1a437063b6274b4e24ea7b8b1/contracts/v2/FiatTokenV2_1.sol#L34) + - [initializeV2_2](https://github.com/circlefin/stablecoin-evm/blob/405efc100c016ed1a437063b6274b4e24ea7b8b1/contracts/v2/FiatTokenV2_2.sol#L41) + +There are a number of reference +[deployment scripts](https://github.com/circlefin/stablecoin-evm/tree/35d66ae39f7038e30f04f87635f8bca6f8e38b04/migrations/direct) +in the repository that demonstrate patterns for deploying USDC/EURC and +configuring the implementation. For instance, there’s an +[upgrader pattern](https://github.com/circlefin/stablecoin-evm/blob/35d66ae39f7038e30f04f87635f8bca6f8e38b04/migrations/versioned/8_deploy_v2_2_upgrader.js), +where a smart contract sets the FiatToken implementation contract and calls the +initialize functions within a single transaction. ### Token Roles -FiatToken uses a minter pattern, where minters can be configured via a master minter role to mint up to an allowed amount. One way to adapt the minter pattern to a bridged USDC or EURC token contract is to configure the destination bridge as a solo minter. +FiatToken uses a minter pattern, where minters can be configured via a master +minter role to mint up to an allowed amount. One way to adapt the minter pattern +to a bridged USDC or EURC token contract is to configure the destination bridge +as a solo minter. -The individual FiatToken roles (Owner, Pauser, Blacklister, MasterMinter) could also be assigned to the bridge, or some other upgradeable contract, as long as there's the ability to add a hook in the future to enable transferring the roles to Circle. +The individual FiatToken roles (Owner, Pauser, Blacklister, MasterMinter) could +also be assigned to the bridge, or some other upgradeable contract, as long as +there's the ability to add a hook in the future to enable transferring the roles +to Circle. -If you would like more flexibility with permissioned minter configurations, you may want to explore the Controller and `MinterController` [contracts](https://github.com/circlefin/stablecoin-evm/tree/35d66ae39f7038e30f04f87635f8bca6f8e38b04/contracts/minting), which come together to form the `MasterMinter` pattern. +If you would like more flexibility with permissioned minter configurations, you +may want to explore the Controller and `MinterController` +[contracts](https://github.com/circlefin/stablecoin-evm/tree/35d66ae39f7038e30f04f87635f8bca6f8e38b04/contracts/minting), +which come together to form the `MasterMinter` pattern. **Transferring the roles to Circle** -There are several USDC roles that will be transferred to a Circle-owned address at the time of the upgrade. Specifically these are: +There are several USDC roles that will be transferred to a Circle-owned address +at the time of the upgrade. Specifically these are: -* Implementation Owner: [defined](https://github.com/circlefin/stablecoin-evm/blob/657375471bff72afa5f625083bbab8003eb5f8c9/contracts/v1/Ownable.sol#L37) in the implementation contract, the Owner can re-assign all other roles (Owner, MasterMinter, Pauser, Rescuer, Blacklister). -* ProxyAdmin: [defined](https://github.com/circlefin/stablecoin-evm/blob/657375471bff72afa5f625083bbab8003eb5f8c9/contracts/upgradeability/AdminUpgradeabilityProxy.sol#L31) in the proxy contract, the ProxyAdmin can re-assign the ProxyAdmin and perform upgrades. By default, the proxy admin is not allowed to call any functions defined by the implementation contract. +- Implementation Owner: + [defined](https://github.com/circlefin/stablecoin-evm/blob/657375471bff72afa5f625083bbab8003eb5f8c9/contracts/v1/Ownable.sol#L37) + in the implementation contract, the Owner can re-assign all other roles + (Owner, MasterMinter, Pauser, Rescuer, Blacklister). +- ProxyAdmin: + [defined](https://github.com/circlefin/stablecoin-evm/blob/657375471bff72afa5f625083bbab8003eb5f8c9/contracts/upgradeability/AdminUpgradeabilityProxy.sol#L31) + in the proxy contract, the ProxyAdmin can re-assign the ProxyAdmin and perform + upgrades. By default, the proxy admin is not allowed to call any functions + defined by the implementation contract. -It is up to the third-party team as to how they will secure and manage these roles as part of their original bridged USDC deployment and its ongoing use before a potential upgrade. For instance, the roles could be assigned to a secure multi-sig, or assigned to a smart contract (like the bridge), which can simplify the role transfer process. +It is up to the third-party team as to how they will secure and manage these +roles as part of their original bridged USDC deployment and its ongoing use +before a potential upgrade. For instance, the roles could be assigned to a +secure multi-sig, or assigned to a smart contract (like the bridge), which can +simplify the role transfer process. -Some teams have opted to assign the ProxyAdmin role to a secure EOA / multi-sig wallet and assign the USDC roles to the bridge contract itself. +Some teams have opted to assign the ProxyAdmin role to a secure EOA / multi-sig +wallet and assign the USDC roles to the bridge contract itself. -If they are assigned to a smart contract, the contract must expose a function that Circle can call through a smart contract interaction to perform the role transfer at upgrade time. Automating this interaction can reduce manual errors and can enable atomic before and after checks that facilitate a smooth transfer. +If they are assigned to a smart contract, the contract must expose a function +that Circle can call through a smart contract interaction to perform the role +transfer at upgrade time. Automating this interaction can reduce manual errors +and can enable atomic before and after checks that facilitate a smooth transfer. -This function must have the following signature: +This function must have the following signature: ``` function transferUSDCRoles(address owner) external; ``` -The function implementation details are left up to the partner, but it must: 1) only be callable by a Circle-owned address and 2) transfer the Implementation Owner role and the ProxyAdmin role to the function caller (if both are assigned to the bridge). +The function implementation details are left up to the partner, but it must: 1) +only be callable by a Circle-owned address and 2) transfer the Implementation +Owner role and the ProxyAdmin role to the function caller (if both are assigned +to the bridge). -Additionally, the partner is expected to remove all configured minters prior to (or concurrently with) transferring the roles to Circle. +Additionally, the partner is expected to remove all configured minters prior to +(or concurrently with) transferring the roles to Circle. ## For more information -Please reach out on [our Discord](https://discord.com/invite/buildoncircle) if you have questions that were not addressed in this document. We value feedback and suggestions from the community to improve our documentation. - ------------ -1. Bridged USDC Standard grants Circle the option, but not the obligation, to obtain ownership of the token contract and upgrade to native USDC. Additionally, Bridged USDC Standard must be incorporated prior to deploying a bridged USDC token contract as it cannot be retroactively applied. The requirements provided are for informational purposes only and will apply should Circle choose to upgrade a particular form of bridged USDC to native USDC. These requirements do not constitute an offer to upgrade a particular form of bridged USDC. Circle’s decision to upgrade a particular form of bridged USDC to native USDC may be subject to additional terms and conditions. As noted in Section 8 of the [USDC Terms of Use](https://www.circle.com/en/legal/usdc-terms), bridged forms of USDC are subject to certain risks and are not issued by Circle. The same conditions apply to EURC. -2. The target blockchain will undergo Circle’s internal Blockchain Due Diligence Process. That process involves reviews for both compliance and risk factors, as well as coverage for legal and technology risks, prior to approval. The diligence focuses on crypto and blockchain nuances, and an assessment of the strategic, financial, operational, technology, legal, and regulatory risks that are present. +Please reach out on [our Discord](https://discord.com/invite/buildoncircle) if +you have questions that were not addressed in this document. We value feedback +and suggestions from the community to improve our documentation. + +--- + +1. Bridged USDC Standard grants Circle the option, but not the obligation, to + obtain ownership of the token contract and upgrade to native USDC. + Additionally, Bridged USDC Standard must be incorporated prior to deploying a + bridged USDC token contract as it cannot be retroactively applied. The + requirements provided are for informational purposes only and will apply + should Circle choose to upgrade a particular form of bridged USDC to native + USDC. These requirements do not constitute an offer to upgrade a particular + form of bridged USDC. Circle’s decision to upgrade a particular form of + bridged USDC to native USDC may be subject to additional terms and + conditions. As noted in Section 8 of the + [USDC Terms of Use](https://www.circle.com/en/legal/usdc-terms), bridged + forms of USDC are subject to certain risks and are not issued by Circle. The + same conditions apply to EURC. +2. The target blockchain will undergo Circle’s internal Blockchain Due Diligence + Process. That process involves reviews for both compliance and risk factors, + as well as coverage for legal and technology risks, prior to approval. The + diligence focuses on crypto and blockchain nuances, and an assessment of the + strategic, financial, operational, technology, legal, and regulatory risks + that are present. diff --git a/doc/v2.1_upgrade.md b/doc/v2.1_upgrade.md deleted file mode 100644 index b8f8e5c68..000000000 --- a/doc/v2.1_upgrade.md +++ /dev/null @@ -1,68 +0,0 @@ -# V2.1 Upgrade - -### Prerequisites - -1. Truffle Deployer Key ("Deployer Key") -2. Proxy Admin Key ("Admin Key") - -### Steps - -1. Ensure that the `config.js` file in the project root folder is configured - with the correct values. The environment variables `PROXY_ADMIN_ADDRESS`, - `PROXY_CONTRACT_ADDRESS`, and `LOST_AND_FOUND_ADDRESS` must be defined. - -2. Set the `NETWORK` variable to the network that you will like to deploy to in - your terminal. Ensure that the `NETWORK` that the contracts are to be - deployed to are defined in [`./truffle-config.js`](../truffle-config.js). - - ```sh - $ NETWORK=; - ``` - -3. Look for the `deploy_v2_1` and `deploy_v2_1_upgrader` scripts in - [`./migrations/`](../migrations/). Set the `MIGRATION_START` and - `MIGRATION_END` variables based off the migration numbers of these scripts. - - ```sh - $ MIGRATION_START= - $ MIGRATION_END= - ``` - -4. Run Truffle migrations using the Deployer Key, and get the address of the - newly deployed `V2_1Upgrader` contract. - - ```sh - $ yarn migrate --network ${NETWORK} --f ${MIGRATION_START} --to ${MIGRATION_END} - ... - ... - Dry-run successful. Do you want to proceed with real deployment? >> (y/n): y - ... - ... - >>>>>>> Deployed V2_1Upgrader at 0x12345678 <<<<<<< - ``` - -5. Verify that the upgrader contract is deployed correctly. Verify that the - values returned by `proxy()`, `implementation()`, `newProxyAdmin()`, and - `lostAndFound()` on the `V2_1Upgrader` contract are correct. - -6. Using the Admin Key, transfer the proxy admin role to the `V2_1Upgrader` - contract address by calling `changeAdmin(address)` method on the - `FiatTokenProxy` contract. - -7. Send 0.20 FiatToken (eg USDC) to the `V2_1Upgrader` contract address. - (200,000 tokens) - -8. Using the Deployer Key, call `upgrade()` (`0xd55ec697`) method on the - `V2_1Upgrader`. - -#### IF THE UPGRADE TRANSACTION SUCCEEDS - -- Verify that the proxy admin role is transferred back to the Admin Key. -- No further action needed. - -#### IF THE UPGRADE TRANSACTION FAILS - -- If the transaction fails, any state change that happened during the `upgrade` - function call will be reverted. -- Call `abortUpgrade()` (`0xd8f6a8f6`) method on the `V2_1Upgrader` contract to - tear it down. diff --git a/doc/v2.2_upgrade.md b/doc/v2.2_upgrade.md index 35c2028cd..3df037782 100644 --- a/doc/v2.2_upgrade.md +++ b/doc/v2.2_upgrade.md @@ -2,7 +2,7 @@ ### Prerequisites -1. Truffle Deployer Key ("Deployer Key") +1. Deployer Key ("Deployer Key") 2. Proxy Admin Key ("Admin Key") 3. A list of currently blacklisted accounts stored in `blacklist.remote.json` @@ -12,7 +12,7 @@ either using a block explorer, or the command below. ```sh - $ yarn truffle exec scripts/getContractCreationBlock.js ${FiatTokenProxy address} --network ${NETWORK} + $ yarn hardhat getContractCreationBlock --network ${NETWORK} ${FiatTokenProxy address} ``` 2. Get a list of accounts that are currently blacklisted on the target @@ -21,61 +21,82 @@ FiatTokenProxy contract. ```sh - $ yarn truffle exec scripts/getBlacklistedAccounts.js ${FiatTokenProxy address} ${startBlockNumber} --network ${NETWORK} + $ yarn hardhat downloadBlacklistedAccounts --network ${NETWORK} \ + --proxy-address ${FiatTokenProxy address} \ + --start-block-number ${startBlockNumber} ``` ### Steps -1. Ensure that the `config.js` file in the project root folder is configured - with the correct values. The environment variables `PROXY_ADMIN_ADDRESS`, - `PROXY_CONTRACT_ADDRESS` must be defined. +1. From project root folder, make a copy of `.env.example` and name the file + `.env`. Ensure `.env` is configured with the correct values. The environment + variables `PROXY_ADMIN_ADDRESS`, `FIAT_TOKEN_PROXY_ADDRESS` must be defined. 2. Set the `NETWORK` variable to the network that you will like to deploy to in - your terminal. Ensure that the `NETWORK` that the contracts are to be - deployed to are defined in [`./truffle-config.js`](../truffle-config.js). + your terminal. ```sh - $ NETWORK=; + $ NETWORK=; ``` -3. Look for the `deploy_v2_2` and `deploy_v2_2_upgrader` scripts in - [`./migrations/`](../migrations/). Set the `MIGRATION_START` and - `MIGRATION_END` variables based off the migration numbers of these scripts. +3. Look for the `deploy-impl-and-upgrader.s.sol` script in + [`./scripts/deploy/`](../scripts/deploy/). Ensure the the following variables + are correctly configured in your local `.env` file: ```sh - $ MIGRATION_START= - $ MIGRATION_END= + $ DEPLOYER_PRIVATE_KEY= + $ FIAT_TOKEN_PROXY_ADDRESS= + $ PROXY_ADMIN_ADDRESS= + $ LOST_AND_FOUND_ADDRESS= + $ TOKEN_SYMBOL= + + # [Optional] Fill in if an implementation contract already exists + $ FIAT_TOKEN_IMPLEMENTATION_ADDRESS= ``` 4. Ensure that the `blacklist.remote.json` file in the project root folder is configured with the correct list of addresses to blacklist. -5. Run Truffle migrations using the Deployer Key, and get the address of the - newly deployed `V2_2Upgrader` contract. +5. Run foundry deploy simulation by running the following command ```sh - $ yarn migrate --network ${NETWORK} --f ${MIGRATION_START} --to ${MIGRATION_END} - ... - ... - Dry-run successful. Do you want to proceed with real deployment? >> (y/n): y - ... - ... - >>>>>>> Deployed V2_2Upgrader at 0x12345678 <<<<<<< + yarn forge:simulate scripts/deploy/deploy-impl-and-upgrader.s.sol --rpc-url $NETWORK ``` -6. Verify that the upgrader contract is deployed correctly. Verify that the + Validate all fields are filled in correctly. + + **_NOTE:_** For additional information, you may also validate each of the + transactions to be broadcasted by checking the + `./broadcast/deploy-impl-and-upgrader.s.sol/:chainId/dry-run` folder that + gets auto created in your local machine. + +6. Deploy the contracts by running the following command + + ```sh + yarn forge:broadcast scripts/deploy/deploy-impl-and-upgrader.s.sol --rpc-url $NETWORK + ``` + +7. Verify the contracts on an Etherscan flavored block explorer by running the + following command. Ensure that `ETHERSCAN_KEY` is set in the `.env` file. + + ```sh + yarn forge:verify scripts/deploy/deploy-impl-and-upgrader.s.sol --rpc-url $NETWORK + ``` + +8. Verify that the upgrader contract is deployed correctly. Verify that the values returned by `proxy()`, `implementation()` and `newProxyAdmin()` on the `V2_2Upgrader` contract are correct either using a block explorer, or the command below. ```sh $ yarn compile - $ yarn truffle exec scripts/callContractROFunctions.js --network ${NETWORK} \ - --contract-name V2_2Upgrader --contract-address ${V2_2Upgrader address} \ - proxy implementation newProxyAdmin + $ yarn hardhat readValuesFromContract --network ${NETWORK} \ + --contract-name V2_2Upgrader \ + --contract-address ${V2_2Upgrader address} \ + proxy implementation newProxyAdmin ``` -7. Verify that the `V2_2UpgraderHelper` contract is deployed correctly. Retrieve +9. Verify that the `V2_2UpgraderHelper` contract is deployed correctly. Retrieve the address from the `V2_2Upgrader` contract `helper()` method, and verify that the return values of each view methods correspond with the `FiatTokenProxy` contract to be upgraded either using a block explorer, or @@ -83,35 +104,40 @@ ```sh $ yarn compile - $ yarn truffle exec scripts/callContractROFunctions.js --network ${NETWORK} \ - --contract-name V2_2Upgrader --contract-address ${V2_2Upgrader address} \ - helper - $ yarn truffle exec scripts/callContractROFunctions.js --network ${NETWORK} \ - --contract-name V2_2UpgraderHelper --contract-address ${V2_2UpgraderHelper address} \ - name symbol decimals currency masterMinter fiatTokenOwner pauser blacklister version DOMAIN_SEPARATOR rescuer paused totalSupply + $ yarn hardhat readValuesFromContract --network ${NETWORK} \ + --contract-name V2_2Upgrader \ + --contract-address ${V2_2Upgrader address} \ + helper + $ yarn hardhat readValuesFromContract --network ${NETWORK} \ + --contract-name V2_2UpgraderHelper \ + --contract-address ${V2_2UpgraderHelper address} \ + name symbol decimals currency masterMinter fiatTokenOwner pauser blacklister version DOMAIN_SEPARATOR rescuer paused totalSupply # Compare results above with - $ yarn truffle exec scripts/callContractROFunctions.js --network ${NETWORK} \ - --contract-name FiatTokenV2_1 --contract-address ${FiatTokenProxy address} \ - name symbol decimals currency masterMinter fiatTokenOwner pauser blacklister version DOMAIN_SEPARATOR rescuer paused totalSupply + $ yarn hardhat readValuesFromContract --network ${NETWORK} \ + --contract-name FiatTokenV2_1 \ + --contract-address ${FiatTokenProxy address} \ + name symbol decimals currency masterMinter fiatTokenOwner pauser blacklister version DOMAIN_SEPARATOR rescuer paused totalSupply ``` -8. Verify that the list of accounts to blacklist is correct, and is set - correctly in the upgrader contract. Run the following command to check the - list. +10. Verify that the list of accounts to blacklist is correct, and is set + correctly in the upgrader contract. Run the following command to check the + list. - ```sh - $ yarn truffle exec scripts/validateAccountsToBlacklist.js ${FiatTokenProxy address} ${V2_2Upgrader address} --network=${NETWORK} - ``` + ```sh + $ yarn hardhat validateAccountsToBlacklist --network=${NETWORK} \ + --proxy-address ${FiatTokenProxy address} \ + --upgrader-address ${V2_2Upgrader address} + ``` -9. Using the Admin Key, transfer the proxy admin role to the `V2_2Upgrader` - contract address by calling `changeAdmin(address)` method on the - `FiatTokenProxy` contract. +11. Using the Admin Key, transfer the proxy admin role to the `V2_2Upgrader` + contract address by calling `changeAdmin(address)` method on the + `FiatTokenProxy` contract. -10. Send 0.20 FiatToken (eg USDC) to the `V2_2Upgrader` contract address. +12. Send 0.20 FiatToken (eg USDC) to the `V2_2Upgrader` contract address. (200,000 tokens) -11. Using the Deployer Key, call `upgrade()` (`0xd55ec697`) method on the +13. Using the Deployer Key, call `upgrade()` (`0xd55ec697`) method on the `V2_2Upgrader`. #### IF THE UPGRADE TRANSACTION SUCCEEDS @@ -125,57 +151,3 @@ function call will be reverted. - Call `abortUpgrade()` (`0xd8f6a8f6`) method on the `V2_2Upgrader` contract to tear it down. - -### Optional - Testing support for ERC-1271 compatible wallets - -FiatToken version 2.2 supports signature validation on the -[ERC-2612](https://eips.ethereum.org/EIPS/eip-2612) and -[ERC-3009](https://eips.ethereum.org/EIPS/eip-3009) features for -[ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) compatible wallets. You may -test this with a sample ERC-1271 wallet to the network. - -#### Preparation - -1. Prepare a FiatToken version 2.2 contract for testing. If a FiatToken contract - has never been deployed to the network, follow the steps in the - [deployment doc](./deployment.md) to deploy the contract to the network. - Otherwise, follow the [steps](#steps) above to upgrade your FiatToken - contract to version 2.2. -2. Prepare an address A (Wallet Owner Address) that you own the private key to. - This address does not require any chain-native token (e.g. ETH) for gas - usage. -3. Prepare an address B (Relayer Address) that you own the private key to. Add - some chain-native token (e.g. ETH) to this address to pay for gas. - -#### Instructions - -1. Look for the `deploy_erc1271_wallet` scripts in - [`./migrations/`](../migrations/). Set the `MIGRATION_START` and - `MIGRATION_END` variables based off the migration numbers of these scripts. - - ```sh - $ MIGRATION_START= - $ MIGRATION_END= - ``` - -2. Set the `MOCK_ERC1271_WALLET_OWNER_ADDRESS` in your `config.js` file to - address A. -3. Run Truffle migrations using the Deployer Key, and get the address of the - newly deployed `MockERC1271Wallet` contract. - ```sh - $ yarn migrate --network ${NETWORK} --f ${MIGRATION_START} --to ${MIGRATION_END} - ... - ... - Dry-run successful. Do you want to proceed with real deployment? >> (y/n): y - ... - ... - >>>>>>> Deployed MockERC1271Wallet at 0x12345678 <<<<<<< - ``` -4. Generate a `permit` transaction signature using address A. This transaction - signature would update the allowance of a designated spender to pull funds - from the deployed smart contract wallet (MockERC1271Wallet). -5. Broadcast the signed transaction using address B. You may rely on public - tools ([example for ETH mainnet](https://etherscan.io/pushTx)) to complete - this step. -6. The transaction should succeed and the allowance should also be updated. You - may validate these using a block explorer. diff --git a/doc/v2_upgrade.md b/doc/v2_upgrade.md deleted file mode 100644 index 5e4e3e082..000000000 --- a/doc/v2_upgrade.md +++ /dev/null @@ -1,68 +0,0 @@ -# V2 Upgrade - -### Prerequisites - -1. Truffle Deployer Key ("Deployer Key") -2. Proxy Admin Key ("Admin Key") - -### Steps - -1. Ensure `config.js` file in the project root folder is configured correctly - with correct values. - -2. Set the `NETWORK` variable to the network that you will like to deploy to in - your terminal. Ensure that the `NETWORK` that the contracts are to be - deployed to are defined in [`./truffle-config.js`](../truffle-config.js). - - ```sh - $ NETWORK=; - ``` - -3. Look for the `deploy_v2` and `deploy_v2_upgrader` scripts in - [`./migrations/`](../migrations/). Set the `MIGRATION_START` and - `MIGRATION_END` variables based off the migration numbers of these scripts. - - ```sh - $ MIGRATION_START= - $ MIGRATION_END= - ``` - -4. Run Truffle migrations using the Deployer Key, and get the address of the - newly deployed`V2Upgrader`contract. The address is highlighted (`>>><<<`) to - prevent accidental copying-and-pasting of an incorrect address. - - ```sh - $ yarn migrate --network ${NETWORK} --f ${MIGRATION_START} --to ${MIGRATION_END} - ... - ... - Dry-run successful. Do you want to proceed with real deployment? >> (y/n): y - ... - ... - >>>>>>> Deployed V2Upgrader at 0x12345678 <<<<<<< - ``` - -5. Verify that the upgrader contract is deployed correctly. Verify that the - values returned by `proxy()`, `implementation()`, `newProxyAdmin()`, and - `newName()` on the `V2Upgrader` contract are correct. - -6. Using the Admin Key, transfer the proxy admin role to the `V2Upgrader` - contract address by calling `changeAdmin(address)` method on the - `FiatTokenProxy` contract. - -7. Send 0.20 FiatToken (eg USDC) to the `V2Upgrader` contract address. (200,000 - tokens) - -8. Using the Deployer Key, call `upgrade()` (`0xd55ec697`) method on the - `V2Upgrader`. - -#### IF THE UPGRADE TRANSACTION SUCCEEDS - -- Verify that the proxy admin role is transferred back to the Admin Key. -- No further action needed. - -#### IF THE UPGRADE TRANSACTION FAILS - -- If the transaction fails, any state change that happened during the `upgrade` - function call will be reverted. -- Call `abortUpgrade()` (`0xd8f6a8f6`) method on the `V2Upgrader` contract to - tear it down. diff --git a/echidna_tests/README.md b/echidna_tests/README.md deleted file mode 100644 index 7558073b2..000000000 --- a/echidna_tests/README.md +++ /dev/null @@ -1,40 +0,0 @@ -#Setup - -1. Install the full version of - [solc](http://solidity.readthedocs.io/en/v0.4.24/installing-solidity.html) - via homebrew (not npm). - -2. Clone the echidna repository by running: - `git submodule add git@github.com:trailofbits/echidna.git` - `git submodule update --init --recursive` Make sure that the `echidna` - directory appears in your project root directory. (echidna is included in - .gitignore) - -3. Install stack: `brew install haskell-stack` - -4. Run the following commands from inside the echidna directory. Ignore all - warnings. `stack upgrade` `stack setup` `stack install` - -5. If this gives you errors involving 'readline' on MacOS, try running: - `brew install readline` `brew link readline --force` - `export LDFLAGS=-L/usr/local/opt/readline/lib` - `export CPPFLAGS=-I/usr/local/opt/readline/include` - `stack install readline --extra-include-dirs=/usr/local/opt/readline/include --extra-lib-dirs=/usr/local/opt/readline/lib` - `stack install` - -6. Add `/Users/$(whoami)/.local/bin` to your `PATH` variable: - `export PATH=$PATH:/Users/$(whoami)/.local/bin` - -7. Open `echidna_tests/config.yaml` in a text editor and replace the words - `REPLACE_WITH_PWD` with the path to the project root directory. To get this - path, run `echo $PWD`. - -8. The echidna_tests suite contains negative and positive test files. - -- To run the positive tests, open `config.yaml` and set the field `returnType` - to `Success`. Then, run the following command from the project root directory: - `echidna-test echidna_tests/positive.sol Test --config="echidna_tests/config.yaml"` -- To run the negative tests, open `config.yaml` and set the field `returnType` - to `Fail or Throw`. Then, run the following command from the project root - directory: - `echidna-test echidna_tests/negative.sol Test --config="echidna_tests/config.yaml"` diff --git a/echidna_tests/config.yaml b/echidna_tests/config.yaml deleted file mode 100644 index f044dc9cb..000000000 --- a/echidna_tests/config.yaml +++ /dev/null @@ -1,33 +0,0 @@ -#Arguments to solc -# PLEASE CHANGE THE LINE BELOW to include the absolute path of your working directory. -solcArgs: openzeppelin-solidity=REPLACE_WITH_PWD/node_modules/openzeppelin-solidity zos-lib=REPLACE_WITH_PWD/node_modules/zos-lib contracts=REPLACE_WITH_PWD/contracts -#Choose the number of epochs to use in coverage-guided testing -#epochs: 2 -#Set the gas limit for each test -#gasLimit: 0xfffff -#Number of tests that will run for each property -testLimit: 10000 -#Max call sequence length -range: 10 -#Contract's address in the EVM -contractAddr: 0x00a329c0648769a73afac7f9381e08fb43dbea72 -#Sender's address in the EVM -sender: 0x00a329c0648769a73afac7f9381e08fb43dbea70 -#List of addresses that will be used in all tests -addrList: - - 0x00a329c0648769a73afac7f9381e08fb43dbea70 - - 0x00a329c0648769a73afac7f9381e08fb43dbea72 - - 0x67518339e369ab3d591d3569ab0a0d83b2ff5198 - - 0x0 -#Shrink Limit -shrinkLimit: 1000 -#Test Prefix -prefix: echidna_ -#Print full coverage -printCoverage: false -#Return Type -# - Success: all tests should return true -# - Fail: all tests should return false -# - Throw: all tests should revert -# - Fail or Throw: all tests should either return false or revert -returnType: Fail or Throw diff --git a/echidna_tests/negative.sol b/echidna_tests/negative.sol deleted file mode 100644 index a35487bd8..000000000 --- a/echidna_tests/negative.sol +++ /dev/null @@ -1,75 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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.4.24; - -import "contracts/FiatTokenV1.sol"; - -contract Test is FiatTokenV1 { - //Note: These are special addresses used by echidna––please don't change. - address testerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea70; - address otherAddr = 0x67518339e369ab3d591d3569ab0a0d83b2ff5198; - address ownerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea72; - uint256 initial_totalSupply = 1000000000; - - constructor() public { - /* config.yaml sets this contract's address to ownerAddr, so we - need to initialize all the contract roles to this address so that calls - from the contract pass funtion modifiers.*/ - initialize( - "Test", - "", - "", - 6, - ownerAddr, - ownerAddr, - ownerAddr, - ownerAddr - ); - configureMinter(ownerAddr, initial_totalSupply); - mint(testerAddr, initial_totalSupply / 2); - require(balanceOf(testerAddr) == initial_totalSupply / 2); - mint(otherAddr, initial_totalSupply / 2); - require(balanceOf(otherAddr) == initial_totalSupply / 2); - } - - function echidna_failed_transaction() public returns (bool) { - uint256 balance = balanceOf(testerAddr); - transfer(testerAddr, balance + 1); - return (true); - } - - function echidna_self_approve_and_failed_transferFrom_to_zero() - public - returns (bool) - { - uint256 balance = balanceOf(testerAddr); - approve(testerAddr, 0); - approve(testerAddr, balance); - transferFrom(testerAddr, 0x0, balance); - return (true); - } - - function echidna_multiple_approves() public returns (bool) { - transfer(ownerAddr, 1); - uint256 balance = balanceOf(ownerAddr); - approve(testerAddr, balance); - approve(testerAddr, balance); - return (allowed[ownerAddr][testerAddr] == balance); - } -} diff --git a/echidna_tests/positive.sol b/echidna_tests/positive.sol deleted file mode 100644 index 7945ca3d9..000000000 --- a/echidna_tests/positive.sol +++ /dev/null @@ -1,98 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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.4.24; - -import "contracts/FiatTokenV1.sol"; - -contract Test is FiatTokenV1 { - //Note: These are special addresses used by echidna––don't change. - address testerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea70; - address otherAddr = 0x67518339e369ab3d591d3569ab0a0d83b2ff5198; - address ownerAddr = 0x00a329c0648769a73afac7f9381e08fb43dbea72; - uint256 initial_totalSupply = 1000000000; - - constructor() public { - /* config.yaml sets this contract's address to ownerAddr, so we - need to initialize all the contract roles to this address so that calls - from the contract pass funtion modifiers.*/ - initialize( - "Test", - "", - "", - 6, - ownerAddr, - ownerAddr, - ownerAddr, - ownerAddr - ); - configureMinter(ownerAddr, initial_totalSupply); - mint(testerAddr, initial_totalSupply / 2); - require(balanceOf(testerAddr) == initial_totalSupply / 2); - mint(otherAddr, initial_totalSupply / 2); - require(balanceOf(otherAddr) == initial_totalSupply / 2); - } - - function echidna_max_balance() public returns (bool) { - // config.yaml specifies testerAddr is always the 'sender' address in transfers. - return (balanceOf(testerAddr) <= initial_totalSupply / 2 && - balanceOf(otherAddr) >= initial_totalSupply / 2); - } - - function echidna_no_burn_using_zero() public returns (bool) { - return (balanceOf(0x0) == 0); - } - - function echidna_self_transfer() public returns (bool) { - uint256 balance = balanceOf(testerAddr); - var b = transfer(testerAddr, balance); - return (balanceOf(testerAddr) == balance && b); - } - - function echidna_zero_transfer() public returns (bool) { - return (transfer(otherAddr, 0)); - } - - function echidna_fixed_supply() public returns (bool) { - return (totalSupply() == initial_totalSupply); - } - - function echidna_self_approve_and_self_transferFrom() - public - returns (bool) - { - uint256 balance = balanceOf(testerAddr); - approve(testerAddr, 0); - approve(testerAddr, balance); - return (transferFrom(testerAddr, testerAddr, balance)); - } - - function echidna_self_approve_and_transferFrom() public returns (bool) { - uint256 balance = balanceOf(testerAddr); - approve(testerAddr, 0); - approve(testerAddr, balance); - return (transferFrom(testerAddr, otherAddr, balance)); - } - - function echidna_multiple_approves() public returns (bool) { - uint256 balance = balanceOf(testerAddr); - approve(ownerAddr, balance); - approve(ownerAddr, balance); - return (allowed[testerAddr][ownerAddr] == balance); - } -} diff --git a/stop-ganache.sh b/flatten-generated-types.sh similarity index 53% rename from stop-ganache.sh rename to flatten-generated-types.sh index 34edc1183..c1097da26 100755 --- a/stop-ganache.sh +++ b/flatten-generated-types.sh @@ -1,31 +1,22 @@ -#!/usr/bin/env bash +#!/bin/bash # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2024 Circle Internet Financial, LTD. All rights reserved. # -# Copyright (c) 2023, Circle Internet Financial, LLC. +# SPDX-License-Identifier: Apache-2.0 # # 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 +# 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. -# - -DOCROOT="$( cd "$( dirname "$0" )" && pwd )" -PIDS_DIRECTORY="${DOCROOT}/pids" -for arg in "ganache.pid" - do - if [[ -e "${PIDS_DIRECTORY}/${arg}" ]]; then - echo "Stopping ${arg}" - PID=$(cat "$PIDS_DIRECTORY/${arg}") - kill "${PID}" &>/dev/null - rm "${PIDS_DIRECTORY}/${arg}" - fi - done +DIR=@types/generated +echo "Flattening $DIR" +find $DIR -type f -mindepth 2 -exec mv {} $DIR \;; +find $DIR -type d -mindepth 1 -empty -delete; diff --git a/foundry.toml b/foundry.toml new file mode 100644 index 000000000..853f16d2e --- /dev/null +++ b/foundry.toml @@ -0,0 +1,35 @@ +# Copyright 2024 Circle Internet Financial, LTD. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +[profile.default] +src = "contracts" +out = "artifacts/foundry" +cache_path = "cache/foundry" +script = "scripts" +optimizer_runs = 10000000 +libs = [ + "lib", + "node_modules", +] +remappings = [ + "forge-std/=lib/forge-std/src", + "@openzeppelin/=node_modules/@openzeppelin/", +] +fs_permissions = [{ access = "read-write", path = "blacklist.remote.json"}] # https://book.getfoundry.sh/cheatcodes/fs + +[rpc_endpoints] +testnet = "${TESTNET_RPC_URL}" +mainnet = "${MAINNET_RPC_URL}" diff --git a/hardhat.config.ts b/hardhat.config.ts new file mode 100644 index 000000000..69ddeecff --- /dev/null +++ b/hardhat.config.ts @@ -0,0 +1,103 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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. + */ + +import dotenv from "dotenv"; + +import type { HardhatUserConfig } from "hardhat/config"; + +// Hardhat extensions +import "@nomicfoundation/hardhat-chai-matchers"; +import "@nomicfoundation/hardhat-ethers"; +import "@nomicfoundation/hardhat-foundry"; +import "@nomiclabs/hardhat-truffle5"; +import "@typechain/hardhat"; +import "hardhat-contract-sizer"; +import "hardhat-gas-reporter"; +import "solidity-coverage"; + +// Local hardhat scripts / tasks +import "./scripts/hardhat/downloadBlacklistedAccounts"; +import "./scripts/hardhat/getContractCreationBlock"; +import "./scripts/hardhat/readValuesFromContract"; +import "./scripts/hardhat/validateAccountsToBlacklist"; + +import "./scripts/hardhat/verifyBytecodeOnChain"; + +dotenv.config(); + +// Defaults to 1.3 to be equivalent with Foundry +const gasMultiplier = process.env.GAS_MULTIPLIER + ? parseFloat(process.env.GAS_MULTIPLIER) / 100 + : 1.3; + +const hardhatConfig: HardhatUserConfig = { + solidity: { + version: "0.6.12", + settings: { + optimizer: { + enabled: true, + runs: 10000000, + }, + }, + }, + paths: { + artifacts: "./artifacts/hardhat", + cache: "./cache/hardhat", + }, + defaultNetwork: "hardhat", + networks: { + hardhat: {}, + testnet: { + url: process.env.TESTNET_RPC_URL || "", + gasMultiplier, + }, + mainnet: { + url: process.env.MAINNET_RPC_URL || "", + gasMultiplier, + }, + }, + typechain: { + outDir: "./@types/generated", + target: "truffle-v5", + alwaysGenerateOverloads: false, + externalArtifacts: ["build/contracts/**/*.json"], + dontOverrideCompile: false, // defaults to false + }, + gasReporter: { + enabled: process.env.ENABLE_GAS_REPORTER == "true", + }, + mocha: { + timeout: 60000, // prevents tests from failing when pc is under heavy load + grep: process.env.HARDHAT_TEST_GREP, + invert: process.env.HARDHAT_TEST_INVERT === "true", + reporter: "mocha-multi-reporters", + reporterOptions: { + reporterEnabled: + process.env.CI === "true" ? "spec, mocha-junit-reporter" : "spec", + mochaJunitReporterReporterOptions: { + mochaFile: "report/junit.xml", + }, + }, + }, + contractSizer: { + strict: true, + except: ["contracts/test", "scripts/", "test/"], + }, +}; + +export default hardhatConfig; diff --git a/lib/forge-std b/lib/forge-std new file mode 160000 index 000000000..4513bc206 --- /dev/null +++ b/lib/forge-std @@ -0,0 +1 @@ +Subproject commit 4513bc2063f23c57bee6558799584b518d387a39 diff --git a/migrations/direct/1_initial_migration.js b/migrations/direct/1_initial_migration.js deleted file mode 100644 index c4913384a..000000000 --- a/migrations/direct/1_initial_migration.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 Migrations = artifacts.require("Migrations"); - -module.exports = async (deployer) => { - await deployer.deploy(Migrations); -}; diff --git a/migrations/direct/2_deploy_implementation_and_proxy.js b/migrations/direct/2_deploy_implementation_and_proxy.js deleted file mode 100644 index 5b0cebe5c..000000000 --- a/migrations/direct/2_deploy_implementation_and_proxy.js +++ /dev/null @@ -1,179 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const path = require("path"); - -const FiatTokenV2_2 = artifacts.require("FiatTokenV2_2"); -const FiatTokenProxy = artifacts.require("FiatTokenProxy"); -const MasterMinter = artifacts.require("MasterMinter"); -const SignatureChecker = artifacts.require("SignatureChecker"); - -const THROWAWAY_ADDRESS = "0x0000000000000000000000000000000000000001"; - -let proxyAdminAddress = ""; -let ownerAddress = ""; -let pauserAddress = ""; -let blacklisterAddress = ""; -let lostAndFoundAddress = ""; -let masterMinterOwnerAddress = ""; -let fiatTokenImplementationAddress = ""; -let tokenName = ""; -let tokenSymbol = ""; -let tokenCurrency = ""; -let tokenDecimals = ""; - -// Read config file if it exists -if (fs.existsSync(path.join(__dirname, "..", "..", "config.js"))) { - ({ - PROXY_ADMIN_ADDRESS: proxyAdminAddress, - OWNER_ADDRESS: ownerAddress, - PAUSER_ADDRESS: pauserAddress, - BLACKLISTER_ADDRESS: blacklisterAddress, - LOST_AND_FOUND_ADDRESS: lostAndFoundAddress, - MASTERMINTER_OWNER_ADDRESS: masterMinterOwnerAddress, - FIAT_TOKEN_IMPLEMENTATION_ADDRESS: fiatTokenImplementationAddress, - TOKEN_NAME: tokenName, - TOKEN_SYMBOL: tokenSymbol, - TOKEN_CURRENCY: tokenCurrency, - TOKEN_DECIMALS: tokenDecimals, - } = require("../../config.js")); -} - -/** - * A utility script to directly deploy Fiat Token contract with the latest implementation - * - * Note: The proxy needs to be deployed before the master minter; the proxy cannot - * be initialized until the master minter is deployed. - */ -module.exports = async (deployer, network) => { - if (!proxyAdminAddress || !ownerAddress || !masterMinterOwnerAddress) { - throw new Error( - "PROXY_ADMIN_ADDRESS, OWNER_ADDRESS, and MASTERMINTER_OWNER_ADDRESS must be provided in config.js" - ); - } - - if (!pauserAddress || !blacklisterAddress || !lostAndFoundAddress) { - if (network === "mainnet") { - throw new Error( - "PAUSER_ADDRESS, BLACKLISTER_ADDRESS and LOST_AND_FOUND_ADDRESS must be provided in config.js" - ); - } else { - // If we're not on mainnet, let the user values dictate this. - pauserAddress = pauserAddress || ownerAddress; - blacklisterAddress = blacklisterAddress || ownerAddress; - lostAndFoundAddress = lostAndFoundAddress || ownerAddress; - } - } - - console.log(`Proxy Admin: ${proxyAdminAddress}`); - console.log(`Owner: ${ownerAddress}`); - console.log(`Pauser: ${pauserAddress}`); - console.log(`Blacklister: ${blacklisterAddress}`); - console.log(`Lost and Found: ${lostAndFoundAddress}`); - console.log(`Master Minter Owner: ${masterMinterOwnerAddress}`); - console.log( - `FiatTokenImplementationAddress: ${fiatTokenImplementationAddress}` - ); - - // If there is an existing implementation contract, - // we can simply point the newly deployed proxy contract to it. - // Otherwise, deploy the latest implementation contract code to the network. - if (!fiatTokenImplementationAddress) { - console.log("Deploying and linking SignatureChecker library contract..."); - await deployer.deploy(SignatureChecker); - await deployer.link(SignatureChecker, FiatTokenV2_2); - - console.log("Deploying implementation contract..."); - await deployer.deploy(FiatTokenV2_2); - const fiatTokenV2_2 = await FiatTokenV2_2.deployed(); - console.log("Deployed implementation contract at", FiatTokenV2_2.address); - - console.log("Initializing implementation contract with dummy values..."); - // These values are dummy values because we only rely on the implementation - // deployment for delegatecall logic, not for actual state storage. - await fiatTokenV2_2.initialize( - "", - "", - "", - 0, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS - ); - await fiatTokenV2_2.initializeV2(""); - await fiatTokenV2_2.initializeV2_1(THROWAWAY_ADDRESS); - await fiatTokenV2_2.initializeV2_2([], ""); - - fiatTokenImplementationAddress = FiatTokenV2_2.address; - } - - console.log("Deploying proxy contract..."); - await deployer.deploy(FiatTokenProxy, fiatTokenImplementationAddress); - const fiatTokenProxy = await FiatTokenProxy.deployed(); - console.log("Deployed proxy contract at", FiatTokenProxy.address); - - // Now that the proxy contract has been deployed, we can deploy the master minter. - console.log("Deploying master minter..."); - await deployer.deploy(MasterMinter, FiatTokenProxy.address); - const masterMinter = await MasterMinter.deployed(); - console.log("Deployed master minter at", MasterMinter.address); - - // Change the master minter to be owned by the master minter owner - console.log("Reassigning master minter owner..."); - await masterMinter.transferOwnership(masterMinterOwnerAddress); - - // Now that the master minter is set up, we can go back to setting up the proxy and - // implementation contracts. - console.log("Reassigning proxy contract admin..."); - // Need to change admin first, or the call to initialize won't work - // since admin can only call methods in the proxy, and not forwarded methods - await fiatTokenProxy.changeAdmin(proxyAdminAddress); - - console.log("Initializing proxy contract..."); - - // Do the initial (V1) initialization. - // Note that this takes in the master minter contract's address as the master minter. - // The master minter contract's owner is a separate address. - const proxyAsV2_2 = await FiatTokenV2_2.at(FiatTokenProxy.address); - await proxyAsV2_2.initialize( - tokenName, - tokenSymbol, - tokenCurrency, - tokenDecimals, - masterMinter.address, - pauserAddress, - blacklisterAddress, - ownerAddress - ); - - // Do the V2 initialization - console.log("Initializing V2..."); - await proxyAsV2_2.initializeV2(tokenName); - - // Do the V2_1 initialization - console.log("Initializing V2.1..."); - await proxyAsV2_2.initializeV2_1(lostAndFoundAddress); - - // Do the V2_2 initialization - console.log("Initializing V2.2..."); - await proxyAsV2_2.initializeV2_2([], tokenSymbol); - - console.log("Deployment step 2 finished"); -}; diff --git a/migrations/versioned/10_deploy_master_minter.js b/migrations/versioned/10_deploy_master_minter.js deleted file mode 100644 index af16f0c8b..000000000 --- a/migrations/versioned/10_deploy_master_minter.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const path = require("path"); -const MasterMinter = artifacts.require("MasterMinter.sol"); -const FiatTokenProxy = artifacts.require("FiatTokenProxy.sol"); -let masterMinterOwnerAddress = ""; -let fiatTokenAddress = ""; - -// Read config file if it exists -if (fs.existsSync(path.join(__dirname, "..", "..", "config.js"))) { - ({ - MASTERMINTER_OWNER_ADDRESS: masterMinterOwnerAddress, - PROXY_CONTRACT_ADDRESS: fiatTokenAddress, - } = require("../../config.js")); -} - -module.exports = async (deployer, network) => { - if (network === "development" || network === "coverage") { - // Change these if deploying for real, these are deterministic - // address from ganache - masterMinterOwnerAddress = "0x3e5e9111ae8eb78fe1cc3bb8915d5d461f3ef9a9"; - fiatTokenAddress = FiatTokenProxy.address; - } - - console.log( - `Deploying MasterMinter for fiat token at ${fiatTokenAddress}...` - ); - - await deployer.deploy(MasterMinter, fiatTokenAddress); - const masterMinter = await MasterMinter.deployed(); - - console.log( - `>>>>>>> Deployed MasterMinter at ${masterMinter.address} <<<<<<<` - ); - console.log( - `Reassigning MasterMinter owner to ${masterMinterOwnerAddress}...` - ); - - await masterMinter.transferOwnership(masterMinterOwnerAddress); - console.log("All done."); -}; diff --git a/migrations/versioned/1_initial_migration.js b/migrations/versioned/1_initial_migration.js deleted file mode 100644 index c4913384a..000000000 --- a/migrations/versioned/1_initial_migration.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 Migrations = artifacts.require("Migrations"); - -module.exports = async (deployer) => { - await deployer.deploy(Migrations); -}; diff --git a/migrations/versioned/2_deploy_v1.js b/migrations/versioned/2_deploy_v1.js deleted file mode 100644 index 05c986fb6..000000000 --- a/migrations/versioned/2_deploy_v1.js +++ /dev/null @@ -1,136 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const path = require("path"); -const some = require("lodash/some"); - -const FiatTokenV1 = artifacts.require("FiatTokenV1"); -const FiatTokenProxy = artifacts.require("FiatTokenProxy"); - -const THROWAWAY_ADDRESS = "0x0000000000000000000000000000000000000001"; - -let proxyAdminAddress = ""; -let ownerAddress = ""; -let masterMinterAddress = ""; -let pauserAddress = ""; -let blacklisterAddress = ""; -let tokenName = ""; -let tokenSymbol = ""; -let tokenCurrency = ""; -let tokenDecimals = 0; - -// Read config file if it exists -if (fs.existsSync(path.join(__dirname, "..", "..", "config.js"))) { - ({ - PROXY_ADMIN_ADDRESS: proxyAdminAddress, - OWNER_ADDRESS: ownerAddress, - MASTERMINTER_ADDRESS: masterMinterAddress, - PAUSER_ADDRESS: pauserAddress, - BLACKLISTER_ADDRESS: blacklisterAddress, - TOKEN_NAME: tokenName, - TOKEN_SYMBOL: tokenSymbol, - TOKEN_CURRENCY: tokenCurrency, - TOKEN_DECIMALS: tokenDecimals, - } = require("../../config.js")); -} - -module.exports = async (deployer, network) => { - if (some(["development", "coverage"], (v) => network.includes(v))) { - // DO NOT USE THESE ADDRESSES IN PRODUCTION - these are the deterministic - // addresses from ganache, so the private keys are well known and match the - // values we use in the tests - proxyAdminAddress = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; - ownerAddress = "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d"; - masterMinterAddress = "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9"; - pauserAddress = "0xACa94ef8bD5ffEE41947b4585a84BdA5a3d3DA6E"; - blacklisterAddress = "0xd03ea8624C8C5987235048901fB614fDcA89b117"; - tokenName = "USD//C"; - tokenSymbol = "USDC"; - tokenCurrency = "USD"; - tokenDecimals = 6; - } - - console.log(`Proxy Admin: ${proxyAdminAddress}`); - console.log(`Owner: ${ownerAddress}`); - console.log(`Master Minter: ${masterMinterAddress}`); - console.log(`Pauser: ${pauserAddress}`); - console.log(`Blacklister: ${blacklisterAddress}`); - console.log(`Token Name: ${tokenName}`); - console.log(`Token Symbol: ${tokenSymbol}`); - console.log(`Token Currency: ${tokenCurrency}`); - console.log(`Token Decimals: ${tokenDecimals}`); - - if ( - !proxyAdminAddress || - !ownerAddress || - !masterMinterAddress || - !pauserAddress || - !blacklisterAddress || - !tokenName || - !tokenSymbol || - !tokenCurrency || - !tokenDecimals - ) { - throw new Error( - "PROXY_ADMIN_ADDRESS, OWNER_ADDRESS, MASTERMINTER_ADDRESS, PAUSER_ADDRESS, BLACKLISTER_ADDRESS, TOKEN_NAME, TOKEN_SYMBOL, TOKEN_CURRENCY, and TOKEN_DECIMALS must be provided in config.js" - ); - } - - console.log("Deploying implementation contract..."); - await deployer.deploy(FiatTokenV1); - const fiatTokenV1 = await FiatTokenV1.deployed(); - console.log("Deployed implementation contract at", FiatTokenV1.address); - - console.log("Initializing implementation contract with dummy values..."); - await fiatTokenV1.initialize( - "", - "", - "", - 0, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS - ); - - console.log("Deploying proxy contract..."); - await deployer.deploy(FiatTokenProxy, FiatTokenV1.address); - const fiatTokenProxy = await FiatTokenProxy.deployed(); - console.log("Deployed proxy contract at", FiatTokenProxy.address); - - console.log("Reassigning proxy contract admin..."); - // need to change admin first, or the call to initialize won't work - // since admin can only call methods in the proxy, and not forwarded methods - await fiatTokenProxy.changeAdmin(proxyAdminAddress); - - console.log("Initializing proxy contract..."); - // Pretend that the proxy address is a FiatTokenV1 - this is fine because the - // proxy will forward all the calls to the FiatTokenV1 impl - const proxyAsV1 = await FiatTokenV1.at(FiatTokenProxy.address); - await proxyAsV1.initialize( - tokenName, - tokenSymbol, - tokenCurrency, - tokenDecimals, - masterMinterAddress, - pauserAddress, - blacklisterAddress, - ownerAddress - ); -}; diff --git a/migrations/versioned/3_deploy_v2.js b/migrations/versioned/3_deploy_v2.js deleted file mode 100644 index 0fcc44a2b..000000000 --- a/migrations/versioned/3_deploy_v2.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const path = require("path"); -const some = require("lodash/some"); - -const FiatTokenV2 = artifacts.require("FiatTokenV2"); -const FiatTokenProxy = artifacts.require("FiatTokenProxy"); -const FiatTokenUtil = artifacts.require("FiatTokenUtil"); -const SignatureChecker = artifacts.require("SignatureChecker"); - -const THROWAWAY_ADDRESS = "0x0000000000000000000000000000000000000001"; - -let proxyContractAddress = ""; - -// Read config file if it exists -if (fs.existsSync(path.join(__dirname, "..", "..", "config.js"))) { - ({ - PROXY_CONTRACT_ADDRESS: proxyContractAddress, - } = require("../../config.js")); -} - -module.exports = async (deployer, network) => { - if ( - !proxyContractAddress || - some(["development", "coverage"], (v) => network.includes(v)) - ) { - proxyContractAddress = (await FiatTokenProxy.deployed()).address; - } - - console.log(`FiatTokenProxy: ${proxyContractAddress}`); - - console.log("Deploying and linking SignatureChecker library contract..."); - await deployer.deploy(SignatureChecker); - await deployer.link(SignatureChecker, FiatTokenV2); - - console.log("Deploying FiatTokenV2 implementation contract..."); - await deployer.deploy(FiatTokenV2); - - const fiatTokenV2 = await FiatTokenV2.deployed(); - console.log("Deployed FiatTokenV2 at", fiatTokenV2.address); - - // Initializing the implementation contract with dummy values here prevents - // the contract from being reinitialized later on with different values. - // Dummy values can be used here as the proxy contract will store the actual values - // for the deployed token. - console.log( - "Initializing FiatTokenV2 implementation contract with dummy values..." - ); - await fiatTokenV2.initialize( - "", - "", - "", - 0, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS - ); - await fiatTokenV2.initializeV2(""); - - console.log("Deploying FiatTokenUtil contract..."); - const fiatTokenUtil = await deployer.deploy( - FiatTokenUtil, - proxyContractAddress - ); - console.log("Deployed FiatTokenUtil at", fiatTokenUtil.address); -}; diff --git a/migrations/versioned/4_deploy_v2_upgrader.js b/migrations/versioned/4_deploy_v2_upgrader.js deleted file mode 100644 index 41eaf43a2..000000000 --- a/migrations/versioned/4_deploy_v2_upgrader.js +++ /dev/null @@ -1,73 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const path = require("path"); -const some = require("lodash/some"); - -const FiatTokenV2 = artifacts.require("FiatTokenV2"); -const FiatTokenProxy = artifacts.require("FiatTokenProxy"); -const V2Upgrader = artifacts.require("V2Upgrader"); - -let proxyAdminAddress = ""; -let proxyContractAddress = ""; -let tokenName = ""; - -// Read config file if it exists -if (fs.existsSync(path.join(__dirname, "..", "..", "config.js"))) { - ({ - PROXY_ADMIN_ADDRESS: proxyAdminAddress, - PROXY_CONTRACT_ADDRESS: proxyContractAddress, - TOKEN_NAME: tokenName, - } = require("../../config.js")); -} - -module.exports = async (deployer, network) => { - if (some(["development", "coverage"], (v) => network.includes(v))) { - // DO NOT USE THIS ADDRESS IN PRODUCTION - proxyAdminAddress = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; - proxyContractAddress = (await FiatTokenProxy.deployed()).address; - } - proxyContractAddress = - proxyContractAddress || (await FiatTokenProxy.deployed()).address; - - const fiatTokenV2 = await FiatTokenV2.deployed(); - - console.log(`Proxy Admin: ${proxyAdminAddress}`); - console.log(`FiatTokenProxy: ${proxyContractAddress}`); - console.log(`FiatTokenV2: ${fiatTokenV2.address}`); - console.log(`Token Name: ${tokenName}`); - - if (!proxyContractAddress || !proxyAdminAddress || !tokenName) { - throw new Error( - "PROXY_CONTRACT_ADDRESS, PROXY_ADMIN_ADDRESS, and TOKEN_NAME must be provided in config.js" - ); - } - - console.log("Deploying V2Upgrader contract..."); - - const v2Upgrader = await deployer.deploy( - V2Upgrader, - proxyContractAddress, - fiatTokenV2.address, - proxyAdminAddress, - tokenName - ); - - console.log(`>>>>>>> Deployed V2Upgrader at ${v2Upgrader.address} <<<<<<<`); -}; diff --git a/migrations/versioned/5_deploy_v2_1.js b/migrations/versioned/5_deploy_v2_1.js deleted file mode 100644 index dcaeedcc0..000000000 --- a/migrations/versioned/5_deploy_v2_1.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const path = require("path"); -const some = require("lodash/some"); - -const FiatTokenV2_1 = artifacts.require("FiatTokenV2_1"); -const FiatTokenProxy = artifacts.require("FiatTokenProxy"); -const SignatureChecker = artifacts.require("SignatureChecker"); - -const THROWAWAY_ADDRESS = "0x0000000000000000000000000000000000000001"; - -let proxyContractAddress = ""; - -// Read config file if it exists -if (fs.existsSync(path.join(__dirname, "..", "..", "config.js"))) { - ({ - PROXY_CONTRACT_ADDRESS: proxyContractAddress, - } = require("../../config.js")); -} - -module.exports = async (deployer, network) => { - if ( - !proxyContractAddress || - some(["development", "coverage"], (v) => network.includes(v)) - ) { - proxyContractAddress = (await FiatTokenProxy.deployed()).address; - } - - console.log(`FiatTokenProxy: ${proxyContractAddress}`); - - console.log("Deploying and linking SignatureChecker library contract..."); - await deployer.deploy(SignatureChecker); - await deployer.link(SignatureChecker, FiatTokenV2_1); - - console.log("Deploying FiatTokenV2_1 implementation contract..."); - await deployer.deploy(FiatTokenV2_1); - - const fiatTokenV2_1 = await FiatTokenV2_1.deployed(); - console.log("Deployed FiatTokenV2_1 at", fiatTokenV2_1.address); - - // Initializing the implementation contract with dummy values here prevents - // the contract from being reinitialized later on with different values. - // Dummy values can be used here as the proxy contract will store the actual values - // for the deployed token. - console.log( - "Initializing FiatTokenV2_1 implementation contract with dummy values..." - ); - await fiatTokenV2_1.initialize( - "", - "", - "", - 0, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS - ); - await fiatTokenV2_1.initializeV2(""); - await fiatTokenV2_1.initializeV2_1(THROWAWAY_ADDRESS); -}; diff --git a/migrations/versioned/6_deploy_v2_1_upgrader.js b/migrations/versioned/6_deploy_v2_1_upgrader.js deleted file mode 100644 index 58e353cc9..000000000 --- a/migrations/versioned/6_deploy_v2_1_upgrader.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const path = require("path"); -const some = require("lodash/some"); - -const FiatTokenV2_1 = artifacts.require("FiatTokenV2_1"); -const FiatTokenProxy = artifacts.require("FiatTokenProxy"); -const V2_1Upgrader = artifacts.require("V2_1Upgrader"); - -let proxyAdminAddress = ""; -let proxyContractAddress = ""; -let lostAndFoundAddress = ""; - -// Read config file if it exists -if (fs.existsSync(path.join(__dirname, "..", "..", "config.js"))) { - ({ - PROXY_ADMIN_ADDRESS: proxyAdminAddress, - PROXY_CONTRACT_ADDRESS: proxyContractAddress, - LOST_AND_FOUND_ADDRESS: lostAndFoundAddress, - } = require("../../config.js")); -} - -module.exports = async (deployer, network) => { - if (some(["development", "coverage"], (v) => network.includes(v))) { - // DO NOT USE THESE ADDRESSES IN PRODUCTION - proxyAdminAddress = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; - proxyContractAddress = (await FiatTokenProxy.deployed()).address; - lostAndFoundAddress = "0x610Bb1573d1046FCb8A70Bbbd395754cD57C2b60"; - } - proxyContractAddress = - proxyContractAddress || (await FiatTokenProxy.deployed()).address; - - if (!lostAndFoundAddress) { - throw new Error("LOST_AND_FOUND_ADDRESS must be provided in config.js"); - } - - const fiatTokenV2_1 = await FiatTokenV2_1.deployed(); - - console.log(`Proxy Admin: ${proxyAdminAddress}`); - console.log(`FiatTokenProxy: ${proxyContractAddress}`); - console.log(`FiatTokenV2_1: ${fiatTokenV2_1.address}`); - console.log(`Lost & Found: ${lostAndFoundAddress}`); - - if (!proxyAdminAddress) { - throw new Error("PROXY_ADMIN_ADDRESS must be provided in config.js"); - } - - console.log("Deploying V2_1Upgrader contract..."); - - const v2_1Upgrader = await deployer.deploy( - V2_1Upgrader, - proxyContractAddress, - fiatTokenV2_1.address, - proxyAdminAddress, - lostAndFoundAddress - ); - - console.log( - `>>>>>>> Deployed V2_1Upgrader at ${v2_1Upgrader.address} <<<<<<<` - ); -}; diff --git a/migrations/versioned/7_deploy_v2_2.js b/migrations/versioned/7_deploy_v2_2.js deleted file mode 100644 index 7e8f95a52..000000000 --- a/migrations/versioned/7_deploy_v2_2.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const path = require("path"); -const some = require("lodash/some"); - -const FiatTokenV2_2 = artifacts.require("FiatTokenV2_2"); -const FiatTokenProxy = artifacts.require("FiatTokenProxy"); -const SignatureChecker = artifacts.require("SignatureChecker"); - -const THROWAWAY_ADDRESS = "0x0000000000000000000000000000000000000001"; - -let proxyContractAddress = ""; - -// Read config file if it exists -if (fs.existsSync(path.join(__dirname, "..", "..", "config.js"))) { - ({ - PROXY_CONTRACT_ADDRESS: proxyContractAddress, - } = require("../../config.js")); -} - -module.exports = async (deployer, network) => { - if ( - !proxyContractAddress || - some(["development", "coverage"], (v) => network.includes(v)) - ) { - proxyContractAddress = (await FiatTokenProxy.deployed()).address; - } - - console.log(`FiatTokenProxy: ${proxyContractAddress}`); - - console.log("Deploying and linking SignatureChecker library contract..."); - await deployer.deploy(SignatureChecker); - await deployer.link(SignatureChecker, FiatTokenV2_2); - - console.log("Deploying FiatTokenV2_2 implementation contract..."); - await deployer.deploy(FiatTokenV2_2); - - const fiatTokenV2_2 = await FiatTokenV2_2.deployed(); - console.log("Deployed FiatTokenV2_2 at", fiatTokenV2_2.address); - - // Initializing the implementation contract with dummy values here prevents - // the contract from being reinitialized later on with different values. - // Dummy values can be used here as the proxy contract will store the actual values - // for the deployed token. - console.log( - "Initializing FiatTokenV2_2 implementation contract with dummy values..." - ); - await fiatTokenV2_2.initialize( - "", - "", - "", - 0, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS, - THROWAWAY_ADDRESS - ); - await fiatTokenV2_2.initializeV2(""); - await fiatTokenV2_2.initializeV2_1(THROWAWAY_ADDRESS); - await fiatTokenV2_2.initializeV2_2([], ""); -}; diff --git a/migrations/versioned/8_deploy_v2_2_upgrader.js b/migrations/versioned/8_deploy_v2_2_upgrader.js deleted file mode 100644 index 6b96c869b..000000000 --- a/migrations/versioned/8_deploy_v2_2_upgrader.js +++ /dev/null @@ -1,89 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const path = require("path"); -const some = require("lodash/some"); -const { readBlacklistFile } = require("../../utils"); - -const FiatTokenV2_2 = artifacts.require("FiatTokenV2_2"); -const FiatTokenProxy = artifacts.require("FiatTokenProxy"); -const V2_2Upgrader = artifacts.require("V2_2Upgrader"); - -let proxyAdminAddress = ""; -let proxyContractAddress = ""; -let newTokenSymbol = ""; - -// Read config file if it exists -if (fs.existsSync(path.join(__dirname, "..", "..", "config.js"))) { - ({ - PROXY_ADMIN_ADDRESS: proxyAdminAddress, - PROXY_CONTRACT_ADDRESS: proxyContractAddress, - TOKEN_SYMBOL: newTokenSymbol, - } = require("../../config.js")); -} - -module.exports = async (deployer, network) => { - const isTestEnvironment = some(["development", "coverage"], (v) => - network.includes(v) - ); - - // Proceed if and only if the blacklist file exists. - const accountsToBlacklist = readBlacklistFile( - path.join( - __dirname, - "..", - "..", - isTestEnvironment ? "blacklist.test.json" : "blacklist.remote.json" - ) - ); - - if (isTestEnvironment) { - // DO NOT USE THESE ADDRESSES IN PRODUCTION - proxyAdminAddress = "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598"; - proxyContractAddress = (await FiatTokenProxy.deployed()).address; - } - proxyContractAddress = - proxyContractAddress || (await FiatTokenProxy.deployed()).address; - - if (!proxyAdminAddress) { - throw new Error("PROXY_ADMIN_ADDRESS must be provided in config.js"); - } - - const fiatTokenV2_2 = await FiatTokenV2_2.deployed(); - - console.log(`Proxy Admin: ${proxyAdminAddress}`); - console.log(`FiatTokenProxy: ${proxyContractAddress}`); - console.log(`FiatTokenV2_2: ${fiatTokenV2_2.address}`); - console.log(`New Token Symbol: ${newTokenSymbol}`); - - console.log("Deploying V2_2Upgrader contract..."); - - const v2_2Upgrader = await deployer.deploy( - V2_2Upgrader, - proxyContractAddress, - fiatTokenV2_2.address, - proxyAdminAddress, - accountsToBlacklist, - newTokenSymbol - ); - - console.log( - `>>>>>>> Deployed V2_2Upgrader at ${v2_2Upgrader.address} <<<<<<<` - ); -}; diff --git a/migrations/versioned/9_deploy_erc1271_wallet.js b/migrations/versioned/9_deploy_erc1271_wallet.js deleted file mode 100644 index 6fba754db..000000000 --- a/migrations/versioned/9_deploy_erc1271_wallet.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const path = require("path"); -const some = require("lodash/some"); - -const MockERC1271Wallet = artifacts.require("MockERC1271Wallet"); - -let mockERC1271WalletOwnerAddress = ""; - -// Read config file if it exists -if (fs.existsSync(path.join(__dirname, "..", "..", "config.js"))) { - ({ - MOCK_ERC1271_WALLET_OWNER_ADDRESS: mockERC1271WalletOwnerAddress, - } = require("../../config.js")); -} - -module.exports = async (deployer, network, accounts) => { - const isTestEnvironment = some(["development", "coverage"], (v) => - network.includes(v) - ); - - if (isTestEnvironment) { - mockERC1271WalletOwnerAddress = accounts[0]; - } - - if (!mockERC1271WalletOwnerAddress) { - throw new Error( - "MOCK_ERC1271_WALLET_OWNER_ADDRESS must be provided in config.js" - ); - } - - console.log("Deploying MockERC1271Wallet contract..."); - - await deployer.deploy(MockERC1271Wallet, mockERC1271WalletOwnerAddress); - const walletAddress = (await MockERC1271Wallet.deployed()).address; - - console.log(`>>>>>>> Deployed MockERC1271Wallet at ${walletAddress} <<<<<<<`); -}; diff --git a/package.json b/package.json index f917cbc70..435457790 100644 --- a/package.json +++ b/package.json @@ -2,26 +2,26 @@ "name": "stablecoin-evm", "version": "1.0.0", "description": "Circle's Stablecoin Smart Contracts on EVM-compatible blockchains", - "main": "truffle-config.js", "directories": { "test": "test" }, "scripts": { - "compile": "truffle compile", - "contract-size": "yarn contract-size:all --contracts $(find ./contracts -name \"*.sol\" -not -path \"./contracts/test/*\" | xargs -I {} /bin/bash -c 'basename {} .sol')", - "contract-size:all": "yarn compile && truffle run contract-size --checkMaxSize", - "coverage": "truffle run coverage", - "fmt": "prettier --write './**/*.sol' './**/*.js' './**/*.ts' './**/*.json' './**/*.md'", - "ganache": "ganache-cli --accounts=15 --deterministic --defaultBalanceEther=1000000 --allowUnlimitedContractSize --gasLimit=0x1C9C380 --quiet", + "compile": "hardhat compile && forge build && ./flatten-generated-types.sh", + "contract-size": "hardhat size-contracts", + "coverage": "hardhat coverage", + "forge:simulate": "forge script -vv --gas-estimate-multiplier $(dotenv -p GAS_MULTIPLIER)", + "forge:broadcast": "yarn forge:simulate --broadcast", + "forge:verify": "yarn forge:simulate --verify --resume --etherscan-api-key $(dotenv -p ETHERSCAN_KEY)", + "fmt:base": "prettier './**/*.sol' './**/*.js' './**/*.ts' './**/*.json' './**/*.md'", + "fmt:check": "yarn fmt:base --check", + "fmt": "yarn fmt:base --write", + "gas-report": "hardhat test test/misc/gas.ts", "lint": "eslint --ext '.js,.ts' './**/*.{j,t}s'", - "migrate": "truffle migrate --interactive", - "prepare": "husky install", + "postinstall": "bash setup.sh && husky install", "precommit": "yarn fmt && yarn static-check", - "slither": "slither --solc-disable-warnings --disable-color --exclude-dependencies .", "solhint": "solhint 'contracts/**/*.sol'", - "static-check": "yarn typechain && yarn typecheck && yarn lint && yarn solhint", - "test": "USE_VERSIONED_MIGRATIONS=true truffle test", - "typechain": "yarn compile && rm -rf './@types/generated' && typechain --target=truffle-v5 --outDir './@types/generated' 'build/contracts/**/*.json'", + "static-check": "yarn hardhat typechain && yarn typecheck && yarn lint && yarn fmt:check && yarn solhint", + "test": "hardhat test", "typecheck": "tsc -p . --noEmit" }, "repository": { @@ -37,18 +37,27 @@ "homepage": "https://github.com/circlefin/stablecoin-evm#readme", "dependencies": {}, "devDependencies": { + "@nomicfoundation/hardhat-chai-matchers": "2.0.2", + "@nomicfoundation/hardhat-ethers": "3.0.4", + "@nomicfoundation/hardhat-foundry": "1.1.1", + "@nomicfoundation/hardhat-network-helpers": "1.0.8", + "@nomiclabs/hardhat-truffle5": "2.0.7", + "@nomiclabs/hardhat-web3": "2.0.0", "@openzeppelin/contracts": "^3.1.0", - "@truffle/hdwallet-provider": "^1.0.39", - "@typechain/truffle-v5": "^2.0.2", - "@types/chai": "^4.2.11", + "@typechain/ethers-v6": "^0.4.0", + "@typechain/hardhat": "^9.0.0", + "@typechain/truffle-v5": "^8.0.6", + "@types/chai": "4.3.5", "@types/ethereumjs-abi": "^0.6.3", "@types/lodash": "^4.14.158", - "@types/mocha": "^8.0.0", + "@types/mocha": "10.0.1", + "@types/node": "20.5.1", "@typescript-eslint/eslint-plugin": "^3.7.0", "@typescript-eslint/parser": "^3.7.0", "assert-diff": "1.2.6", "chai": "^4.2.0", - "diff": "^4.0.2", + "dotenv": "^16.4.1", + "dotenv-cli": "^7.3.0", "eslint": "^7.5.0", "eslint-config-prettier": "^6.11.0", "eslint-config-standard": "^14.1.1", @@ -58,23 +67,24 @@ "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", "ethereumjs-abi": "^0.6.8", - "ethereumjs-tx": "^2.1.2", "ethereumjs-util": "^7.0.3", - "ganache-cli": "^6.12.2", - "googleapis": "^55.0.0", + "ethers": "^6.11.0", + "hardhat": "2.19.4", + "hardhat-contract-sizer": "^2.10.0", + "hardhat-gas-reporter": "^1.0.10", "husky": "^8.0.3", "lodash": "^4.17.19", + "mocha-junit-reporter": "^2.2.1", + "mocha-multi-reporters": "^1.5.1", "prettier": "2.0.5", "prettier-plugin-solidity": "1.0.0-alpha.54", "q": "^1.5.1", "solc": "0.6.12", "solhint": "^3.1.0", - "solidity-coverage": "0.7.22", - "truffle": "5.1.49", - "truffle-contract-size": "^2.0.1", - "ts-node": "^8.10.2", - "typechain": "^2.0.0", - "typescript": "5.1.6", + "solidity-coverage": "^0.8.9", + "ts-node": ">=8.0.0", + "typechain": "^8.1.0", + "typescript": ">=4.5.0", "web3": "^1.2.11" }, "engines": { diff --git a/scripts/callContractROFunctions.js b/scripts/callContractROFunctions.js deleted file mode 100644 index 8a8f34992..000000000 --- a/scripts/callContractROFunctions.js +++ /dev/null @@ -1,137 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 _ = require("lodash"); - -/** - * A utility script that calls a series of read-only functions with no inputs - * on a contract, and prints the results to console. - * @param {string} contractName The name of the contract. Eg. FiatTokenV2_1 - * @param {string} contractAddress The address of the contract - * @param {string[]} functionNames An array of read-only function names to be called. - */ -async function main(contractName, contractAddress, functionNames) { - let Contract; - try { - Contract = require(`../build/contracts/${contractName}.json`); - } catch (e) { - throw new Error( - `Cannot find abi '${contractName}'! Run \`yarn compile\` to generate the abi first!` - ); - } - - if ((await web3.eth.getCode(contractAddress)).length <= 2) { - throw new Error(`Cannot find contract at address '${contractAddress}'!`); - } - - const viewFunctionResults = await Promise.all( - functionNames.map((funcName) => - conditionalCallROFunction(Contract, contractAddress, funcName) - ) - ); - - const result = _.fromPairs( - _.zip(functionNames, viewFunctionResults), - (element) => element[0] - ); - console.log(JSON.stringify(result, null, 2)); -} - -/** - * Memory addresses for the return data of certain read-only functions - * on the FiatTokenProxy contract. - */ -const FiatTokenProxy_SLOT_ADDRESSES = { - admin: "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b", - implementation: - "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3", -}; - -/** - * Conditionally calls a read-only function from a contract, depending on the contractName. - * - * If the contract is FiatTokenProxy, and either `name()` or `implementation()` is requested, - * then first try to get the result by calling the function, reading from storage slots as a fallback - * since these functions return data from static memory addresses. - * - * Otherwise, get the result by calling the function. - * @param {object} Contract The JSON abi for the contract - * @param {string} contractAddress The address of the contract. - * @param {string} funcName The read-only function to be called. - * @returns The result from calling the function. - */ -async function conditionalCallROFunction(Contract, contractAddress, funcName) { - const contract = new web3.eth.Contract(Contract.abi, contractAddress); - - if (!contract.methods[funcName]) { - throw new Error(`Cannot find ${funcName} in contract!`); - } - - if ( - Contract.contractName === "FiatTokenProxy" && - ["admin", "implementation"].includes(funcName) - ) { - try { - return await contract.methods[funcName]().call(); - } catch { - const storageResult = await web3.eth.getStorageAt( - contractAddress, - FiatTokenProxy_SLOT_ADDRESSES[funcName] - ); - return web3.utils.toChecksumAddress("0x" + storageResult.slice(26)); - } - } - - return await contract.methods[funcName]().call(); -} - -module.exports = async (callback) => { - /* eslint-disable no-undef -- Config is a global variable in a truffle exec script https://github.com/trufflesuite/truffle/pull/3233 */ - const network = config.network; - const argv = config._; - - const contractName = config.contractName; - const rawContractAddress = config.contractAddress; - const functionNames = argv.slice(1); - /* eslint-enable no-undef */ - - const usageError = new Error( - "Usage: yarn truffle exec scripts/callContractROFunctions.js [--network=] \n" + - "--contract-name=\n" + - "--contract-address=<0x-stripped address>\n" + - "[functionNames...]" - ); - - const contractAddress = `0x${rawContractAddress}`; - - console.log(`network: ${network}`); - console.log(`contractName: ${contractName}`); - console.log(`contractAddress: ${contractAddress}`); - console.log(`functionNames: ${functionNames}`); - - if (!web3.utils.isAddress(contractAddress)) { - callback(usageError); - } else { - try { - await main(contractName, contractAddress, functionNames); - callback(); - } catch (e) { - callback(e); - } - } -}; diff --git a/scripts/deploy/DeployImpl.sol b/scripts/deploy/DeployImpl.sol new file mode 100644 index 000000000..ea4bf00ad --- /dev/null +++ b/scripts/deploy/DeployImpl.sol @@ -0,0 +1,66 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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.12; + +import { FiatTokenV2_2 } from "../../contracts/v2/FiatTokenV2_2.sol"; + +/** + * @notice A utility contract that exposes a re-useable getOrDeployImpl function. + */ +contract DeployImpl { + address private immutable THROWAWAY_ADDRESS = address(1); + + /** + * @notice helper function that either + * 1) deploys the implementation contract if the input is the zero address, or + * 2) loads an instance of an existing contract when input is not the zero address. + * + * @param impl configured of the implementation contract, where address(0) represents a new instance should be deployed + * @return FiatTokenV2_2 newly deployed or loaded instance + */ + function getOrDeployImpl(address impl) internal returns (FiatTokenV2_2) { + FiatTokenV2_2 fiatTokenV2_2; + + if (impl == address(0)) { + fiatTokenV2_2 = new FiatTokenV2_2(); + + // Initializing the implementation contract with dummy values here prevents + // the contract from being reinitialized later on with different values. + // Dummy values can be used here as the proxy contract will store the actual values + // for the deployed token. + fiatTokenV2_2.initialize( + "", + "", + "", + 0, + THROWAWAY_ADDRESS, + THROWAWAY_ADDRESS, + THROWAWAY_ADDRESS, + THROWAWAY_ADDRESS + ); + fiatTokenV2_2.initializeV2(""); + fiatTokenV2_2.initializeV2_1(THROWAWAY_ADDRESS); + fiatTokenV2_2.initializeV2_2(new address[](0), ""); + } else { + fiatTokenV2_2 = FiatTokenV2_2(impl); + } + + return fiatTokenV2_2; + } +} diff --git a/scripts/deploy/deploy-fiat-token.s.sol b/scripts/deploy/deploy-fiat-token.s.sol new file mode 100644 index 000000000..24d1fbded --- /dev/null +++ b/scripts/deploy/deploy-fiat-token.s.sol @@ -0,0 +1,174 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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.12; + +import "forge-std/console.sol"; // solhint-disable no-global-import, no-console +import { Script } from "forge-std/Script.sol"; +import { DeployImpl } from "./DeployImpl.sol"; +import { FiatTokenProxy } from "../../contracts/v1/FiatTokenProxy.sol"; +import { FiatTokenV2_2 } from "../../contracts/v2/FiatTokenV2_2.sol"; +import { MasterMinter } from "../../contracts/minting/MasterMinter.sol"; + +/** + * A utility script to directly deploy Fiat Token contract with the latest implementation + * + * @dev The proxy needs to be deployed before the master minter; the proxy cannot + * be initialized until the master minter is deployed. + */ +contract DeployFiatToken is Script, DeployImpl { + address private immutable THROWAWAY_ADDRESS = address(1); + + address private impl; + address private masterMinterOwner; + address private proxyAdmin; + address private owner; + address private pauser; + address private blacklister; + address private lostAndFound; + + string private tokenName; + string private tokenSymbol; + string private tokenCurrency; + uint8 private tokenDecimals; + + uint256 private deployerPrivateKey; + + /** + * @notice initialize variables from environment + */ + function setUp() public { + tokenName = vm.envString("TOKEN_NAME"); + tokenSymbol = vm.envString("TOKEN_SYMBOL"); + tokenCurrency = vm.envString("TOKEN_CURRENCY"); + tokenDecimals = uint8(vm.envUint("TOKEN_DECIMALS")); + + impl = vm.envOr("FIAT_TOKEN_IMPLEMENTATION_ADDRESS", address(0)); + proxyAdmin = vm.envAddress("PROXY_ADMIN_ADDRESS"); + masterMinterOwner = vm.envAddress("MASTER_MINTER_OWNER_ADDRESS"); + owner = vm.envAddress("OWNER_ADDRESS"); + + // Pauser, blacklister, and lost and found addresses can default to owner address + pauser = vm.envOr("PAUSER_ADDRESS", owner); + blacklister = vm.envOr("BLACKLISTER_ADDRESS", owner); + lostAndFound = vm.envOr("LOST_AND_FOUND_ADDRESS", owner); + + deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY"); + + console.log("TOKEN_NAME: '%s'", tokenName); + console.log("TOKEN_SYMBOL: '%s'", tokenSymbol); + console.log("TOKEN_CURRENCY: '%s'", tokenCurrency); + console.log("TOKEN_DECIMALS: '%s'", tokenDecimals); + console.log("FIAT_TOKEN_IMPLEMENTATION_ADDRESS: '%s'", impl); + console.log("PROXY_ADMIN_ADDRESS: '%s'", proxyAdmin); + console.log("MASTER_MINTER_OWNER_ADDRESS: '%s'", masterMinterOwner); + console.log("OWNER_ADDRESS: '%s'", owner); + console.log("PAUSER_ADDRESS: '%s'", pauser); + console.log("BLACKLISTER_ADDRESS: '%s'", blacklister); + console.log("LOST_AND_FOUND_ADDRESS: '%s'", lostAndFound); + } + + /** + * @dev For testing only: splitting deploy logic into an internal function to expose for testing + */ + function _deploy(address _impl) + internal + returns ( + FiatTokenV2_2, + MasterMinter, + FiatTokenProxy + ) + { + vm.startBroadcast(deployerPrivateKey); + + // If there is an existing implementation contract, + // we can simply point the newly deployed proxy contract to it. + // Otherwise, deploy the latest implementation contract code to the network. + FiatTokenV2_2 fiatTokenV2_2 = getOrDeployImpl(_impl); + + FiatTokenProxy proxy = new FiatTokenProxy(address(fiatTokenV2_2)); + + // Now that the proxy contract has been deployed, we can deploy the master minter. + MasterMinter masterMinter = new MasterMinter(address(proxy)); + + // Change the master minter to be owned by the master minter owner + masterMinter.transferOwnership(masterMinterOwner); + + // Now that the master minter is set up, we can go back to setting up the proxy and + // implementation contracts. + // Need to change admin first, or the call to initialize won't work + // since admin can only call methods in the proxy, and not forwarded methods + proxy.changeAdmin(proxyAdmin); + + // Do the initial (V1) initialization. + // Note that this takes in the master minter contract's address as the master minter. + // The master minter contract's owner is a separate address. + FiatTokenV2_2 proxyAsV2_2 = FiatTokenV2_2(address(proxy)); + proxyAsV2_2.initialize( + tokenName, + tokenSymbol, + tokenCurrency, + tokenDecimals, + address(masterMinter), + pauser, + blacklister, + owner + ); + + // Do the V2 initialization + proxyAsV2_2.initializeV2(tokenName); + + // Do the V2_1 initialization + proxyAsV2_2.initializeV2_1(lostAndFound); + + // Do the V2_2 initialization + proxyAsV2_2.initializeV2_2(new address[](0), tokenSymbol); + + vm.stopBroadcast(); + + return (fiatTokenV2_2, masterMinter, proxy); + } + + /** + * @dev For testing only: Helper function that runs deploy script with a specific implementation address + */ + function deploy(address _impl) + external + returns ( + FiatTokenV2_2, + MasterMinter, + FiatTokenProxy + ) + { + return _deploy(_impl); + } + + /** + * @notice main function that will be run by forge + */ + function run() + external + returns ( + FiatTokenV2_2, + MasterMinter, + FiatTokenProxy + ) + { + return _deploy(impl); + } +} diff --git a/scripts/deploy/deploy-impl-and-upgrader.s.sol b/scripts/deploy/deploy-impl-and-upgrader.s.sol new file mode 100644 index 000000000..82a62f281 --- /dev/null +++ b/scripts/deploy/deploy-impl-and-upgrader.s.sol @@ -0,0 +1,121 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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.12; + +import "forge-std/console.sol"; // solhint-disable no-global-import, no-console +import { Script } from "forge-std/Script.sol"; +import { DeployImpl } from "./DeployImpl.sol"; +import { FiatTokenProxy } from "../../contracts/v1/FiatTokenProxy.sol"; +import { FiatTokenV2_2 } from "../../contracts/v2/FiatTokenV2_2.sol"; +import { V2_2Upgrader } from "../../contracts/v2/upgrader/V2_2Upgrader.sol"; + +/** + * A utility script to deploy the latest fiat token implementation and + * an upgrader contract that updates fiat token use the latest implementation + */ +contract DeployImplAndUpgrader is Script, DeployImpl { + string private newTokenSymbol; + address private impl; + address payable private proxyContractAddress; + address private proxyAdmin; + address private lostAndFound; + address[] private accountsToBlacklist; + + uint256 private deployerPrivateKey; + + /** + * @notice initialize variables from environment + */ + function setUp() public { + impl = vm.envOr("FIAT_TOKEN_IMPLEMENTATION_ADDRESS", address(0)); + + newTokenSymbol = vm.envString("TOKEN_SYMBOL"); + proxyContractAddress = payable( + vm.envAddress("FIAT_TOKEN_PROXY_ADDRESS") + ); + proxyAdmin = vm.envAddress("PROXY_ADMIN_ADDRESS"); + lostAndFound = vm.envOr( + "LOST_AND_FOUND_ADDRESS", + vm.envAddress("OWNER_ADDRESS") + ); + + accountsToBlacklist = loadAccountsToBlacklist(); + + deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY"); + + console.log("FIAT_TOKEN_IMPLEMENTATION_ADDRESS: '%s'", impl); + console.log("TOKEN_SYMBOL: '%s'", newTokenSymbol); + console.log("FIAT_TOKEN_PROXY_ADDRESS: '%s'", proxyContractAddress); + console.log("PROXY_ADMIN_ADDRESS: '%s'", proxyAdmin); + console.log("LOST_AND_FOUND_ADDRESS: '%s'", lostAndFound); + } + + /** + * @notice helper function that loads local json + */ + function loadAccountsToBlacklist() + internal + view + returns (address[] memory) + { + string memory path = "blacklist.remote.json"; + string memory json = vm.readFile(path); + return vm.parseJsonAddressArray(json, ""); + } + + /** + * @dev For testing only: splitting deploy logic into an internal function to expose for testing + */ + function _deploy(address _impl) + internal + returns (FiatTokenV2_2, V2_2Upgrader) + { + vm.startBroadcast(deployerPrivateKey); + + FiatTokenV2_2 fiatTokenV2_2 = getOrDeployImpl(_impl); + + V2_2Upgrader v2_2Upgrader = new V2_2Upgrader( + FiatTokenProxy(proxyContractAddress), + fiatTokenV2_2, + proxyAdmin, + accountsToBlacklist, + newTokenSymbol + ); + + vm.stopBroadcast(); + return (fiatTokenV2_2, v2_2Upgrader); + } + + /** + * @dev For testing only: Helper function that runs deploy script with a specific implementation address + */ + function deploy(address _impl) + external + returns (FiatTokenV2_2, V2_2Upgrader) + { + return _deploy(_impl); + } + + /** + * @notice main function that will be run by forge + */ + function run() external returns (FiatTokenV2_2, V2_2Upgrader) { + return _deploy(impl); + } +} diff --git a/scripts/deploy/deploy-master-minter.s.sol b/scripts/deploy/deploy-master-minter.s.sol new file mode 100644 index 000000000..0db846855 --- /dev/null +++ b/scripts/deploy/deploy-master-minter.s.sol @@ -0,0 +1,64 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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.12; + +import "forge-std/console.sol"; // solhint-disable no-global-import, no-console +import { Script } from "forge-std/Script.sol"; +import { MasterMinter } from "../../contracts/minting/MasterMinter.sol"; + +/** + * A utility script to deploy a standslone MasterMinter contract + */ +contract DeployMasterMinter is Script { + address payable private proxyContractAddress; + address private masterMinterOwner; + uint256 private deployerPrivateKey; + + /** + * @notice initialize variables from environment + */ + function setUp() public { + proxyContractAddress = payable( + vm.envAddress("FIAT_TOKEN_PROXY_ADDRESS") + ); + masterMinterOwner = vm.envAddress("MASTER_MINTER_OWNER_ADDRESS"); + + deployerPrivateKey = vm.envUint("DEPLOYER_PRIVATE_KEY"); + + console.log("FIAT_TOKEN_PROXY_ADDRESS: '%s'", proxyContractAddress); + console.log("MASTER_MINTER_OWNER_ADDRESS: '%s'", masterMinterOwner); + } + + /** + * @notice main function that will be run by forge + */ + function run() external returns (MasterMinter) { + vm.startBroadcast(deployerPrivateKey); + + // Now that the proxy contract has been deployed, we can deploy the master minter. + MasterMinter masterMinter = new MasterMinter(proxyContractAddress); + + // Change the master minter to be owned by the master minter owner + masterMinter.transferOwnership(masterMinterOwner); + + vm.stopBroadcast(); + + return masterMinter; + } +} diff --git a/scripts/getBlacklistedAccounts.js b/scripts/getBlacklistedAccounts.js deleted file mode 100644 index 5952363da..000000000 --- a/scripts/getBlacklistedAccounts.js +++ /dev/null @@ -1,218 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 _ = require("lodash"); -const fs = require("fs"); -const path = require("path"); - -const FiatTokenProxy = artifacts.require("FiatTokenProxy"); -let Blacklistable; -try { - Blacklistable = require("../build/contracts/Blacklistable.json"); -} catch (e) { - console.error("Run `yarn compile` to generate the abi first!"); - console.error(e); - process.exit(1); -} - -const MAX_RETRIES = 5; -const CHUNK_SIZE = 200000; -const SLEEP_MS = 1000; -const OUTPUT_FILE = path.join(__dirname, "..", "blacklist.remote.json"); - -async function main(proxyAddress, startBlockNumber) { - if (fs.existsSync(OUTPUT_FILE)) { - console.log( - `NOTE: '${OUTPUT_FILE}' exists. Will append results to the file.` - ); - } - // A web3 Contract instance is used here as Truffle < v5.4.29 can trigger an - // insufficient funds error on view functions. @see https://github.com/trufflesuite/truffle/issues/4457 - const proxyAsBlacklistable = new web3.eth.Contract( - Blacklistable.abi, - proxyAddress - ); - - const latestBlockNumber = await web3.eth.getBlockNumber(); - let fromBlockNumber = startBlockNumber; - let toBlockNumber = Math.min( - latestBlockNumber, - startBlockNumber + CHUNK_SIZE - ); - - do { - await saveBlacklistedAccounts( - proxyAsBlacklistable, - fromBlockNumber, - toBlockNumber - ); - fromBlockNumber = toBlockNumber + 1; - toBlockNumber = Math.min(latestBlockNumber, toBlockNumber + CHUNK_SIZE); - - // Sleep for a bit to avoid blasting the RPC. - await sleep(SLEEP_MS); - } while ( - toBlockNumber <= latestBlockNumber && - fromBlockNumber < toBlockNumber - ); -} - -/** - * Saves all accounts that were blacklisted in [fromBlockNumber, toBlockNumber] - * AND are still blacklisted, in storage. - * @param {Blacklistable} proxyAsBlacklistable the FiatTokenProxy contract as Blacklistable - * @param {number} fromBlockNumber the start block number - * @param {number} toBlockNumber the end block number - */ -async function saveBlacklistedAccounts( - proxyAsBlacklistable, - fromBlockNumber, - toBlockNumber -) { - console.log( - `Querying events in range [${fromBlockNumber}, ${toBlockNumber}]` - ); - const rawBlacklistedEvents = await getBlacklistedEventsRetryWithBackoff( - proxyAsBlacklistable, - fromBlockNumber, - toBlockNumber - ); - if (rawBlacklistedEvents.length <= 0) { - return; - } - console.log(`>> Found ${rawBlacklistedEvents.length} 'Blacklisted' events!`); - - const maybeBlacklistedAccounts = _.uniq( - rawBlacklistedEvents.map((event) => - web3.utils.toChecksumAddress(event.returnValues._account) - ) - ); - const blacklistedAccounts = []; - for (const account of maybeBlacklistedAccounts) { - const isCurrentlyBlacklisted = await proxyAsBlacklistable.methods - .isBlacklisted(account) - .call(); - if (isCurrentlyBlacklisted) { - blacklistedAccounts.push(account); - } - } - - console.log( - `>> Found ${blacklistedAccounts.length} unique & currently blacklisted accounts` - ); - if (blacklistedAccounts.length <= 0) { - return; - } - - appendBlacklistedAccounts(blacklistedAccounts); -} - -/** - * Appends blacklisted accounts to a JSON file, deduplicating accounts. - * @param {string[]} blacklistedAccounts the list of blacklisted accounts - */ -function appendBlacklistedAccounts(blacklistedAccounts) { - let previousBlacklistedAccounts = []; - try { - previousBlacklistedAccounts = JSON.parse(fs.readFileSync(OUTPUT_FILE)); - } catch (e) { - // no-op - } - - const indent = 2; - const accountsToWrite = _.chain(previousBlacklistedAccounts) - .concat(blacklistedAccounts) - .map(web3.utils.toChecksumAddress) - .uniq() - .value(); - - fs.writeFileSync(OUTPUT_FILE, JSON.stringify(accountsToWrite, null, indent)); -} - -/** - * Get all blacklisted events that were emitted in [fromBlockNumber, toBlockNumber] - * @param {Blacklistable} proxyAsBlacklistable the FiatTokenProxy contract as Blacklistable - * @param {number} fromBlockNumber the start block number - * @param {number} toBlockNumber the end block number - * @throws error if RPC fails after MAX_RETRIES counts - */ -async function getBlacklistedEventsRetryWithBackoff( - proxyAsBlacklistable, - fromBlockNumber, - toBlockNumber -) { - let tries = 0; - let error; - - while (tries < MAX_RETRIES) { - await sleep(tries * SLEEP_MS); - try { - return await proxyAsBlacklistable.getPastEvents("Blacklisted", { - fromBlock: fromBlockNumber, - toBlock: toBlockNumber, - }); - } catch (e) { - error = e; - tries += 1; - } - } - - throw error; -} - -/** - * Utility function to trigger a sleep. - * @param {number} ms the period to sleep for - */ -async function sleep(ms) { - await new Promise((resolve) => setTimeout(resolve, ms)); -} - -module.exports = async (callback) => { - /* eslint-disable no-undef -- Config is a global variable in a truffle exec script https://github.com/trufflesuite/truffle/pull/3233 */ - const network = config.network; - const argv = config._; - /* eslint-enable no-undef */ - const usageError = new Error( - "Usage: yarn truffle exec scripts/getBlacklistedAccounts.js [<0x-stripped Proxy address>] [startBlockNumber] [--network=]" - ); - - // Truffle exec seems to auto parse a hex string passed in arguments into decimals. - // We need to strip the 0x in arguments to prevent this from happening. - const rawProxyAddress = argv[1]; - const startBlockNumber = Number(argv[2] || 0); - const proxyAddress = - network === "development" && !rawProxyAddress - ? (await FiatTokenProxy.deployed()).address - : `0x${rawProxyAddress}`; - - console.log(`network: ${network}`); - console.log(`proxyAddress: ${proxyAddress}`); - console.log(`startBlockNumber: ${startBlockNumber}`); - - if (!web3.utils.isAddress(proxyAddress)) { - callback(usageError); - } else { - try { - await main(proxyAddress, startBlockNumber); - callback(); - } catch (e) { - callback(e); - } - } -}; diff --git a/scripts/getContractCreationBlock.js b/scripts/getContractCreationBlock.js deleted file mode 100644 index 65c431a5d..000000000 --- a/scripts/getContractCreationBlock.js +++ /dev/null @@ -1,106 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 FiatTokenProxy = artifacts.require("FiatTokenProxy"); - -async function main(proxyAddress) { - const endBlock = await web3.eth.getBlockNumber(); - const creationBlock = await getProxyCreationBlock(proxyAddress, 0, endBlock); - if (await isContractCreatedAtBlock(proxyAddress, creationBlock)) { - console.log( - `Contract '${proxyAddress}' was created in block number ${creationBlock}` - ); - } else { - console.log( - `Could not find contract creation block for contract '${proxyAddress}'` - ); - } -} - -/** - * Searches for the creation block for a given contract using binary search. - * Adapted from https://levelup.gitconnected.com/how-to-get-smart-contract-creation-block-number-7f22f8952be0. - * @param {string} proxyAddress the address of the FiatTokenProxy contract - * @param {number} startBlock the start block of the range - * @param {number} endBlock the end block of the range - * @returns the block number at recursion termination - */ -async function getProxyCreationBlock(proxyAddress, startBlock, endBlock) { - await sleep(500); - console.log(`Searching in [${startBlock}, ${endBlock}]`); - if (startBlock === endBlock) { - return startBlock; - } - const midBlock = Math.floor((startBlock + endBlock) / 2); - if (await isContractCreatedAtBlock(proxyAddress, midBlock)) { - return getProxyCreationBlock(proxyAddress, startBlock, midBlock); - } else { - return getProxyCreationBlock(proxyAddress, midBlock + 1, endBlock); - } -} - -/** - * Checks if a given contract is created at a given block number - * @param {string} proxyAddress the address of the FiatTokenProxy contract - * @param {number} block the block number to check - * @returns true if the contract is created at the provided block number, false otherwise - */ -async function isContractCreatedAtBlock(proxyAddress, block) { - const code = await web3.eth.getCode(proxyAddress, block); - return code.length > 2; -} - -/** - * Utility function to trigger a sleep. - * @param {number} ms the period to sleep for - */ -async function sleep(ms) { - await new Promise((resolve) => setTimeout(resolve, ms)); -} - -module.exports = async (callback) => { - /* eslint-disable no-undef -- Config is a global variable in a truffle exec script https://github.com/trufflesuite/truffle/pull/3233 */ - const network = config.network; - const argv = config._; - /* eslint-enable no-undef */ - const usageError = new Error( - "Usage: yarn truffle exec scripts/getContractCreationBlock.js [<0x-stripped Proxy address>] [--network=]" - ); - - // Truffle exec seems to auto parse a hex string passed in arguments into decimals. - // We need to strip the 0x in arguments to prevent this from happening. - const rawProxyAddress = argv[1]; - const proxyAddress = - network === "development" && !rawProxyAddress - ? (await FiatTokenProxy.deployed()).address - : `0x${rawProxyAddress}`; - - console.log(`network: ${network}`); - console.log(`proxyAddress: ${proxyAddress}`); - - if (!web3.utils.isAddress(proxyAddress)) { - callback(usageError); - } else { - try { - await main(proxyAddress); - callback(); - } catch (e) { - callback(e); - } - } -}; diff --git a/scripts/git/diff-check.sh b/scripts/git/diff-check.sh index bf808aa27..91deac274 100755 --- a/scripts/git/diff-check.sh +++ b/scripts/git/diff-check.sh @@ -1,14 +1,14 @@ #!/bin/bash # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2023 Circle Internet Financial, LTD. All rights reserved. # -# Copyright (c) 2023, Circle Internet Financial, LLC. +# SPDX-License-Identifier: Apache-2.0 # # 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 +# 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, diff --git a/scripts/git/rebase.sh b/scripts/git/rebase.sh index f05f9ab82..260ada0d0 100755 --- a/scripts/git/rebase.sh +++ b/scripts/git/rebase.sh @@ -1,14 +1,14 @@ #!/bin/bash # -# SPDX-License-Identifier: Apache-2.0 +# Copyright 2023 Circle Internet Financial, LTD. All rights reserved. # -# Copyright (c) 2023, Circle Internet Financial, LLC. +# SPDX-License-Identifier: Apache-2.0 # # 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 +# 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, @@ -21,11 +21,11 @@ # ============= # Husky should be disabled so that pre-commit hook run per 'reword' rebase. -HUSKY=0 +export HUSKY=0 # (Optional) Choose the editor that you want to use for rebasing. For sufficiently # large rebases, it may be easier to use an editor with a GUI (eg. Sublime Text). -GIT_EDITOR="subl -n -w" # Sublime Text +export GIT_EDITOR="subl -n -w" # Sublime Text # GIT_EDITOR="vim" # GIT_EDITOR="nano" diff --git a/scripts/hardhat/downloadBlacklistedAccounts.ts b/scripts/hardhat/downloadBlacklistedAccounts.ts new file mode 100644 index 000000000..f39689fde --- /dev/null +++ b/scripts/hardhat/downloadBlacklistedAccounts.ts @@ -0,0 +1,193 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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. + */ + +import { Contract, ethers } from "ethers"; +import fs from "fs"; +import { task } from "hardhat/config"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import _ from "lodash"; +import { hardhatArgumentTypes } from "./hardhatArgumentTypes"; +import { sleep } from "./helpers"; +import path from "path"; + +const MAX_RETRIES = 5; +const CHUNK_SIZE = 50000; +const SLEEP_MS = 1000; +const OUTPUT_FILE = path.join(__dirname, "..", "..", "blacklist.remote.json"); + +type TaskArguments = { + proxyAddress: string; + startBlockNumber: number; +}; + +task( + "downloadBlacklistedAccounts", + "Downloads the blacklisted accounts on a FiatToken contract onto the local machine" +) + .addParam( + "proxyAddress", + "The proxy address of the FiatToken contract", + undefined, + hardhatArgumentTypes.address + ) + .addParam( + "startBlockNumber", + "The block number to start downloading from", + undefined, + hardhatArgumentTypes.int + ) + .setAction(taskAction); + +async function taskAction( + { proxyAddress, startBlockNumber }: TaskArguments, + hre: HardhatRuntimeEnvironment +) { + if (fs.existsSync(OUTPUT_FILE)) { + console.log( + `NOTE: '${OUTPUT_FILE}' exists. Will continue appending results to the file.` + ); + } + + const proxyAsBlacklistable = await hre.ethers.getContractAt( + "Blacklistable", + proxyAddress + ); + + const latestBlockNumber = await hre.ethers.provider.getBlockNumber(); + let fromBlockNumber = startBlockNumber; + let toBlockNumber = Math.min( + latestBlockNumber, + startBlockNumber + CHUNK_SIZE + ); + + do { + await saveBlacklistedAccounts( + proxyAsBlacklistable, + fromBlockNumber, + toBlockNumber + ); + fromBlockNumber = toBlockNumber + 1; + toBlockNumber = Math.min(latestBlockNumber, toBlockNumber + CHUNK_SIZE); + + // Sleep for a bit to avoid blasting the RPC. + await sleep(SLEEP_MS); + } while ( + toBlockNumber <= latestBlockNumber && + fromBlockNumber < toBlockNumber + ); +} + +/** + * Saves all accounts that were blacklisted in [fromBlockNumber, toBlockNumber] + * AND are still blacklisted in storage. + */ +async function saveBlacklistedAccounts( + proxyAsBlacklistable: Contract, + fromBlockNumber: number, + toBlockNumber: number +) { + console.log( + `Querying events in range [${fromBlockNumber}, ${toBlockNumber}]` + ); + const rawBlacklistedEvents = await getBlacklistedEventsRetryWithBackoff( + proxyAsBlacklistable, + fromBlockNumber, + toBlockNumber + ); + if (rawBlacklistedEvents.length <= 0) { + return; + } + console.log(`>> Found ${rawBlacklistedEvents.length} 'Blacklisted' events!`); + + const maybeBlacklistedAccounts = _.uniq( + rawBlacklistedEvents.map((event) => { + const log = proxyAsBlacklistable.interface.parseLog(event); + return log?.args[0]; + }) + ); + const blacklistedAccounts = []; + for (const account of maybeBlacklistedAccounts) { + if (await proxyAsBlacklistable.isBlacklisted(account)) { + blacklistedAccounts.push(account); + } + } + + console.log( + `>> Found ${blacklistedAccounts.length} unique & currently blacklisted accounts` + ); + if (blacklistedAccounts.length <= 0) { + return; + } + + appendBlacklistedAccounts(blacklistedAccounts); +} + +/** + * Appends blacklisted accounts to a JSON file, deduplicating accounts. + */ +function appendBlacklistedAccounts(blacklistedAccounts: string[]) { + let previousBlacklistedAccounts = []; + try { + previousBlacklistedAccounts = JSON.parse( + fs.readFileSync(OUTPUT_FILE, "utf-8") + ); + } catch (e) { + console.error( + `Error found while parsing ${OUTPUT_FILE}. Overwriting its contents!`, + e + ); + } + + const indent = 2; + const accountsToWrite = _.chain(previousBlacklistedAccounts) + .concat(blacklistedAccounts) + .map(ethers.getAddress) + .uniq() + .value(); + + fs.writeFileSync(OUTPUT_FILE, JSON.stringify(accountsToWrite, null, indent)); +} + +/** + * Get all blacklisted events that were emitted in [fromBlockNumber, toBlockNumber] + * @throws error if RPC fails after MAX_RETRIES counts + */ +async function getBlacklistedEventsRetryWithBackoff( + proxyAsBlacklistable: Contract, + fromBlockNumber: number, + toBlockNumber: number +) { + let tries = 0; + let error; + + while (tries < MAX_RETRIES) { + await sleep(tries * SLEEP_MS); + try { + return await proxyAsBlacklistable.queryFilter( + proxyAsBlacklistable.filters.Blacklisted(), + fromBlockNumber, + toBlockNumber + ); + } catch (e) { + error = e; + tries += 1; + } + } + + throw error; +} diff --git a/scripts/hardhat/getContractCreationBlock.ts b/scripts/hardhat/getContractCreationBlock.ts new file mode 100644 index 000000000..81d559986 --- /dev/null +++ b/scripts/hardhat/getContractCreationBlock.ts @@ -0,0 +1,100 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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. + */ + +import { task } from "hardhat/config"; +import { hardhatArgumentTypes } from "./hardhatArgumentTypes"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import { sleep } from "./helpers"; + +type TaskArguments = { + contractAddress: string; +}; + +task( + "getContractCreationBlock", + "Gets the block number that a contract is created" +) + .addPositionalParam( + "contractAddress", + "The contract address to query", + undefined, + hardhatArgumentTypes.address + ) + .setAction(taskAction); + +async function taskAction( + { contractAddress }: TaskArguments, + hre: HardhatRuntimeEnvironment +) { + const endBlock = await hre.ethers.provider.getBlockNumber(); + const creationBlock = await getContractCreationBlock( + hre, + contractAddress, + 0, + endBlock + ); + if (await isContractCreatedAtBlock(hre, contractAddress, creationBlock)) { + console.log( + `Contract '${contractAddress}' was created in block number ${creationBlock}` + ); + } else { + console.log( + `Could not find contract creation block for contract '${contractAddress}'` + ); + } +} + +/** + * Searches for the creation block for a given contract using binary search. + * Adapted from https://levelup.gitconnected.com/how-to-get-smart-contract-creation-block-number-7f22f8952be0. + */ +async function getContractCreationBlock( + hre: HardhatRuntimeEnvironment, + contractAddress: string, + startBlock: number, + endBlock: number +) { + await sleep(500); + console.log(`Searching in [${startBlock}, ${endBlock}]`); + if (startBlock === endBlock) { + return startBlock; + } + const midBlock = Math.floor((startBlock + endBlock) / 2); + if (await isContractCreatedAtBlock(hre, contractAddress, midBlock)) { + return getContractCreationBlock(hre, contractAddress, startBlock, midBlock); + } else { + return getContractCreationBlock( + hre, + contractAddress, + midBlock + 1, + endBlock + ); + } +} + +/** + * Checks if a given contract is created at a given block number + */ +async function isContractCreatedAtBlock( + hre: HardhatRuntimeEnvironment, + contractAddress: string, + block: number +) { + const code = await hre.ethers.provider.getCode(contractAddress, block); + return code.length > 2; +} diff --git a/scripts/hardhat/hardhatArgumentTypes.ts b/scripts/hardhat/hardhatArgumentTypes.ts new file mode 100644 index 000000000..8dc739559 --- /dev/null +++ b/scripts/hardhat/hardhatArgumentTypes.ts @@ -0,0 +1,60 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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. + */ + +import { ethers } from "ethers"; +import { types } from "hardhat/config"; +import { HardhatError } from "hardhat/internal/core/errors"; +import { ERRORS } from "hardhat/internal/core/errors-list"; +import { CLIArgumentType } from "hardhat/types"; + +/** + * Extended argument list from @see {@link https://github.com/NomicFoundation/hardhat/blob/f6eb9365fdc23033f41a8ff7744c9398c8e2459f/packages/hardhat-core/src/internal/core/params/argumentTypes.ts} + */ +const address: CLIArgumentType = { + name: "address", + parse: (_, strValue) => ethers.getAddress(strValue), + validate: (argName, value) => { + if (!ethers.isAddress(value)) { + throw new HardhatError(ERRORS.ARGUMENTS.INVALID_VALUE_FOR_TYPE, { + value, + name: argName, + type: address.name, + }); + } + }, +}; + +const oneOf = (values: unknown[]): CLIArgumentType => ({ + name: "oneOf", + parse: (_, strValue) => strValue, + validate: (argName, value) => { + if (!values.includes(value)) { + throw new HardhatError(ERRORS.ARGUMENTS.INVALID_VALUE_FOR_TYPE, { + value, + name: argName, + type: oneOf.name, + }); + } + }, +}); + +export const hardhatArgumentTypes = { + ...types, + address, + oneOf, +}; diff --git a/contracts/test/UpgradedFiatToken.sol b/scripts/hardhat/helpers.ts similarity index 64% rename from contracts/test/UpgradedFiatToken.sol rename to scripts/hardhat/helpers.ts index 856cf87f8..5eb64fef1 100644 --- a/contracts/test/UpgradedFiatToken.sol +++ b/scripts/hardhat/helpers.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -16,14 +16,10 @@ * limitations under the License. */ -pragma solidity 0.6.12; - -import { FiatTokenV1 } from "../v1/FiatTokenV1.sol"; - /** - * @title UpgradedFiatToken - * @dev ERC20 Token backed by fiat reserves + * Utility function to trigger a sleep. + * @param ms the period to sleep for */ -contract UpgradedFiatToken is FiatTokenV1 { - +export async function sleep(ms: number): Promise { + await new Promise((resolve) => setTimeout(resolve, ms)); } diff --git a/scripts/hardhat/readValuesFromContract.ts b/scripts/hardhat/readValuesFromContract.ts new file mode 100644 index 000000000..4682c051e --- /dev/null +++ b/scripts/hardhat/readValuesFromContract.ts @@ -0,0 +1,116 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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. + */ + +import { task } from "hardhat/config"; +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import _ from "lodash"; +import { hardhatArgumentTypes } from "./hardhatArgumentTypes"; +import { Contract } from "ethers"; + +type TaskArguments = { + contractName: string; + contractAddress: string; + functionNames: string[]; +}; + +task( + "readValuesFromContract", + "Calls a series of read-only functions with no arguments on a contract, and prints the results to console." +) + .addParam( + "contractName", + "The contract name eg. FiatTokenV2_1", + undefined, + hardhatArgumentTypes.string + ) + .addParam( + "contractAddress", + "The address of the contract", + undefined, + hardhatArgumentTypes.address + ) + .addVariadicPositionalParam( + "functionNames", + "The functions to call", + undefined, + hardhatArgumentTypes.string + ) + .setAction(taskAction); + +async function taskAction( + { contractName, contractAddress, functionNames }: TaskArguments, + hre: HardhatRuntimeEnvironment +) { + const contract = await hre.ethers.getContractAt( + contractName, + contractAddress + ); + + if (contract.getDeployedCode() == null) { + throw new Error(`Cannot find contract at address '${contractAddress}'!`); + } + + const viewFunctionResults = await Promise.all( + functionNames.map((funcName) => + conditionallyReadValues(hre, contract, contractName, funcName) + ) + ); + + const result = _.fromPairs(_.zip(functionNames, viewFunctionResults)); + console.log(result); +} + +/** + * Memory addresses for the return data of certain read-only functions + * on the FiatTokenProxy contract. + */ +const FiatTokenProxy_SLOT_ADDRESSES: Record = { + admin: "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b", + implementation: + "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3", +}; + +/** + * Conditionally calls a read-only function from a contract, depending on the contractName. + * + * If the contract is FiatTokenProxy, and either `name()` or `implementation()` is requested, + * then read the values from the storage addresses. Otherwise, get the result by calling the function. + */ +async function conditionallyReadValues( + hre: HardhatRuntimeEnvironment, + contract: Contract, + contractName: string, + functionName: string +) { + if (!contract[functionName]) { + throw new Error(`Cannot find ${functionName} in contract!`); + } + + if ( + contractName === "FiatTokenProxy" && + ["admin", "implementation"].includes(functionName) + ) { + const storageResult = await hre.ethers.provider.getStorage( + await contract.getAddress(), + FiatTokenProxy_SLOT_ADDRESSES[functionName] + ); + return hre.ethers.getAddress("0x" + storageResult.slice(26)); + } + + return await contract[functionName].staticCall(); +} diff --git a/scripts/hardhat/validateAccountsToBlacklist.ts b/scripts/hardhat/validateAccountsToBlacklist.ts new file mode 100644 index 000000000..04ab40b76 --- /dev/null +++ b/scripts/hardhat/validateAccountsToBlacklist.ts @@ -0,0 +1,178 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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. + */ + +import { task } from "hardhat/config"; +import { hardhatArgumentTypes } from "./hardhatArgumentTypes"; + +import { HardhatRuntimeEnvironment } from "hardhat/types"; +import _ from "lodash"; +import path from "path"; +import { readBlacklistFile } from "../../utils"; +import { ethers } from "ethers"; + +type TaskArguments = { + proxyAddress?: string; + v2_2UpgraderAddress?: string; + datasourceFilepath?: string; +}; + +task( + "validateAccountsToBlacklist", + "Validates blacklist.remote.json by checking that " + + "it matches with addresses retrieved from a separate datasource " + + "and/or it matches with V2_2Upgrader.accountsToBlacklist() " + + "and/or the list of addresses are currently blacklisted on FiatTokenProxy." +) + .addOptionalParam( + "proxyAddress", + "The proxy address of the FiatToken contract. Runs comparison if set.", + undefined, + hardhatArgumentTypes.address + ) + .addOptionalParam( + "upgraderAddress", + "The contract address of the deployed V2_2Upgrader. Runs comparison if set.", + undefined, + hardhatArgumentTypes.address + ) + .addOptionalParam( + "datasourceFilepath", + "The JSON file containing an array of addresses retrieved from a separate datasource. Runs comparison if set.", + undefined, + hardhatArgumentTypes.inputFile + ) + .setAction(taskAction); + +async function taskAction( + { proxyAddress, v2_2UpgraderAddress, datasourceFilepath }: TaskArguments, + hre: HardhatRuntimeEnvironment +) { + console.log("Validation started"); + const expectedAccountsToBlacklist = readBlacklistFile( + path.join(__dirname, "..", "..", "blacklist.remote.json") + ); + + // ==== Local state == Datasource's state + if (datasourceFilepath) { + console.log("Comparing local state with data source's state..."); + console.log( + `>> Expecting ${expectedAccountsToBlacklist.length} accounts to blacklist` + ); + + const accountsFromDatasource = readBlacklistFile(datasourceFilepath); + console.log( + `>> Retrieved ${accountsFromDatasource.length} accounts from datasource` + ); + console.log(">> Verifying accounts..."); + verifyAccountsArrays(expectedAccountsToBlacklist, accountsFromDatasource); + console.log(">> All accounts verified!"); + } + + // ==== Local state == Upgrader state + if (v2_2UpgraderAddress) { + console.log("\nComparing local state with deployed V2_2Upgrader..."); + const v2_2Upgrader = await hre.ethers.getContractAt( + "V2_2Upgrader", + v2_2UpgraderAddress + ); + const accountsFromUpgrader = await v2_2Upgrader.accountsToBlacklist(); + console.log( + `>> Retrieved ${accountsFromUpgrader.length} accounts from v2_2Upgrader` + ); + + console.log(">> Verifying accounts..."); + verifyAccountsArrays(expectedAccountsToBlacklist, accountsFromUpgrader); + console.log(">> All accounts verified!"); + } + + // ==== Every account blacklisted + if (proxyAddress) { + console.log("\nComparing local state with deployed FiatTokenProxy..."); + console.log(">> Validating that all accountsToBlacklist are blacklisted"); + const proxyAsV2_1 = await hre.ethers.getContractAt( + "FiatTokenV2_1", + proxyAddress + ); + + for (let i = 0; i < expectedAccountsToBlacklist.length; i++) { + if (i % 5 === 0) { + console.log( + `>> Verified ${i}/${expectedAccountsToBlacklist.length} accounts` + ); + } + + const account = expectedAccountsToBlacklist[i]; + if (!(await proxyAsV2_1.isBlacklisted(account))) { + throw new Error(`Account '${account}' is not currently blacklisted!`); + } + } + console.log(">> All accounts verified!"); + } + + console.log("Validation completed"); +} + +/** + * Verifies that two accounts array are both unique, and equal to each other. + */ +function verifyAccountsArrays( + accountsArray: string[], + otherAccountsArray: string[] +) { + console.log(`>> Converting to checksum addresses`); + accountsArray = accountsArray.map(ethers.getAddress); + otherAccountsArray = otherAccountsArray.map(ethers.getAddress); + + // Check for duplicates. + console.log(`>> Checking for duplicates in accountsArray`); + verifyUnique(accountsArray); + + console.log(`>> Checking for duplicates in otherAccountsArray`); + verifyUnique(otherAccountsArray); + + // Check array equality. + console.log(`>> Checking for array equality`); + if (accountsArray.length !== otherAccountsArray.length) { + throw new Error( + `Arrays have different lengths! Expected: ${accountsArray.length}, Actual: ${otherAccountsArray.length}` + ); + } + for (const account of otherAccountsArray) { + if (!accountsArray.includes(account)) { + throw new Error(`Account '${account}' not found in accountsArray!`); + } + } +} + +/** + * Verifies that an accounts array is unique. + */ +function verifyUnique(accountsArray: string[]) { + const duplicates = _.chain(accountsArray) + .groupBy((acc) => acc.toLowerCase()) + .pickBy((group) => group.length > 1) + .keys() + .value(); + if (duplicates.length !== 0) { + throw new Error( + `${duplicates.length} duplicates detected in array! ${JSON.stringify( + duplicates + )}` + ); + } +} diff --git a/scripts/hardhat/verifyBytecodeOnChain.ts b/scripts/hardhat/verifyBytecodeOnChain.ts new file mode 100644 index 000000000..214f53a87 --- /dev/null +++ b/scripts/hardhat/verifyBytecodeOnChain.ts @@ -0,0 +1,180 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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. + */ + +import { readFileSync } from "fs"; +import { task } from "hardhat/config"; +import { HardhatRuntimeEnvironment, LinkReferences } from "hardhat/types"; +import _ from "lodash"; +import path from "path"; +import { hardhatArgumentTypes } from "./hardhatArgumentTypes"; + +type TaskArguments = { + contractName: string; + contractAddress: string; + libraryName?: string; + libraryAddress?: string; + verificationType: "full" | "partial"; +}; + +task( + "verifyBytecodeOnChain", + "Verify that the locally compiled bytecode matches the deployed bytecode on chain." +) + .addParam( + "contractName", + "The name of the contract to validate", + undefined, + hardhatArgumentTypes.string + ) + .addParam( + "contractAddress", + "The address of the contract to validate", + undefined, + hardhatArgumentTypes.address + ) + .addOptionalParam( + "libraryName", + "The name of the library contract the main contract uses", + undefined, + hardhatArgumentTypes.string + ) + .addOptionalParam( + "libraryAddress", + "The address of the library contract", + undefined, + hardhatArgumentTypes.address + ) + .addOptionalParam( + "verificationType", + "Checks metadata if set to 'full', skips metadata checking if set to 'partial'.", + "full", + hardhatArgumentTypes.oneOf(["full", "partial"]) + ) + .setAction(taskAction); + +async function taskAction( + { + contractName, + contractAddress, + libraryName, + libraryAddress, + verificationType, + }: TaskArguments, + hre: HardhatRuntimeEnvironment +) { + // Getting contract bytecode from blockchain + const rawOnchainBytecode = await hre.ethers.provider.getCode(contractAddress); + + // Getting locally compiled bytecode, swap out library contract addresses + const foundryContractArtifact = JSON.parse( + readFileSync( + path.join( + __dirname, + "..", + "..", + "artifacts", + "foundry", + `${contractName}.sol`, + `${contractName}.json` + ), + "utf-8" + ) + ); + + let rawLocalBytecode: string = + foundryContractArtifact.deployedBytecode.object; + const deployedLinkReferences: LinkReferences = + foundryContractArtifact.deployedBytecode.linkReferences; + + if (libraryName && libraryAddress) { + const libraryReferencePositions: { + length: number; + start: number; + }[] = _.chain(deployedLinkReferences) + .values() + .map(Object.entries) + .flatten() + .fromPairs() + .get(libraryName) + .value(); + + for (const position of libraryReferencePositions) { + const replacement = libraryAddress + .slice(2, 2 + position["length"] * 2) + .toLowerCase(); + rawLocalBytecode = + rawLocalBytecode.slice(0, 2 + position.start * 2) + + replacement + + rawLocalBytecode.slice(2 + position.start * 2 + position["length"] * 2); + } + } + + // Compare onchain bytecode against local bytecode + if (verificationType === "full") { + logBytecodeComparisonResult( + rawLocalBytecode, + rawOnchainBytecode, + verificationType + ); + } else { + const onchainBytecodeNoMetadata = removeMetadataHash(rawOnchainBytecode); + const localBytecodeNoMetadata = removeMetadataHash(rawLocalBytecode); + logBytecodeComparisonResult( + localBytecodeNoMetadata, + onchainBytecodeNoMetadata, + verificationType + ); + } +} + +function logBytecodeComparisonResult( + bytecodeA: string, + bytecodeB: string, + verificationType: TaskArguments["verificationType"] +) { + if (bytecodeA !== bytecodeB) { + console.log( + "\x1b[31m", + `\nWARNING: ${verificationType} verification failed - bytecode on chain differs from local compilation.` + ); + process.exit(1); + } else { + console.log( + "\x1b[32m", + `\n${verificationType} verification complete - onchain contract contains the same bytecode.` + ); + process.exit(0); + } +} + +function removeMetadataHash(contractBytecode: string) { + const metadataLength = getContractMetadataLength(contractBytecode); + return contractBytecode.slice(0, contractBytecode.length - metadataLength); +} + +function getContractMetadataLength(contractBytecode: string) { + // Read the last two bytes to determine the length of the CBOR encoding + // https://docs.soliditylang.org/en/develop/metadata.html#encoding-of-the-metadata-hash-in-the-bytecode + const metadataLengthHex = contractBytecode.slice( + contractBytecode.length - 4, + contractBytecode.length + ); + + const metadataNumBytes = parseInt(metadataLengthHex, 16); + return metadataNumBytes * 2 + metadataLengthHex.length; +} diff --git a/scripts/validateAccountsToBlacklist.js b/scripts/validateAccountsToBlacklist.js deleted file mode 100644 index a918c91a2..000000000 --- a/scripts/validateAccountsToBlacklist.js +++ /dev/null @@ -1,206 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 path = require("path"); -const { readBlacklistFile } = require("../utils"); -const _ = require("lodash"); - -const FiatTokenProxy = artifacts.require("FiatTokenProxy"); -const FiatTokenV2_1 = artifacts.require("FiatTokenV2_1"); -const V2_2Upgrader = artifacts.require("V2_2Upgrader"); - -/** - * A utility script to validate that - * 1. Addresses retrieved from a datasource match with the list of addresses in blacklist.remote.json - * 2. V2_2Upgrader.accountsToBlacklist() values match with the list of addresses in blacklist.remote.json - * 3. The list of addresses in blacklist.remote.json are currently blacklisted. - * @param {string} proxyAddress the contract address of FiatTokenProxy - * @param {string} v2_2UpgraderAddress the contract address of V2_2Upgrader - * @param {string} datasourceFilePath the JSON file containing an array of addresses retrieved from a datasource (eg. Dune) - * @param {boolean} skipDatasourceValidation true if datasource validation should be skipped, false otherwise - * @param {boolean} skipUpgraderValidation true if upgrader validation should be skipped, false otherwise - */ -async function main( - proxyAddress, - v2_2UpgraderAddress, - datasourceFilePath, - skipDatasourceValidation, - skipUpgraderValidation -) { - const expectedAccountsToBlacklist = readBlacklistFile( - path.join(__dirname, "..", "blacklist.remote.json") - ); - - // ==== Local state == Datasource's state - if (!skipDatasourceValidation) { - console.log("Comparing local state with data source's state..."); - console.log( - `>> Expecting ${expectedAccountsToBlacklist.length} accounts to blacklist` - ); - - const accountsFromDatasource = readBlacklistFile(datasourceFilePath); - console.log( - `>> Retrieved ${accountsFromDatasource.length} accounts from datasource` - ); - console.log(">> Verifying accounts..."); - verifyAccountsArrays(expectedAccountsToBlacklist, accountsFromDatasource); - console.log(">> All accounts verified!"); - } - - // ==== Local state == Upgrader state - if (!skipUpgraderValidation) { - console.log("\nComparing local state with deployed V2_2Upgrader..."); - const v2_2Upgrader = await V2_2Upgrader.at(v2_2UpgraderAddress); - const accountsFromUpgrader = await v2_2Upgrader.accountsToBlacklist(); - console.log( - `>> Retrieved ${accountsFromUpgrader.length} accounts from v2_2Upgrader` - ); - - console.log(">> Verifying accounts..."); - verifyAccountsArrays(expectedAccountsToBlacklist, accountsFromUpgrader); - console.log(">> All accounts verified!"); - } - - // ==== Every account blacklisted - console.log("\nComparing local state with deployed FiatTokenProxy..."); - console.log(">> Validating that all accountsToBlacklist are blacklisted"); - const proxyAsV2_1 = await FiatTokenV2_1.at(proxyAddress); - - for (let i = 0; i < expectedAccountsToBlacklist.length; i++) { - if (i % 5 === 0) { - console.log( - `>> Verified ${i}/${expectedAccountsToBlacklist.length} accounts` - ); - } - - const account = expectedAccountsToBlacklist[i]; - if (!(await proxyAsV2_1.isBlacklisted(account))) { - throw new Error(`Account '${account}' is not currently blacklisted!`); - } - } - console.log(">> All accounts verified!"); -} - -/** - * Verifies that two accounts array are both unique, and equal to each other. - * @param {string[]} accountsArray an array of accounts - * @param {string[]} otherAccountsArray another array of accounts - */ -function verifyAccountsArrays(accountsArray, otherAccountsArray) { - console.log(`>> Converting to checksum addresses`); - accountsArray = accountsArray.map(web3.utils.toChecksumAddress); - otherAccountsArray = otherAccountsArray.map(web3.utils.toChecksumAddress); - - // Check for duplicates. - console.log(`>> Checking for duplicates in accountsArray`); - verifyUnique(accountsArray); - - console.log(`>> Checking for duplicates in otherAccountsArray`); - verifyUnique(otherAccountsArray); - - // Check array equality. - console.log(`>> Checking for array equality`); - if (accountsArray.length !== otherAccountsArray.length) { - throw new Error( - `Arrays have different lengths! Expected: ${accountsArray.length}, Actual: ${otherAccountsArray.length}` - ); - } - for (const account of otherAccountsArray) { - if (!accountsArray.includes(account)) { - throw new Error(`Account '${account}' not found in accountsArray!`); - } - } -} - -/** - * Verifies that an accounts array is unique. - * @param {string[]} accountsArray an array of accounts - */ -function verifyUnique(accountsArray) { - const duplicates = _.chain(accountsArray) - .groupBy((acc) => acc.toLowerCase()) - .pickBy((group) => group.length > 1) - .keys() - .value(); - if (duplicates.length !== 0) { - throw new Error( - `${duplicates.length} duplicates detected in array! ${JSON.stringify( - duplicates - )}` - ); - } -} - -module.exports = async (callback) => { - const usageError = new Error( - "Usage: yarn truffle exec scripts/validateAccountsToBlacklist.js [--datasource-filepath=] \n" + - "[--skip-datasource-validation] \n" + - "[--skip-upgrader-validation] \n" + - "[--proxy-address=<0x-stripped Proxy address>] \n" + - "[--upgrader-address=<0x-stripped V2_2Upgrader address>] \n" + - "[--network=]" - ); - - /* eslint-disable no-undef -- Config is a global variable in a truffle exec script https://github.com/trufflesuite/truffle/pull/3233 */ - const network = config.network; - - // Truffle exec seems to auto parse a hex string passed in arguments into decimals. - // We need to strip the 0x in arguments to prevent this from happening. - const rawProxyAddress = config.proxyAddress; - const rawV2_2UpgraderAddress = config.upgraderAddress; - const datasourceFilePath = config.datasourceFilePath; - const skipDatasourceValidation = !!config.skipDatasourceValidation; - const skipUpgraderValidation = !!config.skipUpgraderValidation; - /* eslint-enable no-undef */ - - const proxyAddress = - network === "development" && !rawProxyAddress - ? (await FiatTokenProxy.deployed()).address - : `0x${rawProxyAddress}`; - const v2_2UpgraderAddress = - network === "development" && !rawV2_2UpgraderAddress - ? (await V2_2Upgrader.deployed()).address - : `0x${rawV2_2UpgraderAddress}`; - - console.log(`network: ${network}`); - console.log(`proxyAddress: ${proxyAddress}`); - console.log(`v2_2UpgraderAddress: ${v2_2UpgraderAddress}`); - console.log(`datasourceFilePath: ${datasourceFilePath}`); - console.log(`skipDatasourceValidation: ${skipDatasourceValidation}`); - console.log(`skipUpgraderValidation: ${skipUpgraderValidation}`); - - if ( - !web3.utils.isAddress(proxyAddress) || - !web3.utils.isAddress(v2_2UpgraderAddress) - ) { - callback(usageError); - } else { - try { - await main( - proxyAddress, - v2_2UpgraderAddress, - datasourceFilePath, - skipDatasourceValidation, - skipUpgraderValidation - ); - callback(); - } catch (e) { - callback(e); - } - } -}; diff --git a/setup.sh b/setup.sh new file mode 100755 index 000000000..2d43d21c0 --- /dev/null +++ b/setup.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# +# Copyright 2024 Circle Internet Financial, LTD. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# 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. + +set -e + +# Refer to https://github.com/foundry-rs/foundry/tags for the list of Foundry versions. +FOUNDRY_VERSION=nightly-2cf84d9f3ba7b6f4a9296299e7036ecc24cfa1da + +if [[ "$CI" == "true" ]] +then + echo "Skipping as we are in the CI"; + exit; +fi + +echo "Installing / Updating Foundry..." +if ! command -v foundryup &> /dev/null +then + echo "Installing foundryup..." + curl -L https://foundry.paradigm.xyz | bash + + FOUNDRY_BASE_DIR=${XDG_CONFIG_HOME:-$HOME} + FOUNDRY_BIN_DIR="$FOUNDRY_BASE_DIR/.foundry/bin" + export PATH="$FOUNDRY_BIN_DIR:$PATH" +fi + +if ! command -v forge &> /dev/null || [ ! "$(forge -V | grep -Eo '\b\w{7}\b')" = "2cf84d9" ] +then + echo "Installing foundry at $FOUNDRY_VERSION..." + foundryup --version $FOUNDRY_VERSION +fi + +echo "Updating git submodules..." +git submodule update --init --recursive diff --git a/slither.config.json b/slither.config.json deleted file mode 100644 index 22a1f3ffb..000000000 --- a/slither.config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "detectors_to_exclude": "naming-convention,pragma,solc-version,timestamp" -} diff --git a/start-ganache.sh b/start-ganache.sh deleted file mode 100755 index ec162d703..000000000 --- a/start-ganache.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2023, Circle Internet Financial, LLC. -# -# 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. -# - -DOCROOT="$( cd "$( dirname "$0" )" && pwd )" -GANACHE_PID_FILE="${DOCROOT}/pids/ganache.pid" - -usage() -{ -cat < 0 ]]; then - echo -e "Waiting for ${NAME} for ${DURATION} seconds..\n" - fi - - # ping every second - sleep 1 - DURATION=$SECONDS - - # check to be sure the service didn't die under mysterious circumstances after 10 second grace period - if [[ ${DURATION} -gt 10 ]] && [[ -e "${DOCROOT}/${NAME}.pid" ]]; then - PID=$(cat ${GANACHE_PID_FILE}) - if ! kill -0 &>/dev/null ${PID}; then - echo -e "$(date) : ${NAME} is not running after ${DURATION} seconds! Giving up!\n" - # fast fail by breaking while when this occurs - DURATION=${WAIT_TIME} - fi - fi - done - - echo -e "$(date) : ${NAME} service failed to start within ${WAIT_TIME} seconds!!\n" - echo -e "Last log entries for ${NAME}:\n" - tail -n 200 "logs/${NAME}.log" - exit 1 -} - -while getopts ":r" OPTION -do - case ${OPTION} in - r) - RESTART=true - ;; - ?) - usage - exit - ;; - esac -done - -if [[ ! -d "${DOCROOT}/logs" ]]; then - mkdir "${DOCROOT}/logs" -fi - -if [[ ! -d "${DOCROOT}/pids" ]]; then - mkdir "${DOCROOT}/pids" -fi - -if [[ "${RESTART}" = true ]] ; then - echo 'Stopping ganache.' - bash ${DOCROOT}/stop-ganache.sh -fi - -if [[ -e "${GANACHE_PID_FILE}" ]]; -then - PID=$(cat ${GANACHE_PID_FILE}) - if kill -0 &>/dev/null ${PID}; then - echo "Ganache is already running" - exit - else - rm ${GANACHE_PID_FILE} - fi -fi - -echo "Starting Ganache..." - -yarn ganache &> ${DOCROOT}/logs/ganache.log & -echo $! > $GANACHE_PID_FILE -ping_ganache - -echo "All outputs will be logged to ${DOCROOT}/logs" diff --git a/test/helpers/constants.ts b/test/helpers/constants.ts index 60a6bbd5b..ecb34da81 100644 --- a/test/helpers/constants.ts +++ b/test/helpers/constants.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -100,70 +100,80 @@ export const ACCOUNTS_AND_KEYS: { address: string; key: string }[] = [ }, ]; -const GANACHE_ACCOUNTS: Array = [ - "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1", - "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0", - "0x22d491Bde2303f2f43325b2108D26f1eAbA1e32b", - "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d", - "0xd03ea8624C8C5987235048901fB614fDcA89b117", - "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC", - "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9", - "0x28a8746e75304c0780E011BEd21C72cD78cd535E", - "0xACa94ef8bD5ffEE41947b4585a84BdA5a3d3DA6E", - "0x1dF62f291b2E969fB0849d99D9Ce41e2F137006e", - "0x610Bb1573d1046FCb8A70Bbbd395754cD57C2b60", - "0x855FA758c77D68a04990E992aA4dcdeF899F654A", - "0xfA2435Eacf10Ca62ae6787ba2fB044f8733Ee843", - "0x64E078A8Aa15A41B85890265648e965De686bAE6", - "0x2F560290FEF1B3Ada194b6aA9c40aa71f8e95598", +export const HARDHAT_ACCOUNTS: string[] = [ + "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", + "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", + "0x90F79bf6EB2c4f870365E785982E1f101E93b906", + "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65", + "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc", + "0x976EA74026E726554dB657fA54763abd0C3a0aa9", + "0x14dC79964da2C08b23698B3D3cc7Ca32193d9955", + "0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f", + "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720", + "0xBcd4042DE499D14e55001CcbB24a551F3b954096", + "0x71bE63f3384f5fb98995898A86B02Fb2426c5788", + "0xFABB0ac9d68B0B445fB7357272Ff202C5651694a", + "0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec", + "0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097", + "0xcd3B766CCDd6AE721141F452C550Ca635964ce71", + "0x2546BcD3c84621e976D8185a91A922aE77ECEc30", + "0xbDA5747bFD65F08deb54cb465eB87D40e51B197E", + "0xdD2FD4581271e230360230F9337D5c0430Bf44C0", + "0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199", ]; -const GANACHE_PRIVATE_KEYS: Array = [ - "4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d", - "6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1", - "6370fd033278c143179d81c5526140625662b8daa446c22ee2d73db3707e620c", - "646f1ce2fdad0e6deeeb5c7e8e5543bdde65e86029e2fd9fc169899c440a7913", - "add53f9a7e588d003326d1cbf9e4a43c061aadd9bc938c843a79e7b4fd2ad743", - "395df67f0c2d2d9fe1ad08d1bc8b6627011959b79c53d7dd6a3536a33ab8a4fd", - "e485d098507f54e7733a205420dfddbe58db035fa577fc294ebd14db90767a52", - "a453611d9419d0e56f499079478fd72c37b251a94bfde4d19872c44cf65386e3", - "829e924fdf021ba3dbbc4225edfece9aca04b929d6e75613329ca6f1d31c0bb4", - "b0057716d5917badaf911b193b12b910811c1497b5bada8d7711f758981c3773", - "77c5495fbb039eed474fc940f29955ed0531693cc9212911efd35dff0373153f", - "d99b5b29e6da2528bf458b26237a6cf8655a3e3276c1cdc0de1f98cefee81c01", - "9b9c613a36396172eab2d34d72331c8ca83a358781883a535d2941f66db07b24", - "0874049f95d55fb76916262dc70571701b5c4cc5900c0691af75f1a8a52c8268", - "21d7212f3b4e5332fd465877b64926e3532653e2798a11255a46f533852dfe46", +export const HARDHAT_PRIVATE_KEYS: string[] = [ + "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", + "59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d", + "5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a", + "7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6", + "47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a", + "8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba", + "92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e", + "4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356", + "dbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97", + "2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6", + "f214f2b2cd398c806f84e317254e0f0b801d0643303237d97a22a48e01628897", + "701b615bbdfb9de65240bc28bd21bbc0d996645a3dd57e7b12bc2bdf6f192c82", + "a267530f49f8280200edf313ee7af6b827f2a8bce2897751d06a843f644967b1", + "47c99abed3324a2707c28affff1267e45918ec8c3f20b8aa892e8b065d2942dd", + "c526ee95bf44d8fc405a158bb884d9d1238d99f0612e9f33d006bb0789009aaa", + "8166f546bab6da521a8369cab06c5d2b9e46670292d85c875ee9ec20e84ffb61", + "ea6c44ac03bff858b476bba40716402b03e41b8e97e276d1baec7c37d42484a0", + "689af8efa8c651a91ad287602527f3af2fe9f6501a7ac4b061667b5a93e037fd", + "de9be858da4a475276426320d5e9262ecfc3ba460bfac56360bfa6c4c28b4ee0", + "df57089febbacf7ba0bc227dafbffa9fc08a93fdc68e1e42411a14efcf23656e", ]; export const accounts = { - deployerAccount: GANACHE_ACCOUNTS[0], - arbitraryAccount: GANACHE_ACCOUNTS[1], - tokenOwnerAccount: GANACHE_ACCOUNTS[3], - blacklisterAccount: GANACHE_ACCOUNTS[4], - arbitraryAccount2: GANACHE_ACCOUNTS[5], - masterMinterAccount: GANACHE_ACCOUNTS[6], - minterAccount: GANACHE_ACCOUNTS[7], - pauserAccount: GANACHE_ACCOUNTS[8], - mintOwnerAccount: GANACHE_ACCOUNTS[9], - controller1Account: GANACHE_ACCOUNTS[11], - rescuerAccount: GANACHE_ACCOUNTS[12], - lostAndFoundAccount: GANACHE_ACCOUNTS[13], - proxyOwnerAccount: GANACHE_ACCOUNTS[14], + deployerAccount: HARDHAT_ACCOUNTS[0], + arbitraryAccount: HARDHAT_ACCOUNTS[1], + tokenOwnerAccount: HARDHAT_ACCOUNTS[3], + blacklisterAccount: HARDHAT_ACCOUNTS[4], + arbitraryAccount2: HARDHAT_ACCOUNTS[5], + masterMinterAccount: HARDHAT_ACCOUNTS[6], + minterAccount: HARDHAT_ACCOUNTS[7], + pauserAccount: HARDHAT_ACCOUNTS[8], + mintOwnerAccount: HARDHAT_ACCOUNTS[9], + controller1Account: HARDHAT_ACCOUNTS[11], + rescuerAccount: HARDHAT_ACCOUNTS[12], + lostAndFoundAccount: HARDHAT_ACCOUNTS[13], + proxyOwnerAccount: HARDHAT_ACCOUNTS[14], }; export const accountPrivateKeys = { - deployerAccount: GANACHE_PRIVATE_KEYS[0], - arbitraryAccount: GANACHE_PRIVATE_KEYS[1], - tokenOwnerAccount: GANACHE_PRIVATE_KEYS[3], - blacklisterAccount: GANACHE_PRIVATE_KEYS[4], - arbitraryAccount2: GANACHE_PRIVATE_KEYS[5], - masterMinterAccount: GANACHE_PRIVATE_KEYS[6], - minterAccount: GANACHE_PRIVATE_KEYS[7], - pauserAccount: GANACHE_PRIVATE_KEYS[8], - mintOwnerAccount: GANACHE_PRIVATE_KEYS[9], - controller1Account: GANACHE_PRIVATE_KEYS[11], - rescuerAccount: GANACHE_PRIVATE_KEYS[12], - lostAndFoundAccount: GANACHE_PRIVATE_KEYS[13], - proxyOwnerAccount: GANACHE_PRIVATE_KEYS[14], + deployerAccount: HARDHAT_PRIVATE_KEYS[0], + arbitraryAccount: HARDHAT_PRIVATE_KEYS[1], + tokenOwnerAccount: HARDHAT_PRIVATE_KEYS[3], + blacklisterAccount: HARDHAT_PRIVATE_KEYS[4], + arbitraryAccount2: HARDHAT_PRIVATE_KEYS[5], + masterMinterAccount: HARDHAT_PRIVATE_KEYS[6], + minterAccount: HARDHAT_PRIVATE_KEYS[7], + pauserAccount: HARDHAT_PRIVATE_KEYS[8], + mintOwnerAccount: HARDHAT_PRIVATE_KEYS[9], + controller1Account: HARDHAT_PRIVATE_KEYS[11], + rescuerAccount: HARDHAT_PRIVATE_KEYS[12], + lostAndFoundAccount: HARDHAT_PRIVATE_KEYS[13], + proxyOwnerAccount: HARDHAT_PRIVATE_KEYS[14], }; diff --git a/test/helpers/index.ts b/test/helpers/index.ts index 383013fa8..4874b0896 100644 --- a/test/helpers/index.ts +++ b/test/helpers/index.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -21,10 +21,10 @@ import { assert } from "chai"; import { solidityPack } from "ethereumjs-abi"; import { FiatTokenProxyInstance, - FiatTokenV11Instance, + FiatTokenV1_1Instance, FiatTokenV1Instance, - FiatTokenV21Instance, - FiatTokenV22Instance, + FiatTokenV2_1Instance, + FiatTokenV2_2Instance, FiatTokenV2Instance, } from "../../@types/generated"; import _ from "lodash"; @@ -33,6 +33,7 @@ const FiatTokenV1 = artifacts.require("FiatTokenV1"); const FiatTokenV2 = artifacts.require("FiatTokenV2"); const FiatTokenV2_1 = artifacts.require("FiatTokenV2_1"); const FiatTokenV2_2 = artifacts.require("FiatTokenV2_2"); +const SignatureChecker = artifacts.require("SignatureChecker"); export async function expectRevert( promise: Promise, @@ -51,10 +52,9 @@ export async function expectRevert( // eslint-disable-next-line @typescript-eslint/no-explicit-any const errMsg: string = (err as any).hijackedMessage ?? err.message; - assert.match(errMsg, /revert/i); if (!reason) { - return; + assert.match(errMsg, /revert/i); } else if (reason instanceof RegExp) { assert.match(errMsg, reason); } else { @@ -137,10 +137,10 @@ export async function initializeToVersion( proxyOrImplementation: | FiatTokenProxyInstance | FiatTokenV1Instance - | FiatTokenV11Instance + | FiatTokenV1_1Instance | FiatTokenV2Instance - | FiatTokenV21Instance - | FiatTokenV22Instance, + | FiatTokenV2_1Instance + | FiatTokenV2_2Instance, version: "1" | "1.1" | "2" | "2.1" | "2.2", fiatTokenOwner: string, lostAndFound: string, @@ -175,3 +175,17 @@ export async function initializeToVersion( await proxyAsV2_2.initializeV2_2(accountsToBlacklist, "USDCUSDC"); } } + +export async function linkLibraryToTokenContract< + T extends Truffle.ContractInstance +>(tokenContract: Truffle.Contract): Promise { + try { + const signatureChecker = await SignatureChecker.new(); + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + tokenContract.link(signatureChecker); + } catch (e) { + console.error(e); + // do nothing + } +} diff --git a/test/helpers/storageSlots.behavior.ts b/test/helpers/storageSlots.behavior.ts index 38bf1b775..6f36d765a 100644 --- a/test/helpers/storageSlots.behavior.ts +++ b/test/helpers/storageSlots.behavior.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -18,7 +18,7 @@ import BN from "bn.js"; import { FiatTokenProxyInstance } from "../../@types/generated"; -import { POW_2_255_BN } from "./constants"; +import { HARDHAT_ACCOUNTS, POW_2_255_BN, ZERO_BYTES32 } from "./constants"; const FiatTokenProxy = artifacts.require("FiatTokenProxy"); const FiatTokenV1 = artifacts.require("FiatTokenV1"); @@ -37,11 +37,9 @@ export function usesOriginalStorageSlotPositions< >({ Contract, version, - accounts, }: { Contract: Truffle.Contract; version: 1 | 1.1 | 2 | 2.1 | 2.2; - accounts: Truffle.Accounts; }): void { describe("uses original storage slot positions", () => { const [name, symbol, currency, decimals] = ["USD Coin", "USDC", "USD", 6]; @@ -54,7 +52,6 @@ export function usesOriginalStorageSlotPositions< const [mintedBN, transferredBN] = [minted, transferred].map( (v) => new BN(v, 10) ); - const [ owner, proxyAdmin, @@ -67,7 +64,7 @@ export function usesOriginalStorageSlotPositions< bob, charlie, lostAndFound, - ] = accounts; + ] = HARDHAT_ACCOUNTS; let fiatToken: T; let proxy: FiatTokenProxyInstance; @@ -128,55 +125,59 @@ export function usesOriginalStorageSlotPositions< } // slot 0 - owner - expect(parseAddress(slots[0])).to.equal(owner); // owner + checkSlot(slots[0], [{ type: "address", value: owner }]); // owner // slot 1 - pauser, paused // values are lower-order aligned - expect(parseInt(slots[1].slice(0, 2), 16)).to.equal(1); // paused - expect(parseAddress(slots[1].slice(2))).to.equal(pauser); // pauser + checkSlot(slots[1], [ + { type: "bool", value: true }, + { type: "address", value: pauser }, + ]); // paused + pauser // slot 2 - blacklister - expect(parseAddress(slots[2])).to.equal(blacklister); // blacklister + checkSlot(slots[2], [{ type: "address", value: blacklister }]); // blacklister // slot 3 - _deprecatedBlacklisted (mapping, slot is unused) - expect(slots[3]).to.equal("0"); + checkSlot(slots[3], ZERO_BYTES32); // slot 4 - name - expect(parseString(slots[4])).to.equal(name); + checkSlot(slots[4], [{ type: "string", value: name }]); // slot 5 - symbol - expect(parseString(slots[5])).to.equal(symbol); + checkSlot(slots[5], [{ type: "string", value: symbol }]); // slot 6 - decimals - expect(parseUint(slots[6]).toNumber()).to.equal(decimals); + checkSlot(slots[6], [{ type: "uint8", value: decimals }]); // slot 7 - currency - expect(parseString(slots[7])).to.equal(currency); + checkSlot(slots[7], [{ type: "string", value: currency }]); // slot 8 - masterMinter, initialized - expect(slots[8].slice(0, 2)).to.equal("01"); // initialized - expect(parseAddress(slots[8].slice(2))).to.equal(masterMinter); // masterMinter + checkSlot(slots[8], [ + { type: "bool", value: true }, + { type: "address", value: masterMinter }, + ]); // initialized + masterMinter // slot 9 - balanceAndBlacklistStates (mapping, slot is unused) - expect(slots[9]).to.equal("0"); + checkSlot(slots[9], ZERO_BYTES32); // slot 10 - allowed (mapping, slot is unused) - expect(slots[10]).to.equal("0"); + checkSlot(slots[10], ZERO_BYTES32); // slot 11 - totalSupply - expect(parseUint(slots[11]).toNumber()).to.equal(minted); + checkSlot(slots[11], [{ type: "uint256", value: minted }]); // slot 12 - minters (mapping, slot is unused) - expect(slots[12]).to.equal("0"); + checkSlot(slots[12], ZERO_BYTES32); // slot 13 - minterAllowed (mapping, slot is unused) - expect(slots[13]).to.equal("0"); + checkSlot(slots[13], ZERO_BYTES32); }); if (version >= 1.1) { it("retains slot 14 for rescuer", async () => { const slot = await readSlot(proxy.address, 14); - expect(parseAddress(slot)).to.equal(rescuer); + checkSlot(slot, [{ type: "address", value: rescuer }]); }); } @@ -185,142 +186,110 @@ export function usesOriginalStorageSlotPositions< const slot = await readSlot(proxy.address, 15); // Cached domain separator is deprecated in v2.2. But we still need to ensure the storage slot is retained. - expect("0x" + slot).to.equal(domainSeparator); + checkSlot(slot, domainSeparator); }); } it("retains original storage slots for _deprecatedBlacklisted mapping", async () => { // _deprecatedBlacklisted[alice] - let v = parseInt( - await readSlot( - proxy.address, - addressMappingSlot(alice, STORAGE_SLOT_NUMBERS._deprecatedBlacklisted) - ), - 16 + let slot = await readSlot( + proxy.address, + addressMappingSlot(alice, STORAGE_SLOT_NUMBERS._deprecatedBlacklisted) ); - expect(v).to.equal(0); + checkSlot(slot, [{ type: "bool", value: false }]); // _deprecatedBlacklisted[bob] - this should be set to true in pre-v2.2 versions, // and left untouched in v2.2+ versions. - v = parseInt( - await readSlot( - proxy.address, - addressMappingSlot(bob, STORAGE_SLOT_NUMBERS._deprecatedBlacklisted) - ), - 16 + slot = await readSlot( + proxy.address, + addressMappingSlot(bob, STORAGE_SLOT_NUMBERS._deprecatedBlacklisted) ); if (version >= 2.2) { - expect(v).to.equal(0); + checkSlot(slot, [{ type: "bool", value: false }]); } else { - expect(v).to.equal(1); + checkSlot(slot, [{ type: "bool", value: true }]); } // _deprecatedBlacklisted[charlie] - this should be set to true in pre-v2.2 versions, // and left untouched in v2.2+ versions. - v = parseInt( - await readSlot( - proxy.address, - addressMappingSlot( - charlie, - STORAGE_SLOT_NUMBERS._deprecatedBlacklisted - ) - ), - 16 + slot = await readSlot( + proxy.address, + addressMappingSlot(charlie, STORAGE_SLOT_NUMBERS._deprecatedBlacklisted) ); if (version >= 2.2) { - expect(v).to.equal(0); + checkSlot(slot, [{ type: "bool", value: false }]); } else { - expect(v).to.equal(1); + checkSlot(slot, [{ type: "bool", value: true }]); } }); it("retains original storage slots for balanceAndBlacklistStates mapping", async () => { // balanceAndBlacklistStates[alice] - not blacklisted, has balance - let v = parseUint( - await readSlot( - proxy.address, - addressMappingSlot( - alice, - STORAGE_SLOT_NUMBERS.balanceAndBlacklistStates - ) + let slot = await readSlot( + proxy.address, + addressMappingSlot( + alice, + STORAGE_SLOT_NUMBERS.balanceAndBlacklistStates ) ); let expectedValue = mintedBN.sub(transferredBN); - expect(v.eq(expectedValue)).to.be.true; + checkSlot(slot, [{ type: "uint256", value: expectedValue }]); // balanceAndBlacklistStates[bob] - blacklisted, has balance - v = parseUint( - await readSlot( - proxy.address, - addressMappingSlot( - bob, - STORAGE_SLOT_NUMBERS.balanceAndBlacklistStates - ) - ) + slot = await readSlot( + proxy.address, + addressMappingSlot(bob, STORAGE_SLOT_NUMBERS.balanceAndBlacklistStates) ); expectedValue = version >= 2.2 ? POW_2_255_BN.add(transferredBN) : transferredBN; - expect(v.eq(expectedValue)).to.be.true; + checkSlot(slot, [{ type: "uint256", value: expectedValue }]); // balanceAndBlacklistStates[charlie] - blacklisted, no balance - v = parseUint( - await readSlot( - proxy.address, - addressMappingSlot( - charlie, - STORAGE_SLOT_NUMBERS.balanceAndBlacklistStates - ) + slot = await readSlot( + proxy.address, + addressMappingSlot( + charlie, + STORAGE_SLOT_NUMBERS.balanceAndBlacklistStates ) ); expectedValue = version >= 2.2 ? POW_2_255_BN : new BN(0); - expect(v.eq(expectedValue)).to.be.true; + checkSlot(slot, [{ type: "uint256", value: expectedValue }]); }); it("retains original storage slots for allowed mapping", async () => { // allowed[alice][bob] - let v = parseInt( - await readSlot(proxy.address, address2MappingSlot(alice, bob, 10)), - 16 + let slot = await readSlot( + proxy.address, + address2MappingSlot(alice, bob, 10) ); - expect(v).to.equal(0); + checkSlot(slot, [{ type: "uint256", value: 0 }]); + // allowed[alice][charlie] - v = parseInt( - await readSlot(proxy.address, address2MappingSlot(alice, charlie, 10)), - 16 + slot = await readSlot( + proxy.address, + address2MappingSlot(alice, charlie, 10) ); - expect(v).to.equal(allowance); + checkSlot(slot, [{ type: "uint256", value: allowance }]); }); it("retains original storage slots for minters mapping", async () => { // minters[minter] - let v = parseInt( - await readSlot(proxy.address, addressMappingSlot(minter, 12)), - 16 - ); - expect(v).to.equal(1); + let slot = await readSlot(proxy.address, addressMappingSlot(minter, 12)); + checkSlot(slot, [{ type: "bool", value: true }]); // minters[alice] - v = parseInt( - await readSlot(proxy.address, addressMappingSlot(alice, 12)), - 16 - ); - expect(v).to.equal(0); + slot = await readSlot(proxy.address, addressMappingSlot(alice, 12)); + checkSlot(slot, [{ type: "bool", value: false }]); }); it("retains original storage slots for minterAllowed mapping", async () => { // minterAllowed[minter] - let v = parseInt( - await readSlot(proxy.address, addressMappingSlot(minter, 13)), - 16 - ); - expect(v).to.equal(mintAllowance - minted); + let slot = await readSlot(proxy.address, addressMappingSlot(minter, 13)); + checkSlot(slot, [{ type: "uint256", value: mintAllowance - minted }]); // minterAllowed[alice] - v = parseInt( - await readSlot(proxy.address, addressMappingSlot(alice, 13)), - 16 - ); - expect(v).to.equal(0); + slot = await readSlot(proxy.address, addressMappingSlot(alice, 13)); + checkSlot(slot, [{ type: "uint256", value: 0 }]); }); }); } @@ -333,20 +302,55 @@ export async function readSlot( address, slot as number // does support string, but type definition file is wrong ); - return data.replace(/^0x/, ""); + return data; } -function parseAddress(hex: string): string { - return web3.utils.toChecksumAddress(hex.padStart(40, "0")); -} +function checkSlot( + slot: string, + expectations: + | { type: string; value: number | string | BN | boolean }[] + | string +) { + if (typeof expectations === "string") { + expect(slot).to.equal(expectations); + } else { + const mappedExpectations = expectations.map((e) => { + if (e.type === "bool") { + return { + type: e.type, + value: e.value ? "true" : "", + }; + } + return e; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + }) as any; -function parseString(hex: string): string { - const len = parseInt(hex.slice(-2), 16); - return Buffer.from(hex.slice(0, len), "hex").toString("utf8"); -} + const encodePacked = web3.utils.encodePacked(...mappedExpectations); + if (!encodePacked) { + throw new Error("Error found while encoding!"); + } -export function parseUint(hex: string): BN { - return new BN(hex, 16); + let expectedSlotValue: string; + + // Logic to validate slots containing a string or a byte. + // See: https://docs.soliditylang.org/en/v0.6.12/internals/layout_in_storage.html for + // the encoding logic. + if ( + mappedExpectations.length === 1 && + ["bytes", "string"].includes(mappedExpectations[0].type) && + mappedExpectations[0].value.length < 32 + ) { + const lastByte = (mappedExpectations[0].value.length * 2) + .toString(16) + .padStart(2, "0"); + expectedSlotValue = `0x${encodePacked + .slice(2) + .padEnd(62, "0")}${lastByte}`; + } else { + expectedSlotValue = `0x${encodePacked.slice(2).padStart(64, "0")}`; + } + expect(slot).to.equal(expectedSlotValue); + } } function encodeUint(value: number | BN): string { diff --git a/test/minting/AccountUtils.js b/test/minting/AccountUtils.js index 39107229f..c3d93a668 100644 --- a/test/minting/AccountUtils.js +++ b/test/minting/AccountUtils.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -22,7 +22,7 @@ const assertDiff = require("assert-diff"); assertDiff.options.strict = true; const Q = require("q"); -const clone = require("clone"); +const { cloneDeep } = require("lodash"); const util = require("util"); const { accounts, accountPrivateKeys } = require("../helpers/constants"); @@ -52,7 +52,7 @@ function buildExpectedPartialState( ignoreExtraCustomVars ) { // for each item in customVars, set the item in expectedState - const expectedState = clone(emptyState); + const expectedState = cloneDeep(emptyState); for (const variableName in customState) { // do I ignore extra values diff --git a/test/minting/ControllerTestUtils.js b/test/minting/ControllerTestUtils.js index 7f070bb28..6a3dcb093 100644 --- a/test/minting/ControllerTestUtils.js +++ b/test/minting/ControllerTestUtils.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/test/minting/MintControllerTests.js b/test/minting/MintControllerTests.js index b7fd54789..888c95c7d 100644 --- a/test/minting/MintControllerTests.js +++ b/test/minting/MintControllerTests.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -25,7 +25,7 @@ const expectRevert = tokenUtils.expectRevert; const expectError = tokenUtils.expectError; const bigZero = tokenUtils.bigZero; -const clone = require("clone"); +const { cloneDeep } = require("lodash"); const mintUtils = require("./MintControllerUtils.js"); const AccountUtils = require("./AccountUtils.js"); @@ -49,7 +49,7 @@ async function run_tests(newToken) { ); token = tokenConfig.token; mintController = tokenConfig.mintController; - expectedMintControllerState = clone(tokenConfig.customState); + expectedMintControllerState = cloneDeep(tokenConfig.customState); expectedTokenState = [ { variable: "masterMinter", expectedValue: mintController.address }, ]; diff --git a/test/minting/MintControllerUtils.js b/test/minting/MintControllerUtils.js index 4f1e2515a..9c5c52b0b 100644 --- a/test/minting/MintControllerUtils.js +++ b/test/minting/MintControllerUtils.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/test/minting/MintP0_ArgumentTests.js b/test/minting/MintP0_ArgumentTests.js index e2ccdd30f..fb5816a52 100644 --- a/test/minting/MintP0_ArgumentTests.js +++ b/test/minting/MintP0_ArgumentTests.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -28,7 +28,7 @@ const expectRevert = tokenUtils.expectRevert; const expectError = tokenUtils.expectError; const bigZero = tokenUtils.bigZero; -const clone = require("clone"); +const { cloneDeep } = require("lodash"); const mintUtils = require("./MintControllerUtils.js"); const AccountUtils = require("./AccountUtils.js"); @@ -61,7 +61,7 @@ async function run_MINT_tests(newToken, MintControllerArtifact) { ); token = tokenConfig.token; mintController = tokenConfig.mintController; - expectedMintControllerState = clone(tokenConfig.customState); + expectedMintControllerState = cloneDeep(tokenConfig.customState); expectedTokenState = [ { variable: "masterMinter", expectedValue: mintController.address }, ]; diff --git a/test/minting/MintP0_BasicTests.js b/test/minting/MintP0_BasicTests.js index e96534e9a..cf2fc78c3 100644 --- a/test/minting/MintP0_BasicTests.js +++ b/test/minting/MintP0_BasicTests.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -28,7 +28,7 @@ const expectRevert = tokenUtils.expectRevert; const expectError = tokenUtils.expectError; const bigZero = tokenUtils.bigZero; -const clone = require("clone"); +const { cloneDeep } = require("lodash"); const mintUtils = require("./MintControllerUtils.js"); const AccountUtils = require("./AccountUtils.js"); @@ -62,7 +62,7 @@ async function run_MINT_tests(newToken, MintControllerArtifact) { ); token = tokenConfig.token; mintController = tokenConfig.mintController; - expectedMintControllerState = clone(tokenConfig.customState); + expectedMintControllerState = cloneDeep(tokenConfig.customState); expectedTokenState = [ { variable: "masterMinter", expectedValue: mintController.address }, ]; diff --git a/test/minting/MintP0_EndToEndTests.js b/test/minting/MintP0_EndToEndTests.js index 91051e628..1e31d9204 100644 --- a/test/minting/MintP0_EndToEndTests.js +++ b/test/minting/MintP0_EndToEndTests.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -26,7 +26,7 @@ const expectRevert = tokenUtils.expectRevert; const expectError = tokenUtils.expectError; const initializeTokenWithProxy = tokenUtils.initializeTokenWithProxy; -const clone = require("clone"); +const { cloneDeep } = require("lodash"); const mintUtils = require("../minting/MintControllerUtils.js"); const AccountUtils = require("../minting/AccountUtils.js"); @@ -58,7 +58,7 @@ async function run_MINT_tests(newToken, MintControllerArtifact) { ); token = tokenConfig.token; mintController = tokenConfig.mintController; - expectedMintControllerState = clone(tokenConfig.customState); + expectedMintControllerState = cloneDeep(tokenConfig.customState); expectedTokenState = [ { variable: "masterMinter", expectedValue: mintController.address }, ]; diff --git a/test/minting/MintP0_EventsTests.js b/test/minting/MintP0_EventsTests.js index 0a0a3a03f..7bdb389c3 100644 --- a/test/minting/MintP0_EventsTests.js +++ b/test/minting/MintP0_EventsTests.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/test/misc/gas.ts b/test/misc/gas.ts new file mode 100644 index 000000000..2650f45d9 --- /dev/null +++ b/test/misc/gas.ts @@ -0,0 +1,325 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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. + */ + +import { + AnyFiatTokenV2Instance, + FiatTokenV2_2InstanceExtended, +} from "../../@types/AnyFiatTokenV2Instance"; +import { + FiatTokenV2_1Contract, + FiatTokenV2_2Contract, +} from "../../@types/generated"; +import { AllEvents } from "../../@types/generated/FiatTokenV2"; +import { initializeToVersion, linkLibraryToTokenContract } from "../helpers"; +import { + HARDHAT_ACCOUNTS, + HARDHAT_PRIVATE_KEYS, + MAX_UINT256_HEX, +} from "../helpers/constants"; +import { + SignatureBytesType, + permitSignature, + permitSignatureV22, + prepareSignature, + signPermit, +} from "../v2/GasAbstraction/helpers"; +import { getERC1271Wallet } from "../v2/v2.behavior"; + +const FiatTokenV2_1 = artifacts.require("FiatTokenV2_1"); +const FiatTokenV2_2 = artifacts.require("FiatTokenV2_2"); + +type TestVersion = "2.1" | "2.2"; +// can be changed in case of upgrade +const TARGET_VERSION = "2.2"; +type TestContract = FiatTokenV2_1Contract | FiatTokenV2_2Contract; + +const versionToContract = new Map([ + ["2.1", FiatTokenV2_1], + ["2.2", FiatTokenV2_2], +]); +const consoleMessage = "gas used for the test below:"; + +describe(`gas costs for version ${TARGET_VERSION}`, () => { + const lostAndFound = HARDHAT_ACCOUNTS[2]; + const alice = HARDHAT_ACCOUNTS[3]; + const aliceKey = HARDHAT_PRIVATE_KEYS[3]; + const bob = HARDHAT_ACCOUNTS[4]; + const charlie = HARDHAT_ACCOUNTS[5]; + const fiatTokenOwner = HARDHAT_ACCOUNTS[9]; + const entireBalance = 100; + const partialBalance = 1; + const mintAuthorizationAmount = 10000; + + let fiatToken: AnyFiatTokenV2Instance; + let domainSeparator: string; + let contractTarget: TestContract; + + async function mintBalance( + account: string + ): Promise> { + return fiatToken.mint(account, entireBalance, { from: fiatTokenOwner }); + } + + before(async () => { + if (!versionToContract.get(TARGET_VERSION)) + throw new Error("invalid version"); + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + contractTarget = versionToContract.get(TARGET_VERSION)!; + + // NOTE: need to add a new version here if there is an upgrade + // beyond 2.2 + await linkLibraryToTokenContract(FiatTokenV2_1); + await linkLibraryToTokenContract(FiatTokenV2_2); + }); + + beforeEach(async () => { + fiatToken = await contractTarget.new(); + await initializeToVersion( + fiatToken, + TARGET_VERSION, + fiatTokenOwner, + lostAndFound + ); + await fiatToken.configureMinter(fiatTokenOwner, mintAuthorizationAmount, { + from: fiatTokenOwner, + }); + + // mint to fiat token owner to initialize total supply + await mintBalance(fiatTokenOwner); + + domainSeparator = await fiatToken.DOMAIN_SEPARATOR(); + }); + + it("mint() where the receiver has no balance", async () => { + const tx = await mintBalance(bob); + + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("mint() where the receiver has an existing balance", async () => { + await mintBalance(bob); + + const tx = await mintBalance(bob); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("burn() entire balance", async () => { + const tx = await fiatToken.burn(entireBalance, { from: fiatTokenOwner }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("burn() partial balance", async () => { + const tx = await fiatToken.burn(partialBalance, { from: fiatTokenOwner }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("transfer() where both parties have a balance before and after", async () => { + await mintBalance(alice); + await mintBalance(bob); + + const tx = await fiatToken.transfer(bob, partialBalance, { + from: alice, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("transfer() where sender transfers their entire balance, receiver has a balance", async () => { + await mintBalance(alice); + await mintBalance(bob); + + const tx = await fiatToken.transfer(bob, entireBalance, { + from: alice, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("transfer() where sender transfers their entire balance, receiver has no balance", async () => { + await mintBalance(bob); + + const tx = await fiatToken.transfer(alice, entireBalance, { + from: bob, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("transfer() where sender transfers part of their balance, receiver has no balance", async () => { + await mintBalance(alice); + + const tx = await fiatToken.transfer(bob, partialBalance, { + from: alice, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("transferFrom() where both parties have a balance before and after", async () => { + await mintBalance(alice); + await mintBalance(bob); + + await fiatToken.approve(bob, entireBalance, { from: alice }); + + const tx = await fiatToken.transferFrom(alice, bob, partialBalance, { + from: bob, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("transferFrom() where sender transfers their entire balance, receiver has a balance", async () => { + await mintBalance(alice); + await mintBalance(bob); + + await fiatToken.approve(bob, entireBalance, { from: alice }); + + const tx = await fiatToken.transferFrom(alice, bob, entireBalance, { + from: bob, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("transferFrom() where sender transfers their entire balance, receiver has no balance", async () => { + await mintBalance(alice); + + await fiatToken.approve(bob, entireBalance, { from: alice }); + + const tx = await fiatToken.transferFrom(alice, bob, entireBalance, { + from: bob, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("transferFrom() where sender transfers part of their balance, receiver has no balance", async () => { + await mintBalance(alice); + + await fiatToken.approve(bob, entireBalance, { from: alice }); + + const tx = await fiatToken.transferFrom(alice, bob, partialBalance, { + from: bob, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("approve()", async () => { + const tx = await fiatToken.approve(bob, entireBalance, { from: alice }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("increaseAllowance() with no prior approval", async () => { + const tx = await fiatToken.increaseAllowance(bob, entireBalance, { + from: alice, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("increaseAllowance() on existing approval", async () => { + await fiatToken.approve(bob, entireBalance, { from: alice }); + + const tx = await fiatToken.increaseAllowance(bob, entireBalance, { + from: alice, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("decreaseAllowance() to zero", async () => { + await fiatToken.approve(bob, entireBalance, { from: alice }); + + const tx = await fiatToken.decreaseAllowance(bob, entireBalance, { + from: alice, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("decreaseAllowance() to non-zero", async () => { + await fiatToken.approve(bob, entireBalance, { from: alice }); + + const tx = await fiatToken.decreaseAllowance(bob, partialBalance, { + from: alice, + }); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("permit() with an EOA", async () => { + const nonce = 0; + const deadline = MAX_UINT256_HEX; + const signatureType = SignatureBytesType.Unpacked; + + // permit() is overloaded as of 2.2, so we need to specify which permit() + // version to hit. In this case, the EOA version. + if (Number(TARGET_VERSION) >= 2.2) { + (fiatToken as FiatTokenV2_2InstanceExtended).permit = (fiatToken as FiatTokenV2_2InstanceExtended).methods[ + permitSignature + ]; + } + + const signature = signPermit( + alice, + bob, + entireBalance, + nonce, + deadline, + domainSeparator, + aliceKey + ); + const tx = await fiatToken.permit( + alice, + bob, + entireBalance, + deadline, + ...prepareSignature(signature, signatureType), + { from: charlie } + ); + console.log(consoleMessage, tx.receipt.gasUsed); + }); + + it("permit() with an EIP-1271 wallet", async () => { + const nonce = 0; + const deadline = MAX_UINT256_HEX; + const signatureType = SignatureBytesType.Packed; + const aliceWallet = await getERC1271Wallet(alice); + + if (Number(TARGET_VERSION) < 2.2) { + console.log("Test below not relevant for this contract version"); + return; + } + + // permit() is overloaded as of 2.2, so we need to specify which permit() + // version to hit. In this case, the EIP-1271 version. + { + (fiatToken as FiatTokenV2_2InstanceExtended).permit = (fiatToken as FiatTokenV2_2InstanceExtended).methods[ + permitSignatureV22 + ]; + } + + const signature = signPermit( + aliceWallet.address, + bob, + entireBalance, + nonce, + deadline, + domainSeparator, + aliceKey + ); + const tx = await fiatToken.permit( + aliceWallet.address, + bob, + entireBalance, + deadline, + ...prepareSignature(signature, signatureType), + { from: charlie } + ); + console.log(consoleMessage, tx.receipt.gasUsed); + }); +}); diff --git a/test/misc/publicToExternal.test.ts b/test/misc/publicToExternal.test.ts index da66e76a3..4a50e289f 100644 --- a/test/misc/publicToExternal.test.ts +++ b/test/misc/publicToExternal.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -21,6 +21,7 @@ import { ContractWithExternalFunctionsInstance, ContractThatCallsPublicFunctionsInstance, } from "../../@types/generated"; +import { HARDHAT_ACCOUNTS } from "../helpers/constants"; const ContractWithPublicFunctions = artifacts.require( "ContractWithPublicFunctions" @@ -33,8 +34,10 @@ const ContractThatCallsPublicFunctions = artifacts.require( ); const FiatTokenProxy = artifacts.require("FiatTokenProxy"); -contract("public to external", (accounts) => { +describe("public to external", () => { describe("changing access modifier from public to external", () => { + const from = HARDHAT_ACCOUNTS[0]; + let contractWithPublicFunctions: ContractWithPublicFunctionsInstance; let contractWithExternalFunctions: ContractWithExternalFunctionsInstance; let contractThatCallsPublicFunctions: ContractThatCallsPublicFunctionsInstance; @@ -76,7 +79,7 @@ contract("public to external", (accounts) => { // functions const proxy = await FiatTokenProxy.new( contractWithPublicFunctions.address, - { from: accounts[0] } + { from } ); // verify that calling public functions via the proxy works fine diff --git a/test/scripts/deploy/TestUtils.sol b/test/scripts/deploy/TestUtils.sol new file mode 100644 index 000000000..64528196b --- /dev/null +++ b/test/scripts/deploy/TestUtils.sol @@ -0,0 +1,84 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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.12; +pragma experimental ABIEncoderV2; // needed for compiling older solc versions: https://github.com/foundry-rs/foundry/issues/4376 + +import "forge-std/Test.sol"; // solhint-disable no-global-import +import { MasterMinter } from "../../../contracts/minting/MasterMinter.sol"; +import { FiatTokenProxy } from "../../../contracts/v1/FiatTokenProxy.sol"; +import { FiatTokenV1 } from "../../../contracts/v1/FiatTokenV1.sol"; +import { + AbstractV2Upgrader +} from "../../../contracts/v2/upgrader/AbstractV2Upgrader.sol"; + +contract TestUtils is Test { + uint256 internal deployerPrivateKey = 1; + string internal tokenName = "USDC"; + string internal tokenSymbol = "USDC"; + address internal proxyAdmin = vm.addr(2); + address internal masterMinterOwner = vm.addr(3); + address internal owner = vm.addr(4); + address internal pauser = vm.addr(5); + address internal blacklister = vm.addr(6); + address internal lostAndFound = vm.addr(7); + address[] internal accountsToBlacklist = new address[](0); + + function setUp() public virtual { + vm.setEnv("TOKEN_NAME", tokenName); + vm.setEnv("TOKEN_SYMBOL", tokenSymbol); + vm.setEnv("TOKEN_CURRENCY", "USD"); + vm.setEnv("TOKEN_DECIMALS", "6"); + vm.setEnv("DEPLOYER_PRIVATE_KEY", vm.toString(deployerPrivateKey)); + vm.setEnv("PROXY_ADMIN_ADDRESS", vm.toString(proxyAdmin)); + vm.setEnv( + "MASTER_MINTER_OWNER_ADDRESS", + vm.toString(masterMinterOwner) + ); + vm.setEnv("OWNER_ADDRESS", vm.toString(owner)); + vm.setEnv("PAUSER_ADDRESS", vm.toString(pauser)); + vm.setEnv("BLACKLISTER_ADDRESS", vm.toString(blacklister)); + vm.setEnv("LOST_AND_FOUND_ADDRESS", vm.toString(lostAndFound)); + + // Deploy an instance of proxy contract to configure contract address in env + FiatTokenV1 v1 = new FiatTokenV1(); + FiatTokenProxy proxy = new FiatTokenProxy(address(v1)); + vm.setEnv("FIAT_TOKEN_PROXY_ADDRESS", vm.toString(address(proxy))); + + // Write accountsToBlacklist to local blacklist.remote.json + vm.writeJson("[]", "blacklist.remote.json"); + } + + function validateImpl(FiatTokenV1 impl) internal { + assertEq(impl.name(), ""); + assertEq(impl.symbol(), ""); + assertEq(impl.currency(), ""); + assert(impl.decimals() == 0); + assertEq(impl.owner(), address(1)); + assertEq(impl.masterMinter(), address(1)); + assertEq(impl.pauser(), address(1)); + assertEq(impl.blacklister(), address(1)); + } + + function validateMasterMinter(MasterMinter masterMinter, address _proxy) + internal + { + assertEq(masterMinter.owner(), masterMinterOwner); + assertEq(address(masterMinter.getMinterManager()), _proxy); + } +} diff --git a/test/scripts/deploy/deploy-fiat-token.t.sol b/test/scripts/deploy/deploy-fiat-token.t.sol new file mode 100644 index 000000000..223f0873f --- /dev/null +++ b/test/scripts/deploy/deploy-fiat-token.t.sol @@ -0,0 +1,81 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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.12; +pragma experimental ABIEncoderV2; // needed for compiling older solc versions: https://github.com/foundry-rs/foundry/issues/4376 + +import { TestUtils } from "./TestUtils.sol"; +import { + DeployFiatToken +} from "../../../scripts/deploy/deploy-fiat-token.s.sol"; +import { MasterMinter } from "../../../contracts/minting/MasterMinter.sol"; +import { FiatTokenProxy } from "../../../contracts/v1/FiatTokenProxy.sol"; +import { FiatTokenV2_2 } from "../../../contracts/v2/FiatTokenV2_2.sol"; + +// solhint-disable func-name-mixedcase + +contract DeployFiatTokenTest is TestUtils { + DeployFiatToken private deployScript; + + function setUp() public override { + TestUtils.setUp(); + deployScript = new DeployFiatToken(); + deployScript.setUp(); + } + + function test_deployFiatTokenWithEnvConfigured() public { + ( + FiatTokenV2_2 v2_2, + MasterMinter masterMinter, + FiatTokenProxy proxy + ) = deployScript.run(); + + validateImpl(v2_2); + validateMasterMinter(masterMinter, address(proxy)); + validateProxy(proxy, address(v2_2), address(masterMinter)); + } + + function test_deployFiatTokenWithPredeployedImpl() public { + FiatTokenV2_2 predeployedImpl = new FiatTokenV2_2(); + + (, MasterMinter masterMinter, FiatTokenProxy proxy) = deployScript + .deploy(address(predeployedImpl)); + + validateMasterMinter(masterMinter, address(proxy)); + validateProxy(proxy, address(predeployedImpl), address(masterMinter)); + } + + function validateProxy( + FiatTokenProxy proxy, + address _impl, + address _masterMinter + ) internal { + assertEq(proxy.admin(), proxyAdmin); + assertEq(proxy.implementation(), _impl); + + FiatTokenV2_2 proxyAsV2_2 = FiatTokenV2_2(address(proxy)); + assertEq(proxyAsV2_2.name(), "USDC"); + assertEq(proxyAsV2_2.symbol(), "USDC"); + assertEq(proxyAsV2_2.currency(), "USD"); + assert(proxyAsV2_2.decimals() == 6); + assertEq(proxyAsV2_2.owner(), owner); + assertEq(proxyAsV2_2.pauser(), pauser); + assertEq(proxyAsV2_2.blacklister(), blacklister); + assertEq(proxyAsV2_2.masterMinter(), _masterMinter); + } +} diff --git a/test/scripts/deploy/deploy-impl-and-upgrader.t.sol b/test/scripts/deploy/deploy-impl-and-upgrader.t.sol new file mode 100644 index 000000000..71d14bc5f --- /dev/null +++ b/test/scripts/deploy/deploy-impl-and-upgrader.t.sol @@ -0,0 +1,77 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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.12; +pragma experimental ABIEncoderV2; // needed for compiling older solc versions: https://github.com/foundry-rs/foundry/issues/4376 + +import { TestUtils } from "./TestUtils.sol"; +import { + DeployImplAndUpgrader +} from "../../../scripts/deploy/deploy-impl-and-upgrader.s.sol"; +import { FiatTokenV2_2 } from "../../../contracts/v2/FiatTokenV2_2.sol"; +import { V2_2Upgrader } from "../../../contracts/v2/upgrader/V2_2Upgrader.sol"; + +// solhint-disable func-name-mixedcase + +contract DeployImplAndUpgraderTest is TestUtils { + function setUp() public override { + TestUtils.setUp(); + } + + function test_DeployImplAndUpgraderWithAllEnvConfigured() public { + DeployImplAndUpgrader deployScript = new DeployImplAndUpgrader(); + deployScript.setUp(); + + (FiatTokenV2_2 v2_2, V2_2Upgrader upgrader) = deployScript.run(); + + validateImpl(v2_2); + validateUpgrader( + upgrader, + vm.envAddress("FIAT_TOKEN_PROXY_ADDRESS"), + address(v2_2) + ); + } + + function test_DeployImplAndUpgraderWithPredeployedImpl() public { + FiatTokenV2_2 predeployedImpl = new FiatTokenV2_2(); + DeployImplAndUpgrader deployScript = new DeployImplAndUpgrader(); + deployScript.setUp(); + + (, V2_2Upgrader upgrader) = deployScript.deploy( + address(predeployedImpl) + ); + + validateUpgrader( + upgrader, + vm.envAddress("FIAT_TOKEN_PROXY_ADDRESS"), + address(predeployedImpl) + ); + } + + function validateUpgrader( + V2_2Upgrader upgrader, + address proxy, + address impl + ) internal { + assertEq(upgrader.implementation(), impl); + assertEq(upgrader.proxy(), proxy); + assertEq(upgrader.newProxyAdmin(), proxyAdmin); + assertEq(upgrader.owner(), vm.addr(deployerPrivateKey)); + assertEq(upgrader.accountsToBlacklist(), accountsToBlacklist); + } +} diff --git a/test/scripts/deploy/deploy-master-minter.t.sol b/test/scripts/deploy/deploy-master-minter.t.sol new file mode 100644 index 000000000..822e2d8c2 --- /dev/null +++ b/test/scripts/deploy/deploy-master-minter.t.sol @@ -0,0 +1,47 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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.12; +pragma experimental ABIEncoderV2; // needed for compiling older solc versions: https://github.com/foundry-rs/foundry/issues/4376 + +import { TestUtils } from "./TestUtils.sol"; +import { + DeployMasterMinter +} from "../../../scripts/deploy/deploy-master-minter.s.sol"; +import { MasterMinter } from "../../../contracts/minting/MasterMinter.sol"; + +// solhint-disable func-name-mixedcase + +contract DeployMasterMinterTest is TestUtils { + DeployMasterMinter internal deployScript; + + function setUp() public override { + TestUtils.setUp(); + } + + function test_deployMasterMinter() public { + deployScript = new DeployMasterMinter(); + deployScript.setUp(); + MasterMinter masterMinter = deployScript.run(); + + validateMasterMinter( + masterMinter, + vm.envAddress("FIAT_TOKEN_PROXY_ADDRESS") + ); + } +} diff --git a/test/util/ECRecover.test.ts b/test/util/ECRecover.test.ts index 5ef94a2e3..98d588b2a 100644 --- a/test/util/ECRecover.test.ts +++ b/test/util/ECRecover.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -18,7 +18,7 @@ import { bufferFromHexString, ecSign, expectRevert } from "../helpers"; import { ACCOUNTS_AND_KEYS, ZERO_BYTES32 } from "../helpers/constants"; -import { EcRecoverTestInstance } from "../../@types/generated/EcRecoverTest"; +import { ECRecoverTestInstance } from "../../@types/generated"; import { packSig } from "./SignatureChecker.test"; import { toCompactSig } from "ethereumjs-util"; @@ -31,7 +31,7 @@ describe("ECRecover", () => { const sig2 = ecSign(digest, account2.key); const sig3 = ecSign(digest, account3.key); - let ecRecover: EcRecoverTestInstance; + let ecRecover: ECRecoverTestInstance; beforeEach(async () => { ecRecover = await ECRecoverTest.new(); diff --git a/test/util/EIP712Test.ts b/test/util/EIP712Test.ts index 254fb912d..6dff6374e 100644 --- a/test/util/EIP712Test.ts +++ b/test/util/EIP712Test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -16,15 +16,15 @@ * limitations under the License. */ -import { Eip712TestInstance } from "../../@types/generated"; +import { EIP712TestInstance } from "../../@types/generated"; import { wordlist } from "ethereum-cryptography/bip39/wordlists/english"; import sampleSize from "lodash/sampleSize"; import { makeDomainSeparator } from "../helpers"; const EIP712Test = artifacts.require("EIP712Test"); -contract("EIP712", (_accounts) => { - let eip712: Eip712TestInstance; +describe("EIP712", () => { + let eip712: EIP712TestInstance; let chainId: number; let randomName: string; let randomVersion: string; @@ -32,11 +32,7 @@ contract("EIP712", (_accounts) => { beforeEach(async () => { eip712 = await EIP712Test.new(); - - // hardcode chainId to be 1 due to ganache bug - // https://github.com/trufflesuite/ganache/issues/1643 - // chainId = await web3.eth.getChainId(); - chainId = 1; + chainId = await web3.eth.getChainId(); randomName = sampleSize(wordlist, 3).join(" "); randomVersion = (Math.floor(Math.random() * 10) + 1).toString(); diff --git a/test/util/MessageHashUtils.test.ts b/test/util/MessageHashUtils.test.ts index 8bda78dc3..303712aab 100644 --- a/test/util/MessageHashUtils.test.ts +++ b/test/util/MessageHashUtils.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -25,7 +25,7 @@ import { MessageHashUtilsTestInstance } from "../../@types/generated"; const MessageHashUtils = artifacts.require("MessageHashUtilsTest"); -contract("MessageHashUtils", function () { +describe("MessageHashUtils", function () { context("toTypedDataHash", function () { it("returns the digest correctly", async function () { const messageHashUtils: MessageHashUtilsTestInstance = await MessageHashUtils.new(); diff --git a/test/util/SignatureChecker.test.ts b/test/util/SignatureChecker.test.ts index 0024baf4a..ff78374ef 100644 --- a/test/util/SignatureChecker.test.ts +++ b/test/util/SignatureChecker.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -27,12 +27,12 @@ import { ZERO_ADDRESS, ZERO_BYTES32, } from "../helpers/constants"; -import { SignatureCheckerInstance } from "../../@types/generated/SignatureChecker"; import { - MockErc1271WalletInstance, - MockErc1271WalletReturningBytes32Instance, - MockErc1271WalletWithCustomValidationInstance, - MockStateModifyingErc1271WalletInstance, + MockERC1271WalletInstance, + MockERC1271WalletReturningBytes32Instance, + MockERC1271WalletWithCustomValidationInstance, + MockStateModifyingERC1271WalletInstance, + SignatureCheckerInstance, } from "../../@types/generated"; const SignatureChecker = artifacts.require("SignatureChecker"); @@ -55,10 +55,10 @@ describe("SignatureChecker", () => { const sig3 = ecSign(digest, account3.key); let signatureChecker: SignatureCheckerInstance; - let standardWallet: MockErc1271WalletInstance; - let walletReturningBytes32: MockErc1271WalletReturningBytes32Instance; - let customWallet: MockErc1271WalletWithCustomValidationInstance; - let stateModifyingWallet: MockStateModifyingErc1271WalletInstance; + let standardWallet: MockERC1271WalletInstance; + let walletReturningBytes32: MockERC1271WalletReturningBytes32Instance; + let customWallet: MockERC1271WalletWithCustomValidationInstance; + let stateModifyingWallet: MockStateModifyingERC1271WalletInstance; beforeEach(async () => { signatureChecker = await SignatureChecker.new(); diff --git a/test/v1.1/FiatTokenV1_1.test.ts b/test/v1.1/FiatTokenV1_1.test.ts index d798a0027..e25c75642 100644 --- a/test/v1.1/FiatTokenV1_1.test.ts +++ b/test/v1.1/FiatTokenV1_1.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -18,19 +18,21 @@ import { behavesLikeRescuable } from "./Rescuable.behavior"; import { - FiatTokenV11Instance, + FiatTokenV1_1Instance, RescuableInstance, } from "../../@types/generated"; import { usesOriginalStorageSlotPositions } from "../helpers/storageSlots.behavior"; +import { HARDHAT_ACCOUNTS } from "../helpers/constants"; const FiatTokenV1_1 = artifacts.require("FiatTokenV1_1"); -contract("FiatTokenV1_1", (accounts) => { - let fiatToken: FiatTokenV11Instance; +describe("FiatTokenV1_1", () => { + const owner = HARDHAT_ACCOUNTS[0]; + + let fiatToken: FiatTokenV1_1Instance; beforeEach(async () => { fiatToken = await FiatTokenV1_1.new(); - const owner = accounts[0]; await fiatToken.initialize( "USD Coin", "USDC", @@ -43,10 +45,9 @@ contract("FiatTokenV1_1", (accounts) => { ); }); - behavesLikeRescuable(() => fiatToken as RescuableInstance, accounts); + behavesLikeRescuable(() => fiatToken as RescuableInstance); usesOriginalStorageSlotPositions({ Contract: FiatTokenV1_1, version: 1.1, - accounts, }); }); diff --git a/test/v1.1/Rescuable.behavior.ts b/test/v1.1/Rescuable.behavior.ts index 27727eaf3..de484bb19 100644 --- a/test/v1.1/Rescuable.behavior.ts +++ b/test/v1.1/Rescuable.behavior.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -16,17 +16,17 @@ * limitations under the License. */ -import { RescuableInstance } from "../../@types/generated/Rescuable"; import { expectRevert } from "../helpers"; -import { DummyErc20Instance } from "../../@types/generated"; -import { ZERO_ADDRESS } from "../helpers/constants"; +import { DummyERC20Instance, RescuableInstance } from "../../@types/generated"; +import { HARDHAT_ACCOUNTS, ZERO_ADDRESS } from "../helpers/constants"; const DummyERC20 = artifacts.require("DummyERC20"); export function behavesLikeRescuable( - getContract: () => RescuableInstance, - accounts: Truffle.Accounts + getContract: () => RescuableInstance ): void { describe("behaves like a Rescuable", () => { + const accounts = HARDHAT_ACCOUNTS; + let rescuable: RescuableInstance; let owner: string; @@ -58,15 +58,13 @@ export function behavesLikeRescuable( }); describe("rescueERC20", () => { - let rescuer: string; - let tokenOwner: string; - let token: DummyErc20Instance; + const rescuer = accounts[1]; + const tokenOwner = accounts[14]; + + let token: DummyERC20Instance; beforeEach(async () => { - rescuer = accounts[1]; await rescuable.updateRescuer(rescuer, { from: owner }); - - tokenOwner = accounts[14]; token = await DummyERC20.new("Dummy", "DUMB", 1000, { from: tokenOwner, }); diff --git a/test/v1.1/Rescuable.test.ts b/test/v1.1/Rescuable.test.ts index d22b740b0..229af5147 100644 --- a/test/v1.1/Rescuable.test.ts +++ b/test/v1.1/Rescuable.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -16,20 +16,20 @@ * limitations under the License. */ -import { RescuableInstance } from "../../@types/generated/Rescuable"; +import { RescuableInstance } from "../../@types/generated"; import { behavesLikeRescuable } from "./Rescuable.behavior"; import { ZERO_ADDRESS } from "../helpers/constants"; const Rescuable = artifacts.require("Rescuable"); -contract("Rescuable", (accounts) => { +describe("Rescuable", () => { let rescuable: RescuableInstance; beforeEach(async () => { rescuable = await Rescuable.new(); }); - behavesLikeRescuable(() => rescuable, accounts); + behavesLikeRescuable(() => rescuable); it("initially sets rescuer to be the zero address", async () => { const rescuer = await rescuable.rescuer(); diff --git a/test/v1/FiatTokenV1.test.ts b/test/v1/FiatTokenV1.test.ts index 376ec1a81..45860863b 100644 --- a/test/v1/FiatTokenV1.test.ts +++ b/test/v1/FiatTokenV1.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -20,10 +20,9 @@ import { usesOriginalStorageSlotPositions } from "../helpers/storageSlots.behavi const FiatTokenV1 = artifacts.require("FiatTokenV1"); -contract("FiatTokenV1", (accounts) => { +describe("FiatTokenV1", () => { usesOriginalStorageSlotPositions({ Contract: FiatTokenV1, version: 1, - accounts, }); }); diff --git a/test/v1/Pausable.test.js b/test/v1/Pausable.test.js index e533bb68e..295f5616a 100644 --- a/test/v1/Pausable.test.js +++ b/test/v1/Pausable.test.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -25,7 +25,7 @@ const { const Pausable = artifacts.require("Pausable"); -contract("Pausable", (_accounts) => { +describe("Pausable", () => { let pausable; beforeEach(async () => { diff --git a/test/v1/TokenTestUtils.js b/test/v1/TokenTestUtils.js index d4ab9012a..e33eedbaf 100644 --- a/test/v1/TokenTestUtils.js +++ b/test/v1/TokenTestUtils.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -31,6 +31,7 @@ const { proxyOwnerAccount, upgraderAccount, } = require("./helpers/tokenTest"); +const { ZERO_BYTES32 } = require("../helpers/constants"); const FiatTokenV1 = artifacts.require("FiatTokenV1"); const FiatTokenProxy = artifacts.require("FiatTokenProxy"); @@ -649,35 +650,42 @@ async function expectRevert(contractPromise) { async function getAdmin(proxy) { const adm = await web3.eth.getStorageAt(proxy.address, adminSlot); - return web3.utils.toChecksumAddress("0x" + adm.slice(2).padStart(40, "0")); + return web3.utils.toChecksumAddress("0x" + adm.slice(26)); } async function getImplementation(proxy) { const impl = await web3.eth.getStorageAt(proxy.address, implSlot); - return web3.utils.toChecksumAddress("0x" + impl.slice(2).padStart(40, "0")); + return web3.utils.toChecksumAddress("0x" + impl.slice(26)); } async function getInitializedV1(token) { const slot8Data = await web3.eth.getStorageAt(token.address, 8); let initialized; - if (slot8Data === "0x0") { + if (slot8Data === ZERO_BYTES32) { // validate proxy not yet initialized for (let i = 0; i <= 20; i++) { - assert.strictEqual("0x0", await web3.eth.getStorageAt(token.address, i)); + assert.strictEqual( + ZERO_BYTES32, + await web3.eth.getStorageAt(token.address, i) + ); } - initialized = "0x00"; + initialized = ZERO_BYTES32; } else { - const slot8DataPadded = slot8Data.slice(2).padStart(42, "0"); - if (slot8DataPadded.length !== 42) { + if (slot8Data.length !== 66) { assert.fail("slot8Data unexpected size"); } - const masterMinterAddress = await token.masterMinter.call(); - assert.isTrue( - slot8DataPadded.indexOf(masterMinterAddress.slice(2).toLowerCase()) === 2 + // String layout + // 2 chars - 0x + // 22 zeroes chars + // 2 chars - initialized (bool) + // 40 chars - masterMinter (address) + initialized = "0x" + slot8Data.slice(24, 26); + const masterMinterAddress = web3.utils.toChecksumAddress( + "0x" + slot8Data.slice(26) ); - - initialized = "0x" + slot8DataPadded.slice(0, 2); + const expectedMasterMinterAddress = await token.masterMinter.call(); + assert.strictEqual(masterMinterAddress, expectedMasterMinterAddress); } return initialized; } diff --git a/test/v1/abiHacking.test.js b/test/v1/abiHacking.test.js index ca82183ef..4446eea43 100644 --- a/test/v1/abiHacking.test.js +++ b/test/v1/abiHacking.test.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -16,7 +16,6 @@ * limitations under the License. */ -const { Transaction } = require("ethereumjs-tx"); const wrapTests = require("./helpers/wrapTests"); const { expectRevert, @@ -44,7 +43,7 @@ function mockStringAddressEncode(methodName, address) { return functionSignature(methodName) + version + encodeAddress(address); } -function runTests(newToken, _accounts) { +function runTests(newToken) { let proxy, token; beforeEach(async () => { @@ -57,20 +56,12 @@ function runTests(newToken, _accounts) { // sanity check for pausable it("abi004 FiatToken pause() is public", async () => { const badData = functionSignature("pause()"); - const tx = new Transaction({ - nonce: web3.utils.toHex( - await web3.eth.getTransactionCount(pauserAccount) - ), - gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); - tx.sign(privateKey); - const raw = "0x" + tx.serialize().toString("hex"); - + const raw = await makeRawTransaction( + badData, + pauserAccount, + pauserAccountPrivateKey, + token.address + ); await sendRawTransaction(raw); const customVars = [{ variable: "paused", expectedValue: true }]; await checkVariables([token], [customVars]); @@ -78,77 +69,45 @@ function runTests(newToken, _accounts) { it("abi040 Blacklistable constructor is not a function", async () => { const badData = functionSignature("Blacklistable()"); - const tx = new Transaction({ - nonce: web3.utils.toHex( - await web3.eth.getTransactionCount(pauserAccount) - ), - gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); - tx.sign(privateKey); - const raw = "0x" + tx.serialize().toString("hex"); - + const raw = await makeRawTransaction( + badData, + pauserAccount, + pauserAccountPrivateKey, + token.address + ); await expectRevert(sendRawTransaction(raw)); }); it("abi042 Ownable constructor is not a function", async () => { const badData = functionSignature("Ownable()"); - const tx = new Transaction({ - nonce: web3.utils.toHex( - await web3.eth.getTransactionCount(pauserAccount) - ), - gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); - tx.sign(privateKey); - const raw = "0x" + tx.serialize().toString("hex"); - + const raw = await makeRawTransaction( + badData, + pauserAccount, + pauserAccountPrivateKey, + token.address + ); await expectRevert(sendRawTransaction(raw)); }); it("abi005 Pausable constructor is not a function", async () => { const badData = functionSignature("Pausable()"); - const tx = new Transaction({ - nonce: web3.utils.toHex( - await web3.eth.getTransactionCount(pauserAccount) - ), - gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); - tx.sign(privateKey); - const raw = "0x" + tx.serialize().toString("hex"); - + const raw = await makeRawTransaction( + badData, + pauserAccount, + pauserAccountPrivateKey, + token.address + ); await expectRevert(sendRawTransaction(raw)); }); it("abi043 FiatTokenProxy constructor is not a function", async () => { const badData = functionSignature("FiatTokenProxy()"); - const tx = new Transaction({ - nonce: web3.utils.toHex( - await web3.eth.getTransactionCount(pauserAccount) - ), - gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); - tx.sign(privateKey); - const raw = "0x" + tx.serialize().toString("hex"); - + const raw = await makeRawTransaction( + badData, + pauserAccount, + pauserAccountPrivateKey, + token.address + ); await expectRevert(sendRawTransaction(raw)); }); @@ -248,39 +207,23 @@ function runTests(newToken, _accounts) { it("abi041 FiatToken constructor is not a function", async () => { const badData = functionSignature("FiatToken()"); - const tx = new Transaction({ - nonce: web3.utils.toHex( - await web3.eth.getTransactionCount(pauserAccount) - ), - gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - const privateKey = Buffer.from(pauserAccountPrivateKey, "hex"); - tx.sign(privateKey); - const raw = "0x" + tx.serialize().toString("hex"); - + const raw = await makeRawTransaction( + badData, + pauserAccount, + pauserAccountPrivateKey, + token.address + ); await expectRevert(sendRawTransaction(raw)); }); it("abi025 setOwner is internal", async () => { const badData = msgData("setOwner(address)", pauserAccount); - const tx = new Transaction({ - nonce: web3.utils.toHex( - await web3.eth.getTransactionCount(tokenOwnerAccount) - ), - gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), - gasLimit: 100000, - to: token.address, - value: 0, - data: badData, - }); - const privateKey = Buffer.from(tokenOwnerPrivateKey, "hex"); - tx.sign(privateKey); - const raw = "0x" + tx.serialize().toString("hex"); - + const raw = await makeRawTransaction( + badData, + tokenOwnerAccount, + tokenOwnerPrivateKey, + token.address + ); await expectRevert(sendRawTransaction(raw)); }); diff --git a/test/v1/events.test.js b/test/v1/events.test.js index 26a8a154e..8e987c86e 100644 --- a/test/v1/events.test.js +++ b/test/v1/events.test.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -50,7 +50,7 @@ const { const amount = 100; -function runTests(_newToken, _accounts, version) { +function runTests(_newToken, version) { let proxy, token; beforeEach(async () => { diff --git a/test/v1/extendedPositive.test.js b/test/v1/extendedPositive.test.js index d023471e4..3b0ddeb44 100644 --- a/test/v1/extendedPositive.test.js +++ b/test/v1/extendedPositive.test.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -34,7 +34,7 @@ const { const amount = 100; -function runTests(newToken, _accounts, version) { +function runTests(newToken, version) { let proxy, token; beforeEach(async () => { diff --git a/test/v1/helpers/abi.js b/test/v1/helpers/abi.js index e6eddea41..1607c50e7 100644 --- a/test/v1/helpers/abi.js +++ b/test/v1/helpers/abi.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -16,30 +16,31 @@ * limitations under the License. */ -const { Transaction } = require("ethereumjs-tx"); - -async function makeRawTransaction(data, from, hexPrivateKey, contractAddress) { - const tx = new Transaction({ - nonce: web3.utils.toHex(await web3.eth.getTransactionCount(from)), +async function makeRawTransaction( + data, + fromAddress, + fromAddressPrivateKey, + toAddress, + gasLimit = 1000000 +) { + const wallet = web3.eth.accounts.wallet.add({ + privateKey: fromAddressPrivateKey, + address: fromAddress, + }); + const { rawTransaction } = await wallet.signTransaction({ + from: fromAddress, + to: toAddress, + gas: gasLimit, gasPrice: web3.utils.toHex(web3.utils.toWei("20", "gwei")), - gasLimit: 1000000, - to: contractAddress, value: 0, data, + chainId: await web3.eth.getChainId(), }); - const privateKey = Buffer.from(hexPrivateKey, "hex"); - tx.sign(privateKey); - const raw = "0x" + tx.serialize().toString("hex"); - return raw; + return rawTransaction; } function sendRawTransaction(raw) { - return new Promise((resolve, reject) => { - web3.eth.sendSignedTransaction(raw, (err, transactionHash) => { - if (err !== null) return reject(err); - resolve(transactionHash); - }); - }); + return web3.eth.sendSignedTransaction(raw); } function functionSignature(methodName) { diff --git a/test/v1/helpers/tokenTest.js b/test/v1/helpers/tokenTest.js index 4dfb3a94b..96ad52c0b 100644 --- a/test/v1/helpers/tokenTest.js +++ b/test/v1/helpers/tokenTest.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -26,12 +26,12 @@ const { accounts, accountPrivateKeys, ZERO_ADDRESS, + ZERO_BYTES32, } = require("../../helpers/constants"); +const { linkLibraryToTokenContract } = require("../../helpers"); const FiatTokenV1 = artifacts.require("FiatTokenV1"); -const UpgradedFiatToken = artifacts.require("UpgradedFiatToken"); -const SignatureChecker = artifacts.require("SignatureChecker"); -const UpgradedFiatTokenV2_2 = artifacts.require("UpgradedFiatTokenV2_2"); +const FiatTokenV2_2 = artifacts.require("FiatTokenV2_2"); const UpgradedFiatTokenNewFields = artifacts.require( "UpgradedFiatTokenNewFieldsTest" ); @@ -945,46 +945,52 @@ function encodeCall(name, args, values) { async function getAdmin(proxy) { const adm = await web3.eth.getStorageAt(proxy.address, adminSlot); - return web3.utils.toChecksumAddress("0x" + adm.slice(2).padStart(40, "0")); + return web3.utils.toChecksumAddress("0x" + adm.slice(26)); } async function getImplementation(proxy) { const impl = await web3.eth.getStorageAt(proxy.address, implSlot); - return web3.utils.toChecksumAddress("0x" + impl.slice(2).padStart(40, "0")); + return web3.utils.toChecksumAddress("0x" + impl.slice(26)); } async function getInitializedV1(token) { const slot8Data = await web3.eth.getStorageAt(token.address, 8); let initialized; - if (slot8Data === "0x0") { + if (slot8Data === ZERO_BYTES32) { // validate proxy not yet initialized for (let i = 0; i <= 20; i++) { - assert.strictEqual("0x0", await web3.eth.getStorageAt(token.address, i)); + assert.strictEqual( + ZERO_BYTES32, + await web3.eth.getStorageAt(token.address, i) + ); } - initialized = "0x00"; + initialized = ZERO_BYTES32; } else { - const slot8DataPadded = slot8Data.slice(2).padStart(42, "0"); - if (slot8DataPadded.length !== 42) { + if (slot8Data.length !== 66) { assert.fail("slot8Data unexpected size"); } - const masterMinterAddress = await token.masterMinter.call(); - assert.isTrue( - slot8DataPadded.indexOf(masterMinterAddress.slice(2).toLowerCase()) === 2 + // String layout + // 2 chars - 0x + // 22 zeroes chars + // 2 chars - initialized (bool) + // 40 chars - masterMinter (address) + initialized = "0x" + slot8Data.slice(24, 26); + const masterMinterAddress = web3.utils.toChecksumAddress( + "0x" + slot8Data.slice(26) ); - - initialized = "0x" + slot8DataPadded.slice(0, 2); + const expectedMasterMinterAddress = await token.masterMinter.call(); + assert.strictEqual(masterMinterAddress, expectedMasterMinterAddress); } return initialized; } async function deployUpgradedFiatToken(version) { if (version < 2.2) { - return UpgradedFiatToken.new(); + return FiatTokenV1.new(); } else { - await SignatureChecker.new(); - UpgradedFiatTokenV2_2.link(SignatureChecker); - return UpgradedFiatTokenV2_2.new(); + await linkLibraryToTokenContract(FiatTokenV2_2); + return FiatTokenV2_2.new(); } } @@ -992,8 +998,7 @@ async function deployUpgradedFiatTokenNewFields(version) { if (version < 2.2) { return UpgradedFiatTokenNewFields.new(); } else { - await SignatureChecker.new(); - UpgradedFiatTokenV2_2NewFields.link(SignatureChecker); + await linkLibraryToTokenContract(UpgradedFiatTokenV2_2NewFields); return UpgradedFiatTokenV2_2NewFields.new(); } } @@ -1001,8 +1006,6 @@ async function deployUpgradedFiatTokenNewFields(version) { module.exports = { FiatTokenV1, FiatTokenProxy, - UpgradedFiatToken, - UpgradedFiatTokenV2_2, UpgradedFiatTokenNewFields, UpgradedFiatTokenNewFieldsNewLogic, name, diff --git a/test/v1/helpers/wrapTests.js b/test/v1/helpers/wrapTests.js index 8276769e9..eb22f2998 100644 --- a/test/v1/helpers/wrapTests.js +++ b/test/v1/helpers/wrapTests.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -16,6 +16,8 @@ * limitations under the License. */ +const { linkLibraryToTokenContract } = require("../../helpers"); + const FiatTokenV1 = artifacts.require("FiatTokenV1"); const FiatTokenV1_1 = artifacts.require("FiatTokenV1_1"); const FiatTokenV2 = artifacts.require("FiatTokenV2"); @@ -25,24 +27,33 @@ const FiatTokenV2_2 = artifacts.require("FiatTokenV2_2"); // Executes the run_tests_function using an original and // an upgraded token. The test_suite_name is printed standard output. function wrapTests(testSuiteName, runTestsFunction) { - contract(`FiatTokenV1: ${testSuiteName}`, (accounts) => { - runTestsFunction(FiatTokenV1.new, accounts, 1); + describe(`FiatTokenV1: ${testSuiteName}`, () => { + runTestsFunction(FiatTokenV1.new, 1); }); - contract(`FiatTokenV1_1: ${testSuiteName}`, (accounts) => { - runTestsFunction(FiatTokenV1_1.new, accounts, 1.1); + describe(`FiatTokenV1_1: ${testSuiteName}`, () => { + runTestsFunction(FiatTokenV1_1.new, 1.1); }); - contract(`FiatTokenV2: ${testSuiteName}`, (accounts) => { - runTestsFunction(FiatTokenV2.new, accounts, 2); + describe(`FiatTokenV2: ${testSuiteName}`, () => { + before(async () => { + await linkLibraryToTokenContract(FiatTokenV2); + }); + runTestsFunction(FiatTokenV2.new, 2); }); - contract(`FiatTokenV2_1: ${testSuiteName}`, (accounts) => { - runTestsFunction(FiatTokenV2_1.new, accounts, 2.1); + describe(`FiatTokenV2_1: ${testSuiteName}`, () => { + before(async () => { + await linkLibraryToTokenContract(FiatTokenV2_1); + }); + runTestsFunction(FiatTokenV2_1.new, 2.1); }); - contract(`FiatTokenV2_2: ${testSuiteName}`, (accounts) => { - runTestsFunction(FiatTokenV2_2.new, accounts, 2.2); + describe(`FiatTokenV2_2: ${testSuiteName}`, () => { + before(async () => { + await linkLibraryToTokenContract(FiatTokenV2_2); + }); + runTestsFunction(FiatTokenV2_2.new, 2.2); }); } diff --git a/test/v1/legacy.test.js b/test/v1/legacy.test.js index 6418d6c5e..51d095502 100644 --- a/test/v1/legacy.test.js +++ b/test/v1/legacy.test.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -44,12 +44,14 @@ const { proxyOwnerAccount, initializeTokenWithProxy, upgradeTo, - UpgradedFiatToken, getAdmin, } = require("./helpers/tokenTest"); +const { HARDHAT_ACCOUNTS } = require("../helpers/constants"); // these tests are for reference and do not track side effects on all variables -function runTests(newToken, accounts, version) { +function runTests(newToken, version) { + const accounts = HARDHAT_ACCOUNTS; + let proxy, token; beforeEach(async () => { @@ -672,18 +674,17 @@ function runTests(newToken, accounts, version) { const initialBalance = await token.balanceOf(accounts[2]); assert.isTrue(new BN(initialBalance).eqn(200)); - const newRawToken = await UpgradedFiatToken.new(); + const newRawToken = await newToken(); const tokenConfig = await upgradeTo(proxy, newRawToken); const newProxiedToken = tokenConfig.token; - const newToken = newProxiedToken; - const upgradedBalance = await newToken.balanceOf(accounts[2]); + const upgradedBalance = await newProxiedToken.balanceOf(accounts[2]); assert.isTrue(new BN(upgradedBalance).eqn(200)); - await newToken.configureMinter(minterAccount, 500, { + await newProxiedToken.configureMinter(minterAccount, 500, { from: masterMinterAccount, }); - await newToken.mint(accounts[2], 200, { from: minterAccount }); - const balance = await newToken.balanceOf(accounts[2]); + await newProxiedToken.mint(accounts[2], 200, { from: minterAccount }); + const balance = await newProxiedToken.balanceOf(accounts[2]); assert.isTrue(new BN(balance).eqn(400)); }); @@ -742,18 +743,17 @@ function runTests(newToken, accounts, version) { const initialBalance = await token.balanceOf(accounts[2]); assert.isTrue(new BN(initialBalance).eqn(200)); - const newRawToken = await UpgradedFiatToken.new(); + const newRawToken = await newToken(); const tokenConfig = await upgradeTo(proxy, newRawToken, address1); const newProxiedToken = tokenConfig.token; - const newToken = newProxiedToken; - const upgradedBalance = await newToken.balanceOf(accounts[2]); + const upgradedBalance = await newProxiedToken.balanceOf(accounts[2]); assert.isTrue(new BN(upgradedBalance).eqn(200)); - await newToken.configureMinter(minterAccount, 500, { + await newProxiedToken.configureMinter(minterAccount, 500, { from: masterMinterAccount, }); - await newToken.mint(accounts[2], 200, { from: minterAccount }); - const balance = await newToken.balanceOf(accounts[2]); + await newProxiedToken.mint(accounts[2], 200, { from: minterAccount }); + const balance = await newProxiedToken.balanceOf(accounts[2]); assert.isTrue(new BN(balance).eqn(400)); }); diff --git a/test/v1/misc.test.js b/test/v1/misc.test.js index b167251c2..676435d76 100644 --- a/test/v1/misc.test.js +++ b/test/v1/misc.test.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -24,6 +24,7 @@ const { POW_2_255_MINUS1_HEX, MAX_UINT256_HEX, MAX_UINT256_BN, + ZERO_BYTES32, } = require("../helpers/constants"); const wrapTests = require("./helpers/wrapTests"); const { @@ -43,7 +44,7 @@ const { const amount = 100; -function runTests(newToken, _accounts, version) { +function runTests(newToken, version) { let proxy, token; beforeEach(async () => { @@ -742,7 +743,7 @@ function runTests(newToken, _accounts, version) { }); const token = await FiatTokenV1.at(newProxy.address); const initialized = await getInitializedV1(token); - assert.strictEqual("0x00", initialized); + assert.strictEqual(ZERO_BYTES32, initialized); }); it("ms047 configureMinter works on amount=2^256-1", async () => { diff --git a/test/v1/negative.test.js b/test/v1/negative.test.js index c697bba92..c6e143de3 100644 --- a/test/v1/negative.test.js +++ b/test/v1/negative.test.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -18,9 +18,9 @@ const wrapTests = require("./helpers/wrapTests"); const BN = require("bn.js"); +const { expectRevert } = require("../helpers"); const { checkVariables, - expectRevert, nullAccount, arbitraryAccount, arbitraryAccount2, @@ -32,12 +32,11 @@ const { initializeTokenWithProxy, customInitializeTokenWithProxy, upgradeTo, - UpgradedFiatToken, } = require("./helpers/tokenTest"); const amount = 100; -function runTests(newToken, _accounts, version) { +function runTests(newToken, version) { let proxy, token; beforeEach(async () => { @@ -729,7 +728,10 @@ function runTests(newToken, _accounts, version) { }, { variable: "totalSupply", expectedValue: new BN(amount) }, ]; - await expectRevert(token.burn(-1, { from: minterAccount })); + await expectRevert( + token.burn(-1, { from: minterAccount }), + "value out-of-bounds" + ); await checkVariables([token], [customVars]); }); @@ -936,10 +938,9 @@ function runTests(newToken, _accounts, version) { it("nt054 should fail to transferOwnership when sender is not owner", async () => { // Create upgraded token - const newRawToken = await UpgradedFiatToken.new(); + const newRawToken = await newToken(); const tokenConfig = await upgradeTo(proxy, newRawToken); const newProxiedToken = tokenConfig.token; - const newToken = newProxiedToken; const newTokenResult = [ { variable: "proxiedTokenAddress", expectedValue: newRawToken.address }, @@ -947,9 +948,11 @@ function runTests(newToken, _accounts, version) { // expectRevert on transferOwnership with wrong sender await expectRevert( - newToken.transferOwnership(arbitraryAccount, { from: arbitraryAccount2 }) + newProxiedToken.transferOwnership(arbitraryAccount, { + from: arbitraryAccount2, + }) ); - await checkVariables([newToken], [newTokenResult]); + await checkVariables([newProxiedToken], [newTokenResult]); }); it("nt055 should fail to mint when amount = 0", async () => { diff --git a/test/v1/positive.test.js b/test/v1/positive.test.js index c3eb0abf4..87f278dfe 100644 --- a/test/v1/positive.test.js +++ b/test/v1/positive.test.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -32,7 +32,7 @@ const { const amount = 100; -function runTests(newToken, _accounts) { +function runTests(newToken) { let proxy, token; beforeEach(async () => { diff --git a/test/v1/proxyNegative.test.js b/test/v1/proxyNegative.test.js index db783b29f..307fd600f 100644 --- a/test/v1/proxyNegative.test.js +++ b/test/v1/proxyNegative.test.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -37,13 +37,12 @@ const { initializeTokenWithProxy, encodeCall, FiatTokenV1, - UpgradedFiatToken, deployUpgradedFiatTokenNewFields, } = require("./helpers/tokenTest"); const amount = 100; -function runTests(newToken, _accounts, version) { +function runTests(newToken, version) { let rawToken, proxy, token; beforeEach(async () => { @@ -137,7 +136,7 @@ function runTests(newToken, _accounts, version) { }); it("nut009 should fail to call upgradeTo with non-adminAccount", async () => { - const upgradedToken = await UpgradedFiatToken.new(); + const upgradedToken = await newToken(); await expectRevert( proxy.upgradeTo(upgradedToken.address, { from: masterMinterAccount }) ); diff --git a/test/v1/proxyPositive.test.js b/test/v1/proxyPositive.test.js index c71a33843..deed07557 100644 --- a/test/v1/proxyPositive.test.js +++ b/test/v1/proxyPositive.test.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -39,7 +39,6 @@ const { encodeCall, validateTransferEvent, FiatTokenProxy, - UpgradedFiatToken, UpgradedFiatTokenNewFields, UpgradedFiatTokenNewFieldsNewLogic, getAdmin, @@ -49,7 +48,7 @@ const { makeRawTransaction, sendRawTransaction } = require("./helpers/abi"); const amount = 100; -function runTests(newToken, _accounts, version) { +function runTests(newToken, version) { let rawToken, proxy, token; beforeEach(async () => { @@ -68,13 +67,13 @@ function runTests(newToken, _accounts, version) { await token.mint(arbitraryAccount, mintAmount, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); - const upgradedToken = await UpgradedFiatToken.new(); + const upgradedToken = await newToken(); const tokenConfig = await upgradeTo( proxy, upgradedToken, proxyOwnerAccount ); - const newToken = tokenConfig.token; + const proxiedToken = tokenConfig.token; const customVars = [ { @@ -93,7 +92,7 @@ function runTests(newToken, _accounts, version) { { variable: "totalSupply", expectedValue: new BN(mintAmount) }, { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; - await checkVariables([newToken], [customVars]); + await checkVariables([proxiedToken], [customVars]); }); it("upt002 should upgradeToandCall to contract with new data fields set on initVX and ensure new fields are correct and old data is preserved", async () => { @@ -323,15 +322,15 @@ function runTests(newToken, _accounts, version) { await token.mint(arbitraryAccount, mintAmount + 1, { from: minterAccount }); await token.transfer(pauserAccount, mintAmount, { from: arbitraryAccount }); - const upgradedToken = await UpgradedFiatToken.new(); + const upgradedToken = await newToken(); const tokenConfig = await upgradeTo( proxy, upgradedToken, proxyOwnerAccount ); - const newToken = tokenConfig.token; + const proxiedToken = tokenConfig.token; - const transfer = await newToken.transfer(pauserAccount, 1, { + const transfer = await proxiedToken.transfer(pauserAccount, 1, { from: arbitraryAccount, }); validateTransferEvent(transfer, arbitraryAccount, pauserAccount, new BN(1)); @@ -353,31 +352,31 @@ function runTests(newToken, _accounts, version) { { variable: "totalSupply", expectedValue: new BN(mintAmount + 1) }, { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; - await checkVariables([newToken], [customVars]); + await checkVariables([proxiedToken], [customVars]); }); it("upt006 should upgrade while paused and upgraded contract should be paused as a result; then unpause should unpause contract", async () => { await token.pause({ from: pauserAccount }); - const upgradedToken = await UpgradedFiatToken.new(); + const upgradedToken = await newToken(); const tokenConfig = await upgradeTo( proxy, upgradedToken, proxyOwnerAccount ); - const newToken = tokenConfig.token; + const proxiedToken = tokenConfig.token; const customVars = [ { variable: "paused", expectedValue: true }, { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; - await checkVariables([newToken], [customVars]); + await checkVariables([proxiedToken], [customVars]); - await newToken.unpause({ from: pauserAccount }); + await proxiedToken.unpause({ from: pauserAccount }); const customVars2 = [ { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; - await checkVariables([newToken], [customVars2]); + await checkVariables([proxiedToken], [customVars2]); }); it("upt007 should upgrade contract to original address", async () => { @@ -484,7 +483,7 @@ function runTests(newToken, _accounts, version) { }); it("upt014 should upgradeTo while new logic is blacklisted", async () => { - const upgradedToken = await UpgradedFiatToken.new(); + const upgradedToken = await newToken(); await token.blacklist(upgradedToken.address, { from: blacklisterAccount }); const tokenConfig = await upgradeTo( @@ -492,12 +491,12 @@ function runTests(newToken, _accounts, version) { upgradedToken, proxyOwnerAccount ); - const newToken = tokenConfig.token; + const proxiedToken = tokenConfig.token; const customVars = [ { variable: "proxiedTokenAddress", expectedValue: upgradedToken.address }, ]; - await checkVariables([newToken], [customVars]); + await checkVariables([proxiedToken], [customVars]); }); } diff --git a/test/v2/FiatTokenV2.test.ts b/test/v2/FiatTokenV2.test.ts index 48e1e264d..42c5f49b8 100644 --- a/test/v2/FiatTokenV2.test.ts +++ b/test/v2/FiatTokenV2.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -16,31 +16,21 @@ * limitations under the License. */ -import { behavesLikeRescuable } from "../v1.1/Rescuable.behavior"; -import { - MockErc1271WalletInstance, - FiatTokenV2Instance, - RescuableInstance, -} from "../../@types/generated"; -import { AnyFiatTokenV2Instance } from "../../@types/AnyFiatTokenV2Instance"; +import { FiatTokenV2Instance } from "../../@types/generated"; import { usesOriginalStorageSlotPositions } from "../helpers/storageSlots.behavior"; -import { hasSafeAllowance } from "./safeAllowance.behavior"; -import { hasGasAbstraction } from "./GasAbstraction/GasAbstraction.behavior"; -import { - SignatureBytesType, - TestParams, - WalletType, - makeDomainSeparator, -} from "./GasAbstraction/helpers"; -import { expectRevert } from "../helpers"; -import { testTransferWithMultipleAuthorizations } from "./GasAbstraction/testTransferWithMultipleAuthorizations"; +import { linkLibraryToTokenContract } from "../helpers"; +import { HARDHAT_ACCOUNTS } from "../helpers/constants"; +import { behavesLikeFiatTokenV2 } from "./v2.behavior"; const FiatTokenV2 = artifacts.require("FiatTokenV2"); -const MockERC1271Wallet = artifacts.require("MockERC1271Wallet"); -contract("FiatTokenV2", (accounts) => { - const fiatTokenOwner = accounts[9]; +describe("FiatTokenV2", () => { let fiatToken: FiatTokenV2Instance; + const fiatTokenOwner = HARDHAT_ACCOUNTS[9]; + + before(async () => { + await linkLibraryToTokenContract(FiatTokenV2); + }); beforeEach(async () => { fiatToken = await FiatTokenV2.new(); @@ -57,64 +47,9 @@ contract("FiatTokenV2", (accounts) => { await fiatToken.initializeV2("USD Coin", { from: fiatTokenOwner }); }); - behavesLikeFiatTokenV2(accounts, 2, () => fiatToken, fiatTokenOwner); + behavesLikeFiatTokenV2(2, () => fiatToken); usesOriginalStorageSlotPositions({ Contract: FiatTokenV2, version: 2, - accounts, }); }); - -export function behavesLikeFiatTokenV2( - accounts: Truffle.Accounts, - version: number, - getFiatToken: () => AnyFiatTokenV2Instance, - fiatTokenOwner: string -): void { - let domainSeparator: string; - - beforeEach(async () => { - domainSeparator = makeDomainSeparator( - "USD Coin", - "2", - 1, // hardcoded to 1 because of ganache bug: https://github.com/trufflesuite/ganache/issues/1643 - getFiatToken().address - ); - }); - - behavesLikeRescuable(getFiatToken as () => RescuableInstance, accounts); - - it("has the expected domain separator", async () => { - expect(await getFiatToken().DOMAIN_SEPARATOR()).to.equal(domainSeparator); - }); - - hasSafeAllowance(version, getFiatToken, fiatTokenOwner, accounts); - - const testParams: TestParams = { - version, - getFiatToken, - getDomainSeparator: () => domainSeparator, - getERC1271Wallet, - fiatTokenOwner, - accounts, - signerWalletType: WalletType.EOA, - signatureBytesType: SignatureBytesType.Unpacked, - }; - - hasGasAbstraction(testParams); - - testTransferWithMultipleAuthorizations(testParams); - - it("disallows calling initializeV2 twice", async () => { - // It was called once in beforeEach. Try to call again. - await expectRevert( - getFiatToken().initializeV2("Not USD Coin", { from: fiatTokenOwner }) - ); - }); -} - -export async function getERC1271Wallet( - owner: string -): Promise { - return await MockERC1271Wallet.new(owner); -} diff --git a/test/v2/FiatTokenV2_1.test.ts b/test/v2/FiatTokenV2_1.test.ts index 51aeb2960..8fd120aca 100644 --- a/test/v2/FiatTokenV2_1.test.ts +++ b/test/v2/FiatTokenV2_1.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -16,16 +16,22 @@ * limitations under the License. */ -import { FiatTokenV21Instance } from "../../@types/generated"; -import { expectRevert } from "../helpers"; +import { FiatTokenV2_1Instance } from "../../@types/generated"; +import { expectRevert, linkLibraryToTokenContract } from "../helpers"; +import { HARDHAT_ACCOUNTS } from "../helpers/constants"; import { usesOriginalStorageSlotPositions } from "../helpers/storageSlots.behavior"; -import { behavesLikeFiatTokenV2 } from "./FiatTokenV2.test"; +import { behavesLikeFiatTokenV2 } from "./v2.behavior"; const FiatTokenV2_1 = artifacts.require("FiatTokenV2_1"); -contract("FiatTokenV2_1", (accounts) => { - const fiatTokenOwner = accounts[9]; - let fiatToken: FiatTokenV21Instance; +describe("FiatTokenV2_1", () => { + const fiatTokenOwner = HARDHAT_ACCOUNTS[9]; + + let fiatToken: FiatTokenV2_1Instance; + + before(async () => { + await linkLibraryToTokenContract(FiatTokenV2_1); + }); beforeEach(async () => { fiatToken = await FiatTokenV2_1.new(); @@ -42,15 +48,14 @@ contract("FiatTokenV2_1", (accounts) => { await fiatToken.initializeV2("USD Coin", { from: fiatTokenOwner }); }); - behavesLikeFiatTokenV2(accounts, 2.1, () => fiatToken, fiatTokenOwner); + behavesLikeFiatTokenV2(2.1, () => fiatToken); usesOriginalStorageSlotPositions({ Contract: FiatTokenV2_1, version: 2.1, - accounts, }); describe("initializeV2_1", () => { - const [, user, lostAndFound] = accounts; + const [, user, lostAndFound] = HARDHAT_ACCOUNTS; beforeEach(async () => { await fiatToken.configureMinter(fiatTokenOwner, 1000000e6, { diff --git a/test/v2/FiatTokenV2_2.test.ts b/test/v2/FiatTokenV2_2.test.ts index 6b0bdfe10..2492c39e5 100644 --- a/test/v2/FiatTokenV2_2.test.ts +++ b/test/v2/FiatTokenV2_2.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -17,60 +17,49 @@ */ import BN from "bn.js"; -import crypto from "crypto"; import { AnyFiatTokenV2Instance, - FiatTokenV22InstanceExtended, + FiatTokenV2_2InstanceExtended, } from "../../@types/AnyFiatTokenV2Instance"; import { expectRevert, generateAccounts, - hexStringFromBuffer, initializeToVersion, + linkLibraryToTokenContract, } from "../helpers"; -import { - ACCOUNTS_AND_KEYS, - MAX_UINT256_HEX, - POW_2_255_BN, -} from "../helpers/constants"; +import { HARDHAT_ACCOUNTS, POW_2_255_BN } from "../helpers/constants"; import { STORAGE_SLOT_NUMBERS, addressMappingSlot, - parseUint, readSlot, usesOriginalStorageSlotPositions, } from "../helpers/storageSlots.behavior"; -import { behavesLikeFiatTokenV2, getERC1271Wallet } from "./FiatTokenV2.test"; -import { hasGasAbstraction } from "./GasAbstraction/GasAbstraction.behavior"; +import { behavesLikeFiatTokenV2 } from "./v2.behavior"; import { SignatureBytesType, - WalletType, - makeDomainSeparator, permitSignature, permitSignatureV22, - prepareSignature, transferWithAuthorizationSignature, transferWithAuthorizationSignatureV22, cancelAuthorizationSignature, cancelAuthorizationSignatureV22, receiveWithAuthorizationSignature, receiveWithAuthorizationSignatureV22, - signTransferAuthorization, - signReceiveAuthorization, } from "./GasAbstraction/helpers"; import { encodeCall } from "../v1/helpers/tokenTest"; +import { behavesLikeFiatTokenV22 } from "./v2_2.behavior"; const FiatTokenProxy = artifacts.require("FiatTokenProxy"); const FiatTokenV2_1 = artifacts.require("FiatTokenV2_1"); const FiatTokenV2_2 = artifacts.require("FiatTokenV2_2"); -contract("FiatTokenV2_2", (accounts) => { - const fiatTokenOwner = accounts[9]; - const lostAndFound = accounts[2]; - const proxyOwnerAccount = accounts[14]; +describe("FiatTokenV2_2", () => { const newSymbol = "USDCUSDC"; + const fiatTokenOwner = HARDHAT_ACCOUNTS[9]; + const lostAndFound = HARDHAT_ACCOUNTS[2]; + const proxyOwnerAccount = HARDHAT_ACCOUNTS[14]; - let fiatToken: FiatTokenV22InstanceExtended; + let fiatToken: FiatTokenV2_2InstanceExtended; const getFiatToken = ( signatureBytesType: SignatureBytesType @@ -81,6 +70,11 @@ contract("FiatTokenV2_2", (accounts) => { }; }; + before(async () => { + await linkLibraryToTokenContract(FiatTokenV2_1); + await linkLibraryToTokenContract(FiatTokenV2_2); + }); + beforeEach(async () => { fiatToken = await FiatTokenV2_2.new(); await initializeToVersion(fiatToken, "2.1", fiatTokenOwner, lostAndFound); @@ -165,7 +159,7 @@ contract("FiatTokenV2_2", (accounts) => { _proxyAsV2_2.isBlacklisted(account) ) ); - expect(areAccountsBlacklisted.every((b) => b)).to.be.true; + expect(areAccountsBlacklisted.every((b: boolean) => b)).to.be.true; // Validate that _deprecatedBlacklisted is unset, and balanceAndBlacklistStates is set for every // accountsToBlacklist. @@ -216,185 +210,16 @@ contract("FiatTokenV2_2", (accounts) => { await fiatToken.initializeV2_2([], newSymbol); }); - behavesLikeFiatTokenV2( - accounts, - 2.2, - getFiatToken(SignatureBytesType.Unpacked), - fiatTokenOwner - ); + behavesLikeFiatTokenV2(2.2, getFiatToken(SignatureBytesType.Unpacked)); - behavesLikeFiatTokenV22( - accounts, - getFiatToken(SignatureBytesType.Packed), - fiatTokenOwner - ); + behavesLikeFiatTokenV22(getFiatToken(SignatureBytesType.Packed)); usesOriginalStorageSlotPositions({ Contract: FiatTokenV2_2, version: 2.2, - accounts, }); }); }); -export function behavesLikeFiatTokenV22( - accounts: Truffle.Accounts, - getFiatToken: () => AnyFiatTokenV2Instance, - fiatTokenOwner: string -): void { - const [minter, arbitraryAccount] = accounts.slice(3); - let domainSeparator: string; - let fiatToken: FiatTokenV22InstanceExtended; - - beforeEach(async () => { - fiatToken = getFiatToken() as FiatTokenV22InstanceExtended; - domainSeparator = makeDomainSeparator( - "USD Coin", - "2", - 1, // hardcoded to 1 because of ganache bug: https://github.com/trufflesuite/ganache/issues/1643 - fiatToken.address - ); - }); - - const v22TestParams = { - version: 2.2, - getFiatToken, - getDomainSeparator: () => domainSeparator, - getERC1271Wallet, - fiatTokenOwner, - accounts, - }; - - // Test gas abstraction functionalities with both EOA and AA wallets - hasGasAbstraction({ - ...v22TestParams, - signerWalletType: WalletType.EOA, - signatureBytesType: SignatureBytesType.Packed, - }); - hasGasAbstraction({ - ...v22TestParams, - signerWalletType: WalletType.AA, - signatureBytesType: SignatureBytesType.Packed, - }); - - // Additional negative test cases. - describe("will trigger exceeded 2^255 balance error", () => { - const incrementAmount = 1000; - const recipient = arbitraryAccount; - const errorMessage = "FiatTokenV2_2: Balance exceeds (2^255 - 1)"; - - beforeEach(async () => { - const recipientInitialBalance = POW_2_255_BN.sub(new BN(incrementAmount)); - await fiatToken.configureMinter(minter, POW_2_255_BN, { - from: fiatTokenOwner, - }); - await fiatToken.mint(recipient, recipientInitialBalance, { - from: minter, - }); - expect((await fiatToken.balanceOf(recipient)).eq(recipientInitialBalance)) - .to.be.true; - }); - - it("should fail to mint to recipient if balance will exceed 2^255", async () => { - await expectRevert( - fiatToken.mint(recipient, incrementAmount, { from: minter }), - errorMessage - ); - }); - - it("should fail to transfer to recipient if balance will exceed 2^255", async () => { - await fiatToken.mint(minter, incrementAmount, { from: minter }); - await expectRevert( - fiatToken.transfer(recipient, incrementAmount, { from: minter }), - errorMessage - ); - }); - - it("should fail call transferFrom to recipient if balance will exceed 2^255", async () => { - await fiatToken.mint(minter, incrementAmount, { from: minter }); - await fiatToken.approve(arbitraryAccount, incrementAmount, { - from: minter, - }); - - await expectRevert( - fiatToken.transferFrom(minter, recipient, incrementAmount, { - from: arbitraryAccount, - }), - errorMessage - ); - }); - - context("EIP3009", () => { - const signer = ACCOUNTS_AND_KEYS[0]; - const from = signer.address; - const to = recipient; - const value = incrementAmount; - const validAfter = 0; - const validBefore = MAX_UINT256_HEX; - const nonce = hexStringFromBuffer(crypto.randomBytes(32)); - - beforeEach(async () => { - await fiatToken.mint(signer.address, incrementAmount, { - from: minter, - }); - }); - - it("should fail to call transferWithAuthorization to recipient if balance will exceed 2^255", async () => { - const signature = signTransferAuthorization( - from, - to, - value, - validAfter, - validBefore, - nonce, - domainSeparator, - signer.key - ); - - await expectRevert( - fiatToken.transferWithAuthorization( - from, - to, - value, - validAfter, - validBefore, - nonce, - ...prepareSignature(signature, SignatureBytesType.Packed), - { from: to } - ), - errorMessage - ); - }); - - it("should fail to call receiveWithAuthorization to recipient if balance will exceed 2^255", async () => { - const signature = signReceiveAuthorization( - from, - to, - value, - validAfter, - validBefore, - nonce, - domainSeparator, - signer.key - ); - - await expectRevert( - fiatToken.receiveWithAuthorization( - from, - to, - value, - validAfter, - validBefore, - nonce, - ...prepareSignature(signature, SignatureBytesType.Packed), - { from: to } - ), - errorMessage - ); - }); - }); - }); -} - /** * With v2.2 we introduce overloaded functions for `permit`, * `transferWithAuthorization`, `receiveWithAuthorization`, @@ -411,7 +236,7 @@ export function behavesLikeFiatTokenV22( * here we re-assign the overloaded method definition to the method name shorthand. */ export function initializeOverloadedMethods( - fiatToken: FiatTokenV22InstanceExtended, + fiatToken: FiatTokenV2_2InstanceExtended, signatureBytesType: SignatureBytesType ): void { if (signatureBytesType == SignatureBytesType.Unpacked) { @@ -474,5 +299,5 @@ async function readBalanceAndBlacklistStates( ) ) ) - ).map((result) => parseUint(result)); + ).map((result) => new BN(result.slice(2), 16)); } diff --git a/test/v2/GasAbstraction/GasAbstraction.behavior.ts b/test/v2/GasAbstraction/GasAbstraction.behavior.ts index a54aef7f1..1be177f87 100644 --- a/test/v2/GasAbstraction/GasAbstraction.behavior.ts +++ b/test/v2/GasAbstraction/GasAbstraction.behavior.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/test/v2/GasAbstraction/helpers.ts b/test/v2/GasAbstraction/helpers.ts index 587935432..2e3a0dd64 100644 --- a/test/v2/GasAbstraction/helpers.ts +++ b/test/v2/GasAbstraction/helpers.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -17,7 +17,7 @@ */ import { AnyFiatTokenV2Instance } from "../../../@types/AnyFiatTokenV2Instance"; -import { MockErc1271WalletInstance } from "../../../@types/generated"; +import { MockERC1271WalletInstance } from "../../../@types/generated"; import { Signature, ecSign, strip0x } from "../../helpers"; import { packSignature } from "../../helpers"; @@ -35,11 +35,9 @@ export interface TestParams { version: number; getFiatToken: () => AnyFiatTokenV2Instance; getDomainSeparator: () => string; - fiatTokenOwner: string; - accounts: Truffle.Accounts; signerWalletType: WalletType; signatureBytesType: SignatureBytesType; - getERC1271Wallet: (owner: string) => Promise; + getERC1271Wallet: (owner: string) => Promise; } export function makeDomainSeparator( diff --git a/test/v2/GasAbstraction/testCancelAuthorization.ts b/test/v2/GasAbstraction/testCancelAuthorization.ts index acfba4a9e..e5ba0b9b7 100644 --- a/test/v2/GasAbstraction/testCancelAuthorization.ts +++ b/test/v2/GasAbstraction/testCancelAuthorization.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -17,7 +17,11 @@ */ import crypto from "crypto"; -import { ACCOUNTS_AND_KEYS, MAX_UINT256_HEX } from "../../helpers/constants"; +import { + ACCOUNTS_AND_KEYS, + HARDHAT_ACCOUNTS, + MAX_UINT256_HEX, +} from "../../helpers/constants"; import { expectRevert, hexStringFromBuffer } from "../../helpers"; import { cancelAuthorizationTypeHash, @@ -28,28 +32,30 @@ import { prepareSignature, } from "./helpers"; import { AnyFiatTokenV2Instance } from "../../../@types/AnyFiatTokenV2Instance"; -import { MockErc1271WalletInstance } from "../../../@types/generated"; +import { MockERC1271WalletInstance } from "../../../@types/generated"; export function testCancelAuthorization({ getFiatToken, getERC1271Wallet, getDomainSeparator, - fiatTokenOwner, - accounts, signerWalletType, signatureBytesType, }: TestParams): void { describe(`cancelAuthorization with ${signerWalletType} wallet, ${signatureBytesType} signature interface`, async () => { const [alice, bob] = ACCOUNTS_AND_KEYS; - const charlie = accounts[1]; + const charlie = HARDHAT_ACCOUNTS[1]; const nonce = hexStringFromBuffer(crypto.randomBytes(32)); + let fiatTokenOwner: string; let fiatToken: AnyFiatTokenV2Instance; - let aliceWallet: MockErc1271WalletInstance; + let aliceWallet: MockERC1271WalletInstance; let domainSeparator: string; - let from: string; + before(async () => { + fiatTokenOwner = await getFiatToken().owner(); + }); + beforeEach(async () => { fiatToken = getFiatToken(); aliceWallet = await getERC1271Wallet(alice.address); diff --git a/test/v2/GasAbstraction/testPermit.ts b/test/v2/GasAbstraction/testPermit.ts index f2e71b86d..5a98c4a3e 100644 --- a/test/v2/GasAbstraction/testPermit.ts +++ b/test/v2/GasAbstraction/testPermit.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -17,10 +17,11 @@ */ import crypto from "crypto"; -import { MockErc1271WalletInstance } from "../../../@types/generated"; +import { MockERC1271WalletInstance } from "../../../@types/generated"; import { Approval } from "../../../@types/generated/FiatTokenV2"; import { ACCOUNTS_AND_KEYS, + HARDHAT_ACCOUNTS, MAX_UINT256_HEX, ZERO_ADDRESS, } from "../../helpers/constants"; @@ -40,14 +41,12 @@ export function testPermit({ getFiatToken, getERC1271Wallet, getDomainSeparator, - fiatTokenOwner, - accounts, signerWalletType, signatureBytesType, }: TestParams): void { describe(`permit with ${signerWalletType} wallet, ${signatureBytesType} signature interface`, async () => { const [alice, bob] = ACCOUNTS_AND_KEYS; - const charlie = accounts[1]; + const charlie = HARDHAT_ACCOUNTS[1]; const initialBalance = 10e6; const permitParams = { @@ -58,10 +57,15 @@ export function testPermit({ deadline: Math.floor(Date.now() / 1000) + 60 * 60 * 24, }; + let fiatTokenOwner: string; let fiatToken: AnyFiatTokenV2Instance; - let aliceWallet: MockErc1271WalletInstance; + let aliceWallet: MockERC1271WalletInstance; let domainSeparator: string; + before(async () => { + fiatTokenOwner = await getFiatToken().owner(); + }); + beforeEach(async () => { fiatToken = getFiatToken(); aliceWallet = await getERC1271Wallet(alice.address); diff --git a/test/v2/GasAbstraction/testReceiveWithAuthorization.ts b/test/v2/GasAbstraction/testReceiveWithAuthorization.ts index fcd445608..6edf0fdbd 100644 --- a/test/v2/GasAbstraction/testReceiveWithAuthorization.ts +++ b/test/v2/GasAbstraction/testReceiveWithAuthorization.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -17,12 +17,16 @@ */ import crypto from "crypto"; -import { MockErc1271WalletInstance } from "../../../@types/generated"; +import { MockERC1271WalletInstance } from "../../../@types/generated"; import { AuthorizationUsed, Transfer, } from "../../../@types/generated/FiatTokenV2"; -import { ACCOUNTS_AND_KEYS, MAX_UINT256_HEX } from "../../helpers/constants"; +import { + ACCOUNTS_AND_KEYS, + HARDHAT_ACCOUNTS, + MAX_UINT256_HEX, +} from "../../helpers/constants"; import { expectRevert, hexStringFromBuffer } from "../../helpers"; import { prepareSignature, @@ -37,14 +41,12 @@ export function testReceiveWithAuthorization({ getFiatToken, getERC1271Wallet, getDomainSeparator, - fiatTokenOwner, - accounts, signerWalletType, signatureBytesType, }: TestParams): void { describe(`receiveWithAuthorization with ${signerWalletType} wallet, ${signatureBytesType} signature interface`, async () => { const [alice, charlie] = ACCOUNTS_AND_KEYS; - const [, bob, david] = accounts; + const [, bob, david] = HARDHAT_ACCOUNTS; const nonce: string = hexStringFromBuffer(crypto.randomBytes(32)); const initialBalance = 10e6; const receiveParams = { @@ -56,10 +58,15 @@ export function testReceiveWithAuthorization({ nonce, }; + let fiatTokenOwner: string; let fiatToken: AnyFiatTokenV2Instance; - let aliceWallet: MockErc1271WalletInstance; + let aliceWallet: MockERC1271WalletInstance; let domainSeparator: string; + before(async () => { + fiatTokenOwner = await getFiatToken().owner(); + }); + beforeEach(async () => { fiatToken = getFiatToken(); aliceWallet = await getERC1271Wallet(alice.address); @@ -237,9 +244,8 @@ export function testReceiveWithAuthorization({ it("reverts if the authorization is not yet valid", async () => { const { from, to, value, validBefore } = receiveParams; - // create a signed authorization that won't be valid until 10 seconds - // later - const validAfter = Math.floor(Date.now() / 1000) + 10; + // create a signed authorization that won't be valid until 1 day later + const validAfter = Math.floor(Date.now() / 1000) + 86400; const signature = signReceiveAuthorization( from, to, diff --git a/test/v2/GasAbstraction/testTransferWithAuthorization.ts b/test/v2/GasAbstraction/testTransferWithAuthorization.ts index df866a6cf..f22e38ef6 100644 --- a/test/v2/GasAbstraction/testTransferWithAuthorization.ts +++ b/test/v2/GasAbstraction/testTransferWithAuthorization.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -17,12 +17,16 @@ */ import crypto from "crypto"; -import { MockErc1271WalletInstance } from "../../../@types/generated"; +import { MockERC1271WalletInstance } from "../../../@types/generated"; import { AuthorizationUsed, Transfer, } from "../../../@types/generated/FiatTokenV2"; -import { ACCOUNTS_AND_KEYS, MAX_UINT256_HEX } from "../../helpers/constants"; +import { + ACCOUNTS_AND_KEYS, + HARDHAT_ACCOUNTS, + MAX_UINT256_HEX, +} from "../../helpers/constants"; import { expectRevert, hexStringFromBuffer } from "../../helpers"; import { transferWithAuthorizationTypeHash, @@ -37,14 +41,12 @@ export function testTransferWithAuthorization({ getFiatToken, getERC1271Wallet, getDomainSeparator, - fiatTokenOwner, - accounts, signerWalletType, signatureBytesType, }: TestParams): void { describe(`transferWithAuthorization with ${signerWalletType} wallet, ${signatureBytesType} signature interface`, async () => { const [alice, bob] = ACCOUNTS_AND_KEYS; - const charlie = accounts[1]; + const charlie = HARDHAT_ACCOUNTS[1]; const nonce: string = hexStringFromBuffer(crypto.randomBytes(32)); const initialBalance = 10e6; const transferParams = { @@ -56,10 +58,15 @@ export function testTransferWithAuthorization({ nonce, }; + let fiatTokenOwner: string; let fiatToken: AnyFiatTokenV2Instance; - let aliceWallet: MockErc1271WalletInstance; + let aliceWallet: MockERC1271WalletInstance; let domainSeparator: string; + before(async () => { + fiatTokenOwner = await getFiatToken().owner(); + }); + beforeEach(async () => { fiatToken = getFiatToken(); aliceWallet = await getERC1271Wallet(alice.address); @@ -207,9 +214,8 @@ export function testTransferWithAuthorization({ it("reverts if the authorization is not yet valid", async () => { const { from, to, value, validBefore } = transferParams; - // create a signed authorization that won't be valid until 10 seconds - // later - const validAfter = Math.floor(Date.now() / 1000) + 10; + // create a signed authorization that won't be valid until 1 day later + const validAfter = Math.floor(Date.now() / 1000) + 86400; const signature = signTransferAuthorization( from, to, diff --git a/test/v2/GasAbstraction/testTransferWithMultipleAuthorizations.ts b/test/v2/GasAbstraction/testTransferWithMultipleAuthorizations.ts index 2953bd24f..a299dc0e5 100644 --- a/test/v2/GasAbstraction/testTransferWithMultipleAuthorizations.ts +++ b/test/v2/GasAbstraction/testTransferWithMultipleAuthorizations.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -18,7 +18,11 @@ import crypto from "crypto"; import { FiatTokenUtilInstance } from "../../../@types/generated"; -import { ACCOUNTS_AND_KEYS, MAX_UINT256_HEX } from "../../helpers/constants"; +import { + ACCOUNTS_AND_KEYS, + HARDHAT_ACCOUNTS, + MAX_UINT256_HEX, +} from "../../helpers/constants"; import { expectRevert, hexStringFromBuffer, @@ -36,13 +40,11 @@ const ContractThatReverts = artifacts.require("ContractThatReverts"); export function testTransferWithMultipleAuthorizations({ getFiatToken, getDomainSeparator, - fiatTokenOwner, - accounts, signerWalletType, }: TestParams): void { describe(`transferWithMultipleAuthorization with ${signerWalletType} wallet`, async () => { const [alice, bob] = ACCOUNTS_AND_KEYS; - const charlie = accounts[1]; + const charlie = HARDHAT_ACCOUNTS[1]; const nonce: string = hexStringFromBuffer(crypto.randomBytes(32)); const initialBalance = 10e6; const transferParams = { @@ -57,6 +59,11 @@ export function testTransferWithMultipleAuthorizations({ let fiatToken: AnyFiatTokenV2Instance; let fiatTokenUtil: FiatTokenUtilInstance; let domainSeparator: string; + let fiatTokenOwner: string; + + before(async () => { + fiatTokenOwner = await getFiatToken().owner(); + }); beforeEach(async () => { fiatToken = getFiatToken(); diff --git a/test/v2/MockFiatTokenWithEditableBalanceAndBlacklistStates.test.ts b/test/v2/MockFiatTokenWithEditableBalanceAndBlacklistStates.test.ts index 25612028a..2af7a6534 100644 --- a/test/v2/MockFiatTokenWithEditableBalanceAndBlacklistStates.test.ts +++ b/test/v2/MockFiatTokenWithEditableBalanceAndBlacklistStates.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -18,28 +18,39 @@ import BN from "bn.js"; import { MockFiatTokenWithEditableBalanceAndBlacklistStatesInstance } from "../../@types/generated"; -import { expectRevert, initializeToVersion } from "../helpers"; -import { ACCOUNTS_AND_KEYS, POW_2_255_BN } from "../helpers/constants"; +import { + expectRevert, + initializeToVersion, + linkLibraryToTokenContract, +} from "../helpers"; +import { + ACCOUNTS_AND_KEYS, + HARDHAT_ACCOUNTS, + POW_2_255_BN, +} from "../helpers/constants"; -const SignatureChecker = artifacts.require("SignatureChecker"); const MockFiatTokenWithEditableBalanceAndBlacklistStates = artifacts.require( "MockFiatTokenWithEditableBalanceAndBlacklistStates" ); -contract("MockFiatTokenWithEditableBalanceAndBlacklistStates", (accounts) => { - const fiatTokenOwner = accounts[9]; +describe("MockFiatTokenWithEditableBalanceAndBlacklistStates", () => { const userOne = ACCOUNTS_AND_KEYS[0].address; + const [, , lostAndFound] = HARDHAT_ACCOUNTS; + const fiatTokenOwner = HARDHAT_ACCOUNTS[9]; let fiatToken: MockFiatTokenWithEditableBalanceAndBlacklistStatesInstance; const ZERO = new BN(0); const SEVEN = new BN(7, 10); + before(async () => { + await linkLibraryToTokenContract( + MockFiatTokenWithEditableBalanceAndBlacklistStates + ); + }); + beforeEach(async () => { - await SignatureChecker.new(); - MockFiatTokenWithEditableBalanceAndBlacklistStates.link(SignatureChecker); fiatToken = await MockFiatTokenWithEditableBalanceAndBlacklistStates.new(); - const [, , lostAndFound] = accounts; await initializeToVersion(fiatToken, "2.2", fiatTokenOwner, lostAndFound); }); diff --git a/test/v2/MockFiatTokenWithEditableChainId.test.ts b/test/v2/MockFiatTokenWithEditableChainId.test.ts index d68adfb67..ca0995388 100644 --- a/test/v2/MockFiatTokenWithEditableChainId.test.ts +++ b/test/v2/MockFiatTokenWithEditableChainId.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -17,23 +17,23 @@ */ import { MockFiatTokenWithEditableChainIdInstance } from "../../@types/generated"; -import { makeDomainSeparator } from "../helpers"; +import { makeDomainSeparator, linkLibraryToTokenContract } from "../helpers"; +import { HARDHAT_ACCOUNTS } from "../helpers/constants"; -const SignatureChecker = artifacts.require("SignatureChecker"); const MockFiatTokenWithEditableChainId = artifacts.require( "MockFiatTokenWithEditableChainId" ); -contract("MockFiatTokenWithEditableChainId", (accounts) => { - const fiatTokenOwner = accounts[9]; - let fiatToken: MockFiatTokenWithEditableChainIdInstance; - +describe("MockFiatTokenWithEditableChainId", () => { const name = "USD Coin"; const version = "2"; + const [, , lostAndFound] = HARDHAT_ACCOUNTS; + const fiatTokenOwner = HARDHAT_ACCOUNTS[9]; + + let fiatToken: MockFiatTokenWithEditableChainIdInstance; beforeEach(async () => { - await SignatureChecker.new(); - MockFiatTokenWithEditableChainId.link(SignatureChecker); + await linkLibraryToTokenContract(MockFiatTokenWithEditableChainId); fiatToken = await MockFiatTokenWithEditableChainId.new(); await fiatToken.initialize( @@ -47,7 +47,6 @@ contract("MockFiatTokenWithEditableChainId", (accounts) => { fiatTokenOwner ); await fiatToken.initializeV2("USD Coin", { from: fiatTokenOwner }); - const [, , lostAndFound] = accounts; await fiatToken.initializeV2_1(lostAndFound); await fiatToken.initializeV2_2([], "USDCUSDC"); }); diff --git a/test/v2/V2Upgrader.test.ts b/test/v2/V2Upgrader.test.ts index 1ecba64cf..e519324cc 100644 --- a/test/v2/V2Upgrader.test.ts +++ b/test/v2/V2Upgrader.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -23,8 +23,16 @@ import { FiatTokenProxyInstance, } from "../../@types/generated"; import { signTransferAuthorization } from "./GasAbstraction/helpers"; -import { MAX_UINT256_HEX, ACCOUNTS_AND_KEYS } from "../helpers/constants"; -import { hexStringFromBuffer, expectRevert } from "../helpers"; +import { + MAX_UINT256_HEX, + ACCOUNTS_AND_KEYS, + accounts, +} from "../helpers/constants"; +import { + hexStringFromBuffer, + expectRevert, + linkLibraryToTokenContract, +} from "../helpers"; const FiatTokenProxy = artifacts.require("FiatTokenProxy"); const FiatTokenV1 = artifacts.require("FiatTokenV1"); @@ -32,22 +40,43 @@ const FiatTokenV1_1 = artifacts.require("FiatTokenV1_1"); const FiatTokenV2 = artifacts.require("FiatTokenV2"); const V2Upgrader = artifacts.require("V2Upgrader"); -contract("V2Upgrader", (accounts) => { +describe("V2Upgrader", () => { let fiatTokenProxy: FiatTokenProxyInstance; let proxyAsV1: FiatTokenV1Instance; let proxyAsV2: FiatTokenV2Instance; let v1Implementation: FiatTokenV1Instance; let v2Implementation: FiatTokenV2Instance; - let originalProxyAdmin: string; - const minter = accounts[9]; + const { + minterAccount: minter, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount, + proxyOwnerAccount: originalProxyAdmin, + } = accounts; + + before(async () => { + await linkLibraryToTokenContract(FiatTokenV2); + }); beforeEach(async () => { - fiatTokenProxy = await FiatTokenProxy.deployed(); + v1Implementation = await FiatTokenV1.new(); + v2Implementation = await FiatTokenV2.new(); + fiatTokenProxy = await FiatTokenProxy.new(v1Implementation.address, { + from: originalProxyAdmin, + }); proxyAsV1 = await FiatTokenV1.at(fiatTokenProxy.address); + await proxyAsV1.initialize( + "USD//C", + "USDC", + "USD", + 6, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount + ); proxyAsV2 = await FiatTokenV2.at(fiatTokenProxy.address); - v1Implementation = await FiatTokenV1.deployed(); - v2Implementation = await FiatTokenV2.deployed(); - originalProxyAdmin = await fiatTokenProxy.admin(); await proxyAsV1.configureMinter(minter, 2e5, { from: await proxyAsV1.masterMinter(), @@ -59,7 +88,12 @@ contract("V2Upgrader", (accounts) => { it("upgrades, transfers proxy admin role to newProxyAdmin, runs tests, and self-destructs", async () => { // Run the test on the contracts deployed by Truffle to ensure the Truffle // migration is written correctly - const upgrader = await V2Upgrader.deployed(); + const upgrader = await V2Upgrader.new( + fiatTokenProxy.address, + v2Implementation.address, + await fiatTokenProxy.admin(), + "USD Coin" + ); const upgraderOwner = await upgrader.owner(); expect(await upgrader.proxy()).to.equal(fiatTokenProxy.address); @@ -170,7 +204,7 @@ contract("V2Upgrader", (accounts) => { from: originalProxyAdmin, }); const fiatTokenV1_1 = await FiatTokenV1_1.new(); - const upgraderOwner = accounts[0]; + const upgraderOwner = accounts.deployerAccount; const upgrader = await V2Upgrader.new( fiatTokenProxy.address, @@ -206,7 +240,7 @@ contract("V2Upgrader", (accounts) => { fiatTokenProxy = await FiatTokenProxy.new(v1Implementation.address, { from: originalProxyAdmin, }); - const upgraderOwner = accounts[0]; + const upgraderOwner = accounts.deployerAccount; const upgrader = await V2Upgrader.new( fiatTokenProxy.address, v2Implementation.address, diff --git a/test/v2/V2_1Upgrader.test.ts b/test/v2/V2_1Upgrader.test.ts index 526d97c49..031ba3deb 100644 --- a/test/v2/V2_1Upgrader.test.ts +++ b/test/v2/V2_1Upgrader.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -18,10 +18,11 @@ import { FiatTokenV2Instance, - FiatTokenV21Instance, + FiatTokenV2_1Instance, FiatTokenProxyInstance, } from "../../@types/generated"; -import { strip0x, expectRevert } from "../helpers"; +import { strip0x, expectRevert, linkLibraryToTokenContract } from "../helpers"; +import { accounts } from "../helpers/constants"; const FiatTokenProxy = artifacts.require("FiatTokenProxy"); const FiatTokenV1_1 = artifacts.require("FiatTokenV1_1"); @@ -29,22 +30,47 @@ const FiatTokenV2 = artifacts.require("FiatTokenV2"); const FiatTokenV2_1 = artifacts.require("FiatTokenV2_1"); const V2_1Upgrader = artifacts.require("V2_1Upgrader"); -contract("V2_1Upgrader", (accounts) => { +describe("V2_1Upgrader", () => { let fiatTokenProxy: FiatTokenProxyInstance; let proxyAsV2: FiatTokenV2Instance; - let proxyAsV2_1: FiatTokenV21Instance; + let proxyAsV2_1: FiatTokenV2_1Instance; let v2Implementation: FiatTokenV2Instance; - let v2_1Implementation: FiatTokenV21Instance; - let originalProxyAdmin: string; - const [minter, lostAndFound, alice, bob] = accounts.slice(9); + let v2_1Implementation: FiatTokenV2_1Instance; + + const { + minterAccount: minter, + proxyOwnerAccount: originalProxyAdmin, + lostAndFoundAccount: lostAndFound, + arbitraryAccount: alice, + arbitraryAccount2: bob, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount, + } = accounts; before(async () => { - fiatTokenProxy = await FiatTokenProxy.deployed(); + await linkLibraryToTokenContract(FiatTokenV2); + await linkLibraryToTokenContract(FiatTokenV2_1); + + v2Implementation = await FiatTokenV2.new(); + v2_1Implementation = await FiatTokenV2_1.new(); + fiatTokenProxy = await FiatTokenProxy.new(v2Implementation.address, { + from: originalProxyAdmin, + }); + proxyAsV2 = await FiatTokenV2.at(fiatTokenProxy.address); proxyAsV2_1 = await FiatTokenV2_1.at(fiatTokenProxy.address); - v2Implementation = await FiatTokenV2.deployed(); - v2_1Implementation = await FiatTokenV2_1.deployed(); - originalProxyAdmin = await fiatTokenProxy.admin(); + await proxyAsV2.initialize( + "USD//C", + "USDC", + "USD", + 6, + masterMinterAccount, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount + ); // Upgrade from v1 to v2 await fiatTokenProxy.upgradeToAndCall( @@ -64,9 +90,12 @@ contract("V2_1Upgrader", (accounts) => { describe("upgrade", () => { it("upgrades, transfers proxy admin role to newProxyAdmin, runs tests, and self-destructs", async () => { - // Run the test on the contracts deployed by Truffle to ensure the Truffle - // migration is written correctly - const upgrader = await V2_1Upgrader.deployed(); + const upgrader = await V2_1Upgrader.new( + fiatTokenProxy.address, + v2_1Implementation.address, + originalProxyAdmin, + lostAndFound + ); const upgraderOwner = await upgrader.owner(); expect(await upgrader.proxy()).to.equal(fiatTokenProxy.address); @@ -176,7 +205,7 @@ contract("V2_1Upgrader", (accounts) => { from: originalProxyAdmin, }); const fiatTokenV1_1 = await FiatTokenV1_1.new(); - const upgraderOwner = accounts[0]; + const upgraderOwner = accounts.deployerAccount; const upgrader = await V2_1Upgrader.new( fiatTokenProxy.address, @@ -212,7 +241,7 @@ contract("V2_1Upgrader", (accounts) => { fiatTokenProxy = await FiatTokenProxy.new(v2Implementation.address, { from: originalProxyAdmin, }); - const upgraderOwner = accounts[0]; + const upgraderOwner = accounts.deployerAccount; const upgrader = await V2_1Upgrader.new( fiatTokenProxy.address, v2_1Implementation.address, diff --git a/test/v2/V2_2Upgrader.test.ts b/test/v2/V2_2Upgrader.test.ts index 98582377d..b1324d006 100644 --- a/test/v2/V2_2Upgrader.test.ts +++ b/test/v2/V2_2Upgrader.test.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -18,50 +18,58 @@ import { FiatTokenProxyInstance, - FiatTokenV21Instance, - FiatTokenV22Instance, - V22UpgraderInstance, + FiatTokenV2_1Instance, + FiatTokenV2_2Instance, + V2_2UpgraderInstance, } from "../../@types/generated"; import { expectRevert, generateAccounts, initializeToVersion, + linkLibraryToTokenContract, } from "../helpers"; -import { readBlacklistFile } from "../../utils"; -import path from "path"; import { toLower } from "lodash"; -import { BLOCK_GAS_LIMIT } from "../helpers/constants"; +import { BLOCK_GAS_LIMIT, accounts } from "../helpers/constants"; const FiatTokenProxy = artifacts.require("FiatTokenProxy"); const FiatTokenV1_1 = artifacts.require("FiatTokenV1_1"); const FiatTokenV2_1 = artifacts.require("FiatTokenV2_1"); const FiatTokenV2_2 = artifacts.require("FiatTokenV2_2"); const V2_2Upgrader = artifacts.require("V2_2Upgrader"); -const accountsToBlacklist = readBlacklistFile( - path.join(__dirname, "..", "..", "blacklist.test.json") -); -contract("V2_2Upgrader", (accounts) => { +const { + minterAccount: minter, + proxyOwnerAccount: originalProxyAdmin, + lostAndFoundAccount: lostAndFound, + arbitraryAccount: alice, + arbitraryAccount2: bob, + masterMinterAccount: v2_1MasterMinter, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount, +} = accounts; + +describe("V2_2Upgrader", () => { let fiatTokenProxy: FiatTokenProxyInstance; - let proxyAsV2_1: FiatTokenV21Instance; - let proxyAsV2_2: FiatTokenV22Instance; - let v2_1Implementation: FiatTokenV21Instance; - let v2_2Implementation: FiatTokenV22Instance; - let v2_2Upgrader: V22UpgraderInstance; + let proxyAsV2_1: FiatTokenV2_1Instance; + let proxyAsV2_2: FiatTokenV2_2Instance; + let v2_1Implementation: FiatTokenV2_1Instance; + let v2_2Implementation: FiatTokenV2_2Instance; + let v2_2Upgrader: V2_2UpgraderInstance; let upgraderOwner: string; - let v2_1MasterMinter: string; - let originalProxyAdmin: string; const newSymbol = "USDCUSDC"; // Use a symbol different from original symbol - const blacklisterAccount = accounts[4]; - const [minter, lostAndFound, alice, bob] = accounts.slice(9); + const accountsToBlacklist = generateAccounts(10); before(async () => { - // Run the tests on the contracts deployed by Truffle to ensure the Truffle - // migration is written correctly - fiatTokenProxy = await FiatTokenProxy.deployed(); - v2_1Implementation = await FiatTokenV2_1.deployed(); - v2_2Implementation = await FiatTokenV2_2.deployed(); + await linkLibraryToTokenContract(FiatTokenV2_1); + await linkLibraryToTokenContract(FiatTokenV2_2); + + v2_1Implementation = await FiatTokenV2_1.new(); + v2_2Implementation = await FiatTokenV2_2.new(); + fiatTokenProxy = await FiatTokenProxy.new(v2_1Implementation.address, { + from: originalProxyAdmin, + }); v2_2Upgrader = await V2_2Upgrader.new( fiatTokenProxy.address, v2_2Implementation.address, @@ -72,12 +80,19 @@ contract("V2_2Upgrader", (accounts) => { proxyAsV2_1 = await FiatTokenV2_1.at(fiatTokenProxy.address); proxyAsV2_2 = await FiatTokenV2_2.at(fiatTokenProxy.address); - - originalProxyAdmin = await fiatTokenProxy.admin(); upgraderOwner = await v2_2Upgrader.owner(); - v2_1MasterMinter = await proxyAsV2_1.masterMinter(); // Upgrade from v1 to v2.1 + await proxyAsV2_1.initialize( + "USD//C", + "USDC", + "USD", + 6, + v2_1MasterMinter, + pauserAccount, + blacklisterAccount, + tokenOwnerAccount + ); await fiatTokenProxy.upgradeTo(v2_1Implementation.address, { from: originalProxyAdmin, }); @@ -119,7 +134,7 @@ contract("V2_2Upgrader", (accounts) => { }); describe("accountsToBlacklist", () => { - it("should return the correct list of addresses read in blacklist.test.json", async () => { + it("should return the correct list of addresses", async () => { const actualAccountsToBlacklist = await v2_2Upgrader.accountsToBlacklist(); expect(actualAccountsToBlacklist.map(toLower)).to.deep.equal( accountsToBlacklist.map(toLower) @@ -203,7 +218,7 @@ contract("V2_2Upgrader", (accounts) => { const areAccountsBlacklisted = await Promise.all( accountsToBlacklist.map((account) => proxyAsV2_2.isBlacklisted(account)) ); - expect(areAccountsBlacklisted.every((b) => b)).to.be.true; + expect(areAccountsBlacklisted.every((b: boolean) => b)).to.be.true; // mint works as expected await proxyAsV2_2.configureMinter(minter, 1000e6, { @@ -264,7 +279,7 @@ contract("V2_2Upgrader", (accounts) => { const _proxyAsV2_1 = await FiatTokenV2_1.at(_fiatTokenProxy.address); const _v1_1Implementation = await FiatTokenV1_1.new(); - const upgraderOwner = accounts[0]; + const upgraderOwner = accounts.deployerAccount; const _v2_2Upgrader = await V2_2Upgrader.new( _fiatTokenProxy.address, @@ -311,7 +326,7 @@ contract("V2_2Upgrader", (accounts) => { const _proxyAsV2_1 = await FiatTokenV2_1.at(_fiatTokenProxy.address); const _v2_2Implementation = await FiatTokenV2_2.new(); - const upgraderOwner = accounts[0]; + const upgraderOwner = accounts.deployerAccount; // Try blacklisting an account that was not originally blacklisted. const accountsToBlacklist = generateAccounts(1); @@ -381,7 +396,7 @@ contract("V2_2Upgrader", (accounts) => { // Set up the V2_2Upgrader const _v2_2Implementation = await FiatTokenV2_2.new(); - const upgraderOwner = accounts[0]; + const upgraderOwner = accounts.deployerAccount; const _v2_2Upgrader = await V2_2Upgrader.new( _fiatTokenProxy.address, _v2_2Implementation.address, @@ -431,7 +446,7 @@ contract("V2_2Upgrader", (accounts) => { ); await initializeToVersion(_fiatTokenProxy, "2.1", minter, lostAndFound); - const upgraderOwner = accounts[0]; + const upgraderOwner = accounts.deployerAccount; const _v2_2Upgrader = await V2_2Upgrader.new( _fiatTokenProxy.address, v2_1Implementation.address, diff --git a/test/v2/safeAllowance.behavior.ts b/test/v2/safeAllowance.behavior.ts index e3c9c2b2f..1423420d7 100644 --- a/test/v2/safeAllowance.behavior.ts +++ b/test/v2/safeAllowance.behavior.ts @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, @@ -19,17 +19,21 @@ import { AnyFiatTokenV2Instance } from "../../@types/AnyFiatTokenV2Instance"; import { Approval } from "../../@types/generated/FiatTokenV2"; import { expectRevert } from "../helpers"; -import { MAX_UINT256_HEX } from "../helpers/constants"; +import { MAX_UINT256_HEX, HARDHAT_ACCOUNTS } from "../helpers/constants"; export function hasSafeAllowance( version: number, - getFiatToken: () => AnyFiatTokenV2Instance, - fiatTokenOwner: string, - accounts: Truffle.Accounts + getFiatToken: () => AnyFiatTokenV2Instance ): void { describe("safe allowance", () => { + const [alice, bob] = HARDHAT_ACCOUNTS; + let fiatToken: AnyFiatTokenV2Instance; - const [alice, bob] = accounts; + let fiatTokenOwner: string; + + before(async () => { + fiatTokenOwner = await getFiatToken().owner(); + }); beforeEach(() => { fiatToken = getFiatToken(); diff --git a/test/v2/v2.behavior.ts b/test/v2/v2.behavior.ts new file mode 100644 index 000000000..bce4d41c5 --- /dev/null +++ b/test/v2/v2.behavior.ts @@ -0,0 +1,92 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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. + */ + +import { behavesLikeRescuable } from "../v1.1/Rescuable.behavior"; +import { + MockERC1271WalletInstance, + RescuableInstance, +} from "../../@types/generated"; +import { AnyFiatTokenV2Instance } from "../../@types/AnyFiatTokenV2Instance"; +import { hasSafeAllowance } from "./safeAllowance.behavior"; +import { hasGasAbstraction } from "./GasAbstraction/GasAbstraction.behavior"; +import { + SignatureBytesType, + TestParams, + WalletType, + makeDomainSeparator, +} from "./GasAbstraction/helpers"; +import { expectRevert } from "../helpers"; +import { testTransferWithMultipleAuthorizations } from "./GasAbstraction/testTransferWithMultipleAuthorizations"; + +const MockERC1271Wallet = artifacts.require("MockERC1271Wallet"); + +export function behavesLikeFiatTokenV2( + version: number, + getFiatToken: () => AnyFiatTokenV2Instance +): void { + let domainSeparator: string; + let fiatTokenOwner: string; + + beforeEach(async () => { + // owner() is run here instead of once in a before() hook, since the contract + // must be instantiated by a previously defined beforeEach() hook before + // calling owner() + fiatTokenOwner = await getFiatToken().owner(); + + domainSeparator = makeDomainSeparator( + "USD Coin", + "2", + await web3.eth.getChainId(), + getFiatToken().address + ); + }); + + behavesLikeRescuable(getFiatToken as () => RescuableInstance); + + it("has the expected domain separator", async () => { + expect(await getFiatToken().DOMAIN_SEPARATOR()).to.equal(domainSeparator); + }); + + hasSafeAllowance(version, getFiatToken); + + const testParams: TestParams = { + version, + getFiatToken, + getDomainSeparator: () => domainSeparator, + getERC1271Wallet, + signerWalletType: WalletType.EOA, + signatureBytesType: SignatureBytesType.Unpacked, + }; + + hasGasAbstraction(testParams); + + testTransferWithMultipleAuthorizations(testParams); + + it("disallows calling initializeV2 twice", async () => { + // It was called once in beforeEach. Try to call again. + await expectRevert( + getFiatToken().initializeV2("Not USD Coin", { from: fiatTokenOwner }) + ); + }); +} + +export async function getERC1271Wallet( + owner: string +): Promise { + return await MockERC1271Wallet.new(owner); +} diff --git a/test/v2/v2_2.behavior.ts b/test/v2/v2_2.behavior.ts new file mode 100644 index 000000000..a4185a57c --- /dev/null +++ b/test/v2/v2_2.behavior.ts @@ -0,0 +1,202 @@ +/** + * Copyright 2024 Circle Internet Financial, LTD. All rights reserved. + * + * SPDX-License-Identifier: Apache-2.0 + * + * 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. + */ + +import BN from "bn.js"; +import crypto from "crypto"; +import { + AnyFiatTokenV2Instance, + FiatTokenV2_2InstanceExtended, +} from "../../@types/AnyFiatTokenV2Instance"; +import { expectRevert, hexStringFromBuffer } from "../helpers"; +import { + ACCOUNTS_AND_KEYS, + HARDHAT_ACCOUNTS, + MAX_UINT256_HEX, + POW_2_255_BN, +} from "../helpers/constants"; +import { getERC1271Wallet } from "./v2.behavior"; +import { hasGasAbstraction } from "./GasAbstraction/GasAbstraction.behavior"; +import { + SignatureBytesType, + WalletType, + makeDomainSeparator, + prepareSignature, + signTransferAuthorization, + signReceiveAuthorization, +} from "./GasAbstraction/helpers"; + +export function behavesLikeFiatTokenV22( + getFiatToken: () => AnyFiatTokenV2Instance +): void { + const [minter, arbitraryAccount] = HARDHAT_ACCOUNTS.slice(3); + + let fiatTokenOwner: string; + let domainSeparator: string; + let fiatToken: FiatTokenV2_2InstanceExtended; + + before(async () => { + fiatTokenOwner = await getFiatToken().owner(); + }); + + beforeEach(async () => { + fiatToken = getFiatToken() as FiatTokenV2_2InstanceExtended; + domainSeparator = makeDomainSeparator( + "USD Coin", + "2", + await web3.eth.getChainId(), + fiatToken.address + ); + }); + + const v22TestParams = { + version: 2.2, + getFiatToken, + getDomainSeparator: () => domainSeparator, + getERC1271Wallet, + }; + + // Test gas abstraction functionalities with both EOA and AA wallets + hasGasAbstraction({ + ...v22TestParams, + signerWalletType: WalletType.EOA, + signatureBytesType: SignatureBytesType.Packed, + }); + hasGasAbstraction({ + ...v22TestParams, + signerWalletType: WalletType.AA, + signatureBytesType: SignatureBytesType.Packed, + }); + + // Additional negative test cases. + describe("will trigger exceeded 2^255 balance error", () => { + const incrementAmount = 1000; + const recipient = arbitraryAccount; + const errorMessage = "FiatTokenV2_2: Balance exceeds (2^255 - 1)"; + + beforeEach(async () => { + const recipientInitialBalance = POW_2_255_BN.sub(new BN(incrementAmount)); + await fiatToken.configureMinter(minter, POW_2_255_BN, { + from: fiatTokenOwner, + }); + await fiatToken.mint(recipient, recipientInitialBalance, { + from: minter, + }); + expect((await fiatToken.balanceOf(recipient)).eq(recipientInitialBalance)) + .to.be.true; + }); + + it("should fail to mint to recipient if balance will exceed 2^255", async () => { + await expectRevert( + fiatToken.mint(recipient, incrementAmount, { from: minter }), + errorMessage + ); + }); + + it("should fail to transfer to recipient if balance will exceed 2^255", async () => { + await fiatToken.mint(minter, incrementAmount, { from: minter }); + await expectRevert( + fiatToken.transfer(recipient, incrementAmount, { from: minter }), + errorMessage + ); + }); + + it("should fail call transferFrom to recipient if balance will exceed 2^255", async () => { + await fiatToken.mint(minter, incrementAmount, { from: minter }); + await fiatToken.approve(arbitraryAccount, incrementAmount, { + from: minter, + }); + + await expectRevert( + fiatToken.transferFrom(minter, recipient, incrementAmount, { + from: arbitraryAccount, + }), + errorMessage + ); + }); + + context("EIP3009", () => { + const signer = ACCOUNTS_AND_KEYS[0]; + const from = signer.address; + const to = recipient; + const value = incrementAmount; + const validAfter = 0; + const validBefore = MAX_UINT256_HEX; + const nonce = hexStringFromBuffer(crypto.randomBytes(32)); + + beforeEach(async () => { + await fiatToken.mint(signer.address, incrementAmount, { + from: minter, + }); + }); + + it("should fail to call transferWithAuthorization to recipient if balance will exceed 2^255", async () => { + const signature = signTransferAuthorization( + from, + to, + value, + validAfter, + validBefore, + nonce, + domainSeparator, + signer.key + ); + + await expectRevert( + fiatToken.transferWithAuthorization( + from, + to, + value, + validAfter, + validBefore, + nonce, + ...prepareSignature(signature, SignatureBytesType.Packed), + { from: to } + ), + errorMessage + ); + }); + + it("should fail to call receiveWithAuthorization to recipient if balance will exceed 2^255", async () => { + const signature = signReceiveAuthorization( + from, + to, + value, + validAfter, + validBefore, + nonce, + domainSeparator, + signer.key + ); + + await expectRevert( + fiatToken.receiveWithAuthorization( + from, + to, + value, + validAfter, + validBefore, + nonce, + ...prepareSignature(signature, SignatureBytesType.Packed), + { from: to } + ), + errorMessage + ); + }); + }); + }); +} diff --git a/truffle-config.js b/truffle-config.js deleted file mode 100644 index e707e73ad..000000000 --- a/truffle-config.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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. - */ - -process.env.TS_NODE_FILES = "true"; -require("ts-node/register/transpile-only"); -// Fix Typescript callsite reporting -Object.defineProperty(Error, "prepareStackTrace", { writable: false }); - -const HDWalletProvider = require("@truffle/hdwallet-provider"); -const fs = require("fs"); -const path = require("path"); - -// Read config file if it exists -let config = { MNEMONIC: "", INFURA_KEY: "" }; -if (fs.existsSync(path.join(__dirname, "config.js"))) { - config = require("./config.js"); -} - -module.exports = { - compilers: { - solc: { - version: "0.6.12", - settings: { - optimizer: { - enabled: true, - runs: 10000000, - }, - }, - }, - }, - networks: { - development: { - host: "localhost", - port: 8545, - network_id: "*", // Match any network id - }, - local_testnet: { - host: "ganache", - port: 8545, - network_id: "*", // Match any network id - }, - mainnet: { - provider: infuraProvider("mainnet"), - network_id: 1, - }, - ropsten: { - provider: infuraProvider("ropsten"), - network_id: 3, - }, - }, - mocha: { - timeout: 60000, // prevents tests from failing when pc is under heavy load - reporter: "Spec", - }, - plugins: ["solidity-coverage", "truffle-contract-size"], - migrations_directory: - config.USE_VERSIONED_MIGRATIONS || - process.env.USE_VERSIONED_MIGRATIONS === "true" - ? "./migrations/versioned" - : "./migrations/direct", -}; - -function infuraProvider(network) { - return () => { - if (!config.MNEMONIC) { - console.error("A valid MNEMONIC must be provided in config.js"); - process.exit(1); - } - if (!config.INFURA_KEY) { - console.error("A valid INFURA_KEY must be provided in config.js"); - process.exit(1); - } - return new HDWalletProvider( - config.MNEMONIC, - `https://${network}.infura.io/v3/${config.INFURA_KEY}` - ); - }; -} diff --git a/tsconfig.json b/tsconfig.json index 230509337..57145e2b9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,5 +19,5 @@ "target": "ES2019" }, "include": ["**/*.ts", "*.ts"], - "exclude": ["node_modules", "build"] + "exclude": ["node_modules"] } diff --git a/utils.js b/utils.js index 870c1f4cb..0e759b427 100644 --- a/utils.js +++ b/utils.js @@ -1,13 +1,13 @@ /** - * SPDX-License-Identifier: Apache-2.0 + * Copyright 2023 Circle Internet Financial, LTD. All rights reserved. * - * Copyright (c) 2023, Circle Internet Financial, LLC. + * SPDX-License-Identifier: Apache-2.0 * * 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 + * 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, diff --git a/validate/FiatTokenProxy.etherscan b/validate/FiatTokenProxy.etherscan deleted file mode 100644 index 10c84dded..000000000 --- a/validate/FiatTokenProxy.etherscan +++ /dev/null @@ -1,329 +0,0 @@ -pragma solidity ^0.4.24; - -// File: zos-lib/contracts/upgradeability/Proxy.sol - -/** - * @title Proxy - * @dev Implements delegation of calls to other contracts, with proper - * forwarding of return values and bubbling of failures. - * It defines a fallback function that delegates all calls to the address - * returned by the abstract _implementation() internal function. - */ -contract Proxy { - /** - * @dev Fallback function. - * Implemented entirely in `_fallback`. - */ - function () payable external { - _fallback(); - } - - /** - * @return The Address of the implementation. - */ - function _implementation() internal view returns (address); - - /** - * @dev Delegates execution to an implementation contract. - * This is a low level function that doesn't return to its internal call site. - * It will return to the external caller whatever the implementation returns. - * @param implementation Address to delegate. - */ - function _delegate(address implementation) internal { - assembly { - // Copy msg.data. We take full control of memory in this inline assembly - // block because it will not return to Solidity code. We overwrite the - // Solidity scratch pad at memory position 0. - calldatacopy(0, 0, calldatasize) - - // Call the implementation. - // out and outsize are 0 because we don't know the size yet. - let result := delegatecall(gas, implementation, 0, calldatasize, 0, 0) - - // Copy the returned data. - returndatacopy(0, 0, returndatasize) - - switch result - // delegatecall returns 0 on error. - case 0 { revert(0, returndatasize) } - default { return(0, returndatasize) } - } - } - - /** - * @dev Function that is run as the first thing in the fallback function. - * Can be redefined in derived contracts to add functionality. - * Redefinitions must call super._willFallback(). - */ - function _willFallback() internal { - } - - /** - * @dev fallback implementation. - * Extracted to enable manual triggering. - */ - function _fallback() internal { - _willFallback(); - _delegate(_implementation()); - } -} - -// File: openzeppelin-solidity/contracts/AddressUtils.sol - -/** - * Utility library of inline functions on addresses - */ -library AddressUtils { - - /** - * Returns whether the target address is a contract - * @dev This function will return false if invoked during the constructor of a contract, - * as the code is not actually created until after the constructor finishes. - * @param addr address to check - * @return whether the target address is a contract - */ - function isContract(address addr) internal view returns (bool) { - uint256 size; - // XXX Currently there is no better way to check if there is a contract in an address - // than to check the size of the code at that address. - // See https://ethereum.stackexchange.com/a/14016/36603 - // for more details about how this works. - // TODO Check this again before the Serenity release, because all addresses will be - // contracts then. - // solium-disable-next-line security/no-inline-assembly - assembly { size := extcodesize(addr) } - return size > 0; - } - -} - -// File: zos-lib/contracts/upgradeability/UpgradeabilityProxy.sol - -/** - * @title UpgradeabilityProxy - * @dev This contract implements a proxy that allows to change the - * implementation address to which it will delegate. - * Such a change is called an implementation upgrade. - */ -contract UpgradeabilityProxy is Proxy { - /** - * @dev Emitted when the implementation is upgraded. - * @param implementation Address of the new implementation. - */ - event Upgraded(address implementation); - - /** - * @dev Storage slot with the address of the current implementation. - * This is the keccak-256 hash of "org.zeppelinos.proxy.implementation", and is - * validated in the constructor. - */ - bytes32 private constant IMPLEMENTATION_SLOT = 0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3; - - /** - * @dev Contract constructor. - * @param _implementation Address of the initial implementation. - */ - constructor(address _implementation) public { - assert(IMPLEMENTATION_SLOT == keccak256("org.zeppelinos.proxy.implementation")); - - _setImplementation(_implementation); - } - - /** - * @dev Returns the current implementation. - * @return Address of the current implementation - */ - function _implementation() internal view returns (address impl) { - bytes32 slot = IMPLEMENTATION_SLOT; - assembly { - impl := sload(slot) - } - } - - /** - * @dev Upgrades the proxy to a new implementation. - * @param newImplementation Address of the new implementation. - */ - function _upgradeTo(address newImplementation) internal { - _setImplementation(newImplementation); - emit Upgraded(newImplementation); - } - - /** - * @dev Sets the implementation address of the proxy. - * @param newImplementation Address of the new implementation. - */ - function _setImplementation(address newImplementation) private { - require(AddressUtils.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); - - bytes32 slot = IMPLEMENTATION_SLOT; - - assembly { - sstore(slot, newImplementation) - } - } -} - -// File: zos-lib/contracts/upgradeability/AdminUpgradeabilityProxy.sol - -/** - * @title AdminUpgradeabilityProxy - * @dev This contract combines an upgradeability proxy with an authorization - * mechanism for administrative tasks. - * All external functions in this contract must be guarded by the - * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity - * feature proposal that would enable this to be done automatically. - */ -contract AdminUpgradeabilityProxy is UpgradeabilityProxy { - /** - * @dev Emitted when the administration has been transferred. - * @param previousAdmin Address of the previous admin. - * @param newAdmin Address of the new admin. - */ - event AdminChanged(address previousAdmin, address newAdmin); - - /** - * @dev Storage slot with the admin of the contract. - * This is the keccak-256 hash of "org.zeppelinos.proxy.admin", and is - * validated in the constructor. - */ - bytes32 private constant ADMIN_SLOT = 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b; - - /** - * @dev Modifier to check whether the `msg.sender` is the admin. - * If it is, it will run the function. Otherwise, it will delegate the call - * to the implementation. - */ - modifier ifAdmin() { - if (msg.sender == _admin()) { - _; - } else { - _fallback(); - } - } - - /** - * Contract constructor. - * It sets the `msg.sender` as the proxy administrator. - * @param _implementation address of the initial implementation. - */ - constructor(address _implementation) UpgradeabilityProxy(_implementation) public { - assert(ADMIN_SLOT == keccak256("org.zeppelinos.proxy.admin")); - - _setAdmin(msg.sender); - } - - /** - * @return The address of the proxy admin. - */ - function admin() external view ifAdmin returns (address) { - return _admin(); - } - - /** - * @return The address of the implementation. - */ - function implementation() external view ifAdmin returns (address) { - return _implementation(); - } - - /** - * @dev Changes the admin of the proxy. - * Only the current admin can call this function. - * @param newAdmin Address to transfer proxy administration to. - */ - function changeAdmin(address newAdmin) external ifAdmin { - require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); - emit AdminChanged(_admin(), newAdmin); - _setAdmin(newAdmin); - } - - /** - * @dev Upgrade the backing implementation of the proxy. - * Only the admin can call this function. - * @param newImplementation Address of the new implementation. - */ - function upgradeTo(address newImplementation) external ifAdmin { - _upgradeTo(newImplementation); - } - - /** - * @dev Upgrade the backing implementation of the proxy and call a function - * on the new implementation. - * This is useful to initialize the proxied contract. - * @param newImplementation Address of the new implementation. - * @param data Data to send as msg.data in the low level call. - * It should include the signature and the parameters of the function to be - * called, as described in - * https://solidity.readthedocs.io/en/develop/abi-spec.html#function-selector-and-argument-encoding. - */ - function upgradeToAndCall(address newImplementation, bytes data) payable external ifAdmin { - _upgradeTo(newImplementation); - require(address(this).call.value(msg.value)(data)); - } - - /** - * @return The admin slot. - */ - function _admin() internal view returns (address adm) { - bytes32 slot = ADMIN_SLOT; - assembly { - adm := sload(slot) - } - } - - /** - * @dev Sets the address of the proxy admin. - * @param newAdmin Address of the new proxy admin. - */ - function _setAdmin(address newAdmin) internal { - bytes32 slot = ADMIN_SLOT; - - assembly { - sstore(slot, newAdmin) - } - } - - /** - * @dev Only fall back when the sender is not the admin. - */ - function _willFallback() internal { - require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); - super._willFallback(); - } -} - -// File: contracts/FiatTokenProxy.sol - -/** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -pragma solidity ^0.4.24; - - -/** - * @title FiatTokenProxy - * @dev This contract proxies FiatToken calls and enables FiatToken upgrades -*/ -contract FiatTokenProxy is AdminUpgradeabilityProxy { - constructor(address _implementation) public AdminUpgradeabilityProxy(_implementation) { - } -} \ No newline at end of file diff --git a/validate/FiatTokenV1.etherscan b/validate/FiatTokenV1.etherscan deleted file mode 100644 index d9c496db4..000000000 --- a/validate/FiatTokenV1.etherscan +++ /dev/null @@ -1,606 +0,0 @@ -pragma solidity ^0.4.24; - -// File: contracts/Ownable.sol - -/** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -pragma solidity ^0.4.24; - -/** - * @title Ownable - * @dev The Ownable contract from https://github.com/zeppelinos/labs/blob/master/upgradeability_ownership/contracts/ownership/Ownable.sol - * branch: master commit: 3887ab77b8adafba4a26ace002f3a684c1a3388b modified to: - * 1) Add emit prefix to OwnershipTransferred event (7/13/18) - * 2) Replace constructor with constructor syntax (7/13/18) - * 3) consolidate OwnableStorage into this contract - */ -contract Ownable { - - // Owner of the contract - address private _owner; - - /** - * @dev Event to show ownership has been transferred - * @param previousOwner representing the address of the previous owner - * @param newOwner representing the address of the new owner - */ - event OwnershipTransferred(address previousOwner, address newOwner); - - /** - * @dev The constructor sets the original owner of the contract to the sender account. - */ - constructor() public { - setOwner(msg.sender); - } - - /** - * @dev Tells the address of the owner - * @return the address of the owner - */ - function owner() public view returns (address) { - return _owner; - } - - /** - * @dev Sets a new owner address - */ - function setOwner(address newOwner) internal { - _owner = newOwner; - } - - /** - * @dev Throws if called by any account other than the owner. - */ - modifier onlyOwner() { - require(msg.sender == owner()); - _; - } - - /** - * @dev Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - function transferOwnership(address newOwner) public onlyOwner { - require(newOwner != address(0)); - emit OwnershipTransferred(owner(), newOwner); - setOwner(newOwner); - } -} - -// File: contracts/Blacklistable.sol - -/** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -pragma solidity ^0.4.24; - - -/** - * @title Blacklistable Token - * @dev Allows accounts to be blacklisted by a "blacklister" role -*/ -contract Blacklistable is Ownable { - - address public blacklister; - mapping(address => bool) internal blacklisted; - - event Blacklisted(address indexed _account); - event UnBlacklisted(address indexed _account); - event BlacklisterChanged(address indexed newBlacklister); - - /** - * @dev Throws if called by any account other than the blacklister - */ - modifier onlyBlacklister() { - require(msg.sender == blacklister); - _; - } - - /** - * @dev Throws if argument account is blacklisted - * @param _account The address to check - */ - modifier notBlacklisted(address _account) { - require(blacklisted[_account] == false); - _; - } - - /** - * @dev Checks if account is blacklisted - * @param _account The address to check - */ - function isBlacklisted(address _account) public view returns (bool) { - return blacklisted[_account]; - } - - /** - * @dev Adds account to blacklist - * @param _account The address to blacklist - */ - function blacklist(address _account) public onlyBlacklister { - blacklisted[_account] = true; - emit Blacklisted(_account); - } - - /** - * @dev Removes account from blacklist - * @param _account The address to remove from the blacklist - */ - function unBlacklist(address _account) public onlyBlacklister { - blacklisted[_account] = false; - emit UnBlacklisted(_account); - } - - function updateBlacklister(address _newBlacklister) public onlyOwner { - require(_newBlacklister != address(0)); - blacklister = _newBlacklister; - emit BlacklisterChanged(blacklister); - } -} - -// File: contracts/Pausable.sol - -/** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -pragma solidity ^0.4.24; - - -/** - * @title Pausable - * @dev Base contract which allows children to implement an emergency stop mechanism. - * Based on openzeppelin tag v1.10.0 commit: feb665136c0dae9912e08397c1a21c4af3651ef3 - * Modifications: - * 1) Added pauser role, switched pause/unpause to be onlyPauser (6/14/2018) - * 2) Removed whenNotPause/whenPaused from pause/unpause (6/14/2018) - * 3) Removed whenPaused (6/14/2018) - * 4) Switches ownable library to use zeppelinos (7/12/18) - * 5) Remove constructor (7/13/18) - */ -contract Pausable is Ownable { - event Pause(); - event Unpause(); - event PauserChanged(address indexed newAddress); - - - address public pauser; - bool public paused = false; - - /** - * @dev Modifier to make a function callable only when the contract is not paused. - */ - modifier whenNotPaused() { - require(!paused); - _; - } - - /** - * @dev throws if called by any account other than the pauser - */ - modifier onlyPauser() { - require(msg.sender == pauser); - _; - } - - /** - * @dev called by the owner to pause, triggers stopped state - */ - function pause() onlyPauser public { - paused = true; - emit Pause(); - } - - /** - * @dev called by the owner to unpause, returns to normal state - */ - function unpause() onlyPauser public { - paused = false; - emit Unpause(); - } - - /** - * @dev update the pauser role - */ - function updatePauser(address _newPauser) onlyOwner public { - require(_newPauser != address(0)); - pauser = _newPauser; - emit PauserChanged(pauser); - } - -} - -// File: openzeppelin-solidity/contracts/math/SafeMath.sol - -/** - * @title SafeMath - * @dev Math operations with safety checks that throw on error - */ -library SafeMath { - - /** - * @dev Multiplies two numbers, throws on overflow. - */ - function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { - // Gas optimization: this is cheaper than asserting 'a' not being zero, but the - // benefit is lost if 'b' is also tested. - // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 - if (a == 0) { - return 0; - } - - c = a * b; - assert(c / a == b); - return c; - } - - /** - * @dev Integer division of two numbers, truncating the quotient. - */ - function div(uint256 a, uint256 b) internal pure returns (uint256) { - // assert(b > 0); // Solidity automatically throws when dividing by 0 - // uint256 c = a / b; - // assert(a == b * c + a % b); // There is no case in which this doesn't hold - return a / b; - } - - /** - * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). - */ - function sub(uint256 a, uint256 b) internal pure returns (uint256) { - assert(b <= a); - return a - b; - } - - /** - * @dev Adds two numbers, throws on overflow. - */ - function add(uint256 a, uint256 b) internal pure returns (uint256 c) { - c = a + b; - assert(c >= a); - return c; - } -} - -// File: openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol - -/** - * @title ERC20Basic - * @dev Simpler version of ERC20 interface - * See https://github.com/ethereum/EIPs/issues/179 - */ -contract ERC20Basic { - function totalSupply() public view returns (uint256); - function balanceOf(address who) public view returns (uint256); - function transfer(address to, uint256 value) public returns (bool); - event Transfer(address indexed from, address indexed to, uint256 value); -} - -// File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol - -/** - * @title ERC20 interface - * @dev see https://github.com/ethereum/EIPs/issues/20 - */ -contract ERC20 is ERC20Basic { - function allowance(address owner, address spender) - public view returns (uint256); - - function transferFrom(address from, address to, uint256 value) - public returns (bool); - - function approve(address spender, uint256 value) public returns (bool); - event Approval( - address indexed owner, - address indexed spender, - uint256 value - ); -} - -// File: contracts/FiatTokenV1.sol - -/** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -pragma solidity ^0.4.24; - - - - - - -/** - * @title FiatToken - * @dev ERC20 Token backed by fiat reserves - */ -contract FiatTokenV1 is Ownable, ERC20, Pausable, Blacklistable { - using SafeMath for uint256; - - string public name; - string public symbol; - uint8 public decimals; - string public currency; - address public masterMinter; - bool internal initialized; - - mapping(address => uint256) internal balances; - mapping(address => mapping(address => uint256)) internal allowed; - uint256 internal totalSupply_ = 0; - mapping(address => bool) internal minters; - mapping(address => uint256) internal minterAllowed; - - event Mint(address indexed minter, address indexed to, uint256 amount); - event Burn(address indexed burner, uint256 amount); - event MinterConfigured(address indexed minter, uint256 minterAllowedAmount); - event MinterRemoved(address indexed oldMinter); - event MasterMinterChanged(address indexed newMasterMinter); - - function initialize( - string _name, - string _symbol, - string _currency, - uint8 _decimals, - address _masterMinter, - address _pauser, - address _blacklister, - address _owner - ) public { - require(!initialized); - require(_masterMinter != address(0)); - require(_pauser != address(0)); - require(_blacklister != address(0)); - require(_owner != address(0)); - - name = _name; - symbol = _symbol; - currency = _currency; - decimals = _decimals; - masterMinter = _masterMinter; - pauser = _pauser; - blacklister = _blacklister; - setOwner(_owner); - initialized = true; - } - - /** - * @dev Throws if called by any account other than a minter - */ - modifier onlyMinters() { - require(minters[msg.sender] == true); - _; - } - - /** - * @dev Function to mint tokens - * @param _to The address that will receive the minted tokens. - * @param _amount The amount of tokens to mint. Must be less than or equal to the minterAllowance of the caller. - * @return A boolean that indicates if the operation was successful. - */ - function mint(address _to, uint256 _amount) whenNotPaused onlyMinters notBlacklisted(msg.sender) notBlacklisted(_to) public returns (bool) { - require(_to != address(0)); - require(_amount > 0); - - uint256 mintingAllowedAmount = minterAllowed[msg.sender]; - require(_amount <= mintingAllowedAmount); - - totalSupply_ = totalSupply_.add(_amount); - balances[_to] = balances[_to].add(_amount); - minterAllowed[msg.sender] = mintingAllowedAmount.sub(_amount); - emit Mint(msg.sender, _to, _amount); - emit Transfer(0x0, _to, _amount); - return true; - } - - /** - * @dev Throws if called by any account other than the masterMinter - */ - modifier onlyMasterMinter() { - require(msg.sender == masterMinter); - _; - } - - /** - * @dev Get minter allowance for an account - * @param minter The address of the minter - */ - function minterAllowance(address minter) public view returns (uint256) { - return minterAllowed[minter]; - } - - /** - * @dev Checks if account is a minter - * @param account The address to check - */ - function isMinter(address account) public view returns (bool) { - return minters[account]; - } - - /** - * @dev Get allowed amount for an account - * @param owner address The account owner - * @param spender address The account spender - */ - function allowance(address owner, address spender) public view returns (uint256) { - return allowed[owner][spender]; - } - - /** - * @dev Get totalSupply of token - */ - function totalSupply() public view returns (uint256) { - return totalSupply_; - } - - /** - * @dev Get token balance of an account - * @param account address The account - */ - function balanceOf(address account) public view returns (uint256) { - return balances[account]; - } - - /** - * @dev Adds blacklisted check to approve - * @return True if the operation was successful. - */ - function approve(address _spender, uint256 _value) whenNotPaused notBlacklisted(msg.sender) notBlacklisted(_spender) public returns (bool) { - allowed[msg.sender][_spender] = _value; - emit Approval(msg.sender, _spender, _value); - return true; - } - - /** - * @dev Transfer tokens from one address to another. - * @param _from address The address which you want to send tokens from - * @param _to address The address which you want to transfer to - * @param _value uint256 the amount of tokens to be transferred - * @return bool success - */ - function transferFrom(address _from, address _to, uint256 _value) whenNotPaused notBlacklisted(_to) notBlacklisted(msg.sender) notBlacklisted(_from) public returns (bool) { - require(_to != address(0)); - require(_value <= balances[_from]); - require(_value <= allowed[_from][msg.sender]); - - balances[_from] = balances[_from].sub(_value); - balances[_to] = balances[_to].add(_value); - allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); - emit Transfer(_from, _to, _value); - return true; - } - - /** - * @dev transfer token for a specified address - * @param _to The address to transfer to. - * @param _value The amount to be transferred. - * @return bool success - */ - function transfer(address _to, uint256 _value) whenNotPaused notBlacklisted(msg.sender) notBlacklisted(_to) public returns (bool) { - require(_to != address(0)); - require(_value <= balances[msg.sender]); - - balances[msg.sender] = balances[msg.sender].sub(_value); - balances[_to] = balances[_to].add(_value); - emit Transfer(msg.sender, _to, _value); - return true; - } - - /** - * @dev Function to add/update a new minter - * @param minter The address of the minter - * @param minterAllowedAmount The minting amount allowed for the minter - * @return True if the operation was successful. - */ - function configureMinter(address minter, uint256 minterAllowedAmount) whenNotPaused onlyMasterMinter public returns (bool) { - minters[minter] = true; - minterAllowed[minter] = minterAllowedAmount; - emit MinterConfigured(minter, minterAllowedAmount); - return true; - } - - /** - * @dev Function to remove a minter - * @param minter The address of the minter to remove - * @return True if the operation was successful. - */ - function removeMinter(address minter) onlyMasterMinter public returns (bool) { - minters[minter] = false; - minterAllowed[minter] = 0; - emit MinterRemoved(minter); - return true; - } - - /** - * @dev allows a minter to burn some of its own tokens - * Validates that caller is a minter and that sender is not blacklisted - * amount is less than or equal to the minter's account balance - * @param _amount uint256 the amount of tokens to be burned - */ - function burn(uint256 _amount) whenNotPaused onlyMinters notBlacklisted(msg.sender) public { - uint256 balance = balances[msg.sender]; - require(_amount > 0); - require(balance >= _amount); - - totalSupply_ = totalSupply_.sub(_amount); - balances[msg.sender] = balance.sub(_amount); - emit Burn(msg.sender, _amount); - emit Transfer(msg.sender, address(0), _amount); - } - - function updateMasterMinter(address _newMasterMinter) onlyOwner public { - require(_newMasterMinter != address(0)); - masterMinter = _newMasterMinter; - emit MasterMinterChanged(masterMinter); - } -} \ No newline at end of file diff --git a/validate/MasterMinter.etherscan b/validate/MasterMinter.etherscan deleted file mode 100644 index 959042d23..000000000 --- a/validate/MasterMinter.etherscan +++ /dev/null @@ -1,561 +0,0 @@ -pragma solidity ^0.4.24; - -// File: contracts/Ownable.sol - -/** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is furnished to -* do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -pragma solidity ^0.4.24; - -/** - * @title Ownable - * @dev The Ownable contract from https://github.com/zeppelinos/labs/blob/master/upgradeability_ownership/contracts/ownership/Ownable.sol - * branch: master commit: 3887ab77b8adafba4a26ace002f3a684c1a3388b modified to: - * 1) Add emit prefix to OwnershipTransferred event (7/13/18) - * 2) Replace constructor with constructor syntax (7/13/18) - * 3) consolidate OwnableStorage into this contract - */ -contract Ownable { - - // Owner of the contract - address private _owner; - - /** - * @dev Event to show ownership has been transferred - * @param previousOwner representing the address of the previous owner - * @param newOwner representing the address of the new owner - */ - event OwnershipTransferred(address previousOwner, address newOwner); - - /** - * @dev The constructor sets the original owner of the contract to the sender account. - */ - constructor() public { - setOwner(msg.sender); - } - - /** - * @dev Tells the address of the owner - * @return the address of the owner - */ - function owner() public view returns (address) { - return _owner; - } - - /** - * @dev Sets a new owner address - */ - function setOwner(address newOwner) internal { - _owner = newOwner; - } - - /** - * @dev Throws if called by any account other than the owner. - */ - modifier onlyOwner() { - require(msg.sender == owner()); - _; - } - - /** - * @dev Allows the current owner to transfer control of the contract to a newOwner. - * @param newOwner The address to transfer ownership to. - */ - function transferOwnership(address newOwner) public onlyOwner { - require(newOwner != address(0)); - emit OwnershipTransferred(owner(), newOwner); - setOwner(newOwner); - } -} - -// File: contracts/minting/Controller.sol - -/** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ - -pragma solidity ^0.4.24; - - -/** - * @title Controller - * @notice Generic implementation of the owner-controller-worker model. - * One owner manages many controllers. Each controller manages one worker. - * Workers may be reused across different controllers. - */ -contract Controller is Ownable { - /** - * @notice A controller manages a single worker address. - * controllers[controller] = worker - */ - mapping(address => address) internal controllers; - - event ControllerConfigured( - address indexed _controller, - address indexed _worker - ); - event ControllerRemoved(address indexed _controller); - - /** - * @notice Ensures that caller is the controller of a non-zero worker - * address. - */ - modifier onlyController() { - require(controllers[msg.sender] != address(0), - "The value of controllers[msg.sender] must be non-zero"); - _; - } - - /** - * @notice Gets the worker at address _controller. - */ - function getWorker( - address _controller - ) - external - view - returns (address) - { - return controllers[_controller]; - } - - // onlyOwner functions - - /** - * @notice Configure a controller with the given worker. - * @param _controller The controller to be configured with a worker. - * @param _worker The worker to be set for the newly configured controller. - * _worker must not be a non-zero address. To disable a worker, - * use removeController instead. - */ - function configureController( - address _controller, - address _worker - ) - public - onlyOwner - { - require(_controller != address(0), - "Controller must be a non-zero address"); - require(_worker != address(0), "Worker must be a non-zero address"); - controllers[_controller] = _worker; - emit ControllerConfigured(_controller, _worker); - } - - /** - * @notice disables a controller by setting its worker to address(0). - * @param _controller The controller to disable. - */ - function removeController( - address _controller - ) - public - onlyOwner - { - require(_controller != address(0), - "Controller must be a non-zero address"); - require(controllers[_controller] != address(0), - "Worker must be a non-zero address"); - controllers[_controller] = address(0); - emit ControllerRemoved(_controller); - } -} - -// File: contracts/minting/MinterManagementInterface.sol - -/** -* Copyright CENTRE SECZ 2019 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ - -pragma solidity ^0.4.24; - -/** - * @notice A contract that implements the MinterManagementInterface has external - * functions for adding and removing minters and modifying their allowances. - * An example is the FiatTokenV1 contract that implements USDC. - */ -interface MinterManagementInterface { - function isMinter(address _account) external view returns (bool); - function minterAllowance(address _minter) external view returns (uint256); - - function configureMinter( - address _minter, - uint256 _minterAllowedAmount - ) - external - returns (bool); - - function removeMinter(address _minter) external returns (bool); -} - -// File: openzeppelin-solidity/contracts/math/SafeMath.sol - -/** - * @title SafeMath - * @dev Math operations with safety checks that throw on error - */ -library SafeMath { - - /** - * @dev Multiplies two numbers, throws on overflow. - */ - function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { - // Gas optimization: this is cheaper than asserting 'a' not being zero, but the - // benefit is lost if 'b' is also tested. - // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 - if (a == 0) { - return 0; - } - - c = a * b; - assert(c / a == b); - return c; - } - - /** - * @dev Integer division of two numbers, truncating the quotient. - */ - function div(uint256 a, uint256 b) internal pure returns (uint256) { - // assert(b > 0); // Solidity automatically throws when dividing by 0 - // uint256 c = a / b; - // assert(a == b * c + a % b); // There is no case in which this doesn't hold - return a / b; - } - - /** - * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). - */ - function sub(uint256 a, uint256 b) internal pure returns (uint256) { - assert(b <= a); - return a - b; - } - - /** - * @dev Adds two numbers, throws on overflow. - */ - function add(uint256 a, uint256 b) internal pure returns (uint256 c) { - c = a + b; - assert(c >= a); - return c; - } -} - -// File: contracts/minting/MintController.sol - -/** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ - -pragma solidity ^0.4.24; - - - - -/** - * @title MintController - * @notice The MintController contract manages minters for a contract that - * implements the MinterManagerInterface. It lets the owner designate certain - * addresses as controllers, and these controllers then manage the - * minters by adding and removing minters, as well as modifying their minting - * allowance. A controller may manage exactly one minter, but the same minter - * address may be managed by multiple controllers. - * @dev MintController inherits from the Controller contract. It treats the - * Controller workers as minters. - */ -contract MintController is Controller { - using SafeMath for uint256; - - /** - * @title MinterManagementInterface - * @notice MintController calls the minterManager to execute/record minter - * management tasks, as well as to query the status of a minter address. - */ - MinterManagementInterface internal minterManager; - - event MinterManagerSet( - address indexed _oldMinterManager, - address indexed _newMinterManager - ); - event MinterConfigured( - address indexed _msgSender, - address indexed _minter, - uint256 _allowance - ); - event MinterRemoved( - address indexed _msgSender, - address indexed _minter - ); - event MinterAllowanceIncremented( - address indexed _msgSender, - address indexed _minter, - uint256 _increment, - uint256 _newAllowance - ); - - event MinterAllowanceDecremented( - address indexed msgSender, - address indexed minter, - uint256 decrement, - uint256 newAllowance - ); - - /** - * @notice Initializes the minterManager. - * @param _minterManager The address of the minterManager contract. - */ - constructor(address _minterManager) public { - minterManager = MinterManagementInterface(_minterManager); - } - - /** - * @notice gets the minterManager - */ - function getMinterManager( - ) - external - view - returns (MinterManagementInterface) - { - return minterManager; - } - - // onlyOwner functions - - /** - * @notice Sets the minterManager. - * @param _newMinterManager The address of the new minterManager contract. - */ - function setMinterManager( - address _newMinterManager - ) - public - onlyOwner - { - emit MinterManagerSet(address(minterManager), _newMinterManager); - minterManager = MinterManagementInterface(_newMinterManager); - } - - // onlyController functions - - /** - * @notice Removes the controller's own minter. - */ - function removeMinter() public onlyController returns (bool) { - address minter = controllers[msg.sender]; - emit MinterRemoved(msg.sender, minter); - return minterManager.removeMinter(minter); - } - - /** - * @notice Enables the minter and sets its allowance. - * @param _newAllowance New allowance to be set for minter. - */ - function configureMinter( - uint256 _newAllowance - ) - public - onlyController - returns (bool) - { - address minter = controllers[msg.sender]; - emit MinterConfigured(msg.sender, minter, _newAllowance); - return internal_setMinterAllowance(minter, _newAllowance); - } - - /** - * @notice Increases the minter's allowance if and only if the minter is an - * active minter. - * @dev An minter is considered active if minterManager.isMinter(minter) - * returns true. - */ - function incrementMinterAllowance( - uint256 _allowanceIncrement - ) - public - onlyController - returns (bool) - { - require(_allowanceIncrement > 0, - "Allowance increment must be greater than 0"); - address minter = controllers[msg.sender]; - require(minterManager.isMinter(minter), - "Can only increment allowance for minters in minterManager"); - - uint256 currentAllowance = minterManager.minterAllowance(minter); - uint256 newAllowance = currentAllowance.add(_allowanceIncrement); - - emit MinterAllowanceIncremented( - msg.sender, - minter, - _allowanceIncrement, - newAllowance - ); - - return internal_setMinterAllowance(minter, newAllowance); - } - - /** - * @notice decreases the minter allowance if and only if the minter is - * currently active. The controller can safely send a signed - * decrementMinterAllowance() transaction to a minter and not worry - * about it being used to undo a removeMinter() transaction. - */ - function decrementMinterAllowance( - uint256 _allowanceDecrement - ) - public - onlyController - returns (bool) - { - require(_allowanceDecrement > 0, - "Allowance decrement must be greater than 0"); - address minter = controllers[msg.sender]; - require(minterManager.isMinter(minter), - "Can only decrement allowance for minters in minterManager"); - - uint256 currentAllowance = minterManager.minterAllowance(minter); - uint256 actualAllowanceDecrement = ( - currentAllowance > _allowanceDecrement ? - _allowanceDecrement : currentAllowance - ); - uint256 newAllowance = currentAllowance.sub(actualAllowanceDecrement); - - emit MinterAllowanceDecremented( - msg.sender, - minter, - actualAllowanceDecrement, - newAllowance - ); - - return internal_setMinterAllowance(minter, newAllowance); - } - - // Internal functions - - /** - * @notice Uses the MinterManagementInterface to enable the minter and - * set its allowance. - * @param _minter Minter to set new allowance of. - * @param _newAllowance New allowance to be set for minter. - */ - function internal_setMinterAllowance( - address _minter, - uint256 _newAllowance - ) - internal - returns (bool) - { - return minterManager.configureMinter(_minter, _newAllowance); - } -} - -// File: contracts/minting/MasterMinter.sol - -/** -* Copyright CENTRE SECZ 2018 -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all -* copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ - -pragma solidity ^0.4.24; - - -/** - * @title MasterMinter - * @notice MasterMinter uses multiple controllers to manage minters for a - * contract that implements the MinterManagerInterface. - * @dev MasterMinter inherits all its functionality from MintController. - */ -contract MasterMinter is MintController { - - constructor(address _minterManager) MintController(_minterManager) public { - } -} \ No newline at end of file diff --git a/validate/README.contractDiff.md b/validate/README.contractDiff.md deleted file mode 100644 index d8808ef51..000000000 --- a/validate/README.contractDiff.md +++ /dev/null @@ -1,57 +0,0 @@ -# Overview - -The `checkDiff` script compares source code uploaded to Etherscan to source code -on the local machine. - -The source code in Etherscan is a concatenation of several files. The script -reads comments inside the files to determine which local files were used, then -it reads the file and reconstructs the expected source code. - -The script displays a `diff` between the actual and expected code. The -difference should fall in the following categories: - -1. Comments / whitespace -2. The local code has `import` statements not included in Etherscan because the - files were explicitly concatenated into a master file. -3. The local code has extra `pragma solidity ^0.4.24` statements at the head of - each file, while Etherscan should have just one at the top. - -At the end of the run, `checkDiff` will output which files it was able to -process. Success means that the Etherscan file could be read AND all the -included files could be read. Validity should be determined by actually looking -at the diffs. - -# Running checkDiff.js - -To run the script, type - -`node validate/contractDiff.js ... ` - -Where the `filename` is the location of source code downloaded from Etherscan. -Copies of `FiatTokenProxy`, `FiatTokenV1`, and `MasterMinter` are included for -testing purposes. You can test them: - -`node validate/contractDiff.js validate/FiatTokenProxy.etherscan validate/FiatTokenV1.etherscan validate/MasterMinter.etherscan` - -# Finding code on Etherscan - -1. Go to [https://etherscan.io](https://etherscan.io) -2. Enter the contract address in the search bar. -3. Click on the `Code` tab. - -# Uploading to Etherscan - -When uploading source code to Etherscan, you will need to combine several file. -Before the start of an included file, add the comment: - -`// File: ` - -For example, to include `contracts/Ownable.sol`, add the comment - -`// File: contracts/Ownable.sol` - -For Open Zeppelin files, omit the `node_modules` directory. For example: - -`// File: openzeppelin-solidity/contracts/math/SafeMath.sol` - -`// File: zos-lib/contracts/upgradeability/Proxy.sol` diff --git a/validate/README.validate.md b/validate/README.validate.md deleted file mode 100644 index 2e4348451..000000000 --- a/validate/README.validate.md +++ /dev/null @@ -1,32 +0,0 @@ -# Overview - -The `validate.js` script connects to the Ethereum blockchain to validate the -values stored in the contract. - -# Infura Setup - -Note: Infura is a 3rd party provider. - -1. Got to [https://infura.io](https://infura.io) and click "Get Started For - Free" to register an email with Infura. - -2. Click on the "Dashboards" icon at the top of the Infura homepage or go to - https://infura.io/dashboard to access your personal dashboard. - -3. Create a new project - give it any name you want. Then whitelist the Token - Proxy and the current Token Implementation addresses. - -4. Follow the instructions under the "Deployment" section in `README.md` to - configure the mnemonic phrase and the Infura API key in `config.js`. - -# Configure Expected Values - -Go to ./validate/validate.js and change the addresses at the top of the file, as -well as any other constants. - -# Validation - -Run `truffle exec ./validate/validate.js --network mainnet` - -You can replace `mainnet` with any other network defined in `truffle.js` under -`networks`. diff --git a/validate/contractDiff.js b/validate/contractDiff.js deleted file mode 100644 index abdbf0bc0..000000000 --- a/validate/contractDiff.js +++ /dev/null @@ -1,137 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const chalk = require("chalk"); -const diff = require("diff"); - -function readFileSync(filename) { - return fs.readFileSync(filename, "utf8"); -} - -function getFilenamesFromCode(code) { - // find all lines with prefix "// File:" - const filenames = code.match(/\/\/\s*File:\s*\S+\n/gi); - for (let i = 0; i < filenames.length; i++) { - // remove prefix "// File: ". - filenames[i] = filenames[i].replace(/\/\/\s*File:\s*/i, ""); - filenames[i] = filenames[i].replace(/\s+/i, ""); - - // directory openzeppelin-solidity is inside node_modules - if (filenames[i].match(/openzeppelin-solidity/)) { - filenames[i] = "node_modules/" + filenames[i]; - } - - // directory zos-lib is inside node_modules - if (filenames[i].match(/zos-lib/)) { - filenames[i] = "node_modules/" + filenames[i]; - } - - // add ./ prefix - filenames[i] = "./" + filenames[i]; - console.log(filenames[i]); - } - return filenames; -} - -function createCodeFile(filenames) { - let code = ""; - for (let i = 0; i < filenames.length; i++) { - try { - console.log("Reading file " + filenames[i]); - } catch (err) { - console.log("Could not read file " + filenames[i]); - return ""; - } - code = code + readFileSync(filenames[i]) + "\n"; - } - return code; -} - -function diffText(code1, code2) { - const diffOutput = diff.diffTrimmedLines(code1, code2); - for (let i = 0; i < diffOutput.length; i++) { - const diffLine = diffOutput[i]; - if (diffLine.added) { - process.stdout.write(chalk.green(`+ ${diffLine.value}`)); - } else if (diffLine.removed) { - process.stdout.write(chalk.red(`- ${diffLine.value}`)); - } - } -} - -function removeExtraComments(code) { - const modified = code.replace(/\/\/\s*File:\s*\S+\n/gi, ""); - return modified; -} - -function validate(filename) { - let code = readFileSync(filename); - - const filenames = getFilenamesFromCode(code); - const expectedCode = createCodeFile(filenames); - - code = removeExtraComments(code); - diffText(code, expectedCode); -} - -function printUsage() { - console.log("node contractDiff .... "); -} - -function main() { - if (process.argv.length < 3) { - printUsage(); - return; - } - - let fail = 0; - const total = process.argv.length - 2; - let goodFiles = ""; - let badFiles = ""; - - for (let i = 2; i < process.argv.length; i++) { - const filename = process.argv[i]; - console.log("Checking: " + filename); - try { - validate(filename); - goodFiles = goodFiles + filename + "\n"; - } catch (err) { - console.log("Error validating file " + filename); - console.log(err.msg); - badFiles = badFiles + filename + "\n"; - ++fail; - } - } - - if (total - fail > 0) { - process.stdout.write( - chalk.green("\n\nSuccessfully processed " + (total - fail) + " files.\n") - ); - process.stdout.write(chalk.green(goodFiles)); - } - - if (fail > 0) { - process.stdout.write( - chalk.red("\n\nFailed to process " + fail + " files.\n") - ); - process.stdout.write(chalk.red(badFiles + "\n")); - } -} - -main(); diff --git a/validate/validate.js b/validate/validate.js deleted file mode 100644 index 3cbc0b86e..000000000 --- a/validate/validate.js +++ /dev/null @@ -1,171 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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. - */ - -// Address of the FiatToken Implementation -const fiatTokenAddress = "0x0882477e7895bdc5cea7cb1552ed914ab157fe56"; - -// Address of the FiatToken Proxy -const fiatTokenProxyAddress = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; - -// role addresses -const MASTER_MINTER = 0x1500a138523709ce66c8b9abe678abc1b6c5a7b7; -const PAUSER = 0xe8e13e1b6d363c270ef3a5ab466ebad8326311bb; -const UPGRADER = 0x69005ff70072c57547dc44ea975d85ea60e5b196; -const OWNER = 0xa61e278899a8553d93d14eb19ba2791e05069e87; -const BLACKLISTER = 0x063d13783a0a2ce65b1ca00d9e897e6c8b1ec86b; - -// Addresses of known minters - currently fake minters -// If replacing with real minters need to modify printMinterInfo -const minters = ["0x0000", "0x0001"]; - -const NAME = "USD//C"; -const SYMBOL = "USDC"; -const CURRENCY = "USD"; -const DECIMALS = 6; -const TOTALSUPPLY = 0; -const PAUSED = false; - -// Name of current implementation artifact as stored in ./build/contracts/*.json -const FiatTokenV1 = artifacts.require("FiatTokenV1"); - -// Name of current proxy artifact as stored in ./build/contracts/*.json -artifacts.require("FiatTokenProxy"); - -// -// -// Validation code -// -// - -const adminSlot = - "0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b"; -const implSlot = - "0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3"; - -const asyncGetStorageAt = (address, slot) => - new Promise((resolve, reject) => { - web3.eth.getStorageAt(address, slot, (err, result) => { - if (err) { - return reject(err); - } - resolve(result); - }); - }); - -async function printMinterInfo(proxiedToken) { - for (const minter of minters) { - console.log("\nMinter: " + minter); - - const isMinter = await proxiedToken.isMinter.call(minter); - print("isMinter", isMinter, false); - - const minterAllowance = await proxiedToken.minterAllowance.call(minter); - print("mintAllowance", minterAllowance, 0); - - const balanceOf = await proxiedToken.balanceOf.call(minter); - print("balanceOf", balanceOf, 0); - - const isBlacklisted = await proxiedToken.isBlacklisted.call(minter); - print("isBlacklisted", isBlacklisted, false); - } -} - -function getAddressFromSlotData(slotData) { - const rawAddress = slotData.substring(26, 86); - return "0x" + rawAddress; -} - -function compare(actual, expected) { - if (actual === expected) { - return "(ok)"; - } else { - return "(expect " + expected + ")"; - } -} - -function print(name, actual, expected) { - console.log(name + "\t" + actual + "\t" + compare(actual, expected)); -} - -async function Validate() { - console.log("Connecting to contract..."); - await FiatTokenV1.at(fiatTokenAddress); - console.log("Token found."); - const proxiedToken = await FiatTokenV1.at(fiatTokenProxyAddress); - console.log("Proxied token created."); - - // initialized needs to retrieved manually - let slot8Data = await asyncGetStorageAt(proxiedToken.address, 8); - let initialized = slot8Data.substring(24, 26); - print("init proxy", initialized, "01"); - - slot8Data = await asyncGetStorageAt(fiatTokenAddress, 8); - initialized = slot8Data.substring(24, 26); - print("init logic", initialized, "01"); - - const name = await proxiedToken.name.call(); - print("name ", name, NAME); - - const symbol = await proxiedToken.symbol.call(); - print("symbol ", symbol, SYMBOL); - - const decimals = await proxiedToken.decimals.call(); - print("decimals", decimals, DECIMALS); - - const currency = await proxiedToken.currency.call(); - print("currency", currency, CURRENCY); - - const totalSupply = await proxiedToken.totalSupply.call(); - print("totalSupply", totalSupply, TOTALSUPPLY); - - const paused = await proxiedToken.paused.call(); - print("paused ", paused, PAUSED); - - // implementation - const implementation = await asyncGetStorageAt( - proxiedToken.address, - implSlot - ); - print("implement", getAddressFromSlotData(implementation), fiatTokenAddress); - - const admin = await asyncGetStorageAt(proxiedToken.address, adminSlot); - print("upgrader", getAddressFromSlotData(admin), UPGRADER); - - const owner = await proxiedToken.owner.call(); - print("owner ", owner, OWNER); - - const masterMinter = await proxiedToken.masterMinter.call(); - print("masterMinter", masterMinter, MASTER_MINTER); - - const pauser = await proxiedToken.pauser.call(); - print("pauser ", pauser, PAUSER); - - const blacklister = await proxiedToken.blacklister.call(); - print("blacklister", blacklister, BLACKLISTER); - - await printMinterInfo(proxiedToken); -} - -module.exports = async (callback) => { - try { - await Validate(); - } catch (e) { - // continue - } - callback(); -}; diff --git a/verification/GoogleSheets/index.js b/verification/GoogleSheets/index.js deleted file mode 100644 index 3933e422f..000000000 --- a/verification/GoogleSheets/index.js +++ /dev/null @@ -1,275 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 fs = require("fs"); -const readline = require("readline"); -const { google } = require("googleapis"); -const path = require("path"); - -const SCOPES = ["https://www.googleapis.com/auth/spreadsheets.readonly"]; -const CREDENTIALS_PATH = path.join(__dirname, "credentials.json"); -const TOKEN_PATH = path.join(__dirname, "/token.json"); - -/** - * Authorize access to GoogleSheets API and load spreadsheet data. - */ -function load() { - return new Promise((resolve, reject) => { - // Load client secrets from a local file. - fs.readFile(CREDENTIALS_PATH, async (err, content) => { - if (err) { - reject(new Error("Error loading credentials file:" + err)); - } - // If no error loading client secrets, authorize and run getTests(). - const res = await authorize(JSON.parse(content), getTests).catch( - (err) => { - reject(err); - } - ); - resolve(res); - }); - }); -} - -/** - * Create an OAuth2 client with the given credentials, and then execute the - * given callback function. - * @param {Object} credentials The authorization client credentials. - * @param {function} callback The callback to call with the authorized client. - */ -function authorize(credentials, callback) { - // eslint-disable-next-line camelcase - const { client_secret, client_id, redirect_uris } = credentials.installed; - const oAuth2Client = new google.auth.OAuth2( - client_id, - client_secret, - redirect_uris[0] - ); - - return new Promise((resolve, reject) => { - // Check if we have previously stored an OAuth token. - fs.readFile(TOKEN_PATH, async (err, token) => { - // If we have not previously stored an OAuth token, get a new one and - // call getTests(). - let res; - if (err) { - res = await getNewToken(oAuth2Client, callback).catch((err) => { - reject(err); - }); - } else { - // If we have previously stored an OAuth token, call getTests(). - oAuth2Client.setCredentials(JSON.parse(token)); - res = await callback(oAuth2Client).catch((err) => { - reject(err); - }); - } - resolve(res); - }); - }); -} - -/** - * Get and store new token after prompting for user authorization, and then - * execute the given callback with the authorized OAuth2 client. - * @param {google.auth.OAuth2} oAuth2Client The OAuth2 client to get token for. - * @param {getEventsCallback} callback The callback for the authorized client. - */ -function getNewToken(oAuth2Client, callback) { - const authUrl = oAuth2Client.generateAuthUrl({ - access_type: "offline", - scope: SCOPES, - }); - console.log("Authorize this app by visiting this url:", authUrl); - const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout, - }); - - return new Promise((resolve, reject) => { - rl.question("Enter the code from that page here: ", (code) => { - rl.close(); - oAuth2Client.getToken(code, async (err, token) => { - if (err) { - reject(await callback(err)); - } - oAuth2Client.setCredentials(token); - // Store the token to disk for later program executions - fs.writeFile(TOKEN_PATH, JSON.stringify(token), (err) => { - if (err) { - console.error(err); - } - console.log("Token stored to", TOKEN_PATH); - }); - const res = await callback(oAuth2Client).catch((err) => { - reject(err); - }); - resolve(res); - }); - }); - }); -} - -/** - * Gets the tests to verify from the GoogleSheets spreadsheet. - * @see https://docs.google.com/spreadsheets/d/1zP1_q8XbLH8YrWMJ0Od80PKleklUnvBAX96wypJaVTU/edit?usp=sharing - * @param {google.auth.OAuth2} auth The authenticated Google OAuth client. - */ -function getTests(auth) { - const sheets = google.sheets({ version: "v4", auth }); - - return new Promise((resolve, reject) => { - sheets.spreadsheets.get( - { - spreadsheetId: "1zP1_q8XbLH8YrWMJ0Od80PKleklUnvBAX96wypJaVTU", - includeGridData: true, - }, - (err, res) => { - if (err) { - reject(new Error("The GoogleSheets API returned an error: " + err)); - } - const tests = {}; - const tabs = res.data.sheets; - if (tabs.length) { - tabs.map((tab) => { - const tabName = tab.properties.title; - if (tabName === "UnitTestCompleteness") { - loadUnitTestCompleteness(tests, tab); - return; - } - const rows = tab.data[0].rowData; - const topRow = rows.shift().values; - const col = getCol(topRow); - if (typeof col === "undefined") { - console.log( - '\nNo code column found in tab "' + tabName + '". Skipping.\n' - ); - return; - } - rows.map((rowData) => { - const row = rowData.values; - if (row) { - processRow(row, tabName, tests, col); - } - }); - }); - } else { - reject(new Error("No GoogleSheets data found.")); - } - resolve(tests); - } - ); - }); -} - -/** - * Helper function that gets the test code and test description from a row in a - * given speadsheet tab and adds them to the tests object returned by getTests(). - * @param {Array} row The row of the spreadsheet to processs. - * @param {String} tabName The name of the spreadsheet tab currently loading. - * @param {Object} tests Contains all the spreadsheet test data to verify. - * @param {Int} col The index of the test code column of the spreadsheet tab. - */ -function processRow(row, tabName, tests, col) { - const codeCell = row[col]; - const descCell = row[col + 1]; - if (codeCell && descCell) { - let testCode = codeCell.formattedValue; - const testDesc = descCell.formattedValue; - if (testCode && testDesc) { - const pending = testCode.match(/ -p/); - if (pending) { - testCode = testCode.replace(pending[0], ""); - } - categorizeTest( - tests, - testCode.trim(), - testDesc.trim(), - tabName.trim(), - pending - ); - } - } -} - -/** - * Helper function that gets all test codes included in tab UnitTestCompleteness. - * @param {Object} tab The UnitTestCompleteness tab object. - * @param {Object} tests Contains all the spreadsheet test data to verify. - */ -function loadUnitTestCompleteness(tests, tab) { - tests.completeness = {}; - const rows = tab.data[0].rowData; - rows.map((row) => { - row = row.values; - row.map((cell) => { - cell = cell.formattedValue; - if (cell) { - const codes = cell.match(/([a-z]{2,})([0-9]+)/g); - if (codes != null) { - codes.map((code) => { - if (!tests.completeness[code]) { - tests.completeness[code] = true; - } - }); - } - } - }); - }); -} - -/** - * Helper function that adds a test code and description to the tests object - * returned by getTests(). - * @param {Object} tests Contains all the spreadsheet test data to verify. - * @param {String} code The test code to add to tests. - * @param {String} desc The test description to add to tests. - * @param {String} tab The name of the spreadsheet tab currently loading. - * @param {Array?} pending [' -p'] if test is pending, 'undefined' otherwise. - */ -function categorizeTest(tests, code, desc, tab, pending) { - if (pending) { - tab = "pending"; - } - if (!tests[tab]) { - tests[tab] = {}; - } - const tabTests = tests[tab]; - tabTests[code] = desc.replace(code, ""); - tests[tab] = tabTests; -} - -/** - * Helper function that finds the 'Code' or 'code' column in a spreadsheet tab. - * @param {Array} topRow An array containing all the cells along the top row of - * the spreadsheet tab. Should contain column headers. - */ -function getCol(topRow) { - let col; - for (let i = 0; i < topRow.length; i++) { - const cell = topRow[i]; - const label = cell.formattedValue; - if (label === "code" || label === "Code") { - col = i; - } - } - return col; -} - -module.exports = { - load, -}; diff --git a/verification/README.verification.txt b/verification/README.verification.txt deleted file mode 100644 index 718909f8c..000000000 --- a/verification/README.verification.txt +++ /dev/null @@ -1,102 +0,0 @@ -The spreadsheet verification tool requires certain naming and usage conventions -to function correctly. - -Test Codes: - -- Should follow the format of lowercase letters followed by a number with - no spaces. (ex. pt001, ept016, misc0000, legacy2, fiat19) - -- Should be included at the beginning of each test title (in the test suite) - and each test description (in the spreadsheet). - -- Should be listed under the 'Code' column of each spreadsheet tab. - -Test Titles: - -- Should exactly match the test description assigned to the test in the - spreadsheet. - -Spreadsheet Tabs: - -- Should have the same name as the test file they represent. - This name should be formatted BlankTests where Blank consists of uppercase - and/or lowercase letters and is followed without a space by the word 'Tests'. - (ex. PositiveTests, tokenTests, ABITests) - -- Should include a column 'code' or 'Code' listing all unique test codes that - correspond to tests expected in the test file. - -- Should include a column listing all unique test descriptions that correspond - to tests expected in the test file. This column should be immediately to the - right of the test code column and should be ordered such that the test code - on any given row refers to the same test as the test description on that row. - -- Should keep the column headers in the top row. - -UnitTestCompleteness tab: - -- The verification tool will print out any test codes that are featured in - the UnitTestCompleteness tab but missing from the test suite. -- It does not matter where these codes are located in the tab so long as they - adhere to the same code format used throughout the test suite. - (i.e. xyz123, where xyz is a sequence of 2+ lowercase letters and 123 is any - sequence of numbers) - -Contract Block Titles: - -- Should include the name of the test file they run, and this name should not - be immediately preceded by letters. - (ex. If the contract block runs the PositiveTests file, it should be named - 'FiatToken_PositiveTests', 'PositiveTestsupgraded', 'PositiveTests' etc., - but not 'upgradedPositiveTests'.) - -- Should include the word 'Legacy' if they run tests that do not need to be - recorded in the spreadsheet and can be ignored by the verification tool. - -Pending Tests: - -- Should be flagged with ' -p' immediately after the test code in the - spreadsheet. This flag should not be included anywhere in the test suite code - or in the spreadsheet test description. -- The purpose of the pending flag is to mark tests that you are working on - but have not yet merged. When other developers use the tool, it will ignore - the tests that are marked pending rather than alert them that tests are - missing from their test suite. When you, the developer writing the pending - tests, use the tool it will simply list the tests you are working on. - If the tool alerts you that there are tests marked as pending that are also - included in your version of the test suite, but they are not tests you are - working on, then the developer who wrote the tests forgot to delete the - pending flags from the spreadsheet when the tests were merged, and you should - go ahead and delete them yourself. - - -***Disabling/Enabling Verification*** - -- To DISABLE the spreadsheet verification tool, go to the file truffle.js and - comment out the following line: - reporter: './verification/verification_reporter.js', - Then, uncomment the line above it. - //reporter: 'Spec', - -- To ENABLE the spreadsheet verification tool FOR THE FIRST TIME. - - 1) Ensure your browser is signed in to your Google account and visit - https://developers.google.com/sheets/api/quickstart/nodejs . - - 2) Press the blue 'ENABLE THE GOOGLE SHEETS API' button. - - 3) Enter a project name (i.e. 'spreadsheet-verification') and product name - (i.e 'centre-tokens') and download the credentials.json file. - - 4) Move your credentials.json file into the verification/GoogleSheets folder. - - 5) Run 'npm run truffle-test'. You should be prompted to visit a URL and enter a code - that you find there into your terminal. This will create a token.json file - inside the GoogleSheets folder. Note, if a token.json file already exists in - this folder, you will encounter an error. - - From there, you should be good to go. This process only needs to be completed - the first time you use the tool. - - Note: Ensure that credentials.json and token.json are included in .gitignore - before committing. diff --git a/verification/verification_reporter.js b/verification/verification_reporter.js deleted file mode 100644 index 02ad21526..000000000 --- a/verification/verification_reporter.js +++ /dev/null @@ -1,324 +0,0 @@ -/** - * SPDX-License-Identifier: Apache-2.0 - * - * Copyright (c) 2023, Circle Internet Financial, LLC. - * - * 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 mocha = require("mocha"); -const specReporter = mocha.reporters.Spec; -const baseReporter = mocha.reporters.Base; -const { color } = baseReporter; -const { inherits } = mocha.utils; -const sheets = require("./GoogleSheets/index"); -const _ = require("lodash"); -const jsdiff = require("diff"); - -// Global variables for text output. -const greenX = color("bright pass", baseReporter.symbols.err); -const redX = color("bright fail", baseReporter.symbols.err); -const greenOk = color("bright pass", baseReporter.symbols.ok); -// const redOk = color("bright fail", baseReporter.symbols.ok); -const indent = " "; - -module.exports = verificationReporter; - -// Extends default Mocha reporter, 'Spec'. -inherits(verificationReporter, specReporter); - -function verificationReporter(runner) { - specReporter.call(this, runner); - - let spreadsheet; - let spreadsheetClone; - const errs = []; - const pending = {}; - - // Runs before tests are executed. Loads tests from spreadsheet. - before("load_spreadsheetTests", async () => { - this.timeout(200000); - console.log("Loading spreadsheet...\n"); - spreadsheet = await sheets.load().catch((err) => { - console.log(err); - }); - spreadsheetClone = JSON.parse(JSON.stringify(spreadsheet)); - }); - - // Runs at the beginning of each contract block execution. - runner.on("suite", (suite) => { - // If contract block title is marked 'Legacy', - // we skip verification. (See README.verification) - const legacy = suite.title.match(/Legacy/gi); - if (legacy) { - console.log( - indent + 'This test file is marked "Legacy". Skipping verification.' - ); - } - - // We also skip verification on the 'PausableTests' file. - // Remove this block and the one indicated below to re-enable. - const pausableTests = suite.title.match(/PausableTests/gi); - if (pausableTests) { - console.log( - indent + "Verification tool configured to skip PausableTests file." - ); - } - }); - - // Runs at the end of every test. - runner.on("test end", (test) => { - // If contract block title is marked 'Legacy', - // we skip verification. (See README.verification) - const legacy = test.parent.title.match(/Legacy/gi); - if (legacy) { - return; - } - - // We also skip verification on the 'PausableTests' file. - // Remove this block and the one indicated above to re-enable. - const pausableTests = test.parent.title.match(/PausableTests/gi); - if (pausableTests) { - return; - } - - // Parse test title. - let file = test.parent.title.match(/[a-z]+Tests/gi); - if (file) { - file = file[0]; - } else { - console.log( - indent + - color( - "pass", - "Error parsing test title.\n" + - indent + - "Confirm file name is formatted correctly and included in contract \n" + - indent + - "block title. (See README.verification)" - ) - ); - return; - } - let id = test.title.match(/([a-z]{2,})([0-9]+)/g); - if (id) { - id = id[0]; - } else { - console.log( - indent + - color( - "pass", - "Error parsing test title.\n" + - indent + - "Confirm id is formatted correctly and included in test title.\n" + - indent + - "(See README.verification)" - ) - ); - return; - } - const testRan = test.title.replace(id, ""); - - // Check if test is in UnitTestCompleteness tab and "cross-off" if it is. - if (!_.isEmpty(spreadsheet.completeness)) { - if (spreadsheet.completeness[id]) { - delete spreadsheet.completeness[id]; - } - } - - // If test is marked pending in spreadsheet, record for later output. - if (spreadsheet.pending && spreadsheet.pending[id] === testRan) { - console.log(indent + greenX + color("bright pass", " pending")); - pending[id] = testRan; - } else { - // Verify test is in spreadsheet. - if (spreadsheet[file]) { - const spreadsheetTest = - spreadsheet[file][id] || spreadsheetClone[file][id]; - if (spreadsheetTest) { - // Verify test descriptions match. - if (spreadsheetTest === testRan) { - console.log(indent + greenX); - } else { - // If test is in spreadsheet, but descriptions don't match. - console.log( - indent + - redX + - color( - "fail", - " test description inconsistent with spreadsheet for " + - id + - ", " + - file - ) - ); - // Print test description string diff. - const diff = getStringDiff(testRan, spreadsheetTest); - console.log(indent + diff); - errs.push( - redX + - color( - "fail", - " Test descriptions do not match for " + id + ", " + file - ) + - "\n" + - indent + - "In spreadsheet: " + - spreadsheetTest + - "\n" + - indent + - "In test file: " + - testRan + - "\n" + - indent + - "Diff: " + - diff - ); - } - // If test is included in spreadsheet, 'cross-off' by deleting. - if (spreadsheet[file][id]) { - delete spreadsheet[file][id]; - } - } else { - // If test is not in spreadsheet. - console.log( - indent + - redX + - color("fail", " " + id + " missing from spreadsheet tab " + file) - ); - errs.push( - redX + - color( - "fail", - " Test " + id + " missing from " + file + " spreadsheet tab." - ) - ); - } - } else { - // If test file not found in spreadsheet tabs. - console.log( - indent + - redX + - color( - "fail", - " test file " + file + " does not match a spreadsheet tab" - ) - ); - errs.push( - redX + - color( - "fail", - " Test file " + - file + - " missing from spreadsheet. Possible solutions:\n" + - "1. Ensure test is listed in correct spreadsheet tab.\n" + - "2. Ensure the tab name is included in the contract block title.\n" + - "(See README.verification)" - ) - ); - } - } - }); - - // Runs at the end of test suite execution. Prints verification summary. - runner.on("end", () => { - console.log("\n\nSpreadsheet Verification Summary:\n"); - // If there are pending tests included in the test suite... - if (!_.isEmpty(pending)) { - console.log(color("bright pass", "Pending Tests:")); - console.log( - "The following tests are included in the test suite, but\n" + - "marked pending in the spreadsheet (delete -p flag once merged): " - ); - console.log(pending); - } - // Do not report tests that are missing from test suite but marked pending. - delete spreadsheet.pending; - // Print out any tests that are included in UnitTestCompleteness tab but - // missing from the test suite. - if (!_.isEmpty(spreadsheet.completeness)) { - console.log( - "\n" + - redX + - color( - "bright fail", - " UnitTestCompleteness tab includes tests that are not present in test suite:" - ) + - "\n" + - Object.keys(spreadsheet.completeness).toString() - ); - } else { - console.log( - greenOk + - color( - "bright pass", - " Test suite suite contains all tests in UnitTestCompleteness tab." - ) - ); - } - delete spreadsheet.completeness; - // If all the tests in a tab are present, 'cross-off' tab by deleting. - for (const file in spreadsheet) { - if (_.isEmpty(spreadsheet[file])) { - delete spreadsheet[file]; - } - } - // If all tests are 'crossed-off', print success. - if (_.isEmpty(spreadsheet)) { - console.log( - "\n" + - greenOk + - color("bright pass", " Test suite contains all tests in spreadsheet.") - ); - } else { - // If not all tests are 'crossed-off', print the tests remaining. - console.log( - color( - "bright fail", - "\nTests missing from test suite (but included in spreadsheet):\n" - ) - ); - console.log(spreadsheet); - } - // Print all errors where executed tests did not match spreadsheet. - if (errs.length) { - console.log( - color( - "bright fail", - "\nTests missing from spreadsheet (but included in test suite): " - ) - ); - errs.map((err) => { - console.log("\n" + err); - }); - } else { - console.log( - "\n" + - greenOk + - color("bright pass", " Spreadsheet contains all tests in test suite.") - ); - } - }); -} - -// Helper function that takes in two strings and returns a color coded diff. -function getStringDiff(string1, string2) { - let diff = ""; - const diffList = jsdiff.diffChars(string1, string2); - diffList.map((part) => { - // green for additions, red for deletions, grey for common parts - const col = part.added ? "green" : part.removed ? "red" : "grey"; - diff += part.value[col]; - }); - return diff; -} diff --git a/yarn.lock b/yarn.lock index f5959f956..ba48bcf13 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,6 +7,11 @@ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== +"@adraffy/ens-normalize@1.10.1": + version "1.10.1" + resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz#63430d04bd8c5e74f8d7d049338f1cd9d4f02069" + integrity sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw== + "@babel/code-frame@7.12.11": version "7.12.11" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" @@ -21,60 +26,11 @@ dependencies: "@babel/highlight" "^7.22.5" -"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" - integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== - -"@babel/helper-compilation-targets@^7.22.6": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz#f9d0a7aaaa7cd32a3f31c9316a69f5a9bcacb892" - integrity sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw== - dependencies: - "@babel/compat-data" "^7.22.9" - "@babel/helper-validator-option" "^7.22.5" - browserslist "^4.21.9" - lru-cache "^5.1.1" - semver "^6.3.1" - -"@babel/helper-define-polyfill-provider@^0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.1.tgz#af1429c4a83ac316a6a8c2cc8ff45cb5d2998d3a" - integrity sha512-kX4oXixDxG197yhX+J3Wp+NpL2wuCFjWQAr6yX2jtCnflK9ulMI51ULFGIrWiX1jGfvAxdHp+XQCcP2bZGPs9A== - dependencies: - "@babel/helper-compilation-targets" "^7.22.6" - "@babel/helper-plugin-utils" "^7.22.5" - debug "^4.1.1" - lodash.debounce "^4.0.8" - resolve "^1.14.2" - -"@babel/helper-module-imports@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz#1a8f4c9f4027d23f520bd76b364d44434a72660c" - integrity sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-plugin-utils@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" - integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== - -"@babel/helper-string-parser@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" - integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== - "@babel/helper-validator-identifier@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== -"@babel/helper-validator-option@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" - integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== - "@babel/highlight@^7.10.4", "@babel/highlight@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" @@ -84,33 +40,103 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/plugin-transform-runtime@^7.5.5": - version "7.22.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.22.9.tgz#a87b11e170cbbfb018e6a2bf91f5c6e533b9e027" - integrity sha512-9KjBH61AGJetCPYp/IEyLEp47SyybZb0nDRpBvmtEkm+rUIwxdlKpyNHI1TmsGkeuLclJdleQHRZ8XLBnnh8CQ== +"@babel/runtime@^7.4.4": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.10.tgz#ae3e9631fd947cb7e3610d3e9d8fef5f76696682" + integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ== dependencies: - "@babel/helper-module-imports" "^7.22.5" - "@babel/helper-plugin-utils" "^7.22.5" - babel-plugin-polyfill-corejs2 "^0.4.4" - babel-plugin-polyfill-corejs3 "^0.8.2" - babel-plugin-polyfill-regenerator "^0.5.1" - semver "^6.3.1" + regenerator-runtime "^0.14.0" -"@babel/runtime@^7.5.5": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.6.tgz#57d64b9ae3cff1d67eb067ae117dac087f5bd438" - integrity sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ== +"@chainsafe/as-sha256@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz#3639df0e1435cab03f4d9870cc3ac079e57a6fc9" + integrity sha512-hldFFYuf49ed7DAakWVXSJODuq3pzJEguD8tQ7h+sGkM18vja+OFoJI9krnGmgzyuZC2ETX0NOIcCTy31v2Mtg== + +"@chainsafe/persistent-merkle-tree@^0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.4.2.tgz#4c9ee80cc57cd3be7208d98c40014ad38f36f7ff" + integrity sha512-lLO3ihKPngXLTus/L7WHKaw9PnNJWizlOF1H9NNzHP6Xvh82vzg9F2bzkXhYIFshMZ2gTCEz8tq6STe7r5NDfQ== dependencies: - regenerator-runtime "^0.13.11" + "@chainsafe/as-sha256" "^0.3.1" -"@babel/types@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe" - integrity sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA== +"@chainsafe/persistent-merkle-tree@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@chainsafe/persistent-merkle-tree/-/persistent-merkle-tree-0.5.0.tgz#2b4a62c9489a5739dedd197250d8d2f5427e9f63" + integrity sha512-l0V1b5clxA3iwQLXP40zYjyZYospQLZXzBVIhhr9kDg/1qHZfzzHw0jj4VPBijfYCArZDlPkRi1wZaV2POKeuw== dependencies: - "@babel/helper-string-parser" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" - to-fast-properties "^2.0.0" + "@chainsafe/as-sha256" "^0.3.1" + +"@chainsafe/ssz@^0.10.0": + version "0.10.2" + resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.10.2.tgz#c782929e1bb25fec66ba72e75934b31fd087579e" + integrity sha512-/NL3Lh8K+0q7A3LsiFq09YXS9fPE+ead2rr7vM2QK8PLzrNsw3uqrif9bpRX5UxgeRjM+vYi+boCM3+GM4ovXg== + dependencies: + "@chainsafe/as-sha256" "^0.3.1" + "@chainsafe/persistent-merkle-tree" "^0.5.0" + +"@chainsafe/ssz@^0.9.2": + version "0.9.4" + resolved "https://registry.yarnpkg.com/@chainsafe/ssz/-/ssz-0.9.4.tgz#696a8db46d6975b600f8309ad3a12f7c0e310497" + integrity sha512-77Qtg2N1ayqs4Bg/wvnWfg5Bta7iy7IRh8XqXh7oNMeP2HBbBwx8m6yTpA8p0EHItWPEBkgZd5S5/LSlp3GXuQ== + dependencies: + "@chainsafe/as-sha256" "^0.3.1" + "@chainsafe/persistent-merkle-tree" "^0.4.2" + case "^1.6.3" + +"@colors/colors@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" + integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@ensdomains/address-encoder@^0.1.7": + version "0.1.9" + resolved "https://registry.yarnpkg.com/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz#f948c485443d9ef7ed2c0c4790e931c33334d02d" + integrity sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg== + dependencies: + 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" + +"@ensdomains/ens@0.4.5": + version "0.4.5" + resolved "https://registry.yarnpkg.com/@ensdomains/ens/-/ens-0.4.5.tgz#e0aebc005afdc066447c6e22feb4eda89a5edbfc" + integrity sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw== + dependencies: + 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" + +"@ensdomains/ensjs@^2.0.1": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@ensdomains/ensjs/-/ensjs-2.1.0.tgz#0a7296c1f3d735ef019320d863a7846a0760c460" + integrity sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog== + dependencies: + "@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" + +"@ensdomains/resolver@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.2.4.tgz#c10fe28bf5efbf49bff4666d909aed0265efbc89" + integrity sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA== "@eslint/eslintrc@^0.4.3": version "0.4.3" @@ -135,7 +161,7 @@ crc-32 "^1.2.0" ethereumjs-util "^7.1.1" -"@ethereumjs/common@^2.4.0", "@ethereumjs/common@^2.5.0", "@ethereumjs/common@^2.6.4": +"@ethereumjs/common@^2.5.0": version "2.6.5" resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30" integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA== @@ -143,6 +169,11 @@ crc-32 "^1.2.0" ethereumjs-util "^7.1.5" +"@ethereumjs/rlp@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-4.0.1.tgz#626fabfd9081baab3d0a3074b0c7ecaf674aaa41" + integrity sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw== + "@ethereumjs/tx@3.3.2": version "3.3.2" resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.3.2.tgz#348d4624bf248aaab6c44fec2ae67265efe3db00" @@ -151,15 +182,16 @@ "@ethereumjs/common" "^2.5.0" ethereumjs-util "^7.1.2" -"@ethereumjs/tx@^3.3.0", "@ethereumjs/tx@^3.3.2": - version "3.5.2" - resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.2.tgz#197b9b6299582ad84f9527ca961466fce2296c1c" - integrity sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw== +"@ethereumjs/util@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/util/-/util-8.1.0.tgz#299df97fb6b034e0577ce9f94c7d9d1004409ed4" + integrity sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA== dependencies: - "@ethereumjs/common" "^2.6.4" - ethereumjs-util "^7.1.5" + "@ethereumjs/rlp" "^4.0.1" + ethereum-cryptography "^2.0.0" + micro-ftch "^0.3.1" -"@ethersproject/abi@^5.6.3": +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.0.9", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== @@ -174,7 +206,7 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@ethersproject/abstract-provider@^5.7.0": +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== @@ -187,7 +219,7 @@ "@ethersproject/transactions" "^5.7.0" "@ethersproject/web" "^5.7.0" -"@ethersproject/abstract-signer@^5.7.0": +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== @@ -198,7 +230,7 @@ "@ethersproject/logger" "^5.7.0" "@ethersproject/properties" "^5.7.0" -"@ethersproject/address@^5.7.0": +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== @@ -209,14 +241,22 @@ "@ethersproject/logger" "^5.7.0" "@ethersproject/rlp" "^5.7.0" -"@ethersproject/base64@^5.7.0": +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== dependencies: "@ethersproject/bytes" "^5.7.0" -"@ethersproject/bignumber@^5.7.0": +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== @@ -225,21 +265,37 @@ "@ethersproject/logger" "^5.7.0" bn.js "^5.2.1" -"@ethersproject/bytes@^5.7.0": +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/constants@^5.7.0": +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== dependencies: "@ethersproject/bignumber" "^5.7.0" -"@ethersproject/hash@^5.7.0": +"@ethersproject/contracts@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + 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" + +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== @@ -254,7 +310,44 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" -"@ethersproject/keccak256@^5.7.0": +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + 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" + +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + 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/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== @@ -262,26 +355,68 @@ "@ethersproject/bytes" "^5.7.0" js-sha3 "0.8.0" -"@ethersproject/logger@^5.7.0": +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== -"@ethersproject/networks@^5.7.0": +"@ethersproject/networks@5.7.1", "@ethersproject/networks@^5.7.0": version "5.7.1" resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6" integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ== dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/properties@^5.7.0": +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/rlp@^5.7.0": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": + version "5.7.2" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" + integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== + 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/random@5.7.0", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== @@ -289,7 +424,16 @@ "@ethersproject/bytes" "^5.7.0" "@ethersproject/logger" "^5.7.0" -"@ethersproject/signing-key@^5.7.0": +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + hash.js "1.1.7" + +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== @@ -301,7 +445,19 @@ elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/strings@^5.7.0": +"@ethersproject/solidity@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + 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" + +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== @@ -310,7 +466,7 @@ "@ethersproject/constants" "^5.7.0" "@ethersproject/logger" "^5.7.0" -"@ethersproject/transactions@^5.6.2", "@ethersproject/transactions@^5.7.0": +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.6.2", "@ethersproject/transactions@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== @@ -325,7 +481,37 @@ "@ethersproject/rlp" "^5.7.0" "@ethersproject/signing-key" "^5.7.0" -"@ethersproject/web@^5.7.0": +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/wallet@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + 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" + +"@ethersproject/web@5.7.1", "@ethersproject/web@^5.7.0": version "5.7.1" resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae" integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w== @@ -336,6 +522,22 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== + 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" + +"@fastify/busboy@^2.0.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff" + integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== + "@humanwhocodes/config-array@^0.5.0": version "0.5.0" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" @@ -350,10 +552,68 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@nicolo-ribaudo/semver-v6@^6.3.3": - version "6.3.3" - resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/semver-v6/-/semver-v6-6.3.3.tgz#ea6d23ade78a325f7a52750aab1526b02b628c29" - integrity sha512-3Yc1fUTs69MG/uZbJlLSI3JISMn2UV2rg+1D/vROUqZyh3l6iYHCs7GMp+M40ZD7yOdDbYjJcU1oTJhrc+dGKg== +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@metamask/eth-sig-util@^4.0.0": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" + integrity sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ== + 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" + +"@noble/curves@1.1.0", "@noble/curves@~1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d" + integrity sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA== + dependencies: + "@noble/hashes" "1.3.1" + +"@noble/curves@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" + integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== + dependencies: + "@noble/hashes" "1.3.2" + +"@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" + integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== + +"@noble/hashes@1.3.1", "@noble/hashes@~1.3.0", "@noble/hashes@~1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" + integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== + +"@noble/hashes@1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + +"@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" + integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -376,15 +636,383 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@nomicfoundation/ethereumjs-block@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-block/-/ethereumjs-block-5.0.2.tgz#13a7968f5964f1697da941281b7f7943b0465d04" + integrity sha512-hSe6CuHI4SsSiWWjHDIzWhSiAVpzMUcDRpWYzN0T9l8/Rz7xNn3elwVOJ/tAyS0LqL6vitUD78Uk7lQDXZun7Q== + dependencies: + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" + ethereum-cryptography "0.1.3" + ethers "^5.7.1" + +"@nomicfoundation/ethereumjs-blockchain@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-blockchain/-/ethereumjs-blockchain-7.0.2.tgz#45323b673b3d2fab6b5008535340d1b8fea7d446" + integrity sha512-8UUsSXJs+MFfIIAKdh3cG16iNmWzWC/91P40sazNvrqhhdR/RtGDlFk2iFTGbBAZPs2+klZVzhRX8m2wvuvz3w== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-ethash" "3.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" + 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" + +"@nomicfoundation/ethereumjs-common@4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-common/-/ethereumjs-common-4.0.2.tgz#a15d1651ca36757588fdaf2a7d381a150662a3c3" + integrity sha512-I2WGP3HMGsOoycSdOTSqIaES0ughQTueOsddJ36aYVpI3SN8YSusgRFLwzDJwRFVIYDKx/iJz0sQ5kBHVgdDwg== + dependencies: + "@nomicfoundation/ethereumjs-util" "9.0.2" + crc-32 "^1.2.0" + +"@nomicfoundation/ethereumjs-ethash@3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-ethash/-/ethereumjs-ethash-3.0.2.tgz#da77147f806401ee996bfddfa6487500118addca" + integrity sha512-8PfoOQCcIcO9Pylq0Buijuq/O73tmMVURK0OqdjhwqcGHYC2PwhbajDh7GZ55ekB0Px197ajK3PQhpKoiI/UPg== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" + abstract-level "^1.0.3" + bigint-crypto-utils "^3.0.23" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-evm@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-evm/-/ethereumjs-evm-2.0.2.tgz#4c2f4b84c056047102a4fa41c127454e3f0cfcf6" + integrity sha512-rBLcUaUfANJxyOx9HIdMX6uXGin6lANCulIm/pjMgRqfiCRMZie3WKYxTSd8ZE/d+qT+zTedBF4+VHTdTSePmQ== + dependencies: + "@ethersproject/providers" "^5.7.1" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/ethereumjs-rlp@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-rlp/-/ethereumjs-rlp-5.0.2.tgz#4fee8dc58a53ac6ae87fb1fca7c15dc06c6b5dea" + integrity sha512-QwmemBc+MMsHJ1P1QvPl8R8p2aPvvVcKBbvHnQOKBpBztEo0omN0eaob6FeZS/e3y9NSe+mfu3nNFBHszqkjTA== + +"@nomicfoundation/ethereumjs-statemanager@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-statemanager/-/ethereumjs-statemanager-2.0.2.tgz#3ba4253b29b1211cafe4f9265fee5a0d780976e0" + integrity sha512-dlKy5dIXLuDubx8Z74sipciZnJTRSV/uHG48RSijhgm1V7eXYFC567xgKtsKiVZB1ViTP9iFL4B6Je0xD6X2OA== + dependencies: + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + ethers "^5.7.1" + js-sdsl "^4.1.4" + +"@nomicfoundation/ethereumjs-trie@6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-trie/-/ethereumjs-trie-6.0.2.tgz#9a6dbd28482dca1bc162d12b3733acab8cd12835" + integrity sha512-yw8vg9hBeLYk4YNg5MrSJ5H55TLOv2FSWUTROtDtTMMmDGROsAu+0tBjiNGTnKRi400M6cEzoFfa89Fc5k8NTQ== + dependencies: + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" + "@types/readable-stream" "^2.3.13" + ethereum-cryptography "0.1.3" + readable-stream "^3.6.0" + +"@nomicfoundation/ethereumjs-tx@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-tx/-/ethereumjs-tx-5.0.2.tgz#117813b69c0fdc14dd0446698a64be6df71d7e56" + integrity sha512-T+l4/MmTp7VhJeNloMkM+lPU3YMUaXdcXgTGCf8+ZFvV9NYZTRLFekRwlG6/JMmVfIfbrW+dRRJ9A6H5Q/Z64g== + dependencies: + "@chainsafe/ssz" "^0.9.2" + "@ethersproject/providers" "^5.7.2" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-util@9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-util/-/ethereumjs-util-9.0.2.tgz#16bdc1bb36f333b8a3559bbb4b17dac805ce904d" + integrity sha512-4Wu9D3LykbSBWZo8nJCnzVIYGvGCuyiYLIJa9XXNVt1q1jUzHdB+sJvx95VGCpPkCT+IbLecW6yfzy3E1bQrwQ== + dependencies: + "@chainsafe/ssz" "^0.10.0" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + ethereum-cryptography "0.1.3" + +"@nomicfoundation/ethereumjs-vm@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/ethereumjs-vm/-/ethereumjs-vm-7.0.2.tgz#3b0852cb3584df0e18c182d0672a3596c9ca95e6" + integrity sha512-Bj3KZT64j54Tcwr7Qm/0jkeZXJMfdcAtRBedou+Hx0dPOSIgqaIr0vvLwP65TpHbak2DmAq+KJbW2KNtIoFwvA== + dependencies: + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-blockchain" "7.0.2" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-evm" "2.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-statemanager" "2.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" + debug "^4.3.3" + ethereum-cryptography "0.1.3" + mcl-wasm "^0.7.1" + rustbn.js "~0.2.0" + +"@nomicfoundation/hardhat-chai-matchers@2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.2.tgz#a0e5dbca43ba9560c096da162c0e3245303479d1" + integrity sha512-9Wu9mRtkj0U9ohgXYFbB/RQDa+PcEdyBm2suyEtsJf3PqzZEEjLUZgWnMjlFhATMk/fp3BjmnYVPrwl+gr8oEw== + dependencies: + "@types/chai-as-promised" "^7.1.3" + chai-as-promised "^7.1.1" + deep-eql "^4.0.1" + ordinal "^1.0.3" + +"@nomicfoundation/hardhat-ethers@3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.4.tgz#6f0df2424e687e26d6574610de7a36bd69485cc1" + integrity sha512-k9qbLoY7qn6C6Y1LI0gk2kyHXil2Tauj4kGzQ8pgxYXIGw8lWn8tuuL72E11CrlKaXRUvOgF0EXrv/msPI2SbA== + dependencies: + debug "^4.1.1" + lodash.isequal "^4.5.0" + +"@nomicfoundation/hardhat-foundry@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-foundry/-/hardhat-foundry-1.1.1.tgz#db72b1f33f9cfaecc27e67f69ad436f8710162d6" + integrity sha512-cXGCBHAiXas9Pg9MhMOpBVQCkWRYoRFG7GJJAph+sdQsfd22iRs5U5Vs9XmpGEQd1yEvYISQZMeE68Nxj65iUQ== + dependencies: + chalk "^2.4.2" + +"@nomicfoundation/hardhat-network-helpers@1.0.8": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.8.tgz#e4fe1be93e8a65508c46d73c41fa26c7e9f84931" + integrity sha512-MNqQbzUJZnCMIYvlniC3U+kcavz/PhhQSsY90tbEtUyMj/IQqsLwIRZa4ctjABh3Bz0KCh9OXUZ7Yk/d9hr45Q== + dependencies: + ethereumjs-util "^7.1.4" + +"@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-arm64/-/solidity-analyzer-darwin-arm64-0.1.1.tgz#4c858096b1c17fe58a474fe81b46815f93645c15" + integrity sha512-KcTodaQw8ivDZyF+D76FokN/HdpgGpfjc/gFCImdLUyqB6eSWVaZPazMbeAjmfhx3R0zm/NYVzxwAokFKgrc0w== + +"@nomicfoundation/solidity-analyzer-darwin-x64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-darwin-x64/-/solidity-analyzer-darwin-x64-0.1.1.tgz#6e25ccdf6e2d22389c35553b64fe6f3fdaec432c" + integrity sha512-XhQG4BaJE6cIbjAVtzGOGbK3sn1BO9W29uhk9J8y8fZF1DYz0Doj8QDMfpMu+A6TjPDs61lbsmeYodIDnfveSA== + +"@nomicfoundation/solidity-analyzer-freebsd-x64@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-freebsd-x64/-/solidity-analyzer-freebsd-x64-0.1.1.tgz#0a224ea50317139caeebcdedd435c28a039d169c" + integrity sha512-GHF1VKRdHW3G8CndkwdaeLkVBi5A9u2jwtlS7SLhBc8b5U/GcoL39Q+1CSO3hYqePNP+eV5YI7Zgm0ea6kMHoA== + +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-gnu/-/solidity-analyzer-linux-arm64-gnu-0.1.1.tgz#dfa085d9ffab9efb2e7b383aed3f557f7687ac2b" + integrity sha512-g4Cv2fO37ZsUENQ2vwPnZc2zRenHyAxHcyBjKcjaSmmkKrFr64yvzeNO8S3GBFCo90rfochLs99wFVGT/0owpg== + +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-arm64-musl/-/solidity-analyzer-linux-arm64-musl-0.1.1.tgz#c9e06b5d513dd3ab02a7ac069c160051675889a4" + integrity sha512-WJ3CE5Oek25OGE3WwzK7oaopY8xMw9Lhb0mlYuJl/maZVo+WtP36XoQTb7bW/i8aAdHW5Z+BqrHMux23pvxG3w== + +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-gnu/-/solidity-analyzer-linux-x64-gnu-0.1.1.tgz#8d328d16839e52571f72f2998c81e46bf320f893" + integrity sha512-5WN7leSr5fkUBBjE4f3wKENUy9HQStu7HmWqbtknfXkkil+eNWiBV275IOlpXku7v3uLsXTOKpnnGHJYI2qsdA== + +"@nomicfoundation/solidity-analyzer-linux-x64-musl@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-linux-x64-musl/-/solidity-analyzer-linux-x64-musl-0.1.1.tgz#9b49d0634b5976bb5ed1604a1e1b736f390959bb" + integrity sha512-KdYMkJOq0SYPQMmErv/63CwGwMm5XHenEna9X9aB8mQmhDBrYrlAOSsIPgFCUSL0hjxE3xHP65/EPXR/InD2+w== + +"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-arm64-msvc/-/solidity-analyzer-win32-arm64-msvc-0.1.1.tgz#e2867af7264ebbcc3131ef837878955dd6a3676f" + integrity sha512-VFZASBfl4qiBYwW5xeY20exWhmv6ww9sWu/krWSesv3q5hA0o1JuzmPHR4LPN6SUZj5vcqci0O6JOL8BPw+APg== + +"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-ia32-msvc/-/solidity-analyzer-win32-ia32-msvc-0.1.1.tgz#0685f78608dd516c8cdfb4896ed451317e559585" + integrity sha512-JnFkYuyCSA70j6Si6cS1A9Gh1aHTEb8kOTBApp/c7NRTFGNMH8eaInKlyuuiIbvYFhlXW4LicqyYuWNNq9hkpQ== + +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer-win32-x64-msvc/-/solidity-analyzer-win32-x64-msvc-0.1.1.tgz#c9a44f7108646f083b82e851486e0f6aeb785836" + integrity sha512-HrVJr6+WjIXGnw3Q9u6KQcbZCtk0caVWhCdFADySvRyUxJ8PnzlaP+MhwNE8oyT8OZ6ejHBRrrgjSqDCFXGirw== + +"@nomicfoundation/solidity-analyzer@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@nomicfoundation/solidity-analyzer/-/solidity-analyzer-0.1.1.tgz#f5f4d36d3f66752f59a57e7208cd856f3ddf6f2d" + integrity sha512-1LMtXj1puAxyFusBgUIy5pZk3073cNXYnXUpuNKFghHbIit/xZgbk0AokpUADbNm3gyD6bFWl3LRFh3dhVdREg== + 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" + +"@nomiclabs/hardhat-truffle5@2.0.7": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-truffle5/-/hardhat-truffle5-2.0.7.tgz#7519eadd2c6c460c2addc3d4d6efda7a8883361e" + integrity sha512-Pw8451IUZp1bTp0QqCHCYfCHs66sCnyxPcaorapu9mfOV9xnZsVaFdtutnhNEiXdiZwbed7LFKpRsde4BjFwig== + 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" + +"@nomiclabs/hardhat-web3@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-web3/-/hardhat-web3-2.0.0.tgz#2d9850cb285a2cebe1bd718ef26a9523542e52a9" + integrity sha512-zt4xN+D+fKl3wW2YlTX3k9APR3XZgPkxJYf36AcliJn3oujnKEVRZaHu0PhgLjO+gR+F/kiYayo9fgd2L8970Q== + dependencies: + "@types/bignumber.js" "^5.0.0" + +"@nomiclabs/truffle-contract@^4.2.23": + version "4.5.10" + resolved "https://registry.yarnpkg.com/@nomiclabs/truffle-contract/-/truffle-contract-4.5.10.tgz#52adcca1068647e1c2b44bf0e6a89fc4ad7f9213" + integrity sha512-nF/6InFV+0hUvutyFgsdOMCoYlr//2fJbRER4itxYtQtc4/O1biTwZIKRu+5l2J5Sq6LU2WX7vZHtDgQdhWxIQ== + 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" + "@openzeppelin/contracts@^3.1.0": version "3.4.2" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.2.tgz#d81f786fda2871d1eb8a8c5a73e455753ba53527" integrity sha512-z0zMCjyhhp4y7XKAcDAi3Vgms4T2PstwBdahiO0+9NaGICQKjynK3wduSRplTgk4LXmoO1yfDGO5RbjKYxtuxA== -"@sindresorhus/is@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" - integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== +"@scure/base@~1.1.0": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938" + integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA== + +"@scure/bip32@1.1.5": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.5.tgz#d2ccae16dcc2e75bc1d75f5ef3c66a338d1ba300" + integrity sha512-XyNh1rB0SkEqd3tXcXMi+Xe1fvg+kUIcoRIEujP1Jgv7DqW2r9lg3Ah0NkFaCs9sTkQAQA8kw7xiRXzENi9Rtw== + dependencies: + "@noble/hashes" "~1.2.0" + "@noble/secp256k1" "~1.7.0" + "@scure/base" "~1.1.0" + +"@scure/bip32@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.1.tgz#7248aea723667f98160f593d621c47e208ccbb10" + integrity sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A== + dependencies: + "@noble/curves" "~1.1.0" + "@noble/hashes" "~1.3.1" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.1.tgz#b54557b2e86214319405db819c4b6a370cf340c5" + integrity sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg== + dependencies: + "@noble/hashes" "~1.2.0" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.1.tgz#5cee8978656b272a917b7871c981e0541ad6ac2a" + integrity sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg== + dependencies: + "@noble/hashes" "~1.3.0" + "@scure/base" "~1.1.0" + +"@sentry/core@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" + integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== + 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" + +"@sentry/hub@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" + integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== + dependencies: + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/minimal@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" + integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sentry/node@^5.18.1": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" + integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== + 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" + +"@sentry/tracing@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" + integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== + 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" + +"@sentry/types@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" + integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== + +"@sentry/utils@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" + integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== + dependencies: + "@sentry/types" "5.30.0" + tslib "^1.9.3" "@sindresorhus/is@^4.0.0", "@sindresorhus/is@^4.6.0": version "4.6.0" @@ -405,18 +1033,16 @@ dependencies: antlr4ts "^0.5.0-alpha.4" +"@solidity-parser/parser@^0.18.0": + version "0.18.0" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.18.0.tgz#8e77a02a09ecce957255a2f48c9a7178ec191908" + integrity sha512-yfORGUIPgLck41qyN7nbwJRAx17/jAIXCTanHOJZhB6PJ1iAk/84b/xlsVKFSyNyLXIj0dhppoE0+CRws7wlzA== + "@solidity-parser/parser@^0.6.2": version "0.6.2" resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.6.2.tgz#49707fc4e06649d39d6b25bdab2e9093d372ce50" integrity sha512-kUVUvrqttndeprLoXjI5arWHeiP3uh4XODAKbG+ZaWHCVQeelxCbnXBeWxZ2BPHdXgH0xR9dU1b916JhDhbgAA== -"@szmarczak/http-timer@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" - integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== - dependencies: - defer-to-connect "^1.0.1" - "@szmarczak/http-timer@^4.0.5": version "4.0.6" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" @@ -431,26 +1057,75 @@ dependencies: defer-to-connect "^2.0.1" -"@truffle/error@^0.1.1": +"@truffle/abi-utils@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-1.0.2.tgz#41210b234912051433960382af009f339f8a9642" + integrity sha512-MefEcxsBlprKIpfW7eh2I5zJqlWM18xk3duL7SW4VhIs6kNEec//hCpEDoE6P0m7GjqY3vk8X4vnf4aLlZkRcA== + dependencies: + change-case "3.0.2" + fast-check "3.1.1" + web3-utils "1.10.0" + +"@truffle/blockchain-utils@^0.1.3": + version "0.1.8" + resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.1.8.tgz#0c1a369aa72f51df5af095678803242ea0a0d6ae" + integrity sha512-ZskpYDNHkXD3ota4iU3pZz6kLth87RC+wDn66Rp2Or+DqqJCKdnmS9GDctBi1EcMPDEi0BqpkdrfBuzA9uIkGg== + +"@truffle/codec@^0.17.2": + version "0.17.2" + resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.17.2.tgz#52a3604f73b89964373eec945f20d5cd0f4244d4" + integrity sha512-n9HX8R5a5+/j6Y0+lqSzIyU1cUxTRYn/xEWp0Qc1b0Vtltad7wvVh+KLGvbm/KQEX3o1RK1xRIUN2E0QlDeQnA== + dependencies: + "@truffle/abi-utils" "^1.0.2" + "@truffle/compile-common" "^0.9.7" + big.js "^6.0.3" + bn.js "^5.1.3" + cbor "^5.2.0" + debug "^4.3.1" + lodash "^4.17.21" + semver "7.5.2" + utf8 "^3.0.0" + web3-utils "1.10.0" + +"@truffle/compile-common@^0.9.7": + version "0.9.7" + resolved "https://registry.yarnpkg.com/@truffle/compile-common/-/compile-common-0.9.7.tgz#e8ba6cd49c4d4e7ae4684ba453fb9b2dcd09b347" + integrity sha512-TXuVLc5yJ/A0bSWw5OWIdXmcyaPpj3TJQ60ki7w9cIuW65Bazw7P4FRPaVNjR9YGe1FLYJ36GSdd9V3egPbzCg== + dependencies: + "@truffle/error" "^0.2.1" + colors "1.4.0" + +"@truffle/contract-schema@^3.4.7": + version "3.4.15" + resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.4.15.tgz#199789b3f0a61b0e564ee8d62d7a7e5a8e6b749f" + integrity sha512-m13e1VlXEdxiXiqv/SmPlqbdtcuhjwIGTICm+JCEO8nt0NYBbdMC2paNkpUvGz9lK139JxIupMHctEV4vgkldw== + dependencies: + ajv "^6.10.0" + debug "^4.3.1" + +"@truffle/debug-utils@^6.0.22": + version "6.0.56" + resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-6.0.56.tgz#7727891580c52cc9acfbe46d43ca4ef9aa338713" + integrity sha512-tCB0nKZirWlQp+0JqqaBxZk7CIwDBIHl8Q9CyGJZA4pdAwKHHMI3FoPAXzubP7X0YuICeQsAmpOAXzOHGYGkjg== + dependencies: + "@truffle/codec" "^0.17.2" + "@trufflesuite/chromafi" "^3.0.0" + bn.js "^5.1.3" + chalk "^2.4.2" + debug "^4.3.1" + highlightjs-solidity "^2.0.6" + +"@truffle/error@^0.1.0": version "0.1.1" resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.1.1.tgz#e52026ac8ca7180d83443dca73c03e07ace2a301" integrity sha512-sE7c9IHIGdbK4YayH4BC8i8qMjoAOeg6nUXUDZZp8wlU21/EMpaG+CLx+KqcIPyR+GSWIW3Dm0PXkr2nlggFDA== -"@truffle/hdwallet-provider@^1.0.39": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@truffle/hdwallet-provider/-/hdwallet-provider-1.7.0.tgz#5cfa8bc67c2a30b3943d3dab78f74c6a191cde02" - integrity sha512-nT7BPJJ2jPCLJc5uZdVtRnRMny5he5d3kO9Hi80ZSqe5xlnK905grBptM/+CwOfbeqHKQirI1btwm6r3wIBM8A== - dependencies: - "@ethereumjs/common" "^2.4.0" - "@ethereumjs/tx" "^3.3.0" - "@trufflesuite/web3-provider-engine" "15.0.14" - eth-sig-util "^3.0.1" - ethereum-cryptography "^0.1.3" - ethereum-protocol "^1.0.1" - ethereumjs-util "^6.1.0" - ethereumjs-wallet "^1.0.1" +"@truffle/error@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.2.1.tgz#71bb8e777a832e0cfe09a8638a70a5177aad8628" + integrity sha512-5Qy+z9dg9hP37WNdLnXH4b9MzemWrjTufRq7/DTKqimjyxCP/1zlL8gQEMdiSx1BBtAZz0xypkID/jb7AF/Osg== -"@truffle/interface-adapter@^0.5.25": +"@truffle/interface-adapter@^0.5.16": version "0.5.35" resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.35.tgz#f0eb1c4a2803190ca249143f545029a8b641fe96" integrity sha512-B5gtJnvsum5j2do393n0UfCT8MklrlAZxuqvEFBeMM9UKnreYct0/D368FVMlZwWo1N50HgGeZ0hlpSJqR/nvg== @@ -459,98 +1134,68 @@ ethers "^4.0.32" web3 "1.10.0" -"@truffle/provider@^0.2.24": - version "0.2.64" - resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.64.tgz#7dd55117307fd019dcf81d08db5dc2bc5728f51c" - integrity sha512-ZwPsofw4EsCq/2h0t73SPnnFezu4YQWBmK4FxFaOUX0F+o8NsZuHKyfJzuZwyZbiktYmefM3yD9rM0Dj4BhNbw== +"@trufflesuite/chromafi@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz#f6956408c1af6a38a6ed1657783ce59504a1eb8b" + integrity sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ== + 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" + +"@tsconfig/node10@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" + integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + +"@typechain/ethers-v6@^0.4.0": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v6/-/ethers-v6-0.4.3.tgz#badd99f88d5a1f1a2f42590f298e20cc62618e59" + integrity sha512-TrxBsyb4ryhaY9keP6RzhFCviWYApcLCIRMPyWaKp2cZZrfaM3QBoxXTnw/eO4+DAY3l+8O0brNW0WgeQeOiDA== dependencies: - "@truffle/error" "^0.1.1" - "@truffle/interface-adapter" "^0.5.25" - debug "^4.3.1" - web3 "1.7.4" - -"@trufflesuite/eth-json-rpc-filters@^4.1.2-1": - version "4.1.2-1" - resolved "https://registry.yarnpkg.com/@trufflesuite/eth-json-rpc-filters/-/eth-json-rpc-filters-4.1.2-1.tgz#61ab78c52e98a883e5cf086925b34a30297b1824" - integrity sha512-/MChvC5dw2ck9NU1cZmdovCz2VKbOeIyR4tcxDvA5sT+NaL0rA2/R5U0yI7zsbo1zD+pgqav77rQHTzpUdDNJQ== - dependencies: - "@trufflesuite/eth-json-rpc-middleware" "^4.4.2-0" - await-semaphore "^0.1.3" - eth-query "^2.1.2" - json-rpc-engine "^5.1.3" - lodash.flatmap "^4.5.0" - safe-event-emitter "^1.0.1" - -"@trufflesuite/eth-json-rpc-infura@^4.0.3-0": - version "4.0.3-0" - resolved "https://registry.yarnpkg.com/@trufflesuite/eth-json-rpc-infura/-/eth-json-rpc-infura-4.0.3-0.tgz#6d22122937cf60ec9d21a02351c101fdc608c4fe" - integrity sha512-xaUanOmo0YLqRsL0SfXpFienhdw5bpQ1WEXxMTRi57az4lwpZBv4tFUDvcerdwJrxX9wQqNmgUgd1BrR01dumw== - dependencies: - "@trufflesuite/eth-json-rpc-middleware" "^4.4.2-1" - cross-fetch "^2.1.1" - eth-json-rpc-errors "^1.0.1" - json-rpc-engine "^5.1.3" - -"@trufflesuite/eth-json-rpc-middleware@^4.4.2-0", "@trufflesuite/eth-json-rpc-middleware@^4.4.2-1": - version "4.4.2-1" - resolved "https://registry.yarnpkg.com/@trufflesuite/eth-json-rpc-middleware/-/eth-json-rpc-middleware-4.4.2-1.tgz#8c3638ed8a7ed89a1e5e71407de068a65bef0df2" - integrity sha512-iEy9H8ja7/8aYES5HfrepGBKU9n/Y4OabBJEklVd/zIBlhCCBAWBqkIZgXt11nBXO/rYAeKwYuE3puH3ByYnLA== - dependencies: - "@trufflesuite/eth-sig-util" "^1.4.2" - btoa "^1.2.1" - clone "^2.1.1" - eth-json-rpc-errors "^1.0.1" - eth-query "^2.1.2" - ethereumjs-block "^1.6.0" - ethereumjs-tx "^1.3.7" - ethereumjs-util "^5.1.2" - ethereumjs-vm "^2.6.0" - fetch-ponyfill "^4.0.0" - json-rpc-engine "^5.1.3" - json-stable-stringify "^1.0.1" - pify "^3.0.0" - safe-event-emitter "^1.0.1" - -"@trufflesuite/eth-sig-util@^1.4.2": - version "1.4.2" - resolved "https://registry.yarnpkg.com/@trufflesuite/eth-sig-util/-/eth-sig-util-1.4.2.tgz#b529e2f38ac08e652116f48981132a26242a4f08" - integrity sha512-+GyfN6b0LNW77hbQlH3ufZ/1eCON7mMrGym6tdYf7xiNw9Vv3jBO72bmmos1EId2NgBvPMhmYYm6DSLQFTmzrA== + lodash "^4.17.15" + ts-essentials "^7.0.1" + +"@typechain/hardhat@^9.0.0": + version "9.0.0" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-9.0.0.tgz#c92d562566db9b933ac6899c0a0a2ae1871ad5c1" + integrity sha512-oCGRvcsryRHEDZ4KO2lenB7wdf8WMDS+f9KGcRFiQWcRLpWWD0ruBGRxNjzkTqyPLtgQ9MvZsXquAFPEw7gAEA== dependencies: - ethereumjs-abi "^0.6.8" - ethereumjs-util "^5.1.1" - -"@trufflesuite/web3-provider-engine@15.0.14": - version "15.0.14" - resolved "https://registry.yarnpkg.com/@trufflesuite/web3-provider-engine/-/web3-provider-engine-15.0.14.tgz#8f9696f434585cc0ab2e57c312090c1f138bc471" - integrity sha512-6/LoWvNMxYf0oaYzJldK2a9AdnkAdIeJhHW4nuUBAeO29eK9xezEaEYQ0ph1QRTaICxGxvn+1Azp4u8bQ8NEZw== - dependencies: - "@ethereumjs/tx" "^3.3.0" - "@trufflesuite/eth-json-rpc-filters" "^4.1.2-1" - "@trufflesuite/eth-json-rpc-infura" "^4.0.3-0" - "@trufflesuite/eth-json-rpc-middleware" "^4.4.2-1" - "@trufflesuite/eth-sig-util" "^1.4.2" - 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-errors "^2.0.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" - -"@typechain/truffle-v5@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@typechain/truffle-v5/-/truffle-v5-2.0.2.tgz#709a78ffb120f52c693818fea72e0b0d146c3454" - integrity sha512-g4N2kfol1S3g/QUkmpzukCGZiKWUdXsSms1be/+W4+R0DPMz1Q/76tY+C6bD7G/KeLhkiDKcnZFmNVNcAgjIfQ== + fs-extra "^9.1.0" + +"@typechain/truffle-v5@^8.0.6": + version "8.0.6" + resolved "https://registry.yarnpkg.com/@typechain/truffle-v5/-/truffle-v5-8.0.6.tgz#59019bbf990efca699c0fe6fb81ec9ab68e32757" + integrity sha512-0G8rAQVpJcW2rCJUMBfq/D4FxWk3sBwxzywUYQc0vngV514Yv1JtU8L3W0lNjXoDRjABdNzksrZ0He6IcxFDpw== + dependencies: + lodash "^4.17.15" + +"@types/bignumber.js@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@types/bignumber.js/-/bignumber.js-5.0.0.tgz#d9f1a378509f3010a3255e9cc822ad0eeb4ab969" + integrity sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA== + dependencies: + bignumber.js "*" "@types/bn.js@^4.11.3": version "4.11.6" @@ -576,11 +1221,25 @@ "@types/node" "*" "@types/responselike" "^1.0.0" -"@types/chai@^4.2.11": +"@types/chai-as-promised@^7.1.3": + version "7.1.5" + resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz#6e016811f6c7a64f2eed823191c3a6955094e255" + integrity sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ== + dependencies: + "@types/chai" "*" + +"@types/chai@*", "@types/chai@4.3.5", "@types/chai@^4.2.0": version "4.3.5" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.5.tgz#ae69bcbb1bebb68c4ac0b11e9d8ed04526b3562b" integrity sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng== +"@types/concat-stream@^1.6.0": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" + integrity sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA== + dependencies: + "@types/node" "*" + "@types/eslint-visitor-keys@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" @@ -593,6 +1252,13 @@ dependencies: "@types/node" "*" +"@types/form-data@0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" + integrity sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw== + dependencies: + "@types/node" "*" + "@types/glob@^7.1.1": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" @@ -628,33 +1294,51 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.195.tgz#bafc975b252eb6cea78882ce8a7b6bf22a6de632" integrity sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg== +"@types/lru-cache@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" + integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== + "@types/minimatch@*": version "5.1.2" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== -"@types/mkdirp@^0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" - integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg== - dependencies: - "@types/node" "*" - -"@types/mocha@^8.0.0": - version "8.2.3" - resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-8.2.3.tgz#bbeb55fbc73f28ea6de601fbfa4613f58d785323" - integrity sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw== +"@types/mocha@10.0.1": + version "10.0.1" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.1.tgz#2f4f65bb08bc368ac39c96da7b2f09140b26851b" + integrity sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q== "@types/node@*": version "20.4.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.2.tgz#129cc9ae69f93824f92fac653eebfb4812ab4af9" integrity sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw== +"@types/node@18.15.13": + version "18.15.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469" + integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== + +"@types/node@20.5.1": + version "20.5.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.5.1.tgz#178d58ee7e4834152b0e8b4d30cbfab578b9bb30" + integrity sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg== + +"@types/node@^10.0.3": + version "10.17.60" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" + integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== + "@types/node@^12.12.6": version "12.20.55" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== +"@types/node@^8.0.0": + version "8.10.66" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" + integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== + "@types/pbkdf2@^3.0.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" @@ -662,17 +1346,23 @@ dependencies: "@types/node" "*" -"@types/prettier@^1.13.2": - version "1.19.1" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" - integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ== +"@types/prettier@^2.1.1": + version "2.7.3" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f" + integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== + +"@types/qs@^6.2.31": + version "6.9.7" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" + integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== -"@types/resolve@^0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" - integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== +"@types/readable-stream@^2.3.13": + version "2.3.15" + resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-2.3.15.tgz#3d79c9ceb1b6a57d5f6e6976f489b9b5384321ae" + integrity sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ== dependencies: "@types/node" "*" + safe-buffer "~5.1.1" "@types/responselike@^1.0.0": version "1.0.0" @@ -758,31 +1448,23 @@ abbrev@1.0.x: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" integrity sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q== -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - abortcontroller-polyfill@^1.7.3: version "1.7.5" resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz#6738495f4e901fbb57b6c0611d0c75f76c485bed" integrity sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ== -abstract-leveldown@~2.6.0: - version "2.6.3" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8" - integrity sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA== - dependencies: - xtend "~4.0.0" - -abstract-leveldown@~2.7.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" - integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== +abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" + integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA== dependencies: - xtend "~4.0.0" + 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" accepts@~1.3.8: version "1.3.8" @@ -797,25 +1479,35 @@ acorn-jsx@^5.3.1: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -address@^1.0.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/address/-/address-1.2.2.tgz#2b5248dac5485a6390532c6a517fda2e3faac89e" - integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA== +acorn@^8.4.1: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + +adm-zip@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== aes-js@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== -aes-js@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" - integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== +aes-js@4.0.0-beta.5: + version "4.0.0-beta.5" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873" + integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q== agent-base@6: version "6.0.2" @@ -824,6 +1516,14 @@ agent-base@6: dependencies: debug "4" +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -849,6 +1549,11 @@ amdefine@>=0.0.4: resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" integrity sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg== +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== + ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -859,6 +1564,18 @@ ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== + ansi-regex@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" @@ -898,7 +1615,7 @@ antlr4ts@^0.5.0-alpha.4: resolved "https://registry.yarnpkg.com/antlr4ts/-/antlr4ts-0.5.0-alpha.4.tgz#71702865a87478ed0b40c0709f422cf14d51652a" integrity sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ== -anymatch@~3.1.1: +anymatch@~3.1.1, anymatch@~3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== @@ -906,11 +1623,6 @@ anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" -app-module-path@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/app-module-path/-/app-module-path-2.2.0.tgz#641aa55dfb7d6a6f0a8141c4b9c0aa50b6c24dd5" - integrity sha512-gkco+qxENJV+8vFcDiiFhuoSvRXb2a/QPqpSoWhVz829VNJfOTnELbBmPmNKFxf3xdNnw4DWCkzkDaavcX/1YQ== - arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -928,19 +1640,15 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -array-back@^1.0.3, array-back@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" - integrity sha512-1WxbZvrmyhkNoeYcizokbmh5oiOCIfyvGtcqbK3Ls1v1fKcquzxnQSceOx6tzq7jmai2kFLWIpGND2cLhH6TPw== - dependencies: - typical "^2.6.0" +array-back@^3.0.1, array-back@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" + integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== -array-back@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022" - integrity sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw== - dependencies: - typical "^2.6.1" +array-back@^4.0.1, array-back@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" + integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== array-buffer-byte-length@^1.0.0: version "1.0.0" @@ -971,6 +1679,11 @@ array-union@^2.1.0: resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +array-uniq@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q== + array.prototype.flat@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" @@ -991,10 +1704,10 @@ array.prototype.flatmap@^1.3.1: es-abstract "^1.20.4" es-shim-unscopables "^1.0.0" -array.prototype.map@^1.0.1: +array.prototype.reduce@^1.0.5: version "1.0.5" - resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.5.tgz#6e43c2fee6c0fb5e4806da2dc92eb00970809e55" - integrity sha512-gfaKntvwqYIuC7mLLyv2wzZIJqrRhn5PZ9EfFejSx6a78sV7iDsGpG9P+3oUPtm1Rerqm6nrKS4FYuTIvWfo3g== + resolved "https://registry.yarnpkg.com/array.prototype.reduce/-/array.prototype.reduce-1.0.5.tgz#6b20b0daa9d9734dd6bc7ea66b5bbce395471eac" + integrity sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q== dependencies: call-bind "^1.0.2" define-properties "^1.1.4" @@ -1014,20 +1727,10 @@ arraybuffer.prototype.slice@^1.0.1: is-array-buffer "^3.0.2" is-shared-array-buffer "^1.0.2" -arrify@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" - integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== - -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" +asap@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== asn1@~0.2.3: version "0.2.6" @@ -1064,45 +1767,31 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -async-eventemitter@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" - integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== - dependencies: - async "^2.4.0" - async-limiter@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== -async@1.x, async@^1.4.2: +async@1.x: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" integrity sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w== -async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0: - version "2.6.4" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" - integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== - dependencies: - lodash "^4.17.14" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + available-typed-arrays@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== -await-semaphore@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/await-semaphore/-/await-semaphore-0.1.3.tgz#2b88018cc8c28e06167ae1cdff02504f1f9688d3" - integrity sha512-d1W2aNSYcz/sxYO4pMGX9vq65qOTu0P800epMud+6cYYX0QcT7zyqcxec3VWzpgvdXo57UWmVbZpLMjX2m1I7Q== - aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -1113,37 +1802,6 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== -babel-plugin-polyfill-corejs2@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.4.tgz#9f9a0e1cd9d645cc246a5e094db5c3aa913ccd2b" - integrity sha512-9WeK9snM1BfxB38goUEv2FLnA6ja07UMfazFHzCXUb3NyDZAwfXvQiURQ6guTTMeHcOsdknULm1PDhs4uWtKyA== - dependencies: - "@babel/compat-data" "^7.22.6" - "@babel/helper-define-polyfill-provider" "^0.4.1" - "@nicolo-ribaudo/semver-v6" "^6.3.3" - -babel-plugin-polyfill-corejs3@^0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.2.tgz#d406c5738d298cd9c66f64a94cf8d5904ce4cc5e" - integrity sha512-Cid+Jv1BrY9ReW9lIfNlNpsI53N+FN7gE+f73zLAUbr9C52W4gKLWSByx47pfDJsEysojKArqOtOKZSVIIUTuQ== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.4.1" - core-js-compat "^3.31.0" - -babel-plugin-polyfill-regenerator@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.1.tgz#ace7a5eced6dff7d5060c335c52064778216afd3" - integrity sha512-L8OyySuI6OSQ5hFy9O+7zFjyr4WhAfRjLIOkhQGYl+emwJkd/S4XXT1JpfrgR1jrQ1NcGiOh+yAdGlF8pnC3Jw== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.4.1" - -backoff@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" - integrity sha512-wC5ihrnUXmR2douXmXLCe5O3zg3GKIyvRi/hi58a/XyRxVI+3/yM0PYueQOZXPXQ9pxBislYkw+sF9b7C/RuMA== - dependencies: - precond "0.2" - balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1156,7 +1814,7 @@ base-x@^3.0.2, base-x@^3.0.8: dependencies: safe-buffer "^5.0.1" -base64-js@^1.3.0, base64-js@^1.3.1: +base64-js@^1.3.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -1168,11 +1826,36 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -bignumber.js@^9.0.0: +bech32@1.1.4, bech32@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + +big-integer@1.6.36: + version "1.6.36" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" + integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg== + +big.js@^6.0.3: + version "6.2.1" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.2.1.tgz#7205ce763efb17c2e41f26f121c420c6a7c2744f" + integrity sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ== + +bigint-crypto-utils@^3.0.23: + version "3.3.0" + resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.3.0.tgz#72ad00ae91062cf07f2b1def9594006c279c1d77" + integrity sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg== + +bignumber.js@*, bignumber.js@^9.0.0, bignumber.js@^9.0.1: version "9.1.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== +bignumber.js@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" + integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== + binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -1183,7 +1866,7 @@ blakejs@^1.1.0: resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== -bluebird@^3.5.0: +bluebird@^3.4.7, bluebird@^3.5.0, bluebird@^3.5.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -1193,12 +1876,12 @@ bn.js@4.11.6: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: +bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.1.3, bn.js@^5.2.0, bn.js@^5.2.1: +bn.js@^5.1.2, bn.js@^5.1.3, bn.js@^5.2.0, bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== @@ -1239,6 +1922,11 @@ body-parser@^1.16.0: type-is "~1.6.18" unpipe "1.0.0" +boolbase@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" + integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1261,81 +1949,39 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.0.1, brorand@^1.1.0: +brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - 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" - -browserify-cipher@^1.0.0: +browser-level@^1.0.1: version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== + resolved "https://registry.yarnpkg.com/browser-level/-/browser-level-1.0.1.tgz#36e8c3183d0fe1c405239792faaab5f315871011" + integrity sha512-XECYKJ+Dbzw0lbydyQuJzwNXtOpbMSq737qxJN11sIRTErOMShvDpbzTlgju7orJKvx4epULolZAuJGLzCmWRQ== dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" + abstract-level "^1.0.2" + catering "^2.1.1" + module-error "^1.0.2" + run-parallel-limit "^1.1.0" -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - 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" +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browserslist@^4.21.9: - version "4.21.9" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.9.tgz#e11bdd3c313d7e2a9e87e8b4b0c7872b13897635" - integrity sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg== +browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== dependencies: - caniuse-lite "^1.0.30001503" - electron-to-chromium "^1.4.431" - node-releases "^2.0.12" - update-browserslist-db "^1.0.11" + 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" -bs58@^4.0.0: +bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== @@ -1351,16 +1997,6 @@ bs58check@^2.1.2: create-hash "^1.1.0" safe-buffer "^5.1.2" -btoa@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.2.1.tgz#01a9909f8b2c93f6bf680ba26131eb30f7fa3d73" - integrity sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g== - -buffer-equal-constant-time@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" - integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== - buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -1376,6 +2012,14 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== +buffer@6.0.3, buffer@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" + integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.2.1" + buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" @@ -1406,19 +2050,6 @@ cacheable-lookup@^6.0.4: resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz#0330a543471c61faa4e9035db583aad753b36385" integrity sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww== -cacheable-request@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" - integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== - 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" - cacheable-request@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.4.tgz#7a33ebf08613178b403635be7b899d3e69bbe817" @@ -1445,21 +2076,64 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase@^5.0.0, camelcase@^5.3.1: +camel-case@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + integrity sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w== + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + integrity sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg== + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw== + +camelcase@^5.0.0: version "5.3.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30001503: - version "1.0.30001516" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz#621b1be7d85a8843ee7d210fd9d87b52e3daab3a" - integrity sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g== +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +case@^1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" + integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== -caseless@~0.12.0: +caseless@^0.12.0, caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== +catering@^2.1.0, catering@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" + integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== + +cbor@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" + integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== + dependencies: + bignumber.js "^9.0.1" + nofilter "^1.0.4" + +chai-as-promised@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" + integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== + dependencies: + check-error "^1.0.2" + chai@^4.2.0: version "4.3.7" resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" @@ -1473,7 +2147,7 @@ chai@^4.2.0: pathval "^1.1.1" type-detect "^4.0.5" -chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.3.2, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1482,7 +2156,7 @@ chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.2: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1490,22 +2164,69 @@ chalk@^4.0.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" +change-case@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" + integrity sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA== + 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" + +charenc@0.0.2, "charenc@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" + integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA== + check-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== -checkpoint-store@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" - integrity sha512-J/NdY2WvIx654cc6LWSq/IYFFCUf75fFTgwzFnmbqyORH4MwgiQCgswLLKBGzmsyTI5V7i5bp/So6sMbDWhedg== - dependencies: - functional-red-black-tree "^1.0.1" - -chokidar@3.4.2: - version "3.4.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.2.tgz#38dc8e658dec3809741eb3ef7bb0a47fe424232d" - integrity sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A== +cheerio-select@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" + integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== + 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" + +cheerio@^1.0.0-rc.2: + version "1.0.0-rc.12" + resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" + integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== + 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" + +chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -1513,15 +2234,35 @@ chokidar@3.4.2: is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.4.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + +chokidar@3.5.3, chokidar@^3.4.0: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + 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" optionalDependencies: - fsevents "~2.1.2" + fsevents "~2.3.2" chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + cids@^0.7.1: version "0.7.5" resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" @@ -1546,6 +2287,22 @@ class-is@^1.1.0: resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== +classic-level@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.3.0.tgz#5e36680e01dc6b271775c093f2150844c5edd5c8" + integrity sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg== + 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" + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + cli-color@~0.1.6: version "0.1.7" resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-0.1.7.tgz#adc3200fa471cc211b0da7f566b71e98b9d67347" @@ -1553,12 +2310,33 @@ cli-color@~0.1.6: dependencies: es5-ext "0.8.x" -cli-table@^0.3.1: - version "0.3.11" - resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.11.tgz#ac69cdecbe81dccdba4889b9a18b7da312a9d3ee" - integrity sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ== +cli-table3@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" + integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== + dependencies: + object-assign "^4.1.0" + string-width "^2.1.1" + optionalDependencies: + colors "^1.1.2" + +cli-table3@^0.6.0: + version "0.6.3" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.3.tgz#61ab765aac156b52f222954ffc607a6f01dbeeb2" + integrity sha512-w5Jac5SykAeZJKntOxJCrm63Eg5/4dhMWIcuTbo9rpE+brgaSZo0RuNJZeOyMgsUdhDeojvgyQLmjI+K50ZGyg== + dependencies: + string-width "^4.2.0" + optionalDependencies: + "@colors/colors" "1.5.0" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + integrity sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w== dependencies: - colors "1.0.3" + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" cliui@^5.0.0: version "5.0.0" @@ -1569,14 +2347,14 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" -cliui@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" - integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== dependencies: string-width "^4.2.0" strip-ansi "^6.0.0" - wrap-ansi "^6.2.0" + wrap-ansi "^7.0.0" clone-response@^1.0.2: version "1.0.3" @@ -1585,10 +2363,10 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" -clone@^2.0.0, clone@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== color-convert@^1.9.0: version "1.9.3" @@ -1614,10 +2392,10 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -colors@1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" - integrity sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw== +colors@1.4.0, colors@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.8" @@ -1631,14 +2409,25 @@ command-exists@^1.2.8: resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== -command-line-args@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46" - integrity sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA== +command-line-args@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e" + integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== dependencies: - array-back "^2.0.0" - find-replace "^1.0.3" - typical "^2.6.1" + array-back "^3.1.0" + find-replace "^3.0.0" + lodash.camelcase "^4.3.0" + typical "^4.0.0" + +command-line-usage@^6.1.0: + version "6.1.3" + resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" + integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== + dependencies: + array-back "^4.0.2" + chalk "^2.4.2" + table-layout "^1.0.2" + typical "^5.2.0" commander@3.0.2: version "3.0.2" @@ -1655,6 +2444,24 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== +concat-stream@^1.6.0, concat-stream@^1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +constant-case@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" + integrity sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ== + dependencies: + snake-case "^2.1.0" + upper-case "^1.1.1" + content-disposition@0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" @@ -1686,17 +2493,10 @@ cookie@0.5.0: resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== -cookiejar@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.4.tgz#ee669c1fea2cf42dc31585469d193fef0d65771b" - integrity sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw== - -core-js-compat@^3.31.0: - version "3.31.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.31.1.tgz#5084ad1a46858df50ff89ace152441a63ba7aae0" - integrity sha512-wIDWd2s5/5aJSdpOJHfSibxNODxoGoWOBHt8JSPB41NOE94M7kuTPZCYLOlTtuoXTsBPKobpJ6T+y0SSy5L9SA== - dependencies: - browserslist "^4.21.9" +cookie@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" + integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== core-util-is@1.0.2: version "1.0.2" @@ -1731,14 +2531,6 @@ crc-32@^1.2.0: resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" integrity sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ== -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" @@ -1750,7 +2542,7 @@ create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: +create-hmac@^1.1.4, create-hmac@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -1762,13 +2554,10 @@ create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" -cross-fetch@^2.1.0, cross-fetch@^2.1.1: - version "2.2.6" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.6.tgz#2ef0bb39a24ac034787965c457368a28730e220a" - integrity sha512-9JZz+vXCmfKUZ68zAptS7k4Nu8e2qcibe7WVZYps7sAgk5R8GYTc+T1WR0v1rlP9HxgARmOX1UTIJZFytajpNA== - dependencies: - node-fetch "^2.6.7" - whatwg-fetch "^2.0.4" +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== cross-fetch@^3.1.4: version "3.1.8" @@ -1777,18 +2566,7 @@ cross-fetch@^3.1.4: dependencies: node-fetch "^2.6.12" -cross-spawn@^6.0.0: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^7.0.2: +cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -1797,22 +2575,39 @@ cross-spawn@^7.0.2: shebang-command "^2.0.0" which "^2.0.1" -crypto-browserify@3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== +crypt@0.0.2, "crypt@>= 0.0.1": + version "0.0.2" + resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" + integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== + +crypto-addr-codec@^0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz#e16cea892730178fe25a38f6d15b680cab3124ae" + integrity sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg== + 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" + +css-select@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" + integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== 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" + boolbase "^1.0.0" + css-what "^6.1.0" + domhandler "^5.0.2" + domutils "^3.0.1" + nth-check "^2.0.1" + +css-what@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" + integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== d@1, d@^1.0.1: version "1.0.1" @@ -1841,20 +2636,20 @@ debug@2.6.9, debug@^2.2.0: dependencies: ms "2.0.0" -debug@4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1: +debug@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" @@ -1862,11 +2657,16 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -decamelize@^1.2.0: +decamelize@^1.1.1, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + decode-uri-component@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" @@ -1886,35 +2686,28 @@ decompress-response@^6.0.0: dependencies: mimic-response "^3.1.0" -deep-eql@^4.1.2: +deep-eql@^4.0.1, deep-eql@^4.1.2: version "4.1.3" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" integrity sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw== dependencies: type-detect "^4.0.0" +deep-extend@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + deep-is@^0.1.3, deep-is@~0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -defer-to-connect@^1.0.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" - integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== - defer-to-connect@^2.0.0, defer-to-connect@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== -deferred-leveldown@~1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz#3acd2e0b75d1669924bc0a4b642851131173e1eb" - integrity sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA== - dependencies: - abstract-leveldown "~2.6.0" - define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" @@ -1933,42 +2726,32 @@ depd@2.0.0: resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -des.js@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.1.0.tgz#1d37f5766f3bbff4ee9638e871a8768c173b81da" - integrity sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - destroy@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== -detect-port@^1.3.0: - version "1.5.1" - resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.5.1.tgz#451ca9b6eaf20451acb0799b8ab40dff7718727b" - integrity sha512-aBzdj76lueB6uUst5iAs7+0H/oOjqI5D16XUWxlWMIMROhcM0rfsNVk93zTngq1dDNpoXRr++Sus7ETAExppAQ== - dependencies: - address "^1.0.1" - debug "4" +detect-indent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + integrity sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g== + +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== -diff@4.0.2, diff@^4.0.1, diff@^4.0.2: +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -difflib@~0.2.1: +difflib@^0.2.4, difflib@~0.2.1: version "0.2.4" resolved "https://registry.yarnpkg.com/difflib/-/difflib-0.2.4.tgz#b5e30361a6db023176d562892db85940a718f47e" integrity sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w== @@ -2001,11 +2784,68 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-serializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" + integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.2" + entities "^4.2.0" + dom-walk@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== +domelementtype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" + integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== + +domhandler@^5.0.2, domhandler@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" + integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== + dependencies: + domelementtype "^2.3.0" + +domutils@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" + integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== + dependencies: + dom-serializer "^2.0.0" + domelementtype "^2.3.0" + domhandler "^5.0.3" + +dot-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee" + integrity sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug== + dependencies: + no-case "^2.2.0" + +dotenv-cli@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/dotenv-cli/-/dotenv-cli-7.3.0.tgz#21e33e7944713001677658d68856063968edfbd2" + integrity sha512-314CA4TyK34YEJ6ntBf80eUY+t1XaFLyem1k9P0sX1gn30qThZ5qZr/ZwE318gEnzyYP9yj9HJk6SqwE0upkfw== + dependencies: + cross-spawn "^7.0.3" + dotenv "^16.3.0" + dotenv-expand "^10.0.0" + minimist "^1.2.6" + +dotenv-expand@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37" + integrity sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A== + +dotenv@^16.3.0, dotenv@^16.4.1: + version "16.4.1" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.1.tgz#1d9931f1d3e5d2959350d1250efab299561f7f11" + integrity sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ== + dreamopt@~0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/dreamopt/-/dreamopt-0.6.0.tgz#d813ccdac8d39d8ad526775514a13dda664d6b4b" @@ -2013,11 +2853,6 @@ dreamopt@~0.6.0: dependencies: wordwrap ">=0.0.2" -duplexer3@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.5.tgz#0b5e4d7bad5de8901ea4440624c8e1d20099217e" - integrity sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA== - ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -2026,24 +2861,12 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" - integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== - dependencies: - safe-buffer "^5.0.1" - ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -electron-to-chromium@^1.4.431: - version "1.4.462" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.462.tgz#4faf5072bb5f55269d35ca9dc7475e7bf91b1ac3" - integrity sha512-ux2LqN9JKRBDKXMT+78jtiBLPiXf+rLtYlsrOg5Qn7uv6Cbg7+9JyIalE3wcqkOdB2wPCUYNWAuL7suKRMHe9w== - -elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -2076,13 +2899,6 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== -encoding@^0.1.11: - version "0.1.13" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -2090,6 +2906,14 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enquirer@^2.3.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" + integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== + dependencies: + ansi-colors "^4.1.1" + strip-ansi "^6.0.1" + enquirer@^2.3.5: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -2097,21 +2921,24 @@ enquirer@^2.3.5: dependencies: ansi-colors "^4.1.1" -errno@~0.1.1: - version "0.1.8" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" +entities@^4.2.0, entities@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" + integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== -error-ex@^1.3.1: +env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0-next.1, es-abstract@^1.19.0, es-abstract@^1.20.4: +es-abstract@^1.19.0, es-abstract@^1.20.4, es-abstract@^1.21.2: version "1.22.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.1.tgz#8b4e5fc5cefd7f1660f0f8e1a52900dfbc9d9ccc" integrity sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw== @@ -2161,21 +2988,6 @@ es-array-method-boxes-properly@^1.0.0: resolved "https://registry.yarnpkg.com/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz#873f3e84418de4ee19c5be752990b2e44718d09e" integrity sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== -es-get-iterator@^1.0.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" - integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - has-symbols "^1.0.3" - is-arguments "^1.1.1" - is-map "^2.0.2" - is-set "^2.0.2" - is-string "^1.0.7" - isarray "^2.0.5" - stop-iteration-iterator "^1.0.0" - es-set-tostringtag@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" @@ -2247,16 +3059,16 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - escodegen@1.8.x: version "1.8.1" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" @@ -2491,19 +3303,7 @@ etag@~1.8.1: resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== -eth-block-tracker@^4.4.2: - version "4.4.3" - resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-4.4.3.tgz#766a0a0eb4a52c867a28328e9ae21353812cf626" - integrity sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw== - dependencies: - "@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" - -eth-ens-namehash@2.0.8: +eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.0, eth-ens-namehash@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" integrity sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw== @@ -2511,19 +3311,26 @@ eth-ens-namehash@2.0.8: idna-uts46-hx "^2.3.1" js-sha3 "^0.5.7" -eth-json-rpc-errors@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/eth-json-rpc-errors/-/eth-json-rpc-errors-1.1.1.tgz#148377ef55155585981c21ff574a8937f9d6991f" - integrity sha512-WT5shJ5KfNqHi9jOZD+ID8I1kuYWNrigtZat7GOQkvwo99f8SzAVaEcWhJUv656WiZOAg3P1RiJQANtUmDmbIg== - dependencies: - fast-safe-stringify "^2.0.6" - -eth-json-rpc-errors@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/eth-json-rpc-errors/-/eth-json-rpc-errors-2.0.2.tgz#c1965de0301fe941c058e928bebaba2e1285e3c4" - integrity sha512-uBCRM2w2ewusRHGxN8JhcuOb2RN3ueAOYH/0BhqdFmQkZx5lj5+fLKTz0mIVOzd4FG5/kUksCzCD7eTEim6gaA== +eth-gas-reporter@^0.2.25: + version "0.2.25" + resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.25.tgz#546dfa946c1acee93cb1a94c2a1162292d6ff566" + integrity sha512-1fRgyE4xUB8SoqLgN3eDfpDfwEfRxh2Sz1b7wzFbyQA+9TekMmvSjjoRu9SKcSVyK+vLkLIsVbJDsTWjw195OQ== dependencies: - fast-safe-stringify "^2.0.6" + "@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" eth-lib@0.2.8: version "0.2.8" @@ -2546,31 +3353,6 @@ eth-lib@^0.1.26: ws "^3.0.0" xhr-request-promise "^0.1.2" -eth-query@^2.1.0, eth-query@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" - integrity sha512-srES0ZcvwkR/wd5OQBRA1bIJMww1skfGS0s8wlwK3/oNP4+wnds60krvu5R1QbpRQjMmpG5OMIWro5s7gvDPsA== - dependencies: - json-rpc-random-id "^1.0.0" - xtend "^4.0.1" - -eth-rpc-errors@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-3.0.0.tgz#d7b22653c70dbf9defd4ef490fd08fe70608ca10" - integrity sha512-iPPNHPrLwUlR9xCSYm7HHQjWBasor3+KZfRvwEWxMz3ca0yqnlBeJrnyphkGIXZ4J7AMAaOLmwy4AWhnxOiLxg== - dependencies: - fast-safe-stringify "^2.0.6" - -eth-sig-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-3.0.1.tgz#8753297c83a3f58346bd13547b59c4b2cd110c96" - integrity sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ== - dependencies: - ethereumjs-abi "^0.6.8" - ethereumjs-util "^5.1.1" - tweetnacl "^1.0.3" - tweetnacl-util "^0.15.0" - ethereum-bloom-filters@^1.0.6: version "1.0.10" resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" @@ -2578,17 +3360,7 @@ ethereum-bloom-filters@^1.0.6: dependencies: js-sha3 "^0.8.0" -ethereum-common@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" - integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== - -ethereum-common@^0.0.18: - version "0.0.18" - resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" - integrity sha512-EoltVQTRNg2Uy4o84qpa2aXymXDJhxm7eos/ACOg0DG4baAbMjhbdAEsx9GeE8sC3XCxnYvrrzZDH8D8MtA2iQ== - -ethereum-cryptography@^0.1.3: +ethereum-cryptography@0.1.3, ethereum-cryptography@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== @@ -2609,72 +3381,47 @@ ethereum-cryptography@^0.1.3: secp256k1 "^4.0.1" setimmediate "^1.0.5" -ethereum-protocol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz#b7d68142f4105e0ae7b5e178cf42f8d4dc4b93cf" - integrity sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg== - -ethereumjs-abi@^0.6.8: - version "0.6.8" - resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" - integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== - dependencies: - bn.js "^4.11.8" - ethereumjs-util "^6.0.0" - -ethereumjs-account@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz#eeafc62de544cb07b0ee44b10f572c9c49e00a84" - integrity sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA== - dependencies: - ethereumjs-util "^5.0.0" - rlp "^2.0.0" - safe-buffer "^5.1.1" - -ethereumjs-block@^1.2.2, ethereumjs-block@^1.6.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz#78b88e6cc56de29a6b4884ee75379b6860333c3f" - integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== +ethereum-cryptography@^1.0.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-1.2.0.tgz#5ccfa183e85fdaf9f9b299a79430c044268c9b3a" + integrity sha512-6yFQC9b5ug6/17CQpCyE3k9eKBMdhyVjzUy1WkiuY/E4vj/SXDBbCw8QEIaXqf0Mf2SnY6RmpDcwlUmBSS0EJw== dependencies: - 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" + "@noble/hashes" "1.2.0" + "@noble/secp256k1" "1.7.1" + "@scure/bip32" "1.1.5" + "@scure/bip39" "1.1.1" -ethereumjs-block@~2.2.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz#c7654be7e22df489fda206139ecd63e2e9c04965" - integrity sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg== +ethereum-cryptography@^2.0.0, ethereum-cryptography@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz#18fa7108622e56481157a5cb7c01c0c6a672eb67" + integrity sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug== dependencies: - 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" - -ethereumjs-common@^1.1.0, ethereumjs-common@^1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz#2065dbe9214e850f2e955a80e650cb6999066979" - integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA== + "@noble/curves" "1.1.0" + "@noble/hashes" "1.3.1" + "@scure/bip32" "1.3.1" + "@scure/bip39" "1.2.1" -ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz#88323a2d875b10549b8347e09f4862b546f3d89a" - integrity sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA== +ethereum-ens@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/ethereum-ens/-/ethereum-ens-0.8.0.tgz#6d0f79acaa61fdbc87d2821779c4e550243d4c57" + integrity sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg== dependencies: - ethereum-common "^0.0.18" - ethereumjs-util "^5.0.0" + 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-tx@^2.1.1, ethereumjs-tx@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" - integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== +ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== dependencies: - ethereumjs-common "^1.5.0" + bn.js "^4.11.8" ethereumjs-util "^6.0.0" -ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0: +ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== @@ -2687,20 +3434,7 @@ ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0: ethjs-util "0.1.6" rlp "^2.2.3" -ethereumjs-util@^5.0.0, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.5: - version "5.2.1" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz#a833f0e5fca7e5b361384dc76301a721f537bf65" - integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== - dependencies: - 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" - -ethereumjs-util@^7.0.10, ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.2, ethereumjs-util@^7.1.5: +ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.2, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: version "7.1.5" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== @@ -2711,38 +3445,7 @@ ethereumjs-util@^7.0.10, ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereu ethereum-cryptography "^0.1.3" rlp "^2.2.4" -ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz#76243ed8de031b408793ac33907fb3407fe400c6" - integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== - dependencies: - 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" - -ethereumjs-wallet@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz#2c000504b4c71e8f3782dabe1113d192522e99b6" - integrity sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA== - dependencies: - 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" - -ethers@^4.0.32: +ethers@^4.0.0-beta.1, ethers@^4.0.32, ethers@^4.0.40: version "4.0.49" resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.49.tgz#0eb0e9161a0c8b4761be547396bbe2fb121a8894" integrity sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg== @@ -2757,6 +3460,55 @@ ethers@^4.0.32: uuid "2.0.1" xmlhttprequest "1.8.0" +ethers@^5.0.13, ethers@^5.7.1: + version "5.7.2" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" + integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== + 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" + +ethers@^6.11.0: + version "6.11.1" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.11.1.tgz#96aae00b627c2e35f9b0a4d65c7ab658259ee6af" + integrity sha512-mxTAE6wqJQAbp5QAe/+o+rXOID7Nw91OZXvgpjDa1r4fAbq2Nu314oEZSbjoRLacuCzs7kUC3clEvkCQowffGg== + dependencies: + "@adraffy/ens-normalize" "1.10.1" + "@noble/curves" "1.2.0" + "@noble/hashes" "1.3.2" + "@types/node" "18.15.13" + aes-js "4.0.0-beta.5" + tslib "2.4.0" + ws "8.5.0" + ethjs-unit@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" @@ -2765,7 +3517,7 @@ ethjs-unit@0.1.6: bn.js "4.11.6" number-to-bn "1.7.0" -ethjs-util@0.1.6, ethjs-util@^0.1.3: +ethjs-util@0.1.6, ethjs-util@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== @@ -2773,22 +3525,12 @@ ethjs-util@0.1.6, ethjs-util@^0.1.3: is-hex-prefixed "1.0.0" strip-hex-prefix "1.0.0" -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - eventemitter3@4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== -events@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: +evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== @@ -2796,19 +3538,6 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - express@^4.14.0: version "4.18.2" resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" @@ -2853,7 +3582,7 @@ ext@^1.1.2: dependencies: type "^2.7.2" -extend@^3.0.2, extend@~3.0.2: +extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== @@ -2876,12 +3605,12 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== -fake-merkle-patricia-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" - integrity sha512-Tgq37lkc9pUIgIKw5uitNUKcgcYL3R6JvXtKQbOf/ZSavXbidsksgp/pAY6p//uhw0I4yoMsvTSovvVIsk/qxA== +fast-check@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.1.1.tgz#72c5ae7022a4e86504762e773adfb8a5b0b01252" + integrity sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA== dependencies: - checkpoint-store "^1.1.0" + pure-rand "^5.0.1" fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" @@ -2914,16 +3643,6 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== -fast-safe-stringify@^2.0.6: - version "2.1.1" - resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" - integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== - -fast-text-encoding@^1.0.0: - version "1.0.6" - resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz#0aa25f7f638222e3396d72bf936afcf1d42d6867" - integrity sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w== - fastq@^1.6.0: version "1.15.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" @@ -2931,13 +3650,6 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -fetch-ponyfill@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" - integrity sha512-knK9sGskIg2T7OnYLdZ2hZXn0CtDrAIBxYQLpmEf0BqfdWnwmM1weccUl5+4EdA44tzNSFAuxITPbXtPehUB3g== - dependencies: - node-fetch "~1.7.1" - file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -2965,13 +3677,19 @@ finalhandler@1.2.0: statuses "2.0.1" unpipe "~1.0.0" -find-replace@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" - integrity sha512-KrUnjzDCD9426YnCP56zGYy/eieTnhtK6Vn++j+JJzmlsWWwEkDnsyVF575spT6HJ6Ow9tlbT3TQTDsa+O4UWA== +find-replace@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" + integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== + dependencies: + array-back "^3.0.1" + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: - array-back "^1.0.4" - test-value "^2.1.0" + locate-path "^3.0.0" find-up@5.0.0: version "5.0.0" @@ -2981,20 +3699,20 @@ find-up@5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA== dependencies: - locate-path "^3.0.0" + path-exists "^2.0.0" + pinkie-promise "^2.0.0" -find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== +find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" + locate-path "^2.0.0" flat-cache@^3.0.4: version "3.0.4" @@ -3011,11 +3729,21 @@ flat@^4.1.0: dependencies: is-buffer "~2.0.3" +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + flatted@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +follow-redirects@^1.12.1: + version "1.15.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" + integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -3033,6 +3761,15 @@ form-data-encoder@1.7.1: resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.1.tgz#ac80660e4f87ee0d3d3c3638b7da8278ddb8ec96" integrity sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg== +form-data@^2.2.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" + integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -3047,6 +3784,16 @@ forwarded@0.2.0: resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== +fp-ts@1.19.3: + version "1.19.3" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" + integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== + +fp-ts@^1.0.0: + version "1.19.5" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" + integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== + fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" @@ -3072,7 +3819,7 @@ fs-extra@^4.0.2: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^7.0.0: +fs-extra@^7.0.0, fs-extra@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== @@ -3090,6 +3837,16 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-minipass@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -3097,16 +3854,26 @@ fs-minipass@^1.2.7: dependencies: minipass "^2.6.0" +fs-readdir-recursive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.1.2: +fsevents@~2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -3132,35 +3899,12 @@ functions-have-names@^1.2.2, functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -ganache-cli@^6.12.2: - version "6.12.2" - resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.12.2.tgz#c0920f7db0d4ac062ffe2375cb004089806f627a" - integrity sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw== - dependencies: - ethereumjs-util "6.2.1" - source-map-support "0.5.12" - yargs "13.2.4" - -gaxios@^4.0.0: - version "4.3.3" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-4.3.3.tgz#d44bdefe52d34b6435cc41214fdb160b64abfc22" - integrity sha512-gSaYYIO1Y3wUtdfHmjDUZ8LWaxJQpiavzbF5Kq53akSzvmVg0RfyOcFDbO1KJ/KCGRFz2qG+lS81F0nkr7cRJA== - dependencies: - abort-controller "^3.0.0" - extend "^3.0.2" - https-proxy-agent "^5.0.0" - is-stream "^2.0.0" - node-fetch "^2.6.7" - -gcp-metadata@^4.2.0: - version "4.3.1" - resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-4.3.1.tgz#fb205fe6a90fef2fd9c85e6ba06e5559ee1eefa9" - integrity sha512-x850LS5N7V1F3UcV7PoupzGsyD6iVwTVvsh3tbXfkctZnBnjW5yu5z1/3k3SehF7TyoTIe78rJs02GMMy+LF+A== - dependencies: - gaxios "^4.0.0" - json-bigint "^1.0.0" +get-caller-file@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== @@ -3180,18 +3924,16 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@ has-proto "^1.0.1" has-symbols "^1.0.3" +get-port@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" + integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== + get-stdin@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== -get-stream@^4.0.0, get-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - get-stream@^5.1.0: version "5.2.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" @@ -3227,17 +3969,17 @@ ghost-testrpc@^0.0.2: chalk "^2.4.2" node-emoji "^1.10.0" -glob-parent@^5.1.2, glob-parent@~5.1.0: +glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" -glob@7.1.6: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== +glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -3246,30 +3988,31 @@ glob@7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^5.0.15: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== +glob@7.1.7: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== dependencies: + fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "2 || 3" + minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: - version "7.2.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.1.1" + minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3: +glob@8.1.0, glob@^8.0.3: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -3280,6 +4023,29 @@ glob@^8.0.3: minimatch "^5.0.1" once "^1.3.0" +glob@^5.0.15: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.1.3, glob@^7.1.6: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + 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" + global-modules@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" @@ -3332,48 +4098,6 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -google-auth-library@^6.0.0: - version "6.1.6" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-6.1.6.tgz#deacdcdb883d9ed6bac78bb5d79a078877fdf572" - integrity sha512-Q+ZjUEvLQj/lrVHF/IQwRo6p3s8Nc44Zk/DALsN+ac3T4HY/g/3rrufkgtl+nZ1TW7DNAw5cTChdVp4apUXVgQ== - dependencies: - arrify "^2.0.0" - base64-js "^1.3.0" - ecdsa-sig-formatter "^1.0.11" - fast-text-encoding "^1.0.0" - gaxios "^4.0.0" - gcp-metadata "^4.2.0" - gtoken "^5.0.4" - jws "^4.0.0" - lru-cache "^6.0.0" - -google-p12-pem@^3.1.3: - version "3.1.4" - resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-3.1.4.tgz#123f7b40da204de4ed1fbf2fd5be12c047fc8b3b" - integrity sha512-HHuHmkLgwjdmVRngf5+gSmpkyaRI6QmOg77J8tkNBHhNEI62sGHyw4/+UkgyZEI7h84NbWprXDJ+sa3xOYFvTg== - dependencies: - node-forge "^1.3.1" - -googleapis-common@^4.4.0: - version "4.4.3" - resolved "https://registry.yarnpkg.com/googleapis-common/-/googleapis-common-4.4.3.tgz#a2063adf17b14501a5f426b9cb0685496d835b7d" - integrity sha512-W46WKCk3QtlCCfmZyQIH5zxmDOyeV5Qj+qs7nr2ox08eRkEJMWp6iwv542R/PsokXaGUSrmif4vCC4+rGzRSsQ== - dependencies: - extend "^3.0.2" - gaxios "^4.0.0" - google-auth-library "^6.0.0" - qs "^6.7.0" - url-template "^2.0.8" - uuid "^8.0.0" - -googleapis@^55.0.0: - version "55.0.0" - resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-55.0.0.tgz#02c7062bc9e40d55e8dc6ebcedc8831ad5edd04a" - integrity sha512-bjeEjI2183eU0RsPIYsVOQJpjJvPprdCFe6AtjT32SBYX7GW2rZgRP9Qna8aCbDEutyJjP8uBscirkDDpWLhQw== - dependencies: - google-auth-library "^6.0.0" - googleapis-common "^4.4.0" - gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -3400,23 +4124,6 @@ got@12.1.0: p-cancelable "^3.0.0" responselike "^2.0.0" -got@9.6.0: - version "9.6.0" - resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" - integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== - 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" - got@^11.8.5: version "11.8.6" resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" @@ -3444,15 +4151,6 @@ growl@1.10.5: resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== -gtoken@^5.0.4: - version "5.3.2" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-5.3.2.tgz#deb7dc876abe002178e0515e383382ea9446d58f" - integrity sha512-gkvEKREW7dXWF8NV8pVrKfW7WqReAmjjkMBh6lNCCGOM4ucS0r0YyXXl0r/9Yj8wcW/32ISkfc8h5mPTDbtifQ== - dependencies: - gaxios "^4.0.0" - google-p12-pem "^3.1.3" - jws "^4.0.0" - handlebars@^4.0.1: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" @@ -3478,6 +4176,78 @@ har-validator@~5.1.3: ajv "^6.12.3" har-schema "^2.0.0" +hardhat-contract-sizer@^2.10.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/hardhat-contract-sizer/-/hardhat-contract-sizer-2.10.0.tgz#72646f43bfe50e9a5702c9720c9bc3e77d93a2c9" + integrity sha512-QiinUgBD5MqJZJh1hl1jc9dNnpJg7eE/w4/4GEnrcmZJJTDbVFNe3+/3Ep24XqISSkYxRz36czcPHKHd/a0dwA== + dependencies: + chalk "^4.0.0" + cli-table3 "^0.6.0" + strip-ansi "^6.0.0" + +hardhat-gas-reporter@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.10.tgz#ebe5bda5334b5def312747580cd923c2b09aef1b" + integrity sha512-02N4+So/fZrzJ88ci54GqwVA3Zrf0C9duuTyGt0CFRIh/CdNwbnTgkXkRfojOMLBQ+6t+lBIkgbsOtqMvNwikA== + dependencies: + array-uniq "1.0.3" + eth-gas-reporter "^0.2.25" + sha1 "^1.1.1" + +hardhat@2.19.4: + version "2.19.4" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.19.4.tgz#5112c30295d8be2e18e55d847373c50483ed1902" + integrity sha512-fTQJpqSt3Xo9Mn/WrdblNGAfcANM6XC3tAEi6YogB4s02DmTf93A8QsGb8uR0KR8TFcpcS8lgiW4ugAIYpnbrQ== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@metamask/eth-sig-util" "^4.0.0" + "@nomicfoundation/ethereumjs-block" "5.0.2" + "@nomicfoundation/ethereumjs-blockchain" "7.0.2" + "@nomicfoundation/ethereumjs-common" "4.0.2" + "@nomicfoundation/ethereumjs-evm" "2.0.2" + "@nomicfoundation/ethereumjs-rlp" "5.0.2" + "@nomicfoundation/ethereumjs-statemanager" "2.0.2" + "@nomicfoundation/ethereumjs-trie" "6.0.2" + "@nomicfoundation/ethereumjs-tx" "5.0.2" + "@nomicfoundation/ethereumjs-util" "9.0.2" + "@nomicfoundation/ethereumjs-vm" "7.0.2" + "@nomicfoundation/solidity-analyzer" "^0.1.0" + "@sentry/node" "^5.18.1" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.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" + 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" + has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" @@ -3559,11 +4329,29 @@ he@1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== +header-case@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d" + integrity sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ== + dependencies: + no-case "^2.2.0" + upper-case "^1.1.3" + "heap@>= 0.2.0": version "0.2.7" resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== +highlight.js@^10.4.1: + version "10.7.3" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" + integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== + +highlightjs-solidity@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz#e7a702a2b05e0a97f185e6ba39fd4846ad23a990" + integrity sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg== + hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -3573,6 +4361,31 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +htmlparser2@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" + integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== + dependencies: + domelementtype "^2.3.0" + domhandler "^5.0.3" + domutils "^3.0.1" + entities "^4.4.0" + +http-basic@^8.1.1: + version "8.1.3" + resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" + integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== + dependencies: + caseless "^0.12.0" + concat-stream "^1.6.2" + http-response-object "^3.0.1" + parse-cache-control "^1.0.1" + http-cache-semantics@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" @@ -3594,6 +4407,13 @@ http-https@^1.0.0: resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" integrity sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg== +http-response-object@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" + integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== + dependencies: + "@types/node" "^10.0.3" + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -3639,13 +4459,6 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.6.2: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - idna-uts46-hx@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" @@ -3653,7 +4466,7 @@ idna-uts46-hx@^2.3.1: dependencies: punycode "2.1.0" -ieee754@^1.1.13: +ieee754@^1.1.13, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -3668,10 +4481,10 @@ ignore@^5.1.1, ignore@^5.2.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== -immediate@^3.2.3: - version "3.3.0" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" - integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== +immutable@^4.0.0-rc.12: + version "4.3.2" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.2.tgz#f89d910f8dfb6e15c03b2cae2faaf8c1f66455fe" + integrity sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA== import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" @@ -3686,6 +4499,11 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3694,7 +4512,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -3704,7 +4522,7 @@ ini@^1.3.5: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -internal-slot@^1.0.4, internal-slot@^1.0.5: +internal-slot@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== @@ -3718,17 +4536,24 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== -invert-kv@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" - integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ== + +io-ts@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" + integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== + dependencies: + fp-ts "^1.0.0" ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== -is-arguments@^1.0.4, is-arguments@^1.1.1: +is-arguments@^1.0.4: version "1.1.1" resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== @@ -3772,11 +4597,16 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-buffer@~2.0.3: +is-buffer@^2.0.5, is-buffer@~2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== +is-buffer@~1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== + is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" @@ -3789,6 +4619,13 @@ is-core-module@^2.11.0: dependencies: has "^1.0.3" +is-core-module@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== + dependencies: + has "^1.0.3" + is-date-object@^1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" @@ -3801,10 +4638,12 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-fn@^1.0.0: +is-fullwidth-code-point@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" - integrity sha512-XoFPJQmsAShb3jEQRfzf2rqXavq7fIqF/jOekp308JlThqrODnMpweVSGilKTCXELfLhltGP2AGgbQGVP8F1dg== + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== + dependencies: + number-is-nan "^1.0.0" is-fullwidth-code-point@^2.0.0: version "2.0.0" @@ -3840,10 +4679,12 @@ is-hex-prefixed@1.0.0: resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== -is-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" - integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-lower-case@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" + integrity sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA== + dependencies: + lower-case "^1.1.0" is-negative-zero@^2.0.2: version "2.0.2" @@ -3862,10 +4703,10 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg== +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== is-regex@^1.1.4: version "1.1.4" @@ -3875,11 +4716,6 @@ is-regex@^1.1.4: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-set@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" - integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== - is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" @@ -3887,16 +4723,6 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.2" -is-stream@^1.0.1, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - is-string@^1.0.5, is-string@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" @@ -3927,6 +4753,23 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + +is-upper-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" + integrity sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw== + dependencies: + upper-case "^1.1.0" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== + is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" @@ -3934,11 +4777,6 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== - isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -3959,18 +4797,10 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== -iterate-iterator@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iterate-iterator/-/iterate-iterator-1.0.2.tgz#551b804c9eaa15b847ea6a7cdc2f5bf1ec150f91" - integrity sha512-t91HubM4ZDQ70M9wqp+pcNpu8OyJ9UAtXntT/Bcsvp5tZMnz9vRa+IunKXeI8AnfZMTv0jNuVEmGeLSMjVvfPw== - -iterate-value@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/iterate-value/-/iterate-value-1.0.2.tgz#935115bd37d006a52046535ebc8d07e9c9337f57" - integrity sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ== - dependencies: - es-get-iterator "^1.0.2" - iterate-iterator "^1.0.1" +js-sdsl@^4.1.4: + version "4.4.2" + resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.2.tgz#2e3c031b1f47d3aca8b775532e3ebb0818e7f847" + integrity sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w== js-sha3@0.5.7, js-sha3@^0.5.7: version "0.5.7" @@ -3987,10 +4817,10 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@3.14.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" - integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== +js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -4003,7 +4833,7 @@ js-yaml@3.x, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.1.0: +js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -4015,18 +4845,6 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== -json-bigint@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1" - integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ== - dependencies: - bignumber.js "^9.0.0" - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ== - json-buffer@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" @@ -4046,19 +4864,6 @@ json-parse-even-better-errors@^2.3.0: resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== -json-rpc-engine@^5.1.3: - version "5.4.0" - resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-5.4.0.tgz#75758609d849e1dba1e09021ae473f3ab63161e5" - integrity sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g== - dependencies: - eth-rpc-errors "^3.0.0" - safe-event-emitter "^1.0.1" - -json-rpc-random-id@^1.0.0, json-rpc-random-id@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" - integrity sha512-RJ9YYNCkhVDBuP4zN5BBtYAzEl03yq/jIIsyif0JY9qyJuQQZNeDK7anAPKKlyEtLSj2s8h6hNh2F8zO5q7ScA== - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -4079,13 +4884,6 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json-stable-stringify@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz#e06f23128e0bbe342dc996ed5a19e28b57b580e0" - integrity sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g== - dependencies: - jsonify "^0.0.1" - json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -4112,10 +4910,14 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" -jsonify@^0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" - integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" jsonschema@^1.2.4: version "1.4.1" @@ -4132,24 +4934,7 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" -jwa@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.0.tgz#a7e9c3f29dae94027ebcaf49975c9345593410fc" - integrity sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA== - dependencies: - buffer-equal-constant-time "1.0.1" - ecdsa-sig-formatter "1.0.11" - safe-buffer "^5.0.1" - -jws@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.0.tgz#2d4e8cf6a318ffaa12615e9dec7e86e6c97310f4" - integrity sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg== - dependencies: - jwa "^2.0.0" - safe-buffer "^5.0.1" - -keccak@^3.0.0: +keccak@^3.0.0, keccak@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== @@ -4158,13 +4943,6 @@ keccak@^3.0.0: node-gyp-build "^4.2.0" readable-stream "^3.6.0" -keyv@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" - integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== - dependencies: - json-buffer "3.0.0" - keyv@^4.0.0: version "4.5.3" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.3.tgz#00873d2b046df737963157bd04f294ca818c9c25" @@ -4174,72 +4952,43 @@ keyv@^4.0.0: kind-of@^6.0.2: version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== - optionalDependencies: - graceful-fs "^4.1.9" - -lcid@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" - integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== - dependencies: - invert-kv "^2.0.0" - -level-codec@~7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" - integrity sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ== - -level-errors@^1.0.3: - version "1.1.2" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d" - integrity sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w== - dependencies: - errno "~0.1.1" - -level-errors@~1.0.3: - version "1.0.5" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.5.tgz#83dbfb12f0b8a2516bdc9a31c4876038e227b859" - integrity sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig== - dependencies: - errno "~0.1.1" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== -level-iterator-stream@~1.3.0: +klaw@^1.0.0: version "1.3.1" - resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed" - integrity sha512-1qua0RHNtr4nrZBgYlpV0qHHeHpcRRWTxEZJ8xsemoHAXNL5tbooh4tPEEqIqsbWCAJBmUmkwYK/sW5OrFjWWw== + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== + optionalDependencies: + graceful-fs "^4.1.9" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw== dependencies: - inherits "^2.0.1" - level-errors "^1.0.3" - readable-stream "^1.0.33" - xtend "^4.0.0" + invert-kv "^1.0.0" + +level-supports@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" + integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA== -level-ws@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" - integrity sha512-XUTaO/+Db51Uiyp/t7fCMGVFOTdtLS/NIACxE/GHsij15mKzxksZifKVjlXDF41JMUP/oM1Oc4YNGdKnc3dVLw== +level-transcoder@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-transcoder/-/level-transcoder-1.0.1.tgz#f8cef5990c4f1283d4c86d949e73631b0bc8ba9c" + integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w== dependencies: - readable-stream "~1.0.15" - xtend "~2.1.1" + buffer "^6.0.3" + module-error "^1.0.1" -levelup@^1.2.1: - version "1.3.9" - resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.9.tgz#2dbcae845b2bb2b6bea84df334c475533bbd82ab" - integrity sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ== +level@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/level/-/level-8.0.0.tgz#41b4c515dabe28212a3e881b61c161ffead14394" + integrity sha512-ypf0jjAk2BWI33yzEaaotpq7fkOPALKAgDBxggO6Q9HGX2MRXn0wbP1Jn/tJv1gtL867+YOjOB49WaUF3UoJNQ== dependencies: - 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" + browser-level "^1.0.1" + classic-level "^1.2.0" levn@^0.4.1: version "0.4.1" @@ -4262,6 +5011,25 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A== + 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" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -4270,13 +5038,6 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - locate-path@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" @@ -4284,15 +5045,20 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== +lodash.assign@^4.0.3, lodash.assign@^4.0.6: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + integrity sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw== + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== -lodash.flatmap@^4.5.0: +lodash.isequal@^4.5.0: version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz#ef8cbf408f6e48268663345305c6acc0b778702e" - integrity sha512-/OcpcAGWlrZyoHGeHh3cAoa6nGdX6QYtmzNP84Jqol6UEQQ2gIaU3H+0eICcjcKGl0/XF8LWOujNn9lffsnaOg== + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== lodash.merge@^4.6.2: version "4.6.2" @@ -4304,17 +5070,25 @@ lodash.truncate@^4.4.2: resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== -lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21: +lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" - integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== dependencies: - chalk "^4.0.0" + chalk "^2.4.2" + +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" loupe@^2.3.1: version "2.3.6" @@ -4323,10 +5097,17 @@ loupe@^2.3.1: dependencies: get-func-name "^2.0.0" -lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== +lower-case-first@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1" + integrity sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA== + dependencies: + lower-case "^1.1.2" + +lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + integrity sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA== lowercase-keys@^2.0.0: version "2.0.0" @@ -4352,22 +5133,25 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -ltgt@~2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" - integrity sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA== +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -map-age-cleaner@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== - dependencies: - p-defer "^1.0.0" +markdown-table@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.3.tgz#9fcb69bcfdb8717bfd0398c6ec2d93036ef8de60" + integrity sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q== + +mcl-wasm@^0.7.1: + version "0.7.9" + resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" + integrity sha512-iJIUcQWA88IJB/5L15GnJVnSQJmf/YaxxV6zRavv83HILHaJQb6y0iFyDMdDO0gN8X37tdxmAOrH/P8B6RB8sQ== md5.js@^1.3.4: version "1.3.5" @@ -4378,31 +5162,28 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +md5@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/md5/-/md5-2.3.0.tgz#c3da9a6aae3a30b46b7b0c349b87b110dc3bda4f" + integrity sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g== + dependencies: + charenc "0.0.2" + crypt "0.0.2" + is-buffer "~1.1.6" + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== -mem@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" - integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== - dependencies: - map-age-cleaner "^0.1.1" - mimic-fn "^2.0.0" - p-is-promise "^2.0.0" - -memdown@^1.0.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" - integrity sha512-iVrGHZB8i4OQfM155xx8akvG9FIj+ht14DX5CQkCTG4EHzZ3d3sgckIf/Lm9ivZalEsFuEVnWv2B2WZvbrro2w== +memory-level@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" + integrity sha512-UXzwewuWeHBz5krr7EvehKcmLFNoXxGcvuYhC41tRnkrTbJohtS7kVn9akmgirtRygg+f7Yjsfi8Uu5SGSQ4Og== dependencies: - abstract-leveldown "~2.7.1" + abstract-level "^1.0.0" functional-red-black-tree "^1.0.1" - immediate "^3.2.3" - inherits "~2.0.1" - ltgt "~2.2.0" - safe-buffer "~5.1.1" + module-error "^1.0.1" memorystream@^0.3.1: version "0.3.1" @@ -4419,25 +5200,16 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz#982ca1b5a0fde00eed2f6aeed1f9152860b8208a" - integrity sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g== - dependencies: - 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" - methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== +micro-ftch@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/micro-ftch/-/micro-ftch-0.3.1.tgz#6cb83388de4c1f279a034fb0cf96dfc050853c5f" + integrity sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg== + micromatch@^4.0.4: version "4.0.5" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" @@ -4446,14 +5218,6 @@ micromatch@^4.0.4: braces "^3.0.2" picomatch "^2.3.1" -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - mime-db@1.52.0: version "1.52.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" @@ -4471,12 +5235,7 @@ mime@1.6.0: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mimic-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -mimic-response@^1.0.0, mimic-response@^1.0.1: +mimic-response@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== @@ -4517,6 +5276,13 @@ minimatch@3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + minimatch@^5.0.1: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" @@ -4551,59 +5317,159 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*: +mkdirp@*, mkdirp@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== -mkdirp@0.5.x, mkdirp@^0.5.1, mkdirp@^0.5.5: +mkdirp@0.5.5: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mkdirp@0.5.x, mkdirp@^0.5.5: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: minimist "^1.2.6" -mocha@8.1.2: - version "8.1.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.1.2.tgz#d67fad13300e4f5cd48135a935ea566f96caf827" - integrity sha512-I8FRAcuACNMLQn3lS4qeWLxXqLvGf6r2CaLstDpZmMUUSmvW6Cnm1AuHxgbc7ctZVRcfwspCRbDHymPsi3dkJw== +mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mnemonist@^0.38.0: + version "0.38.5" + resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.5.tgz#4adc7f4200491237fe0fa689ac0b86539685cade" + integrity sha512-bZTFT5rrPKtPJxj8KSV0WkPyNxl72vQepqqVUAW2ARUpUSF2qXMB6jZj7hW5/k7C1rtpzqbD/IIbJwLXUjCHeg== + dependencies: + obliterator "^2.0.0" + +mocha-junit-reporter@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/mocha-junit-reporter/-/mocha-junit-reporter-2.2.1.tgz#739f5595d0f051d07af9d74e32c416e13a41cde5" + integrity sha512-iDn2tlKHn8Vh8o4nCzcUVW4q7iXp7cC4EB78N0cDHIobLymyHNwe0XG8HEHHjc3hJlXm0Vy6zcrxaIhnI2fWmw== + dependencies: + debug "^4.3.4" + md5 "^2.3.0" + mkdirp "^3.0.0" + strip-ansi "^6.0.1" + xml "^1.0.1" + +mocha-multi-reporters@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/mocha-multi-reporters/-/mocha-multi-reporters-1.5.1.tgz#c73486bed5519e1d59c9ce39ac7a9792600e5676" + integrity sha512-Yb4QJOaGLIcmB0VY7Wif5AjvLMUFAdV57D2TWEva1Y0kU/3LjKpeRVmlMIfuO1SVbauve459kgtIizADqxMWPg== + dependencies: + debug "^4.1.1" + lodash "^4.17.15" + +mocha@^10.0.0: + version "10.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.2.0.tgz#1fd4a7c32ba5ac372e03a17eef435bd00e5c68b8" + integrity sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.2.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + nanoid "3.3.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +mocha@^10.2.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.3.0.tgz#0e185c49e6dccf582035c05fa91084a4ff6e3fe9" + integrity sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg== dependencies: ansi-colors "4.1.1" browser-stdout "1.3.1" - chokidar "3.4.2" - debug "4.1.1" - diff "4.0.2" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" escape-string-regexp "4.0.0" find-up "5.0.0" - glob "7.1.6" + glob "8.1.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +mocha@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" + integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== + 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.14.0" - log-symbols "4.0.0" + js-yaml "3.13.1" + log-symbols "3.0.0" minimatch "3.0.4" - ms "2.1.2" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" object.assign "4.1.0" - promise.allsettled "1.0.2" - serialize-javascript "4.0.0" - strip-json-comments "3.0.1" - supports-color "7.1.0" - which "2.0.2" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" wide-align "1.1.3" - workerpool "6.0.0" yargs "13.3.2" yargs-parser "13.1.2" - yargs-unparser "1.6.1" + yargs-unparser "1.6.0" mock-fs@^4.1.0: version "4.14.0" resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== +module-error@^1.0.1, module-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" + integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -4654,11 +5520,26 @@ multihashes@^0.4.15, multihashes@~0.4.15: multibase "^0.7.0" varint "^5.0.0" +nano-base32@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/nano-base32/-/nano-base32-1.0.1.tgz#ba548c879efcfb90da1c4d9e097db4a46c9255ef" + integrity sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw== + nano-json-stream-parser@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" integrity sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew== +nanoid@3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + +napi-macros@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.2.2.tgz#817fef20c3e0e40a963fbf7b37d1600bd0201044" + integrity sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -4679,10 +5560,12 @@ next-tick@^1.1.0: resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== +no-case@^2.2.0, no-case@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== + dependencies: + lower-case "^1.1.1" node-addon-api@^2.0.0: version "2.0.2" @@ -4696,35 +5579,30 @@ node-emoji@^1.10.0: dependencies: lodash "^4.17.21" -node-fetch@^2.6.12, node-fetch@^2.6.7: +node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + +node-fetch@^2.6.12: version "2.6.12" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba" integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g== dependencies: whatwg-url "^5.0.0" -node-fetch@~1.7.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - -node-forge@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" - integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== - node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: version "4.6.0" resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== -node-releases@^2.0.12: - version "2.0.13" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" - integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== +nofilter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" + integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== nopt@3.x: version "3.0.6" @@ -4733,27 +5611,37 @@ nopt@3.x: dependencies: abbrev "1" +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-url@^4.1.0: - version "4.5.1" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" - integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== - normalize-url@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw== +nth-check@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" + integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== dependencies: - path-key "^2.0.0" + boolbase "^1.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== number-to-bn@1.7.0: version "1.7.0" @@ -4783,11 +5671,6 @@ object-keys@^1.0.11, object-keys@^1.1.1: resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object-keys@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" - integrity sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw== - object.assign@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" @@ -4808,6 +5691,17 @@ object.assign@^4.1.4: has-symbols "^1.0.3" object-keys "^1.1.1" +object.getownpropertydescriptors@^2.0.3: + version "2.1.6" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.6.tgz#5e5c384dd209fa4efffead39e3a0512770ccc312" + integrity sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ== + 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" + object.values@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" @@ -4817,6 +5711,11 @@ object.values@^1.1.6: define-properties "^1.1.4" es-abstract "^1.20.4" +obliterator@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" + integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== + oboe@2.1.5: version "2.1.5" resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" @@ -4862,30 +5761,23 @@ optionator@^0.9.1: prelude-ls "^1.2.1" type-check "^0.4.0" -original-require@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/original-require/-/original-require-1.0.1.tgz#0f130471584cd33511c5ec38c8d59213f9ac5e20" - integrity sha512-5vdKMbE58WaE61uVD+PKyh8xdM398UnjPBLotW2sjG5MzHARwta/+NtMBCBA0t2WQblGYBvq5vsiZpWokwno+A== +ordinal@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ordinal/-/ordinal-1.0.3.tgz#1a3c7726a61728112f50944ad7c35c06ae3a0d4d" + integrity sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ== -os-locale@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" - integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + integrity sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g== dependencies: - execa "^1.0.0" - lcid "^2.0.0" - mem "^4.0.0" + lcid "^1.0.0" os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== -p-cancelable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" - integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== - p-cancelable@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" @@ -4896,22 +5788,14 @@ p-cancelable@^3.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw== -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw== - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== - -p-is-promise@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" - integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" -p-limit@^2.0.0, p-limit@^2.2.0: +p-limit@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -4925,6 +5809,13 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== + dependencies: + p-limit "^1.1.0" + p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" @@ -4932,13 +5823,6 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - p-locate@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" @@ -4946,11 +5830,35 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +pako@^1.0.4: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + +param-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + integrity sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w== + dependencies: + no-case "^2.2.0" + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -4958,16 +5866,10 @@ parent-module@^1.0.0: dependencies: callsites "^3.0.0" -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - 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" +parse-cache-control@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" + integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== parse-code-context@^1.0.0: version "1.0.0" @@ -4979,6 +5881,13 @@ parse-headers@^2.0.0: resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.5.tgz#069793f9356a54008571eb7f9761153e6c770da9" integrity sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA== +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ== + dependencies: + error-ex "^1.2.0" + parse-json@^5.0.0: version "5.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" @@ -4989,11 +5898,48 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" +parse5-htmlparser2-tree-adapter@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" + integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== + dependencies: + domhandler "^5.0.2" + parse5 "^7.0.0" + +parse5@^7.0.0: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== +pascal-case@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz#2d578d3455f660da65eca18ef95b4e0de912761e" + integrity sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ== + dependencies: + camel-case "^3.0.0" + upper-case-first "^1.1.0" + +path-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz#94b8037c372d3fe2906e465bb45e25d226e8eea5" + integrity sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q== + dependencies: + no-case "^2.2.0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ== + dependencies: + pinkie-promise "^2.0.0" + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -5009,17 +5955,12 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== - path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.7: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -5029,6 +5970,15 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg== + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -5039,7 +5989,7 @@ pathval@^1.1.1: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -pbkdf2@^3.0.17, pbkdf2@^3.0.3: +pbkdf2@^3.0.17: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== @@ -5055,36 +6005,38 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== + pluralize@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== -precond@0.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" - integrity sha512-QCYG84SgGyGzqJ/vlMsxeXd/pgL/I94ixdNFyh1PusWmTCyVfPJjZ1K1jvHtsbfnXQs2TSkEP2fR7QiMZAnKFQ== - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -5095,11 +6047,6 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA== - prettier-linter-helpers@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" @@ -5126,12 +6073,7 @@ prettier@2.0.5: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== -prettier@^1.14.2: - version "1.19.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" - integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== - -prettier@^2.0.5, prettier@^2.8.3: +prettier@^2.0.5, prettier@^2.3.1, prettier@^2.8.3: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== @@ -5151,24 +6093,12 @@ progress@^2.0.0: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -promise-to-callback@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" - integrity sha512-uhMIZmKM5ZteDMfLgJnoSq9GCwsNKrYau73Awf1jIy6/eUcuuZ3P+CD9zUv0kJsIUbU+x6uLNIhXhLHDs1pNPA== - dependencies: - is-fn "^1.0.0" - set-immediate-shim "^1.0.1" - -promise.allsettled@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/promise.allsettled/-/promise.allsettled-1.0.2.tgz#d66f78fbb600e83e863d893e98b3d4376a9c47c9" - integrity sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg== +promise@^8.0.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" + integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg== dependencies: - array.prototype.map "^1.0.1" - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - function-bind "^1.1.1" - iterate-value "^1.0.0" + asap "~2.0.6" proxy-addr@~2.0.7: version "2.0.7" @@ -5178,28 +6108,11 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== - psl@^1.1.28: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - 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" - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -5213,11 +6126,21 @@ punycode@2.1.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" integrity sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA== -punycode@^2.1.0, punycode@^2.1.1: +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== + +punycode@^2.1.1: version "2.3.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== +pure-rand@^5.0.1: + version "5.0.5" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.5.tgz#bda2a7f6a1fc0f284d78d78ca5902f26f2ad35cf" + integrity sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw== + q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -5230,7 +6153,7 @@ qs@6.11.0: dependencies: side-channel "^1.0.4" -qs@^6.7.0: +qs@^6.4.0: version "6.11.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== @@ -5251,7 +6174,7 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -queue-microtask@^1.2.2: +queue-microtask@^1.2.2, queue-microtask@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== @@ -5261,21 +6184,13 @@ quick-lru@^5.1.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: +randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -5291,7 +6206,7 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" -raw-body@2.5.2: +raw-body@2.5.2, raw-body@^2.4.1: version "2.5.2" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== @@ -5301,17 +6216,24 @@ raw-body@2.5.2: iconv-lite "0.4.24" unpipe "1.0.0" -readable-stream@^1.0.33: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ== +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A== dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ== + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" -readable-stream@^2.0.0, readable-stream@^2.2.9: +readable-stream@^2.2.2: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== @@ -5333,20 +6255,17 @@ readable-stream@^3.6.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@~1.0.15: - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - integrity sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg== +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" + picomatch "^2.0.4" -readdirp@~3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" - integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" @@ -5364,10 +6283,15 @@ recursive-readdir@^2.2.2: dependencies: minimatch "^3.0.5" -regenerator-runtime@^0.13.11: - version "0.13.11" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== +reduce-flatten@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" + integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== + +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== regexp.prototype.flags@^1.5.0: version "1.5.0" @@ -5383,7 +6307,37 @@ regexpp@^3.0.0, regexpp@^3.1.0: resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== -request@^2.79.0, request@^2.85.0: +req-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-cwd/-/req-cwd-2.0.0.tgz#d4082b4d44598036640fb73ddea01ed53db49ebc" + integrity sha512-ueoIoLo1OfB6b05COxAA9UpeoscNpYyM+BqYlA7H6LVF4hKGPXQQSSaD2YmvDVJMkk4UDpAHIeU1zG53IqjvlQ== + dependencies: + req-from "^2.0.0" + +req-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/req-from/-/req-from-2.0.0.tgz#d74188e47f93796f4aa71df6ee35ae689f3e0e70" + integrity sha512-LzTfEVDVQHBRfjOUMgNBA+V6DWsSnoeKzf42J7l0xa/B4jyPOuuF5MlNSmomLNGemWTnV2TIdjSSLnEn95fOQA== + dependencies: + resolve-from "^3.0.0" + +request-promise-core@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" + integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== + dependencies: + lodash "^4.17.19" + +request-promise-native@^1.0.5: + version "1.0.9" + resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" + integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== + dependencies: + request-promise-core "1.1.4" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" + +request@^2.79.0, request@^2.88.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -5414,11 +6368,21 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + integrity sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q== + require-from-string@^2.0.0, require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug== + require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -5429,6 +6393,11 @@ resolve-alpn@^1.0.0, resolve-alpn@^1.2.0: resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw== + resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -5439,7 +6408,14 @@ resolve@1.1.x: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg== -resolve@^1.1.6, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.22.1, resolve@^1.8.1: +resolve@1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +resolve@^1.1.6, resolve@^1.10.1, resolve@^1.22.1: version "1.22.2" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== @@ -5448,12 +6424,14 @@ resolve@^1.1.6, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.22.1, resolve@^1.8. path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -responselike@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ== +resolve@^1.10.0: + version "1.22.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.4.tgz#1dc40df46554cdaf8948a486a10f6ba1e2026c34" + integrity sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg== dependencies: - lowercase-keys "^1.0.0" + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" responselike@^2.0.0: version "2.0.1" @@ -5481,7 +6459,12 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -ripemd160@^2.0.0, ripemd160@^2.0.1: +ripemd160-min@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/ripemd160-min/-/ripemd160-min-0.0.6.tgz#a904b77658114474d02503e819dcc55853b67e62" + integrity sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A== + +ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== @@ -5489,13 +6472,20 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rlp@^2.0.0, rlp@^2.2.3, rlp@^2.2.4: +rlp@^2.2.3, rlp@^2.2.4: version "2.2.7" resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== dependencies: bn.js "^5.2.0" +run-parallel-limit@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz#be80e936f5768623a38a963262d6bef8ff11e7ba" + integrity sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw== + dependencies: + queue-microtask "^1.2.2" + run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -5528,13 +6518,6 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-event-emitter@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz#5b692ef22329ed8f69fdce607e50ca734f6f20af" - integrity sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg== - dependencies: - events "^3.0.0" - safe-regex-test@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" @@ -5544,7 +6527,7 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -5574,7 +6557,7 @@ scrypt-js@2.0.4: resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== -scrypt-js@^3.0.0, scrypt-js@^3.0.1: +scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== @@ -5588,17 +6571,19 @@ secp256k1@^4.0.1: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" -semaphore@>=1.0.1, semaphore@^1.0.3: - version "1.1.0" - resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" - integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== - -semver@^5.5.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.7.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.1.0, semver@^6.3.0, semver@^6.3.1: +semver@7.5.2: + version "7.5.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb" + integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ== + dependencies: + lru-cache "^6.0.0" + +semver@^6.1.0, semver@^6.3.0: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -5610,11 +6595,6 @@ semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: dependencies: lru-cache "^6.0.0" -semver@~5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" - integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== - send@0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" @@ -5634,10 +6614,18 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" -serialize-javascript@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== +sentence-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4" + integrity sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ== + dependencies: + no-case "^2.2.0" + upper-case-first "^1.1.2" + +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== dependencies: randombytes "^2.1.0" @@ -5667,11 +6655,6 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - integrity sha512-Li5AOqrZWCVA2n5kryzEmqai6bKSIvpz5oUJHPVj6+dsbD3X1ixtsY5tEnsaNpH3pFAHmG8eIHUrtEtohrg+UQ== - setimmediate@1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" @@ -5695,12 +6678,20 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== +sha1@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/sha1/-/sha1-1.1.1.tgz#addaa7a93168f393f19eb2b15091618e2700f848" + integrity sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA== + dependencies: + charenc ">= 0.0.1" + crypt ">= 0.0.1" + +sha3@^2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.4.tgz#000fac0fe7c2feac1f48a25e7a31b52a6492cc8f" + integrity sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg== dependencies: - shebang-regex "^1.0.0" + buffer "6.0.3" shebang-command@^2.0.0: version "2.0.0" @@ -5709,11 +6700,6 @@ shebang-command@^2.0.0: dependencies: shebang-regex "^3.0.0" -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== - shebang-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" @@ -5737,11 +6723,6 @@ side-channel@^1.0.4: get-intrinsic "^1.0.2" object-inspect "^1.9.0" -signal-exit@^3.0.0: - version "3.0.7" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - simple-concat@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" @@ -5770,6 +6751,13 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" +snake-case@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" + integrity sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q== + dependencies: + no-case "^2.2.0" + solc@0.6.12: version "0.6.12" resolved "https://registry.yarnpkg.com/solc/-/solc-0.6.12.tgz#48ac854e0c729361b22a7483645077f58cba080e" @@ -5784,6 +6772,32 @@ solc@0.6.12: semver "^5.5.0" tmp "0.0.33" +solc@0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" + integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== + 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" + +solc@^0.4.20: + version "0.4.26" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.26.tgz#5390a62a99f40806b86258c737c1cf653cc35cb5" + integrity sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA== + dependencies: + fs-extra "^0.30.0" + memorystream "^0.3.1" + require-from-string "^1.1.0" + semver "^5.3.0" + yargs "^4.7.1" + solhint@^3.1.0: version "3.4.1" resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.4.1.tgz#8ea15b21c13d1be0b53fd46d605a24d0b36a0c46" @@ -5809,39 +6823,32 @@ solhint@^3.1.0: optionalDependencies: prettier "^2.8.3" -solidity-coverage@0.7.22: - version "0.7.22" - resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.7.22.tgz#168f414be4c0f5303addcf3ab9714cf64f72c080" - integrity sha512-I6Zd5tsFY+gmj1FDIp6w7OrUePx6ZpMgKQZg7dWgPaQHePLi3Jk+iJ8lwZxsWEoNy2Lcv91rMxATWHqRaFdQpw== +solidity-coverage@^0.8.9: + version "0.8.9" + resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.9.tgz#d885207df927faf6b4f729904fab8ce0943cfd14" + integrity sha512-ZhPsxlsLkYyzgwoVGh8RBN2ju7JVahvMkk+8RBVc0vP/3UNq88GzvL8kvbuY48lVIRL8eQjJ+0X8al2Bu9/2iQ== dependencies: - "@solidity-parser/parser" "^0.14.0" - "@truffle/provider" "^0.2.24" + "@ethersproject/abi" "^5.0.9" + "@solidity-parser/parser" "^0.18.0" 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 "^10.2.0" 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" - -source-map-support@0.5.12: - version "0.5.12" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" - integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" + web3-utils "^1.3.6" -source-map-support@^0.5.17: +source-map-support@^0.5.13, source-map-support@^0.5.19: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -5861,6 +6868,32 @@ source-map@~0.2.0: dependencies: amdefine ">=0.0.4" +spdx-correct@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" + integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.13" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz#7189a474c46f8d47c7b0da4b987bb45e908bd2d5" + integrity sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w== + sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" @@ -5881,24 +6914,43 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" +stacktrace-parser@^0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" + integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== + dependencies: + type-fest "^0.7.1" + statuses@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== -stop-iteration-iterator@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4" - integrity sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ== - dependencies: - internal-slot "^1.0.4" +stealthy-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g== strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== -"string-width@^1.0.2 || 2": +string-format@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" + integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +"string-width@^1.0.2 || 2", string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -5958,11 +7010,6 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== - string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -5970,6 +7017,13 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== + dependencies: + ansi-regex "^2.0.0" + strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" @@ -5991,16 +7045,18 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g== + dependencies: + is-utf8 "^0.2.0" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q== - strip-hex-prefix@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" @@ -6008,20 +7064,32 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" -strip-json-comments@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" - integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + +strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -supports-color@7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" @@ -6051,6 +7119,14 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +swap-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" + integrity sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ== + dependencies: + lower-case "^1.1.1" + upper-case "^1.1.1" + swarm-js@^0.1.40: version "0.1.42" resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.42.tgz#497995c62df6696f6e22372f457120e43e727979" @@ -6068,6 +7144,32 @@ swarm-js@^0.1.40: tar "^4.0.2" xhr-request "^1.0.1" +sync-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" + integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== + dependencies: + http-response-object "^3.0.1" + sync-rpc "^1.2.1" + then-request "^6.0.0" + +sync-rpc@^1.2.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" + integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== + dependencies: + get-port "^3.1.0" + +table-layout@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" + integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== + dependencies: + array-back "^4.0.1" + deep-extend "~0.6.0" + typical "^5.2.0" + wordwrapjs "^4.0.0" + table@^6.0.9, table@^6.8.1: version "6.8.1" resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" @@ -6092,24 +7194,46 @@ tar@^4.0.2: safe-buffer "^5.2.1" yallist "^3.1.1" -test-value@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" - integrity sha512-+1epbAxtKeXttkGFMTX9H42oqzOTufR1ceCF+GYA5aOmvaPq9wd4PUS8329fn2RRLGNeUkgRLnVpycjx8DsO2w== - dependencies: - array-back "^1.0.3" - typical "^2.6.0" +testrpc@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" + integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +then-request@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" + integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== + 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" + timed-out@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== +title-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" + integrity sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q== + dependencies: + no-case "^2.2.0" + upper-case "^1.0.3" + tmp@0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -6117,16 +7241,6 @@ tmp@0.0.33: dependencies: os-tmpdir "~1.0.2" -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-readable-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" - integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -6139,7 +7253,7 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== -tough-cookie@~2.5.0: +tough-cookie@^2.3.3, tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== @@ -6152,57 +7266,38 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -truffle-contract-size@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/truffle-contract-size/-/truffle-contract-size-2.0.1.tgz#9ec1b078b0b3221cc1612400bd6f5df83c7a3a09" - integrity sha512-AIKPwHPC/1pZwtVjgUcgcK23k6gWxKhn4ZnKLr339uieb94UgAUeIwGUkfc87T+0lqgC6ePY7YhsFeoZK2YEsA== - dependencies: - cli-table "^0.3.1" - yargs "^15.3.1" - -truffle@5.1.49: - version "5.1.49" - resolved "https://registry.yarnpkg.com/truffle/-/truffle-5.1.49.tgz#c9edc95192047ff4d170fcad235d26d0c4545de5" - integrity sha512-SkCfYRPhruowxH+qpJBAvM0u5+j/LK51U85ErXeiuRhyCNEWMNjUtISHTlEZ0KLr0Kki68iXk+o2UekN4Nlp5g== +ts-command-line-args@^2.2.0: + version "2.5.1" + resolved "https://registry.yarnpkg.com/ts-command-line-args/-/ts-command-line-args-2.5.1.tgz#e64456b580d1d4f6d948824c274cf6fa5f45f7f0" + integrity sha512-H69ZwTw3rFHb5WYpQya40YAX2/w7Ut75uUECbgBIsLmM+BNuYnxsltfyyLMxy6sEeKxgijLTnQtLd0nKd6+IYw== dependencies: - app-module-path "^2.2.0" - mocha "8.1.2" - original-require "1.0.1" + chalk "^4.1.0" + command-line-args "^5.1.1" + command-line-usage "^6.1.0" + string-format "^2.0.0" -ts-essentials@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-1.0.4.tgz#ce3b5dade5f5d97cf69889c11bf7d2da8555b15a" - integrity sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ== - -ts-essentials@^6.0.3: - version "6.0.7" - resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-6.0.7.tgz#5f4880911b7581a873783740ce8b94da163d18a6" - integrity sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw== - -ts-generator@^0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/ts-generator/-/ts-generator-0.0.8.tgz#7bd48ca064db026d9520bcb682b69efc20971d6a" - integrity sha512-Gi+aZCELpVL7Mqb+GuMgM+n8JZ/arZZib1iD/R9Ok8JDjOCOCrqS9b1lr72ku7J45WeDCFZxyJoRsiQvhokCnw== - dependencies: - "@types/mkdirp" "^0.5.2" - "@types/prettier" "^1.13.2" - "@types/resolve" "^0.0.8" - chalk "^2.4.1" - glob "^7.1.2" - mkdirp "^0.5.1" - prettier "^1.14.2" - resolve "^1.8.1" - ts-essentials "^1.0.0" - -ts-node@^8.10.2: - version "8.10.2" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" - integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA== - dependencies: +ts-essentials@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" + integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== + +ts-node@>=8.0.0: + version "10.9.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" + integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + 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" - source-map-support "^0.5.17" + v8-compile-cache-lib "^3.0.1" yn "3.1.1" tsconfig-paths@^3.14.1: @@ -6215,11 +7310,21 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^1.8.1: +tslib@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + +tslib@^1.8.1, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tsort@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" + integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== + tsutils@^3.17.1: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -6234,7 +7339,7 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" -tweetnacl-util@^0.15.0: +tweetnacl-util@^0.15.1: version "0.15.1" resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== @@ -6273,6 +7378,16 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -6291,18 +7406,21 @@ type@^2.7.2: resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== -typechain@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/typechain/-/typechain-2.0.1.tgz#4fa91006d871e5805d41f265880603d0817b74d6" - integrity sha512-GVigpARnr2tV9L+8WecF5huK+qEonNgh+Vp9UR/EayoTV4+3G8Yabhvf+p/QJVOz3JLM4Eo3ERxYmjjJMRXc/A== +typechain@^8.1.0: + version "8.3.1" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.3.1.tgz#dccbc839b94877997536c356380eff7325395cfb" + integrity sha512-fA7clol2IP/56yq6vkMTR+4URF1nGjV82Wx6Rf09EsqD4tkzMAvEaqYxVFCavJm/1xaRga/oD55K+4FtuXwQOQ== dependencies: - command-line-args "^4.0.7" - debug "^4.1.1" + "@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" - ts-essentials "^6.0.3" - ts-generator "^0.0.8" + mkdirp "^1.0.4" + prettier "^2.3.1" + ts-command-line-args "^2.2.0" + ts-essentials "^7.0.1" typed-array-buffer@^1.0.0: version "1.0.0" @@ -6350,15 +7468,25 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@5.1.6: +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== + +typescript@>=4.5.0: version "5.1.6" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== -typical@^2.6.0, typical@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" - integrity sha512-ofhi8kjIje6npGozTip9Fr8iecmYfEbS06i0JnIg+rh51KakryWF4+jX8lLKZVhy6N+ID45WYSFCxPOdTWCzNg== +typical@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" + integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== + +typical@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" + integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== uglify-js@^3.1.4: version "3.17.4" @@ -6380,23 +7508,44 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" +underscore@^1.8.3: + version "1.13.6" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" + integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== + +undici@^5.14.0: + version "5.28.3" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.3.tgz#a731e0eff2c3fcfd41c1169a869062be222d1e5b" + integrity sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA== + dependencies: + "@fastify/busboy" "^2.0.0" + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== -update-browserslist-db@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" - integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== +upper-case-first@^1.1.0, upper-case-first@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" + integrity sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ== dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" + upper-case "^1.1.1" + +upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + integrity sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA== uri-js@^4.2.2: version "4.4.1" @@ -6405,23 +7554,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ== - dependencies: - prepend-http "^2.0.0" - url-set-query@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg== -url-template@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" - integrity sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw== - utf-8-validate@^5.0.2: version "5.0.10" resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" @@ -6439,7 +7576,7 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -util@^0.12.0, util@^0.12.5: +util@^0.12.5: version "0.12.5" resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== @@ -6460,17 +7597,12 @@ uuid@2.0.1: resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" integrity sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg== -uuid@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.0.0, uuid@^8.3.2: +uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== @@ -6480,11 +7612,24 @@ uuid@^9.0.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + v8-compile-cache@^2.0.3: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + varint@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" @@ -6513,13 +7658,13 @@ web3-bzz@1.10.0: got "12.1.0" swarm-js "^0.1.40" -web3-bzz@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.7.4.tgz#9419e606e38a9777443d4ce40506ebd796e06075" - integrity sha512-w9zRhyEqTK/yi0LGRHjZMcPCfP24LBjYXI/9YxFw9VqsIZ9/G0CRCnUt12lUx0A56LRAMpF7iQ8eA73aBcO29Q== +web3-bzz@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.10.1.tgz#29edb8e91e806a4cf69de0735b4cdc18b21fb4f0" + integrity sha512-0T2BTYm9mLPpnRJuXSS7PA39dTXCPj6a3/Qdee84Plm6WsSIl4aZooJ4YUMnlII8HjyzwiIzjnH7AEZrBcBu9w== dependencies: "@types/node" "^12.12.6" - got "9.6.0" + got "12.1.0" swarm-js "^0.1.40" web3-core-helpers@1.10.0: @@ -6530,13 +7675,13 @@ web3-core-helpers@1.10.0: web3-eth-iban "1.10.0" web3-utils "1.10.0" -web3-core-helpers@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.7.4.tgz#f8f808928560d3e64e0c8d7bdd163aa4766bcf40" - integrity sha512-F8PH11qIkE/LpK4/h1fF/lGYgt4B6doeMi8rukeV/s4ivseZHHslv1L6aaijLX/g/j4PsFmR42byynBI/MIzFg== +web3-core-helpers@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.10.1.tgz#dd597adc758efe03b380f1423a4da3de1757530b" + integrity sha512-lgOgdiIyIIXxIVjEHjT8PC2CsjFvvBXfVF0Xq5SiRcPKj47B2F7uur0gPoPc6e6+kjo49qEqLlx6eZKOkCAR1A== dependencies: - web3-eth-iban "1.7.4" - web3-utils "1.7.4" + web3-eth-iban "1.10.1" + web3-utils "1.10.1" web3-core-method@1.10.0: version "1.10.0" @@ -6549,16 +7694,16 @@ web3-core-method@1.10.0: web3-core-subscriptions "1.10.0" web3-utils "1.10.0" -web3-core-method@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.7.4.tgz#3873c6405e1a0a8a1efc1d7b28de8b7550b00c15" - integrity sha512-56K7pq+8lZRkxJyzf5MHQPI9/VL3IJLoy4L/+q8HRdZJ3CkB1DkXYaXGU2PeylG1GosGiSzgIfu1ljqS7CP9xQ== +web3-core-method@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.10.1.tgz#decd9a11d95c199960477b297a45b8f135ac7770" + integrity sha512-QEqgMsagp6vs0GOlI4QHzZcsvzJs+Zp1Eo8uOZgosYoRfusklzfPmX4OYg4H6XyenCavgvmAkxw0g8y8hlLHiQ== dependencies: "@ethersproject/transactions" "^5.6.2" - web3-core-helpers "1.7.4" - web3-core-promievent "1.7.4" - web3-core-subscriptions "1.7.4" - web3-utils "1.7.4" + web3-core-helpers "1.10.1" + web3-core-promievent "1.10.1" + web3-core-subscriptions "1.10.1" + web3-utils "1.10.1" web3-core-promievent@1.10.0: version "1.10.0" @@ -6567,10 +7712,10 @@ web3-core-promievent@1.10.0: dependencies: eventemitter3 "4.0.4" -web3-core-promievent@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.7.4.tgz#80a75633fdfe21fbaae2f1e38950edb2f134868c" - integrity sha512-o4uxwXKDldN7ER7VUvDfWsqTx9nQSP1aDssi1XYXeYC2xJbVo0n+z6ryKtmcoWoRdRj7uSpVzal3nEmlr480mA== +web3-core-promievent@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.10.1.tgz#d20b1328d1ff8881acb8cf4b5749bb2218798b0e" + integrity sha512-ggInbRxkx0n0FVMU5GXx9pbTwq7rfF2DJ6J6AafifOC0P0269TbHfFKMlU7B5K5i6/VQxrsY9fBPf6am9DmQuw== dependencies: eventemitter3 "4.0.4" @@ -6585,16 +7730,16 @@ web3-core-requestmanager@1.10.0: web3-providers-ipc "1.10.0" web3-providers-ws "1.10.0" -web3-core-requestmanager@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.7.4.tgz#2dc8a526dab8183dca3fef54658621801b1d0469" - integrity sha512-IuXdAm65BQtPL4aI6LZJJOrKAs0SM5IK2Cqo2/lMNvVMT9Kssq6qOk68Uf7EBDH0rPuINi+ReLP+uH+0g3AnPA== +web3-core-requestmanager@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.10.1.tgz#f0c765ae811c1c0b24c7c8ede8e9a254bc520fce" + integrity sha512-hBHuKbh8PGrSs4vTg2EA7xM+BIDVOrmOZnK4I+KeWw8zZr6bmhhk8xkmtKo2/0fADAkvVqMiJwuZcpRr3DILnw== dependencies: - util "^0.12.0" - web3-core-helpers "1.7.4" - web3-providers-http "1.7.4" - web3-providers-ipc "1.7.4" - web3-providers-ws "1.7.4" + util "^0.12.5" + web3-core-helpers "1.10.1" + web3-providers-http "1.10.1" + web3-providers-ipc "1.10.1" + web3-providers-ws "1.10.1" web3-core-subscriptions@1.10.0: version "1.10.0" @@ -6604,13 +7749,13 @@ web3-core-subscriptions@1.10.0: eventemitter3 "4.0.4" web3-core-helpers "1.10.0" -web3-core-subscriptions@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.7.4.tgz#cfbd3fa71081a8c8c6f1a64577a1a80c5bd9826f" - integrity sha512-VJvKWaXRyxk2nFWumOR94ut9xvjzMrRtS38c4qj8WBIRSsugrZr5lqUwgndtj0qx4F+50JhnU++QEqUEAtKm3g== +web3-core-subscriptions@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.10.1.tgz#1e19ef59f9844c31a85f1b9c17088a786029c118" + integrity sha512-6B7cA7lUwCAh7X55gTMfFkC9L8en3bddqFi+VNO9SO9af62t2L5xTb8pxZEFirIF4s4qKxKekLgZrRhpmlO3eA== dependencies: eventemitter3 "4.0.4" - web3-core-helpers "1.7.4" + web3-core-helpers "1.10.1" web3-core@1.10.0: version "1.10.0" @@ -6625,18 +7770,18 @@ web3-core@1.10.0: web3-core-requestmanager "1.10.0" web3-utils "1.10.0" -web3-core@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.7.4.tgz#943fff99134baedafa7c65b4a0bbd424748429ff" - integrity sha512-L0DCPlIh9bgIED37tYbe7bsWrddoXYc897ANGvTJ6MFkSNGiMwDkTLWSgYd9Mf8qu8b4iuPqXZHMwIo4atoh7Q== +web3-core@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.10.1.tgz#a4cb471356c4a197654b61adc9d0b03357da4258" + integrity sha512-a45WF/e2VeSs17UTmmWhEaMDv/A+N6qchA7zepvdvwUGCZME39YWCmbsjAYjkq0btsXueOIBpS6fLuq5VoLkFg== dependencies: - "@types/bn.js" "^5.1.0" + "@types/bn.js" "^5.1.1" "@types/node" "^12.12.6" bignumber.js "^9.0.0" - web3-core-helpers "1.7.4" - web3-core-method "1.7.4" - web3-core-requestmanager "1.7.4" - web3-utils "1.7.4" + web3-core-helpers "1.10.1" + web3-core-method "1.10.1" + web3-core-requestmanager "1.10.1" + web3-utils "1.10.1" web3-eth-abi@1.10.0: version "1.10.0" @@ -6646,13 +7791,13 @@ web3-eth-abi@1.10.0: "@ethersproject/abi" "^5.6.3" web3-utils "1.10.0" -web3-eth-abi@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.7.4.tgz#3fee967bafd67f06b99ceaddc47ab0970f2a614a" - integrity sha512-eMZr8zgTbqyL9MCTCAvb67RbVyN5ZX7DvA0jbLOqRWCiw+KlJKTGnymKO6jPE8n5yjk4w01e165Qb11hTDwHgg== +web3-eth-abi@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.10.1.tgz#4d64d1d272f35f7aaae7be9679493474e0af86c7" + integrity sha512-hk5NyeGweJYTjes7lBW7gtG7iYoN6HLt6E4FQDrHPdwZjwNmvzaOH9N8zMTCxNFXUlg0bzeTOzWwMA717a+4eg== dependencies: "@ethersproject/abi" "^5.6.3" - web3-utils "1.7.4" + web3-utils "1.10.1" web3-eth-accounts@1.10.0: version "1.10.0" @@ -6670,22 +7815,21 @@ web3-eth-accounts@1.10.0: web3-core-method "1.10.0" web3-utils "1.10.0" -web3-eth-accounts@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.7.4.tgz#7a24a4dfe947f7e9d1bae678529e591aa146167a" - integrity sha512-Y9vYLRKP7VU7Cgq6wG1jFaG2k3/eIuiTKAG8RAuQnb6Cd9k5BRqTm5uPIiSo0AP/u11jDomZ8j7+WEgkU9+Btw== +web3-eth-accounts@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.10.1.tgz#24960e68c1ff3aaa57b96195c151f21bf9b9a0c0" + integrity sha512-x8zevaF4FYOIZqR3fdzdeKPf1Ek/O3HFptYH42IucYI5bK+o6ORebDuOOaIZqrF/c8ijcjGoo+cUDN9/5jU6Cw== dependencies: - "@ethereumjs/common" "^2.5.0" - "@ethereumjs/tx" "^3.3.2" - crypto-browserify "3.12.0" + "@ethereumjs/common" "2.5.0" + "@ethereumjs/tx" "3.3.2" + "@ethereumjs/util" "^8.1.0" eth-lib "0.2.8" - ethereumjs-util "^7.0.10" scrypt-js "^3.0.1" - uuid "3.3.2" - web3-core "1.7.4" - web3-core-helpers "1.7.4" - web3-core-method "1.7.4" - web3-utils "1.7.4" + uuid "^9.0.0" + web3-core "1.10.1" + web3-core-helpers "1.10.1" + web3-core-method "1.10.1" + web3-utils "1.10.1" web3-eth-contract@1.10.0: version "1.10.0" @@ -6701,19 +7845,19 @@ web3-eth-contract@1.10.0: web3-eth-abi "1.10.0" web3-utils "1.10.0" -web3-eth-contract@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.7.4.tgz#e5761cfb43d453f57be4777b2e5e7e1082078ff7" - integrity sha512-ZgSZMDVI1pE9uMQpK0T0HDT2oewHcfTCv0osEqf5qyn5KrcQDg1GT96/+S0dfqZ4HKj4lzS5O0rFyQiLPQ8LzQ== +web3-eth-contract@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.10.1.tgz#8f8a514db8a1c81337e67a60054840edfc8c26bb" + integrity sha512-eRZItYq8LzSPOKqgkTaT1rRruXTNkjbeIe9Cs+VFx3+p/GHyUI1Rj4rfBXp1MBR6p4WK+oy05sB+FNugOYxe8Q== dependencies: - "@types/bn.js" "^5.1.0" - web3-core "1.7.4" - web3-core-helpers "1.7.4" - web3-core-method "1.7.4" - web3-core-promievent "1.7.4" - web3-core-subscriptions "1.7.4" - web3-eth-abi "1.7.4" - web3-utils "1.7.4" + "@types/bn.js" "^5.1.1" + web3-core "1.10.1" + web3-core-helpers "1.10.1" + web3-core-method "1.10.1" + web3-core-promievent "1.10.1" + web3-core-subscriptions "1.10.1" + web3-eth-abi "1.10.1" + web3-utils "1.10.1" web3-eth-ens@1.10.0: version "1.10.0" @@ -6729,19 +7873,19 @@ web3-eth-ens@1.10.0: web3-eth-contract "1.10.0" web3-utils "1.10.0" -web3-eth-ens@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.7.4.tgz#346720305379c0a539e226141a9602f1da7bc0c8" - integrity sha512-Gw5CVU1+bFXP5RVXTCqJOmHn71X2ghNk9VcEH+9PchLr0PrKbHTA3hySpsPco1WJAyK4t8SNQVlNr3+bJ6/WZA== +web3-eth-ens@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.10.1.tgz#3064b77f2de2c0f77136479f8b388a48e3fb1a85" + integrity sha512-WtcLhYTBeoKj+CbuyG3JQWcQynOXmv/l5CB27C3hJ42WWPa/XfUAsDmPbJp3YkqUbK3lE6iLT2yzwQIHfqmd0g== dependencies: content-hash "^2.5.2" eth-ens-namehash "2.0.8" - web3-core "1.7.4" - web3-core-helpers "1.7.4" - web3-core-promievent "1.7.4" - web3-eth-abi "1.7.4" - web3-eth-contract "1.7.4" - web3-utils "1.7.4" + web3-core "1.10.1" + web3-core-helpers "1.10.1" + web3-core-promievent "1.10.1" + web3-eth-abi "1.10.1" + web3-eth-contract "1.10.1" + web3-utils "1.10.1" web3-eth-iban@1.10.0: version "1.10.0" @@ -6751,13 +7895,13 @@ web3-eth-iban@1.10.0: bn.js "^5.2.1" web3-utils "1.10.0" -web3-eth-iban@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.7.4.tgz#711fb2547fdf0f988060027331b2b6c430505753" - integrity sha512-XyrsgWlZQMv5gRcjXMsNvAoCRvV5wN7YCfFV5+tHUCqN8g9T/o4XUS20vDWD0k4HNiAcWGFqT1nrls02MGZ08w== +web3-eth-iban@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.10.1.tgz#8a40f16218cd774e965b72dc2ca36449f8fdb072" + integrity sha512-3n1ibzYIza9ac/iB/wEnzvnmut/u6g/x6WitxxdEMVUZshGqqnBv6HDVx25iO9TxWmala+GgmRKHnEMKCh74Yg== dependencies: bn.js "^5.2.1" - web3-utils "1.7.4" + web3-utils "1.10.1" web3-eth-personal@1.10.0: version "1.10.0" @@ -6771,17 +7915,17 @@ web3-eth-personal@1.10.0: web3-net "1.10.0" web3-utils "1.10.0" -web3-eth-personal@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.7.4.tgz#22c399794cb828a75703df8bb4b3c1331b471546" - integrity sha512-O10C1Hln5wvLQsDhlhmV58RhXo+GPZ5+W76frSsyIrkJWLtYQTCr5WxHtRC9sMD1idXLqODKKgI2DL+7xeZ0/g== +web3-eth-personal@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.10.1.tgz#ebeb86d4f812ef0a562129144b0ab10f0d07a0e7" + integrity sha512-Th4AEMbxUhH+GEqYpluWYBb+PszZ9GsdmsOhN8fo4aQHSKMfvyP+scqgOMqxK3rvobpSy/EZ6zdbAkinhoi55g== dependencies: "@types/node" "^12.12.6" - web3-core "1.7.4" - web3-core-helpers "1.7.4" - web3-core-method "1.7.4" - web3-net "1.7.4" - web3-utils "1.7.4" + web3-core "1.10.1" + web3-core-helpers "1.10.1" + web3-core-method "1.10.1" + web3-net "1.10.1" + web3-utils "1.10.1" web3-eth@1.10.0: version "1.10.0" @@ -6801,23 +7945,23 @@ web3-eth@1.10.0: web3-net "1.10.0" web3-utils "1.10.0" -web3-eth@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.7.4.tgz#a7c1d3ccdbba4de4a82df7e3c4db716e4a944bf2" - integrity sha512-JG0tTMv0Ijj039emXNHi07jLb0OiWSA9O24MRSk5vToTQyDNXihdF2oyq85LfHuF690lXZaAXrjhtLNlYqb7Ug== - dependencies: - web3-core "1.7.4" - web3-core-helpers "1.7.4" - web3-core-method "1.7.4" - web3-core-subscriptions "1.7.4" - web3-eth-abi "1.7.4" - web3-eth-accounts "1.7.4" - web3-eth-contract "1.7.4" - web3-eth-ens "1.7.4" - web3-eth-iban "1.7.4" - web3-eth-personal "1.7.4" - web3-net "1.7.4" - web3-utils "1.7.4" +web3-eth@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.10.1.tgz#6a8b46e95e0df58afc06bb052aadca89448e5af6" + integrity sha512-EV/d/TFVZcB54wpx2ndFnApla+aztsBOpZkbDreHcETLN1v6XmXyKozo0gYoQMZElKZ6QRRPEFvDjPeXdA7DBw== + dependencies: + web3-core "1.10.1" + web3-core-helpers "1.10.1" + web3-core-method "1.10.1" + web3-core-subscriptions "1.10.1" + web3-eth-abi "1.10.1" + web3-eth-accounts "1.10.1" + web3-eth-contract "1.10.1" + web3-eth-ens "1.10.1" + web3-eth-iban "1.10.1" + web3-eth-personal "1.10.1" + web3-net "1.10.1" + web3-utils "1.10.1" web3-net@1.10.0: version "1.10.0" @@ -6828,14 +7972,14 @@ web3-net@1.10.0: web3-core-method "1.10.0" web3-utils "1.10.0" -web3-net@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.7.4.tgz#3153dfd3423262dd6fbec7aae5467202c4cad431" - integrity sha512-d2Gj+DIARHvwIdmxFQ4PwAAXZVxYCR2lET0cxz4KXbE5Og3DNjJi+MoPkX+WqoUXqimu/EOd4Cd+7gefqVAFDg== +web3-net@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.10.1.tgz#66c6a24c4b9b0bbd9603cc58decda346a8222365" + integrity sha512-06VgKyabOvj0mE7LkT1lY2A17sP32jpMAh2TniZ8ZgC3Dq36+C5LtrY17LgLSaModpvCPbpzPgbTlqB0xhssew== dependencies: - web3-core "1.7.4" - web3-core-method "1.7.4" - web3-utils "1.7.4" + web3-core "1.10.1" + web3-core-method "1.10.1" + web3-utils "1.10.1" web3-providers-http@1.10.0: version "1.10.0" @@ -6847,13 +7991,15 @@ web3-providers-http@1.10.0: es6-promise "^4.2.8" web3-core-helpers "1.10.0" -web3-providers-http@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.7.4.tgz#8209cdcb115db5ccae1f550d1c4e3005e7538d02" - integrity sha512-AU+/S+49rcogUER99TlhW+UBMk0N2DxvN54CJ2pK7alc2TQ7+cprNPLHJu4KREe8ndV0fT6JtWUfOMyTvl+FRA== +web3-providers-http@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.10.1.tgz#cc35007edf1483b971652414c1d4d1820fbcd5c7" + integrity sha512-haHlG4Ig8VQdx+HdnJgJPpJwLWkAE1aXcacOfaGd2hnXPqVYRocwYqgZD/Q9pUq3u4rIZezhUaFXNRByzAfMsw== dependencies: - web3-core-helpers "1.7.4" - xhr2-cookies "1.1.0" + abortcontroller-polyfill "^1.7.3" + cross-fetch "^3.1.4" + es6-promise "^4.2.8" + web3-core-helpers "1.10.1" web3-providers-ipc@1.10.0: version "1.10.0" @@ -6863,13 +8009,13 @@ web3-providers-ipc@1.10.0: oboe "2.1.5" web3-core-helpers "1.10.0" -web3-providers-ipc@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.7.4.tgz#02e85e99e48f432c9d34cee7d786c3685ec9fcfa" - integrity sha512-jhArOZ235dZy8fS8090t60nTxbd1ap92ibQw5xIrAQ9m7LcZKNfmLAQUVsD+3dTFvadRMi6z1vCO7zRi84gWHw== +web3-providers-ipc@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.10.1.tgz#8d1126745da4e273034bb79aae483612768cc612" + integrity sha512-eYrLoC2OEOlxHdsWjKpw3gwKQuQG6rcd3lc41S6cC6UpkR2pszkXUTpXVKTKFFT3eWgVAYIVz/lCeilbYLgw5A== dependencies: oboe "2.1.5" - web3-core-helpers "1.7.4" + web3-core-helpers "1.10.1" web3-providers-ws@1.10.0: version "1.10.0" @@ -6880,13 +8026,13 @@ web3-providers-ws@1.10.0: web3-core-helpers "1.10.0" websocket "^1.0.32" -web3-providers-ws@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.7.4.tgz#6e60bcefb456f569a3e766e386d7807a96f90595" - integrity sha512-g72X77nrcHMFU8hRzQJzfgi/072n8dHwRCoTw+WQrGp+XCQ71fsk2qIu3Tp+nlp5BPn8bRudQbPblVm2uT4myQ== +web3-providers-ws@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.10.1.tgz#b079f0a030ddc33b64a0692e7054fcfefe9fae43" + integrity sha512-ZCHGVH4YTVA5MCaOgmV0UJya7jTh4Vd0CFWiGqruha9/xF0fBZRYMm0awYcI9eDvVP0hRU/C9CeH5tj7UQBnTw== dependencies: eventemitter3 "4.0.4" - web3-core-helpers "1.7.4" + web3-core-helpers "1.10.1" websocket "^1.0.32" web3-shh@1.10.0: @@ -6899,17 +8045,17 @@ web3-shh@1.10.0: web3-core-subscriptions "1.10.0" web3-net "1.10.0" -web3-shh@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.7.4.tgz#bee91cce2737c529fd347274010b548b6ea060f1" - integrity sha512-mlSZxSYcMkuMCxqhTYnZkUdahZ11h+bBv/8TlkXp/IHpEe4/Gg+KAbmfudakq3EzG/04z70XQmPgWcUPrsEJ+A== +web3-shh@1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.10.1.tgz#ded94bf40bef752f52f0380f62386dd5ea00f0af" + integrity sha512-PoRfyM5NtHiQufxWDEgLhxpeDkkZos/ijjiT1IQafmD0iurMBxLU+k9OjRX2oblVyP3nPl1sSBQTYFe3b33JGA== dependencies: - web3-core "1.7.4" - web3-core-method "1.7.4" - web3-core-subscriptions "1.7.4" - web3-net "1.7.4" + web3-core "1.10.1" + web3-core-method "1.10.1" + web3-core-subscriptions "1.10.1" + web3-net "1.10.1" -web3-utils@1.10.0, web3-utils@^1.3.0: +web3-utils@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.0.tgz#ca4c1b431a765c14ac7f773e92e0fd9377ccf578" integrity sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg== @@ -6922,20 +8068,21 @@ web3-utils@1.10.0, web3-utils@^1.3.0: randombytes "^2.1.0" utf8 "3.0.0" -web3-utils@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.7.4.tgz#eb6fa3706b058602747228234453811bbee017f5" - integrity sha512-acBdm6Evd0TEZRnChM/MCvGsMwYKmSh7OaUfNf5OKG0CIeGWD/6gqLOWIwmwSnre/2WrA1nKGId5uW2e5EfluA== +web3-utils@1.10.1, web3-utils@^1.0.0-beta.31, web3-utils@^1.3.6: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.1.tgz#97532130d85358628bc0ff14d94b7e9449786983" + integrity sha512-r6iUUw/uMnNcWXjhRv33Nyrhxq3VGOPBXeSzxhOXIci4SvC/LPTpROY0uTrMX7ztKyODYrHp8WhTkEf+ZnHssw== dependencies: + "@ethereumjs/util" "^8.1.0" bn.js "^5.2.1" ethereum-bloom-filters "^1.0.6" - ethereumjs-util "^7.1.0" + 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@1.10.0, web3@^1.2.11: +web3@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/web3/-/web3-1.10.0.tgz#2fde0009f59aa756c93e07ea2a7f3ab971091274" integrity sha512-YfKY9wSkGcM8seO+daR89oVTcbu18NsVfvOngzqMYGUU0pPSQmE57qQDvQzUeoIOHAnXEBNzrhjQJmm8ER0rng== @@ -6948,18 +8095,18 @@ web3@1.10.0, web3@^1.2.11: web3-shh "1.10.0" web3-utils "1.10.0" -web3@1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.7.4.tgz#00c9aef8e13ade92fd773d845fff250535828e93" - integrity sha512-iFGK5jO32vnXM/ASaJBaI0+gVR6uHozvYdxkdhaeOCD6HIQ4iIXadbO2atVpE9oc/H8l2MovJ4LtPhG7lIBN8A== +web3@^1.0.0-beta.34, web3@^1.2.11: + version "1.10.1" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.10.1.tgz#6435783cb2c0a8347f62b7b1a6ade431f19dce2a" + integrity sha512-Ry+teufg6GYwIlLijyVTzZmnP+pu55vBU6P7rwK/rZidsMhc3m1lA5UXxiUVzBYZ8dvzV6+dVvOh68RrwrsI1w== dependencies: - web3-bzz "1.7.4" - web3-core "1.7.4" - web3-eth "1.7.4" - web3-eth-personal "1.7.4" - web3-net "1.7.4" - web3-shh "1.7.4" - web3-utils "1.7.4" + web3-bzz "1.10.1" + web3-core "1.10.1" + web3-eth "1.10.1" + web3-eth-personal "1.10.1" + web3-net "1.10.1" + web3-shh "1.10.1" + web3-utils "1.10.1" webidl-conversions@^3.0.0: version "3.0.1" @@ -6978,11 +8125,6 @@ websocket@^1.0.32: utf-8-validate "^5.0.2" yaeti "^0.0.6" -whatwg-fetch@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" - integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== - whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -7002,6 +8144,11 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + integrity sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ== + which-module@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" @@ -7019,20 +8166,20 @@ which-typed-array@^1.1.10, which-typed-array@^1.1.2: has-tostringtag "^1.0.0" is-typed-array "^1.1.10" -which@2.0.2, which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -which@^1.1.1, which@^1.2.9, which@^1.3.1: +which@1.3.1, which@^1.1.1, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + wide-align@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" @@ -7040,6 +8187,11 @@ wide-align@1.1.3: dependencies: string-width "^1.0.2 || 2" +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + integrity sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw== + word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" @@ -7050,10 +8202,26 @@ wordwrap@>=0.0.2, wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -workerpool@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.0.tgz#85aad67fa1a2c8ef9386a1b43539900f61d03d58" - integrity sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA== +wordwrapjs@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f" + integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA== + dependencies: + reduce-flatten "^2.0.0" + typical "^5.2.0" + +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw== + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" wrap-ansi@^5.1.0: version "5.1.0" @@ -7064,10 +8232,10 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" string-width "^4.1.0" @@ -7078,6 +8246,16 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +ws@8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" + integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== + ws@^3.0.0: version "3.3.3" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" @@ -7087,12 +8265,10 @@ ws@^3.0.0: safe-buffer "~5.1.0" ultron "~1.1.0" -ws@^5.1.1: - version "5.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.3.tgz#05541053414921bc29c63bee14b8b0dd50b07b3d" - integrity sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA== - dependencies: - async-limiter "~1.0.0" +ws@^7.4.6: + version "7.5.9" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" + integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== xhr-request-promise@^0.1.2: version "0.1.3" @@ -7114,14 +8290,7 @@ xhr-request@^1.0.1, xhr-request@^1.1.0: url-set-query "^1.0.0" xhr "^2.0.4" -xhr2-cookies@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48" - integrity sha512-hjXUA6q+jl/bd8ADHcVfFsSPIf+tyLIjuO9TwJC9WI6JP2zKcS7C+p56I9kCLLsaCiNT035iYvEUUzdEFj/8+g== - dependencies: - cookiejar "^2.1.1" - -xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: +xhr@^2.0.4, xhr@^2.3.3: version "2.6.0" resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== @@ -7131,28 +8300,36 @@ xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: parse-headers "^2.0.0" xtend "^4.0.0" +xml@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" + integrity sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw== + xmlhttprequest@1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" integrity sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA== -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0: +xtend@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -xtend@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" - integrity sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ== - dependencies: - object-keys "~0.4.0" +y18n@^3.2.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" + integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== y18n@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + yaeti@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" @@ -7168,7 +8345,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: +yargs-parser@13.1.2, yargs-parser@^13.1.2: version "13.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== @@ -7176,51 +8353,44 @@ yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^15.0.1: - version "15.0.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-15.0.3.tgz#316e263d5febe8b38eef61ac092b33dfcc9b1115" - integrity sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== -yargs-parser@^18.1.2: - version "18.1.3" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" - integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== +yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + integrity sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA== dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" + camelcase "^3.0.0" + lodash.assign "^4.0.6" -yargs-unparser@1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.1.tgz#bd4b0ee05b4c94d058929c32cb09e3fce71d3c5f" - integrity sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA== +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== dependencies: - camelcase "^5.3.1" - decamelize "^1.2.0" flat "^4.1.0" - is-plain-obj "^1.1.0" - yargs "^14.2.3" + lodash "^4.17.15" + yargs "^13.3.0" -yargs@13.2.4: - version "13.2.4" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" - integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - os-locale "^3.1.0" - 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.0" + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" -yargs@13.3.2: +yargs@13.3.2, yargs@^13.3.0: version "13.3.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== @@ -7236,39 +8406,38 @@ yargs@13.3.2: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@^14.2.3: - version "14.2.3" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" - integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg== +yargs@16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: - cliui "^5.0.0" - decamelize "^1.2.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" 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 "^15.0.1" - -yargs@^15.3.1: - version "15.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" - integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== - dependencies: - cliui "^6.0.0" - decamelize "^1.2.0" - find-up "^4.1.0" - get-caller-file "^2.0.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yargs@^4.7.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + integrity sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA== + 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 "^2.0.0" + require-main-filename "^1.0.1" set-blocking "^2.0.0" - string-width "^4.2.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^18.1.2" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" yn@3.1.1: version "3.1.1"