diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000000..8efdd5f0684 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,6 @@ +{ + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "root": true +} diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 8ce206c849e..9346d073df6 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -17,4 +17,4 @@ - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. -- [ ] Code has been formatted via `zk fmt` and `zk lint`. +- [ ] Code has been formatted via `yarn prettier:write` and `yarn lint:fix`. diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1b370e0ba3c..100b1e0872c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,12 +18,9 @@ jobs: - name: Install dependencies run: yarn - - name: Build Solidity artifacts + - name: Build artifacts run: yarn build - - name: Build yul artifacts - run: yarn preprocess && yarn compile-yul - - name: Create cache uses: actions/cache/save@v3 with: @@ -36,8 +33,27 @@ jobs: contracts/precompiles/artifacts bootloader/build + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout the repository + uses: actions/checkout@v3 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.18.0 + cache: yarn + + - name: Install dependencies + run: yarn + + - name: Run lint + run: yarn lint + test: - needs: [build] + needs: [build, lint] runs-on: ubuntu-latest steps: @@ -69,13 +85,11 @@ jobs: contracts/precompiles/artifacts bootloader/build - - name: Run tests run: yarn test - test_bootloader: - needs: [build] + needs: [build, lint] runs-on: ubuntu-latest steps: @@ -100,6 +114,5 @@ jobs: contracts/precompiles/artifacts bootloader/build - - name: Run bootloader tests run: "cd bootloader/test_infra && cargo run" diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 00000000000..3c3629e647f --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1 @@ +node_modules diff --git a/.markdownlintrc b/.markdownlintrc new file mode 100644 index 00000000000..d6bb9e817f9 --- /dev/null +++ b/.markdownlintrc @@ -0,0 +1,9 @@ +{ + "default": true, + "header-increment": false, + "no-duplicate-header": false, + "no-inline-html": false, + "line-length": false, + "fenced-code-language": false, + "no-multiple-blanks": false +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000000..47d8572ede0 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +contracts/openzeppelin diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000000..4c7b1e9d975 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,63 @@ +{ + "plugins": ["prettier-plugin-solidity"], + "overrides": [ + { + "files": "*.js", + "options": { + "tabWidth": 4, + "printWidth": 120, + "singleQuote": true, + "trailingComma": "none", + "bracketSpacing": true + } + }, + { + "files": "*.json", + "options": { + "tabWidth": 2, + "printWidth": 120, + "bracketSpacing": true + } + }, + { + "files": "*.md", + "options": { + "tabWidth": 2, + "printWidth": 120, + "parser": "markdown", + "singleQuote": true, + "trailingComma": "none", + "bracketSpacing": true, + "proseWrap": "always" + } + }, + { + "files": "*.sol", + "options": { + "printWidth": 120, + "tabWidth": 4, + "useTabs": false, + "singleQuote": false, + "bracketSpacing": false + } + }, + { + "files": "*.ts", + "options": { + "tabWidth": 4, + "printWidth": 120, + "parser": "typescript", + "singleQuote": true, + "trailingComma": "none", + "bracketSpacing": true + } + }, + { + "files": "*.yaml", + "options": { + "tabWidth": 2, + "printWidth": 120 + } + } + ] +} diff --git a/.solhint.json b/.solhint.json new file mode 100644 index 00000000000..5329702dfb5 --- /dev/null +++ b/.solhint.json @@ -0,0 +1,20 @@ +{ + "extends": "solhint:recommended", + "rules": { + "state-visibility": "off", + "func-visibility": ["warn", { "ignoreConstructors": true }], + "var-name-mixedcase": "off", + "avoid-call-value": "off", + "no-empty-blocks": "off", + "not-rely-on-time": "off", + "avoid-low-level-calls": "off", + "no-inline-assembly": "off", + "const-name-snakecase": "off", + "no-complex-fallback": "off", + "reason-string": "off", + "func-name-mixedcase": "off", + "no-unused-vars": "off", + "max-states-count": "off", + "compiler-version": ["warn", "^0.8.0"] + } +} diff --git a/.solhintignore b/.solhintignore new file mode 100644 index 00000000000..2fdb1b666c0 --- /dev/null +++ b/.solhintignore @@ -0,0 +1 @@ +contracts/openzeppelin \ No newline at end of file diff --git a/README.md b/README.md index ba52b0c90d1..feca315fd73 100644 --- a/README.md +++ b/README.md @@ -10,57 +10,65 @@ write smart contracts in C++, Rust and other popular languages. ## system-contracts To keep the zero-knowledge circuits as simple as possible and enable simple extensions, we created the system contracts. -These are privileged special-purpose contracts that instantiate some recurring actions on the protocol level. Some of the -most commonly used contracts: +These are privileged special-purpose contracts that instantiate some recurring actions on the protocol level. Some of +the most commonly used contracts: -`ContractDeployer` This contract is used to deploy new smart contracts. Its job is to make sure that the bytecode for each deployed -contract is known. This contract also defines the derivation address. Whenever a contract is deployed, a ContractDeployed -event is emitted. +`ContractDeployer` This contract is used to deploy new smart contracts. Its job is to make sure that the bytecode for +each deployed contract is known. This contract also defines the derivation address. Whenever a contract is deployed, a +ContractDeployed event is emitted. -`L1Messenger` This contract is used to send messages from zkSync to Ethereum. For each message sent, the L1MessageSent event is emitted. +`L1Messenger` This contract is used to send messages from zkSync to Ethereum. For each message sent, the L1MessageSent +event is emitted. -`NonceHolder` This contract stores account nonces. The account nonces are stored in a single place for efficiency (the tx nonce and -the deployment nonce are stored in a single place) and also for the ease of the operator. +`NonceHolder` This contract stores account nonces. The account nonces are stored in a single place for efficiency (the +tx nonce and the deployment nonce are stored in a single place) and also for the ease of the operator. -`Bootloader` For greater extensibility and to lower the overhead, some parts of the protocol (e.g. account abstraction rules) were -moved to an ephemeral contract called a bootloader. +`Bootloader` For greater extensibility and to lower the overhead, some parts of the protocol (e.g. account abstraction +rules) were moved to an ephemeral contract called a bootloader. -We call it ephemeral because it is not physically deployed and cannot be called, but it has a formal address that is used -on msg.sender, when it calls other contracts. +We call it ephemeral because it is not physically deployed and cannot be called, but it has a formal address that is +used on msg.sender, when it calls other contracts. ## Building This repository is used as a submodule of the [zksync-2-dev](https://github.com/matter-labs/zksync-2-dev). -Compile the solidity contracts: `yarn build` - -Run the bootloader preprocessor: `yarn preprocess` - -Compile the yul contracts: `yarn hardhat run ./scripts/compile-yul.ts` +Compile the solidity and yul contracts: `yarn build` ## Update Process -System contracts handle core functionalities and play a critical role in maintaining the integrity of our protocol. To ensure the highest level of security and reliability, these system contracts undergo an audit before any release. +System contracts handle core functionalities and play a critical role in maintaining the integrity of our protocol. To +ensure the highest level of security and reliability, these system contracts undergo an audit before any release. -Here is an overview of the release process of the system contracts which is aimed to preserve agility and clarity on the order of the upgrades: +Here is an overview of the release process of the system contracts which is aimed to preserve agility and clarity on the +order of the upgrades: ### `main` branch -The `main` branch contains the latest code that is ready to be deployed into production. It reflects the most stable and audited version of the protocol. +The `main` branch contains the latest code that is ready to be deployed into production. It reflects the most stable and +audited version of the protocol. -### `dev` branch +### `dev` branch -The `dev` branch is for active development & the latest code changes. Whenever a new PR with system contract changes is created it should be based on the `dev` branch. +The `dev` branch is for active development & the latest code changes. Whenever a new PR with system contract changes is +created it should be based on the `dev` branch. -### Creating a new release: +### Creating a new release -Whenever a new release is planned, a new branch named `release-vX-` should be created off the `dev` branch, where `X` represents the release version, and `` is a short descriptive name for the release. The PR with the new release should point to either the `main` branch or to the release branch with a lower version (in case the previous branch has not been merged into `main` for some reason). +Whenever a new release is planned, a new branch named `release-vX-` should be created off the `dev` branch, where +`X` represents the release version, and `` is a short descriptive name for the release. The PR with the new +release should point to either the `main` branch or to the release branch with a lower version (in case the previous +branch has not been merged into `main` for some reason). -Once the audit for the release branch is complete and all the fixes from the audit are applied, we need to merge the new changes into the `dev` branch. Once the release is final and merged into the `main` branch, the `main` branch should be merged back into the `dev` branch to keep it up-to-date. +Once the audit for the release branch is complete and all the fixes from the audit are applied, we need to merge the new +changes into the `dev` branch. Once the release is final and merged into the `main` branch, the `main` branch should be +merged back into the `dev` branch to keep it up-to-date. -### Updating Unaudited Code: +### Updating Unaudited Code -Since scripts, READMEs, etc., are code that is not subject to audits, these are to be merged directly into the `main` branch. The rest of the release branches as well as the `dev` branch should merge `main` to synchronize with these changes. +Since scripts, READMEs, etc., are code that is not subject to audits, these are to be merged directly into the `main` +branch. The rest of the release branches as well as the `dev` branch should merge `main` to synchronize with these +changes. ## License diff --git a/SystemConfig.json b/SystemConfig.json index 973e0dc044b..c88a2304014 100644 --- a/SystemConfig.json +++ b/SystemConfig.json @@ -14,4 +14,4 @@ "KECCAK_ROUND_COST_GAS": 40, "SHA256_ROUND_COST_GAS": 7, "ECRECOVER_COST_GAS": 1112 -} \ No newline at end of file +} diff --git a/bootloader/test_infra/README.md b/bootloader/test_infra/README.md index cf846f13ab9..f66ea39eeea 100644 --- a/bootloader/test_infra/README.md +++ b/bootloader/test_infra/README.md @@ -2,14 +2,14 @@ This crate allows you to run the unittests against the bootloader code. -You should put your tests in ../tests/bootloader/bootloader_test.yul, then compile the yul with: +You should put your tests in `../tests/bootloader/bootloader_test.yul`, then compile the yul with: ```shell -yarn build && yarn preprocess && yarn compile-yul +yarn build ``` And afterwards run the testing infrastructure: ```shell cargo run -``` \ No newline at end of file +``` diff --git a/bootloader/test_infra/src/test_transactions/0.json b/bootloader/test_infra/src/test_transactions/0.json index 41c8170934d..0edb7a92285 100644 --- a/bootloader/test_infra/src/test_transactions/0.json +++ b/bootloader/test_infra/src/test_transactions/0.json @@ -1,338 +1,46 @@ { - "common_data": { - "L2": { - "nonce": 1, - "fee": { - "gas_limit": "0xfd617", - "max_fee_per_gas": "0xee6b280", - "max_priority_fee_per_gas": "0x0", - "gas_per_pubdata_limit": "0xc350" - }, - "initiatorAddress": "0x36615cf349d7f6344891b1e7ca7c72883f5dc049", - "signature": [ - 132, - 90, - 248, - 214, - 198, - 24, - 213, - 194, - 29, - 253, - 36, - 112, - 77, - 245, - 167, - 245, - 245, - 120, - 200, - 225, - 31, - 40, - 16, - 76, - 182, - 155, - 102, - 8, - 166, - 115, - 59, - 80, - 92, - 183, - 251, - 203, - 109, - 202, - 149, - 230, - 132, - 173, - 160, - 72, - 234, - 181, - 177, - 31, - 224, - 177, - 28, - 52, - 251, - 76, - 107, - 79, - 160, - 132, - 47, - 135, - 199, - 146, - 71, - 193, - 28 - ], - "transactionType": "EIP712Transaction", - "input": { - "hash": "0xf415e63408ab712fa72f7931ba8e1f21f9d5e86a2a76fb6857fe7efb84ac8ed4", - "data": [ - 113, - 248, - 236, - 1, - 128, - 132, - 14, - 230, - 178, - 128, - 131, - 15, - 214, - 23, - 148, - 17, - 28, - 62, - 137, - 206, - 128, - 230, - 46, - 232, - 131, - 24, - 194, - 128, - 73, - 32, - 212, - 201, - 111, - 146, - 187, - 128, - 184, - 100, - 164, - 19, - 104, - 98, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 32, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 16, - 75, - 105, - 108, - 108, - 101, - 114, - 32, - 99, - 111, - 109, - 98, - 111, - 32, - 49, - 52, - 52, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 130, - 1, - 4, - 128, - 128, - 130, - 1, - 4, - 148, - 54, - 97, - 92, - 243, - 73, - 215, - 246, - 52, - 72, - 145, - 177, - 231, - 202, - 124, - 114, - 136, - 63, - 93, - 192, - 73, - 130, - 195, - 80, - 192, - 184, - 65, - 132, - 90, - 248, - 214, - 198, - 24, - 213, - 194, - 29, - 253, - 36, - 112, - 77, - 245, - 167, - 245, - 245, - 120, - 200, - 225, - 31, - 40, - 16, - 76, - 182, - 155, - 102, - 8, - 166, - 115, - 59, - 80, - 92, - 183, - 251, - 203, - 109, - 202, - 149, - 230, - 132, - 173, - 160, - 72, - 234, - 181, - 177, - 31, - 224, - 177, - 28, - 52, - 251, - 76, - 107, - 79, - 160, - 132, - 47, - 135, - 199, - 146, - 71, - 193, - 28, - 192 - ] - }, - "paymasterParams": { - "paymaster": "0x0000000000000000000000000000000000000000", - "paymasterInput": [] - } - } - }, - "execute": { - "contractAddress": "0x111c3e89ce80e62ee88318c2804920d4c96f92bb", - "calldata": "0xa4136862000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000104b696c6c657220636f6d626f2031343400000000000000000000000000000000", - "value": "0x0", - "factoryDeps": [] - }, - "received_timestamp_ms": 1695015132601, - "raw_bytes": "0x71f8ec0180840ee6b280830fd61794111c3e89ce80e62ee88318c2804920d4c96f92bb80b864a4136862000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000104b696c6c657220636f6d626f203134340000000000000000000000000000000082010480808201049436615cf349d7f6344891b1e7ca7c72883f5dc04982c350c0b841845af8d6c618d5c21dfd24704df5a7f5f578c8e11f28104cb69b6608a6733b505cb7fbcb6dca95e684ada048eab5b11fe0b11c34fb4c6b4fa0842f87c79247c11cc0" -} \ No newline at end of file + "common_data": { + "L2": { + "nonce": 1, + "fee": { + "gas_limit": "0xfd617", + "max_fee_per_gas": "0xee6b280", + "max_priority_fee_per_gas": "0x0", + "gas_per_pubdata_limit": "0xc350" + }, + "initiatorAddress": "0x36615cf349d7f6344891b1e7ca7c72883f5dc049", + "signature": [ + 132, 90, 248, 214, 198, 24, 213, 194, 29, 253, 36, 112, 77, 245, 167, 245, 245, 120, 200, 225, 31, 40, 16, 76, + 182, 155, 102, 8, 166, 115, 59, 80, 92, 183, 251, 203, 109, 202, 149, 230, 132, 173, 160, 72, 234, 181, 177, 31, + 224, 177, 28, 52, 251, 76, 107, 79, 160, 132, 47, 135, 199, 146, 71, 193, 28 + ], + "transactionType": "EIP712Transaction", + "input": { + "hash": "0xf415e63408ab712fa72f7931ba8e1f21f9d5e86a2a76fb6857fe7efb84ac8ed4", + "data": [ + 113, 248, 236, 1, 128, 132, 14, 230, 178, 128, 131, 15, 214, 23, 148, 17, 28, 62, 137, 206, 128, 230, 46, 232, + 131, 24, 194, 128, 73, 32, 212, 201, 111, 146, 187, 128, 184, 100, 164, 19, 104, 98, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 75, 105, 108, 108, 101, 114, 32, 99, 111, 109, + 98, 111, 32, 49, 52, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130, 1, 4, 128, 128, 130, 1, 4, 148, + 54, 97, 92, 243, 73, 215, 246, 52, 72, 145, 177, 231, 202, 124, 114, 136, 63, 93, 192, 73, 130, 195, 80, 192, + 184, 65, 132, 90, 248, 214, 198, 24, 213, 194, 29, 253, 36, 112, 77, 245, 167, 245, 245, 120, 200, 225, 31, + 40, 16, 76, 182, 155, 102, 8, 166, 115, 59, 80, 92, 183, 251, 203, 109, 202, 149, 230, 132, 173, 160, 72, 234, + 181, 177, 31, 224, 177, 28, 52, 251, 76, 107, 79, 160, 132, 47, 135, 199, 146, 71, 193, 28, 192 + ] + }, + "paymasterParams": { + "paymaster": "0x0000000000000000000000000000000000000000", + "paymasterInput": [] + } + } + }, + "execute": { + "contractAddress": "0x111c3e89ce80e62ee88318c2804920d4c96f92bb", + "calldata": "0xa4136862000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000104b696c6c657220636f6d626f2031343400000000000000000000000000000000", + "value": "0x0", + "factoryDeps": [] + }, + "received_timestamp_ms": 1695015132601, + "raw_bytes": "0x71f8ec0180840ee6b280830fd61794111c3e89ce80e62ee88318c2804920d4c96f92bb80b864a4136862000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000104b696c6c657220636f6d626f203134340000000000000000000000000000000082010480808201049436615cf349d7f6344891b1e7ca7c72883f5dc04982c350c0b841845af8d6c618d5c21dfd24704df5a7f5f578c8e11f28104cb69b6608a6733b505cb7fbcb6dca95e684ada048eab5b11fe0b11c34fb4c6b4fa0842f87c79247c11cc0" +} diff --git a/bootloader/test_infra/src/test_transactions/README.md b/bootloader/test_infra/src/test_transactions/README.md index 67c6115b8b8..ee6c117802e 100644 --- a/bootloader/test_infra/src/test_transactions/README.md +++ b/bootloader/test_infra/src/test_transactions/README.md @@ -1,5 +1,8 @@ -This directory contains JSON serialized 'Transaction' objects that are inserted into bootloader memory during unittesting. +# Test Transactions + +This directory contains JSON serialized 'Transaction' objects that are inserted into bootloader memory during +unittesting. Please add files with consecutive numbers (0.json, 1.json) - and insert into bootloader in the same order. -Then, they can be accessed in the unittest, by calling `testing_txDataOffset(x)`. \ No newline at end of file +Then, they can be accessed in the unittest, by calling `testing_txDataOffset(x)`. diff --git a/bootloader/tests/README.md b/bootloader/tests/README.md index fbebf447723..31acb0ecf75 100644 --- a/bootloader/tests/README.md +++ b/bootloader/tests/README.md @@ -2,11 +2,13 @@ ## Full tests -`dummy.yul` and `transfer_tests.yul` are full Yul files, which are replacing the bootloader, and are used in `zksync-era` crate. +`dummy.yul` and `transfer_tests.yul` are full Yul files, which are replacing the bootloader, and are used in +`zksync-era` crate. ## Unittests -Please put bootloader unittests in `bootloader/bootloader_test.yul` file, and any testing utility functions in `utils/test_utils.yul`. +Please put bootloader unittests in `bootloader/bootloader_test.yul` file, and any testing utility functions in +`utils/test_utils.yul`. To execute tests, you should first run yarn to prepare the source code: @@ -15,7 +17,7 @@ yarn preprocess && yarn compile-yul ``` And then run the test framework: + ```shell cd test_infa && cargo run ``` - diff --git a/contracts/Compressor.sol b/contracts/Compressor.sol index 4b11fd39bb9..235146d04d7 100644 --- a/contracts/Compressor.sol +++ b/contracts/Compressor.sol @@ -7,19 +7,7 @@ import {ISystemContract} from "./interfaces/ISystemContract.sol"; import {Utils} from "./libraries/Utils.sol"; import {UnsafeBytesCalldata} from "./libraries/UnsafeBytesCalldata.sol"; import {EfficientCall} from "./libraries/EfficientCall.sol"; -import { - L1_MESSENGER_CONTRACT, - INITIAL_WRITE_STARTING_POSITION, - COMPRESSED_INITIAL_WRITE_SIZE, - STATE_DIFF_ENTRY_SIZE, - STATE_DIFF_ENUM_INDEX_OFFSET, - STATE_DIFF_FINAL_VALUE_OFFSET, - STATE_DIFF_DERIVED_KEY_OFFSET, - DERIVED_KEY_LENGTH, - VALUE_LENGTH, - ENUM_INDEX_LENGTH, - KNOWN_CODE_STORAGE_CONTRACT -} from "./Constants.sol"; +import {L1_MESSENGER_CONTRACT, INITIAL_WRITE_STARTING_POSITION, COMPRESSED_INITIAL_WRITE_SIZE, STATE_DIFF_ENTRY_SIZE, STATE_DIFF_ENUM_INDEX_OFFSET, STATE_DIFF_FINAL_VALUE_OFFSET, STATE_DIFF_DERIVED_KEY_OFFSET, DERIVED_KEY_LENGTH, VALUE_LENGTH, ENUM_INDEX_LENGTH, KNOWN_CODE_STORAGE_CONTRACT} from "./Constants.sol"; /** * @author Matter Labs @@ -96,7 +84,7 @@ contract Compressor is ICompressor, ISystemContract { /// - 2 bytes: number of initial writes /// - N bytes initial writes /// - 32 bytes derived key - /// - 1 byte metadata: + /// - 1 byte metadata: /// - first 5 bits: length in bytes of compressed value /// - last 3 bits: operation /// - 0 -> Nothing (32 bytes) @@ -106,7 +94,7 @@ contract Compressor is ICompressor, ISystemContract { /// - Len Bytes: Compressed Value /// - M bytes repeated writes /// - {_enumerationIndexSize} bytes for enumeration index - /// - 1 byte metadata: + /// - 1 byte metadata: /// - first 5 bits: length in bytes of compressed value /// - last 3 bits: operation /// - 0 -> Nothing (32 bytes) @@ -120,8 +108,8 @@ contract Compressor is ICompressor, ISystemContract { bytes calldata _stateDiffs, bytes calldata _compressedStateDiffs ) external payable onlyCallFrom(address(L1_MESSENGER_CONTRACT)) returns (bytes32 stateDiffHash) { - // We do not enforce the operator to use the optimal, i.e. the minimally possible _enumerationIndexSize. - // We do enforce however, that the _enumerationIndexSize is not larger than 8 bytes long, which is the + // We do not enforce the operator to use the optimal, i.e. the minimally possible _enumerationIndexSize. + // We do enforce however, that the _enumerationIndexSize is not larger than 8 bytes long, which is the // maximal ever possible size for enumeration index. require(_enumerationIndexSize <= MAX_ENUMERATION_INDEX_SIZE, "enumeration index size is too large"); @@ -144,7 +132,7 @@ contract Compressor is ICompressor, ISystemContract { bytes32 derivedKey = stateDiff.readBytes32(52); uint256 initValue = stateDiff.readUint256(92); uint256 finalValue = stateDiff.readUint256(124); - require(derivedKey == _compressedStateDiffs.readBytes32(stateDiffPtr), "iw: initial key mismatch"); + require(derivedKey == _compressedStateDiffs.readBytes32(stateDiffPtr), "iw: initial key mismatch"); stateDiffPtr += 32; uint8 metadata = uint8(bytes1(_compressedStateDiffs[stateDiffPtr])); @@ -172,7 +160,9 @@ contract Compressor is ICompressor, ISystemContract { uint256 initValue = stateDiff.readUint256(92); uint256 finalValue = stateDiff.readUint256(124); - uint256 compressedEnumIndex = _sliceToUint256(_compressedStateDiffs[stateDiffPtr:stateDiffPtr + _enumerationIndexSize]); + uint256 compressedEnumIndex = _sliceToUint256( + _compressedStateDiffs[stateDiffPtr:stateDiffPtr + _enumerationIndexSize] + ); require(enumIndex == compressedEnumIndex, "rw: enum key mismatch"); stateDiffPtr += _enumerationIndexSize; @@ -214,7 +204,7 @@ contract Compressor is ICompressor, ISystemContract { /// @param _initialValue Previous value of key/enumeration index. /// @param _finalValue Updated value of key/enumeration index. /// @param _operation The operation that was performed on value. - /// @param _compressedValue The slice of calldata with compressed value either representing the final + /// @param _compressedValue The slice of calldata with compressed value either representing the final /// value or difference between initial and final value. It should be of arbitrary length less than or equal to 32 bytes. /// @dev It is the responsibility of the caller of this function to ensure that the `_compressedValue` has length no longer than 32 bytes. /// @dev Operation id mapping: @@ -234,9 +224,15 @@ contract Compressor is ICompressor, ISystemContract { if (_operation == 0 || _operation == 3) { require(convertedValue == _finalValue, "transform or no compression: compressed and final mismatch"); } else if (_operation == 1) { - require(_initialValue + convertedValue == _finalValue, "add: initial plus converted not equal to final"); + require( + _initialValue + convertedValue == _finalValue, + "add: initial plus converted not equal to final" + ); } else if (_operation == 2) { - require(_initialValue - convertedValue == _finalValue, "sub: initial minus converted not equal to final"); + require( + _initialValue - convertedValue == _finalValue, + "sub: initial minus converted not equal to final" + ); } else { revert("unsupported operation"); } diff --git a/contracts/Constants.sol b/contracts/Constants.sol index 507d3437a83..b6a788a7603 100644 --- a/contracts/Constants.sol +++ b/contracts/Constants.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.0; -import {IAccountCodeStorage} from "./interfaces/IAccountCodeStorage.sol"; +import {IAccountCodeStorage} from "./interfaces/IAccountCodeStorage.sol"; import {INonceHolder} from "./interfaces/INonceHolder.sol"; import {IContractDeployer} from "./interfaces/IContractDeployer.sol"; import {IKnownCodesStorage} from "./interfaces/IKnownCodesStorage.sol"; @@ -97,7 +97,7 @@ enum SystemLogKey { EXPECTED_SYSTEM_CONTRACT_UPGRADE_TX_HASH_KEY } -/// @dev The number of leaves in the L2->L1 log Merkle tree. +/// @dev The number of leaves in the L2->L1 log Merkle tree. /// While formally a tree of any length is acceptable, the node supports only a constant length of 2048 leaves. uint256 constant L2_TO_L1_LOGS_MERKLE_TREE_LEAVES = 2048; diff --git a/contracts/L1Messenger.sol b/contracts/L1Messenger.sol index c5a03c8dcc6..5d5b34e6da0 100644 --- a/contracts/L1Messenger.sol +++ b/contracts/L1Messenger.sol @@ -7,15 +7,7 @@ import {ISystemContract} from "./interfaces/ISystemContract.sol"; import {SystemContractHelper} from "./libraries/SystemContractHelper.sol"; import {EfficientCall} from "./libraries/EfficientCall.sol"; import {Utils} from "./libraries/Utils.sol"; -import { - SystemLogKey, - SYSTEM_CONTEXT_CONTRACT, - KNOWN_CODE_STORAGE_CONTRACT, - COMPRESSOR_CONTRACT, - STATE_DIFF_ENTRY_SIZE, - MAX_ALLOWED_PUBDATA_PER_BATCH, - L2_TO_L1_LOGS_MERKLE_TREE_LEAVES -} from "./Constants.sol"; +import {SystemLogKey, SYSTEM_CONTEXT_CONTRACT, KNOWN_CODE_STORAGE_CONTRACT, COMPRESSOR_CONTRACT, STATE_DIFF_ENTRY_SIZE, MAX_ALLOWED_PUBDATA_PER_BATCH, L2_TO_L1_LOGS_MERKLE_TREE_LEAVES} from "./Constants.sol"; /** * @author Matter Labs diff --git a/contracts/libraries/RLPEncoder.sol b/contracts/libraries/RLPEncoder.sol index 50da4624e8b..aeacab68b18 100644 --- a/contracts/libraries/RLPEncoder.sol +++ b/contracts/libraries/RLPEncoder.sol @@ -6,7 +6,7 @@ pragma solidity ^0.8.0; * @author Matter Labs * @custom:security-contact security@matterlabs.dev * @notice This library provides RLP encoding functionality. -*/ + */ library RLPEncoder { function encodeAddress(address _val) internal pure returns (bytes memory encoded) { // The size is equal to 20 bytes of the address itself + 1 for encoding bytes length in RLP. diff --git a/contracts/libraries/SystemContractHelper.sol b/contracts/libraries/SystemContractHelper.sol index 2878e423fab..8a7734ce359 100644 --- a/contracts/libraries/SystemContractHelper.sol +++ b/contracts/libraries/SystemContractHelper.sol @@ -4,34 +4,7 @@ pragma solidity ^0.8.0; import {MAX_SYSTEM_CONTRACT_ADDRESS} from "../Constants.sol"; -import { - SystemContractsCaller, - CalldataForwardingMode, - CALLFLAGS_CALL_ADDRESS, - CODE_ADDRESS_CALL_ADDRESS, - EVENT_WRITE_ADDRESS, - EVENT_INITIALIZE_ADDRESS, - GET_EXTRA_ABI_DATA_ADDRESS, - LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS, - META_CODE_SHARD_ID_OFFSET, - META_CALLER_SHARD_ID_OFFSET, - META_SHARD_ID_OFFSET, - META_AUX_HEAP_SIZE_OFFSET, - META_HEAP_SIZE_OFFSET, - META_GAS_PER_PUBDATA_BYTE_OFFSET, - MIMIC_CALL_BY_REF_CALL_ADDRESS, - META_CALL_ADDRESS, - MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT, - PTR_CALLDATA_CALL_ADDRESS, - PTR_ADD_INTO_ACTIVE_CALL_ADDRESS, - PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS, - PTR_PACK_INTO_ACTIVE_CALL_ADDRESS, - RAW_FAR_CALL_BY_REF_CALL_ADDRESS, - PRECOMPILE_CALL_ADDRESS, - SET_CONTEXT_VALUE_CALL_ADDRESS, - SYSTEM_CALL_BY_REF_CALL_ADDRESS, - TO_L1_CALL_ADDRESS -} from "./SystemContractsCaller.sol"; +import {SystemContractsCaller, CalldataForwardingMode, CALLFLAGS_CALL_ADDRESS, CODE_ADDRESS_CALL_ADDRESS, EVENT_WRITE_ADDRESS, EVENT_INITIALIZE_ADDRESS, GET_EXTRA_ABI_DATA_ADDRESS, LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS, META_CODE_SHARD_ID_OFFSET, META_CALLER_SHARD_ID_OFFSET, META_SHARD_ID_OFFSET, META_AUX_HEAP_SIZE_OFFSET, META_HEAP_SIZE_OFFSET, META_GAS_PER_PUBDATA_BYTE_OFFSET, MIMIC_CALL_BY_REF_CALL_ADDRESS, META_CALL_ADDRESS, MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT, PTR_CALLDATA_CALL_ADDRESS, PTR_ADD_INTO_ACTIVE_CALL_ADDRESS, PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS, PTR_PACK_INTO_ACTIVE_CALL_ADDRESS, RAW_FAR_CALL_BY_REF_CALL_ADDRESS, PRECOMPILE_CALL_ADDRESS, SET_CONTEXT_VALUE_CALL_ADDRESS, SYSTEM_CALL_BY_REF_CALL_ADDRESS, TO_L1_CALL_ADDRESS} from "./SystemContractsCaller.sol"; uint256 constant UINT32_MASK = 0xffffffff; uint256 constant UINT128_MASK = 0xffffffffffffffffffffffffffffffff; diff --git a/hardhat.config.ts b/hardhat.config.ts index 0965b5e07e2..962b8acd40f 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,9 +1,10 @@ +import '@matterlabs/hardhat-zksync-chai-matchers'; +import '@matterlabs/hardhat-zksync-solc'; +import '@nomiclabs/hardhat-ethers'; import '@nomiclabs/hardhat-solpp'; import '@typechain/hardhat'; -import '@nomiclabs/hardhat-ethers'; -import '@matterlabs/hardhat-zksync-solc'; -import '@matterlabs/hardhat-zksync-chai-matchers'; +// eslint-disable-next-line @typescript-eslint/no-var-requires const systemConfig = require('./SystemConfig.json'); export default { @@ -34,7 +35,7 @@ export default { ECRECOVER_COST_GAS: systemConfig.ECRECOVER_COST_GAS, KECCAK_ROUND_COST_GAS: systemConfig.KECCAK_ROUND_COST_GAS, SHA256_ROUND_COST_GAS: systemConfig.SHA256_ROUND_COST_GAS - } + }; })() }, networks: { diff --git a/package.json b/package.json index f4876dcac6e..7213c80ff0a 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,15 @@ "@types/chai": "^4.3.1", "@types/mocha": "^9.1.1", "@types/node": "^17.0.34", + "@typescript-eslint/eslint-plugin": "^6.7.4", + "@typescript-eslint/parser": "^6.7.4", "chai": "^4.3.6", + "eslint": "^8.51.0", + "markdownlint-cli": "^0.33.0", "mocha": "^10.0.0", - "prettier": "^2.3.0", - "prettier-plugin-solidity": "^1.0.0-alpha.27", + "prettier": "^3.0.3", + "prettier-plugin-solidity": "^1.1.3", + "solhint": "^3.6.2", "template-file": "^6.0.1", "ts-generator": "^0.1.1", "ts-node": "^10.7.0", @@ -42,12 +47,23 @@ ] }, "scripts": { - "test": "hardhat test --network zkSyncTestNode", - "build": "hardhat compile", - "clean": "hardhat clean", - "fmt": "prettier --config prettier.js --write contracts/*.sol contracts/**/*.sol", - "preprocess": "rm -rf ./bootloader/build && yarn ts-node scripts/process.ts", + "build": "yarn build:sol && yarn build:yul", + "build:sol": "hardhat compile", + "build:yul": "yarn preprocess:yul && yarn compile-yul", + "clean": "yarn clean:sol && yarn clean:yul", + "clean:sol": "hardhat clean", + "clean:yul": "rm -rf ./bootloader/build ./bootloader/tests/artifacts ./contracts/artifacts ./contracts/precompiles/artifacts", + "compile-yul": "ts-node scripts/compile-yul.ts", "deploy-preimages": "ts-node scripts/deploy-preimages.ts", - "compile-yul": "ts-node scripts/compile-yul.ts" + "lint": "yarn lint:md && yarn lint:sol && yarn lint:ts && yarn prettier:check", + "lint:fix": "yarn lint:md --fix && yarn lint:sol --fix && yarn lint:ts --fix && yarn prettier:write", + "lint:md": "markdownlint **/*.md", + "lint:sol": "solhint \"contracts/**/*.sol\"", + "lint:ts": "eslint .", + "prettier:check": "prettier --check \"**/*.{js,json,md,sol,ts,yaml}\"", + "prettier:write": "prettier --write \"**/*.{js,json,md,sol,ts,yaml}\"", + "preprocess:yul": "rm -rf ./bootloader/build && yarn ts-node scripts/process.ts", + "test": "hardhat test --network zkSyncTestNode", + "test:bootloader": "cd bootloader/test_infra && cargo run" } -} \ No newline at end of file +} diff --git a/prettier.js b/prettier.js deleted file mode 100644 index 521a8ba95ea..00000000000 --- a/prettier.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - "printWidth": 120, - "tabWidth": 4, - "useTabs": false, - "singleQuote": false, - "bracketSpacing": false, - "explicitTypes": "always" -}; diff --git a/scripts/compile-yul.ts b/scripts/compile-yul.ts index fe42b4e90aa..5fe84278f5c 100644 --- a/scripts/compile-yul.ts +++ b/scripts/compile-yul.ts @@ -1,8 +1,8 @@ import * as hre from 'hardhat'; -import * as fs from 'fs'; -import { exec as _exec, spawn as _spawn } from 'child_process'; import { getZksolcUrl, saltFromUrl } from '@matterlabs/hardhat-zksync-solc'; +import { spawn as _spawn } from 'child_process'; +import * as fs from 'fs'; import { getCompilersDir } from 'hardhat/internal/util/global-dir'; import path from 'path'; @@ -40,7 +40,7 @@ export async function compileYul(path: string, files: string[], outputDirName: s console.log(`No test files provided in folder ${path}.`); return; } - let paths = preparePaths(path, files, outputDirName); + const paths = preparePaths(path, files, outputDirName); const zksolcLocation = await compilerLocation(); await spawn( @@ -49,16 +49,15 @@ export async function compileYul(path: string, files: string[], outputDirName: s } export async function compileYulFolder(path: string) { - let files: string[] = (await fs.promises.readdir(path)).filter((fn) => fn.endsWith('.yul')); + const files: string[] = (await fs.promises.readdir(path)).filter((fn) => fn.endsWith('.yul')); for (const file of files) { await compileYul(path, [file], `${file}`); } } - function preparePaths(path: string, files: string[], outputDirName: string | null): CompilerPaths { const filePaths = files - .map((val, _) => { + .map((val) => { return `sources/${val}`; }) .join(' '); @@ -86,7 +85,6 @@ class CompilerPaths { } } - async function main() { await compileYulFolder('contracts'); await compileYulFolder('contracts/precompiles'); diff --git a/scripts/constants.ts b/scripts/constants.ts index c21f9d4f824..4bb1a5b5d50 100644 --- a/scripts/constants.ts +++ b/scripts/constants.ts @@ -110,12 +110,12 @@ export const SYSTEM_CONTRACTS: ISystemContracts = { compressor: { address: '0x000000000000000000000000000000000000800e', codeName: 'Compressor', - lang: Language.Solidity, + lang: Language.Solidity }, complexUpgrader: { address: '0x000000000000000000000000000000000000800f', codeName: 'ComplexUpgrader', - lang: Language.Solidity, + lang: Language.Solidity }, keccak256: { address: '0x0000000000000000000000000000000000008010', @@ -199,7 +199,7 @@ function isFixedType(x: FieldType): x is FixedType { return !isDynamicType(x); } -export const TransactionFields: Record = { +export const TransactionFields: Record = { txType: 'uint256', from: 'address', to: 'address', @@ -224,10 +224,10 @@ export const TransactionFields: Record = { // Reserved dynamic type for the future use-case. Using it should be avoided, // But it is still here, just in case we want to enable some additional functionality. reservedDynamic: 'bytes' -} +}; function capitalize(s: string) { - if(!s.length) { + if (!s.length) { return s; } return `${s[0].toUpperCase()}${s.substring(1)}`; @@ -242,7 +242,7 @@ function getGetterName(fieldName: string) { } function getPtrGetterName(fieldName: string) { - return `get${capitalize(fieldName)}Ptr`; + return `get${capitalize(fieldName)}Ptr`; } function getGetter(fieldName: string, offset: number) { @@ -252,7 +252,7 @@ function getGetter(fieldName: string, offset: number) { function ${getterName}(innerTxDataOffset) -> ret { ret := mload(${memPos}) } - ` + `; } function getPtrGetter(fieldName: string, offset: number) { @@ -263,12 +263,12 @@ function getPtrGetter(fieldName: string, offset: number) { ret := mload(${memPos}) ret := add(innerTxDataOffset, ret) } - ` + `; } function getTypeValidationMethodName(type: FieldType) { - if(type == 'bytes32[]'){ - return 'validateBytes32Array' + if (type == 'bytes32[]') { + return 'validateBytes32Array'; } else { return `validate${capitalize(type)}`; } @@ -280,12 +280,12 @@ function getBytesLengthGetterName(fieldName: string): string { function getBytesLengthGetter(fieldName: string, type: DynamicType) { let lengthToBytes: string; - if(type == 'bytes') { + if (type == 'bytes') { lengthToBytes = `lengthToWords(mload(ptr))`; - } else if(type == 'bytes32[]') { + } else if (type == 'bytes32[]') { lengthToBytes = `mul(mload(ptr),32)`; } else { - throw new Error(`Type ${type} is not supported`) + throw new Error(`Type ${type} is not supported`); } const getterName = getBytesLengthGetterName(fieldName); @@ -294,14 +294,16 @@ function getBytesLengthGetter(fieldName: string, type: DynamicType) { let ptr := ${getPtrGetterName(fieldName)}(innerTxDataOffset) ret := ${lengthToBytes} } - ` + `; } function getDataLength(baseLength: number, dynamicFields: [string, DynamicType][]) { - const ptrAdders = dynamicFields.map(([fieldName,]) => { - return ` - ret := add(ret, ${getBytesLengthGetterName(fieldName)}(innerTxDataOffset))` - }).join(''); + const ptrAdders = dynamicFields + .map(([fieldName]) => { + return ` + ret := add(ret, ${getBytesLengthGetterName(fieldName)}(innerTxDataOffset))`; + }) + .join(''); return ` function getDataLength(innerTxDataOffset) -> ret { @@ -312,16 +314,16 @@ function getDataLength(baseLength: number, dynamicFields: [string, DynamicType][ ${ptrAdders} } - ` + `; } function validateFixedSizeField(fieldName: string, type: FixedType): string { - if(type == 'uint256') { + if (type == 'uint256') { // There is no validation for uint256 return ``; } const assertionErrorStr = getEncodingError(fieldName); - const fieldValue = `${fieldName}Value` + const fieldValue = `${fieldName}Value`; return ` let ${fieldValue} := ${getGetterName(fieldName)}(innerTxDataOffset) if iszero(${getTypeValidationMethodName(type)}(${fieldValue})) { @@ -335,31 +337,33 @@ function getEncodingError(fieldName: string) { // because the maximum length is 32. const assertionError = `Encoding ${fieldName}`; - if(assertionError.length > 32) { - throw new Error(`Assertion str too long: ${assertionError}`) + if (assertionError.length > 32) { + throw new Error(`Assertion str too long: ${assertionError}`); } return assertionError; } function getValidateTxStructure( - fixedFieldsChecks: string, + fixedFieldsChecks: string, fixedLenPart: number, dynamicFields: [string, DynamicType][] ): string { - const dynamicChecks = dynamicFields.map(([fieldName, type]) => { - const lengthPos = `${fieldName}LengthPos`; - const assertionError = getEncodingError(fieldName); - const validationMethod = getTypeValidationMethodName(type); + const dynamicChecks = dynamicFields + .map(([fieldName, type]) => { + const lengthPos = `${fieldName}LengthPos`; + const assertionError = getEncodingError(fieldName); + const validationMethod = getTypeValidationMethodName(type); - return ` + return ` let ${lengthPos} := ${getPtrGetterName(fieldName)}(innerTxDataOffset) if iszero(eq(${lengthPos}, expectedDynamicLenPtr)) { assertionError("${assertionError}") } expectedDynamicLenPtr := ${validationMethod}(${lengthPos}) - ` - }).join('\n'); + `; + }) + .join('\n'); return ` /// This method checks that the transaction's structure is correct @@ -381,10 +385,10 @@ export function getTransactionUtils(): string { let checksStr = ``; const dynamicFields: [string, DynamicType][] = []; - for(const [key, value] of Object.entries(TransactionFields)) { + for (const [key, value] of Object.entries(TransactionFields)) { if (Array.isArray(value)) { - // We assume that the - for(let i = 0; i < value.length; i++) { + // We assume that the + for (let i = 0; i < value.length; i++) { const keyName = `${key}${i}`; result += getGetter(keyName, innerOffsetBytes); checksStr += validateFixedSizeField(keyName, value[i]); @@ -402,11 +406,7 @@ export function getTransactionUtils(): string { } } - result += getValidateTxStructure( - checksStr, - innerOffsetBytes, - dynamicFields - ); + result += getValidateTxStructure(checksStr, innerOffsetBytes, dynamicFields); result += getDataLength(innerOffsetBytes, dynamicFields); diff --git a/scripts/deploy-preimages.ts b/scripts/deploy-preimages.ts index 98cb5fb770a..103f7d73530 100644 --- a/scripts/deploy-preimages.ts +++ b/scripts/deploy-preimages.ts @@ -1,17 +1,21 @@ import * as hre from 'hardhat'; -import { Command } from 'commander'; -import {Provider, Wallet} from 'zksync-web3'; import { Deployer } from '@matterlabs/hardhat-zksync-deploy'; - -import * as path from 'path'; -import * as fs from 'fs'; - -import { Language, SYSTEM_CONTRACTS } from './constants'; -import { formatUnits, parseUnits } from 'ethers/lib/utils'; +import { Command } from 'commander'; import { BigNumber, ethers } from 'ethers'; -import {readYulBytecode, publishFactoryDeps, DeployedDependency, Dependency, filterPublishedFactoryDeps } from './utils'; +import { formatUnits, parseUnits } from 'ethers/lib/utils'; +import * as fs from 'fs'; +import * as path from 'path'; +import { Provider, Wallet } from 'zksync-web3'; import { hashBytecode } from 'zksync-web3/build/src/utils'; +import { Language, SYSTEM_CONTRACTS } from './constants'; +import { + Dependency, + DeployedDependency, + filterPublishedFactoryDeps, + publishFactoryDeps, + readYulBytecode +} from './utils'; const testConfigPath = path.join(process.env.ZKSYNC_HOME as string, `etc/test_config/constant`); const ethTestConfig = JSON.parse(fs.readFileSync(`${testConfigPath}/eth.json`, { encoding: 'utf-8' })); @@ -36,22 +40,15 @@ class ZkSyncDeployer { this.dependenciesToUpgrade = []; } - async publishFactoryDeps( - dependencies: Dependency[], - ) { - await publishFactoryDeps( - dependencies, - this.deployer, - this.nonce, - this.gasPrice - ); + async publishFactoryDeps(dependencies: Dependency[]) { + await publishFactoryDeps(dependencies, this.deployer, this.nonce, this.gasPrice); this.nonce += 1; } // Returns the current default account bytecode on zkSync async currentDefaultAccountBytecode(): Promise { const zkSync = await this.deployer.zkWallet.getMainContract(); - return await zkSync.getL2DefaultAccountBytecodeHash() + return await zkSync.getL2DefaultAccountBytecodeHash(); } // If needed, appends the default account bytecode to the upgrade @@ -64,25 +61,29 @@ class ZkSyncDeployer { this.defaultAccountToUpgrade = { name: DEFAULT_ACCOUNT_CONTRACT_NAME, bytecodeHashes: [bytecodeHash] - } + }; } } - + // Publish default account bytecode async publishDefaultAA(defaultAccountBytecode: string) { - const [defaultAccountBytecodes, ] = await filterPublishedFactoryDeps(DEFAULT_ACCOUNT_CONTRACT_NAME, [defaultAccountBytecode], this.deployer); - + const [defaultAccountBytecodes] = await filterPublishedFactoryDeps( + DEFAULT_ACCOUNT_CONTRACT_NAME, + [defaultAccountBytecode], + this.deployer + ); + if (defaultAccountBytecodes.length == 0) { console.log('Default account bytecode is already published, skipping'); return; } - await this.publishFactoryDeps( - [{ + await this.publishFactoryDeps([ + { name: DEFAULT_ACCOUNT_CONTRACT_NAME, - bytecodes: defaultAccountBytecodes, - }], - ); + bytecodes: defaultAccountBytecodes + } + ]); this.nonce += 1; } @@ -108,39 +109,38 @@ class ZkSyncDeployer { this.bootloaderToUpgrade = { name: BOOTLOADER_CONTRACT_NAME, bytecodeHashes: [bytecodeHash] - } + }; } } async publishBootloader(bootloaderCode: string) { console.log('\nPublishing bootloader bytecode:'); - const [deps, ] = await filterPublishedFactoryDeps(BOOTLOADER_CONTRACT_NAME, [bootloaderCode], this.deployer); + const [deps] = await filterPublishedFactoryDeps(BOOTLOADER_CONTRACT_NAME, [bootloaderCode], this.deployer); if (deps.length == 0) { console.log('Default bootloader bytecode is already published, skipping'); return; } - await this.publishFactoryDeps( - [{ + await this.publishFactoryDeps([ + { name: BOOTLOADER_CONTRACT_NAME, - bytecodes: deps, - }], - ); + bytecodes: deps + } + ]); } async processBootloader() { - const bootloaderCode = ethers.utils.hexlify(fs.readFileSync('./bootloader/build/artifacts/proved_batch.yul/proved_batch.yul.zbin')); + const bootloaderCode = ethers.utils.hexlify( + fs.readFileSync('./bootloader/build/artifacts/proved_batch.yul/proved_batch.yul.zbin') + ); await this.publishBootloader(bootloaderCode); await this.checkShouldUpgradeBootloader(bootloaderCode); } - async shouldUpgradeSystemContract( - contractAddress: string, - expectedBytecodeHash: string - ): Promise { + async shouldUpgradeSystemContract(contractAddress: string, expectedBytecodeHash: string): Promise { // We could have also used the `getCode` method of the JSON-RPC, but in the context // of system upgrades looking into account code storage is more robust const currentBytecodeHash = await this.deployer.zkWallet.provider.getStorageAt( @@ -154,20 +154,15 @@ class ZkSyncDeployer { // Returns the contracts to be published. async prepareContractsForPublishing(): Promise { const dependenciesToPublish: Dependency[] = []; - for(const contract of Object.values(SYSTEM_CONTRACTS)) { - let contractName = contract.codeName; + for (const contract of Object.values(SYSTEM_CONTRACTS)) { + const contractName = contract.codeName; let factoryDeps: string[] = []; if (contract.lang == Language.Solidity) { const artifact = await this.deployer.loadArtifact(contractName); - factoryDeps = [ - ...await this.deployer.extractFactoryDeps(artifact), - artifact.bytecode - ]; + factoryDeps = [...(await this.deployer.extractFactoryDeps(artifact)), artifact.bytecode]; } else { // Yul files have only one dependency - factoryDeps = [ - readYulBytecode(contract) - ]; + factoryDeps = [readYulBytecode(contract)]; } const contractBytecodeHash = ethers.utils.hexlify(hashBytecode(factoryDeps[factoryDeps.length - 1])); @@ -176,15 +171,19 @@ class ZkSyncDeployer { name: contractName, bytecodeHashes: [contractBytecodeHash], address: contract.address - }) + }); } - - let [bytecodesToPublish, currentLength] = await filterPublishedFactoryDeps(contractName, factoryDeps, this.deployer); + + const [bytecodesToPublish, currentLength] = await filterPublishedFactoryDeps( + contractName, + factoryDeps, + this.deployer + ); if (bytecodesToPublish.length == 0) { console.log(`All bytecodes for ${contractName} are already published, skipping`); continue; } - if(currentLength > MAX_COMBINED_LENGTH) { + if (currentLength > MAX_COMBINED_LENGTH) { throw new Error(`Can not publish dependencies of contract ${contractName}`); } @@ -202,12 +201,13 @@ class ZkSyncDeployer { let currentLength = 0; let currentDependencies: Dependency[] = []; // We iterate over dependencies and try to batch the publishing of those in order to save up on gas as well as time. - for (let dependency of dependenciesToPublish) { - const dependencyLength = dependency.bytecodes.reduce((prev, dep) => prev + ethers.utils.arrayify(dep).length, 0); + for (const dependency of dependenciesToPublish) { + const dependencyLength = dependency.bytecodes.reduce( + (prev, dep) => prev + ethers.utils.arrayify(dep).length, + 0 + ); if (currentLength + dependencyLength > MAX_COMBINED_LENGTH) { - await this.publishFactoryDeps( - currentDependencies, - ); + await this.publishFactoryDeps(currentDependencies); currentLength = dependencyLength; currentDependencies = [dependency]; } else { @@ -216,9 +216,7 @@ class ZkSyncDeployer { } } if (currentDependencies.length > 0) { - await this.publishFactoryDeps( - currentDependencies, - ); + await this.publishFactoryDeps(currentDependencies); } } @@ -226,12 +224,11 @@ class ZkSyncDeployer { return { systemContracts: this.dependenciesToUpgrade, defaultAA: this.defaultAccountToUpgrade, - bootloader: this.bootloaderToUpgrade, - } + bootloader: this.bootloaderToUpgrade + }; } } - export function l1RpcUrl() { return process.env.ETH_CLIENT_WEB3_URL as string; } @@ -260,12 +257,12 @@ async function main() { const l2Rpc = cmd.l2Rpc ? cmd.l2Rpc : l2RpcUrl(); const providerL1 = new ethers.providers.JsonRpcProvider(l1Rpc); const providerL2 = new Provider(l2Rpc); - const wallet= cmd.privateKey - ? new Wallet(cmd.privateKey) + const wallet = cmd.privateKey + ? new Wallet(cmd.privateKey) : Wallet.fromMnemonic( - process.env.MNEMONIC ? process.env.MNEMONIC : ethTestConfig.mnemonic, - "m/44'/60'/0'/0/1" - ); + process.env.MNEMONIC ? process.env.MNEMONIC : ethTestConfig.mnemonic, + "m/44'/60'/0'/0/1" + ); wallet.connect(providerL2); wallet.connectToL1(providerL1); @@ -279,7 +276,7 @@ async function main() { const gasPrice = cmd.gasPrice ? parseUnits(cmd.gasPrice, 'gwei') : await providerL1.getGasPrice(); console.log(`Using gas price: ${formatUnits(gasPrice, 'gwei')} gwei`); - let nonce = cmd.nonce ? parseInt(cmd.nonce) : await ethWallet.getTransactionCount(); + const nonce = cmd.nonce ? parseInt(cmd.nonce) : await ethWallet.getTransactionCount(); console.log(`Using nonce: ${nonce}`); const zkSyncDeployer = new ZkSyncDeployer(deployer, gasPrice, nonce); @@ -302,7 +299,6 @@ async function main() { fs.writeFileSync(cmd.file, JSON.stringify(result, null, 2)); } console.log('\nPublishing factory dependencies complete!'); - }); await program.parseAsync(process.argv); diff --git a/scripts/process.ts b/scripts/process.ts index 82ae76a547f..67151b851f0 100644 --- a/scripts/process.ts +++ b/scripts/process.ts @@ -1,14 +1,18 @@ -const preprocess = require('preprocess'); - -import { existsSync, mkdirSync, write, writeFileSync } from 'fs'; -import { SYSTEM_CONTRACTS, getRevertSelector, getTransactionUtils } from './constants'; import * as hre from 'hardhat'; + import { ethers } from 'ethers'; +import { existsSync, mkdirSync, writeFileSync } from 'fs'; import { renderFile } from 'template-file'; import { utils } from 'zksync-web3'; +import { SYSTEM_CONTRACTS, getRevertSelector, getTransactionUtils } from './constants'; import { ForceDeployment } from './utils'; -const OUTPUT_DIR = 'bootloader/build'; +/* eslint-disable @typescript-eslint/no-var-requires */ +const preprocess = require('preprocess'); +const SYSTEM_PARAMS = require('../SystemConfig.json'); +/* eslint-enable@typescript-eslint/no-var-requires */ + +const OUTPUT_DIR = 'bootloader/build'; function getSelector(contractName: string, method: string): string { const artifact = hre.artifacts.readArtifactSync(contractName); @@ -28,13 +32,11 @@ function padZeroRight(hexData: string, length: number): string { const PADDED_SELECTOR_LENGTH = 32 * 2 + 2; function getPaddedSelector(contractName: string, method: string): string { - let result = getSelector(contractName, method); + const result = getSelector(contractName, method); - return padZeroRight(result, PADDED_SELECTOR_LENGTH) + return padZeroRight(result, PADDED_SELECTOR_LENGTH); } -const SYSTEM_PARAMS = require('../SystemConfig.json'); - function getSystemContextExpectedHash() { const artifact = hre.artifacts.readArtifactSync('SystemContext'); return ethers.utils.hexlify(utils.hashBytecode(artifact.bytecode)); @@ -83,7 +85,7 @@ function upgradeSystemContextCalldata() { // Maybe in the future some of these params will be passed // in a JSON file. For now, a simple object is ok here. -let params = { +const params = { MARK_BATCH_AS_REPUBLISHED_SELECTOR: getSelector('KnownCodesStorage', 'markFactoryDeps'), VALIDATE_TX_SELECTOR: getSelector('IAccount', 'validateTransaction'), EXECUTE_TX_SELECTOR: getSelector('DefaultAccount', 'executeTransaction'), @@ -114,30 +116,35 @@ let params = { CREATE2_ACCOUNT_SELECTOR: getSelector('ContractDeployer', 'create2Account'), PADDED_TRANSFER_FROM_TO_SELECTOR: getPaddedSelector('L2EthToken', 'transferFromTo'), SUCCESSFUL_ACCOUNT_VALIDATION_MAGIC_VALUE: getPaddedSelector('IAccount', 'validateTransaction'), - SUCCESSFUL_PAYMASTER_VALIDATION_MAGIC_VALUE: getPaddedSelector('IPaymaster', 'validateAndPayForPaymasterTransaction'), + SUCCESSFUL_PAYMASTER_VALIDATION_MAGIC_VALUE: getPaddedSelector( + 'IPaymaster', + 'validateAndPayForPaymasterTransaction' + ), PUBLISH_COMPRESSED_BYTECODE_SELECTOR: getSelector('Compressor', 'publishCompressedBytecode'), GET_MARKER_PADDED_SELECTOR: getPaddedSelector('KnownCodesStorage', 'getMarker'), RIGHT_PADDED_SET_L2_BLOCK_SELECTOR: getPaddedSelector('SystemContext', 'setL2Block'), - RIGHT_PADDED_APPEND_TRANSACTION_TO_L2_BLOCK_SELECTOR: getPaddedSelector('SystemContext', 'appendTransactionToCurrentL2Block'), + RIGHT_PADDED_APPEND_TRANSACTION_TO_L2_BLOCK_SELECTOR: getPaddedSelector( + 'SystemContext', + 'appendTransactionToCurrentL2Block' + ), RIGHT_PADDED_PUBLISH_TIMESTAMP_DATA_TO_L1_SELECTOR: getPaddedSelector('SystemContext', 'publishTimestampDataToL1'), COMPRESSED_BYTECODES_SLOTS: 32768, ENSURE_RETURNED_MAGIC: 1, FORBID_ZERO_GAS_PER_PUBDATA: 1, SYSTEM_CONTEXT_EXPECTED_CODE_HASH: getSystemContextExpectedHash(), UPGRADE_SYSTEM_CONTEXT_CALLDATA: upgradeSystemContextCalldata(), - // One of "worst case" scenarios for the number of state diffs in a batch is when 120kb of pubdata is spent + // One of "worst case" scenarios for the number of state diffs in a batch is when 120kb of pubdata is spent // on repeated writes, that are all zeroed out. In this case, the number of diffs is 120k / 5 = 24k. This means that they will have - // accoomdate 6528000 bytes of calldata for the uncompressed state diffs. Adding 120k on top leaves us with + // accoomdate 6528000 bytes of calldata for the uncompressed state diffs. Adding 120k on top leaves us with // roughly 6650000 bytes needed for calldata. 207813 slots are needed to accomodate this amount of data. // We round up to 208000 slots just in case. // - // In theory though much more calldata could be used (if for instance 1 byte is used for enum index). It is the responsibility of the + // In theory though much more calldata could be used (if for instance 1 byte is used for enum index). It is the responsibility of the // operator to ensure that it can form the correct calldata for the L1Messenger. OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_SLOTS: 208000, ...SYSTEM_PARAMS }; - function extractTestFunctionNames(sourceCode: string): string[] { // Remove single-line comments sourceCode = sourceCode.replace(/\/\/[^\n]*/g, ''); @@ -145,12 +152,9 @@ function extractTestFunctionNames(sourceCode: string): string[] { // Remove multi-line comments sourceCode = sourceCode.replace(/\/\*[\s\S]*?\*\//g, ''); + const regexPatterns = [/function\s+(TEST\w+)/g]; - const regexPatterns = [ - /function\s+(TEST\w+)/g, - ]; - - let results: string[] = []; + const results: string[] = []; for (const pattern of regexPatterns) { let match; while ((match = pattern.exec(sourceCode)) !== null) { @@ -177,21 +181,21 @@ function createTestFramework(tests: string[]): string { testing_start("${value}") ${value}() } - ` + `; }); testFramework += ` default { } return (0, 0) - ` + `; return testFramework; } async function main() { const bootloader = await renderFile('bootloader/bootloader.yul', params); - // The overhead is unknown for gas tests and so it should be zero to calculate it + // The overhead is unknown for gas tests and so it should be zero to calculate it const gasTestBootloaderTemplate = await renderFile('bootloader/bootloader.yul', { ...params, L2_TX_INTRINSIC_GAS: 0, @@ -199,7 +203,7 @@ async function main() { L1_TX_INTRINSIC_L2_GAS: 0, L1_TX_INTRINSIC_PUBDATA: 0, FORBID_ZERO_GAS_PER_PUBDATA: 0 - }) + }); const feeEstimationBootloaderTemplate = await renderFile('bootloader/bootloader.yul', { ...params, @@ -207,32 +211,22 @@ async function main() { }); console.log('Preprocessing production bootloader'); - const provedBatchBootloader = preprocess.preprocess( - bootloader, - { BOOTLOADER_TYPE: 'proved_batch' } - ); + const provedBatchBootloader = preprocess.preprocess(bootloader, { BOOTLOADER_TYPE: 'proved_batch' }); console.log('Preprocessing playground block bootloader'); - const playgroundBatchBootloader = preprocess.preprocess( - bootloader, - { BOOTLOADER_TYPE: 'playground_batch' } - ); + const playgroundBatchBootloader = preprocess.preprocess(bootloader, { BOOTLOADER_TYPE: 'playground_batch' }); console.log('Preprocessing gas test bootloader'); - const gasTestBootloader = preprocess.preprocess( - gasTestBootloaderTemplate, - { BOOTLOADER_TYPE: 'proved_batch' } - ); + const gasTestBootloader = preprocess.preprocess(gasTestBootloaderTemplate, { BOOTLOADER_TYPE: 'proved_batch' }); console.log('Preprocessing fee estimation bootloader'); - const feeEstimationBootloader = preprocess.preprocess( - feeEstimationBootloaderTemplate, - { BOOTLOADER_TYPE: 'playground_batch' } - ); + const feeEstimationBootloader = preprocess.preprocess(feeEstimationBootloaderTemplate, { + BOOTLOADER_TYPE: 'playground_batch' + }); console.log('Preprocessing bootloader tests'); const bootloaderTests = await renderFile('bootloader/tests/bootloader/bootloader_test.yul', {}); - const testMethods = extractTestFunctionNames(bootloaderTests) + const testMethods = extractTestFunctionNames(bootloaderTests); - console.log("Found tests: " + testMethods); + console.log('Found tests: ' + testMethods); const testFramework = createTestFramework(testMethods); @@ -240,7 +234,7 @@ async function main() { const bootloaderWithTests = await renderFile('bootloader/bootloader.yul', { ...params, - CODE_START_PLACEHOLDER: "\n" + bootloaderTestUtils + "\n" + bootloaderTests + "\n" + testFramework + CODE_START_PLACEHOLDER: '\n' + bootloaderTestUtils + '\n' + bootloaderTests + '\n' + testFramework }); const provedBootloaderWithTests = preprocess.preprocess(bootloaderWithTests, { BOOTLOADER_TYPE: 'proved_batch' }); diff --git a/scripts/utils.ts b/scripts/utils.ts index b48a3d016ea..7d8fcaeb65e 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -1,9 +1,10 @@ -import {Language, SYSTEM_CONTRACTS, YulContractDescrption} from "./constants"; -import {BigNumber, BigNumberish, BytesLike, ethers} from "ethers"; -import * as fs from "fs"; -import {hashBytecode} from "zksync-web3/build/src/utils"; import * as hre from 'hardhat'; -import {Deployer} from "@matterlabs/hardhat-zksync-deploy"; + +import { Deployer } from '@matterlabs/hardhat-zksync-deploy'; +import { BigNumber, BigNumberish, BytesLike, ethers } from 'ethers'; +import * as fs from 'fs'; +import { hashBytecode } from 'zksync-web3/build/src/utils'; +import { Language, SYSTEM_CONTRACTS, YulContractDescrption } from './constants'; export interface Dependency { name: string; @@ -39,24 +40,26 @@ export interface ForceDeployment { } export async function outputSystemContracts(): Promise { - const upgradeParamsPromises: Promise[] = Object.values(SYSTEM_CONTRACTS).map(async (systemContractInfo) => { - let bytecode: string; - - if (systemContractInfo.lang === Language.Yul) { - bytecode = readYulBytecode(systemContractInfo); - } else { - bytecode = (await hre.artifacts.readArtifact(systemContractInfo.codeName)).bytecode; - } - const bytecodeHash = hashBytecode(bytecode); - - return { - bytecodeHash: ethers.utils.hexlify(bytecodeHash), - newAddress: systemContractInfo.address, - value: "0", - input: '0x', - callConstructor: false + const upgradeParamsPromises: Promise[] = Object.values(SYSTEM_CONTRACTS).map( + async (systemContractInfo) => { + let bytecode: string; + + if (systemContractInfo.lang === Language.Yul) { + bytecode = readYulBytecode(systemContractInfo); + } else { + bytecode = (await hre.artifacts.readArtifact(systemContractInfo.codeName)).bytecode; + } + const bytecodeHash = hashBytecode(bytecode); + + return { + bytecodeHash: ethers.utils.hexlify(bytecodeHash), + newAddress: systemContractInfo.address, + value: '0', + input: '0x', + callConstructor: false + }; } - }); + ); return await Promise.all(upgradeParamsPromises); } @@ -65,8 +68,7 @@ export async function outputSystemContracts(): Promise { // and outputs the JSON that can be used for performing the necessary upgrade const DEFAULT_L2_TX_GAS_LIMIT = 2097152; - -// For the given dependencies, returns an array of tuples (bytecodeHash, marker), where +// For the given dependencies, returns an array of tuples (bytecodeHash, marker), where // for each dependency the bytecodeHash is its versioned hash and marker is whether // the hash has been published before. export async function getMarkers(dependencies: BytesLike[], deployer: Deployer): Promise<[string, boolean][]> { @@ -91,8 +93,8 @@ export async function getMarkers(dependencies: BytesLike[], deployer: Deployer): export async function checkMarkers(dependencies: BytesLike[], deployer: Deployer) { const markers = await getMarkers(dependencies, deployer); - for(const [bytecodeHash, marker] of markers) { - if(!marker) { + for (const [bytecodeHash, marker] of markers) { + if (!marker) { throw new Error(`Failed to mark ${bytecodeHash}`); } } @@ -110,15 +112,21 @@ export async function publishFactoryDeps( dependencies: Dependency[], deployer: Deployer, nonce: number, - gasPrice: BigNumber, + gasPrice: BigNumber ) { - if(dependencies.length == 0) { + if (dependencies.length == 0) { return []; } const bytecodes = getBytecodes(dependencies); const combinedLength = totalBytesLength(bytecodes); - console.log(`\nPublishing dependencies for contracts ${dependencies.map((dep) => {return dep.name}).join(', ')}`); + console.log( + `\nPublishing dependencies for contracts ${dependencies + .map((dep) => { + return dep.name; + }) + .join(', ')}` + ); console.log(`Combined length ${combinedLength}`); const txHandle = await deployer.zkWallet.requestExecute({ @@ -131,7 +139,7 @@ export async function publishFactoryDeps( gasPrice, gasLimit: 3000000 } - }) + }); console.log(`Transaction hash: ${txHandle.hash}`); // Waiting for the transaction to be processed by the server @@ -147,21 +155,21 @@ export async function publishFactoryDeps( export async function filterPublishedFactoryDeps( contractName: string, factoryDeps: string[], - deployer: Deployer, + deployer: Deployer ): Promise<[string[], number]> { console.log(`\nFactory dependencies for contract ${contractName}:`); let currentLength = 0; - let bytecodesToDeploy: string[] = []; + const bytecodesToDeploy: string[] = []; const hashesAndMarkers = await getMarkers(factoryDeps, deployer); - for(let i = 0; i < factoryDeps.length; i++) { + for (let i = 0; i < factoryDeps.length; i++) { const depLength = ethers.utils.arrayify(factoryDeps[i]).length; const [hash, marker] = hashesAndMarkers[i]; console.log(`${hash} (length: ${depLength} bytes) (deployed: ${marker})`); - if(!marker) { + if (!marker) { currentLength += depLength; bytecodesToDeploy.push(factoryDeps[i]); } diff --git a/test/BootloaderUtilities.spec.ts b/test/BootloaderUtilities.spec.ts index 03874bddbac..70e63781f79 100644 --- a/test/BootloaderUtilities.spec.ts +++ b/test/BootloaderUtilities.spec.ts @@ -1,11 +1,11 @@ import { expect } from 'chai'; -import { BootloaderUtilities } from '../typechain-types'; -import { Wallet } from 'zksync-web3'; -import { getWallets, deployContract } from './shared/utils'; import { ethers } from 'hardhat'; import * as zksync from 'zksync-web3'; -import { hashBytecode, serialize } from 'zksync-web3/build/src/utils'; -import { TransactionData, signedTxToTransactionData } from './shared/transactions'; +import { Wallet } from 'zksync-web3'; +import { serialize } from 'zksync-web3/build/src/utils'; +import { BootloaderUtilities } from '../typechain-types'; +import { signedTxToTransactionData } from './shared/transactions'; +import { deployContract, getWallets } from './shared/utils'; describe('BootloaderUtilities tests', function () { let wallet: Wallet; @@ -80,7 +80,7 @@ describe('BootloaderUtilities tests', function () { const parsedTx = zksync.utils.parseTransaction(txBytes); const txData = signedTxToTransactionData(parsedTx)!; - let signature = ethers.utils.arrayify(txData.signature); + const signature = ethers.utils.arrayify(txData.signature); signature[64] = 29; txData.signature = signature; @@ -126,7 +126,7 @@ describe('BootloaderUtilities tests', function () { const parsedEIP1559tx = zksync.utils.parseTransaction(signedEip1559Tx); const EIP1559TxData = signedTxToTransactionData(parsedEIP1559tx)!; - let signature = ethers.utils.arrayify(EIP1559TxData.signature); + const signature = ethers.utils.arrayify(EIP1559TxData.signature); signature[64] = 0; EIP1559TxData.signature = signature; @@ -172,7 +172,7 @@ describe('BootloaderUtilities tests', function () { const parsedEIP2930tx = zksync.utils.parseTransaction(signedEip2930Tx); const EIP2930TxData = signedTxToTransactionData(parsedEIP2930tx)!; - let signature = ethers.utils.arrayify(EIP2930TxData.signature); + const signature = ethers.utils.arrayify(EIP2930TxData.signature); signature[64] = 100; EIP2930TxData.signature = signature; diff --git a/test/ComplexUpgrader.spec.ts b/test/ComplexUpgrader.spec.ts index e9818b68f71..259ec5273a0 100644 --- a/test/ComplexUpgrader.spec.ts +++ b/test/ComplexUpgrader.spec.ts @@ -1,17 +1,14 @@ import { expect } from 'chai'; import { ethers, network } from 'hardhat'; -import { Wallet } from 'zksync-web3'; import { ComplexUpgrader, DummyUpgrade } from '../typechain-types'; import { FORCE_DEPLOYER_ADDRESS } from './shared/constants'; -import { deployContract, getWallets } from './shared/utils'; +import { deployContract } from './shared/utils'; describe('ComplexUpgrader tests', function () { - let wallet: Wallet; let complexUpgrader: ComplexUpgrader; let dummyUpgrade: DummyUpgrade; before(async () => { - wallet = getWallets()[0]; complexUpgrader = (await deployContract('ComplexUpgrader')) as ComplexUpgrader; dummyUpgrade = (await deployContract('DummyUpgrade')) as DummyUpgrade; }); diff --git a/test/Compressor.spec.ts b/test/Compressor.spec.ts index 8ff3c9c204f..b29fdee2653 100644 --- a/test/Compressor.spec.ts +++ b/test/Compressor.spec.ts @@ -24,7 +24,7 @@ xdescribe('Compressor tests', function () { wallet = getWallets()[0]; compressor = (await deployContract('Compressor')) as Compressor; _knownCodesStorageCode = await getCode(KNOWN_CODE_STORAGE_CONTRACT_ADDRESS); - let mockKnownCodesStorageArtifact = await loadArtifact('MockKnownCodesStorage'); + const mockKnownCodesStorageArtifact = await loadArtifact('MockKnownCodesStorage'); await setCode(KNOWN_CODE_STORAGE_CONTRACT_ADDRESS, mockKnownCodesStorageArtifact.bytecode); await network.provider.request({ @@ -184,7 +184,7 @@ xdescribe('Compressor tests', function () { }); it('enumeration index size is too large', async () => { - let stateDiffs = [ + const stateDiffs = [ { key: '0x1234567890123456789012345678901234567890123456789012345678901234', index: 0, @@ -192,9 +192,9 @@ xdescribe('Compressor tests', function () { finalValue: BigNumber.from('0x1234567890123456789012345678901234567890123456789012345678901234') } ]; - let encodedStateDiffs = encodeStateDiffs(stateDiffs); + const encodedStateDiffs = encodeStateDiffs(stateDiffs); stateDiffs[0].key = '0x1234567890123456789012345678901234567890123456789012345678901233'; - let compressedStateDiffs = compressStateDiffs(9, stateDiffs); + const compressedStateDiffs = compressStateDiffs(9, stateDiffs); await expect( compressor .connect(l1Messenger) @@ -203,7 +203,7 @@ xdescribe('Compressor tests', function () { }); it('initial write key mismatch', async () => { - let stateDiffs = [ + const stateDiffs = [ { key: '0x1234567890123456789012345678901234567890123456789012345678901234', index: 0, @@ -211,9 +211,9 @@ xdescribe('Compressor tests', function () { finalValue: BigNumber.from(0) } ]; - let encodedStateDiffs = encodeStateDiffs(stateDiffs); + const encodedStateDiffs = encodeStateDiffs(stateDiffs); stateDiffs[0].key = '0x1234567890123456789012345678901234567890123456789012345678901233'; - let compressedStateDiffs = compressStateDiffs(4, stateDiffs); + const compressedStateDiffs = compressStateDiffs(4, stateDiffs); await expect( compressor .connect(l1Messenger) @@ -222,7 +222,7 @@ xdescribe('Compressor tests', function () { }); it('repeated write key mismatch', async () => { - let stateDiffs = [ + const stateDiffs = [ { key: '0x1234567890123456789012345678901234567890123456789012345678901234', index: 1, @@ -230,9 +230,9 @@ xdescribe('Compressor tests', function () { finalValue: BigNumber.from(0) } ]; - let encodedStateDiffs = encodeStateDiffs(stateDiffs); + const encodedStateDiffs = encodeStateDiffs(stateDiffs); stateDiffs[0].index = 2; - let compressedStateDiffs = compressStateDiffs(8, stateDiffs); + const compressedStateDiffs = compressStateDiffs(8, stateDiffs); await expect( compressor .connect(l1Messenger) @@ -241,7 +241,7 @@ xdescribe('Compressor tests', function () { }); it('no compression value mismatch', async () => { - let stateDiffs = [ + const stateDiffs = [ { key: '0x1234567890123456789012345678901234567890123456789012345678901234', index: 1, @@ -255,9 +255,9 @@ xdescribe('Compressor tests', function () { finalValue: TWO_IN_256.sub(2) } ]; - let encodedStateDiffs = encodeStateDiffs(stateDiffs); + const encodedStateDiffs = encodeStateDiffs(stateDiffs); stateDiffs[1].finalValue = TWO_IN_256.sub(1); - let compressedStateDiffs = compressStateDiffs(3, stateDiffs); + const compressedStateDiffs = compressStateDiffs(3, stateDiffs); await expect( compressor .connect(l1Messenger) @@ -266,7 +266,7 @@ xdescribe('Compressor tests', function () { }); it('transform value mismatch', async () => { - let stateDiffs = [ + const stateDiffs = [ { key: '0x1234567890123456789012345678901234567890123456789012345678901234', index: 255, @@ -280,9 +280,9 @@ xdescribe('Compressor tests', function () { finalValue: BigNumber.from(1) } ]; - let encodedStateDiffs = encodeStateDiffs(stateDiffs); + const encodedStateDiffs = encodeStateDiffs(stateDiffs); stateDiffs[1].finalValue = BigNumber.from(0); - let compressedStateDiffs = compressStateDiffs(1, stateDiffs); + const compressedStateDiffs = compressStateDiffs(1, stateDiffs); await expect( compressor .connect(l1Messenger) @@ -291,7 +291,7 @@ xdescribe('Compressor tests', function () { }); it('add value mismatch', async () => { - let stateDiffs = [ + const stateDiffs = [ { key: '0x1234567890123456789012345678901234567890123456789012345678901235', index: 255, @@ -299,9 +299,9 @@ xdescribe('Compressor tests', function () { finalValue: TWO_IN_256.div(2).sub(1) } ]; - let encodedStateDiffs = encodeStateDiffs(stateDiffs); + const encodedStateDiffs = encodeStateDiffs(stateDiffs); stateDiffs[0].finalValue = TWO_IN_256.div(2); - let compressedStateDiffs = compressStateDiffs(1, stateDiffs); + const compressedStateDiffs = compressStateDiffs(1, stateDiffs); await expect( compressor .connect(l1Messenger) @@ -310,7 +310,7 @@ xdescribe('Compressor tests', function () { }); it('sub value mismatch', async () => { - let stateDiffs = [ + const stateDiffs = [ { key: '0x1234567890123456789012345678901234567890123456789012345678901236', index: 0, @@ -318,9 +318,9 @@ xdescribe('Compressor tests', function () { finalValue: TWO_IN_256.div(4).sub(5) } ]; - let encodedStateDiffs = encodeStateDiffs(stateDiffs); + const encodedStateDiffs = encodeStateDiffs(stateDiffs); stateDiffs[0].finalValue = TWO_IN_256.div(4).sub(1); - let compressedStateDiffs = compressStateDiffs(1, stateDiffs); + const compressedStateDiffs = compressStateDiffs(1, stateDiffs); await expect( compressor .connect(l1Messenger) @@ -329,7 +329,7 @@ xdescribe('Compressor tests', function () { }); it('invalid operation', async () => { - let stateDiffs = [ + const stateDiffs = [ { key: '0x1234567890123456789012345678901234567890123456789012345678901236', index: 0, @@ -337,9 +337,9 @@ xdescribe('Compressor tests', function () { finalValue: TWO_IN_256.div(4).sub(5) } ]; - let encodedStateDiffs = encodeStateDiffs(stateDiffs); + const encodedStateDiffs = encodeStateDiffs(stateDiffs); let compressedStateDiffs = compressStateDiffs(1, stateDiffs); - let compressedStateDiffsCharArray = compressedStateDiffs.split(''); + const compressedStateDiffsCharArray = compressedStateDiffs.split(''); compressedStateDiffsCharArray[2 + 4 + 64 + 1] = 'f'; compressedStateDiffs = compressedStateDiffsCharArray.join(''); await expect( @@ -350,7 +350,7 @@ xdescribe('Compressor tests', function () { }); it('Incorrect number of initial storage diffs', async () => { - let stateDiffs = [ + const stateDiffs = [ { key: '0x1234567890123456789012345678901234567890123456789012345678901236', index: 0, @@ -364,14 +364,14 @@ xdescribe('Compressor tests', function () { finalValue: BigNumber.from(0) } ]; - let encodedStateDiffs = encodeStateDiffs(stateDiffs); + const encodedStateDiffs = encodeStateDiffs(stateDiffs); stateDiffs.push({ key: '0x0234567890123456789012345678901234567890123456789012345678901231', index: 0, initValue: BigNumber.from(0), finalValue: BigNumber.from(1) }); - let compressedStateDiffs = compressStateDiffs(1, stateDiffs); + const compressedStateDiffs = compressStateDiffs(1, stateDiffs); await expect( compressor .connect(l1Messenger) @@ -380,7 +380,7 @@ xdescribe('Compressor tests', function () { }); it('Extra data in compressed state diffs', async () => { - let stateDiffs = [ + const stateDiffs = [ { key: '0x1234567890123456789012345678901234567890123456789012345678901236', index: 0, @@ -394,14 +394,14 @@ xdescribe('Compressor tests', function () { finalValue: BigNumber.from(0) } ]; - let encodedStateDiffs = encodeStateDiffs(stateDiffs); + const encodedStateDiffs = encodeStateDiffs(stateDiffs); stateDiffs.push({ key: '0x0234567890123456789012345678901234567890123456789012345678901231', index: 1, initValue: BigNumber.from(0), finalValue: BigNumber.from(1) }); - let compressedStateDiffs = compressStateDiffs(1, stateDiffs); + const compressedStateDiffs = compressStateDiffs(1, stateDiffs); await expect( compressor .connect(l1Messenger) @@ -410,9 +410,7 @@ xdescribe('Compressor tests', function () { }); it('successfully verified', async () => { - const l1Messenger = await ethers.getSigner(L1_MESSENGER_SYSTEM_CONTRACT_ADDRESS); - - let stateDiffs = [ + const stateDiffs = [ { key: '0x1234567890123456789012345678901234567890123456789012345678901230', index: 0, @@ -444,8 +442,8 @@ xdescribe('Compressor tests', function () { finalValue: BigNumber.from(1) } ]; - let encodedStateDiffs = encodeStateDiffs(stateDiffs); - let compressedStateDiffs = compressStateDiffs(4, stateDiffs); + const encodedStateDiffs = encodeStateDiffs(stateDiffs); + const compressedStateDiffs = compressStateDiffs(4, stateDiffs); const tx = { from: L1_MESSENGER_SYSTEM_CONTRACT_ADDRESS, to: compressor.address, @@ -470,7 +468,7 @@ interface StateDiff { } function encodeStateDiffs(stateDiffs: StateDiff[]): string { - let rawStateDiffs = []; + const rawStateDiffs = []; for (const stateDiff of stateDiffs) { rawStateDiffs.push( ethers.utils.solidityPack( @@ -492,8 +490,8 @@ function encodeStateDiffs(stateDiffs: StateDiff[]): string { function compressStateDiffs(enumerationIndexSize: number, stateDiffs: StateDiff[]): string { let num_initial = 0; - let initial = []; - let repeated = []; + const initial = []; + const repeated = []; for (const stateDiff of stateDiffs) { const addition = stateDiff.finalValue.sub(stateDiff.initValue).add(TWO_IN_256).mod(TWO_IN_256); const subtraction = stateDiff.initValue.sub(stateDiff.finalValue).add(TWO_IN_256).mod(TWO_IN_256); @@ -512,12 +510,12 @@ function compressStateDiffs(enumerationIndexSize: number, stateDiffs: StateDiff[ op = 0; } let len = 0; - let minHex = min.eq(0) ? '0x' : min.toHexString(); + const minHex = min.eq(0) ? '0x' : min.toHexString(); if (op > 0) { len = (minHex.length - 2) / 2; } - let metadata = (len << 3) + op; - let enumerationIndexType = 'uint' + (enumerationIndexSize * 8).toString(); + const metadata = (len << 3) + op; + const enumerationIndexType = 'uint' + (enumerationIndexSize * 8).toString(); if (stateDiff.index === 0) { num_initial += 1; initial.push(ethers.utils.solidityPack(['bytes32', 'uint8', 'bytes'], [stateDiff.key, metadata, minHex])); diff --git a/test/ContractDeployer.spec.ts b/test/ContractDeployer.spec.ts index 699801ba9f6..462053bc86f 100644 --- a/test/ContractDeployer.spec.ts +++ b/test/ContractDeployer.spec.ts @@ -41,20 +41,22 @@ xdescribe('ContractDeployer tests', function () { wallet = getWallets()[0]; _contractDeployerCode = await getCode(DEPLOYER_SYSTEM_CONTRACT_ADDRESS); - let contractDeployerArtifact = await loadArtifact('ContractDeployer'); + const contractDeployerArtifact = await loadArtifact('ContractDeployer'); await setCode(DEPLOYER_SYSTEM_CONTRACT_ADDRESS, contractDeployerArtifact.bytecode); contractDeployer = ContractDeployer__factory.connect(DEPLOYER_SYSTEM_CONTRACT_ADDRESS, wallet); nonceHolder = NonceHolder__factory.connect(NONCE_HOLDER_SYSTEM_CONTRACT_ADDRESS, wallet); - let contractDeployerSystemCallContract = await deployContract('SystemCaller', [contractDeployer.address]); + const contractDeployerSystemCallContract = await deployContract('SystemCaller', [contractDeployer.address]); contractDeployerSystemCall = new Contract( contractDeployerSystemCallContract.address, contractDeployerArtifact.abi, wallet ) as ContractDeployer; - let contractDeployerNotSystemCallContract = await deployContract('NotSystemCaller', [contractDeployer.address]); + const contractDeployerNotSystemCallContract = await deployContract('NotSystemCaller', [ + contractDeployer.address + ]); contractDeployerNotSystemCall = new Contract( contractDeployerNotSystemCallContract.address, contractDeployerArtifact.abi, @@ -145,7 +147,7 @@ xdescribe('ContractDeployer tests', function () { describe('getAccountInfo', function () { it('success', async () => { - let accountInfo = await contractDeployer.getAccountInfo(RANDOM_ADDRESS); + const accountInfo = await contractDeployer.getAccountInfo(RANDOM_ADDRESS); expect(accountInfo.supportedAAVersion).to.be.eq(AA_VERSION_NONE); expect(accountInfo.nonceOrdering).to.be.eq(NONCE_ORDERING_SEQUENTIAL); }); @@ -240,8 +242,8 @@ xdescribe('ContractDeployer tests', function () { }); it('successfully deployed', async () => { - let nonce = await nonceHolder.getDeploymentNonce(wallet.address); - let expectedAddress = utils.createAddress(wallet.address, nonce); + const nonce = await nonceHolder.getDeploymentNonce(wallet.address); + const expectedAddress = utils.createAddress(wallet.address, nonce); await expect( contractDeployer.createAccount( ethers.constants.HashZero, @@ -254,14 +256,14 @@ xdescribe('ContractDeployer tests', function () { .withArgs(wallet.address, utils.hashBytecode(deployableArtifact.bytecode), expectedAddress) .to.emit(Deployable__factory.connect(expectedAddress, wallet), 'Deployed') .withArgs(0, '0xdeadbeef'); - let accountInfo = await contractDeployer.getAccountInfo(expectedAddress); + const accountInfo = await contractDeployer.getAccountInfo(expectedAddress); expect(accountInfo.supportedAAVersion).to.be.eq(AA_VERSION_NONE); expect(accountInfo.nonceOrdering).to.be.eq(NONCE_ORDERING_SEQUENTIAL); }); it('non-zero value deployed', async () => { - let nonce = await nonceHolder.getDeploymentNonce(wallet.address); - let expectedAddress = utils.createAddress(wallet.address, nonce); + const nonce = await nonceHolder.getDeploymentNonce(wallet.address); + const expectedAddress = utils.createAddress(wallet.address, nonce); await expect( contractDeployer.createAccount( ethers.constants.HashZero, @@ -275,7 +277,7 @@ xdescribe('ContractDeployer tests', function () { .withArgs(wallet.address, utils.hashBytecode(deployableArtifact.bytecode), expectedAddress) .to.emit(Deployable__factory.connect(expectedAddress, wallet), 'Deployed') .withArgs(11111111, '0x'); - let accountInfo = await contractDeployer.getAccountInfo(expectedAddress); + const accountInfo = await contractDeployer.getAccountInfo(expectedAddress); expect(accountInfo.supportedAAVersion).to.be.eq(AA_VERSION_NONE); expect(accountInfo.nonceOrdering).to.be.eq(NONCE_ORDERING_SEQUENTIAL); }); @@ -316,7 +318,7 @@ xdescribe('ContractDeployer tests', function () { }); it('successfully deployed', async () => { - let expectedAddress = utils.create2Address( + const expectedAddress = utils.create2Address( wallet.address, utils.hashBytecode(deployableArtifact.bytecode), '0x1234567891234567891234512222122167891123456789123456787654323456', @@ -334,7 +336,7 @@ xdescribe('ContractDeployer tests', function () { .withArgs(wallet.address, utils.hashBytecode(deployableArtifact.bytecode), expectedAddress) .to.emit(Deployable__factory.connect(expectedAddress, wallet), 'Deployed') .withArgs(0, '0xdeadbeef'); - let accountInfo = await contractDeployer.getAccountInfo(expectedAddress); + const accountInfo = await contractDeployer.getAccountInfo(expectedAddress); expect(accountInfo.supportedAAVersion).to.be.eq(AA_VERSION_NONE); expect(accountInfo.nonceOrdering).to.be.eq(NONCE_ORDERING_SEQUENTIAL); }); @@ -351,7 +353,7 @@ xdescribe('ContractDeployer tests', function () { }); it('non-zero value deployed', async () => { - let expectedAddress = utils.create2Address( + const expectedAddress = utils.create2Address( wallet.address, utils.hashBytecode(deployableArtifact.bytecode), ethers.constants.HashZero, @@ -370,7 +372,7 @@ xdescribe('ContractDeployer tests', function () { .withArgs(wallet.address, utils.hashBytecode(deployableArtifact.bytecode), expectedAddress) .to.emit(Deployable__factory.connect(expectedAddress, wallet), 'Deployed') .withArgs(5555, '0x'); - let accountInfo = await contractDeployer.getAccountInfo(expectedAddress); + const accountInfo = await contractDeployer.getAccountInfo(expectedAddress); expect(accountInfo.supportedAAVersion).to.be.eq(AA_VERSION_NONE); expect(accountInfo.nonceOrdering).to.be.eq(NONCE_ORDERING_SEQUENTIAL); }); @@ -388,8 +390,8 @@ xdescribe('ContractDeployer tests', function () { }); it('successfully deployed', async () => { - let nonce = await nonceHolder.getDeploymentNonce(wallet.address); - let expectedAddress = utils.createAddress(wallet.address, nonce); + const nonce = await nonceHolder.getDeploymentNonce(wallet.address); + const expectedAddress = utils.createAddress(wallet.address, nonce); await expect( contractDeployer.create( ethers.constants.HashZero, @@ -401,7 +403,7 @@ xdescribe('ContractDeployer tests', function () { .withArgs(wallet.address, utils.hashBytecode(deployableArtifact.bytecode), expectedAddress) .to.emit(Deployable__factory.connect(expectedAddress, wallet), 'Deployed') .withArgs(0, '0x12'); - let accountInfo = await contractDeployer.getAccountInfo(expectedAddress); + const accountInfo = await contractDeployer.getAccountInfo(expectedAddress); expect(accountInfo.supportedAAVersion).to.be.eq(AA_VERSION_NONE); expect(accountInfo.nonceOrdering).to.be.eq(NONCE_ORDERING_SEQUENTIAL); }); @@ -419,7 +421,7 @@ xdescribe('ContractDeployer tests', function () { }); it('successfully deployed', async () => { - let expectedAddress = utils.create2Address( + const expectedAddress = utils.create2Address( wallet.address, utils.hashBytecode(deployableArtifact.bytecode), '0x1234567891234567891234512222122167891123456789123456787654323456', @@ -436,7 +438,7 @@ xdescribe('ContractDeployer tests', function () { .withArgs(wallet.address, utils.hashBytecode(deployableArtifact.bytecode), expectedAddress) .to.emit(Deployable__factory.connect(expectedAddress, wallet), 'Deployed') .withArgs(0, '0xab'); - let accountInfo = await contractDeployer.getAccountInfo(expectedAddress); + const accountInfo = await contractDeployer.getAccountInfo(expectedAddress); expect(accountInfo.supportedAAVersion).to.be.eq(AA_VERSION_NONE); expect(accountInfo.nonceOrdering).to.be.eq(NONCE_ORDERING_SEQUENTIAL); }); @@ -444,7 +446,7 @@ xdescribe('ContractDeployer tests', function () { describe('forceDeployOnAddress', function () { it('not from self call failed', async () => { - let deploymentData = { + const deploymentData = { bytecodeHash: utils.hashBytecode(deployableArtifact.bytecode), newAddress: RANDOM_ADDRESS, callConstructor: false, @@ -457,7 +459,7 @@ xdescribe('ContractDeployer tests', function () { }); it('not known bytecode hash failed', async () => { - let deploymentData = { + const deploymentData = { bytecodeHash: '0x0100FFFFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF', newAddress: RANDOM_ADDRESS, callConstructor: false, @@ -470,7 +472,7 @@ xdescribe('ContractDeployer tests', function () { }); it('successfully deployed', async () => { - let deploymentData = { + const deploymentData = { bytecodeHash: utils.hashBytecode(deployableArtifact.bytecode), newAddress: RANDOM_ADDRESS, callConstructor: false, @@ -481,7 +483,7 @@ xdescribe('ContractDeployer tests', function () { .to.emit(contractDeployer, 'ContractDeployed') .withArgs(wallet.address, utils.hashBytecode(deployableArtifact.bytecode), RANDOM_ADDRESS) .to.not.emit(Deployable__factory.connect(RANDOM_ADDRESS, wallet), 'Deployed'); - let accountInfo = await contractDeployer.getAccountInfo(RANDOM_ADDRESS); + const accountInfo = await contractDeployer.getAccountInfo(RANDOM_ADDRESS); expect(accountInfo.supportedAAVersion).to.be.eq(AA_VERSION_NONE); expect(accountInfo.nonceOrdering).to.be.eq(NONCE_ORDERING_SEQUENTIAL); }); @@ -489,7 +491,7 @@ xdescribe('ContractDeployer tests', function () { describe('forceDeployOnAddresses', function () { it('not allowed to call', async () => { - let deploymentData = [ + const deploymentData = [ { bytecodeHash: utils.hashBytecode(deployableArtifact.bytecode), newAddress: RANDOM_ADDRESS_2, @@ -511,7 +513,7 @@ xdescribe('ContractDeployer tests', function () { }); it('successfully deployed', async () => { - let deploymentData = [ + const deploymentData = [ { bytecodeHash: utils.hashBytecode(deployableArtifact.bytecode), newAddress: RANDOM_ADDRESS_2, @@ -536,11 +538,11 @@ xdescribe('ContractDeployer tests', function () { .withArgs(0, '0x') .to.not.emit(Deployable__factory.connect(RANDOM_ADDRESS_3, wallet), 'Deployed'); - let accountInfo1 = await contractDeployer.getAccountInfo(RANDOM_ADDRESS_2); + const accountInfo1 = await contractDeployer.getAccountInfo(RANDOM_ADDRESS_2); expect(accountInfo1.supportedAAVersion).to.be.eq(AA_VERSION_NONE); expect(accountInfo1.nonceOrdering).to.be.eq(NONCE_ORDERING_SEQUENTIAL); - let accountInfo2 = await contractDeployer.getAccountInfo(RANDOM_ADDRESS_3); + const accountInfo2 = await contractDeployer.getAccountInfo(RANDOM_ADDRESS_3); expect(accountInfo2.supportedAAVersion).to.be.eq(AA_VERSION_NONE); expect(accountInfo2.nonceOrdering).to.be.eq(NONCE_ORDERING_SEQUENTIAL); }); diff --git a/test/DefaultAccount.spec.ts b/test/DefaultAccount.spec.ts index 584a6f6630f..366d4fbeb2f 100644 --- a/test/DefaultAccount.spec.ts +++ b/test/DefaultAccount.spec.ts @@ -37,7 +37,7 @@ xdescribe('DefaultAccount tests', function () { before(async () => { wallet = getWallets()[0]; account = getWallets()[2]; - let defaultAccountArtifact = await loadArtifact('DefaultAccount'); + const defaultAccountArtifact = await loadArtifact('DefaultAccount'); await setCode(account.address, defaultAccountArtifact.bytecode); defaultAccount = DefaultAccount__factory.connect(account.address, wallet); nonceHolder = NonceHolder__factory.connect(NONCE_HOLDER_SYSTEM_CONTRACT_ADDRESS, wallet); @@ -45,7 +45,7 @@ xdescribe('DefaultAccount tests', function () { callable = (await deployContract('Callable')) as Callable; mockERC20Approve = (await deployContract('MockERC20Approve')) as MockERC20Approve; - let paymasterFlowInterfaceArtifact = await loadArtifact('IPaymasterFlow'); + const paymasterFlowInterfaceArtifact = await loadArtifact('IPaymasterFlow'); paymasterFlowInterface = new ethers.utils.Interface(paymasterFlowInterfaceArtifact.abi); await network.provider.request({ @@ -64,7 +64,7 @@ xdescribe('DefaultAccount tests', function () { describe('validateTransaction', function () { it('non-deployer ignored', async () => { - let nonce = await nonceHolder.getMinNonce(account.address); + const nonce = await nonceHolder.getMinNonce(account.address); const legacyTx = await account.populateTransaction({ type: 0, to: RANDOM_ADDRESS, @@ -92,7 +92,7 @@ xdescribe('DefaultAccount tests', function () { }); it('invalid ignature', async () => { - let nonce = await nonceHolder.getMinNonce(account.address); + const nonce = await nonceHolder.getMinNonce(account.address); const legacyTx = await account.populateTransaction({ type: 0, to: RANDOM_ADDRESS, @@ -121,7 +121,7 @@ xdescribe('DefaultAccount tests', function () { }); it('valid tx', async () => { - let nonce = await nonceHolder.getMinNonce(account.address); + const nonce = await nonceHolder.getMinNonce(account.address); const legacyTx = await account.populateTransaction({ type: 0, to: RANDOM_ADDRESS, @@ -153,7 +153,7 @@ xdescribe('DefaultAccount tests', function () { describe('executeTransaction', function () { it('non-deployer ignored', async () => { - let nonce = await nonceHolder.getMinNonce(account.address); + const nonce = await nonceHolder.getMinNonce(account.address); const legacyTx = await account.populateTransaction({ type: 0, to: callable.address, @@ -178,7 +178,7 @@ xdescribe('DefaultAccount tests', function () { }); it('successfully executed', async () => { - let nonce = await nonceHolder.getMinNonce(account.address); + const nonce = await nonceHolder.getMinNonce(account.address); const legacyTx = await account.populateTransaction({ type: 0, to: callable.address, @@ -204,7 +204,7 @@ xdescribe('DefaultAccount tests', function () { describe('executeTransactionFromOutside', function () { it('nothing', async () => { - let nonce = await nonceHolder.getMinNonce(account.address); + const nonce = await nonceHolder.getMinNonce(account.address); const legacyTx = await account.populateTransaction({ type: 0, to: callable.address, @@ -218,9 +218,7 @@ xdescribe('DefaultAccount tests', function () { const parsedTx = zksync.utils.parseTransaction(txBytes); const txData = signedTxToTransactionData(parsedTx)!; - const txHash = parsedTx.hash; delete legacyTx.from; - const signedHash = ethers.utils.keccak256(serialize(legacyTx)); await expect(await defaultAccount.executeTransactionFromOutside(txData)).to.not.emit(callable, 'Called'); }); @@ -228,7 +226,7 @@ xdescribe('DefaultAccount tests', function () { describe('payForTransaction', function () { it('non-deployer ignored', async () => { - let nonce = await nonceHolder.getMinNonce(account.address); + const nonce = await nonceHolder.getMinNonce(account.address); const legacyTx = await account.populateTransaction({ type: 0, to: callable.address, @@ -247,14 +245,14 @@ xdescribe('DefaultAccount tests', function () { delete legacyTx.from; const signedHash = ethers.utils.keccak256(serialize(legacyTx)); - let balanceBefore = await l2EthToken.balanceOf(defaultAccount.address); + const balanceBefore = await l2EthToken.balanceOf(defaultAccount.address); await defaultAccount.payForTransaction(txHash, signedHash, txData); - let balanceAfter = await l2EthToken.balanceOf(defaultAccount.address); + const balanceAfter = await l2EthToken.balanceOf(defaultAccount.address); expect(balanceAfter).to.be.eq(balanceBefore); }); it('successfully payed', async () => { - let nonce = await nonceHolder.getMinNonce(account.address); + const nonce = await nonceHolder.getMinNonce(account.address); const legacyTx = await account.populateTransaction({ type: 0, to: callable.address, diff --git a/test/EcAdd.spec.ts b/test/EcAdd.spec.ts index 2e88259caef..8daf2d55781 100644 --- a/test/EcAdd.spec.ts +++ b/test/EcAdd.spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { Contract } from 'zksync-web3'; -import { deployContractYul, callFallback } from './shared/utils'; +import { callFallback, deployContractYul } from './shared/utils'; describe('EcAdd tests', function () { let ecAdd: Contract; diff --git a/test/EcMul.spec.ts b/test/EcMul.spec.ts index e56de1a3744..b490d029809 100644 --- a/test/EcMul.spec.ts +++ b/test/EcMul.spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import { Contract } from 'zksync-web3'; -import { deployContractYul, callFallback } from './shared/utils'; +import { callFallback, deployContractYul } from './shared/utils'; describe('EcMul tests', function () { let ecMul: Contract; diff --git a/test/EmptyContract.spec.ts b/test/EmptyContract.spec.ts index e5fdfb0ef2f..9c0291bc684 100644 --- a/test/EmptyContract.spec.ts +++ b/test/EmptyContract.spec.ts @@ -1,8 +1,8 @@ import { expect } from 'chai'; -import { EmptyContract } from '../typechain-types'; -import { Wallet } from 'zksync-web3'; -import { getWallets, deployContract, provider } from './shared/utils'; import { ethers } from 'hardhat'; +import { Wallet } from 'zksync-web3'; +import { EmptyContract } from '../typechain-types'; +import { deployContract, getWallets, provider } from './shared/utils'; describe('EmptyContract tests', function () { let wallet: Wallet; diff --git a/test/EventWriter.spec.ts b/test/EventWriter.spec.ts index f7c92e2b277..3d1b9c49f2d 100644 --- a/test/EventWriter.spec.ts +++ b/test/EventWriter.spec.ts @@ -15,7 +15,7 @@ xdescribe('EventWriter tests', function () { before(async () => { _eventWriterCode = await getCode(EVENT_WRITER_CONTRACT_ADDRESS); - let eventWriterTestCode = readYulBytecode({ + const eventWriterTestCode = readYulBytecode({ codeName: 'EventWriter', path: '', lang: Language.Yul, diff --git a/test/ImmutableSimulator.spec.ts b/test/ImmutableSimulator.spec.ts index d4a60b92ae9..d88a2d867a3 100644 --- a/test/ImmutableSimulator.spec.ts +++ b/test/ImmutableSimulator.spec.ts @@ -1,12 +1,10 @@ import { expect } from 'chai'; import { ethers, network } from 'hardhat'; -import { Wallet } from 'zksync-web3'; import { ImmutableSimulator } from '../typechain-types'; import { DEPLOYER_SYSTEM_CONTRACT_ADDRESS } from './shared/constants'; -import { deployContract, getWallets } from './shared/utils'; +import { deployContract } from './shared/utils'; describe('ImmutableSimulator tests', function () { - let wallet: Wallet; let immutableSimulator: ImmutableSimulator; const RANDOM_ADDRESS = '0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef'; @@ -22,7 +20,6 @@ describe('ImmutableSimulator tests', function () { ]; before(async () => { - wallet = getWallets()[0]; immutableSimulator = (await deployContract('ImmutableSimulator')) as ImmutableSimulator; }); diff --git a/test/KnownCodesStorage.spec.ts b/test/KnownCodesStorage.spec.ts index 23fa786d1d3..7f700159f94 100644 --- a/test/KnownCodesStorage.spec.ts +++ b/test/KnownCodesStorage.spec.ts @@ -30,7 +30,7 @@ xdescribe('KnownCodesStorage tests', function () { knownCodesStorage = (await deployContract('KnownCodesStorage')) as KnownCodesStorage; _l1MessengerCode = await getCode(L1_MESSENGER_SYSTEM_CONTRACT_ADDRESS); - let l1MessengerArtifact = await loadArtifact('MockL1Messenger'); + const l1MessengerArtifact = await loadArtifact('MockL1Messenger'); await setCode(L1_MESSENGER_SYSTEM_CONTRACT_ADDRESS, l1MessengerArtifact.bytecode); mockL1Messenger = MockL1Messenger__factory.connect(L1_MESSENGER_SYSTEM_CONTRACT_ADDRESS, wallet); diff --git a/test/shared/transactions.ts b/test/shared/transactions.ts index f6c9d25454c..8052b36dc04 100644 --- a/test/shared/transactions.ts +++ b/test/shared/transactions.ts @@ -1,5 +1,5 @@ -import * as zksync from 'zksync-web3'; import { BigNumberish, BytesLike, Transaction } from 'ethers'; +import * as zksync from 'zksync-web3'; // Interface encoding the transaction struct used for AA protocol export interface TransactionData { @@ -45,6 +45,7 @@ export function signedTxToTransactionData(tx: Transaction) { throw new Error('Invalid `v`'); } + // eslint-disable-next-line @typescript-eslint/no-explicit-any function legacyTxToTransactionData(tx: any): TransactionData { return { txType: 0, @@ -66,6 +67,7 @@ export function signedTxToTransactionData(tx: Transaction) { }; } + // eslint-disable-next-line @typescript-eslint/no-explicit-any function eip2930TxToTransactionData(tx: any): TransactionData { return { txType: 1, @@ -87,6 +89,7 @@ export function signedTxToTransactionData(tx: Transaction) { }; } + // eslint-disable-next-line @typescript-eslint/no-explicit-any function eip1559TxToTransactionData(tx: any): TransactionData { return { txType: 2, @@ -108,6 +111,7 @@ export function signedTxToTransactionData(tx: Transaction) { }; } + // eslint-disable-next-line @typescript-eslint/no-explicit-any function eip712TxToTransactionData(tx: any): TransactionData { return { txType: 113, diff --git a/test/shared/utils.ts b/test/shared/utils.ts index 79cdf6d6c9d..d875b32696c 100644 --- a/test/shared/utils.ts +++ b/test/shared/utils.ts @@ -1,14 +1,14 @@ -import { Provider, Contract, Wallet } from 'zksync-web3'; import { Deployer } from '@matterlabs/hardhat-zksync-deploy'; -import { readYulBytecode } from '../../scripts/utils'; -import { ethers, network } from 'hardhat'; +import { ZkSyncArtifact } from '@matterlabs/hardhat-zksync-deploy/dist/types'; import { BytesLike } from 'ethers'; import * as hre from 'hardhat'; +import { ethers, network } from 'hardhat'; import * as zksync from 'zksync-web3'; -import { ZkSyncArtifact } from '@matterlabs/hardhat-zksync-deploy/dist/types'; -import { DEPLOYER_SYSTEM_CONTRACT_ADDRESS } from './constants'; -import { ContractDeployer__factory } from '../../typechain-types'; +import { Contract, Provider, Wallet } from 'zksync-web3'; import { Language } from '../../scripts/constants'; +import { readYulBytecode } from '../../scripts/utils'; +import { ContractDeployer__factory } from '../../typechain-types'; +import { DEPLOYER_SYSTEM_CONTRACT_ADDRESS } from './constants'; const RICH_WALLETS = [ { @@ -29,6 +29,7 @@ const RICH_WALLETS = [ } ]; +// eslint-disable-next-line @typescript-eslint/no-explicit-any export const provider = new Provider((hre.network.config as any).url); const wallet = new Wallet(RICH_WALLETS[0].privateKey, provider); @@ -45,7 +46,7 @@ export async function callFallback(contract: Contract, data: string) { } export function getWallets(): Wallet[] { - let wallets = []; + const wallets = []; for (let i = 0; i < RICH_WALLETS.length; i++) { wallets[i] = new Wallet(RICH_WALLETS[i].privateKey, provider); } @@ -56,6 +57,7 @@ export async function loadArtifact(name: string): Promise { return await deployer.loadArtifact(name); } +// eslint-disable-next-line @typescript-eslint/no-explicit-any export async function deployContract(name: string, constructorArguments?: any[] | undefined): Promise { const artifact = await loadArtifact(name); return await deployer.deploy(artifact, constructorArguments); @@ -107,7 +109,9 @@ export async function setCode(address: string, bytecode: BytesLike) { try { // publish bytecode in a separate tx await publishBytecode(bytecode); - } catch {} + } catch { + // ignore error + } await network.provider.request({ method: 'hardhat_impersonateAccount', diff --git a/yarn.lock b/yarn.lock index 13010299a0e..b12a0c6c53c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,33 @@ # yarn lockfile v1 +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== + +"@babel/code-frame@^7.0.0": + version "7.22.13" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" + integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== + dependencies: + "@babel/highlight" "^7.22.13" + chalk "^2.4.2" + +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + +"@babel/highlight@^7.22.13": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54" + integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" + js-tokens "^4.0.0" + "@balena/dockerignore@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@balena/dockerignore/-/dockerignore-1.0.2.tgz#9ffe4726915251e8eb69f44ef3547e0da2c03e0d" @@ -63,6 +90,38 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": + version "4.9.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.9.1.tgz#449dfa81a57a1d755b09aa58d826c1262e4283b4" + integrity sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA== + +"@eslint/eslintrc@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@8.51.0": + version "8.51.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.51.0.tgz#6d419c240cfb2b66da37df230f7e7eef801c32fa" + integrity sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg== + "@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" @@ -405,6 +464,25 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" +"@humanwhocodes/config-array@^0.11.11": + version "0.11.11" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" + integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "@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" @@ -483,7 +561,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -887,11 +965,21 @@ dependencies: "@types/chai" "*" -"@types/chai@*", "@types/chai@^4.3.1": +"@types/chai@*": version "4.3.6" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.6.tgz#7b489e8baf393d5dd1266fb203ddd4ea941259e6" integrity sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw== +"@types/chai@^4.3.1": + version "4.3.3" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.3.tgz#3c90752792660c4b562ad73b3fbd68bf3bc7ae07" + integrity sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g== + +"@types/json-schema@^7.0.12": + version "7.0.13" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" + integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== + "@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" @@ -953,6 +1041,96 @@ dependencies: "@types/node" "*" +"@types/semver@^7.5.0": + version "7.5.3" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.3.tgz#9a726e116beb26c24f1ccd6850201e1246122e04" + integrity sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw== + +"@typescript-eslint/eslint-plugin@^6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.4.tgz#057338df21b6062c2f2fc5999fbea8af9973ac6d" + integrity sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.7.4" + "@typescript-eslint/type-utils" "6.7.4" + "@typescript-eslint/utils" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/parser@^6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.4.tgz#23d1dd4fe5d295c7fa2ab651f5406cd9ad0bd435" + integrity sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA== + dependencies: + "@typescript-eslint/scope-manager" "6.7.4" + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/typescript-estree" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz#a484a17aa219e96044db40813429eb7214d7b386" + integrity sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A== + dependencies: + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" + +"@typescript-eslint/type-utils@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.7.4.tgz#847cd3b59baf948984499be3e0a12ff07373e321" + integrity sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ== + dependencies: + "@typescript-eslint/typescript-estree" "6.7.4" + "@typescript-eslint/utils" "6.7.4" + debug "^4.3.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/types@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.4.tgz#5d358484d2be986980c039de68e9f1eb62ea7897" + integrity sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA== + +"@typescript-eslint/typescript-estree@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz#f2baece09f7bb1df9296e32638b2e1130014ef1a" + integrity sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ== + dependencies: + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.7.4.tgz#2236f72b10e38277ee05ef06142522e1de470ff2" + integrity sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.7.4" + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/typescript-estree" "6.7.4" + semver "^7.5.4" + +"@typescript-eslint/visitor-keys@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz#80dfecf820fc67574012375859085f91a4dff043" + integrity sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA== + dependencies: + "@typescript-eslint/types" "6.7.4" + eslint-visitor-keys "^3.4.1" + JSONStream@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" @@ -974,12 +1152,17 @@ abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: module-error "^1.0.1" queue-microtask "^1.2.3" +acorn-jsx@^5.3.2: + version "5.3.2" + 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@^8.4.1: +acorn@^8.4.1, acorn@^8.9.0: version "8.10.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== @@ -1009,6 +1192,26 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" +ajv@^6.12.4, ajv@^6.12.6: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" + integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" @@ -1045,6 +1248,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +antlr4@^4.11.0: + version "4.13.1" + resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.1.tgz#1e0a1830a08faeb86217cb2e6c34716004e4253d" + integrity sha512-kiXTspaRYvnIArgE97z5YVVf/cDVQABr3abFRR6mE7yesLMkgu4ujuyV/sgxafQ8wgve0DJQUJ38Z8tkgA2izA== + antlr4@~4.8.0: version "4.8.0" resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.8.0.tgz#f938ec171be7fc2855cd3a533e87647185b32b6a" @@ -1088,6 +1296,11 @@ array-back@^4.0.1, array-back@^4.0.2: resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + asn1@^0.2.6: version "0.2.6" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" @@ -1100,6 +1313,16 @@ assertion-error@^1.1.0: resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== +ast-parents@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/ast-parents/-/ast-parents-0.0.1.tgz#508fd0f05d0c48775d9eccda2e174423261e8dd3" + integrity sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA== + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + 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" @@ -1322,6 +1545,11 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + camelcase@^6.0.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" @@ -1357,7 +1585,7 @@ chai@^4.3.6: pathval "^1.1.1" type-detect "^4.0.5" -chalk@4.1.2, chalk@^4.1.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== @@ -1496,6 +1724,11 @@ commander@3.0.2: resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== +commander@^10.0.0: + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== + commander@^2.19.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" @@ -1506,6 +1739,11 @@ commander@^9.4.1: resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== +commander@~9.4.1: + version "9.4.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" + integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -1531,6 +1769,16 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== +cosmiconfig@^8.0.0: + version "8.3.6" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" + integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== + dependencies: + import-fresh "^3.3.0" + js-yaml "^4.1.0" + parse-json "^5.2.0" + path-type "^4.0.0" + cpu-features@~0.0.8: version "0.0.9" resolved "https://registry.yarnpkg.com/cpu-features/-/cpu-features-0.0.9.tgz#5226b92f0f1c63122b0a3eb84cb8335a4de499fc" @@ -1572,7 +1820,16 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3: +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, 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== @@ -1603,11 +1860,16 @@ deep-eql@^4.0.1, deep-eql@^4.1.2: dependencies: type-detect "^4.0.0" -deep-extend@~0.6.0: +deep-extend@^0.6.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: + 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== + depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" @@ -1623,6 +1885,13 @@ diff@^4.0.1: resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + docker-modem@^1.0.8: version "1.0.9" resolved "https://registry.yarnpkg.com/docker-modem/-/docker-modem-1.0.9.tgz#a1f13e50e6afb6cf3431b2d5e7aac589db6aaba8" @@ -1661,6 +1930,13 @@ dockerode@^3.3.4: docker-modem "^3.0.0" tar-fs "~2.0.1" +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + elliptic@6.5.4, elliptic@^6.5.2, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -1694,17 +1970,29 @@ enquirer@^2.3.0: ansi-colors "^4.1.1" strip-ansi "^6.0.1" +entities@~3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4" + integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q== + 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.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" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@4.0.0: +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== @@ -1714,6 +2002,95 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.51.0: + version "8.51.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.51.0.tgz#4a82dae60d209ac89a5cff1604fea978ba4950f3" + integrity sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "8.51.0" + "@humanwhocodes/config-array" "^0.11.11" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + strip-ansi "^6.0.1" + text-table "^0.2.0" + +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== + dependencies: + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" + +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + 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" @@ -1818,7 +2195,17 @@ evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" -fast-glob@^3.2.12: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== + +fast-glob@^3.2.12, fast-glob@^3.2.9: version "3.3.1" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== @@ -1829,6 +2216,16 @@ fast-glob@^3.2.12: merge2 "^1.3.0" micromatch "^4.0.4" +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + fastq@^1.6.0: version "1.15.0" resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" @@ -1836,6 +2233,13 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" +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" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -1850,7 +2254,7 @@ find-replace@^3.0.0: dependencies: array-back "^3.0.1" -find-up@5.0.0: +find-up@5.0.0, find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -1865,11 +2269,25 @@ find-up@^2.1.0: dependencies: locate-path "^2.0.0" +flat-cache@^3.0.4: + version "3.1.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.1.1.tgz#a02a15fdec25a8f844ff7cc658f03dd99eb4609b" + integrity sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q== + dependencies: + flatted "^3.2.9" + keyv "^4.5.3" + rimraf "^3.0.2" + 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.2.9: + version "3.2.9" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" + integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== + follow-redirects@^1.12.1, follow-redirects@^1.14.0: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" @@ -1959,6 +2377,11 @@ get-func-name@^2.0.0: resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== +get-stdin@~9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-9.0.0.tgz#3983ff82e03d56f1b2ea0d3e60325f39d703a575" + integrity sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA== + glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1966,6 +2389,13 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob@7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" @@ -2002,6 +2432,47 @@ glob@^7.1.2, glob@^7.1.3, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.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== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +glob@~8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" + integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +globals@^13.19.0: + version "13.23.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.23.0.tgz#ef31673c926a0976e1f61dab4dca57e0c0a8af02" + integrity sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA== + dependencies: + type-fest "^0.20.2" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.2.10" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" @@ -2012,6 +2483,11 @@ graceful-fs@^4.2.0, graceful-fs@^4.2.4: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + hardhat@^2.11.0: version "2.17.2" resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.17.2.tgz#250a8c8e76029e9bfbfb9b9abee68d5b350b5d4a" @@ -2145,11 +2621,29 @@ ieee754@^1.1.13, ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== +ignore@^5.2.0, ignore@^5.2.4, ignore@~5.2.4: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + immutable@^4.0.0-rc.12: version "4.3.4" resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.4.tgz#2e07b33837b4bb7662f288c244d1ced1ef65a78f" integrity sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA== +import-fresh@^3.2.1, import-fresh@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "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" @@ -2168,6 +2662,11 @@ inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, i resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +ini@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/ini/-/ini-3.0.1.tgz#c76ec81007875bc44d544ff7a11a55d12294102d" + integrity sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ== + io-ts@1.10.4: version "1.10.4" resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" @@ -2175,6 +2674,11 @@ io-ts@1.10.4: dependencies: fp-ts "^1.0.0" +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== + is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -2204,7 +2708,7 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -2221,6 +2725,11 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + 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" @@ -2241,6 +2750,11 @@ isarray@~1.0.0: resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + js-sdsl@^4.1.4: version "4.4.2" resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.2.tgz#2e3c031b1f47d3aca8b775532e3ebb0818e7f847" @@ -2251,13 +2765,48 @@ js-sha3@0.8.0, js-sha3@^0.8.0: resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== -js-yaml@4.1.0: +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +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== dependencies: argparse "^2.0.1" +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + 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-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" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json-stable-stringify-without-jsonify@^1.0.1: + version "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== + +jsonc-parser@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -2295,6 +2844,13 @@ keccak@^3.0.0, keccak@^3.0.2: node-gyp-build "^4.2.0" readable-stream "^3.6.0" +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + klaw@^1.0.0: version "1.3.1" resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" @@ -2323,6 +2879,26 @@ level@^8.0.0: browser-level "^1.0.1" classic-level "^1.2.0" +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +linkify-it@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-4.0.1.tgz#01f1d5e508190d06669982ba31a7d9f56a5751ec" + integrity sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw== + dependencies: + uc.micro "^1.0.1" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -2343,7 +2919,17 @@ lodash.camelcase@^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@^4.17.11, lodash@^4.17.15: +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + +lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -2387,6 +2973,39 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +markdown-it@13.0.1: + version "13.0.1" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-13.0.1.tgz#c6ecc431cacf1a5da531423fc6a42807814af430" + integrity sha512-lTlxriVoy2criHP0JKRhO2VDG9c2ypWCsT237eDiLqi09rmbKoUetyGHq2uOIRoRS//kfoJckS0eUzzkDR+k2Q== + dependencies: + argparse "^2.0.1" + entities "~3.0.1" + linkify-it "^4.0.1" + mdurl "^1.0.1" + uc.micro "^1.0.5" + +markdownlint-cli@^0.33.0: + version "0.33.0" + resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.33.0.tgz#703af1234c32c309ab52fcd0e8bc797a34e2b096" + integrity sha512-zMK1oHpjYkhjO+94+ngARiBBrRDEUMzooDHBAHtmEIJ9oYddd9l3chCReY2mPlecwH7gflQp1ApilTo+o0zopQ== + dependencies: + commander "~9.4.1" + get-stdin "~9.0.0" + glob "~8.0.3" + ignore "~5.2.4" + js-yaml "^4.1.0" + jsonc-parser "~3.2.0" + markdownlint "~0.27.0" + minimatch "~5.1.2" + run-con "~1.2.11" + +markdownlint@~0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.27.0.tgz#9dabf7710a4999e2835e3c68317f1acd0bc89049" + integrity sha512-HtfVr/hzJJmE0C198F99JLaeada+646B5SaG2pVoEakLFI6iRGsvMqrnnrflq8hm1zQgwskEgqSnhDW11JBp0w== + dependencies: + markdown-it "13.0.1" + mcl-wasm@^0.7.1: version "0.7.9" resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.9.tgz#c1588ce90042a8700c3b60e40efb339fc07ab87f" @@ -2401,6 +3020,11 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +mdurl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== + memory-level@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" @@ -2415,7 +3039,7 @@ memorystream@^0.3.1: resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== -merge2@^1.3.0: +merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -2445,13 +3069,20 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^3.0.4, minimatch@^3.1.1: +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1, minimatch@~5.1.2: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + minimatch@^7.4.3: version "7.4.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.6.tgz#845d6f254d8f4a5e4fd6baf44d5f10c8448365fb" @@ -2459,7 +3090,7 @@ minimatch@^7.4.3: dependencies: brace-expansion "^2.0.1" -minimist@^1.2.6: +minimist@^1.2.6, minimist@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== @@ -2559,6 +3190,11 @@ napi-macros@^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" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + node-addon-api@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" @@ -2598,6 +3234,18 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== + dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + ordinal@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/ordinal/-/ordinal-1.0.3.tgz#1a3c7726a61728112f50944ad7c35c06ae3a0d4d" @@ -2655,6 +3303,23 @@ p-try@^1.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-json@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + path-browserify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" @@ -2675,11 +3340,21 @@ 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@^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.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== +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + pathington@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/pathington/-/pathington-1.1.7.tgz#caf2d2db899a31fea4e81e3657af6acde5171903" @@ -2706,6 +3381,16 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pluralize@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" + integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + preprocess@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/preprocess/-/preprocess-3.2.0.tgz#36b3e2c52331fbc6fabb26d4fd5709304b7e3675" @@ -2713,7 +3398,7 @@ preprocess@^3.2.0: dependencies: xregexp "3.1.0" -prettier-plugin-solidity@^1.0.0-alpha.27: +prettier-plugin-solidity@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.3.tgz#9a35124f578404caf617634a8cab80862d726cba" integrity sha512-fQ9yucPi2sBbA2U2Xjh6m4isUTJ7S7QLc/XDDsktqqxYfTwdYKJ0EnnywXHwCGAaYbQNK+HIYPL1OemxuMsgeg== @@ -2722,16 +3407,21 @@ prettier-plugin-solidity@^1.0.0-alpha.27: semver "^7.3.8" solidity-comments-extractor "^0.0.7" -prettier@^2.1.2, prettier@^2.3.0: +prettier@^2.1.2: version "2.7.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== -prettier@^2.3.1: +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== +prettier@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643" + integrity sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -2762,6 +3452,11 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +punycode@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" + integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== + 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" @@ -2833,11 +3528,16 @@ 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@^2.0.0: +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== +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + resolve@1.17.0: version "1.17.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" @@ -2871,6 +3571,13 @@ rimraf@^2.2.8: dependencies: glob "^7.1.3" +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -2886,6 +3593,16 @@ rlp@^2.2.3: dependencies: bn.js "^5.2.0" +run-con@~1.2.11: + version "1.2.12" + resolved "https://registry.yarnpkg.com/run-con/-/run-con-1.2.12.tgz#51c319910e45a3bd71ee773564a89d96635c8c64" + integrity sha512-5257ILMYIF4RztL9uoZ7V9Q97zHtNHn5bN3NobeAnzB1P3ASLgg8qocM2u+R18ttp+VEM78N2LK8XcNVtnSRrg== + dependencies: + deep-extend "^0.6.0" + ini "~3.0.0" + minimist "^1.2.8" + strip-json-comments "~3.1.1" + 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" @@ -2944,7 +3661,7 @@ semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.8, semver@^7.5.1: +semver@^7.3.8, semver@^7.5.1, semver@^7.5.2, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -2976,11 +3693,37 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + signal-exit@^3.0.2: 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== +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + solc@0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" @@ -2996,6 +3739,31 @@ solc@0.7.3: semver "^5.5.0" tmp "0.0.33" +solhint@^3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/solhint/-/solhint-3.6.2.tgz#2b2acbec8fdc37b2c68206a71ba89c7f519943fe" + integrity sha512-85EeLbmkcPwD+3JR7aEMKsVC9YrRSxd4qkXuMzrlf7+z2Eqdfm1wHWq1ffTuo5aDhoZxp2I9yF3QkxZOxOL7aQ== + dependencies: + "@solidity-parser/parser" "^0.16.0" + ajv "^6.12.6" + antlr4 "^4.11.0" + ast-parents "^0.0.1" + chalk "^4.1.2" + commander "^10.0.0" + cosmiconfig "^8.0.0" + fast-diff "^1.2.0" + glob "^8.0.3" + ignore "^5.2.4" + js-yaml "^4.1.0" + lodash "^4.17.21" + pluralize "^8.0.0" + semver "^7.5.2" + strip-ansi "^6.0.1" + table "^6.8.1" + text-table "^0.2.0" + optionalDependencies: + prettier "^2.8.3" + solidity-comments-extractor@^0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.7.tgz#99d8f1361438f84019795d928b931f4e5c39ca19" @@ -3067,7 +3835,7 @@ string-format@^2.0.0: resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" integrity sha512-bbEs3scLeYNXLecRRuk6uJxdXUSj6le/8rNPHChIJTn2V79aXVTR1EH2OH5zLKKoz0V02fOUKZZcw01pLUShZA== -string-width@^4.1.0, string-width@^4.2.0: +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -3109,7 +3877,7 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" -strip-json-comments@3.1.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.1, 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== @@ -3150,6 +3918,17 @@ table-layout@^1.0.2: typical "^5.2.0" wordwrapjs "^4.0.0" +table@^6.8.1: + version "6.8.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" + integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + tar-fs@~1.16.3: version "1.16.3" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509" @@ -3204,6 +3983,11 @@ template-file@^6.0.1: mkdirp "^1.0.4" p-limit "^4.0.0" +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== + thenify-all@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" @@ -3252,6 +4036,11 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +ts-api-utils@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" + integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== + 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" @@ -3339,11 +4128,23 @@ tweetnacl@^1.0.3: resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + type-detect@^4.0.0, type-detect@^4.0.5: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@^0.20.2: + version "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" @@ -3390,6 +4191,11 @@ typical@^5.2.0: resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== +uc.micro@^1.0.1, uc.micro@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== + undici@^5.14.0: version "5.24.0" resolved "https://registry.yarnpkg.com/undici/-/undici-5.24.0.tgz#6133630372894cfeb3c3dab13b4c23866bd344b5" @@ -3412,6 +4218,13 @@ unpipe@1.0.0: resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -3440,6 +4253,13 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.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" + wordwrapjs@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f"