From f09ddabedfc09100f26a4b6f9efe91ce433a361e Mon Sep 17 00:00:00 2001 From: wei3erHase Date: Fri, 24 Jun 2022 13:46:48 +0200 Subject: [PATCH] chore: version 2.1.0 (#128) * feat: add setVariables function (#112) Adding a new function for mock contracts. With setVariables mocks will be able to edit multiple internal variables at once. * feat: ignore gas param in abi (#123) * feat: ignore gas param in abi * feat: lint json * feat: add pre commit linter (#122) * feat: setup pre-commit linter * feat: remove test contracts from lint input * feat: tag specific version for lint-staged * feat: trigger linter check on pull request * feat: set husky pre-commit hook to be executable * feat: add support for large bytes > 31 bytes (#124) * feat: add type definition (#126) * chore: multiple compiler support in hardhat config (#127) * chore(release): 2.1.0 Co-authored-by: Antonios Kogias Co-authored-by: 5h4z4mm <88970166+5h4z4mm@users.noreply.github.com> Co-authored-by: Eugenio Co-authored-by: 0xGorilla <0xGorilla@protonmail.com> --- .github/workflows/lint.yml | 2 +- .husky/commit-msg | 0 .husky/pre-commit | 2 +- .solhint.json | 2 +- CHANGELOG.md | 17 + docs/source/getting-started.rst | 26 +- docs/source/mocks.rst | 20 +- package.json | 9 +- src/factories/smock-contract.ts | 1 + src/logic/editable-storage-logic.ts | 16 +- src/types.ts | 9 +- src/utils/storage.ts | 26 +- test/unit/fake/initialization.spec.ts | 6 + test/unit/fake/testdata/Storage.json | 29 ++ test/unit/mock/editable-storage-logic.spec.ts | 331 +++++++++++++----- yarn.lock | 292 ++++++++++++++- 16 files changed, 662 insertions(+), 126 deletions(-) mode change 100644 => 100755 .husky/commit-msg mode change 100644 => 100755 .husky/pre-commit create mode 100644 test/unit/fake/testdata/Storage.json diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 415f1b9..6e1a0ba 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ name: Lint -on: [push] +on: [pull_request, push] jobs: files: diff --git a/.husky/commit-msg b/.husky/commit-msg old mode 100644 new mode 100755 diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100644 new mode 100755 index 14dac01..c37466e --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npm run lint:fix \ No newline at end of file +npx lint-staged \ No newline at end of file diff --git a/.solhint.json b/.solhint.json index 9668578..009abd2 100644 --- a/.solhint.json +++ b/.solhint.json @@ -2,7 +2,7 @@ "extends": "solhint:recommended", "plugins": ["prettier"], "rules": { - "prettier/prettier": "error", + "prettier/prettier": "warn", "compiler-version": ["off"], "constructor-syntax": "warn", "quotes": ["error", "single"], diff --git a/CHANGELOG.md b/CHANGELOG.md index 4715c92..1fc992a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,23 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.1.0](https://github.com/defi-wonderland/smock/compare/v2.0.7...v2.1.0) (2022-06-24) + + +### Features + +* add pre commit linter ([#122](https://github.com/defi-wonderland/smock/issues/122)) ([645bf79](https://github.com/defi-wonderland/smock/commit/645bf7919cbc8d592655c1a92ea32479f9d93ef6)) +* add setVariables function ([#112](https://github.com/defi-wonderland/smock/issues/112)) ([72aec14](https://github.com/defi-wonderland/smock/commit/72aec1427de6f4c29cce297d75202c75e209c43e)) +* add support for large bytes > 31 bytes ([#124](https://github.com/defi-wonderland/smock/issues/124)) ([9cc9a77](https://github.com/defi-wonderland/smock/commit/9cc9a773496bd389b61f720a4c5c7f3c2efc99df)) +* add type definition ([#126](https://github.com/defi-wonderland/smock/issues/126)) ([e38fb3a](https://github.com/defi-wonderland/smock/commit/e38fb3a07422c095de8b59596ac90c577254cc59)) +* added wallet to mocks ([#96](https://github.com/defi-wonderland/smock/issues/96)) ([22c4278](https://github.com/defi-wonderland/smock/commit/22c4278c1c4fb6627c2e444b341749f93be4b244)) +* ignore gas param in abi ([#123](https://github.com/defi-wonderland/smock/issues/123)) ([71ac4fc](https://github.com/defi-wonderland/smock/commit/71ac4fc204681f284df3a4a8d2633c9240778a68)) + + +### Bug Fixes + +* returns working with struct mappings ([#103](https://github.com/defi-wonderland/smock/issues/103)) ([27fe7a5](https://github.com/defi-wonderland/smock/commit/27fe7a5f3c351714257cdc98204e282932c11e12)), closes [#94](https://github.com/defi-wonderland/smock/issues/94) + ### [2.0.7](https://github.com/defi-wonderland/smock/compare/v2.0.2...v2.0.7) (2021-09-30) diff --git a/docs/source/getting-started.rst b/docs/source/getting-started.rst index 4166021..6f59e95 100644 --- a/docs/source/getting-started.rst +++ b/docs/source/getting-started.rst @@ -39,13 +39,16 @@ If you'd like to use mocks, you **must** update your :code:`hardhat.config.( // attach to every internal variable, all the editable logic const editableStorage = new EditableStorage(await getStorageLayout(contractName), vm.getManager(), mock.address); mock.setVariable = editableStorage.setVariable.bind(editableStorage); + mock.setVariables = editableStorage.setVariables.bind(editableStorage); // We attach a wallet to the contract so that users can send transactions *from* a watchablecontract. mock.wallet = await impersonate(mock.address); diff --git a/src/logic/editable-storage-logic.ts b/src/logic/editable-storage-logic.ts index 3353f2d..e21f202 100644 --- a/src/logic/editable-storage-logic.ts +++ b/src/logic/editable-storage-logic.ts @@ -1,13 +1,13 @@ -import { SmockVMManager } from '../types'; +import { SetVariablesType, SmockVMManager } from '../types'; import { fromHexString, toFancyAddress } from '../utils'; -import { computeStorageSlots } from '../utils/storage'; +import { computeStorageSlots, SolidityStorageLayout } from '../utils/storage'; export class EditableStorageLogic { - private storageLayout: any; + private storageLayout: SolidityStorageLayout; private contractAddress: string; private vmManager: SmockVMManager; - constructor(storageLayout: any, vmManager: SmockVMManager, contractAddress: string) { + constructor(storageLayout: SolidityStorageLayout, vmManager: SmockVMManager, contractAddress: string) { this.storageLayout = storageLayout; this.vmManager = vmManager; this.contractAddress = contractAddress; @@ -22,4 +22,12 @@ export class EditableStorageLogic { await this.vmManager.putContractStorage(toFancyAddress(this.contractAddress), fromHexString(slot.key), fromHexString(slot.val)); } } + + async setVariables(variables: SetVariablesType) { + if (variables === undefined || variables === null) return; + + for (const [variableName, variableValue] of Object.entries(variables)) { + await this.setVariable(variableName, variableValue); + } + } } diff --git a/src/types.ts b/src/types.ts index 8fb6082..06c909c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -6,7 +6,9 @@ import { BaseContract, ContractFactory, ethers } from 'ethers'; import { EditableStorageLogic } from './logic/editable-storage-logic'; import { WatchableFunctionLogic } from './logic/watchable-function-logic'; -type Abi = ReadonlyArray; +type Abi = ReadonlyArray< + Fragment | Pick | string +>; export type FakeContractSpec = { abi?: Abi; interface?: Interface } | Abi | ethers.utils.Interface | string; export interface FakeContractOptions { @@ -34,6 +36,10 @@ export interface ContractCall { target: string; } +export interface SetVariablesType { + [variablesName: string]: any; +} + export type WhenCalledWithChain = { returns: (value?: ProgrammedReturnValue) => void; reverts: (reason?: string) => void; @@ -64,6 +70,7 @@ export type FakeContract = SmockContractB export type MockContract = SmockContractBase & { connect: (...args: Parameters) => MockContract; setVariable: EditableStorageLogic['setVariable']; + setVariables: EditableStorageLogic['setVariables']; } & { [Property in keyof T['functions']]: ProgrammableContractFunction; }; diff --git a/src/utils/storage.ts b/src/utils/storage.ts index a25b284..489f61e 100644 --- a/src/utils/storage.ts +++ b/src/utils/storage.ts @@ -317,10 +317,28 @@ function encodeVariable( }, ]; } else { - // TODO: add support for large strings or byte arrays - throw new Error( - 'large strings (> 31 bytes) not supported. Follow this issue for more info: https://github.com/defi-wonderland/smock/issues/30' - ); + let slots: StorageSlotPair[] = []; + // According to the solidity docs (https://docs.soliditylang.org/en/v0.8.4/internals/layout_in_storage.html#bytes-and-string) + // For bytes or strings that store data which is 32 or more bytes long, the main slot p stores length * 2 + 1 + // and the data is stored as usual in keccak256(p) + slots = slots.concat({ + key: slotKey, + val: padNumHexSlotValue(bytes.length * 2 + 1, 0), + }); + + // Each storage slot has 32 bytes so we make sure to slice the large bytes into 32bytes chunks + for (let i = 0; i * 32 < bytes.length; i++) { + // We calculate the Storage Slot key based on the solidity docs (see above link) + let key = BigNumber.from(ethers.utils.keccak256(slotKey)) + .add(BigNumber.from(i.toString(16))) + .toHexString(); + slots = slots.concat({ + key: key, + val: ethers.utils.hexlify(ethers.utils.concat([bytes.slice(i * 32, i * 32 + 32), ethers.constants.HashZero]).slice(0, 32)), + }); + } + + return slots; } } else if (variableType.encoding === 'mapping') { if (variableType.key === undefined || variableType.value === undefined) { diff --git a/test/unit/fake/initialization.spec.ts b/test/unit/fake/initialization.spec.ts index c27b3af..8779c62 100644 --- a/test/unit/fake/initialization.spec.ts +++ b/test/unit/fake/initialization.spec.ts @@ -4,6 +4,7 @@ import { Receiver, Receiver__factory, Returner } from '@typechained'; import receiverArtifact from 'artifacts/test/contracts/watchable-function-logic/Receiver.sol/Receiver.json'; import chai, { expect } from 'chai'; import { ethers, network } from 'hardhat'; +import storageArtifact from 'test/unit/fake/testdata/Storage.json'; chai.use(smock.matchers); @@ -84,4 +85,9 @@ describe('Fake: Initialization', () => { const fake = await smock.fake('Receiver'); expect(fake.wallet._isSigner).to.be.true; }); + + it('should work for abi with gas parameter', async () => { + const fake = await smock.fake(storageArtifact); + expect(fake.store._watchable).not.to.be.undefined; + }); }); diff --git a/test/unit/fake/testdata/Storage.json b/test/unit/fake/testdata/Storage.json new file mode 100644 index 0000000..91d0484 --- /dev/null +++ b/test/unit/fake/testdata/Storage.json @@ -0,0 +1,29 @@ +[ + { + "inputs": [], + "name": "retrieve", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "num", + "type": "uint256" + } + ], + "name": "store", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function", + "gas": 12345 + } +] diff --git a/test/unit/mock/editable-storage-logic.spec.ts b/test/unit/mock/editable-storage-logic.spec.ts index 613dd3d..b6d16ae 100644 --- a/test/unit/mock/editable-storage-logic.spec.ts +++ b/test/unit/mock/editable-storage-logic.spec.ts @@ -17,130 +17,269 @@ describe('Mock: Editable storage logic', () => { mock = await storageGetterFactory.deploy(1); }); - it('should be able to set a uint256', async () => { - const value = utils.parseUnits('123'); - await mock.setVariable('_uint256', value); - expect(await mock.getUint256()).to.equal(value); - }); + describe('setVariable', () => { + it('should be able to set a uint256', async () => { + const value = utils.parseUnits('123'); + await mock.setVariable('_uint256', value); + expect(await mock.getUint256()).to.equal(value); + }); - it('should be able to set a int56', async () => { - const value = -1; - await mock.setVariable('_int56', value); - expect(await mock.getInt56()).to.equal(value); - }); + it('should be able to set a int56', async () => { + const value = -1; + await mock.setVariable('_int56', value); + expect(await mock.getInt56()).to.equal(value); + }); - it('should be able to set a int256', async () => { - const value = utils.parseUnits('-1'); - await mock.setVariable('_int256', value); - expect(await mock.getInt256()).to.equal(value); - }); + it('should be able to set a int256', async () => { + const value = utils.parseUnits('-1'); + await mock.setVariable('_int256', value); + expect(await mock.getInt256()).to.equal(value); + }); - it('should be able to set a boolean', async () => { - await mock.setVariable('_bool', true); - expect(await mock.getBool()).to.equal(true); - }); + it('should be able to set a boolean', async () => { + await mock.setVariable('_bool', true); + expect(await mock.getBool()).to.equal(true); + }); - it.skip('should be able to set bytes', async () => { - await mock.setVariable('_bytes', BYTES_EXAMPLE); - expect(await mock.getBytes()).to.equal(BYTES_EXAMPLE); - }); + it('should be able to set a small value < 31 bytes', async () => { + const value = BYTES_EXAMPLE.slice(0, 10); + await mock.setVariable('_bytes', value); + expect(await mock.getBytes()).to.equal(value); + }); - it('should be able to set bytes32', async () => { - await mock.setVariable('_bytes32', BYTES32_EXAMPLE); - expect(await mock.getBytes32()).to.equal(BYTES32_EXAMPLE); - }); + it('should be able to set a large value > 31 bytes', async () => { + await mock.setVariable('_bytes', BYTES_EXAMPLE); + expect(await mock.getBytes()).to.equal(BYTES_EXAMPLE); + }); - it('should be able to set an address', async () => { - await mock.setVariable('_address', ADDRESS_EXAMPLE); - expect(await mock.getAddress()).to.equal(ADDRESS_EXAMPLE); - }); + it('should be able to set bytes32', async () => { + await mock.setVariable('_bytes32', BYTES32_EXAMPLE); + expect(await mock.getBytes32()).to.equal(BYTES32_EXAMPLE); + }); - it('should be able to set an address in a packed storage slot', async () => { - await mock.setVariable('_packedB', ADDRESS_EXAMPLE); + it('should be able to set an address', async () => { + await mock.setVariable('_address', ADDRESS_EXAMPLE); + expect(await mock.getAddress()).to.equal(ADDRESS_EXAMPLE); + }); - expect(await mock.getPackedAddress()).to.equal(ADDRESS_EXAMPLE); - }); + it('should be able to set an address in a packed storage slot', async () => { + await mock.setVariable('_packedB', ADDRESS_EXAMPLE); - it('should be able to set an address in a packed struct', async () => { - const struct = { - packedA: true, - packedB: ADDRESS_EXAMPLE, - }; - await mock.setVariable('_packedStruct', struct); + expect(await mock.getPackedAddress()).to.equal(ADDRESS_EXAMPLE); + }); - expect(convertStructToPojo(await mock.getPackedStruct())).to.deep.equal(struct); - }); + it('should be able to set an address in a packed struct', async () => { + const struct = { + packedA: true, + packedB: ADDRESS_EXAMPLE, + }; + await mock.setVariable('_packedStruct', struct); - it('should be able to set a simple struct', async () => { - const struct = { - valueA: BigNumber.from(1234), - valueB: true, - }; - await mock.setVariable('_simpleStruct', struct); + expect(convertStructToPojo(await mock.getPackedStruct())).to.deep.equal(struct); + }); - expect(convertStructToPojo(await mock.getSimpleStruct())).to.deep.equal(struct); - }); + it('should be able to set a simple struct', async () => { + const struct = { + valueA: BigNumber.from(1234), + valueB: true, + }; + await mock.setVariable('_simpleStruct', struct); - it('should be able to set a uint256 mapping value', async () => { - const mapKey = 1234; - const mapValue = 5678; - await mock.setVariable('_uint256Map', { [mapKey]: mapValue }); + expect(convertStructToPojo(await mock.getSimpleStruct())).to.deep.equal(struct); + }); - expect(await mock.getUint256MapValue(mapKey)).to.equal(mapValue); - }); + it('should be able to set a uint256 mapping value', async () => { + const mapKey = 1234; + const mapValue = 5678; + await mock.setVariable('_uint256Map', { [mapKey]: mapValue }); + + expect(await mock.getUint256MapValue(mapKey)).to.equal(mapValue); + }); - it('should be able to set a nested uint256 mapping value', async () => { - const mapKeyA = 1234; - const mapKeyB = 4321; - const mapVal = 5678; + it('should be able to set a nested uint256 mapping value', async () => { + const mapKeyA = 1234; + const mapKeyB = 4321; + const mapVal = 5678; - await mock.setVariable('_uint256NestedMap', { - [mapKeyA]: { - [mapKeyB]: mapVal, - }, + await mock.setVariable('_uint256NestedMap', { + [mapKeyA]: { + [mapKeyB]: mapVal, + }, + }); + + expect(await mock.getNestedUint256MapValue(mapKeyA, mapKeyB)).to.equal(mapVal); }); - expect(await mock.getNestedUint256MapValue(mapKeyA, mapKeyB)).to.equal(mapVal); - }); + it('should let calls to the contract override the set variable', async () => { + await mock.setVariable('_uint256', 1); + await mock.setUint256(2); - it('should let calls to the contract override the set variable', async () => { - await mock.setVariable('_uint256', 1); - await mock.setUint256(2); + expect(await mock.getUint256()).to.equal(2); + }); - expect(await mock.getUint256()).to.equal(2); - }); + it('should be able to set a value that was set in the constructor', async () => { + await mock.setVariable('_constructorUint256', 1234); + expect(await mock.getConstructorUint256()).to.equal(1234); + }); - it('should be able to set a value that was set in the constructor', async () => { - await mock.setVariable('_constructorUint256', 1234); - expect(await mock.getConstructorUint256()).to.equal(1234); - }); + it('should be able to set values in a bytes5 => bool mapping', async () => { + const mapKey = '0x0000005678'; + const mapValue = true; + await mock.setVariable('_bytes5ToBoolMap', { [mapKey]: mapValue }); - it('should be able to set values in a bytes5 => bool mapping', async () => { - const mapKey = '0x0000005678'; - const mapValue = true; - await mock.setVariable('_bytes5ToBoolMap', { [mapKey]: mapValue }); + expect(await mock.getBytes5ToBoolMapValue(mapKey)).to.equal(mapValue); + }); - expect(await mock.getBytes5ToBoolMapValue(mapKey)).to.equal(mapValue); - }); + it('should be able to set values in a address => bool mapping', async () => { + const mapKey = ADDRESS_EXAMPLE; + const mapValue = true; + await mock.setVariable('_addressToBoolMap', { [mapKey]: mapValue }); - it('should be able to set values in a address => bool mapping', async () => { - const mapKey = ADDRESS_EXAMPLE; - const mapValue = true; - await mock.setVariable('_addressToBoolMap', { [mapKey]: mapValue }); + expect(await mock.getAddressToBoolMapValue(mapKey)).to.equal(mapValue); + }); - expect(await mock.getAddressToBoolMapValue(mapKey)).to.equal(mapValue); - }); + it('should be able to set values in a address => address mapping', async () => { + const mapKey = ADDRESS_EXAMPLE; + const mapValue = '0x063bE0Af9711a170BE4b07028b320C90705fec7C'; + await mock.setVariable('_addressToAddressMap', { [mapKey]: mapValue }); - it('should be able to set values in a address => address mapping', async () => { - const mapKey = ADDRESS_EXAMPLE; - const mapValue = '0x063bE0Af9711a170BE4b07028b320C90705fec7C'; - await mock.setVariable('_addressToAddressMap', { [mapKey]: mapValue }); + expect(await mock.getAddressToAddressMapValue(mapKey)).to.equal(mapValue); + }); - expect(await mock.getAddressToAddressMapValue(mapKey)).to.equal(mapValue); + it.skip('should be able to set a uint256[] variable', async () => { + await mock.setVariable('_uint256Array', [1, 2]); + expect(await mock.getUint256Array()).to.equal([1, 2]); + }); }); - it.skip('should be able to set a uint256[] variable', async () => { - await mock.setVariable('_uint256Array', [1, 2]); - expect(await mock.getUint256Array()).to.equal([1, 2]); + describe('setVariables', () => { + it('should be able to set a uint256 and a int56', async () => { + const value = utils.parseUnits('555'); + const value1 = -2; + await mock.setVariables({ + _uint256: value, + _int56: value1, + }); + expect(await mock.getUint256()).to.equal(value); + expect(await mock.getInt56()).to.equal(value1); + }); + + it('should be able to set a int256 and a boolean', async () => { + const value = utils.parseUnits('-5'); + await mock.setVariables({ + _int256: value, + _bool: true, + }); + expect(await mock.getInt256()).to.equal(value); + expect(await mock.getBool()).to.equal(true); + }); + + it('should be able to set bytes32 and an address', async () => { + await mock.setVariables({ + _bytes32: BYTES32_EXAMPLE, + _address: ADDRESS_EXAMPLE, + }); + expect(await mock.getBytes32()).to.equal(BYTES32_EXAMPLE); + expect(await mock.getAddress()).to.equal(ADDRESS_EXAMPLE); + }); + + it('should be able to set an address in a packed storage slot and a simple struct', async () => { + const struct = { + valueA: BigNumber.from(5555), + valueB: false, + }; + await mock.setVariables({ + _packedB: ADDRESS_EXAMPLE, + _simpleStruct: struct, + }); + + expect(await mock.getPackedAddress()).to.equal(ADDRESS_EXAMPLE); + expect(convertStructToPojo(await mock.getSimpleStruct())).to.deep.equal(struct); + }); + + it('should be able to set a uint256 mapping value and a nested uint256 mapping value', async () => { + const mapKey = 1234; + const mapKeyB = 4321; + const nestedMapKey = 1122; + const nestedMapKeyB = 3344; + const mapValue = 5678; + const mapValue2 = 8765; + await mock.setVariables({ + _uint256Map: { + [mapKey]: mapValue, + [mapKeyB]: mapValue2, + }, + _uint256NestedMap: { + [mapKey]: { + [nestedMapKey]: mapValue, + [nestedMapKeyB]: mapValue2, + }, + }, + }); + + expect(await mock.getUint256MapValue(mapKey)).to.equal(mapValue); + expect(await mock.getUint256MapValue(mapKeyB)).to.equal(mapValue2); + expect(await mock.getNestedUint256MapValue(mapKey, nestedMapKey)).to.equal(mapValue); + expect(await mock.getNestedUint256MapValue(mapKey, nestedMapKeyB)).to.equal(mapValue2); + }); + + it('should be able to set values in a address => address mapping and a value that was set in the constructor', async () => { + const mapKey = ADDRESS_EXAMPLE; + const mapValue = '0x063bE0Af9711a170BE4b07028b320C90705fec7C'; + await mock.setVariables({ + _addressToAddressMap: { + [mapKey]: mapValue, + }, + _constructorUint256: 1234, + }); + + expect(await mock.getAddressToAddressMapValue(mapKey)).to.equal(mapValue); + expect(await mock.getConstructorUint256()).to.equal(1234); + }); + + it('should be able to set a lot of different variables of a contract at the same time', async () => { + const uint256value = utils.parseUnits('66'); + const struct = { + valueA: BigNumber.from(5555), + valueB: false, + }; + const mapKey = 1234; + const mapKeyB = 5678; + const mapValue = 4321; + const mapValueB = 8765; + const mapKeybytes5ToBool = '0x0000005678'; + const mapValueAddress = '0x063bE0Af9711a170BE4b07028b320C90705fec7C'; + await mock.setVariables({ + _address: ADDRESS_EXAMPLE, + _constructorUint256: 1234, + _int56: -2, + _uint256: uint256value, + _bytes32: BYTES32_EXAMPLE, + _bool: true, + _simpleStruct: struct, + _uint256Map: { [mapKey]: mapValue }, + _uint256NestedMap: { + [mapKey]: { + [mapKeyB]: mapValueB, + }, + }, + _bytes5ToBoolMap: { [mapKeybytes5ToBool]: true }, + _addressToBoolMap: { [ADDRESS_EXAMPLE]: false }, + _addressToAddressMap: { [ADDRESS_EXAMPLE]: mapValueAddress }, + }); + + expect(await mock.getAddress()).to.equal(ADDRESS_EXAMPLE); + expect(await mock.getConstructorUint256()).to.equal(1234); + expect(await mock.getInt56()).to.equal(-2); + expect(await mock.getUint256()).to.equal(uint256value); + expect(await mock.getBytes32()).to.equal(BYTES32_EXAMPLE); + expect(await mock.getBool()).to.equal(true); + expect(convertStructToPojo(await mock.getSimpleStruct())).to.deep.equal(struct); + expect(await mock.getUint256MapValue(mapKey)).to.equal(mapValue); + expect(await mock.getNestedUint256MapValue(mapKey, mapKeyB)).to.equal(mapValueB); + expect(await mock.getBytes5ToBoolMapValue(mapKeybytes5ToBool)).to.equal(true); + expect(await mock.getAddressToBoolMapValue(ADDRESS_EXAMPLE)).to.equal(false); + expect(await mock.getAddressToAddressMapValue(ADDRESS_EXAMPLE)).to.equal(mapValueAddress); + }); }); }); diff --git a/yarn.lock b/yarn.lock index b17da20..d9919f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1219,6 +1219,14 @@ agent-base@6: dependencies: debug "4" +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + ajv@^6.10.2, ajv@^6.12.3, ajv@^6.6.1, ajv@^6.9.1: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -1271,6 +1279,11 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +ansi-regex@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" + integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -1290,6 +1303,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +ansi-styles@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.1.0.tgz#87313c102b8118abd57371afab34618bf7350ed3" + integrity sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ== + antlr4@4.7.1: version "4.7.1" resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773" @@ -1421,6 +1439,11 @@ astral-regex@^1.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +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== + async-eventemitter@^0.2.2, async-eventemitter@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" @@ -2140,7 +2163,7 @@ braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.1, braces@~3.0.2: +braces@^3.0.1, braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -2540,6 +2563,11 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -2559,6 +2587,22 @@ cli-spinners@^2.5.0: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.0.tgz#36c7dc98fb6a9a76bd6238ec3f77e2425627e939" integrity sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q== +cli-truncate@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== + dependencies: + slice-ansi "^3.0.0" + string-width "^4.2.0" + +cli-truncate@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-3.1.0.tgz#3f23ab12535e3d73e839bb43e73c9de487db1389" + integrity sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA== + dependencies: + slice-ansi "^5.0.0" + string-width "^5.0.0" + cli-width@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" @@ -2650,6 +2694,11 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^2.0.16: + version "2.0.19" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" + integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== + combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -2681,6 +2730,11 @@ commander@3.0.2: resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== +commander@^9.3.0: + version "9.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.3.0.tgz#f619114a5a2d2054e0d9ff1b31d5ccf89255e26b" + integrity sha512-hv95iU5uXPbK83mjrJKuZyFM/LBAoCV/XhVGkS5Je6tl7sxr6A0ITMw5WoRV46/UaJ46Nllm3Xt7IaJhXTIkzw== + compare-func@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" @@ -3059,7 +3113,7 @@ cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.1: +cross-spawn@^7.0.1, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -3145,6 +3199,13 @@ debug@^3.1.0: dependencies: ms "^2.1.1" +debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -3378,6 +3439,11 @@ duplexer3@^0.1.4: resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -4148,6 +4214,21 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" +execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + exit-on-epipe@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" @@ -4704,6 +4785,11 @@ get-stream@^5.1.0: dependencies: pump "^3.0.0" +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -5142,6 +5228,11 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + husky@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/husky/-/husky-6.0.0.tgz#810f11869adf51604c32ea577edbc377d7f9319e" @@ -5480,6 +5571,11 @@ 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-fullwidth-code-point@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" + integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== + is-function@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" @@ -5576,6 +5672,11 @@ is-stream@^1.0.0, is-stream@^1.0.1: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + is-string@^1.0.5, is-string@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" @@ -6111,11 +6212,50 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lilconfig@2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" + integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= +lint-staged@12.5.0: + version "12.5.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.5.0.tgz#d6925747480ae0e380d13988522f9dd8ef9126e3" + integrity sha512-BKLUjWDsKquV/JuIcoQW4MSAI3ggwEImF1+sB4zaKvyVx1wBk3FsG7UK9bpnmBTN1pm7EH2BBcMwINJzCRv12g== + dependencies: + cli-truncate "^3.1.0" + colorette "^2.0.16" + commander "^9.3.0" + debug "^4.3.4" + execa "^5.1.1" + lilconfig "2.0.5" + listr2 "^4.0.5" + micromatch "^4.0.5" + normalize-path "^3.0.0" + object-inspect "^1.12.2" + pidtree "^0.5.0" + string-argv "^0.3.1" + supports-color "^9.2.2" + yaml "^1.10.2" + +listr2@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.5.tgz#9dcc50221583e8b4c71c43f9c7dfd0ef546b75d5" + integrity sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA== + dependencies: + cli-truncate "^2.1.0" + colorette "^2.0.16" + log-update "^4.0.0" + p-map "^4.0.0" + rfdc "^1.3.0" + rxjs "^7.5.5" + through "^2.3.8" + wrap-ansi "^7.0.0" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -6212,6 +6352,16 @@ log-symbols@4.1.0, log-symbols@^4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" +log-update@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== + dependencies: + ansi-escapes "^4.3.0" + cli-cursor "^3.1.0" + slice-ansi "^4.0.0" + wrap-ansi "^6.2.0" + looper@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/looper/-/looper-2.0.0.tgz#66cd0c774af3d4fedac53794f742db56da8f09ec" @@ -6403,6 +6553,11 @@ merge-descriptors@1.0.1: resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + merge2@^1.2.3, merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" @@ -6480,6 +6635,14 @@ micromatch@^4.0.2, micromatch@^4.0.4: braces "^3.0.1" picomatch "^2.2.3" +micromatch@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -6880,6 +7043,13 @@ normalize-url@^4.1.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + null-check@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" @@ -6922,6 +7092,11 @@ object-inspect@^1.10.3: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== +object-inspect@^1.12.2: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + object-inspect@^1.9.0: version "1.11.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" @@ -7026,7 +7201,7 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -onetime@^5.1.0: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -7149,6 +7324,13 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + p-timeout@^1.1.1: version "1.2.1" resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" @@ -7298,7 +7480,7 @@ path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= -path-key@^3.1.0: +path-key@^3.0.0, 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== @@ -7360,6 +7542,16 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + +pidtree@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.5.0.tgz#ad5fbc1de78b8a5f99d6fbdd4f6e4eee21d1aca1" + integrity sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA== + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -8018,6 +8210,11 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rfdc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + rimraf@2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -8078,6 +8275,13 @@ rxjs@^7.2.0: dependencies: tslib "~2.1.0" +rxjs@^7.5.5: + version "7.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.5.tgz#2ebad89af0f560f460ad5cc4213219e1f7dd4e9f" + integrity sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw== + dependencies: + tslib "^2.1.0" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -8288,6 +8492,11 @@ signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== +signal-exit@^3.0.3: + version "3.0.7" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + simple-concat@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" @@ -8326,6 +8535,32 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" +slice-ansi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +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" + +slice-ansi@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" + integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== + dependencies: + ansi-styles "^6.0.0" + is-fullwidth-code-point "^4.0.0" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -8617,6 +8852,11 @@ strict-uri-encode@^1.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= +string-argv@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== + string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -8652,6 +8892,15 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" +string-width@^5.0.0: + version "5.1.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + string.prototype.trim@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.4.tgz#6014689baf5efaf106ad031a5fa45157666ed1bd" @@ -8729,6 +8978,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" + integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== + dependencies: + ansi-regex "^6.0.1" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -8741,6 +8997,11 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + strip-hex-prefix@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" @@ -8798,6 +9059,11 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^9.2.2: + version "9.2.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.2.2.tgz#502acaf82f2b7ee78eb7c83dcac0f89694e5a7bb" + integrity sha512-XC6g/Kgux+rJXmwokjm9ECpD6k/smUoS5LKlUCcsYr4IY3rW0XyAympon2RmxGrlnZURMpg5T18gWDP9CsHXFA== + swarm-js@^0.1.40: version "0.1.40" resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" @@ -8897,7 +9163,7 @@ through2@^4.0.0: dependencies: readable-stream "3" -through@2, "through@>=2.2.7 <3", through@^2.3.6, through@~2.3.4, through@~2.3.8: +through@2, "through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8, through@~2.3.4, through@~2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -9057,6 +9323,11 @@ tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + tslib@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" @@ -9803,6 +10074,15 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -9929,7 +10209,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0: +yaml@^1.10.0, yaml@^1.10.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==