From 8ee620794d6f662b9604e0edfb869e7f43905571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20L=C3=B3pez?= <50665615+flopez7@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:25:12 +0100 Subject: [PATCH] Ethers v6 (#1428) Update ethers to v6 and all its references --- .../classes/base.BaseEthersClient.md | 16 +- .../classes/encryption.Encryption.md | 12 +- .../classes/encryption.EncryptionUtils.md | 10 +- .../typescript/classes/escrow.EscrowClient.md | 102 +- .../typescript/classes/escrow.EscrowUtils.md | 4 +- .../classes/kvstore.KVStoreClient.md | 42 +- .../classes/staking.StakingClient.md | 84 +- .../classes/statistics.StatisticsClient.md | 12 +- .../classes/storage.StorageClient.md | 16 +- package.json | 3 +- .../exchange-oracle/server/package.json | 12 +- .../server/src/common/utils/signature.ts | 2 +- .../server/src/common/validators/ethers.ts | 2 +- .../src/modules/web3/web3.service.spec.ts | 1 - .../server/src/modules/web3/web3.service.ts | 4 +- .../fortune/recording-oracle/package.json | 3 +- .../src/common/utils/signature.ts | 2 +- .../src/common/validators/ethers.ts | 2 +- .../src/modules/job/job.service.ts | 3 +- .../src/modules/web3/web3.service.spec.ts | 1 - .../src/modules/web3/web3.service.ts | 4 +- .../hufi/exchange-oracle/server/package.json | 1 - .../server/src/common/utils/signature.ts | 2 +- .../server/src/common/validators/ethers.ts | 2 +- .../src/modules/web3/web3.service.spec.ts | 1 - .../server/src/modules/web3/web3.service.ts | 4 +- .../hufi/job-launcher/server/package.json | 1 - .../server/src/common/utils/signature.ts | 2 +- .../server/src/modules/job/job.dto.ts | 5 +- .../src/modules/job/job.service.spec.ts | 4 +- .../server/src/modules/job/job.service.ts | 50 +- .../modules/payment/payment.service.spec.ts | 28 +- .../src/modules/payment/payment.service.ts | 55 +- .../server/src/modules/web3/Web3Service.ts | 57 + .../src/modules/web3/web3.controller.ts | 2 +- .../server/src/modules/web3/web3.module.ts | 2 +- .../src/modules/web3/web3.service.spec.ts | 2 +- .../server/src/modules/web3/web3.service.ts | 4 +- .../hufi/job-launcher/server/tsconfig.json | 4 +- .../apps/hufi/recording-oracle/package.json | 1 - .../src/common/utils/signature.ts | 2 +- .../src/common/validators/ethers.ts | 2 +- .../modules/liquidity/liquidity.service.ts | 107 +- .../src/modules/web3/web3.service.ts | 4 +- .../reputation-oracle/server/package.json | 45 +- .../server/src/common/utils/signature.ts | 2 +- .../server/src/modules/web3/web3.service.ts | 4 +- .../src/modules/webhook/webhook.service.ts | 21 +- .../reputation-oracle/server/tsconfig.json | 2 +- .../apps/job-launcher/server/package.json | 3 +- .../server/src/common/utils/signature.ts | 2 +- .../server/src/modules/job/job.dto.ts | 3 +- .../src/modules/job/job.service.spec.ts | 40 +- .../server/src/modules/job/job.service.ts | 54 +- .../modules/payment/payment.service.spec.ts | 47 +- .../src/modules/payment/payment.service.ts | 19 +- .../server/src/modules/web3/web3.service.ts | 15 +- .../apps/job-launcher/server/tsconfig.json | 4 +- .../reputation-oracle/server/package.json | 1 - .../server/src/common/utils/signature.ts | 4 +- .../src/modules/web3/web3.service.spec.ts | 1 - .../server/src/modules/web3/web3.service.ts | 13 +- .../server/src/modules/webhook/webhook.dto.ts | 3 +- .../modules/webhook/webhook.service.spec.ts | 11 +- .../src/modules/webhook/webhook.service.ts | 20 +- .../reputation-oracle/server/tsconfig.json | 2 +- packages/core/hardhat.config.ts | 3 - packages/core/package.json | 24 +- packages/core/scripts/deploy-proxies.ts | 31 +- packages/core/scripts/deploy.ts | 50 +- packages/core/scripts/upgrade-proxies.ts | 17 +- packages/core/test/Escrow.ts | 88 +- packages/core/test/EscrowFactory.ts | 76 +- packages/core/test/KVStore.ts | 4 +- packages/core/test/RewardPool.ts | 70 +- packages/core/test/Staking.ts | 136 +- .../human-protocol-sdk/package.json | 3 +- .../typescript/human-protocol-sdk/src/base.ts | 11 +- .../human-protocol-sdk/src/decorators.ts | 5 +- .../human-protocol-sdk/src/error.ts | 12 - .../human-protocol-sdk/src/escrow.ts | 215 +-- .../human-protocol-sdk/src/graphql/types.ts | 12 +- .../human-protocol-sdk/src/interfaces.ts | 35 +- .../human-protocol-sdk/src/kvstore.ts | 58 +- .../human-protocol-sdk/src/staking.ts | 110 +- .../human-protocol-sdk/src/statistics.ts | 17 +- .../human-protocol-sdk/src/types.ts | 4 +- .../human-protocol-sdk/src/utils.ts | 18 +- .../human-protocol-sdk/test/escrow.test.ts | 677 ++++--- .../human-protocol-sdk/test/kvstore.test.ts | 39 +- .../human-protocol-sdk/test/staking.test.ts | 273 ++- .../test/statistics.test.ts | 12 +- yarn.lock | 1662 +++++++++-------- 93 files changed, 2346 insertions(+), 2311 deletions(-) create mode 100644 packages/apps/hufi/job-launcher/server/src/modules/web3/Web3Service.ts diff --git a/docs/sdk/typescript/classes/base.BaseEthersClient.md b/docs/sdk/typescript/classes/base.BaseEthersClient.md index 4a76a23c9c..c4476f952b 100644 --- a/docs/sdk/typescript/classes/base.BaseEthersClient.md +++ b/docs/sdk/typescript/classes/base.BaseEthersClient.md @@ -27,13 +27,13 @@ This class is used as a base class for other clients making on-chain calls. ### Properties - [networkData](base.BaseEthersClient.md#networkdata) -- [signerOrProvider](base.BaseEthersClient.md#signerorprovider) +- [runner](base.BaseEthersClient.md#runner) ## Constructors ### constructor -• **new BaseEthersClient**(`signerOrProvider`, `networkData`): [`BaseEthersClient`](base.BaseEthersClient.md) +• **new BaseEthersClient**(`runner`, `networkData`): [`BaseEthersClient`](base.BaseEthersClient.md) **BaseClient constructor** @@ -41,7 +41,7 @@ This class is used as a base class for other clients making on-chain calls. | Name | Type | Description | | :------ | :------ | :------ | -| `signerOrProvider` | `Signer` \| `Provider` | The Signer or Provider object to interact with the Ethereum network | +| `runner` | `ContractRunner` | The Signer or Provider object to interact with the Ethereum network | | `networkData` | `NetworkData` | The network information required to connect to the contracts | #### Returns @@ -50,7 +50,7 @@ This class is used as a base class for other clients making on-chain calls. #### Defined in -[base.ts:21](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L21) +[base.ts:20](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L20) ## Properties @@ -60,14 +60,14 @@ This class is used as a base class for other clients making on-chain calls. #### Defined in -[base.ts:13](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L13) +[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) ___ -### signerOrProvider +### runner -• `Protected` **signerOrProvider**: `Signer` \| `Provider` +• `Protected` **runner**: `ContractRunner` #### Defined in -[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) +[base.ts:11](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11) diff --git a/docs/sdk/typescript/classes/encryption.Encryption.md b/docs/sdk/typescript/classes/encryption.Encryption.md index 5b6fc3dcc8..7ac03b5e67 100644 --- a/docs/sdk/typescript/classes/encryption.Encryption.md +++ b/docs/sdk/typescript/classes/encryption.Encryption.md @@ -81,7 +81,7 @@ Constructor for the Encryption class. #### Defined in -[encryption.ts:53](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L53) +[encryption.ts:53](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L53) ## Properties @@ -91,7 +91,7 @@ Constructor for the Encryption class. #### Defined in -[encryption.ts:46](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L46) +[encryption.ts:46](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L46) ## Methods @@ -140,7 +140,7 @@ const resultMessage = await encription.decrypt('message'); #### Defined in -[encryption.ts:180](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L180) +[encryption.ts:180](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L180) ___ @@ -176,7 +176,7 @@ const resultMessage = await encription.sign('message'); #### Defined in -[encryption.ts:217](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L217) +[encryption.ts:217](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L217) ___ @@ -238,7 +238,7 @@ const resultMessage = await encription.signAndEncrypt('message', publicKeys); #### Defined in -[encryption.ts:129](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L129) +[encryption.ts:129](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L129) ___ @@ -263,4 +263,4 @@ Builds an Encryption instance by decrypting the private key from an encrypted pr #### Defined in -[encryption.ts:64](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L64) +[encryption.ts:64](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L64) diff --git a/docs/sdk/typescript/classes/encryption.EncryptionUtils.md b/docs/sdk/typescript/classes/encryption.EncryptionUtils.md index cc5a1c1bbe..c07321c1f5 100644 --- a/docs/sdk/typescript/classes/encryption.EncryptionUtils.md +++ b/docs/sdk/typescript/classes/encryption.EncryptionUtils.md @@ -108,7 +108,7 @@ const result = await EncriptionUtils.encrypt('message', publicKeys); #### Defined in -[encryption.ts:422](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L422) +[encryption.ts:422](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L422) ___ @@ -157,7 +157,7 @@ const result = await EncriptionUtils.generateKeyPair(name, email, passphrase); #### Defined in -[encryption.ts:360](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L360) +[encryption.ts:360](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L360) ___ @@ -189,7 +189,7 @@ const signedData = await EncriptionUtils.getSignedData('message'); #### Defined in -[encryption.ts:317](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L317) +[encryption.ts:317](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L317) ___ @@ -237,7 +237,7 @@ if (isEncrypted) { #### Defined in -[encryption.ts:471](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L471) +[encryption.ts:471](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L471) ___ @@ -282,4 +282,4 @@ const result = await EncriptionUtils.verify('message', publicKey); #### Defined in -[encryption.ts:284](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L284) +[encryption.ts:284](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L284) diff --git a/docs/sdk/typescript/classes/escrow.EscrowClient.md b/docs/sdk/typescript/classes/escrow.EscrowClient.md index 26f0b3cea6..4a443333ca 100644 --- a/docs/sdk/typescript/classes/escrow.EscrowClient.md +++ b/docs/sdk/typescript/classes/escrow.EscrowClient.md @@ -8,11 +8,11 @@ This client enables to perform actions on Escrow contracts and obtain information from both the contracts and subgraph. -Internally, the SDK will use one network or another according to the network ID of the `signerOrProvider`. +Internally, the SDK will use one network or another according to the network ID of the `runner`. To use this client, it is recommended to initialize it using the static `build` method. ```ts -static async build(signerOrProvider: Signer | Provider); +static async build(runner: ContractRunner); ``` A `Signer` or a `Provider` should be passed depending on the use case of this module: @@ -88,7 +88,7 @@ const escrowClient = await EscrowClient.build(provider); - [escrowFactoryContract](escrow.EscrowClient.md#escrowfactorycontract) - [networkData](escrow.EscrowClient.md#networkdata) -- [signerOrProvider](escrow.EscrowClient.md#signerorprovider) +- [runner](escrow.EscrowClient.md#runner) ### Methods @@ -121,7 +121,7 @@ const escrowClient = await EscrowClient.build(provider); ### constructor -• **new EscrowClient**(`signerOrProvider`, `networkData`): [`EscrowClient`](escrow.EscrowClient.md) +• **new EscrowClient**(`runner`, `networkData`): [`EscrowClient`](escrow.EscrowClient.md) **EscrowClient constructor** @@ -129,7 +129,7 @@ const escrowClient = await EscrowClient.build(provider); | Name | Type | Description | | :------ | :------ | :------ | -| `signerOrProvider` | `Signer` \| `Provider` | The Signer or Provider object to interact with the Ethereum network | +| `runner` | `ContractRunner` | The Runner object to interact with the Ethereum network | | `networkData` | `NetworkData` | - | #### Returns @@ -142,7 +142,7 @@ const escrowClient = await EscrowClient.build(provider); #### Defined in -[escrow.ts:129](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L129) +[escrow.ts:127](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L127) ## Properties @@ -152,7 +152,7 @@ const escrowClient = await EscrowClient.build(provider); #### Defined in -[escrow.ts:121](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L121) +[escrow.ts:119](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L119) ___ @@ -166,21 +166,21 @@ ___ #### Defined in -[base.ts:13](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L13) +[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) ___ -### signerOrProvider +### runner -• `Protected` **signerOrProvider**: `Signer` \| `Provider` +• `Protected` **runner**: `ContractRunner` #### Inherited from -[BaseEthersClient](base.BaseEthersClient.md).[signerOrProvider](base.BaseEthersClient.md#signerorprovider) +[BaseEthersClient](base.BaseEthersClient.md).[runner](base.BaseEthersClient.md#runner) #### Defined in -[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) +[base.ts:11](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11) ## Methods @@ -223,7 +223,7 @@ await escrowClient.abort('0x62dD51230A30401C455c8398d06F85e4EaB6309f'); #### Defined in -[escrow.ts:839](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L839) +[escrow.ts:835](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L835) ___ @@ -268,7 +268,7 @@ await escrowClient.addTrustedHandlers('0x62dD51230A30401C455c8398d06F85e4EaB6309 #### Defined in -[escrow.ts:887](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L887) +[escrow.ts:883](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L883) ___ @@ -284,7 +284,7 @@ This function pays out the amounts specified to the workers and sets the URL of | :------ | :------ | :------ | | `escrowAddress` | `string` | Escrow address to payout. | | `recipients` | `string`[] | Array of recipient addresses. | -| `amounts` | `BigNumber`[] | Array of amounts the recipients will receive. | +| `amounts` | `bigint`[] | Array of amounts the recipients will receive. | | `finalResultsUrl` | `string` | Final results file url. | | `finalResultsHash` | `string` | Final results file hash. | | `txOptions?` | `Overrides` | Additional transaction parameters (optional, defaults to an empty object). | @@ -311,7 +311,7 @@ const signer = new Wallet(privateKey, provider); const escrowClient = await EscrowClient.build(signer); const recipients = ['0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266']; -const amounts = [ethers.utils.parseUnits(5, 'ether'), ethers.utils.parseUnits(10, 'ether')]; +const amounts = [ethers.parseUnits(5, 'ether'), ethers.parseUnits(10, 'ether')]; const resultsUrl = 'http://localhost/results.json'; const resultsHash'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079'; @@ -320,7 +320,7 @@ await escrowClient.bulkPayOut('0x62dD51230A30401C455c8398d06F85e4EaB6309f', reci #### Defined in -[escrow.ts:655](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L655) +[escrow.ts:648](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L648) ___ @@ -363,7 +363,7 @@ await escrowClient.cancel('0x62dD51230A30401C455c8398d06F85e4EaB6309f'); #### Defined in -[escrow.ts:758](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L758) +[escrow.ts:751](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L751) ___ @@ -406,7 +406,7 @@ await escrowClient.complete('0x62dD51230A30401C455c8398d06F85e4EaB6309f'); #### Defined in -[escrow.ts:597](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L597) +[escrow.ts:590](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L590) ___ @@ -452,9 +452,9 @@ const escrowConfig = { recordingOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', reputationOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', exchangeOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', - recordingOracleFee: BigNumber.from('10'), - reputationOracleFee: BigNumber.from('10'), - exchangeOracleFee: BigNumber.from('10'), + recordingOracleFee: bigint.from('10'), + reputationOracleFee: bigint.from('10'), + exchangeOracleFee: bigint.from('10'), manifestUrl: 'htttp://localhost/manifest.json', manifestHash: 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079', }; @@ -464,7 +464,7 @@ const escrowAddress = await escrowClient.createAndSetupEscrow(tokenAddress, trus #### Defined in -[escrow.ts:420](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L420) +[escrow.ts:413](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L413) ___ @@ -512,7 +512,7 @@ const escrowAddress = await escrowClient.createEscrow(tokenAddress, trustedHandl #### Defined in -[escrow.ts:214](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L214) +[escrow.ts:207](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L207) ___ @@ -527,7 +527,7 @@ This function adds funds of the chosen token to the escrow. | Name | Type | Description | | :------ | :------ | :------ | | `escrowAddress` | `string` | Address of the escrow to fund. | -| `amount` | `BigNumber` | Amount to be added as funds. | +| `amount` | `bigint` | Amount to be added as funds. | | `txOptions?` | `Overrides` | Additional transaction parameters (optional, defaults to an empty object). | #### Returns @@ -549,19 +549,19 @@ const provider = new providers.JsonRpcProvider(rpcUrl); const signer = new Wallet(privateKey, provider); const escrowClient = await EscrowClient.build(signer); -const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI +const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI await escrowClient.fund('0x62dD51230A30401C455c8398d06F85e4EaB6309f', amount); ``` #### Defined in -[escrow.ts:468](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L468) +[escrow.ts:461](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L461) ___ ### getBalance -▸ **getBalance**(`escrowAddress`): `Promise`\<`BigNumber`\> +▸ **getBalance**(`escrowAddress`): `Promise`\<`bigint`\> This function returns the balance for a specified escrow address. @@ -573,7 +573,7 @@ This function returns the balance for a specified escrow address. #### Returns -`Promise`\<`BigNumber`\> +`Promise`\<`bigint`\> Balance of the escrow in the token used to fund it. @@ -593,7 +593,7 @@ const balance = await escrowClient.getBalance('0x62dD51230A30401C455c8398d06F85e #### Defined in -[escrow.ts:942](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L942) +[escrow.ts:938](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L938) ___ @@ -615,7 +615,7 @@ Connects to the escrow contract #### Defined in -[escrow.ts:174](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L174) +[escrow.ts:167](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L167) ___ @@ -653,7 +653,7 @@ const oracleAddress = await escrowClient.getExchangeOracleAddress('0x62dD51230A3 #### Defined in -[escrow.ts:1322](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1322) +[escrow.ts:1318](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1318) ___ @@ -691,7 +691,7 @@ const factoryAddress = await escrowClient.getFactoryAddress('0x62dD51230A30401C4 #### Defined in -[escrow.ts:1360](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1360) +[escrow.ts:1356](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1356) ___ @@ -729,7 +729,7 @@ const intemediateResultsUrl = await escrowClient.getIntermediateResultsUrl('0x62 #### Defined in -[escrow.ts:1094](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1094) +[escrow.ts:1090](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1090) ___ @@ -767,7 +767,7 @@ const jobLauncherAddress = await escrowClient.getJobLauncherAddress('0x62dD51230 #### Defined in -[escrow.ts:1246](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1246) +[escrow.ts:1242](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1242) ___ @@ -805,7 +805,7 @@ const manifestHash = await escrowClient.getManifestHash('0x62dD51230A30401C455c8 #### Defined in -[escrow.ts:980](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L980) +[escrow.ts:976](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L976) ___ @@ -843,7 +843,7 @@ const manifestUrl = await escrowClient.getManifestUrl('0x62dD51230A30401C455c839 #### Defined in -[escrow.ts:1018](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1018) +[escrow.ts:1014](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1014) ___ @@ -881,7 +881,7 @@ const oracleAddress = await escrowClient.getRecordingOracleAddress('0x62dD51230A #### Defined in -[escrow.ts:1208](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1208) +[escrow.ts:1204](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1204) ___ @@ -919,7 +919,7 @@ const oracleAddress = await escrowClient.getReputationOracleAddress('0x62dD51230 #### Defined in -[escrow.ts:1284](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1284) +[escrow.ts:1280](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1280) ___ @@ -957,7 +957,7 @@ const resultsUrl = await escrowClient.getResultsUrl('0x62dD51230A30401C455c8398d #### Defined in -[escrow.ts:1056](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1056) +[escrow.ts:1052](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1052) ___ @@ -995,7 +995,7 @@ const status = await escrowClient.getStatus('0x62dD51230A30401C455c8398d06F85e4E #### Defined in -[escrow.ts:1170](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1170) +[escrow.ts:1166](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1166) ___ @@ -1033,7 +1033,7 @@ const tokenAddress = await escrowClient.getTokenAddress('0x62dD51230A30401C455c8 #### Defined in -[escrow.ts:1132](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1132) +[escrow.ts:1128](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1128) ___ @@ -1077,9 +1077,9 @@ const escrowConfig = { recordingOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', reputationOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', exchangeOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', - recordingOracleFee: BigNumber.from('10'), - reputationOracleFee: BigNumber.from('10'), - exchangeOracleFee: BigNumber.from('10'), + recordingOracleFee: bigint.from('10'), + reputationOracleFee: bigint.from('10'), + exchangeOracleFee: bigint.from('10'), manifestUrl: 'htttp://localhost/manifest.json', manifestHash: 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079', }; @@ -1088,7 +1088,7 @@ await escrowClient.setup(escrowAddress, escrowConfig); #### Defined in -[escrow.ts:293](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L293) +[escrow.ts:288](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L288) ___ @@ -1133,21 +1133,21 @@ await storeResults.storeResults('0x62dD51230A30401C455c8398d06F85e4EaB6309f', 'h #### Defined in -[escrow.ts:533](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L533) +[escrow.ts:526](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L526) ___ ### build -▸ **build**(`signerOrProvider`): `Promise`\<[`EscrowClient`](escrow.EscrowClient.md)\> +▸ **build**(`runner`): `Promise`\<[`EscrowClient`](escrow.EscrowClient.md)\> -Creates an instance of EscrowClient from a Signer or Provider. +Creates an instance of EscrowClient from a Runner. #### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `signerOrProvider` | `Signer` \| `Provider` | The Signer or Provider object to interact with the Ethereum network | +| `runner` | `ContractRunner` | The Runner object to interact with the Ethereum network | #### Returns @@ -1165,4 +1165,4 @@ Thrown if the network's chainId is not supported #### Defined in -[escrow.ts:147](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L147) +[escrow.ts:145](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L145) diff --git a/docs/sdk/typescript/classes/escrow.EscrowUtils.md b/docs/sdk/typescript/classes/escrow.EscrowUtils.md index d476ff2a80..bbdc767578 100644 --- a/docs/sdk/typescript/classes/escrow.EscrowUtils.md +++ b/docs/sdk/typescript/classes/escrow.EscrowUtils.md @@ -138,7 +138,7 @@ const escrowData = new EscrowUtils.getEscrow(ChainId.POLYGON_MUMBAI, "0x12345678 #### Defined in -[escrow.ts:1645](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1645) +[escrow.ts:1632](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1632) ___ @@ -251,4 +251,4 @@ const escrowDatas = await EscrowUtils.getEscrows(filters); #### Defined in -[escrow.ts:1508](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1508) +[escrow.ts:1504](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts#L1504) diff --git a/docs/sdk/typescript/classes/kvstore.KVStoreClient.md b/docs/sdk/typescript/classes/kvstore.KVStoreClient.md index 037fd4d3db..61d9912a8b 100644 --- a/docs/sdk/typescript/classes/kvstore.KVStoreClient.md +++ b/docs/sdk/typescript/classes/kvstore.KVStoreClient.md @@ -8,11 +8,11 @@ This client enables to perform actions on KVStore contract and obtain information from both the contracts and subgraph. -Internally, the SDK will use one network or another according to the network ID of the `signerOrProvider`. +Internally, the SDK will use one network or another according to the network ID of the `runner`. To use this client, it is recommended to initialize it using the static `build` method. ```ts -static async build(signerOrProvider: Signer | Provider); +static async build(runner: ContractRunner); ``` A `Signer` or a `Provider` should be passed depending on the use case of this module: @@ -88,7 +88,7 @@ const kvstoreClient = await KVStoreClient.build(signer); - [contract](kvstore.KVStoreClient.md#contract) - [networkData](kvstore.KVStoreClient.md#networkdata) -- [signerOrProvider](kvstore.KVStoreClient.md#signerorprovider) +- [runner](kvstore.KVStoreClient.md#runner) ### Methods @@ -103,7 +103,7 @@ const kvstoreClient = await KVStoreClient.build(signer); ### constructor -• **new KVStoreClient**(`signerOrProvider`, `networkData`): [`KVStoreClient`](kvstore.KVStoreClient.md) +• **new KVStoreClient**(`runner`, `networkData`): [`KVStoreClient`](kvstore.KVStoreClient.md) **KVStoreClient constructor** @@ -111,7 +111,7 @@ const kvstoreClient = await KVStoreClient.build(signer); | Name | Type | Description | | :------ | :------ | :------ | -| `signerOrProvider` | `Signer` \| `Provider` | The Signer or Provider object to interact with the Ethereum network | +| `runner` | `ContractRunner` | The Runner object to interact with the Ethereum network | | `networkData` | `NetworkData` | - | #### Returns @@ -124,7 +124,7 @@ const kvstoreClient = await KVStoreClient.build(signer); #### Defined in -[kvstore.ts:103](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L103) +[kvstore.ts:100](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L100) ## Properties @@ -134,7 +134,7 @@ const kvstoreClient = await KVStoreClient.build(signer); #### Defined in -[kvstore.ts:95](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L95) +[kvstore.ts:92](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L92) ___ @@ -148,21 +148,21 @@ ___ #### Defined in -[base.ts:13](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L13) +[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) ___ -### signerOrProvider +### runner -• `Protected` **signerOrProvider**: `Signer` \| `Provider` +• `Protected` **runner**: `ContractRunner` #### Inherited from -[BaseEthersClient](base.BaseEthersClient.md).[signerOrProvider](base.BaseEthersClient.md#signerorprovider) +[BaseEthersClient](base.BaseEthersClient.md).[runner](base.BaseEthersClient.md#runner) #### Defined in -[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) +[base.ts:11](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11) ## Methods @@ -203,7 +203,7 @@ const value = await kvstoreClient.get('0xf39Fd6e51aad88F6F4ce6aB8827279cffFb9226 #### Defined in -[kvstore.ts:317](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L317) +[kvstore.ts:301](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L301) ___ @@ -246,7 +246,7 @@ const linkedinUrl = await kvstoreClient.getURL( #### Defined in -[kvstore.ts:356](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L356) +[kvstore.ts:340](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L340) ___ @@ -290,7 +290,7 @@ await kvstoreClient.set('Role', 'RecordingOracle'); #### Defined in -[kvstore.ts:171](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L171) +[kvstore.ts:163](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L163) ___ @@ -336,7 +336,7 @@ await kvstoreClient.set(keys, values); #### Defined in -[kvstore.ts:215](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L215) +[kvstore.ts:206](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L206) ___ @@ -379,21 +379,21 @@ await kvstoreClient.setURL('linkedin.com/example', 'linkedinUrl); #### Defined in -[kvstore.ts:259](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L259) +[kvstore.ts:249](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L249) ___ ### build -▸ **build**(`signerOrProvider`): `Promise`\<[`KVStoreClient`](kvstore.KVStoreClient.md)\> +▸ **build**(`runner`): `Promise`\<[`KVStoreClient`](kvstore.KVStoreClient.md)\> -Creates an instance of KVStoreClient from a Signer or Provider. +Creates an instance of KVStoreClient from a runner. #### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `signerOrProvider` | `Signer` \| `Provider` | The Signer or Provider object to interact with the Ethereum network | +| `runner` | `ContractRunner` | The Runner object to interact with the Ethereum network | #### Returns @@ -411,4 +411,4 @@ Creates an instance of KVStoreClient from a Signer or Provider. #### Defined in -[kvstore.ts:121](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L121) +[kvstore.ts:118](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts#L118) diff --git a/docs/sdk/typescript/classes/staking.StakingClient.md b/docs/sdk/typescript/classes/staking.StakingClient.md index e5278ddf08..6f3d6311f6 100644 --- a/docs/sdk/typescript/classes/staking.StakingClient.md +++ b/docs/sdk/typescript/classes/staking.StakingClient.md @@ -8,11 +8,11 @@ This client enables to perform actions on staking contracts and obtain staking information from both the contracts and subgraph. -Internally, the SDK will use one network or another according to the network ID of the `signerOrProvider`. +Internally, the SDK will use one network or another according to the network ID of the `runner`. To use this client, it is recommended to initialize it using the static `build` method. ```ts -static async build(signerOrProvider: Signer | Provider); +static async build(runner: ContractRunner); ``` A `Signer` or a `Provider` should be passed depending on the use case of this module: @@ -89,7 +89,7 @@ const stakingClient = await StakingClient.build(provider); - [escrowFactoryContract](staking.StakingClient.md#escrowfactorycontract) - [networkData](staking.StakingClient.md#networkdata) - [rewardPoolContract](staking.StakingClient.md#rewardpoolcontract) -- [signerOrProvider](staking.StakingClient.md#signerorprovider) +- [runner](staking.StakingClient.md#runner) - [stakingContract](staking.StakingClient.md#stakingcontract) - [tokenContract](staking.StakingClient.md#tokencontract) @@ -114,7 +114,7 @@ const stakingClient = await StakingClient.build(provider); ### constructor -• **new StakingClient**(`signerOrProvider`, `networkData`): [`StakingClient`](staking.StakingClient.md) +• **new StakingClient**(`runner`, `networkData`): [`StakingClient`](staking.StakingClient.md) **StakingClient constructor** @@ -122,7 +122,7 @@ const stakingClient = await StakingClient.build(provider); | Name | Type | Description | | :------ | :------ | :------ | -| `signerOrProvider` | `Signer` \| `Provider` | The Signer or Provider object to interact with the Ethereum network | +| `runner` | `ContractRunner` | The Runner object to interact with the Ethereum network | | `networkData` | `NetworkData` | - | #### Returns @@ -135,7 +135,7 @@ const stakingClient = await StakingClient.build(provider); #### Defined in -[staking.ts:118](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L118) +[staking.ts:116](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L116) ## Properties @@ -145,7 +145,7 @@ const stakingClient = await StakingClient.build(provider); #### Defined in -[staking.ts:109](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L109) +[staking.ts:107](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L107) ___ @@ -159,7 +159,7 @@ ___ #### Defined in -[base.ts:13](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L13) +[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) ___ @@ -169,21 +169,21 @@ ___ #### Defined in -[staking.ts:110](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L110) +[staking.ts:108](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L108) ___ -### signerOrProvider +### runner -• `Protected` **signerOrProvider**: `Signer` \| `Provider` +• `Protected` **runner**: `ContractRunner` #### Inherited from -[BaseEthersClient](base.BaseEthersClient.md).[signerOrProvider](base.BaseEthersClient.md#signerorprovider) +[BaseEthersClient](base.BaseEthersClient.md).[runner](base.BaseEthersClient.md#runner) #### Defined in -[base.ts:12](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L12) +[base.ts:11](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/base.ts#L11) ___ @@ -193,7 +193,7 @@ ___ #### Defined in -[staking.ts:108](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L108) +[staking.ts:106](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L106) ___ @@ -203,7 +203,7 @@ ___ #### Defined in -[staking.ts:107](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L107) +[staking.ts:105](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L105) ## Methods @@ -220,7 +220,7 @@ This function allocates a portion of the staked tokens to a specific escrow. | Name | Type | Description | | :------ | :------ | :------ | | `escrowAddress` | `string` | Address of the escrow contract to allocate in. | -| `amount` | `BigNumber` | Amount in WEI of tokens to allocate. | +| `amount` | `bigint` | Amount in WEI of tokens to allocate. | | `txOptions?` | `Overrides` | Additional transaction parameters (optional, defaults to an empty object). | #### Returns @@ -242,13 +242,13 @@ const provider = new providers.JsonRpcProvider(rpcUrl); const signer = new Wallet(privateKey, provider); const stakingClient = await StakingClient.build(signer); -const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI +const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI await stakingClient.allocate('0x62dD51230A30401C455c8398d06F85e4EaB6309f', amount); ``` #### Defined in -[staking.ts:473](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L473) +[staking.ts:463](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L463) ___ @@ -262,7 +262,7 @@ This function approves the staking contract to transfer a specified amount of to | Name | Type | Description | | :------ | :------ | :------ | -| `amount` | `BigNumber` | Amount in WEI of tokens to approve for stake. | +| `amount` | `bigint` | Amount in WEI of tokens to approve for stake. | | `txOptions?` | `Overrides` | Additional transaction parameters (optional, defaults to an empty object). | #### Returns @@ -284,13 +284,13 @@ const provider = new providers.JsonRpcProvider(rpcUrl); const signer = new Wallet(privateKey, provider); const stakingClient = await StakingClient.build(signer); -const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI +const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI await stakingClient.approveStake(amount); ``` #### Defined in -[staking.ts:215](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L215) +[staking.ts:208](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L208) ___ @@ -312,7 +312,7 @@ Check if escrow exists #### Defined in -[staking.ts:179](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L179) +[staking.ts:172](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L172) ___ @@ -356,7 +356,7 @@ await stakingClient.closeAllocation('0x62dD51230A30401C455c8398d06F85e4EaB6309f' #### Defined in -[staking.ts:526](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L526) +[staking.ts:516](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L516) ___ @@ -399,7 +399,7 @@ await stakingClient.distributeReward('0x62dD51230A30401C455c8398d06F85e4EaB6309f #### Defined in -[staking.ts:569](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L569) +[staking.ts:559](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L559) ___ @@ -437,7 +437,7 @@ const allocationInfo = await stakingClient.getAllocation('0x62dD51230A30401C455c #### Defined in -[staking.ts:680](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L680) +[staking.ts:670](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L670) ___ @@ -475,7 +475,7 @@ const leaders = await stakingClient.getLeaders(); #### Defined in -[staking.ts:606](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L606) +[staking.ts:596](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L596) ___ @@ -513,7 +513,7 @@ const leader = await stakingClient.getLeader('0x62dD51230A30401C455c8398d06F85e4 #### Defined in -[staking.ts:645](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L645) +[staking.ts:635](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L635) ___ @@ -551,7 +551,7 @@ const rewards = await stakingClient.getRewards('0x62dD51230A30401C455c8398d06F85 #### Defined in -[staking.ts:712](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L712) +[staking.ts:702](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L702) ___ @@ -568,7 +568,7 @@ This function reduces the allocated amount by an staker in an escrow and transfe | `slasher` | `string` | Wallet address from who requested the slash | | `staker` | `string` | Wallet address from who is going to be slashed | | `escrowAddress` | `string` | Address of the escrow which allocation will be slashed | -| `amount` | `BigNumber` | Amount in WEI of tokens to unstake. | +| `amount` | `bigint` | Amount in WEI of tokens to unstake. | | `txOptions?` | `Overrides` | Additional transaction parameters (optional, defaults to an empty object). | #### Returns @@ -590,13 +590,13 @@ const provider = new providers.JsonRpcProvider(rpcUrl); const signer = new Wallet(privateKey, provider); const stakingClient = await StakingClient.build(signer); -const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI +const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI await stakingClient.slash('0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0x62dD51230A30401C455c8398d06F85e4EaB6309f', amount); ``` #### Defined in -[staking.ts:402](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L402) +[staking.ts:392](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L392) ___ @@ -612,7 +612,7 @@ This function stakes a specified amount of tokens on a specific network. | Name | Type | Description | | :------ | :------ | :------ | -| `amount` | `BigNumber` | Amount in WEI of tokens to stake. | +| `amount` | `bigint` | Amount in WEI of tokens to stake. | | `txOptions?` | `Overrides` | Additional transaction parameters (optional, defaults to an empty object). | #### Returns @@ -634,14 +634,14 @@ const provider = new providers.JsonRpcProvider(rpcUrl); const signer = new Wallet(privateKey, provider); const stakingClient = await StakingClient.build(signer); -const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI +const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI await stakingClient.approveStake(amount); // if it was already approved before, this is not necessary await stakingClient.approveStake(amount); ``` #### Defined in -[staking.ts:270](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L270) +[staking.ts:263](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L263) ___ @@ -657,7 +657,7 @@ This function unstakes tokens from staking contract. The unstaked tokens stay lo | Name | Type | Description | | :------ | :------ | :------ | -| `amount` | `BigNumber` | Amount in WEI of tokens to unstake. | +| `amount` | `bigint` | Amount in WEI of tokens to unstake. | | `txOptions?` | `Overrides` | Additional transaction parameters (optional, defaults to an empty object). | #### Returns @@ -679,13 +679,13 @@ const provider = new providers.JsonRpcProvider(rpcUrl); const signer = new Wallet(privateKey, provider); const stakingClient = await StakingClient.build(signer); -const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI +const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI await stakingClient.unstake(amount); ``` #### Defined in -[staking.ts:318](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L318) +[staking.ts:308](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L308) ___ @@ -727,21 +727,21 @@ await stakingClient.withdraw(); #### Defined in -[staking.ts:364](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L364) +[staking.ts:354](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L354) ___ ### build -▸ **build**(`signerOrProvider`): `Promise`\<[`StakingClient`](staking.StakingClient.md)\> +▸ **build**(`runner`): `Promise`\<[`StakingClient`](staking.StakingClient.md)\> -Creates an instance of StakingClient from a Signer or Provider. +Creates an instance of StakingClient from a Runner. #### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `signerOrProvider` | `Signer` \| `Provider` | The Signer or Provider object to interact with the Ethereum network | +| `runner` | `ContractRunner` | The Runner object to interact with the Ethereum network | #### Returns @@ -759,4 +759,4 @@ Creates an instance of StakingClient from a Signer or Provider. #### Defined in -[staking.ts:152](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L152) +[staking.ts:150](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/staking.ts#L150) diff --git a/docs/sdk/typescript/classes/statistics.StatisticsClient.md b/docs/sdk/typescript/classes/statistics.StatisticsClient.md index 7e3d008874..5630d2c15b 100644 --- a/docs/sdk/typescript/classes/statistics.StatisticsClient.md +++ b/docs/sdk/typescript/classes/statistics.StatisticsClient.md @@ -77,7 +77,7 @@ const statisticsClient = new StatisticsClient(NETWORKS[ChainId.POLYGON_MUMBAI]); #### Defined in -[statistics.ts:68](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L68) +[statistics.ts:68](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L68) ## Properties @@ -87,7 +87,7 @@ const statisticsClient = new StatisticsClient(NETWORKS[ChainId.POLYGON_MUMBAI]); #### Defined in -[statistics.ts:61](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L61) +[statistics.ts:61](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L61) ## Methods @@ -151,7 +151,7 @@ const escrowStatisticsApril = await statisticsClient.getEscrowStatistics({ #### Defined in -[statistics.ts:121](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L121) +[statistics.ts:121](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L121) ___ @@ -247,7 +247,7 @@ console.log('HMT statistics from 5/8 - 6/8:', { #### Defined in -[statistics.ts:395](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L395) +[statistics.ts:394](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L394) ___ @@ -329,7 +329,7 @@ console.log( #### Defined in -[statistics.ts:285](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L285) +[statistics.ts:285](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L285) ___ @@ -388,4 +388,4 @@ const workerStatisticsApril = await statisticsClient.getWorkerStatistics({ #### Defined in -[statistics.ts:196](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L196) +[statistics.ts:196](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts#L196) diff --git a/docs/sdk/typescript/classes/storage.StorageClient.md b/docs/sdk/typescript/classes/storage.StorageClient.md index 9a8e23ab00..ddd88c1eed 100644 --- a/docs/sdk/typescript/classes/storage.StorageClient.md +++ b/docs/sdk/typescript/classes/storage.StorageClient.md @@ -91,7 +91,7 @@ const storageClient = new StorageClient(params, credentials); #### Defined in -[storage.ts:73](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L73) +[storage.ts:73](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L73) ## Properties @@ -101,7 +101,7 @@ const storageClient = new StorageClient(params, credentials); #### Defined in -[storage.ts:64](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L64) +[storage.ts:64](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L64) ___ @@ -111,7 +111,7 @@ ___ #### Defined in -[storage.ts:65](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L65) +[storage.ts:65](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L65) ## Methods @@ -155,7 +155,7 @@ const exists = await storageClient.bucketExists('bucket-name'); #### Defined in -[storage.ts:266](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L266) +[storage.ts:266](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L266) ___ @@ -198,7 +198,7 @@ const files = await storageClient.downloadFiles(keys, 'bucket-name'); #### Defined in -[storage.ts:113](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L113) +[storage.ts:113](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L113) ___ @@ -242,7 +242,7 @@ const fileNames = await storageClient.listObjects('bucket-name'); #### Defined in -[storage.ts:297](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L297) +[storage.ts:297](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L297) ___ @@ -290,7 +290,7 @@ const uploadedFiles = await storageClient.uploadFiles(files, 'bucket-name'); #### Defined in -[storage.ts:201](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L201) +[storage.ts:201](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L201) ___ @@ -322,4 +322,4 @@ const file = await storageClient.downloadFileFromUrl('http://localhost/file.json #### Defined in -[storage.ts:148](https://github.com/humanprotocol/human-protocol/blob/47ca9511/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L148) +[storage.ts:148](https://github.com/humanprotocol/human-protocol/blob/9bc762a5/packages/sdk/typescript/human-protocol-sdk/src/storage.ts#L148) diff --git a/package.json b/package.json index fb015c006d..c0f2107cbb 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,8 @@ "prettier": "^3.1.1", "ts-jest": "^29.1.1", "ts-node": "^10.9.2", - "typescript": "^4.9.3" + "typescript": "^4.9.3", + "ethers": "^6.9.1" }, "resolutions": { "ejs": "^3.1.8", diff --git a/packages/apps/fortune/exchange-oracle/server/package.json b/packages/apps/fortune/exchange-oracle/server/package.json index e09e1d2c7b..58a425463e 100644 --- a/packages/apps/fortune/exchange-oracle/server/package.json +++ b/packages/apps/fortune/exchange-oracle/server/package.json @@ -1,10 +1,9 @@ { - "name": "server", - "version": "0.0.1", - "description": "", - "author": "", - "private": true, - "license": "UNLICENSED", + "name": "@human-protocol/fortune-exchange-oracle-server", + "version": "1.0.0", + "description": "Fortune Exchange Oracle", + "author": "Human Protocol", + "license": "MIT", "scripts": { "build": "nest build", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", @@ -25,7 +24,6 @@ "@nestjs/common": "^10.2.7", "@nestjs/core": "^10.2.8", "@nestjs/platform-express": "^10.2.6", - "ethers": "^5.7.2", "joi": "^17.9.2", "reflect-metadata": "^0.1.13", "rxjs": "^7.2.0" diff --git a/packages/apps/fortune/exchange-oracle/server/src/common/utils/signature.ts b/packages/apps/fortune/exchange-oracle/server/src/common/utils/signature.ts index 9741950d9e..20cc25b726 100644 --- a/packages/apps/fortune/exchange-oracle/server/src/common/utils/signature.ts +++ b/packages/apps/fortune/exchange-oracle/server/src/common/utils/signature.ts @@ -40,7 +40,7 @@ export function recoverSigner( } try { - return ethers.utils.verifyMessage(message, signature); + return ethers.verifyMessage(message, signature); } catch (e) { throw new ConflictException('Invalid signature'); } diff --git a/packages/apps/fortune/exchange-oracle/server/src/common/validators/ethers.ts b/packages/apps/fortune/exchange-oracle/server/src/common/validators/ethers.ts index 982b4aa3ba..55bc380197 100644 --- a/packages/apps/fortune/exchange-oracle/server/src/common/validators/ethers.ts +++ b/packages/apps/fortune/exchange-oracle/server/src/common/validators/ethers.ts @@ -11,7 +11,7 @@ import { ethers } from 'ethers'; @Injectable() class ValidateEthereumAddress implements ValidatorConstraintInterface { public validate(value: string): boolean { - return ethers.utils.isAddress(value); + return ethers.isAddress(value); } public defaultMessage(): string { diff --git a/packages/apps/fortune/exchange-oracle/server/src/modules/web3/web3.service.spec.ts b/packages/apps/fortune/exchange-oracle/server/src/modules/web3/web3.service.spec.ts index 2a5e5011ce..bb8aaa99bf 100644 --- a/packages/apps/fortune/exchange-oracle/server/src/modules/web3/web3.service.spec.ts +++ b/packages/apps/fortune/exchange-oracle/server/src/modules/web3/web3.service.spec.ts @@ -34,7 +34,6 @@ describe('Web3Service', () => { const signer = web3Service.getSigner(network.chainId); expect(signer).toBeDefined(); - expect((signer.provider as any).connection.url).toBe(network.rpcUrl); } }); diff --git a/packages/apps/fortune/exchange-oracle/server/src/modules/web3/web3.service.ts b/packages/apps/fortune/exchange-oracle/server/src/modules/web3/web3.service.ts index d11e1555d8..a2c5bd6384 100644 --- a/packages/apps/fortune/exchange-oracle/server/src/modules/web3/web3.service.ts +++ b/packages/apps/fortune/exchange-oracle/server/src/modules/web3/web3.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { Wallet, providers } from 'ethers'; +import { Wallet, ethers } from 'ethers'; import { ConfigNames, networkMap } from '../../common/config'; @Injectable() @@ -11,7 +11,7 @@ export class Web3Service { const privateKey = this.configService.get(ConfigNames.WEB3_PRIVATE_KEY); for (const networkKey of Object.keys(networkMap)) { const network = networkMap[networkKey]; - const provider = new providers.JsonRpcProvider(network.rpcUrl); + const provider = new ethers.JsonRpcProvider(network.rpcUrl); this.signers[network.chainId] = new Wallet(privateKey, provider); } } diff --git a/packages/apps/fortune/recording-oracle/package.json b/packages/apps/fortune/recording-oracle/package.json index 6e75d9fc15..11e4d66c62 100644 --- a/packages/apps/fortune/recording-oracle/package.json +++ b/packages/apps/fortune/recording-oracle/package.json @@ -1,5 +1,5 @@ { - "name": "@human-protocol/fortune-v3-recording-oracle", + "name": "@human-protocol/fortune-recording-oracle", "version": "1.0.0", "description": "Fortune Recording Oracle", "author": "Human Protocol", @@ -32,7 +32,6 @@ "body-parser": "^1.20.2", "class-validator": "^0.14.0", "cookie-parser": "^1.4.6", - "ethers": "^5.7.2", "helmet": "^7.1.0", "reflect-metadata": "^0.1.13" }, diff --git a/packages/apps/fortune/recording-oracle/src/common/utils/signature.ts b/packages/apps/fortune/recording-oracle/src/common/utils/signature.ts index 9741950d9e..20cc25b726 100644 --- a/packages/apps/fortune/recording-oracle/src/common/utils/signature.ts +++ b/packages/apps/fortune/recording-oracle/src/common/utils/signature.ts @@ -40,7 +40,7 @@ export function recoverSigner( } try { - return ethers.utils.verifyMessage(message, signature); + return ethers.verifyMessage(message, signature); } catch (e) { throw new ConflictException('Invalid signature'); } diff --git a/packages/apps/fortune/recording-oracle/src/common/validators/ethers.ts b/packages/apps/fortune/recording-oracle/src/common/validators/ethers.ts index 982b4aa3ba..55bc380197 100644 --- a/packages/apps/fortune/recording-oracle/src/common/validators/ethers.ts +++ b/packages/apps/fortune/recording-oracle/src/common/validators/ethers.ts @@ -11,7 +11,7 @@ import { ethers } from 'ethers'; @Injectable() class ValidateEthereumAddress implements ValidatorConstraintInterface { public validate(value: string): boolean { - return ethers.utils.isAddress(value); + return ethers.isAddress(value); } public defaultMessage(): string { diff --git a/packages/apps/fortune/recording-oracle/src/modules/job/job.service.ts b/packages/apps/fortune/recording-oracle/src/modules/job/job.service.ts index 0caf927b13..63fe0cfbbd 100644 --- a/packages/apps/fortune/recording-oracle/src/modules/job/job.service.ts +++ b/packages/apps/fortune/recording-oracle/src/modules/job/job.service.ts @@ -104,8 +104,7 @@ export class JobService { jobSolution.escrowAddress, ); if ( - ethers.utils.getAddress(recordingOracleAddress) !== - (await signer.getAddress()) + ethers.getAddress(recordingOracleAddress) !== (await signer.getAddress()) ) { this.logger.log(ErrorJob.AddressMismatches, JobService.name); throw new BadRequestException(ErrorJob.AddressMismatches); diff --git a/packages/apps/fortune/recording-oracle/src/modules/web3/web3.service.spec.ts b/packages/apps/fortune/recording-oracle/src/modules/web3/web3.service.spec.ts index 099cea8ede..72047ba267 100644 --- a/packages/apps/fortune/recording-oracle/src/modules/web3/web3.service.spec.ts +++ b/packages/apps/fortune/recording-oracle/src/modules/web3/web3.service.spec.ts @@ -30,7 +30,6 @@ describe('Web3Service', () => { const signer = web3Service.getSigner(network.chainId); expect(signer).toBeDefined(); - expect((signer.provider as any).connection.url).toBe(network.rpcUrl); } }); diff --git a/packages/apps/fortune/recording-oracle/src/modules/web3/web3.service.ts b/packages/apps/fortune/recording-oracle/src/modules/web3/web3.service.ts index abb789c2e2..70b97fe0c6 100644 --- a/packages/apps/fortune/recording-oracle/src/modules/web3/web3.service.ts +++ b/packages/apps/fortune/recording-oracle/src/modules/web3/web3.service.ts @@ -1,5 +1,5 @@ import { Inject, Injectable } from '@nestjs/common'; -import { Wallet, providers } from 'ethers'; +import { Wallet, ethers } from 'ethers'; import { Web3ConfigType, web3ConfigKey } from '../../common/config'; import { networkMap } from '../../common/constants/networks'; @@ -15,7 +15,7 @@ export class Web3Service { for (const networkKey of Object.keys(networkMap)) { const network = networkMap[networkKey]; - const provider = new providers.JsonRpcProvider(network.rpcUrl); + const provider = new ethers.JsonRpcProvider(network.rpcUrl); this.signers[network.chainId] = new Wallet(privateKey, provider); } } diff --git a/packages/apps/hufi/exchange-oracle/server/package.json b/packages/apps/hufi/exchange-oracle/server/package.json index 3d7a1bf121..6479cb7c4d 100644 --- a/packages/apps/hufi/exchange-oracle/server/package.json +++ b/packages/apps/hufi/exchange-oracle/server/package.json @@ -26,7 +26,6 @@ "@nestjs/common": "^10.2.7", "@nestjs/core": "^10.2.8", "@nestjs/platform-express": "^10.2.6", - "ethers": "^5.7.2", "joi": "^17.9.2", "reflect-metadata": "^0.1.13", "rxjs": "^7.2.0" diff --git a/packages/apps/hufi/exchange-oracle/server/src/common/utils/signature.ts b/packages/apps/hufi/exchange-oracle/server/src/common/utils/signature.ts index 9741950d9e..20cc25b726 100644 --- a/packages/apps/hufi/exchange-oracle/server/src/common/utils/signature.ts +++ b/packages/apps/hufi/exchange-oracle/server/src/common/utils/signature.ts @@ -40,7 +40,7 @@ export function recoverSigner( } try { - return ethers.utils.verifyMessage(message, signature); + return ethers.verifyMessage(message, signature); } catch (e) { throw new ConflictException('Invalid signature'); } diff --git a/packages/apps/hufi/exchange-oracle/server/src/common/validators/ethers.ts b/packages/apps/hufi/exchange-oracle/server/src/common/validators/ethers.ts index 982b4aa3ba..55bc380197 100644 --- a/packages/apps/hufi/exchange-oracle/server/src/common/validators/ethers.ts +++ b/packages/apps/hufi/exchange-oracle/server/src/common/validators/ethers.ts @@ -11,7 +11,7 @@ import { ethers } from 'ethers'; @Injectable() class ValidateEthereumAddress implements ValidatorConstraintInterface { public validate(value: string): boolean { - return ethers.utils.isAddress(value); + return ethers.isAddress(value); } public defaultMessage(): string { diff --git a/packages/apps/hufi/exchange-oracle/server/src/modules/web3/web3.service.spec.ts b/packages/apps/hufi/exchange-oracle/server/src/modules/web3/web3.service.spec.ts index 2a5e5011ce..bb8aaa99bf 100644 --- a/packages/apps/hufi/exchange-oracle/server/src/modules/web3/web3.service.spec.ts +++ b/packages/apps/hufi/exchange-oracle/server/src/modules/web3/web3.service.spec.ts @@ -34,7 +34,6 @@ describe('Web3Service', () => { const signer = web3Service.getSigner(network.chainId); expect(signer).toBeDefined(); - expect((signer.provider as any).connection.url).toBe(network.rpcUrl); } }); diff --git a/packages/apps/hufi/exchange-oracle/server/src/modules/web3/web3.service.ts b/packages/apps/hufi/exchange-oracle/server/src/modules/web3/web3.service.ts index 5d55ab38b8..d931380f52 100644 --- a/packages/apps/hufi/exchange-oracle/server/src/modules/web3/web3.service.ts +++ b/packages/apps/hufi/exchange-oracle/server/src/modules/web3/web3.service.ts @@ -1,6 +1,6 @@ import { BadRequestException, Injectable, Logger } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { Wallet, providers } from 'ethers'; +import { Wallet, ethers } from 'ethers'; import { ConfigNames, networks } from '../../common/config'; import { ChainId } from '@human-protocol/sdk'; import { MAINNET_CHAIN_IDS, TESTNET_CHAIN_IDS } from '../../common/constant'; @@ -20,7 +20,7 @@ export class Web3Service { validChains.includes(network.chainId), ); for (const network of validNetworks) { - const provider = new providers.JsonRpcProvider(network.rpcUrl); + const provider = new ethers.JsonRpcProvider(network.rpcUrl); this.signers[network.chainId] = new Wallet(privateKey, provider); } this.signerAddress = this.signers[validChains[0]].address; diff --git a/packages/apps/hufi/job-launcher/server/package.json b/packages/apps/hufi/job-launcher/server/package.json index 0649a7439d..668c97e26d 100644 --- a/packages/apps/hufi/job-launcher/server/package.json +++ b/packages/apps/hufi/job-launcher/server/package.json @@ -49,7 +49,6 @@ "class-transformer": "^0.5.1", "cookie-parser": "^1.4.6", "decimal.js": "^10.4.3", - "ethers": "^5.7.2", "express-session": "^1.17.3", "joi": "^17.9.2", "nestjs-minio-client": "^2.2.0", diff --git a/packages/apps/hufi/job-launcher/server/src/common/utils/signature.ts b/packages/apps/hufi/job-launcher/server/src/common/utils/signature.ts index e1bf475a57..c619886dcb 100644 --- a/packages/apps/hufi/job-launcher/server/src/common/utils/signature.ts +++ b/packages/apps/hufi/job-launcher/server/src/common/utils/signature.ts @@ -41,7 +41,7 @@ export function recoverSigner( } try { - return ethers.utils.verifyMessage(message, signature); + return ethers.verifyMessage(message, signature); } catch (e) { throw new ConflictException(ErrorSignature.InvalidSignature); } diff --git a/packages/apps/hufi/job-launcher/server/src/modules/job/job.dto.ts b/packages/apps/hufi/job-launcher/server/src/modules/job/job.dto.ts index 3e5bfb3957..93dfa306f8 100644 --- a/packages/apps/hufi/job-launcher/server/src/modules/job/job.dto.ts +++ b/packages/apps/hufi/job-launcher/server/src/modules/job/job.dto.ts @@ -16,7 +16,6 @@ import { import { ChainId } from '@human-protocol/sdk'; import { JobRequestType, JobStatus } from '../../common/enums/job'; import { EventType } from '../../common/enums/webhook'; -import { BigNumber } from 'ethers'; import { Exchange } from '../../common/enums/exchange'; export class JobCreateDto { @@ -303,7 +302,7 @@ export class EscrowFailedWebhookDto { export class EscrowCancelDto { txHash: string; - amountRefunded: BigNumber; + amountRefunded: bigint; } export class CampaignFinalResultDto { @@ -315,4 +314,4 @@ export class CampaignFinalResultDto { @IsString() liquidityScore: string; -} \ No newline at end of file +} diff --git a/packages/apps/hufi/job-launcher/server/src/modules/job/job.service.spec.ts b/packages/apps/hufi/job-launcher/server/src/modules/job/job.service.spec.ts index af1ea57cce..3d0d57567c 100644 --- a/packages/apps/hufi/job-launcher/server/src/modules/job/job.service.spec.ts +++ b/packages/apps/hufi/job-launcher/server/src/modules/job/job.service.spec.ts @@ -60,7 +60,7 @@ import { MOCK_USER_ID, } from '../../../test/constants'; import { PaymentService } from '../payment/payment.service'; -import { Web3Service } from '../web3/web3.service'; +import { Web3Service } from '../web3/Web3Service'; import { FortuneFinalResultDto, FortuneManifestDto, @@ -1477,7 +1477,7 @@ describe('JobService', () => { describe('getPaidOutAmount', () => { it('should calculate the paid out amount', async () => { const chainId = ChainId.LOCALHOST; - const amount = ethers.utils.parseEther('1.5'); + const amount = ethers.parseEther('1.5'); const mockLogs = [ { data: 'mockData', diff --git a/packages/apps/hufi/job-launcher/server/src/modules/job/job.service.ts b/packages/apps/hufi/job-launcher/server/src/modules/job/job.service.ts index ab335f822d..4f7dd8e124 100644 --- a/packages/apps/hufi/job-launcher/server/src/modules/job/job.service.ts +++ b/packages/apps/hufi/job-launcher/server/src/modules/job/job.service.ts @@ -24,7 +24,7 @@ import { } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { validate } from 'class-validator'; -import { BigNumber, ethers } from 'ethers'; +import { ethers } from 'ethers'; import { firstValueFrom } from 'rxjs'; import { LessThanOrEqual, QueryFailedError } from 'typeorm'; import { ConfigNames } from '../../common/config'; @@ -51,7 +51,7 @@ import { getRate } from '../../common/utils'; import { add, div, lt, mul } from '../../common/utils/decimal'; import { PaymentRepository } from '../payment/payment.repository'; import { PaymentService } from '../payment/payment.service'; -import { Web3Service } from '../web3/web3.service'; +import { Web3Service } from '../web3/Web3Service'; import { CampaignFinalResultDto, CampaignManifestDto, @@ -213,13 +213,13 @@ export class JobService { exchangeOracle: this.configService.get( ConfigNames.EXCHANGE_ORACLE_ADDRESS, )!, - recordingOracleFee: BigNumber.from( + recordingOracleFee: BigInt( this.configService.get(ConfigNames.RECORDING_ORACLE_FEE)!, ), - reputationOracleFee: BigNumber.from( + reputationOracleFee: BigInt( this.configService.get(ConfigNames.REPUTATION_ORACLE_FEE)!, ), - exchangeOracleFee: BigNumber.from( + exchangeOracleFee: BigInt( this.configService.get(ConfigNames.EXCHANGE_ORACLE_FEE)!, ), manifestUrl: jobEntity.manifestUrl, @@ -249,7 +249,7 @@ export class JobService { const escrowClient = await EscrowClient.build(signer); - const weiAmount = ethers.utils.parseUnits( + const weiAmount = ethers.parseUnits( jobEntity.fundAmount.toString(), 'ether', ); @@ -388,7 +388,7 @@ export class JobService { limit, ); const escrowAddresses = escrows.map((escrow) => - ethers.utils.getAddress(escrow.address), + ethers.getAddress(escrow.address), ); jobs = await this.jobRepository.findJobsByEscrowAddresses( @@ -570,11 +570,10 @@ export class JobService { if (!jobEntity) return; if (jobEntity.escrowAddress) { - const { amountRefunded } = await this.processEscrowCancellation( - jobEntity, - ); + const { amountRefunded } = + await this.processEscrowCancellation(jobEntity); await this.paymentService.createRefundPayment({ - refundAmount: Number(ethers.utils.formatEther(amountRefunded)), + refundAmount: Number(ethers.formatEther(amountRefunded)), userId: jobEntity.userId, jobId: jobEntity.id, }); @@ -620,7 +619,7 @@ export class JobService { } const balance = await escrowClient.getBalance(escrowAddress); - if (balance.eq(0)) { + if (balance === 0n) { this.logger.log(ErrorEscrow.InvalidBalanceCancellation, JobService.name); throw new BadRequestException(ErrorEscrow.InvalidBalanceCancellation); } @@ -691,7 +690,7 @@ export class JobService { const baseManifestDetails = { chainId, - tokenAddress: escrow ? escrow.token : ethers.constants.AddressZero, + tokenAddress: escrow ? escrow.token : ethers.ZeroAddress, fundAmount: escrow ? Number(escrow.totalFundedAmount) : 0, requesterAddress: signer.address, exchangeOracleAddress: escrow?.exchangeOracle, @@ -707,7 +706,7 @@ export class JobService { if (!escrowAddress) { return { details: { - escrowAddress: ethers.constants.AddressZero, + escrowAddress: ethers.ZeroAddress, manifestUrl, manifestHash, balance: 0, @@ -716,7 +715,7 @@ export class JobService { }, manifest: manifestDetails, staking: { - staker: ethers.constants.AddressZero, + staker: ethers.ZeroAddress, allocated: 0, slashed: 0, }, @@ -728,14 +727,14 @@ export class JobService { escrowAddress, manifestUrl, manifestHash, - balance: Number(ethers.utils.formatEther(escrow?.balance || 0)), + balance: Number(ethers.formatEther(escrow?.balance || 0)), paidOut: Number(escrow?.amountPaid || 0), status, }, manifest: manifestDetails, staking: { staker: allocation?.staker as string, - allocated: allocation?.tokens.toNumber() as number, + allocated: Number(allocation?.tokens), slashed: 0, // TODO: Retrieve slash tokens }, }; @@ -750,12 +749,12 @@ export class JobService { const signer = this.web3Service.getSigner(chainId); const filter = { address: tokenAddress, - topics: [ethers.utils.id('Transfer(address,address,uint256)')], + topics: [ethers.id('Transfer(address,address,uint256)')], fromBlock: fromBlock, toBlock: toBlock, }; - return signer.provider.getLogs(filter); + return signer.provider?.getLogs(filter); } public async getPaidOutAmount( @@ -772,13 +771,16 @@ export class JobService { const logs = await this.getTransferLogs(chainId, tokenAddress, 0, 'latest'); let paidOutAmount = new Decimal(0); - logs.forEach((log) => { - const parsedLog = tokenContract.interface.parseLog(log); - const from = parsedLog.args[0]; - const amount = parsedLog.args[2]; + logs?.forEach((log) => { + const parsedLog = tokenContract.interface.parseLog({ + topics: log.topics as string[], + data: log.data, + }); + const from = parsedLog?.args[0]; + const amount = parsedLog?.args[2]; if (from === escrowAddress) { - paidOutAmount = paidOutAmount.add(ethers.utils.formatEther(amount)); + paidOutAmount = paidOutAmount.add(ethers.formatEther(amount)); } }); diff --git a/packages/apps/hufi/job-launcher/server/src/modules/payment/payment.service.spec.ts b/packages/apps/hufi/job-launcher/server/src/modules/payment/payment.service.spec.ts index 260447a419..14ede8d24d 100644 --- a/packages/apps/hufi/job-launcher/server/src/modules/payment/payment.service.spec.ts +++ b/packages/apps/hufi/job-launcher/server/src/modules/payment/payment.service.spec.ts @@ -6,7 +6,11 @@ import { PaymentRepository } from './payment.repository'; import { ConfigService } from '@nestjs/config'; import { HttpService } from '@nestjs/axios'; import { createMock } from '@golevelup/ts-jest'; -import { ErrorPayment, ErrorPostgres, ErrorSignature } from '../../common/constants/errors'; +import { + ErrorPayment, + ErrorPostgres, + ErrorSignature, +} from '../../common/constants/errors'; import { TransactionReceipt } from '@ethersproject/abstract-provider'; import { Currency, @@ -23,7 +27,7 @@ import { MOCK_SIGNATURE, MOCK_TRANSACTION_HASH, } from '../../../test/constants'; -import { Web3Service } from '../web3/web3.service'; +import { Web3Service } from '../web3/Web3Service'; import { HMToken__factory } from '@human-protocol/core/typechain-types'; import { ChainId, NETWORKS } from '@human-protocol/sdk'; import { PaymentEntity } from './payment.entity'; @@ -666,9 +670,13 @@ describe('PaymentService', () => { }; it('should successfully create a refund payment', async () => { - jest.spyOn(paymentRepository, 'create').mockResolvedValueOnce(undefined as any); + jest + .spyOn(paymentRepository, 'create') + .mockResolvedValueOnce(undefined as any); - await expect(paymentService.createRefundPayment(mockPaymentRefundCreateDto)).resolves.not.toThrow(); + await expect( + paymentService.createRefundPayment(mockPaymentRefundCreateDto), + ).resolves.not.toThrow(); }); it('should throw IncorrectAmount error when overflow occurs', async () => { @@ -676,13 +684,19 @@ describe('PaymentService', () => { mockError.message = ErrorPostgres.NumericFieldOverflow.toLowerCase(); jest.spyOn(paymentRepository, 'create').mockRejectedValueOnce(mockError); - await expect(paymentService.createRefundPayment(mockPaymentRefundCreateDto)).rejects.toThrow(ConflictException); + await expect( + paymentService.createRefundPayment(mockPaymentRefundCreateDto), + ).rejects.toThrow(ConflictException); }); it('should throw NotSuccess error on other database errors', async () => { - jest.spyOn(paymentRepository, 'create').mockRejectedValueOnce(new Error()); + jest + .spyOn(paymentRepository, 'create') + .mockRejectedValueOnce(new Error()); - await expect(paymentService.createRefundPayment(mockPaymentRefundCreateDto)).rejects.toThrow(ConflictException); + await expect( + paymentService.createRefundPayment(mockPaymentRefundCreateDto), + ).rejects.toThrow(ConflictException); }); }); }); diff --git a/packages/apps/hufi/job-launcher/server/src/modules/payment/payment.service.ts b/packages/apps/hufi/job-launcher/server/src/modules/payment/payment.service.ts index 87657d31c8..3e0d58eec4 100644 --- a/packages/apps/hufi/job-launcher/server/src/modules/payment/payment.service.ts +++ b/packages/apps/hufi/job-launcher/server/src/modules/payment/payment.service.ts @@ -7,7 +7,7 @@ import { } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import Stripe from 'stripe'; -import { ethers, providers } from 'ethers'; +import { ethers } from 'ethers'; import { ErrorPayment, ErrorPostgres } from '../../common/constants/errors'; import { PaymentRepository } from './payment.repository'; import { @@ -30,7 +30,7 @@ import { HMToken, HMToken__factory, } from '@human-protocol/core/typechain-types'; -import { Web3Service } from '../web3/web3.service'; +import { Web3Service } from '../web3/Web3Service'; import { CoingeckoTokenId } from '../../common/constants/payment'; import { getRate } from '../../common/utils'; import { add, div, mul } from '../../common/utils/decimal'; @@ -170,7 +170,7 @@ export class PaymentService { const network = Object.values(networkMap).find( (item) => item.chainId === dto.chainId, ); - const provider = new providers.JsonRpcProvider(network?.rpcUrl); + const provider = new ethers.JsonRpcProvider(network?.rpcUrl); const transaction = await provider.getTransactionReceipt( dto.transactionHash, @@ -188,7 +188,7 @@ export class PaymentService { throw new NotFoundException(ErrorPayment.InvalidTransactionData); } - if (transaction.confirmations < TX_CONFIRMATION_TRESHOLD) { + if ((await transaction.confirmations()) < TX_CONFIRMATION_TRESHOLD) { this.logger.error( `Transaction has ${transaction.confirmations} confirmations instead of ${TX_CONFIRMATION_TRESHOLD}`, ); @@ -200,15 +200,14 @@ export class PaymentService { const signer = this.web3Service.getSigner(dto.chainId); const recipientAddress = transaction.logs[0].topics.some( - (topic) => - ethers.utils.hexValue(topic) === ethers.utils.hexValue(signer.address), + (topic) => ethers.hexlify(topic) === ethers.hexlify(signer.address), ); if (!recipientAddress) { this.logger.error(ErrorPayment.InvalidRecipient); throw new ConflictException(ErrorPayment.InvalidRecipient); } - const amount = Number(ethers.utils.formatEther(transaction.logs[0].data)); + const amount = Number(ethers.formatEther(transaction.logs[0].data)); const tokenAddress = transaction.logs[0].address; const tokenContract: HMToken = HMToken__factory.connect( @@ -226,7 +225,7 @@ export class PaymentService { } const paymentEntity = await this.paymentRepository.findOne({ - transaction: transaction.transactionHash, + transaction: transaction.hash, chainId: dto.chainId, }); @@ -272,24 +271,30 @@ export class PaymentService { const rate = await getRate(TokenId.HMT, Currency.USD); try { - await this.paymentRepository.create({ - userId: dto.userId, - jobId: dto.jobId, - source: PaymentSource.BALANCE, - type: PaymentType.REFUND, - amount: dto.refundAmount, - currency: TokenId.HMT, - rate, - status: PaymentStatus.SUCCEEDED, - }); + await this.paymentRepository.create({ + userId: dto.userId, + jobId: dto.jobId, + source: PaymentSource.BALANCE, + type: PaymentType.REFUND, + amount: dto.refundAmount, + currency: TokenId.HMT, + rate, + status: PaymentStatus.SUCCEEDED, + }); } catch (error) { - if (error instanceof QueryFailedError && error.message.includes(ErrorPostgres.NumericFieldOverflow.toLowerCase())) { - this.logger.log(ErrorPostgres.NumericFieldOverflow, PaymentService.name); - throw new ConflictException(ErrorPayment.IncorrectAmount); - } else { - this.logger.log(error, PaymentService.name); - throw new ConflictException(ErrorPayment.NotSuccess); - } + if ( + error instanceof QueryFailedError && + error.message.includes(ErrorPostgres.NumericFieldOverflow.toLowerCase()) + ) { + this.logger.log( + ErrorPostgres.NumericFieldOverflow, + PaymentService.name, + ); + throw new ConflictException(ErrorPayment.IncorrectAmount); + } else { + this.logger.log(error, PaymentService.name); + throw new ConflictException(ErrorPayment.NotSuccess); + } } } } diff --git a/packages/apps/hufi/job-launcher/server/src/modules/web3/Web3Service.ts b/packages/apps/hufi/job-launcher/server/src/modules/web3/Web3Service.ts new file mode 100644 index 0000000000..c76962ec48 --- /dev/null +++ b/packages/apps/hufi/job-launcher/server/src/modules/web3/Web3Service.ts @@ -0,0 +1,57 @@ +import { BadRequestException, Injectable, Logger } from '@nestjs/common'; +import { ConfigService } from '@nestjs/config'; +import { Wallet, ethers } from 'ethers'; +import { ConfigNames, networks } from '../../common/config'; +import { Web3Env } from '../../common/enums/web3'; +import { MAINNET_CHAIN_IDS, TESTNET_CHAIN_IDS } from '../../common/constants'; +import { ErrorWeb3 } from '../../common/constants/errors'; +import { ChainId } from '@human-protocol/sdk'; + +@Injectable() +export class Web3Service { + private signers: { [key: number]: Wallet } = {}; + public readonly logger = new Logger(Web3Service.name); + public readonly signerAddress: string; + + constructor(private readonly configService: ConfigService) { + const privateKey = this.configService.get(ConfigNames.WEB3_PRIVATE_KEY); + const validChains = this.getValidChains(); + const validNetworks = networks.filter((network) => + validChains.includes(network.chainId), + ); + for (const network of validNetworks) { + const provider = new ethers.JsonRpcProvider(network.rpcUrl); + this.signers[network.chainId] = new Wallet(privateKey, provider); + } + this.signerAddress = this.signers[validChains[0]].address; + } + + public getSigner(chainId: number): Wallet { + this.validateChainId(chainId); + return this.signers[chainId]; + } + + public validateChainId(chainId: number): void { + const currentWeb3Env = this.configService.get(ConfigNames.WEB3_ENV); + const validChainIds = this.getValidChains(); + + if (!validChainIds.includes(chainId)) { + const errorType = + currentWeb3Env === Web3Env.MAINNET + ? ErrorWeb3.InvalidMainnetChainId + : ErrorWeb3.InvalidTestnetChainId; + this.logger.log(errorType, Web3Service.name); + throw new BadRequestException(errorType); + } + } + + public getValidChains(): ChainId[] { + const currentWeb3Env = this.configService.get(ConfigNames.WEB3_ENV); + const validChainIds = + currentWeb3Env === Web3Env.MAINNET + ? MAINNET_CHAIN_IDS + : TESTNET_CHAIN_IDS; + + return validChainIds; + } +} diff --git a/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.controller.ts b/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.controller.ts index a03027c364..58c2d116e3 100644 --- a/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.controller.ts +++ b/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.controller.ts @@ -1,7 +1,7 @@ import { Controller, Get } from '@nestjs/common'; import { Public } from '../../common/decorators'; import { ApiTags } from '@nestjs/swagger'; -import { Web3Service } from './web3.service'; +import { Web3Service } from './Web3Service'; import { ChainId } from '@human-protocol/sdk'; @ApiTags('Web3') diff --git a/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.module.ts b/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.module.ts index acd61d7ac6..1cb936f905 100644 --- a/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.module.ts +++ b/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.module.ts @@ -1,5 +1,5 @@ import { Logger, Module } from '@nestjs/common'; -import { Web3Service } from './web3.service'; +import { Web3Service } from './Web3Service'; import { ConfigModule } from '@nestjs/config'; import { Web3Controller } from './web3.controller'; diff --git a/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.service.spec.ts b/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.service.spec.ts index 26aecc09ce..af1e57ef82 100644 --- a/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.service.spec.ts +++ b/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.service.spec.ts @@ -4,7 +4,7 @@ import { Test } from '@nestjs/testing'; import { MAINNET_CHAIN_IDS, TESTNET_CHAIN_IDS } from '../../common/constants'; import { ErrorWeb3 } from '../../common/constants/errors'; import { Web3Env } from '../../common/enums/web3'; -import { Web3Service } from './web3.service'; +import { Web3Service } from './Web3Service'; describe('Web3Service', () => { let mockConfigService: Partial; diff --git a/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.service.ts b/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.service.ts index 1a612d52bb..c76962ec48 100644 --- a/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.service.ts +++ b/packages/apps/hufi/job-launcher/server/src/modules/web3/web3.service.ts @@ -1,6 +1,6 @@ import { BadRequestException, Injectable, Logger } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { Wallet, providers } from 'ethers'; +import { Wallet, ethers } from 'ethers'; import { ConfigNames, networks } from '../../common/config'; import { Web3Env } from '../../common/enums/web3'; import { MAINNET_CHAIN_IDS, TESTNET_CHAIN_IDS } from '../../common/constants'; @@ -20,7 +20,7 @@ export class Web3Service { validChains.includes(network.chainId), ); for (const network of validNetworks) { - const provider = new providers.JsonRpcProvider(network.rpcUrl); + const provider = new ethers.JsonRpcProvider(network.rpcUrl); this.signers[network.chainId] = new Wallet(privateKey, provider); } this.signerAddress = this.signers[validChains[0]].address; diff --git a/packages/apps/hufi/job-launcher/server/tsconfig.json b/packages/apps/hufi/job-launcher/server/tsconfig.json index 7252f8ae99..fb6e941176 100644 --- a/packages/apps/hufi/job-launcher/server/tsconfig.json +++ b/packages/apps/hufi/job-launcher/server/tsconfig.json @@ -7,7 +7,7 @@ "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "allowJs": true, - "target": "es2017", + "target": "ES2020", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", @@ -18,6 +18,6 @@ "strictBindCallApply": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, - "esModuleInterop": true, + "esModuleInterop": true } } diff --git a/packages/apps/hufi/recording-oracle/package.json b/packages/apps/hufi/recording-oracle/package.json index 864be86bbb..73a7edeebb 100644 --- a/packages/apps/hufi/recording-oracle/package.json +++ b/packages/apps/hufi/recording-oracle/package.json @@ -34,7 +34,6 @@ "body-parser": "^1.20.2", "class-validator": "^0.14.0", "cookie-parser": "^1.4.6", - "ethers": "^5.7.2", "graphql-request": "^6.1.0", "helmet": "^7.1.0", "reflect-metadata": "^0.1.13" diff --git a/packages/apps/hufi/recording-oracle/src/common/utils/signature.ts b/packages/apps/hufi/recording-oracle/src/common/utils/signature.ts index 9741950d9e..20cc25b726 100644 --- a/packages/apps/hufi/recording-oracle/src/common/utils/signature.ts +++ b/packages/apps/hufi/recording-oracle/src/common/utils/signature.ts @@ -40,7 +40,7 @@ export function recoverSigner( } try { - return ethers.utils.verifyMessage(message, signature); + return ethers.verifyMessage(message, signature); } catch (e) { throw new ConflictException('Invalid signature'); } diff --git a/packages/apps/hufi/recording-oracle/src/common/validators/ethers.ts b/packages/apps/hufi/recording-oracle/src/common/validators/ethers.ts index 982b4aa3ba..55bc380197 100644 --- a/packages/apps/hufi/recording-oracle/src/common/validators/ethers.ts +++ b/packages/apps/hufi/recording-oracle/src/common/validators/ethers.ts @@ -11,7 +11,7 @@ import { ethers } from 'ethers'; @Injectable() class ValidateEthereumAddress implements ValidatorConstraintInterface { public validate(value: string): boolean { - return ethers.utils.isAddress(value); + return ethers.isAddress(value); } public defaultMessage(): string { diff --git a/packages/apps/hufi/recording-oracle/src/modules/liquidity/liquidity.service.ts b/packages/apps/hufi/recording-oracle/src/modules/liquidity/liquidity.service.ts index 4c8e0e49c2..90552ad865 100644 --- a/packages/apps/hufi/recording-oracle/src/modules/liquidity/liquidity.service.ts +++ b/packages/apps/hufi/recording-oracle/src/modules/liquidity/liquidity.service.ts @@ -12,7 +12,7 @@ import { Logger, NotFoundException, } from '@nestjs/common'; -import { BigNumber, ethers } from 'ethers'; +import { ethers } from 'ethers'; import * as Minio from 'minio'; import { @@ -36,7 +36,7 @@ import { ConfigService } from '@nestjs/config'; import { signMessage } from '../../common/utils/signature'; import { HEADER_SIGNATURE_KEY } from '../../common/constants'; import { GraphQLClient, gql } from 'graphql-request'; -import crypto from "crypto"; +import crypto from 'crypto'; import { CEX, DEX } from '../../common/constants/exchange'; @Injectable() @@ -121,7 +121,7 @@ export class LiquidityService { await this.httpService.post(url, body, { headers: { [HEADER_SIGNATURE_KEY]: signedBody }, }); - } + } public async getLiquidityScore( liquidityRequest: liquidityRequestDto, @@ -191,16 +191,16 @@ export class LiquidityService { await escrowClient.getRecordingOracleAddress( liquidityRequest.escrowAddress, ); - + if ( - ethers.utils.getAddress(recordingOracleAddress) !== + ethers.getAddress(recordingOracleAddress) !== (await signer.getAddress()) ) { this.logger.log(ErrorJob.AddressMismatches, LiquidityService.name); throw new BadRequestException(ErrorJob.AddressMismatches); } - let [exchange, chain] = manifest.exchangeName.split('-'); + const [exchange, chain] = manifest.exchangeName.split('-'); const variables = { user: liquidityRequest.liquidityProvider, startTime: manifest.startBlock, @@ -211,9 +211,11 @@ export class LiquidityService { chain, }; - if (CEX.includes(manifest.exchangeName)) - { - if (!liquidityRequest.liquidityProviderAPISecret || !liquidityRequest.liquidityProviderAPIKEY) { + if (CEX.includes(manifest.exchangeName)) { + if ( + !liquidityRequest.liquidityProviderAPISecret || + !liquidityRequest.liquidityProviderAPIKEY + ) { throw new Error('Empty API keys'); } const queryString = `symbol=${manifest.tokenA}${ @@ -255,12 +257,14 @@ export class LiquidityService { } return liquidityScore; } - throw new Error('No data received from server'); - } - else { - const client = this.getGraphQLClient(variables.chain, variables.exchange); + throw new Error('No data received from server'); + } else { + const client = this.getGraphQLClient( + variables.chain, + variables.exchange, + ); const result: any = await client.request(UniswapQuery, variables); - let positionSnapshots = result?.positionSnapshots; + const positionSnapshots = result?.positionSnapshots; const filteredSnapshots = this.filterObjectsByInputTokenSymbol( positionSnapshots, @@ -287,7 +291,7 @@ export class LiquidityService { liquidityProvider: liquidityRequest.liquidityProvider, }; return response; - } + } } catch (error: any) { console.error(`Error in getLiquidityScore: ${error.message}`); throw error; @@ -295,7 +299,7 @@ export class LiquidityService { } public calculateLiquidityScore(snapshots: any[]): string { - let totalScore = BigNumber.from(0); + let totalScore = 0n; // Check for no snapshots if (snapshots.length === 0) { @@ -321,27 +325,25 @@ export class LiquidityService { * Calculate score for a single snapshot. * * @param snapshot - The liquidity snapshot. - * @returns The liquidity score as a BigNumber. + * @returns The liquidity score as a BigInt. */ - private calculateSingleSnapshotScore(snapshot: any): BigNumber { - const totalLiquidity = BigNumber.from( - snapshot.position.pool.totalLiquidity, - ); - const liquidityAmount = BigNumber.from(snapshot.position.liquidity); - const currentTime = BigNumber.from(Math.floor(Date.now() / 1000)); - const timeWithheld = currentTime.sub(snapshot.timestamp); + private calculateSingleSnapshotScore(snapshot: any): bigint { + const totalLiquidity = BigInt(snapshot.position.pool.totalLiquidity); + const liquidityAmount = BigInt(snapshot.position.liquidity); + const currentTime = BigInt(Math.floor(Date.now() / 1000)); + const timeWithheld = currentTime - snapshot.timestamp; - return liquidityAmount.mul(timeWithheld).div(totalLiquidity); + return (liquidityAmount * timeWithheld) / totalLiquidity; } /** * Calculate score for multiple snapshots. * * @param snapshots - Array of liquidity snapshots. - * @returns The cumulative liquidity score as a BigNumber. + * @returns The cumulative liquidity score as a bigint. */ - private calculateMultipleSnapshotsScore(snapshots: any[]): BigNumber { - let totalScore = BigNumber.from(0); + private calculateMultipleSnapshotsScore(snapshots: any[]): bigint { + let totalScore = 0n; for (let i = 1; i < snapshots.length; i++) { const snapshot = snapshots[i]; @@ -353,19 +355,15 @@ export class LiquidityService { continue; } - const totalLiquidity = BigNumber.from( - snapshot.position.pool.totalLiquidity, - ); - const liquidityAmount = BigNumber.from(snapshot.position.liquidity); - const timeWithheld = BigNumber.from(snapshot.timestamp).sub( - prevSnapshot.timestamp, - ); + const totalLiquidity = BigInt(snapshot.position.pool.totalLiquidity); + const liquidityAmount = BigInt(snapshot.position.liquidity); + const timeWithheld = BigInt(snapshot.timestamp) - prevSnapshot.timestamp; - const PRECISION = BigNumber.from((10 ** 3).toString()); // Let's try with a higher precision to keep more decimals + const PRECISION = BigInt((10 ** 3).toString()); // Let's try with a higher precision to keep more decimals - const adjustedLiquidity = liquidityAmount.mul(PRECISION); - const multipliedLiquidity = adjustedLiquidity.mul(timeWithheld); - const rawScore = multipliedLiquidity.div(totalLiquidity); + const adjustedLiquidity = liquidityAmount * PRECISION; + const multipliedLiquidity = adjustedLiquidity * timeWithheld; + const rawScore = multipliedLiquidity / totalLiquidity; const snapshotScore = rawScore; console.log(snapshot); // Log all steps to find out what's going wrong @@ -379,28 +377,31 @@ export class LiquidityService { console.log('Liquidity Amount:', liquidityAmount.toString()); console.log('Time Withheld:', timeWithheld.toString()); - totalScore = totalScore.add(snapshotScore); + totalScore = totalScore + snapshotScore; console.log('total score', snapshotScore.toString()); } return totalScore; } - public calculateCentralizedLiquidityScore(orders: { cummulativeQuoteQty: number; time: number; updateTime: number; }[]): string { + public calculateCentralizedLiquidityScore( + orders: { cummulativeQuoteQty: number; time: number; updateTime: number }[], + ): string { if (orders.length === 0) { return '0'; } - + const totalScore = orders.reduce((acc, order) => { console.log('Order: ', order); const liquidityAmount = order.cummulativeQuoteQty; - const timeWithheld = order.time === order.updateTime ? 1 : order.updateTime - order.time; + const timeWithheld = + order.time === order.updateTime ? 1 : order.updateTime - order.time; const score = liquidityAmount * timeWithheld; acc += score; console.log('Total Score: ', acc); return acc; }, 0); - + return totalScore.toString(); } @@ -429,11 +430,16 @@ export class LiquidityService { const escrowClient = await EscrowClient.build(signer); let liquidities: liquidityDto[]; - const existingLiquiditiesURL: string = await escrowClient.getIntermediateResultsUrl(escrowAddress); + const existingLiquiditiesURL: string = + await escrowClient.getIntermediateResultsUrl(escrowAddress); if (existingLiquiditiesURL) { - liquidities = JSON.parse(await this.storageService.download(existingLiquiditiesURL)); + liquidities = JSON.parse( + await this.storageService.download(existingLiquiditiesURL), + ); if (liquidities) { - const exisitingLiquidity = liquidities.find((liq) => liq.liquidityProvider === liquidityProvider); + const exisitingLiquidity = liquidities.find( + (liq) => liq.liquidityProvider === liquidityProvider, + ); if (exisitingLiquidity) { exisitingLiquidity.liquidityScore = score; } else { @@ -446,15 +452,14 @@ export class LiquidityService { } else { throw new NotFoundException(ErrorJob.NotFoundIntermediateResults); } - } else { liquidities = [ { chainId, liquidityProvider, liquidityScore: score, - } - ] + }, + ]; } const saveLiquidityResult = await this.storageService.uploadLiquidities( @@ -462,7 +467,7 @@ export class LiquidityService { chainId, liquidities, ); - + if (!existingLiquiditiesURL) { await escrowClient.storeResults( escrowAddress, diff --git a/packages/apps/hufi/recording-oracle/src/modules/web3/web3.service.ts b/packages/apps/hufi/recording-oracle/src/modules/web3/web3.service.ts index abb789c2e2..70b97fe0c6 100644 --- a/packages/apps/hufi/recording-oracle/src/modules/web3/web3.service.ts +++ b/packages/apps/hufi/recording-oracle/src/modules/web3/web3.service.ts @@ -1,5 +1,5 @@ import { Inject, Injectable } from '@nestjs/common'; -import { Wallet, providers } from 'ethers'; +import { Wallet, ethers } from 'ethers'; import { Web3ConfigType, web3ConfigKey } from '../../common/config'; import { networkMap } from '../../common/constants/networks'; @@ -15,7 +15,7 @@ export class Web3Service { for (const networkKey of Object.keys(networkMap)) { const network = networkMap[networkKey]; - const provider = new providers.JsonRpcProvider(network.rpcUrl); + const provider = new ethers.JsonRpcProvider(network.rpcUrl); this.signers[network.chainId] = new Wallet(privateKey, provider); } } diff --git a/packages/apps/hufi/reputation-oracle/server/package.json b/packages/apps/hufi/reputation-oracle/server/package.json index 2f0cb17cc5..270e6bf9e9 100644 --- a/packages/apps/hufi/reputation-oracle/server/package.json +++ b/packages/apps/hufi/reputation-oracle/server/package.json @@ -31,48 +31,48 @@ "@human-protocol/core": "*", "@human-protocol/sdk": "*", "@nestjs/axios": "^2.0.0", - "@nestjs/jwt": "^10.2.0", "@nestjs/common": "^10.2.7", + "@nestjs/config": "^3.1.1", "@nestjs/core": "^10.2.8", + "@nestjs/jwt": "^10.2.0", + "@nestjs/passport": "^10.0.0", "@nestjs/platform-express": "^10.2.6", - "passport": "^0.6.0", - "@types/passport-jwt": "^3.0.10", - "passport-jwt": "^4.0.1", - "@nestjs/terminus": "^10.2.0", "@nestjs/schedule": "^3.0.1", - "typeorm-naming-strategies": "^4.1.0", - "zxcvbn": "^4.4.2", - "@nestjs/passport": "^10.0.0", - "@nestjs/typeorm": "^10.0.1", - "ethers": "^5.7.2", - "joi": "^17.9.2", - "reflect-metadata": "^0.1.13", - "rxjs": "^7.2.0", - "nestjs-minio-client": "^2.2.0", "@nestjs/swagger": "^7.1.13", - "class-transformer": "^0.5.1", + "@nestjs/terminus": "^10.2.0", + "@nestjs/typeorm": "^10.0.1", + "@types/passport-jwt": "^3.0.10", "bcrypt": "^5.1.1", - "@nestjs/config": "^3.1.1", - "express-session": "^1.17.3", + "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "cookie-parser": "^1.4.6", + "express-session": "^1.17.3", "helmet": "^7.1.0", + "joi": "^17.9.2", + "nestjs-minio-client": "^2.2.0", + "passport": "^0.6.0", + "passport-jwt": "^4.0.1", "pg": "8.11.0", - "typeorm": "^0.3.16" + "reflect-metadata": "^0.1.13", + "rxjs": "^7.2.0", + "typeorm": "^0.3.16", + "typeorm-naming-strategies": "^4.1.0", + "zxcvbn": "^4.4.2" }, "devDependencies": { "@golevelup/ts-jest": "^0.4.0", "@nestjs/cli": "^9.4.3", "@nestjs/schematics": "^9.2.0", "@nestjs/testing": "^9.4.3", + "@types/bcrypt": "^5.0.2", + "@types/cookie-parser": "^1.4.3", "@types/express": "^4.17.13", + "@types/express-session": "^1.17.10", "@types/jest": "29.5.1", "@types/node": "20.10.6", "@types/supertest": "^2.0.15", - "@types/zxcvbn": "4.4.1", - "@types/cookie-parser": "^1.4.3", - "@types/express-session": "^1.17.10", "@types/uuid": "^9.0.6", + "@types/zxcvbn": "4.4.1", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", "eslint": "^8.55.0", @@ -87,7 +87,6 @@ "ts-loader": "^9.2.3", "ts-node": "^10.9.2", "tsconfig-paths": "4.2.0", - "typescript": "^5.0.0", - "@types/bcrypt": "^5.0.2" + "typescript": "^5.0.0" } } diff --git a/packages/apps/hufi/reputation-oracle/server/src/common/utils/signature.ts b/packages/apps/hufi/reputation-oracle/server/src/common/utils/signature.ts index e1bf475a57..c619886dcb 100644 --- a/packages/apps/hufi/reputation-oracle/server/src/common/utils/signature.ts +++ b/packages/apps/hufi/reputation-oracle/server/src/common/utils/signature.ts @@ -41,7 +41,7 @@ export function recoverSigner( } try { - return ethers.utils.verifyMessage(message, signature); + return ethers.verifyMessage(message, signature); } catch (e) { throw new ConflictException(ErrorSignature.InvalidSignature); } diff --git a/packages/apps/hufi/reputation-oracle/server/src/modules/web3/web3.service.ts b/packages/apps/hufi/reputation-oracle/server/src/modules/web3/web3.service.ts index 8b981db854..be2b8857a7 100644 --- a/packages/apps/hufi/reputation-oracle/server/src/modules/web3/web3.service.ts +++ b/packages/apps/hufi/reputation-oracle/server/src/modules/web3/web3.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { Wallet, providers } from 'ethers'; +import { Wallet, ethers } from 'ethers'; import { ConfigNames, networkMap } from '../../common/config'; @Injectable() @@ -11,7 +11,7 @@ export class Web3Service { const privateKey = this.configService.get(ConfigNames.WEB3_PRIVATE_KEY); for (const networkKey of Object.keys(networkMap)) { const network = networkMap[networkKey]; - const provider = new providers.JsonRpcProvider(network.rpcUrl); + const provider = new ethers.JsonRpcProvider(network.rpcUrl); this.signers[network.chainId] = new Wallet(privateKey, provider); } } diff --git a/packages/apps/hufi/reputation-oracle/server/src/modules/webhook/webhook.service.ts b/packages/apps/hufi/reputation-oracle/server/src/modules/webhook/webhook.service.ts index b277b2899d..d8bf361b86 100644 --- a/packages/apps/hufi/reputation-oracle/server/src/modules/webhook/webhook.service.ts +++ b/packages/apps/hufi/reputation-oracle/server/src/modules/webhook/webhook.service.ts @@ -12,7 +12,6 @@ import { WebhookIncomingDto, liquidityDto } from './webhook.dto'; import { ErrorWebhook } from '../../common/constants/errors'; import { WebhookRepository } from './webhook.repository'; import { RETRIES_COUNT_THRESHOLD } from '../../common/constants'; -import { BigNumber } from 'ethers'; import { Web3Service } from '../web3/web3.service'; import { EventType, @@ -160,26 +159,26 @@ export class WebhookService { } public calculateCampaignPayoutAmounts( - totalAmount: BigNumber, + totalAmount: bigint, results: liquidityDto[], - ): BigNumber[] { - // Convert the liquidity scores to BigNumber for precision in calculations. + ): bigint[] { + // Convert the liquidity scores to bigint for precision in calculations. const bigNumberResults = results.map((result) => ({ ...result, - liquidityScore: BigNumber.from(result.liquidityScore), + liquidityScore: BigInt(result.liquidityScore), })); // Calculate the total liquidity score as a BigNumber. const totalLiquidityScore = bigNumberResults.reduce( - (total, item) => total.add(item.liquidityScore), - BigNumber.from(0), + (total, item) => total + item.liquidityScore, + 0n, ); // Map through each result, calculate each recipient's payout, and return the array. const payouts = bigNumberResults.map((result) => { const participantScore = result.liquidityScore; - const participantPercentage = participantScore.div(totalLiquidityScore); - return totalAmount.mul(participantPercentage); + const participantPercentage = participantScore / totalLiquidityScore; + return totalAmount * participantPercentage; }); return payouts; @@ -283,8 +282,8 @@ export class WebhookService { ReputationEntityType.REPUTATION_ORACLE, ); - const balance = BigNumber.from(escrow.balance); - if (balance.isZero()) { + const balance = BigInt(escrow.balance); + if (balance === 0n) { await escrowClient.complete(webhookEntity.escrowAddress); } await this.webhookRepository.updateOne( diff --git a/packages/apps/hufi/reputation-oracle/server/tsconfig.json b/packages/apps/hufi/reputation-oracle/server/tsconfig.json index 5393cfe8d6..fb6e941176 100644 --- a/packages/apps/hufi/reputation-oracle/server/tsconfig.json +++ b/packages/apps/hufi/reputation-oracle/server/tsconfig.json @@ -7,7 +7,7 @@ "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "allowJs": true, - "target": "es2017", + "target": "ES2020", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", diff --git a/packages/apps/job-launcher/server/package.json b/packages/apps/job-launcher/server/package.json index 1ffe0e368b..a2af88670b 100644 --- a/packages/apps/job-launcher/server/package.json +++ b/packages/apps/job-launcher/server/package.json @@ -49,7 +49,6 @@ "class-transformer": "^0.5.1", "cookie-parser": "^1.4.6", "decimal.js": "^10.4.3", - "ethers": "^5.7.2", "express-session": "^1.17.3", "joi": "^17.9.2", "json-stable-stringify": "^1.0.2", @@ -75,8 +74,8 @@ "@types/json-stable-stringify": "^1.0.36", "@types/node": "20.10.6", "@types/supertest": "^2.0.15", - "@types/zxcvbn": "4.4.1", "@types/xml2js": "0.4.13", + "@types/zxcvbn": "4.4.1", "@typescript-eslint/eslint-plugin": "^5.0.0", "@typescript-eslint/parser": "^5.0.0", "eslint": "^8.55.0", diff --git a/packages/apps/job-launcher/server/src/common/utils/signature.ts b/packages/apps/job-launcher/server/src/common/utils/signature.ts index e1bf475a57..c619886dcb 100644 --- a/packages/apps/job-launcher/server/src/common/utils/signature.ts +++ b/packages/apps/job-launcher/server/src/common/utils/signature.ts @@ -41,7 +41,7 @@ export function recoverSigner( } try { - return ethers.utils.verifyMessage(message, signature); + return ethers.verifyMessage(message, signature); } catch (e) { throw new ConflictException(ErrorSignature.InvalidSignature); } diff --git a/packages/apps/job-launcher/server/src/modules/job/job.dto.ts b/packages/apps/job-launcher/server/src/modules/job/job.dto.ts index 64881853f3..b70ce7f442 100644 --- a/packages/apps/job-launcher/server/src/modules/job/job.dto.ts +++ b/packages/apps/job-launcher/server/src/modules/job/job.dto.ts @@ -32,7 +32,6 @@ import { WorkerLocation, } from '../../common/enums/job'; import { EventType } from '../../common/enums/webhook'; -import { BigNumber } from 'ethers'; import { AWSRegions, StorageProviders } from '../../common/enums/storage'; export class JobCreateDto { @ApiProperty({ enum: ChainId }) @@ -505,7 +504,7 @@ export class EscrowCancelDto { public txHash: string; @ApiProperty() - public amountRefunded: BigNumber; + public amountRefunded: bigint; } export class JobCaptchaAdvancedDto { diff --git a/packages/apps/job-launcher/server/src/modules/job/job.service.spec.ts b/packages/apps/job-launcher/server/src/modules/job/job.service.spec.ts index 4e90495ea8..cf8435dee0 100644 --- a/packages/apps/job-launcher/server/src/modules/job/job.service.spec.ts +++ b/packages/apps/job-launcher/server/src/modules/job/job.service.spec.ts @@ -98,7 +98,7 @@ import { div, mul } from '../../common/utils/decimal'; import { PaymentRepository } from '../payment/payment.repository'; import { RoutingProtocolService } from './routing-protocol.service'; import { EventType } from '../../common/enums/webhook'; -import { BigNumber, ethers } from 'ethers'; +import { ethers } from 'ethers'; import { HMToken__factory } from '@human-protocol/core/typechain-types'; import { StorageService } from '../storage/storage.service'; import { @@ -290,9 +290,7 @@ describe('JobService', () => { storageService.download = jest.fn(); - web3Service.calculateGasPrice = jest - .fn() - .mockReturnValue(BigNumber.from(1000)); + web3Service.calculateGasPrice = jest.fn().mockReturnValue(1000n); }); describe('createJob', () => { @@ -1966,7 +1964,7 @@ describe('JobService', () => { jest.spyOn(jobService, 'processEscrowCancellation').mockResolvedValue({ txHash: MOCK_TRANSACTION_HASH, - amountRefunded: BigNumber.from(1), + amountRefunded: 1n, }); (EscrowClient.build as any).mockImplementation(() => ({ @@ -2098,7 +2096,7 @@ describe('JobService', () => { }; it('should cancel escrow', async () => { - const fundedAmount = BigNumber.from(1); + const fundedAmount = 1n; const escrowClientMock = { getStatus: jest.fn().mockResolvedValue(EscrowStatus.Launched), @@ -2155,7 +2153,7 @@ describe('JobService', () => { it('should throw bad request exception if escrow balance is zero', async () => { (EscrowClient.build as any).mockImplementation(() => ({ getStatus: jest.fn().mockResolvedValue(EscrowStatus.Launched), - getBalance: jest.fn().mockResolvedValue({ eq: () => true }), + getBalance: jest.fn().mockResolvedValue(0n), })); await expect( @@ -2442,11 +2440,11 @@ describe('JobService', () => { it('should return job details with escrow address successfully', async () => { const balance = '1'; const allocationMock: IAllocation = { - escrowAddress: ethers.constants.AddressZero, - staker: ethers.constants.AddressZero, - tokens: BigNumber.from('1'), - createdAt: BigNumber.from('1'), - closedAt: BigNumber.from('1'), + escrowAddress: ethers.ZeroAddress, + staker: ethers.ZeroAddress, + tokens: 1n, + createdAt: 1n, + closedAt: 1n, }; const manifestMock: FortuneManifestDto = { @@ -2543,7 +2541,7 @@ describe('JobService', () => { const expectedJobDetailsDto: JobDetailsDto = { details: { - escrowAddress: ethers.constants.AddressZero, + escrowAddress: ethers.ZeroAddress, manifestUrl: MOCK_FILE_URL, manifestHash: MOCK_FILE_HASH, balance: 0, @@ -2555,13 +2553,13 @@ describe('JobService', () => { title: MOCK_REQUESTER_TITLE, description: MOCK_REQUESTER_DESCRIPTION, submissionsRequired: expect.any(Number), - tokenAddress: ethers.constants.AddressZero, + tokenAddress: ethers.ZeroAddress, fundAmount: expect.any(Number), requesterAddress: MOCK_ADDRESS, requestType: JobRequestType.FORTUNE, - exchangeOracleAddress: ethers.constants.AddressZero, - recordingOracleAddress: ethers.constants.AddressZero, - reputationOracleAddress: ethers.constants.AddressZero, + exchangeOracleAddress: ethers.ZeroAddress, + recordingOracleAddress: ethers.ZeroAddress, + reputationOracleAddress: ethers.ZeroAddress, }, staking: { staker: expect.any(String), @@ -2600,7 +2598,7 @@ describe('JobService', () => { await jobService.getTransferLogs(chainId, MOCK_ADDRESS, 0, 'latest'); expect( - web3Service.getSigner(chainId).provider.getLogs, + web3Service.getSigner(chainId).provider?.getLogs, ).toHaveBeenCalled(); }); }); @@ -2608,7 +2606,7 @@ describe('JobService', () => { describe('getPaidOutAmount', () => { it('should calculate the paid out amount', async () => { const chainId = ChainId.LOCALHOST; - const amount = ethers.utils.parseEther('1.5'); + const amount = ethers.parseEther('1.5'); const mockLogs = [ { data: 'mockData', @@ -2671,8 +2669,8 @@ describe('JobService', () => { ChainId.LOCALHOST, ); - expect(result.toNumber()).toBe(MOCK_ORACLE_FEE); - expect(result).toBeInstanceOf(BigNumber); + expect(Number(result)).toBe(MOCK_ORACLE_FEE); + expect(typeof result).toBe('bigint'); }); }); }); diff --git a/packages/apps/job-launcher/server/src/modules/job/job.service.ts b/packages/apps/job-launcher/server/src/modules/job/job.service.ts index 7cf9b6fd9c..d19c9e63e3 100644 --- a/packages/apps/job-launcher/server/src/modules/job/job.service.ts +++ b/packages/apps/job-launcher/server/src/modules/job/job.service.ts @@ -23,7 +23,7 @@ import { } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { validate } from 'class-validator'; -import { BigNumber, ethers } from 'ethers'; +import { ethers } from 'ethers'; import { In, LessThanOrEqual, QueryFailedError } from 'typeorm'; import { ConfigNames } from '../../common/config'; import { @@ -543,8 +543,8 @@ export class JobService { ), ); - return ethers.utils.formatEther( - ethers.utils.parseUnits(fundAmount.toString(), 'ether').div(totalJobs), + return ethers.formatEther( + ethers.parseUnits(fundAmount.toString(), 'ether') / BigInt(totalJobs), ); } @@ -657,7 +657,7 @@ export class JobService { const escrowClient = await EscrowClient.build(signer); - const weiAmount = ethers.utils.parseUnits( + const weiAmount = ethers.parseUnits( jobEntity.fundAmount.toString(), 'ether', ); @@ -770,7 +770,7 @@ export class JobService { limit, ); const escrowAddresses = escrows.map((escrow) => - ethers.utils.getAddress(escrow.address), + ethers.getAddress(escrow.address), ); jobs = await this.jobRepository.findJobsByEscrowAddresses( @@ -1112,7 +1112,7 @@ export class JobService { const { amountRefunded } = await this.processEscrowCancellation(jobEntity); await this.paymentService.createRefundPayment({ - refundAmount: Number(ethers.utils.formatEther(amountRefunded)), + refundAmount: Number(ethers.formatEther(amountRefunded)), userId: jobEntity.userId, jobId: jobEntity.id, }); @@ -1206,7 +1206,7 @@ export class JobService { } const balance = await escrowClient.getBalance(escrowAddress); - if (balance.eq(0)) { + if (balance === 0n) { this.logger.log(ErrorEscrow.InvalidBalanceCancellation, JobService.name); throw new BadRequestException(ErrorEscrow.InvalidBalanceCancellation); } @@ -1299,15 +1299,12 @@ export class JobService { const baseManifestDetails = { chainId, - tokenAddress: escrow ? escrow.token : ethers.constants.AddressZero, + tokenAddress: escrow ? escrow.token : ethers.ZeroAddress, requesterAddress: signer.address, fundAmount: escrow ? Number(escrow.totalFundedAmount) : 0, - exchangeOracleAddress: - escrow?.exchangeOracle || ethers.constants.AddressZero, - recordingOracleAddress: - escrow?.recordingOracle || ethers.constants.AddressZero, - reputationOracleAddress: - escrow?.reputationOracle || ethers.constants.AddressZero, + exchangeOracleAddress: escrow?.exchangeOracle || ethers.ZeroAddress, + recordingOracleAddress: escrow?.recordingOracle || ethers.ZeroAddress, + reputationOracleAddress: escrow?.reputationOracle || ethers.ZeroAddress, }; let specificManifestDetails; @@ -1345,7 +1342,7 @@ export class JobService { if (!escrowAddress) { return { details: { - escrowAddress: ethers.constants.AddressZero, + escrowAddress: ethers.ZeroAddress, manifestUrl, manifestHash, balance: 0, @@ -1354,7 +1351,7 @@ export class JobService { }, manifest: manifestDetails, staking: { - staker: ethers.constants.AddressZero, + staker: ethers.ZeroAddress, allocated: 0, slashed: 0, }, @@ -1366,14 +1363,14 @@ export class JobService { escrowAddress, manifestUrl, manifestHash, - balance: Number(ethers.utils.formatEther(escrow?.balance || 0)), + balance: Number(ethers.formatEther(escrow?.balance || 0)), paidOut: Number(escrow?.amountPaid || 0), status: jobEntity.status, }, manifest: manifestDetails, staking: { staker: allocation?.staker as string, - allocated: allocation?.tokens.toNumber() as number, + allocated: Number(allocation?.tokens), slashed: 0, // TODO: Retrieve slash tokens }, }; @@ -1388,12 +1385,12 @@ export class JobService { const signer = this.web3Service.getSigner(chainId); const filter = { address: tokenAddress, - topics: [ethers.utils.id('Transfer(address,address,uint256)')], + topics: [ethers.id('Transfer(address,address,uint256)')], fromBlock: fromBlock, toBlock: toBlock, }; - return signer.provider.getLogs(filter); + return signer.provider?.getLogs(filter); } public async getPaidOutAmount( @@ -1410,13 +1407,16 @@ export class JobService { const logs = await this.getTransferLogs(chainId, tokenAddress, 0, 'latest'); let paidOutAmount = new Decimal(0); - logs.forEach((log) => { - const parsedLog = tokenContract.interface.parseLog(log); - const from = parsedLog.args[0]; - const amount = parsedLog.args[2]; + logs?.forEach((log) => { + const parsedLog = tokenContract.interface.parseLog({ + topics: log.topics as string[], + data: log.data, + }); + const from = parsedLog?.args[0]; + const amount = parsedLog?.args[2]; if (from === escrowAddress) { - paidOutAmount = paidOutAmount.add(ethers.utils.formatEther(amount)); + paidOutAmount = paidOutAmount.add(ethers.formatEther(amount)); } }); @@ -1426,14 +1426,14 @@ export class JobService { private async getOracleFee( oracleAddress: string, chainId: ChainId, - ): Promise { + ): Promise { const signer = this.web3Service.getSigner(chainId); const kvStoreClient = await KVStoreClient.build(signer); const feeValue = await kvStoreClient.get(oracleAddress, KVStoreKeys.fee); - return BigNumber.from(feeValue ? feeValue : 1); + return BigInt(feeValue ? feeValue : 1); } private async updateCompletedStatus( diff --git a/packages/apps/job-launcher/server/src/modules/payment/payment.service.spec.ts b/packages/apps/job-launcher/server/src/modules/payment/payment.service.spec.ts index 898be5e2c3..ac3ffe3e5a 100644 --- a/packages/apps/job-launcher/server/src/modules/payment/payment.service.spec.ts +++ b/packages/apps/job-launcher/server/src/modules/payment/payment.service.spec.ts @@ -11,7 +11,6 @@ import { ErrorPostgres, ErrorSignature, } from '../../common/constants/errors'; -import { TransactionReceipt } from '@ethersproject/abstract-provider'; import { Currency, PaymentSource, @@ -322,7 +321,7 @@ describe('PaymentService', () => { }; jest - .spyOn(ethers.providers, 'JsonRpcProvider') + .spyOn(ethers, 'JsonRpcProvider') .mockReturnValue(jsonRpcProviderMock as any); jest @@ -347,11 +346,11 @@ describe('PaymentService', () => { const token = 'hmt'; - const transactionReceipt: Partial = { + const transactionReceipt = { from: MOCK_ADDRESS, logs: [ { - data: ethers.utils.parseUnits('10').toString(), + data: ethers.parseUnits('10').toString(), blockNumber: 123, blockHash: '123', transactionIndex: 123, @@ -362,8 +361,8 @@ describe('PaymentService', () => { logIndex: 123, }, ], - transactionHash: MOCK_TRANSACTION_HASH, - confirmations: TX_CONFIRMATION_TRESHOLD, + hash: MOCK_TRANSACTION_HASH, + confirmations: jest.fn().mockResolvedValue(TX_CONFIRMATION_TRESHOLD), }; jsonRpcProviderMock.getTransactionReceipt.mockResolvedValue( @@ -407,11 +406,11 @@ describe('PaymentService', () => { const token = 'hmt'; - const transactionReceipt: Partial = { + const transactionReceipt = { from: MOCK_ADDRESS, logs: [ { - data: ethers.utils.parseUnits('10').toString(), + data: ethers.parseUnits('10').toString(), blockNumber: 123, blockHash: '123', transactionIndex: 123, @@ -423,7 +422,7 @@ describe('PaymentService', () => { }, ], transactionHash: MOCK_TRANSACTION_HASH, - confirmations: TX_CONFIRMATION_TRESHOLD, + confirmations: jest.fn().mockResolvedValue(TX_CONFIRMATION_TRESHOLD), }; jsonRpcProviderMock.getTransactionReceipt.mockResolvedValue( @@ -446,11 +445,11 @@ describe('PaymentService', () => { const unsupportedToken = 'doge'; - const transactionReceipt: Partial = { + const transactionReceipt = { from: MOCK_ADDRESS, logs: [ { - data: ethers.utils.parseUnits('10').toString(), + data: ethers.parseUnits('10').toString(), blockNumber: 123, blockHash: '123', transactionIndex: 123, @@ -462,7 +461,7 @@ describe('PaymentService', () => { }, ], transactionHash: MOCK_TRANSACTION_HASH, - confirmations: TX_CONFIRMATION_TRESHOLD, + confirmations: jest.fn().mockResolvedValue(TX_CONFIRMATION_TRESHOLD), }; jsonRpcProviderMock.getTransactionReceipt.mockResolvedValue( @@ -486,10 +485,10 @@ describe('PaymentService', () => { throw new ConflictException(ErrorSignature.SignatureNotVerified); }); - const transactionReceipt: Partial = { + const transactionReceipt = { from: MOCK_ADDRESS, logs: [], - confirmations: TX_CONFIRMATION_TRESHOLD, + confirmations: jest.fn().mockResolvedValue(TX_CONFIRMATION_TRESHOLD), }; jsonRpcProviderMock.getTransactionReceipt.mockResolvedValue( @@ -522,10 +521,10 @@ describe('PaymentService', () => { transactionHash: MOCK_TRANSACTION_HASH, }; - const transactionReceipt: Partial = { + const transactionReceipt = { from: MOCK_ADDRESS, logs: [], - confirmations: TX_CONFIRMATION_TRESHOLD, + confirmations: jest.fn().mockResolvedValue(TX_CONFIRMATION_TRESHOLD), }; jsonRpcProviderMock.getTransactionReceipt.mockResolvedValue( @@ -544,11 +543,11 @@ describe('PaymentService', () => { transactionHash: MOCK_TRANSACTION_HASH, }; - const transactionReceipt: Partial = { + const transactionReceipt = { from: MOCK_ADDRESS, logs: [ { - data: ethers.utils.parseUnits('10').toString(), + data: ethers.parseUnits('10').toString(), blockNumber: 123, blockHash: '123', transactionIndex: 123, @@ -560,7 +559,9 @@ describe('PaymentService', () => { }, ], transactionHash: MOCK_TRANSACTION_HASH, - confirmations: TX_CONFIRMATION_TRESHOLD - 1, + confirmations: jest + .fn() + .mockResolvedValue(TX_CONFIRMATION_TRESHOLD - 1), }; jsonRpcProviderMock.getTransactionReceipt.mockResolvedValue( @@ -583,11 +584,11 @@ describe('PaymentService', () => { const token = 'hmt'; - const transactionReceipt: Partial = { + const transactionReceipt = { from: MOCK_ADDRESS, logs: [ { - data: ethers.utils.parseUnits('10').toString(), + data: ethers.parseUnits('10').toString(), blockNumber: 123, blockHash: '123', transactionIndex: 123, @@ -599,7 +600,7 @@ describe('PaymentService', () => { }, ], transactionHash: MOCK_TRANSACTION_HASH, - confirmations: TX_CONFIRMATION_TRESHOLD, + confirmations: jest.fn().mockResolvedValue(TX_CONFIRMATION_TRESHOLD), }; jsonRpcProviderMock.getTransactionReceipt.mockResolvedValue( @@ -683,7 +684,7 @@ describe('PaymentService', () => { }); it('should throw IncorrectAmount error when overflow occurs', async () => { - const mockError = new QueryFailedError('', [], ''); + const mockError = new QueryFailedError('', [], new Error('')); mockError.message = ErrorPostgres.NumericFieldOverflow.toLowerCase(); jest.spyOn(paymentRepository, 'create').mockRejectedValueOnce(mockError); diff --git a/packages/apps/job-launcher/server/src/modules/payment/payment.service.ts b/packages/apps/job-launcher/server/src/modules/payment/payment.service.ts index 3e409de96d..0e68e0c34b 100644 --- a/packages/apps/job-launcher/server/src/modules/payment/payment.service.ts +++ b/packages/apps/job-launcher/server/src/modules/payment/payment.service.ts @@ -7,7 +7,7 @@ import { } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import Stripe from 'stripe'; -import { ethers, providers } from 'ethers'; +import { ethers } from 'ethers'; import { ErrorPayment, ErrorPostgres } from '../../common/constants/errors'; import { PaymentRepository } from './payment.repository'; import { @@ -174,7 +174,7 @@ export class PaymentService { const network = Object.values(networkMap).find( (item) => item.chainId === dto.chainId, ); - const provider = new providers.JsonRpcProvider(network?.rpcUrl); + const provider = new ethers.JsonRpcProvider(network?.rpcUrl); const transaction = await provider.getTransactionReceipt( dto.transactionHash, @@ -192,7 +192,7 @@ export class PaymentService { throw new NotFoundException(ErrorPayment.InvalidTransactionData); } - if (transaction.confirmations < TX_CONFIRMATION_TRESHOLD) { + if ((await transaction.confirmations()) < TX_CONFIRMATION_TRESHOLD) { this.logger.error( `Transaction has ${transaction.confirmations} confirmations instead of ${TX_CONFIRMATION_TRESHOLD}`, ); @@ -210,16 +210,19 @@ export class PaymentService { ); if ( - ethers.utils.hexValue( - tokenContract.interface.parseLog(transaction.logs[0]).args['_to'], - ) !== ethers.utils.hexValue(signer.address) + ethers.hexlify( + tokenContract.interface.parseLog({ + topics: transaction.logs[0].topics as string[], + data: transaction.logs[0].data, + })?.args['_to'], + ) !== ethers.hexlify(signer.address) ) { this.logger.error(ErrorPayment.InvalidRecipient); throw new ConflictException(ErrorPayment.InvalidRecipient); } const tokenId = (await tokenContract.symbol()).toLowerCase(); - const amount = Number(ethers.utils.formatEther(transaction.logs[0].data)); + const amount = Number(ethers.formatEther(transaction.logs[0].data)); if ( network?.tokens[tokenId] != tokenAddress || @@ -230,7 +233,7 @@ export class PaymentService { } const paymentEntity = await this.paymentRepository.findOne({ - transaction: transaction.transactionHash, + transaction: transaction.hash, chainId: dto.chainId, }); diff --git a/packages/apps/job-launcher/server/src/modules/web3/web3.service.ts b/packages/apps/job-launcher/server/src/modules/web3/web3.service.ts index cb407d50e2..336445142a 100644 --- a/packages/apps/job-launcher/server/src/modules/web3/web3.service.ts +++ b/packages/apps/job-launcher/server/src/modules/web3/web3.service.ts @@ -1,6 +1,6 @@ import { BadRequestException, Injectable, Logger } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { BigNumberish, Wallet, providers } from 'ethers'; +import { Wallet, ethers } from 'ethers'; import { ConfigNames, networks } from '../../common/config'; import { Web3Env } from '../../common/enums/web3'; import { MAINNET_CHAIN_IDS, TESTNET_CHAIN_IDS } from '../../common/constants'; @@ -20,7 +20,7 @@ export class Web3Service { validChains.includes(network.chainId), ); for (const network of validNetworks) { - const provider = new providers.JsonRpcProvider(network.rpcUrl); + const provider = new ethers.JsonRpcProvider(network.rpcUrl); this.signers[network.chainId] = new Wallet(privateKey, provider); } this.signerAddress = this.signers[validChains[0]].address; @@ -55,15 +55,18 @@ export class Web3Service { return validChainIds; } - public async calculateGasPrice(chainId: number): Promise { + public async calculateGasPrice(chainId: number): Promise { const signer = this.getSigner(chainId); const multiplier = this.configService.get( ConfigNames.GAS_PRICE_MULTIPLIER, ); - if (multiplier) { - return (await signer.provider.getGasPrice()).mul(multiplier); + if (multiplier && signer.provider) { + return ( + ((await signer.provider.getFeeData())?.gasPrice || 1n) * + BigInt(multiplier) + ); } - return 1; + return 1n; } } diff --git a/packages/apps/job-launcher/server/tsconfig.json b/packages/apps/job-launcher/server/tsconfig.json index 7252f8ae99..fb6e941176 100644 --- a/packages/apps/job-launcher/server/tsconfig.json +++ b/packages/apps/job-launcher/server/tsconfig.json @@ -7,7 +7,7 @@ "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "allowJs": true, - "target": "es2017", + "target": "ES2020", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", @@ -18,6 +18,6 @@ "strictBindCallApply": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, - "esModuleInterop": true, + "esModuleInterop": true } } diff --git a/packages/apps/reputation-oracle/server/package.json b/packages/apps/reputation-oracle/server/package.json index c0fdb95e85..48fb714bcb 100644 --- a/packages/apps/reputation-oracle/server/package.json +++ b/packages/apps/reputation-oracle/server/package.json @@ -46,7 +46,6 @@ "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "cookie-parser": "^1.4.6", - "ethers": "^5.7.2", "express-session": "^1.17.3", "helmet": "^7.1.0", "joi": "^17.9.2", diff --git a/packages/apps/reputation-oracle/server/src/common/utils/signature.ts b/packages/apps/reputation-oracle/server/src/common/utils/signature.ts index b7f0aab223..57aa4bdc66 100644 --- a/packages/apps/reputation-oracle/server/src/common/utils/signature.ts +++ b/packages/apps/reputation-oracle/server/src/common/utils/signature.ts @@ -41,12 +41,12 @@ export function recoverSigner( } try { - return ethers.utils.verifyMessage(message, signature); + return ethers.verifyMessage(message, signature); } catch (e) { throw new ConflictException(ErrorSignature.InvalidSignature); } } export function getNonce(): string { - return Buffer.from(ethers.utils.randomBytes(16)).toString('hex'); + return Buffer.from(ethers.randomBytes(16)).toString('hex'); } diff --git a/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.spec.ts b/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.spec.ts index 2a5e5011ce..bb8aaa99bf 100644 --- a/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.spec.ts +++ b/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.spec.ts @@ -34,7 +34,6 @@ describe('Web3Service', () => { const signer = web3Service.getSigner(network.chainId); expect(signer).toBeDefined(); - expect((signer.provider as any).connection.url).toBe(network.rpcUrl); } }); diff --git a/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts b/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts index 45f130c210..b024cc565b 100644 --- a/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts +++ b/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; -import { BigNumberish, Wallet, providers } from 'ethers'; +import { Wallet, ethers } from 'ethers'; import { ConfigNames, networkMap } from '../../common/config'; @Injectable() @@ -11,7 +11,7 @@ export class Web3Service { const privateKey = this.configService.get(ConfigNames.WEB3_PRIVATE_KEY); for (const networkKey of Object.keys(networkMap)) { const network = networkMap[networkKey]; - const provider = new providers.JsonRpcProvider(network.rpcUrl); + const provider = new ethers.JsonRpcProvider(network.rpcUrl); this.signers[network.chainId] = new Wallet(privateKey, provider); } } @@ -20,15 +20,18 @@ export class Web3Service { return this.signers[chainId]; } - public async calculateGasPrice(chainId: number): Promise { + public async calculateGasPrice(chainId: number): Promise { const signer = this.getSigner(chainId); const multiplier = this.configService.get( ConfigNames.GAS_PRICE_MULTIPLIER, ); if (multiplier) { - return (await signer.provider.getGasPrice()).mul(multiplier); + return ( + ((await signer.provider?.getFeeData())?.gasPrice || 1n) * + BigInt(multiplier) + ); } - return 1; + return 1n; } } diff --git a/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.dto.ts b/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.dto.ts index 199d2330ff..abe35d6bb9 100644 --- a/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.dto.ts +++ b/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.dto.ts @@ -13,7 +13,6 @@ import { import { EventType, SolutionError, WebhookStatus } from '../../common/enums'; import { ChainId } from '@human-protocol/sdk'; import { JobRequestType } from '../../common/enums'; -import { BigNumber } from 'ethers'; export class WebhookIncomingDto { @ApiProperty() @@ -162,7 +161,7 @@ export class ProcessingResultDto { /** * Corresponding amounts to be paid out to recipients. */ - amounts: BigNumber[]; + amounts: bigint[]; /** * URL to the stored results. diff --git a/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.service.spec.ts b/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.service.spec.ts index b8e53e8c4b..69470c2f85 100644 --- a/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.service.spec.ts +++ b/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.service.spec.ts @@ -14,7 +14,6 @@ import { } from './webhook.dto'; import { ChainId, EscrowClient, StorageClient } from '@human-protocol/sdk'; import { WebhookIncomingEntity } from './webhook-incoming.entity'; -import { BigNumber } from 'ethers'; import { ReputationRepository } from '../reputation/reputation.repository'; import { ErrorResults, ErrorWebhook } from '../../common/constants/errors'; import { @@ -54,7 +53,7 @@ jest.mock('@human-protocol/sdk', () => ({ getManifestUrl: jest.fn().mockResolvedValue(MOCK_FILE_URL), getResultsUrl: jest.fn().mockResolvedValue(MOCK_FILE_URL), bulkPayOut: jest.fn().mockResolvedValue(true), - getBalance: jest.fn().mockResolvedValue(BigNumber.from(10)), + getBalance: jest.fn().mockResolvedValue(10n), })), }, StorageClient: jest.fn().mockImplementation(() => ({ @@ -148,9 +147,7 @@ describe('WebhookService', () => { reputationService = moduleRef.get(ReputationService); storageService = moduleRef.get(StorageService); web3Service = moduleRef.get(Web3Service); - web3Service.calculateGasPrice = jest - .fn() - .mockReturnValue(BigNumber.from(1000)); + web3Service.calculateGasPrice = jest.fn().mockReturnValue(1000n); }); afterEach(() => { @@ -247,7 +244,7 @@ describe('WebhookService', () => { const results: ProcessingResultDto = { recipients: [MOCK_ADDRESS], - amounts: [BigNumber.from(10)], + amounts: [10n], url: MOCK_FILE_URL, hash: MOCK_FILE_HASH, checkPassed: true, @@ -314,7 +311,7 @@ describe('WebhookService', () => { getManifestUrl: jest.fn().mockResolvedValue(MOCK_FILE_URL), getResultsUrl: jest.fn().mockResolvedValue(MOCK_FILE_URL), bulkPayOut: jest.fn().mockResolvedValue(true), - getBalance: jest.fn().mockResolvedValue(BigNumber.from(0)), + getBalance: jest.fn().mockResolvedValue(0n), })); expect(await webhookService.processPendingCronJob()).toBeUndefined(); diff --git a/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.service.ts b/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.service.ts index c58f1c0302..3073243b1e 100644 --- a/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.service.ts +++ b/packages/apps/reputation-oracle/server/src/modules/webhook/webhook.service.ts @@ -30,7 +30,7 @@ import { RETRIES_COUNT_THRESHOLD, } from '../../common/constants'; import { ReputationService } from '../reputation/reputation.service'; -import { BigNumber, ethers } from 'ethers'; +import { ethers } from 'ethers'; import { Web3Service } from '../web3/web3.service'; import { EventType, @@ -133,7 +133,7 @@ export class WebhookService { let results: { recipients: string[]; - amounts: BigNumber[]; + amounts: bigint[]; url: string; hash: string; checkPassed: boolean; @@ -228,9 +228,9 @@ export class WebhookService { const recipients = intermediateResults .filter((result) => !result.error) .map((item) => item.workerAddress); - const payoutAmount = BigNumber.from( - ethers.utils.parseUnits(manifest.fundAmount.toString(), 'ether'), - ).div(recipients.length); + const payoutAmount = + BigInt(ethers.parseUnits(manifest.fundAmount.toString(), 'ether')) / + BigInt(recipients.length); const amounts = new Array(recipients.length).fill(payoutAmount); return { recipients, amounts, url, hash, checkPassed: true }; // Assuming checkPassed is true for this case @@ -259,15 +259,11 @@ export class WebhookService { `${intermediateResultsUrl}/${CVAT_VALIDATION_META_FILENAME}`, ); - const bountyValue = ethers.utils.parseUnits(manifest.job_bounty, 18); + const bountyValue = ethers.parseUnits(manifest.job_bounty, 18); const accumulatedBounties = annotations.results.reduce((accMap, curr) => { if (curr.annotation_quality >= manifest.validation.min_quality) { - const existingValue = - accMap.get(curr.annotator_wallet_address) || BigNumber.from(0); - accMap.set( - curr.annotator_wallet_address, - existingValue.add(bountyValue), - ); + const existingValue = accMap.get(curr.annotator_wallet_address) || 0n; + accMap.set(curr.annotator_wallet_address, existingValue + bountyValue); } return accMap; }, new Map()); diff --git a/packages/apps/reputation-oracle/server/tsconfig.json b/packages/apps/reputation-oracle/server/tsconfig.json index 5393cfe8d6..fb6e941176 100644 --- a/packages/apps/reputation-oracle/server/tsconfig.json +++ b/packages/apps/reputation-oracle/server/tsconfig.json @@ -7,7 +7,7 @@ "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "allowJs": true, - "target": "es2017", + "target": "ES2020", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", diff --git a/packages/core/hardhat.config.ts b/packages/core/hardhat.config.ts index 6155f44a52..188446ad65 100644 --- a/packages/core/hardhat.config.ts +++ b/packages/core/hardhat.config.ts @@ -1,9 +1,7 @@ import * as dotenv from 'dotenv'; import { HardhatUserConfig, task } from 'hardhat/config'; -import '@nomiclabs/hardhat-ethers'; import '@nomicfoundation/hardhat-chai-matchers'; -import '@nomiclabs/hardhat-etherscan'; import '@typechain/hardhat'; import 'xdeployer'; import 'hardhat-gas-reporter'; @@ -13,7 +11,6 @@ import 'hardhat-abi-exporter'; import '@nomicfoundation/hardhat-toolbox'; import '@openzeppelin/hardhat-upgrades'; import 'hardhat-dependency-compiler'; -import 'hardhat-celo'; dotenv.config(); diff --git a/packages/core/package.json b/packages/core/package.json index da5532d8a2..62a6d016be 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -45,26 +45,22 @@ ], "license": "MIT", "devDependencies": { - "@ethersproject/abi": "^5.7.0", - "@ethersproject/providers": "^5.7.2", - "@nomicfoundation/hardhat-chai-matchers": "^1.0.5", - "@nomicfoundation/hardhat-network-helpers": "^1.0.7", - "@nomicfoundation/hardhat-toolbox": "^2.0.1", - "@nomiclabs/hardhat-ethers": "^2.2.2", - "@nomiclabs/hardhat-etherscan": "^3.1.2", + "@nomicfoundation/hardhat-chai-matchers": "^2.0.3", + "@nomicfoundation/hardhat-ethers": "^3.0.5", + "@nomicfoundation/hardhat-network-helpers": "^1.0.10", + "@nomicfoundation/hardhat-toolbox": "^4.0.0", + "@nomicfoundation/hardhat-verify": "^2.0.3", "@openzeppelin/contracts": "^4.9.2", "@openzeppelin/contracts-upgradeable": "^4.9.2", - "@openzeppelin/hardhat-upgrades": "^1.22.0", + "@openzeppelin/hardhat-upgrades": "^3.0.1", "@tenderly/hardhat-tenderly": "^2.0.1", - "@typechain/ethers-v5": "^10.1.1", - "@typechain/hardhat": "^6.1.4", + "@typechain/ethers-v6": "^0.5.1", + "@typechain/hardhat": "^9.1.0", "@types/chai": "^4.3.3", "@types/mocha": "^10.0.2", "chai": "^4.4.0", - "ethers": "^5.0.0", "hardhat": "^2.18.3", "hardhat-abi-exporter": "^2.10.1", - "hardhat-celo": "^0.0.7", "hardhat-contract-sizer": "^2.6.1", "hardhat-dependency-compiler": "^1.1.3", "hardhat-gas-reporter": "^1.0.9", @@ -72,8 +68,8 @@ "prettier-plugin-solidity": "^1.2.0", "solidity-coverage": "^0.8.2", "tenderly": "^0.7.0", - "typechain": "^8.1.1", - "xdeployer": "1.2.7" + "typechain": "^8.3.2", + "xdeployer": "3.0.0" }, "lint-staged": { "*.sol": [ diff --git a/packages/core/scripts/deploy-proxies.ts b/packages/core/scripts/deploy-proxies.ts index a183beec25..9c9c6606ef 100644 --- a/packages/core/scripts/deploy-proxies.ts +++ b/packages/core/scripts/deploy-proxies.ts @@ -15,10 +15,12 @@ async function main() { { initializer: 'initialize', kind: 'uups' } ); await stakingContract.deployed(); - console.log('Staking Proxy Address: ', stakingContract.address); + console.log('Staking Proxy Address: ', await stakingContract.getAddress()); console.log( 'Staking Implementation Address: ', - await upgrades.erc1967.getImplementationAddress(stakingContract.address) + await upgrades.erc1967.getImplementationAddress( + await stakingContract.getAddress() + ) ); const EscrowFactory = await ethers.getContractFactory( @@ -26,39 +28,46 @@ async function main() { ); const escrowFactoryContract = await upgrades.deployProxy( EscrowFactory, - [stakingContract.address], + [await stakingContract.getAddress()], { initializer: 'initialize', kind: 'uups' } ); await escrowFactoryContract.deployed(); - console.log('Escrow Factory Proxy Address: ', escrowFactoryContract.address); + console.log( + 'Escrow Factory Proxy Address: ', + await escrowFactoryContract.getAddress() + ); console.log( 'Escrow Factory Implementation Address: ', await upgrades.erc1967.getImplementationAddress( - escrowFactoryContract.address + await escrowFactoryContract.getAddress() ) ); const KVStore = await ethers.getContractFactory('KVStore'); const kvStoreContract = await KVStore.deploy(); - await kvStoreContract.deployed(); - console.log('KVStore Address: ', kvStoreContract.address); + console.log('KVStore Address: ', await kvStoreContract.getAddress()); const RewardPool = await ethers.getContractFactory('RewardPool'); const rewardPoolContract = await upgrades.deployProxy( RewardPool, - [hmtAddress, stakingContract.address, 1], + [hmtAddress, await stakingContract.getAddress(), 1], { initializer: 'initialize', kind: 'uups' } ); await rewardPoolContract.deployed(); - console.log('Reward Pool Proxy Address: ', rewardPoolContract.address); + console.log( + 'Reward Pool Proxy Address: ', + await rewardPoolContract.getAddress() + ); console.log( 'Reward Pool Implementation Address: ', - await upgrades.erc1967.getImplementationAddress(rewardPoolContract.address) + await upgrades.erc1967.getImplementationAddress( + await rewardPoolContract.getAddress() + ) ); // Configure RewardPool in Staking - await stakingContract.setRewardPool(rewardPoolContract.address); + await stakingContract.setRewardPool(await rewardPoolContract.getAddress()); } main().catch((error) => { diff --git a/packages/core/scripts/deploy.ts b/packages/core/scripts/deploy.ts index cfe335cd60..a4f788845c 100644 --- a/packages/core/scripts/deploy.ts +++ b/packages/core/scripts/deploy.ts @@ -1,5 +1,6 @@ /* eslint-disable no-console */ import { ethers, upgrades } from 'hardhat'; +import { HMToken } from 'typechain-types'; async function main() { const [, ...accounts] = await ethers.getSigners(); @@ -12,20 +13,23 @@ async function main() { 18, 'HMT' ); - await HMTokenContract.deployed(); - console.log('HMToken Address: ', HMTokenContract.address); + await HMTokenContract.waitForDeployment(); + console.log('HMToken Address: ', await HMTokenContract.getAddress()); const Staking = await ethers.getContractFactory('Staking'); const stakingContract = await upgrades.deployProxy( Staking, - [HMTokenContract.address, 1, 10], + [await HMTokenContract.getAddress(), 1, 10], { initializer: 'initialize', kind: 'uups' } ); - await stakingContract.deployed(); - console.log('Staking Proxy Address: ', stakingContract.address); + + await stakingContract.waitForDeployment(); + console.log('Staking Proxy Address: ', await stakingContract.getAddress()); console.log( 'Staking Implementation Address: ', - await upgrades.erc1967.getImplementationAddress(stakingContract.address) + await upgrades.erc1967.getImplementationAddress( + await stakingContract.getAddress() + ) ); const EscrowFactory = await ethers.getContractFactory( @@ -33,44 +37,52 @@ async function main() { ); const escrowFactoryContract = await upgrades.deployProxy( EscrowFactory, - [stakingContract.address], + [await stakingContract.getAddress()], { initializer: 'initialize', kind: 'uups' } ); - await escrowFactoryContract.deployed(); - console.log('Escrow Factory Proxy Address: ', escrowFactoryContract.address); + await escrowFactoryContract.waitForDeployment(); + console.log( + 'Escrow Factory Proxy Address: ', + await escrowFactoryContract.getAddress() + ); console.log( 'Escrow Factory Implementation Address: ', await upgrades.erc1967.getImplementationAddress( - escrowFactoryContract.address + await escrowFactoryContract.getAddress() ) ); const KVStore = await ethers.getContractFactory('KVStore'); const kvStoreContract = await KVStore.deploy(); - await kvStoreContract.deployed(); + await kvStoreContract.waitForDeployment(); - console.log('KVStore Address: ', kvStoreContract.address); + console.log('KVStore Address: ', await kvStoreContract.getAddress()); const RewardPool = await ethers.getContractFactory('RewardPool'); const rewardPoolContract = await upgrades.deployProxy( RewardPool, - [HMTokenContract.address, stakingContract.address, 1], + [await HMTokenContract.getAddress(), await stakingContract.getAddress(), 1], { initializer: 'initialize', kind: 'uups' } ); - await rewardPoolContract.deployed(); - console.log('Reward Pool Proxy Address: ', rewardPoolContract.address); + await rewardPoolContract.waitForDeployment(); + console.log( + 'Reward Pool Proxy Address: ', + await rewardPoolContract.getAddress() + ); console.log( 'Reward Pool Implementation Address: ', - await upgrades.erc1967.getImplementationAddress(rewardPoolContract.address) + await upgrades.erc1967.getImplementationAddress( + await rewardPoolContract.getAddress() + ) ); // Configure RewardPool in Staking - await stakingContract.setRewardPool(rewardPoolContract.address); + await stakingContract.setRewardPool(await rewardPoolContract.getAddress()); for (const account of accounts) { - await HMTokenContract.transfer( + await (HMTokenContract as HMToken).transfer( account.address, - ethers.utils.parseEther('1000') + ethers.parseEther('1000') ); } } diff --git a/packages/core/scripts/upgrade-proxies.ts b/packages/core/scripts/upgrade-proxies.ts index bd8d80ee2e..19f14bf2ad 100644 --- a/packages/core/scripts/upgrade-proxies.ts +++ b/packages/core/scripts/upgrade-proxies.ts @@ -30,12 +30,12 @@ async function main() { console.log( 'Escrow Factory Proxy Address: ', - escrowFactoryContract.address + await escrowFactoryContract.getAddress() ); console.log( 'New Escrow Factory Implementation Address: ', await upgrades.erc1967.getImplementationAddress( - escrowFactoryContract.address + await escrowFactoryContract.getAddress() ) ); } @@ -52,10 +52,12 @@ async function main() { contract.deployTransaction.hash ); - console.log('Staking Proxy Address: ', stakingContract.address); + console.log('Staking Proxy Address: ', await stakingContract.getAddress()); console.log( 'New Staking Implementation Address: ', - await upgrades.erc1967.getImplementationAddress(stakingContract.address) + await upgrades.erc1967.getImplementationAddress( + await stakingContract.getAddress() + ) ); } @@ -71,11 +73,14 @@ async function main() { contract.deployTransaction.hash ); - console.log('Reward Pool Proxy Address: ', rewardPoolContract.address); + console.log( + 'Reward Pool Proxy Address: ', + await rewardPoolContract.getAddress() + ); console.log( 'New Reward Pool Implementation Address: ', await upgrades.erc1967.getImplementationAddress( - rewardPoolContract.address + await rewardPoolContract.getAddress() ) ); } diff --git a/packages/core/test/Escrow.ts b/packages/core/test/Escrow.ts index 99329e355e..4f8de1fbb2 100644 --- a/packages/core/test/Escrow.ts +++ b/packages/core/test/Escrow.ts @@ -1,7 +1,8 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { anyValue } from '@nomicfoundation/hardhat-chai-matchers/withArgs'; import { expect } from 'chai'; import { ethers } from 'hardhat'; -import { Signer } from 'ethers'; +import { EventLog, Signer } from 'ethers'; import { Escrow, HMToken } from '../typechain-types'; const MOCK_URL = 'http://google.com/fake'; @@ -32,7 +33,7 @@ async function deployEscrow() { // Deploy Escrow Contract const Escrow = await ethers.getContractFactory('contracts/Escrow.sol:Escrow'); escrow = (await Escrow.deploy( - token.address, + await token.getAddress(), await launcher.getAddress(), await owner.getAddress(), 100, @@ -59,7 +60,7 @@ async function setupEscrow() { async function fundEscrow() { const amount = 100; - await token.connect(owner).transfer(escrow.address, amount); + await token.connect(owner).transfer(escrow.getAddress(), amount); } describe('Escrow', function () { @@ -95,7 +96,7 @@ describe('Escrow', function () { it('Should set the right token address', async () => { const result = await escrow.token(); - expect(result).to.equal(token.address); + expect(result).to.equal(await token.getAddress()); }); it('Should set the right launched status', async () => { @@ -120,7 +121,7 @@ describe('Escrow', function () { it('Should topup and return the right escrow balance', async () => { const amount = 1000; - await token.connect(owner).transfer(escrow.address, amount); + await token.connect(owner).transfer(escrow.getAddress(), amount); const result = await escrow.connect(launcher).getBalance(); expect(result).to.equal(amount.toString()); @@ -161,23 +162,23 @@ describe('Escrow', function () { it('Should transfer tokens to owner if contract funded when abort is called', async function () { const amount = 100; - await token.connect(owner).transfer(escrow.address, amount); + await token.connect(owner).transfer(escrow.getAddress(), amount); await escrow.connect(owner).abort(); expect( - (await token.connect(owner).balanceOf(escrow.address)).toString() + (await token.connect(owner).balanceOf(escrow.getAddress())).toString() ).to.equal('0', 'Escrow has not been properly aborted'); }); it('Should transfer tokens to owner if contract funded when abort is called from trusted handler', async function () { const amount = 100; - await token.connect(owner).transfer(escrow.address, amount); + await token.connect(owner).transfer(escrow.getAddress(), amount); await escrow.connect(trustedHandlers[0]).abort(); expect( - (await token.connect(owner).balanceOf(escrow.address)).toString() + (await token.connect(owner).balanceOf(escrow.getAddress())).toString() ).to.equal('0', 'Escrow has not been properly aborted'); }); }); @@ -227,10 +228,8 @@ describe('Escrow', function () { .storeResults(MOCK_URL, MOCK_HASH) ).wait(); - expect(result.events?.[0].event).to.equal( - 'IntermediateStorage', - 'IntermediateStorage event was not emitted' - ); + expect((result?.logs[0] as EventLog).args).to.contain(MOCK_URL); + expect((result?.logs[0] as EventLog).args).to.contain(MOCK_HASH); }); it('Should succeed when add a new trusted handler from trusted handler and a trusted handler stores results', async () => { @@ -244,10 +243,8 @@ describe('Escrow', function () { .storeResults(MOCK_URL, MOCK_HASH) ).wait(); - expect(result.events?.[0].event).to.equal( - 'IntermediateStorage', - 'IntermediateStorage event was not emitted' - ); + expect((result?.logs[0] as EventLog).args).to.contain(MOCK_URL); + expect((result?.logs[0] as EventLog).args).to.contain(MOCK_HASH); }); }); }); @@ -307,10 +304,8 @@ describe('Escrow', function () { .storeResults(MOCK_URL, MOCK_HASH) ).wait(); - expect(result.events?.[0].event).to.equal( - 'IntermediateStorage', - 'IntermediateStorage event was not emitted' - ); + expect((result?.logs[0] as EventLog).args).to.contain(MOCK_URL); + expect((result?.logs[0] as EventLog).args).to.contain(MOCK_HASH); }); it('Should succeed when a trusted handler stores results', async () => { @@ -320,10 +315,8 @@ describe('Escrow', function () { .storeResults(MOCK_URL, MOCK_HASH) ).wait(); - expect(result.events?.[0].event).to.equal( - 'IntermediateStorage', - 'IntermediateStorage event was not emitted' - ); + expect((result?.logs[0] as EventLog).args).to.contain(MOCK_URL); + expect((result?.logs[0] as EventLog).args).to.contain(MOCK_HASH); }); }); }); @@ -356,7 +349,7 @@ describe('Escrow', function () { escrow .connect(owner) .setup( - ethers.constants.AddressZero, + ethers.ZeroAddress, await recordingOracle.getAddress(), await exchangeOracle.getAddress(), 10, @@ -374,7 +367,7 @@ describe('Escrow', function () { .connect(owner) .setup( await reputationOracle.getAddress(), - ethers.constants.AddressZero, + ethers.ZeroAddress, await exchangeOracle.getAddress(), 10, 10, @@ -392,7 +385,7 @@ describe('Escrow', function () { .setup( await reputationOracle.getAddress(), await reputationOracle.getAddress(), - ethers.constants.AddressZero, + ethers.ZeroAddress, 10, 10, 10, @@ -558,10 +551,9 @@ describe('Escrow', function () { const ststus = await escrow.status(); expect(ststus).to.equal(Status.Cancelled); - expect(await token.connect(owner).balanceOf(escrow.address)).to.equal( - '0', - 'Escrow has not been properly canceled' - ); + expect( + await token.connect(owner).balanceOf(escrow.getAddress()) + ).to.equal('0', 'Escrow has not been properly canceled'); }); it('Should succeed when the contract was canceled by trusted handler', async () => { @@ -569,10 +561,9 @@ describe('Escrow', function () { const ststus = await escrow.status(); expect(ststus).to.equal(Status.Cancelled); - expect(await token.connect(owner).balanceOf(escrow.address)).to.equal( - '0', - 'Escrow has not been properly canceled' - ); + expect( + await token.connect(owner).balanceOf(escrow.getAddress()) + ).to.equal('0', 'Escrow has not been properly canceled'); }); }); }); @@ -639,7 +630,7 @@ describe('Escrow', function () { it('Should revert with the right error if too many recipients', async function () { const recepients = Array.from( new Array(BULK_MAX_COUNT + 1), - () => ethers.constants.AddressZero + () => ethers.ZeroAddress ); const amounts = Array.from({ length: BULK_MAX_COUNT + 1 }, () => 1); @@ -730,38 +721,27 @@ describe('Escrow', function () { .balanceOf(await exchangeOracle.getAddress()); expect( - ( - finalBalanceAccount1.toNumber() - initialBalanceAccount1.toNumber() - ).toString() + (finalBalanceAccount1 - initialBalanceAccount1).toString() ).to.equal('7'); expect( - ( - finalBalanceAccount2.toNumber() - initialBalanceAccount2.toNumber() - ).toString() + (finalBalanceAccount2 - initialBalanceAccount2).toString() ).to.equal('14'); expect( - ( - finalBalanceAccount3.toNumber() - initialBalanceAccount3.toNumber() - ).toString() + (finalBalanceAccount3 - initialBalanceAccount3).toString() ).to.equal('21'); expect( ( - finalBalanceRecordingOracle.toNumber() - - initialBalanceRecordingOracle.toNumber() + finalBalanceRecordingOracle - initialBalanceRecordingOracle ).toString() ).to.equal('6'); expect( ( - finalBalanceReputationOracle.toNumber() - - initialBalanceReputationOracle.toNumber() + finalBalanceReputationOracle - initialBalanceReputationOracle ).toString() ).to.equal('6'); expect( - ( - finalBalanceExchangeOracle.toNumber() - - initialBalanceExchangeOracle.toNumber() - ).toString() + (finalBalanceExchangeOracle - initialBalanceExchangeOracle).toString() ).to.equal('6'); }); diff --git a/packages/core/test/EscrowFactory.ts b/packages/core/test/EscrowFactory.ts index bb6fd5b758..cae53b2637 100644 --- a/packages/core/test/EscrowFactory.ts +++ b/packages/core/test/EscrowFactory.ts @@ -1,6 +1,6 @@ import { anyValue } from '@nomicfoundation/hardhat-chai-matchers/withArgs'; import { assert, expect } from 'chai'; -import { Signer } from 'ethers'; +import { EventLog, Signer } from 'ethers'; import { ethers, upgrades } from 'hardhat'; import { EscrowFactory, HMToken, Staking } from '../typechain-types'; @@ -23,10 +23,12 @@ describe('EscrowFactory', function () { const result = await ( await escrowFactory .connect(operator) - .createEscrow(token.address, trustedHandlers, jobRequesterId) + .createEscrow(await token.getAddress(), trustedHandlers, jobRequesterId) ).wait(); - const event = result.events?.find(({ topics }) => - topics.includes(ethers.utils.id('LaunchedV2(address,address,string)')) + const event = ( + result?.logs?.find(({ topics }) => + topics.includes(ethers.id('LaunchedV2(address,address,string)')) + ) as EventLog )?.args; return event; @@ -67,12 +69,12 @@ describe('EscrowFactory', function () { const Staking = await ethers.getContractFactory('Staking'); staking = (await upgrades.deployProxy( Staking, - [token.address, minimumStake, lockPeriod], + [await token.getAddress(), minimumStake, lockPeriod], { kind: 'uups', initializer: 'initialize' } - )) as Staking; + )) as unknown as Staking; // Approve spend HMT tokens staking contract - await token.connect(operator).approve(staking.address, 1000); + await token.connect(operator).approve(await staking.getAddress(), 1000); // Deploy Escrow Factory Contract const EscrowFactory = await ethers.getContractFactory( @@ -81,9 +83,9 @@ describe('EscrowFactory', function () { escrowFactory = (await upgrades.deployProxy( EscrowFactory, - [staking.address], + [await staking.getAddress()], { kind: 'uups', initializer: 'initialize' } - )) as EscrowFactory; + )) as unknown as EscrowFactory; }); describe('deployment', () => { @@ -98,7 +100,7 @@ describe('EscrowFactory', function () { escrowFactory .connect(operator) .createEscrow( - token.address, + await token.getAddress(), [await reputationOracle.getAddress()], jobRequesterId ) @@ -108,7 +110,10 @@ describe('EscrowFactory', function () { it('Operator should be able to create an escrow after staking', async () => { const event = await stakeAndCreateEscrow(staking); - expect(event?.token).to.equal(token.address, 'token address is correct'); + expect(event?.token).to.equal( + await token.getAddress(), + 'token address is correct' + ); expect(event?.escrow).to.not.be.null; }); @@ -118,10 +123,10 @@ describe('EscrowFactory', function () { await expect( escrowFactory .connect(operator) - .createEscrow(token.address, trustedHandlers, jobRequesterId) + .createEscrow(await token.getAddress(), trustedHandlers, jobRequesterId) ) .to.emit(escrowFactory, 'LaunchedV2') - .withArgs(token.address, anyValue, jobRequesterId); + .withArgs(await token.getAddress(), anyValue, jobRequesterId); }); it('Should find the newly created escrow from deployed escrow', async () => { @@ -144,7 +149,10 @@ describe('EscrowFactory', function () { const event = await createEscrow(); - expect(event?.token).to.equal(token.address, 'token address is correct'); + expect(event?.token).to.equal( + await token.getAddress(), + 'token address is correct' + ); expect(event?.escrow).to.not.be.null; }); @@ -158,7 +166,7 @@ describe('EscrowFactory', function () { escrowFactory .connect(operator) .createEscrow( - token.address, + await token.getAddress(), [await reputationOracle.getAddress()], jobRequesterId ) @@ -173,7 +181,10 @@ describe('EscrowFactory', function () { const event = await stakeAndCreateEscrow(staking); - expect(event?.token).to.equal(token.address, 'token address is correct'); + expect(event?.token).to.equal( + await token.getAddress(), + 'token address is correct' + ); expect(event?.escrow).to.not.be.null; }); @@ -185,7 +196,7 @@ describe('EscrowFactory', function () { ); await expect( - upgrades.upgradeProxy(escrowFactory.address, EscrowFactoryV0) + upgrades.upgradeProxy(await escrowFactory.getAddress(), EscrowFactoryV0) ).to.be.revertedWith('Ownable: caller is not the owner'); }); @@ -193,17 +204,27 @@ describe('EscrowFactory', function () { const EscrowFactoryV0 = await ethers.getContractFactory('EscrowFactoryV0'); const oldImplementationAddress = - await upgrades.erc1967.getImplementationAddress(escrowFactory.address); + await upgrades.erc1967.getImplementationAddress( + await escrowFactory.getAddress() + ); - await upgrades.upgradeProxy(escrowFactory.address, EscrowFactoryV0); + await upgrades.upgradeProxy( + await escrowFactory.getAddress(), + EscrowFactoryV0 + ); expect( - await upgrades.erc1967.getImplementationAddress(escrowFactory.address) + await upgrades.erc1967.getImplementationAddress( + await escrowFactory.getAddress() + ) ).to.not.be.equal(oldImplementationAddress); const event = await stakeAndCreateEscrow(staking); - expect(event?.token).to.equal(token.address, 'token address is correct'); + expect(event?.token).to.equal( + await token.getAddress(), + 'token address is correct' + ); expect(event?.escrow).to.not.be.null; try { @@ -221,14 +242,21 @@ describe('EscrowFactory', function () { const oldLastEscrow = await escrowFactory.lastEscrow(); const oldImplementationAddress = - await upgrades.erc1967.getImplementationAddress(escrowFactory.address); + await upgrades.erc1967.getImplementationAddress( + await escrowFactory.getAddress() + ); const EscrowFactoryV0 = await ethers.getContractFactory('EscrowFactoryV0'); - await upgrades.upgradeProxy(escrowFactory.address, EscrowFactoryV0); + await upgrades.upgradeProxy( + await escrowFactory.getAddress(), + EscrowFactoryV0 + ); expect( - await upgrades.erc1967.getImplementationAddress(escrowFactory.address) + await upgrades.erc1967.getImplementationAddress( + await escrowFactory.getAddress() + ) ).to.not.be.equal(oldImplementationAddress); expect(await escrowFactory.lastEscrow()).to.equal(oldLastEscrow); diff --git a/packages/core/test/KVStore.ts b/packages/core/test/KVStore.ts index 1804b76a33..dd8300233c 100644 --- a/packages/core/test/KVStore.ts +++ b/packages/core/test/KVStore.ts @@ -51,8 +51,8 @@ describe('KVStore', function () { }); it('outputs an address on deployment', async () => { - expect(typeof kvStore.address).equal('string'); - expect(kvStore.address.length).greaterThanOrEqual(10); + expect(typeof (await kvStore.getAddress())).equal('string'); + expect((await kvStore.getAddress()).length).greaterThanOrEqual(10); }); it('store public key and its ipfs hash on smart contract', async () => { diff --git a/packages/core/test/RewardPool.ts b/packages/core/test/RewardPool.ts index 5659d2e8ef..eedcfd09c7 100644 --- a/packages/core/test/RewardPool.ts +++ b/packages/core/test/RewardPool.ts @@ -1,5 +1,5 @@ import { ethers, upgrades } from 'hardhat'; -import { Signer } from 'ethers'; +import { EventLog, Signer } from 'ethers'; import { EscrowFactory, HMToken, @@ -54,9 +54,9 @@ describe('RewardPool', function () { const Staking = await ethers.getContractFactory('Staking'); staking = (await upgrades.deployProxy( Staking, - [token.address, minimumStake, lockPeriod], + [await token.getAddress(), minimumStake, lockPeriod], { kind: 'uups', initializer: 'initialize' } - )) as Staking; + )) as unknown as Staking; // Deploy Escrow Factory Contract const EscrowFactory = await ethers.getContractFactory( @@ -65,9 +65,9 @@ describe('RewardPool', function () { escrowFactory = (await upgrades.deployProxy( EscrowFactory, - [staking.address], + [await staking.getAddress()], { kind: 'uups', initializer: 'initialize' } - )) as EscrowFactory; + )) as unknown as EscrowFactory; }); this.beforeEach(async () => { @@ -95,12 +95,12 @@ describe('RewardPool', function () { const RewardPool = await ethers.getContractFactory('RewardPool'); rewardPool = (await upgrades.deployProxy( RewardPool, - [token.address, staking.address, rewardFee], + [await token.getAddress(), await staking.getAddress(), rewardFee], { kind: 'uups', initializer: 'initialize' } - )) as RewardPool; + )) as unknown as RewardPool; // Configure RewardPool in Staking - await staking.setRewardPool(rewardPool.address); + await staking.setRewardPool(await rewardPool.getAddress()); // Approve spend HMT tokens staking contract [ @@ -112,12 +112,12 @@ describe('RewardPool', function () { recordingOracle, externalAccount, ].map(async (account) => { - await token.connect(account).approve(staking.address, 1000); + await token.connect(account).approve(await staking.getAddress(), 1000); }); }); it('Should set token address given to constructor', async () => { - expect(await rewardPool.token()).to.equal(token.address); + expect(await rewardPool.token()).to.equal(await token.getAddress()); }); it('Should set fee given to constructor', async () => { @@ -138,16 +138,21 @@ describe('RewardPool', function () { await escrowFactory .connect(operator) .createEscrow( - token.address, + await token.getAddress(), [await validator.getAddress()], jobRequesterId ) ).wait(); - const event = result.events?.find(({ topics }) => - topics.includes(ethers.utils.id('LaunchedV2(address,address,string)')) + const event = ( + result?.logs?.find(({ topics }) => + topics.includes(ethers.id('LaunchedV2(address,address,string)')) + ) as EventLog )?.args; - expect(event?.token).to.equal(token.address, 'token address is correct'); + expect(event?.token).to.equal( + await token.getAddress(), + 'token address is correct' + ); expect(event?.escrow).to.not.be.null; escrowAddress = event?.escrow; @@ -160,9 +165,9 @@ describe('RewardPool', function () { rewardPool .connect(operator) .addReward( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, 1 ) ).to.be.revertedWith('Caller is not staking contract'); @@ -180,7 +185,9 @@ describe('RewardPool', function () { slashedTokens ); - expect(await token.balanceOf(rewardPool.address)).to.equal(slashedTokens); + expect(await token.balanceOf(await rewardPool.getAddress())).to.equal( + slashedTokens + ); const rewards = await rewardPool.getRewards(escrowAddress); expect(rewards.length).to.equal(0); @@ -206,7 +213,9 @@ describe('RewardPool', function () { slashedTokens - rewardFee ); - expect(await token.balanceOf(rewardPool.address)).to.equal(slashedTokens); + expect(await token.balanceOf(await rewardPool.getAddress())).to.equal( + slashedTokens + ); const rewards = await rewardPool.getRewards(escrowAddress); expect(rewards.length).to.equal(1); @@ -232,16 +241,21 @@ describe('RewardPool', function () { await escrowFactory .connect(operator) .createEscrow( - token.address, + await token.getAddress(), [await validator.getAddress()], jobRequesterId ) ).wait(); - const event = result.events?.find(({ topics }) => - topics.includes(ethers.utils.id('LaunchedV2(address,address,string)')) + const event = ( + result?.logs?.find(({ topics }) => + topics.includes(ethers.id('LaunchedV2(address,address,string)')) + ) as EventLog )?.args; - expect(event?.token).to.equal(token.address, 'token address is correct'); + expect(event?.token).to.equal( + await token.getAddress(), + 'token address is correct' + ); expect(event?.escrow).to.not.be.null; escrowAddress = event?.escrow; @@ -285,14 +299,16 @@ describe('RewardPool', function () { await rewardPool.distributeReward(escrowAddress); expect(await token.balanceOf(await validator.getAddress())).to.equal( - vBalanceBefore.add(vSlashAmount - rewardFee) + vBalanceBefore + BigInt(vSlashAmount - rewardFee) ); expect(await token.balanceOf(await validator2.getAddress())).to.equal( - v2BalanceBefore.add(v2SlashAmount - rewardFee) + v2BalanceBefore + BigInt(v2SlashAmount - rewardFee) ); - expect(await token.balanceOf(rewardPool.address)).to.equal(rewardFee * 2); + expect(await token.balanceOf(await rewardPool.getAddress())).to.equal( + rewardFee * 2 + ); }); it('Should withdraw the reward', async () => { @@ -320,7 +336,7 @@ describe('RewardPool', function () { await rewardPool.withdraw(await owner.getAddress()); expect(await token.balanceOf(await owner.getAddress())).to.equal( - oBalanceBefore.add(rewardFee * 2) + oBalanceBefore + BigInt(rewardFee * 2) ); }); }); diff --git a/packages/core/test/Staking.ts b/packages/core/test/Staking.ts index 3324bea6b6..0521dd1977 100644 --- a/packages/core/test/Staking.ts +++ b/packages/core/test/Staking.ts @@ -1,7 +1,7 @@ import { anyValue } from '@nomicfoundation/hardhat-chai-matchers/withArgs'; import { expect } from 'chai'; import { ethers, upgrades } from 'hardhat'; -import { Signer } from 'ethers'; +import { EventLog, Signer } from 'ethers'; import { Escrow, EscrowFactory, @@ -94,9 +94,9 @@ describe('Staking', function () { const Staking = await ethers.getContractFactory('Staking'); staking = (await upgrades.deployProxy( Staking, - [token.address, minimumStake, lockPeriod], + [await token.getAddress(), minimumStake, lockPeriod], { kind: 'uups', initializer: 'initialize' } - )) as Staking; + )) as unknown as Staking; // Deploy Escrow Factory Contract const EscrowFactory = await ethers.getContractFactory( @@ -105,20 +105,20 @@ describe('Staking', function () { escrowFactory = (await upgrades.deployProxy( EscrowFactory, - [staking.address], + [await staking.getAddress()], { kind: 'uups', initializer: 'initialize' } - )) as EscrowFactory; + )) as unknown as EscrowFactory; // Deploy Reward Pool Conract const RewardPool = await ethers.getContractFactory('RewardPool'); rewardPool = (await upgrades.deployProxy( RewardPool, - [token.address, staking.address, rewardFee], + [await token.getAddress(), await staking.getAddress(), rewardFee], { kind: 'uups', initializer: 'initialize' } - )) as RewardPool; + )) as unknown as RewardPool; // Topup staking address - await token.connect(owner).transfer(staking.address, 1000); + await token.connect(owner).transfer(await staking.getAddress(), 1000); // Approve spend HMT tokens staking contract [ @@ -130,14 +130,14 @@ describe('Staking', function () { reputationOracle, recordingOracle, ].map(async (account) => { - await token.connect(account).approve(staking.address, 1000); + await token.connect(account).approve(await staking.getAddress(), 1000); }); }); describe('deployment', () => { it('Should set the right token address', async () => { const result = await staking.token(); - expect(result).to.equal(token.address); + expect(result).to.equal(await token.getAddress()); }); it('Should set the minimum stake', async () => { @@ -168,7 +168,7 @@ describe('Staking', function () { describe('Events', function () { it('Should emit an event on stake deposited', async function () { - await token.connect(operator).approve(staking.address, 100); //! + await token.connect(operator).approve(await staking.getAddress(), 100); //! await expect(await staking.connect(operator).stake(2)) .to.emit(staking, 'StakeDeposited') @@ -254,16 +254,21 @@ describe('Staking', function () { await escrowFactory .connect(operator) .createEscrow( - token.address, + await token.getAddress(), [await validator.getAddress()], jobRequesterId ) ).wait(); - const event = result.events?.find(({ topics }) => - topics.includes(ethers.utils.id('LaunchedV2(address,address,string)')) + const event = ( + result?.logs?.find(({ topics }) => + topics.includes(ethers.id('LaunchedV2(address,address,string)')) + ) as EventLog )?.args; - expect(event?.token).to.equal(token.address, 'token address is correct'); + expect(event?.token).to.equal( + await token.getAddress(), + 'token address is correct' + ); expect(event?.escrow).to.not.be.null; escrowAddress = event?.escrow; @@ -274,9 +279,7 @@ describe('Staking', function () { const amount = 5; await expect( - staking - .connect(operator) - .allocate(ethers.constants.AddressZero, amount) + staking.connect(operator).allocate(ethers.ZeroAddress, amount) ).to.be.revertedWith('Must be a valid address'); }); @@ -356,16 +359,21 @@ describe('Staking', function () { await escrowFactory .connect(operator) .createEscrow( - token.address, + await token.getAddress(), [await validator.getAddress()], jobRequesterId ) ).wait(); - const event = result.events?.find(({ topics }) => - topics.includes(ethers.utils.id('LaunchedV2(address,address,string)')) + const event = ( + result?.logs?.find(({ topics }) => + topics.includes(ethers.id('LaunchedV2(address,address,string)')) + ) as EventLog )?.args; - expect(event?.token).to.equal(token.address, 'token address is correct'); + expect(event?.token).to.equal( + await token.getAddress(), + 'token address is correct' + ); expect(event?.escrow).to.not.be.null; }); @@ -511,13 +519,13 @@ describe('Staking', function () { describe('Validations', function () { it('Should revert with the right error if caller is not an owner', async function () { await expect( - staking.connect(operator).setRewardPool(rewardPool.address) + staking.connect(operator).setRewardPool(await rewardPool.getAddress()) ).to.be.revertedWith('Ownable: caller is not the owner'); }); it('Should revert with the right error if not a positive number', async function () { await expect( - staking.connect(owner).setRewardPool(ethers.constants.AddressZero) + staking.connect(owner).setRewardPool(ethers.ZeroAddress) ).to.be.revertedWith('Must be a valid address'); }); }); @@ -525,17 +533,23 @@ describe('Staking', function () { describe('Events', function () { it('Should emit an event on set reward pool', async function () { await expect( - await staking.connect(owner).setRewardPool(rewardPool.address) + await staking + .connect(owner) + .setRewardPool(await rewardPool.getAddress()) ) .to.emit(staking, 'SetRewardPool') - .withArgs(rewardPool.address); + .withArgs(await rewardPool.getAddress()); }); }); describe('Set minimum stake', function () { it('Should assign a value to minimum stake variable', async function () { - await staking.connect(owner).setRewardPool(rewardPool.address); - await expect(await staking.rewardPool()).to.equal(rewardPool.address); + await staking + .connect(owner) + .setRewardPool(await rewardPool.getAddress()); + await expect(await staking.rewardPool()).to.equal( + await rewardPool.getAddress() + ); }); }); }); @@ -552,17 +566,19 @@ describe('Staking', function () { await escrowFactory .connect(operator) .createEscrow( - token.address, + await token.getAddress(), [await validator.getAddress()], jobRequesterId ) ).wait(); - const event = result.events?.find(({ topics }) => - topics.includes(ethers.utils.id('LaunchedV2(address,address,string)')) + const event = ( + result?.logs?.find(({ topics }) => + topics.includes(ethers.id('LaunchedV2(address,address,string)')) + ) as EventLog )?.args; expect(event?.token).to.equal( - token.address, + await token.getAddress(), 'token address is correct' ); expect(event?.escrow).to.not.be.null; @@ -622,17 +638,19 @@ describe('Staking', function () { await escrowFactory .connect(operator) .createEscrow( - token.address, + await token.getAddress(), [await validator.getAddress()], jobRequesterId ) ).wait(); - const event = result.events?.find(({ topics }) => - topics.includes(ethers.utils.id('LaunchedV2(address,address,string)')) + const event = ( + result?.logs?.find(({ topics }) => + topics.includes(ethers.id('LaunchedV2(address,address,string)')) + ) as EventLog )?.args; expect(event?.token).to.equal( - token.address, + await token.getAddress(), 'token address is correct' ); expect(event?.escrow).to.not.be.null; @@ -647,10 +665,10 @@ describe('Staking', function () { it('Should return a null allocation by escrow address', async function () { const allocation = await staking .connect(operator) - .getAllocation(ethers.constants.AddressZero); + .getAllocation(ethers.ZeroAddress); - expect(allocation.escrowAddress).to.equal(ethers.constants.AddressZero); - expect(allocation.staker).to.equal(ethers.constants.AddressZero); + expect(allocation.escrowAddress).to.equal(ethers.ZeroAddress); + expect(allocation.staker).to.equal(ethers.ZeroAddress); expect(allocation.tokens).to.equal(0); // Tokens allocated to a escrowAddress expect(allocation.createdAt).to.equal(0); // Time when allocation was created expect(allocation.closedAt).to.equal(0); // Time when allocation was closed @@ -675,7 +693,7 @@ describe('Staking', function () { const slashedTokens = 2; this.beforeEach(async () => { - await staking.connect(owner).setRewardPool(rewardPool.address); + await staking.connect(owner).setRewardPool(await rewardPool.getAddress()); await staking.connect(validator).stake(stakedTokens); @@ -685,16 +703,21 @@ describe('Staking', function () { await escrowFactory .connect(operator) .createEscrow( - token.address, + await token.getAddress(), [await validator.getAddress()], jobRequesterId ) ).wait(); - const event = result.events?.find(({ topics }) => - topics.includes(ethers.utils.id('LaunchedV2(address,address,string)')) + const event = ( + result?.logs?.find(({ topics }) => + topics.includes(ethers.id('LaunchedV2(address,address,string)')) + ) as EventLog )?.args; - expect(event?.token).to.equal(token.address, 'token address is correct'); + expect(event?.token).to.equal( + await token.getAddress(), + 'token address is correct' + ); expect(event?.escrow).to.not.be.null; escrowAddress = event?.escrow; @@ -723,7 +746,7 @@ describe('Staking', function () { .slash( await validator.getAddress(), await operator.getAddress(), - ethers.constants.AddressZero, + ethers.ZeroAddress, slashedTokens ) ).to.be.revertedWith('Must be a valid address'); @@ -816,9 +839,9 @@ describe('Staking', function () { stakedTokens - slashedTokens ); - await expect(await token.balanceOf(rewardPool.address)).to.equal( - slashedTokens - ); + await expect( + await token.balanceOf(await rewardPool.getAddress()) + ).to.equal(slashedTokens); }); }); }); @@ -879,7 +902,7 @@ describe('Staking', function () { await escrowFactory .connect(operator) .createEscrow( - token.address, + await token.getAddress(), [ await validator.getAddress(), await reputationOracle.getAddress(), @@ -888,11 +911,16 @@ describe('Staking', function () { jobRequesterId ) ).wait(); - const event = result.events?.find(({ topics }) => - topics.includes(ethers.utils.id('LaunchedV2(address,address,string)')) + const event = ( + result?.logs?.find(({ topics }) => + topics.includes(ethers.id('LaunchedV2(address,address,string)')) + ) as EventLog )?.args; - expect(event?.token).to.equal(token.address, 'token address is correct'); + expect(event?.token).to.equal( + await token.getAddress(), + 'token address is correct' + ); expect(event?.escrow).to.not.be.null; escrowAddress = event?.escrow; @@ -927,9 +955,7 @@ describe('Staking', function () { describe('Validations', function () { it('Should revert with the right error if not a valid address', async function () { await expect( - staking - .connect(operator) - .closeAllocation(ethers.constants.AddressZero) + staking.connect(operator).closeAllocation(ethers.ZeroAddress) ).to.be.revertedWith('Must be a valid address'); }); diff --git a/packages/sdk/typescript/human-protocol-sdk/package.json b/packages/sdk/typescript/human-protocol-sdk/package.json index 02bcdcdc84..c1cb753507 100644 --- a/packages/sdk/typescript/human-protocol-sdk/package.json +++ b/packages/sdk/typescript/human-protocol-sdk/package.json @@ -43,8 +43,7 @@ "aws-sdk": "^2.1528.0", "axios": "^1.4.0", "crypto": "^1.0.1", - "ethers": "^5.7.2", - "graphql": "^16.7.1", + "graphql": "^16.8.1", "graphql-request": "^6.1.0", "graphql-tag": "^2.12.6", "minio": "^7.0.32", diff --git a/packages/sdk/typescript/human-protocol-sdk/src/base.ts b/packages/sdk/typescript/human-protocol-sdk/src/base.ts index d17e9d9d06..a0f3083da7 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/base.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/base.ts @@ -1,5 +1,4 @@ -import { Provider } from '@ethersproject/abstract-provider'; -import { Signer } from 'ethers'; +import { ContractRunner } from 'ethers'; import { NetworkData } from './types'; /** @@ -9,17 +8,17 @@ import { NetworkData } from './types'; * */ export abstract class BaseEthersClient { - protected signerOrProvider: Signer | Provider; + protected runner: ContractRunner; public networkData: NetworkData; /** * **BaseClient constructor** * - * @param {Signer | Provider} signerOrProvider The Signer or Provider object to interact with the Ethereum network + * @param {ContractRunner} runner The Signer or Provider object to interact with the Ethereum network * @param {NetworkData} networkData The network information required to connect to the contracts */ - constructor(signerOrProvider: Signer | Provider, networkData: NetworkData) { + constructor(runner: ContractRunner, networkData: NetworkData) { this.networkData = networkData; - this.signerOrProvider = signerOrProvider; + this.runner = runner; } } diff --git a/packages/sdk/typescript/human-protocol-sdk/src/decorators.ts b/packages/sdk/typescript/human-protocol-sdk/src/decorators.ts index c3c783012e..d5cb059f44 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/decorators.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/decorators.ts @@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { Signer } from 'ethers'; import { ErrorSigner } from './error'; export function requiresSigner( @@ -10,7 +9,9 @@ export function requiresSigner( const originalMethod = descriptor.value; descriptor.value = async function (this: any, ...args: any[]) { - if (!Signer.isSigner(this.signerOrProvider)) { + try { + !this.runner.getAddress(); + } catch { throw ErrorSigner; } diff --git a/packages/sdk/typescript/human-protocol-sdk/src/error.ts b/packages/sdk/typescript/human-protocol-sdk/src/error.ts index b433dddd58..8b14e80c79 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/error.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/error.ts @@ -283,18 +283,6 @@ export class InvalidArgumentError extends EthereumError { } } -export class OutOfGasError extends EthereumError { - constructor(message: string) { - super(`Out of gas: ${message}`); - } -} - -export class UnpredictableGasLimit extends EthereumError { - constructor(message: string) { - super(`Unpredictable gas limit: ${message}`); - } -} - export class ReplacementUnderpriced extends EthereumError { constructor(message: string) { super(`Replacement underpriced: ${message}`); diff --git a/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts b/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts index 7201a6a87d..f9b65a93cc 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/escrow.ts @@ -1,6 +1,4 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { Provider } from '@ethersproject/abstract-provider'; -import { Network } from '@ethersproject/networks'; import { Escrow, EscrowFactory, @@ -9,7 +7,7 @@ import { HMToken, HMToken__factory, } from '@human-protocol/core/typechain-types'; -import { BigNumber, ContractReceipt, Overrides, Signer, ethers } from 'ethers'; +import { ContractRunner, EventLog, Overrides, ethers } from 'ethers'; import gqlFetch from 'graphql-request'; import { BaseEthersClient } from './base'; import { DEFAULT_TX_ID, NETWORKS } from './constants'; @@ -21,43 +19,43 @@ import { ErrorEscrowAddressIsNotProvidedByFactory, ErrorEscrowDoesNotHaveEnoughBalance, ErrorHashIsEmptyString, - ErrorProviderDoesNotExist, - ErrorUnsupportedChainID, ErrorInvalidAddress, ErrorInvalidEscrowAddressProvided, + ErrorInvalidExchangeOracleAddressProvided, ErrorInvalidRecordingOracleAddressProvided, ErrorInvalidReputationOracleAddressProvided, ErrorInvalidTokenAddress, ErrorInvalidUrl, ErrorLaunchedEventIsNotEmitted, ErrorListOfHandlersCannotBeEmpty, + ErrorProviderDoesNotExist, ErrorRecipientAndAmountsMustBeSameLength, ErrorRecipientCannotBeEmptyArray, ErrorTotalFeeMustBeLessThanHundred, + ErrorTransferEventNotFoundInTransactionLogs, + ErrorUnsupportedChainID, ErrorUrlIsEmptyString, InvalidEthereumAddressError, - ErrorInvalidExchangeOracleAddressProvided, - ErrorTransferEventNotFoundInTransactionLogs, } from './error'; -import { IEscrowConfig, IEscrowsFilter } from './interfaces'; -import { EscrowCancel, EscrowStatus, NetworkData } from './types'; -import { isValidUrl, throwError } from './utils'; import { EscrowData, GET_ESCROWS_QUERY, GET_ESCROW_BY_ADDRESS_QUERY, } from './graphql'; +import { IEscrowConfig, IEscrowsFilter } from './interfaces'; +import { EscrowCancel, EscrowStatus, NetworkData } from './types'; +import { isValidUrl, throwError } from './utils'; /** * ## Introduction * * This client enables to perform actions on Escrow contracts and obtain information from both the contracts and subgraph. * - * Internally, the SDK will use one network or another according to the network ID of the `signerOrProvider`. + * Internally, the SDK will use one network or another according to the network ID of the `runner`. * To use this client, it is recommended to initialize it using the static `build` method. * * ```ts - * static async build(signerOrProvider: Signer | Provider); + * static async build(runner: ContractRunner); * ``` * * A `Signer` or a `Provider` should be passed depending on the use case of this module: @@ -123,47 +121,42 @@ export class EscrowClient extends BaseEthersClient { /** * **EscrowClient constructor** * - * @param {Signer | Provider} signerOrProvider The Signer or Provider object to interact with the Ethereum network + * @param {ContractRunner} runner The Runner object to interact with the Ethereum network * @param {NetworkData} network The network information required to connect to the Escrow contract */ - constructor(signerOrProvider: Signer | Provider, networkData: NetworkData) { - super(signerOrProvider, networkData); + constructor(runner: ContractRunner, networkData: NetworkData) { + super(runner, networkData); this.escrowFactoryContract = EscrowFactory__factory.connect( networkData.factoryAddress, - signerOrProvider + runner ); } /** - * Creates an instance of EscrowClient from a Signer or Provider. + * Creates an instance of EscrowClient from a Runner. * - * @param {Signer | Provider} signerOrProvider The Signer or Provider object to interact with the Ethereum network + * @param {ContractRunner} runner The Runner object to interact with the Ethereum network * * @returns {Promise} An instance of EscrowClient * @throws {ErrorProviderDoesNotExist} Thrown if the provider does not exist for the provided Signer * @throws {ErrorUnsupportedChainID} Thrown if the network's chainId is not supported */ - public static async build(signerOrProvider: Signer | Provider) { - let network: Network; - if (Signer.isSigner(signerOrProvider)) { - if (!signerOrProvider.provider) { - throw ErrorProviderDoesNotExist; - } - - network = await signerOrProvider.provider.getNetwork(); - } else { - network = await signerOrProvider.getNetwork(); + public static async build(runner: ContractRunner) { + if (!runner.provider) { + throw ErrorProviderDoesNotExist; } - const chainId: ChainId = network.chainId; + const network = await runner.provider?.getNetwork(); + + const chainId: ChainId = Number(network?.chainId); const networkData = NETWORKS[chainId]; if (!networkData) { throw ErrorUnsupportedChainID; } - return new EscrowClient(signerOrProvider, networkData); + return new EscrowClient(runner, networkData); } /** @@ -173,7 +166,7 @@ export class EscrowClient extends BaseEthersClient { */ private getEscrowContract(escrowAddress: string): Escrow { try { - return Escrow__factory.connect(escrowAddress, this.signerOrProvider); + return Escrow__factory.connect(escrowAddress, this.runner); } catch (e) { return throwError(e); } @@ -217,18 +210,18 @@ export class EscrowClient extends BaseEthersClient { jobRequesterId: string, txOptions: Overrides = {} ): Promise { - if (!ethers.utils.isAddress(tokenAddress)) { + if (!ethers.isAddress(tokenAddress)) { throw ErrorInvalidTokenAddress; } trustedHandlers.forEach((trustedHandler) => { - if (!ethers.utils.isAddress(trustedHandler)) { + if (!ethers.isAddress(trustedHandler)) { throw new InvalidEthereumAddressError(trustedHandler); } }); try { - const result: ContractReceipt = await ( + const result = await ( await this.escrowFactoryContract.createEscrow( tokenAddress, trustedHandlers, @@ -237,8 +230,10 @@ export class EscrowClient extends BaseEthersClient { ) ).wait(); - const event = result.events?.find(({ topics }) => - topics.includes(ethers.utils.id('LaunchedV2(address,address,string)')) + const event = ( + result?.logs?.find(({ topics }) => + topics.includes(ethers.id('LaunchedV2(address,address,string)')) + ) as EventLog )?.args; if (!event) { @@ -280,9 +275,9 @@ export class EscrowClient extends BaseEthersClient { * recordingOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', * reputationOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', * exchangeOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', - * recordingOracleFee: BigNumber.from('10'), - * reputationOracleFee: BigNumber.from('10'), - * exchangeOracleFee: BigNumber.from('10'), + * recordingOracleFee: bigint.from('10'), + * reputationOracleFee: bigint.from('10'), + * exchangeOracleFee: bigint.from('10'), * manifestUrl: 'htttp://localhost/manifest.json', * manifestHash: 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079', * }; @@ -306,33 +301,31 @@ export class EscrowClient extends BaseEthersClient { manifestHash, } = escrowConfig; - if (!ethers.utils.isAddress(recordingOracle)) { + if (!ethers.isAddress(recordingOracle)) { throw ErrorInvalidRecordingOracleAddressProvided; } - if (!ethers.utils.isAddress(reputationOracle)) { + if (!ethers.isAddress(reputationOracle)) { throw ErrorInvalidReputationOracleAddressProvided; } - if (!ethers.utils.isAddress(exchangeOracle)) { + if (!ethers.isAddress(exchangeOracle)) { throw ErrorInvalidExchangeOracleAddressProvided; } - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } if ( - recordingOracleFee.lte(0) || - reputationOracleFee.lte(0) || - exchangeOracleFee.lte(0) + recordingOracleFee <= 0 || + reputationOracleFee <= 0 || + exchangeOracleFee <= 0 ) { throw ErrorAmountMustBeGreaterThanZero; } - if ( - recordingOracleFee.add(reputationOracleFee).add(exchangeOracleFee).gt(100) - ) { + if (recordingOracleFee + reputationOracleFee + exchangeOracleFee > 100) { throw ErrorTotalFeeMustBeLessThanHundred; } @@ -406,9 +399,9 @@ export class EscrowClient extends BaseEthersClient { * recordingOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', * reputationOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', * exchangeOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', - * recordingOracleFee: BigNumber.from('10'), - * reputationOracleFee: BigNumber.from('10'), - * exchangeOracleFee: BigNumber.from('10'), + * recordingOracleFee: bigint.from('10'), + * reputationOracleFee: bigint.from('10'), + * exchangeOracleFee: bigint.from('10'), * manifestUrl: 'htttp://localhost/manifest.json', * manifestHash: 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079', * }; @@ -442,7 +435,7 @@ export class EscrowClient extends BaseEthersClient { * This function adds funds of the chosen token to the escrow. * * @param {string} escrowAddress Address of the escrow to fund. - * @param {BigNumber} amount Amount to be added as funds. + * @param {bigint} amount Amount to be added as funds. * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object). * @returns Returns void if successful. Throws error if any. * @@ -460,21 +453,21 @@ export class EscrowClient extends BaseEthersClient { * const signer = new Wallet(privateKey, provider); * const escrowClient = await EscrowClient.build(signer); * - * const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI + * const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI * await escrowClient.fund('0x62dD51230A30401C455c8398d06F85e4EaB6309f', amount); * ``` */ @requiresSigner async fund( escrowAddress: string, - amount: BigNumber, + amount: bigint, txOptions: Overrides = {} ): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } - if (amount.lte(0)) { + if (amount <= 0n) { throw ErrorAmountMustBeGreaterThanZero; } @@ -489,7 +482,7 @@ export class EscrowClient extends BaseEthersClient { const tokenContract: HMToken = HMToken__factory.connect( tokenAddress, - this.signerOrProvider + this.runner ); await ( await tokenContract.transfer(escrowAddress, amount, txOptions) @@ -536,7 +529,7 @@ export class EscrowClient extends BaseEthersClient { hash: string, txOptions: Overrides = {} ): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -598,7 +591,7 @@ export class EscrowClient extends BaseEthersClient { escrowAddress: string, txOptions: Overrides = {} ): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -621,7 +614,7 @@ export class EscrowClient extends BaseEthersClient { * * @param {string} escrowAddress Escrow address to payout. * @param {string[]} recipients Array of recipient addresses. - * @param {BigNumber[]} amounts Array of amounts the recipients will receive. + * @param {bigint[]} amounts Array of amounts the recipients will receive. * @param {string} finalResultsUrl Final results file url. * @param {string} finalResultsHash Final results file hash. * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object). @@ -644,7 +637,7 @@ export class EscrowClient extends BaseEthersClient { * const escrowClient = await EscrowClient.build(signer); * * const recipients = ['0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266']; - * const amounts = [ethers.utils.parseUnits(5, 'ether'), ethers.utils.parseUnits(10, 'ether')]; + * const amounts = [ethers.parseUnits(5, 'ether'), ethers.parseUnits(10, 'ether')]; * const resultsUrl = 'http://localhost/results.json'; * const resultsHash'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079'; * @@ -655,12 +648,12 @@ export class EscrowClient extends BaseEthersClient { async bulkPayOut( escrowAddress: string, recipients: string[], - amounts: BigNumber[], + amounts: bigint[], finalResultsUrl: string, finalResultsHash: string, txOptions: Overrides = {} ): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -677,7 +670,7 @@ export class EscrowClient extends BaseEthersClient { } recipients.forEach((recipient) => { - if (!ethers.utils.isAddress(recipient)) { + if (!ethers.isAddress(recipient)) { throw new InvalidEthereumAddressError(recipient); } }); @@ -696,12 +689,12 @@ export class EscrowClient extends BaseEthersClient { const balance = await this.getBalance(escrowAddress); - let totalAmount = BigNumber.from(0); + let totalAmount = 0n; amounts.forEach((amount) => { - totalAmount = totalAmount.add(amount); + totalAmount = totalAmount + amount; }); - if (balance.lt(totalAmount)) { + if (balance < totalAmount) { throw ErrorEscrowDoesNotHaveEnoughBalance; } @@ -759,7 +752,7 @@ export class EscrowClient extends BaseEthersClient { escrowAddress: string, txOptions: Overrides = {} ): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -774,32 +767,35 @@ export class EscrowClient extends BaseEthersClient { await escrowContract.cancel(txOptions) ).wait(); - let amountTransferred: BigNumber | undefined = undefined; + let amountTransferred: bigint | undefined = undefined; const tokenAddress = await escrowContract.token(); const tokenContract: HMToken = HMToken__factory.connect( tokenAddress, - this.signerOrProvider + this.runner ); - - for (const log of transactionReceipt.logs) { - if (log.address === tokenAddress) { - const parsedLog = tokenContract.interface.parseLog(log); - - const from = parsedLog.args[0]; - if (parsedLog.name === 'Transfer' && from === escrowAddress) { - amountTransferred = parsedLog.args[2]; - break; + if (transactionReceipt) + for (const log of transactionReceipt.logs) { + if (log.address === tokenAddress) { + const parsedLog = tokenContract.interface.parseLog({ + topics: log.topics as string[], + data: log.data, + }); + + const from = parsedLog?.args[0]; + if (parsedLog?.name === 'Transfer' && from === escrowAddress) { + amountTransferred = parsedLog?.args[2]; + break; + } } } - } if (amountTransferred === undefined) { throw ErrorTransferEventNotFoundInTransactionLogs; } const escrowCancelData: EscrowCancel = { - txHash: transactionReceipt.transactionHash, + txHash: transactionReceipt?.hash || '', amountRefunded: amountTransferred, }; @@ -837,7 +833,7 @@ export class EscrowClient extends BaseEthersClient { */ @requiresSigner async abort(escrowAddress: string, txOptions: Overrides = {}): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -889,7 +885,7 @@ export class EscrowClient extends BaseEthersClient { trustedHandlers: string[], txOptions: Overrides = {} ): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -898,7 +894,7 @@ export class EscrowClient extends BaseEthersClient { } trustedHandlers.forEach((trustedHandler) => { - if (!ethers.utils.isAddress(trustedHandler)) { + if (!ethers.isAddress(trustedHandler)) { throw new InvalidEthereumAddressError(trustedHandler); } }); @@ -923,7 +919,7 @@ export class EscrowClient extends BaseEthersClient { * This function returns the balance for a specified escrow address. * * @param {string} escrowAddress Address of the escrow. - * @returns {BigNumber} Balance of the escrow in the token used to fund it. + * @returns {bigint} Balance of the escrow in the token used to fund it. * * **Code example** * @@ -939,8 +935,8 @@ export class EscrowClient extends BaseEthersClient { * const balance = await escrowClient.getBalance('0x62dD51230A30401C455c8398d06F85e4EaB6309f'); * ``` */ - async getBalance(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + async getBalance(escrowAddress: string): Promise { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -978,7 +974,7 @@ export class EscrowClient extends BaseEthersClient { * ``` */ async getManifestHash(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -1016,7 +1012,7 @@ export class EscrowClient extends BaseEthersClient { * ``` */ async getManifestUrl(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -1054,7 +1050,7 @@ export class EscrowClient extends BaseEthersClient { * ``` */ async getResultsUrl(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -1092,7 +1088,7 @@ export class EscrowClient extends BaseEthersClient { * ``` */ async getIntermediateResultsUrl(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -1130,7 +1126,7 @@ export class EscrowClient extends BaseEthersClient { * ``` */ async getTokenAddress(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -1168,7 +1164,7 @@ export class EscrowClient extends BaseEthersClient { * ``` */ async getStatus(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -1179,7 +1175,7 @@ export class EscrowClient extends BaseEthersClient { try { const escrowContract = this.getEscrowContract(escrowAddress); - return escrowContract.status(); + return Number(await escrowContract.status()); } catch (e) { return throwError(e); } @@ -1206,7 +1202,7 @@ export class EscrowClient extends BaseEthersClient { * ``` */ async getRecordingOracleAddress(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -1244,7 +1240,7 @@ export class EscrowClient extends BaseEthersClient { * ``` */ async getJobLauncherAddress(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -1282,7 +1278,7 @@ export class EscrowClient extends BaseEthersClient { * ``` */ async getReputationOracleAddress(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -1320,7 +1316,7 @@ export class EscrowClient extends BaseEthersClient { * ``` */ async getExchangeOracleAddress(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -1358,7 +1354,7 @@ export class EscrowClient extends BaseEthersClient { * ``` */ async getFactoryAddress(escrowAddress: string): Promise { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -1511,28 +1507,19 @@ export class EscrowUtils { if (!filter?.networks?.length) { throw ErrorUnsupportedChainID; } - if (filter.launcher && !ethers.utils.isAddress(filter.launcher)) { + if (filter.launcher && !ethers.isAddress(filter.launcher)) { throw ErrorInvalidAddress; } - if ( - filter.recordingOracle && - !ethers.utils.isAddress(filter.recordingOracle) - ) { + if (filter.recordingOracle && !ethers.isAddress(filter.recordingOracle)) { throw ErrorInvalidAddress; } - if ( - filter.reputationOracle && - !ethers.utils.isAddress(filter.reputationOracle) - ) { + if (filter.reputationOracle && !ethers.isAddress(filter.reputationOracle)) { throw ErrorInvalidAddress; } - if ( - filter.exchangeOracle && - !ethers.utils.isAddress(filter.exchangeOracle) - ) { + if (filter.exchangeOracle && !ethers.isAddress(filter.exchangeOracle)) { throw ErrorInvalidAddress; } @@ -1652,7 +1639,7 @@ export class EscrowUtils { throw ErrorUnsupportedChainID; } - if (escrowAddress && !ethers.utils.isAddress(escrowAddress)) { + if (escrowAddress && !ethers.isAddress(escrowAddress)) { throw ErrorInvalidAddress; } diff --git a/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts b/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts index e23165f5bf..251c86a467 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/graphql/types.ts @@ -1,5 +1,3 @@ -import { BigNumber } from 'ethers'; - export type EscrowData = { id: string; address: string; @@ -108,9 +106,9 @@ export type WorkerStatistics = { export type DailyPaymentData = { timestamp: Date; - totalAmountPaid: BigNumber; + totalAmountPaid: bigint; totalCount: number; - averageAmountPerWorker: BigNumber; + averageAmountPerWorker: bigint; }; export type PaymentStatistics = { @@ -124,17 +122,17 @@ export type HMTHolderData = { export type HMTHolder = { address: string; - balance: BigNumber; + balance: bigint; }; export type DailyHMTData = { timestamp: Date; - totalTransactionAmount: BigNumber; + totalTransactionAmount: bigint; totalTransactionCount: number; }; export type HMTStatistics = { - totalTransferAmount: BigNumber; + totalTransferAmount: bigint; totalTransferCount: number; totalHolders: number; holders: HMTHolder[]; diff --git a/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts b/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts index 3e204b8ad5..917a764fb4 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/interfaces.ts @@ -1,34 +1,33 @@ -import { BigNumber } from 'ethers'; import { EscrowStatus } from './types'; import { ChainId } from './enums'; export interface IAllocation { escrowAddress: string; staker: string; - tokens: BigNumber; - createdAt: BigNumber; - closedAt: BigNumber; + tokens: bigint; + createdAt: bigint; + closedAt: bigint; } export interface IReward { escrowAddress: string; - amount: BigNumber; + amount: bigint; } export interface ILeader { id: string; address: string; - amountStaked: BigNumber; - amountAllocated: BigNumber; - amountLocked: BigNumber; - lockedUntilTimestamp: BigNumber; - amountWithdrawn: BigNumber; - amountSlashed: BigNumber; - reputation: BigNumber; - reward: BigNumber; - amountJobsLaunched: BigNumber; + amountStaked: bigint; + amountAllocated: bigint; + amountLocked: bigint; + lockedUntilTimestamp: bigint; + amountWithdrawn: bigint; + amountSlashed: bigint; + reputation: bigint; + reward: bigint; + amountJobsLaunched: bigint; role?: string; - fee?: BigNumber; + fee?: bigint; publicKey?: string; webhookUrl?: string; url?: string; @@ -54,9 +53,9 @@ export interface IEscrowConfig { recordingOracle: string; reputationOracle: string; exchangeOracle: string; - recordingOracleFee: BigNumber; - reputationOracleFee: BigNumber; - exchangeOracleFee: BigNumber; + recordingOracleFee: bigint; + reputationOracleFee: bigint; + exchangeOracleFee: bigint; manifestUrl: string; manifestHash: string; } diff --git a/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts b/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts index 461620d543..c9c989699b 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/kvstore.ts @@ -1,10 +1,8 @@ -import { Provider } from '@ethersproject/abstract-provider'; -import { Network } from '@ethersproject/networks'; import { KVStore, KVStore__factory, } from '@human-protocol/core/typechain-types'; -import { Overrides, Signer, ethers } from 'ethers'; +import { ContractRunner, Overrides, ethers } from 'ethers'; import { BaseEthersClient } from './base'; import { NETWORKS } from './constants'; import { requiresSigner } from './decorators'; @@ -16,7 +14,6 @@ import { ErrorKVStoreArrayLength, ErrorKVStoreEmptyKey, ErrorProviderDoesNotExist, - ErrorSigner, ErrorUnsupportedChainID, } from './error'; import { NetworkData } from './types'; @@ -27,11 +24,11 @@ import { isValidUrl } from './utils'; * * This client enables to perform actions on KVStore contract and obtain information from both the contracts and subgraph. * - * Internally, the SDK will use one network or another according to the network ID of the `signerOrProvider`. + * Internally, the SDK will use one network or another according to the network ID of the `runner`. * To use this client, it is recommended to initialize it using the static `build` method. * * ```ts - * static async build(signerOrProvider: Signer | Provider); + * static async build(runner: ContractRunner); * ``` * * A `Signer` or a `Provider` should be passed depending on the use case of this module: @@ -97,47 +94,42 @@ export class KVStoreClient extends BaseEthersClient { /** * **KVStoreClient constructor** * - * @param {Signer | Provider} signerOrProvider - The Signer or Provider object to interact with the Ethereum network + * @param {ContractRunner} runner - The Runner object to interact with the Ethereum network * @param {NetworkData} network - The network information required to connect to the KVStore contract */ - constructor(signerOrProvider: Signer | Provider, networkData: NetworkData) { - super(signerOrProvider, networkData); + constructor(runner: ContractRunner, networkData: NetworkData) { + super(runner, networkData); this.contract = KVStore__factory.connect( networkData.kvstoreAddress, - signerOrProvider + runner ); } /** - * Creates an instance of KVStoreClient from a Signer or Provider. + * Creates an instance of KVStoreClient from a runner. * - * @param {Signer | Provider} signerOrProvider - The Signer or Provider object to interact with the Ethereum network + * @param {ContractRunner} runner - The Runner object to interact with the Ethereum network * * @returns {Promise} - An instance of KVStoreClient * @throws {ErrorProviderDoesNotExist} - Thrown if the provider does not exist for the provided Signer * @throws {ErrorUnsupportedChainID} - Thrown if the network's chainId is not supported */ - public static async build(signerOrProvider: Signer | Provider) { - let network: Network; - if (Signer.isSigner(signerOrProvider)) { - if (!signerOrProvider.provider) { - throw ErrorProviderDoesNotExist; - } - - network = await signerOrProvider.provider.getNetwork(); - } else { - network = await signerOrProvider.getNetwork(); + public static async build(runner: ContractRunner) { + if (!runner.provider) { + throw ErrorProviderDoesNotExist; } - const chainId: ChainId = network.chainId; + const network = await runner.provider?.getNetwork(); + + const chainId: ChainId = Number(network?.chainId); const networkData = NETWORKS[chainId]; if (!networkData) { throw ErrorUnsupportedChainID; } - return new KVStoreClient(signerOrProvider, networkData); + return new KVStoreClient(runner, networkData); } /** @@ -173,7 +165,6 @@ export class KVStoreClient extends BaseEthersClient { value: string, txOptions: Overrides = {} ): Promise { - if (!Signer.isSigner(this.signerOrProvider)) throw ErrorSigner; if (key === '') throw ErrorKVStoreEmptyKey; try { await (await this.contract.set(key, value, txOptions)).wait(); @@ -217,7 +208,6 @@ export class KVStoreClient extends BaseEthersClient { values: string[], txOptions: Overrides = {} ): Promise { - if (!Signer.isSigner(this.signerOrProvider)) throw ErrorSigner; if (keys.length !== values.length) throw ErrorKVStoreArrayLength; if (keys.includes('')) throw ErrorKVStoreEmptyKey; @@ -261,18 +251,12 @@ export class KVStoreClient extends BaseEthersClient { urlKey = 'url', txOptions: Overrides = {} ): Promise { - if (!Signer.isSigner(this.signerOrProvider)) { - throw ErrorSigner; - } - if (!isValidUrl(url)) { throw ErrorInvalidUrl; } const content = await fetch(url).then((res) => res.text()); - const contentHash = ethers.utils.keccak256( - ethers.utils.toUtf8Bytes(content) - ); + const contentHash = ethers.keccak256(ethers.toUtf8Bytes(content)); const hashKey = urlKey + 'Hash'; @@ -316,7 +300,7 @@ export class KVStoreClient extends BaseEthersClient { */ public async get(address: string, key: string): Promise { if (key === '') throw ErrorKVStoreEmptyKey; - if (!ethers.utils.isAddress(address)) throw ErrorInvalidAddress; + if (!ethers.isAddress(address)) throw ErrorInvalidAddress; try { const result = await this.contract?.get(address, key); @@ -354,7 +338,7 @@ export class KVStoreClient extends BaseEthersClient { * ``` */ public async getURL(address: string, urlKey = 'url'): Promise { - if (!ethers.utils.isAddress(address)) throw ErrorInvalidAddress; + if (!ethers.isAddress(address)) throw ErrorInvalidAddress; const hashKey = urlKey + 'Hash'; let url = '', @@ -378,9 +362,7 @@ export class KVStoreClient extends BaseEthersClient { } const content = await fetch(url).then((res) => res.text()); - const contentHash = ethers.utils.keccak256( - ethers.utils.toUtf8Bytes(content) - ); + const contentHash = ethers.keccak256(ethers.toUtf8Bytes(content)); if (hash !== contentHash) { throw ErrorInvalidHash; diff --git a/packages/sdk/typescript/human-protocol-sdk/src/staking.ts b/packages/sdk/typescript/human-protocol-sdk/src/staking.ts index 35033ebdd1..ef6c81160c 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/staking.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/staking.ts @@ -1,6 +1,4 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { Provider } from '@ethersproject/abstract-provider'; -import { Network } from '@ethersproject/networks'; import { EscrowFactory, EscrowFactory__factory, @@ -11,7 +9,7 @@ import { Staking, Staking__factory, } from '@human-protocol/core/typechain-types'; -import { BigNumber, Overrides, Signer, ethers } from 'ethers'; +import { ContractRunner, Overrides, ethers } from 'ethers'; import gqlFetch from 'graphql-request'; import { BaseEthersClient } from './base'; import { NETWORKS } from './constants'; @@ -39,11 +37,11 @@ import { GET_LEADER_QUERY, GET_LEADERS_QUERY } from './graphql/queries/staking'; * * This client enables to perform actions on staking contracts and obtain staking information from both the contracts and subgraph. * - * Internally, the SDK will use one network or another according to the network ID of the `signerOrProvider`. + * Internally, the SDK will use one network or another according to the network ID of the `runner`. * To use this client, it is recommended to initialize it using the static `build` method. * * ```ts - * static async build(signerOrProvider: Signer | Provider); + * static async build(runner: ContractRunner); * ``` * * A `Signer` or a `Provider` should be passed depending on the use case of this module: @@ -112,63 +110,58 @@ export class StakingClient extends BaseEthersClient { /** * **StakingClient constructor** * - * @param {Signer | Provider} signerOrProvider - The Signer or Provider object to interact with the Ethereum network + * @param {ContractRunner} runner - The Runner object to interact with the Ethereum network * @param {NetworkData} network - The network information required to connect to the Staking contract */ - constructor(signerOrProvider: Signer | Provider, networkData: NetworkData) { - super(signerOrProvider, networkData); + constructor(runner: ContractRunner, networkData: NetworkData) { + super(runner, networkData); this.stakingContract = Staking__factory.connect( networkData.stakingAddress, - signerOrProvider + runner ); this.escrowFactoryContract = EscrowFactory__factory.connect( networkData.factoryAddress, - signerOrProvider + runner ); this.tokenContract = HMToken__factory.connect( networkData.hmtAddress, - signerOrProvider + runner ); this.rewardPoolContract = RewardPool__factory.connect( networkData.rewardPoolAddress, - this.signerOrProvider + this.runner ); } /** - * Creates an instance of StakingClient from a Signer or Provider. + * Creates an instance of StakingClient from a Runner. * - * @param {Signer | Provider} signerOrProvider - The Signer or Provider object to interact with the Ethereum network + * @param {ContractRunner} runner - The Runner object to interact with the Ethereum network * @param {number | undefined} gasPriceMultiplier - The multiplier to apply to the gas price * * @returns {Promise} - An instance of StakingClient * @throws {ErrorProviderDoesNotExist} - Thrown if the provider does not exist for the provided Signer * @throws {ErrorUnsupportedChainID} - Thrown if the network's chainId is not supported */ - public static async build(signerOrProvider: Signer | Provider) { - let network: Network; - if (Signer.isSigner(signerOrProvider)) { - if (!signerOrProvider.provider) { - throw ErrorProviderDoesNotExist; - } - - network = await signerOrProvider.provider.getNetwork(); - } else { - network = await signerOrProvider.getNetwork(); + public static async build(runner: ContractRunner) { + if (!runner.provider) { + throw ErrorProviderDoesNotExist; } - const chainId: ChainId = network.chainId; + const network = await runner.provider?.getNetwork(); + + const chainId: ChainId = Number(network?.chainId); const networkData = NETWORKS[chainId]; if (!networkData) { throw ErrorUnsupportedChainID; } - return new StakingClient(signerOrProvider, networkData); + return new StakingClient(runner, networkData); } /** @@ -177,7 +170,7 @@ export class StakingClient extends BaseEthersClient { * @param escrowAddress Escrow address to check against */ private async checkValidEscrow(escrowAddress: string) { - if (!ethers.utils.isAddress(escrowAddress)) { + if (!ethers.isAddress(escrowAddress)) { throw ErrorInvalidEscrowAddressProvided; } @@ -189,7 +182,7 @@ export class StakingClient extends BaseEthersClient { /** * This function approves the staking contract to transfer a specified amount of tokens when the user stakes. It increases the allowance for the staking contract. * - * @param {BigNumber} amount Amount in WEI of tokens to approve for stake. + * @param {bigint} amount Amount in WEI of tokens to approve for stake. * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object). * @returns Returns void if successful. Throws error if any. * @@ -207,27 +200,27 @@ export class StakingClient extends BaseEthersClient { * const signer = new Wallet(privateKey, provider); * const stakingClient = await StakingClient.build(signer); * - * const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI + * const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI * await stakingClient.approveStake(amount); * ``` */ @requiresSigner public async approveStake( - amount: BigNumber, + amount: bigint, txOptions: Overrides = {} ): Promise { - if (!BigNumber.isBigNumber(amount)) { + if (typeof amount !== 'bigint') { throw ErrorInvalidStakingValueType; } - if (amount.isNegative()) { + if (amount < 0n) { throw ErrorInvalidStakingValueSign; } try { await ( await this.tokenContract.approve( - this.stakingContract.address, + await this.stakingContract.getAddress(), amount, txOptions ) @@ -243,7 +236,7 @@ export class StakingClient extends BaseEthersClient { * * > `approveStake` must be called before * - * @param {BigNumber} amount Amount in WEI of tokens to stake. + * @param {bigint} amount Amount in WEI of tokens to stake. * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object). * @returns Returns void if successful. Throws error if any. * @@ -261,21 +254,18 @@ export class StakingClient extends BaseEthersClient { * const signer = new Wallet(privateKey, provider); * const stakingClient = await StakingClient.build(signer); * - * const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI + * const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI * await stakingClient.approveStake(amount); // if it was already approved before, this is not necessary * await stakingClient.approveStake(amount); * ``` */ @requiresSigner - public async stake( - amount: BigNumber, - txOptions: Overrides = {} - ): Promise { - if (!BigNumber.isBigNumber(amount)) { + public async stake(amount: bigint, txOptions: Overrides = {}): Promise { + if (typeof amount !== 'bigint') { throw ErrorInvalidStakingValueType; } - if (amount.isNegative()) { + if (amount < 0n) { throw ErrorInvalidStakingValueSign; } @@ -292,7 +282,7 @@ export class StakingClient extends BaseEthersClient { * * > Must have tokens available to unstake * - * @param {BigNumber} amount Amount in WEI of tokens to unstake. + * @param {bigint} amount Amount in WEI of tokens to unstake. * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object). * @returns Returns void if successful. Throws error if any. * @@ -310,20 +300,20 @@ export class StakingClient extends BaseEthersClient { * const signer = new Wallet(privateKey, provider); * const stakingClient = await StakingClient.build(signer); * - * const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI + * const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI * await stakingClient.unstake(amount); * ``` */ @requiresSigner public async unstake( - amount: BigNumber, + amount: bigint, txOptions: Overrides = {} ): Promise { - if (!BigNumber.isBigNumber(amount)) { + if (typeof amount !== 'bigint') { throw ErrorInvalidStakingValueType; } - if (amount.isNegative()) { + if (amount < 0n) { throw ErrorInvalidStakingValueSign; } @@ -377,7 +367,7 @@ export class StakingClient extends BaseEthersClient { * @param {string} staker Wallet address from who is going to be slashed * @param {string} escrowAddress Address of the escrow which allocation will be slashed * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object). - * @param {BigNumber} amount Amount in WEI of tokens to unstake. + * @param {bigint} amount Amount in WEI of tokens to unstake. * @returns Returns void if successful. Throws error if any. * * @@ -394,7 +384,7 @@ export class StakingClient extends BaseEthersClient { * const signer = new Wallet(privateKey, provider); * const stakingClient = await StakingClient.build(signer); * - * const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI + * const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI * await stakingClient.slash('0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0x62dD51230A30401C455c8398d06F85e4EaB6309f', amount); * ``` */ @@ -403,22 +393,22 @@ export class StakingClient extends BaseEthersClient { slasher: string, staker: string, escrowAddress: string, - amount: BigNumber, + amount: bigint, txOptions: Overrides = {} ): Promise { - if (!BigNumber.isBigNumber(amount)) { + if (typeof amount !== 'bigint') { throw ErrorInvalidStakingValueType; } - if (amount.isNegative()) { + if (amount < 0n) { throw ErrorInvalidStakingValueSign; } - if (!ethers.utils.isAddress(slasher)) { + if (!ethers.isAddress(slasher)) { throw ErrorInvalidSlasherAddressProvided; } - if (!ethers.utils.isAddress(staker)) { + if (!ethers.isAddress(staker)) { throw ErrorInvalidStakerAddressProvided; } @@ -448,7 +438,7 @@ export class StakingClient extends BaseEthersClient { * * @param {string} escrowAddress Address of the escrow contract to allocate in. * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object). - * @param {BigNumber} amount Amount in WEI of tokens to allocate. + * @param {bigint} amount Amount in WEI of tokens to allocate. * @returns Returns void if successful. Throws error if any. * * @@ -465,21 +455,21 @@ export class StakingClient extends BaseEthersClient { * const signer = new Wallet(privateKey, provider); * const stakingClient = await StakingClient.build(signer); * - * const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI + * const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI * await stakingClient.allocate('0x62dD51230A30401C455c8398d06F85e4EaB6309f', amount); * ``` */ @requiresSigner public async allocate( escrowAddress: string, - amount: BigNumber, + amount: bigint, txOptions: Overrides = {} ): Promise { - if (!BigNumber.isBigNumber(amount)) { + if (typeof amount !== 'bigint') { throw ErrorInvalidStakingValueType; } - if (amount.isNegative()) { + if (amount < 0n) { throw ErrorInvalidStakingValueSign; } @@ -604,7 +594,7 @@ export class StakingClient extends BaseEthersClient { * ``` */ public async getLeader(address: string): Promise { - if (!ethers.utils.isAddress(address)) { + if (!ethers.isAddress(address)) { throw ErrorInvalidStakerAddressProvided; } @@ -710,7 +700,7 @@ export class StakingClient extends BaseEthersClient { * ``` */ public async getRewards(slasherAddress: string): Promise { - if (!ethers.utils.isAddress(slasherAddress)) { + if (!ethers.isAddress(slasherAddress)) { throw ErrorInvalidSlasherAddressProvided; } diff --git a/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts b/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts index ce9fc01240..8e8d316449 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/statistics.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { BigNumber } from 'ethers'; +import { ethers } from 'ethers'; import gqlFetch from 'graphql-request'; import { @@ -296,14 +296,13 @@ export class StatisticsClient { return { dailyPaymentsData: eventDayDatas.map((eventDayData) => ({ timestamp: new Date(+eventDayData.timestamp * 1000), - totalAmountPaid: BigNumber.from(eventDayData.dailyPayoutAmount), + totalAmountPaid: ethers.toBigInt(eventDayData.dailyPayoutAmount), totalCount: +eventDayData.dailyPayoutCount, averageAmountPerWorker: eventDayData.dailyWorkerCount === '0' - ? BigNumber.from(0) - : BigNumber.from(eventDayData.dailyPayoutAmount).div( - eventDayData.dailyWorkerCount - ), + ? ethers.toBigInt(0) + : ethers.toBigInt(eventDayData.dailyPayoutAmount) / + ethers.toBigInt(eventDayData.dailyWorkerCount), })), }; } catch (e: any) { @@ -412,18 +411,18 @@ export class StatisticsClient { }); return { - totalTransferAmount: BigNumber.from( + totalTransferAmount: ethers.toBigInt( hmtokenStatistics.totalValueTransfered ), totalTransferCount: Number(hmtokenStatistics.totalTransferEventCount), totalHolders: +hmtokenStatistics.holders, holders: holders.map((holder) => ({ address: holder.address, - balance: BigNumber.from(holder.balance), + balance: ethers.toBigInt(holder.balance), })), dailyHMTData: eventDayDatas.map((eventDayData) => ({ timestamp: new Date(+eventDayData.timestamp * 1000), - totalTransactionAmount: BigNumber.from( + totalTransactionAmount: ethers.toBigInt( eventDayData.dailyHMTTransferAmount ), totalTransactionCount: +eventDayData.dailyHMTTransferCount, diff --git a/packages/sdk/typescript/human-protocol-sdk/src/types.ts b/packages/sdk/typescript/human-protocol-sdk/src/types.ts index 62a79bdb73..05dc8d5658 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/types.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/types.ts @@ -1,5 +1,3 @@ -import { BigNumber } from 'ethers'; - /** * Enum for escrow statuses. * @readonly @@ -150,5 +148,5 @@ export type EscrowCancel = { /** * The amount refunded in the escrow cancellation. */ - amountRefunded: BigNumber; + amountRefunded: bigint; }; diff --git a/packages/sdk/typescript/human-protocol-sdk/src/utils.ts b/packages/sdk/typescript/human-protocol-sdk/src/utils.ts index 977a55e41a..7838390123 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/utils.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/utils.ts @@ -7,10 +7,8 @@ import { InvalidArgumentError, NonceExpired, NumericFault, - OutOfGasError, ReplacementUnderpriced, TransactionReplaced, - UnpredictableGasLimit, } from './error'; /** @@ -35,22 +33,18 @@ export const getRevertReason = (error: any): string => { * @returns */ export const throwError = (e: any) => { - if (e.code === ethers.utils.Logger.errors.INVALID_ARGUMENT) { + if (ethers.isError(e, 'INVALID_ARGUMENT')) { throw new InvalidArgumentError(e.message); - } else if (e.code === 'OUT_OF_GAS') { - throw new OutOfGasError(e.message); - } else if (e.code === ethers.utils.Logger.errors.CALL_EXCEPTION) { + } else if (ethers.isError(e, 'CALL_EXCEPTION')) { const reason = getRevertReason(e.data); throw new ContractExecutionError(reason); - } else if (e.code === ethers.utils.Logger.errors.UNPREDICTABLE_GAS_LIMIT) { - throw new UnpredictableGasLimit(e.message); - } else if (e.code === ethers.utils.Logger.errors.TRANSACTION_REPLACED) { + } else if (ethers.isError(e, 'TRANSACTION_REPLACED')) { throw new TransactionReplaced(e.message); - } else if (e.code === ethers.utils.Logger.errors.REPLACEMENT_UNDERPRICED) { + } else if (ethers.isError(e, 'REPLACEMENT_UNDERPRICED')) { throw new ReplacementUnderpriced(e.message); - } else if (e.code === ethers.utils.Logger.errors.NUMERIC_FAULT) { + } else if (ethers.isError(e, 'NUMERIC_FAULT')) { throw new NumericFault(e.message); - } else if (e.code === ethers.utils.Logger.errors.NONCE_EXPIRED) { + } else if (ethers.isError(e, 'NONCE_EXPIRED')) { throw new NonceExpired(e.message); } else { throw new EthereumError(e.message); diff --git a/packages/sdk/typescript/human-protocol-sdk/test/escrow.test.ts b/packages/sdk/typescript/human-protocol-sdk/test/escrow.test.ts index f0b83de564..f071c33d70 100644 --- a/packages/sdk/typescript/human-protocol-sdk/test/escrow.test.ts +++ b/packages/sdk/typescript/human-protocol-sdk/test/escrow.test.ts @@ -4,7 +4,7 @@ import { Escrow__factory, HMToken__factory, } from '@human-protocol/core/typechain-types'; -import { BigNumber, Overrides, ethers } from 'ethers'; +import { Overrides, ethers } from 'ethers'; import * as gqlFetch from 'graphql-request'; import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; import { DEFAULT_TX_ID, NETWORKS } from '../src/constants'; @@ -51,7 +51,6 @@ vi.mock('graphql-request', () => { vi.mock('../src/init'); describe('EscrowClient', () => { - const provider = new ethers.providers.JsonRpcProvider(); let escrowClient: any, mockProvider: any, mockSigner: any, @@ -62,15 +61,13 @@ describe('EscrowClient', () => { beforeEach(async () => { mockProvider = { - ...provider, - getNetwork: vi.fn().mockReturnValue({ chainId: ChainId.LOCALHOST }), - }; - mockSigner = { - ...provider.getSigner(), provider: { - ...mockProvider, + getNetwork: vi.fn().mockResolvedValue({ chainId: ChainId.LOCALHOST }), }, - getAddress: vi.fn().mockReturnValue(ethers.constants.AddressZero), + }; + mockSigner = { + provider: mockProvider.provider, + getAddress: vi.fn().mockResolvedValue(ethers.ZeroAddress), }; mockEscrowContract = { @@ -92,7 +89,7 @@ describe('EscrowClient', () => { status: vi.fn(), getEscrow: vi.fn(), getEscrows: vi.fn(), - address: ethers.constants.AddressZero, + address: ethers.ZeroAddress, canceler: vi.fn(), recordingOracle: vi.fn(), reputationOracle: vi.fn(), @@ -147,9 +144,7 @@ describe('EscrowClient', () => { }); test('should create a new instance of EscrowClient with a Provider', async () => { - const provider = ethers.getDefaultProvider(); - - const escrowClient = await EscrowClient.build(provider); + const escrowClient = await EscrowClient.build(mockProvider); expect(escrowClient).toBeInstanceOf(EscrowClient); }); @@ -163,7 +158,7 @@ describe('EscrowClient', () => { }); test('should throw an error if the chain ID is unsupported', async () => { - const provider = ethers.getDefaultProvider(); + const provider = new ethers.JsonRpcProvider(); vi.spyOn(provider, 'getNetwork').mockResolvedValue({ chainId: 1337, @@ -180,32 +175,30 @@ describe('EscrowClient', () => { const invalidAddress = FAKE_ADDRESS; await expect( - escrowClient.createEscrow(invalidAddress, [ - ethers.constants.AddressZero, - ]) + escrowClient.createEscrow(invalidAddress, [ethers.ZeroAddress]) ).rejects.toThrow(ErrorInvalidTokenAddress); }); test('should throw an error if trustedHandlers contains an invalid address', async () => { await expect( - escrowClient.createEscrow(ethers.constants.AddressZero, [FAKE_ADDRESS]) + escrowClient.createEscrow(ethers.ZeroAddress, [FAKE_ADDRESS]) ).rejects.toThrow(new InvalidEthereumAddressError(FAKE_ADDRESS)); }); test('should create an escrow and return its address', async () => { - const tokenAddress = ethers.constants.AddressZero; - const trustedHandlers = [ethers.constants.AddressZero]; + const tokenAddress = ethers.ZeroAddress; + const trustedHandlers = [ethers.ZeroAddress]; const jobRequesterId = 'job-requester'; - const expectedEscrowAddress = ethers.constants.AddressZero; + const expectedEscrowAddress = ethers.ZeroAddress; // Create a spy object for the createEscrow method const createEscrowSpy = vi .spyOn(escrowClient.escrowFactoryContract, 'createEscrow') .mockImplementation(() => ({ wait: async () => ({ - events: [ + logs: [ { - topics: [ethers.utils.id('LaunchedV2(address,address,string)')], + topics: [ethers.id('LaunchedV2(address,address,string)')], args: { escrow: expectedEscrowAddress, }, @@ -230,8 +223,8 @@ describe('EscrowClient', () => { }); test('should throw an error if the create an escrow fails', async () => { - const tokenAddress = ethers.constants.AddressZero; - const trustedHandlers = [ethers.constants.AddressZero]; + const tokenAddress = ethers.ZeroAddress; + const trustedHandlers = [ethers.ZeroAddress]; const jobRequesterId = 'job-requester'; escrowClient.escrowFactoryContract.createEscrow.mockRejectedValueOnce( @@ -248,19 +241,19 @@ describe('EscrowClient', () => { }); test('should create an escrow and return its address with transaction options', async () => { - const tokenAddress = ethers.constants.AddressZero; - const trustedHandlers = [ethers.constants.AddressZero]; + const tokenAddress = ethers.ZeroAddress; + const trustedHandlers = [ethers.ZeroAddress]; const jobRequesterId = 'job-requester'; - const expectedEscrowAddress = ethers.constants.AddressZero; + const expectedEscrowAddress = ethers.ZeroAddress; // Create a spy object for the createEscrow method const createEscrowSpy = vi .spyOn(escrowClient.escrowFactoryContract, 'createEscrow') .mockImplementation(() => ({ wait: async () => ({ - events: [ + logs: [ { - topics: [ethers.utils.id('LaunchedV2(address,address,string)')], + topics: [ethers.id('LaunchedV2(address,address,string)')], args: { escrow: expectedEscrowAddress, }, @@ -292,62 +285,62 @@ describe('EscrowClient', () => { test('should throw an error if recordingOracle is an invalid address', async () => { const escrowConfig = { recordingOracle: FAKE_ADDRESS, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, hash: FAKE_HASH, }; await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(ErrorInvalidRecordingOracleAddressProvided); }); test('should throw an error if reputationOracle is an invalid address', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, + recordingOracle: ethers.ZeroAddress, reputationOracle: FAKE_ADDRESS, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, hash: FAKE_HASH, }; await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(ErrorInvalidReputationOracleAddressProvided); }); test('should throw an error if exchangeOracle is an invalid address', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, exchangeOracle: FAKE_ADDRESS, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, hash: FAKE_HASH, }; await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(ErrorInvalidExchangeOracleAddressProvided); }); test('should throw an error if escrowAddress is an invalid address', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, hash: FAKE_HASH, }; @@ -359,12 +352,12 @@ describe('EscrowClient', () => { test('should throw an error if hasEscrow returns false', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, manifestHash: FAKE_HASH, }; @@ -372,18 +365,18 @@ describe('EscrowClient', () => { escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(ErrorEscrowAddressIsNotProvidedByFactory); }); test('should throw an error if 0 <= recordingOracleFee', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(0), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 0n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, hash: FAKE_HASH, }; @@ -391,18 +384,18 @@ describe('EscrowClient', () => { escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(ErrorAmountMustBeGreaterThanZero); }); test('should throw an error if 0 <= reputationOracleFee', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(0), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 0n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, hash: FAKE_HASH, }; @@ -410,18 +403,18 @@ describe('EscrowClient', () => { escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(ErrorAmountMustBeGreaterThanZero); }); test('should throw an error if 0 <= exchangeOracleFee', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(0), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 0n, manifestUrl: VALID_URL, hash: FAKE_HASH, }; @@ -429,18 +422,18 @@ describe('EscrowClient', () => { escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(ErrorAmountMustBeGreaterThanZero); }); test('should throw an error if total fee is greater than 100', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(40), - reputationOracleFee: BigNumber.from(40), - exchangeOracleFee: BigNumber.from(40), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 40n, + reputationOracleFee: 40n, + exchangeOracleFee: 40n, manifestUrl: VALID_URL, hash: FAKE_HASH, }; @@ -448,18 +441,18 @@ describe('EscrowClient', () => { escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(ErrorTotalFeeMustBeLessThanHundred); }); test('should throw an error if manifestUrl is an empty string', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: '', hash: FAKE_HASH, }; @@ -467,18 +460,18 @@ describe('EscrowClient', () => { escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(ErrorUrlIsEmptyString); }); test('should throw an error if manifestUrl is an invalid url', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: FAKE_URL, hash: FAKE_HASH, }; @@ -486,18 +479,18 @@ describe('EscrowClient', () => { escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(ErrorInvalidUrl); }); test('should throw an error if hash is an empty string', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, hash: '', }; @@ -505,18 +498,18 @@ describe('EscrowClient', () => { escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(ErrorHashIsEmptyString); }); test('should successfully setup escrow', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, manifestHash: FAKE_HASH, }; @@ -528,15 +521,15 @@ describe('EscrowClient', () => { wait: vi.fn().mockResolvedValue(true), })); - await escrowClient.setup(ethers.constants.AddressZero, escrowConfig); + await escrowClient.setup(ethers.ZeroAddress, escrowConfig); expect(setupSpy).toHaveBeenCalledWith( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, - BigNumber.from(10), - BigNumber.from(10), - BigNumber.from(10), + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, + 10n, + 10n, + 10n, VALID_URL, FAKE_HASH, {} @@ -545,12 +538,12 @@ describe('EscrowClient', () => { test('should throw an error if setup escrow fails', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, manifestHash: FAKE_HASH, }; @@ -559,16 +552,16 @@ describe('EscrowClient', () => { escrowClient.escrowContract.setup.mockRejectedValueOnce(new Error()); await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(); expect(escrowClient.escrowContract.setup).toHaveBeenCalledWith( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, - BigNumber.from(10), - BigNumber.from(10), - BigNumber.from(10), + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, + 10n, + 10n, + 10n, VALID_URL, FAKE_HASH, {} @@ -577,12 +570,12 @@ describe('EscrowClient', () => { test('should successfully setup escrow with transaction options', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, manifestHash: FAKE_HASH, }; @@ -596,19 +589,15 @@ describe('EscrowClient', () => { const txOptions: Overrides = { gasLimit: 45000 }; - await escrowClient.setup( - ethers.constants.AddressZero, - escrowConfig, - txOptions - ); + await escrowClient.setup(ethers.ZeroAddress, escrowConfig, txOptions); expect(setupSpy).toHaveBeenCalledWith( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, - BigNumber.from(10), - BigNumber.from(10), - BigNumber.from(10), + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, + 10n, + 10n, + 10n, VALID_URL, FAKE_HASH, txOptions @@ -618,18 +607,18 @@ describe('EscrowClient', () => { describe('createAndSetupEscrow', () => { test('should successfully create and setup escrow', async () => { - const escrowAddress = ethers.constants.AddressZero; - const tokenAddress = ethers.constants.AddressZero; - const trustedHandlers = [ethers.constants.AddressZero]; + const escrowAddress = ethers.ZeroAddress; + const tokenAddress = ethers.ZeroAddress; + const trustedHandlers = [ethers.ZeroAddress]; const jobRequesterId = 'job-requester'; const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, manifestHash: FAKE_HASH, }; @@ -655,12 +644,12 @@ describe('EscrowClient', () => { jobRequesterId ); expect(setupSpy).toHaveBeenCalledWith( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, - BigNumber.from(10), - BigNumber.from(10), - BigNumber.from(10), + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, + 10n, + 10n, + 10n, VALID_URL, FAKE_HASH, {} @@ -669,12 +658,12 @@ describe('EscrowClient', () => { test('should throw an error if setup escrow fails', async () => { const escrowConfig = { - recordingOracle: ethers.constants.AddressZero, - reputationOracle: ethers.constants.AddressZero, - exchangeOracle: ethers.constants.AddressZero, - recordingOracleFee: BigNumber.from(10), - reputationOracleFee: BigNumber.from(10), - exchangeOracleFee: BigNumber.from(10), + recordingOracle: ethers.ZeroAddress, + reputationOracle: ethers.ZeroAddress, + exchangeOracle: ethers.ZeroAddress, + recordingOracleFee: 10n, + reputationOracleFee: 10n, + exchangeOracleFee: 10n, manifestUrl: VALID_URL, manifestHash: FAKE_HASH, }; @@ -683,16 +672,16 @@ describe('EscrowClient', () => { escrowClient.escrowContract.setup.mockRejectedValueOnce(new Error()); await expect( - escrowClient.setup(ethers.constants.AddressZero, escrowConfig) + escrowClient.setup(ethers.ZeroAddress, escrowConfig) ).rejects.toThrow(); expect(escrowClient.escrowContract.setup).toHaveBeenCalledWith( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, - BigNumber.from(10), - BigNumber.from(10), - BigNumber.from(10), + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, + 10n, + 10n, + 10n, VALID_URL, FAKE_HASH, {} @@ -703,7 +692,7 @@ describe('EscrowClient', () => { describe('fund', () => { test('should throw an error if escrowAddress is an invalid address', async () => { const invalidAddress = FAKE_ADDRESS; - const amount = BigNumber.from(10); + const amount = 10n; await expect(escrowClient.fund(invalidAddress, amount)).rejects.toThrow( ErrorInvalidEscrowAddressProvided @@ -711,8 +700,8 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; - const amount = BigNumber.from(10); + const escrowAddress = ethers.ZeroAddress; + const amount = 10n; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -722,8 +711,8 @@ describe('EscrowClient', () => { }); test('should throw an error if 0 <= amount', async () => { - const escrowAddress = ethers.constants.AddressZero; - const invalidAmount = BigNumber.from(0); + const escrowAddress = ethers.ZeroAddress; + const invalidAmount = 0n; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); @@ -733,9 +722,9 @@ describe('EscrowClient', () => { }); test('should successfully fund escrow', async () => { - const tokenAddress = ethers.constants.AddressZero; - const escrowAddress = ethers.constants.AddressZero; - const amount = BigNumber.from(10); + const tokenAddress = ethers.ZeroAddress; + const escrowAddress = ethers.ZeroAddress; + const amount = 10n; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.token.mockReturnValue(tokenAddress); @@ -752,9 +741,9 @@ describe('EscrowClient', () => { }); test('should throw an error if transfer fails', async () => { - const tokenAddress = ethers.constants.AddressZero; - const escrowAddress = ethers.constants.AddressZero; - const amount = BigNumber.from(10); + const tokenAddress = ethers.ZeroAddress; + const escrowAddress = ethers.ZeroAddress; + const amount = 10n; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.token.mockReturnValue(tokenAddress); @@ -766,9 +755,9 @@ describe('EscrowClient', () => { }); test('should successfully fund escrow with transaction options', async () => { - const tokenAddress = ethers.constants.AddressZero; - const escrowAddress = ethers.constants.AddressZero; - const amount = BigNumber.from(10); + const tokenAddress = ethers.ZeroAddress; + const escrowAddress = ethers.ZeroAddress; + const amount = 10n; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.token.mockReturnValue(tokenAddress); @@ -802,7 +791,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const url = VALID_URL; const hash = FAKE_HASH; @@ -814,7 +803,7 @@ describe('EscrowClient', () => { }); test('should throw an error if url is an empty string', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const url = ''; const hash = FAKE_HASH; @@ -826,7 +815,7 @@ describe('EscrowClient', () => { }); test('should throw an error if results url is invalid url', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const url = FAKE_URL; const hash = FAKE_HASH; @@ -838,7 +827,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hash is an empty string', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const url = VALID_URL; const hash = ''; @@ -850,7 +839,7 @@ describe('EscrowClient', () => { }); test('should successfully store results', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const url = VALID_URL; const hash = FAKE_HASH; @@ -867,7 +856,7 @@ describe('EscrowClient', () => { }); test('should throw an error if the store results fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const url = VALID_URL; const hash = FAKE_HASH; @@ -888,7 +877,7 @@ describe('EscrowClient', () => { }); test('should successfully store results with transaction options', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const url = VALID_URL; const hash = FAKE_HASH; @@ -916,7 +905,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -926,7 +915,7 @@ describe('EscrowClient', () => { }); test('should successfully complete escrow', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); @@ -942,7 +931,7 @@ describe('EscrowClient', () => { }); test('should throw an error if the complete fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.complete.mockRejectedValueOnce(new Error()); @@ -953,7 +942,7 @@ describe('EscrowClient', () => { }); test('should successfully complete escrow with transaction options', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); @@ -973,8 +962,8 @@ describe('EscrowClient', () => { describe('bulkPayOut', () => { test('should throw an error if escrowAddress is an invalid address', async () => { const invalidAddress = FAKE_ADDRESS; - const recipients = [ethers.constants.AddressZero]; - const amounts = [BigNumber.from(100)]; + const recipients = [ethers.ZeroAddress]; + const amounts = [100n]; const finalResultsUrl = VALID_URL; const finalResultsHash = FAKE_HASH; @@ -990,9 +979,9 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; - const recipients = [ethers.constants.AddressZero]; - const amounts = [BigNumber.from(100)]; + const escrowAddress = ethers.ZeroAddress; + const recipients = [ethers.ZeroAddress]; + const amounts = [100n]; const finalResultsUrl = VALID_URL; const finalResultsHash = FAKE_HASH; @@ -1010,9 +999,9 @@ describe('EscrowClient', () => { }); test('should throw an error if recipients length is equal to 0', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const recipients: string[] = []; - const amounts = [BigNumber.from(100)]; + const amounts = [100n]; const finalResultsUrl = VALID_URL; const finalResultsHash = FAKE_HASH; @@ -1030,8 +1019,8 @@ describe('EscrowClient', () => { }); test('should throw an error if amounts length is equal to 0', async () => { - const escrowAddress = ethers.constants.AddressZero; - const recipients = [ethers.constants.AddressZero]; + const escrowAddress = ethers.ZeroAddress; + const recipients = [ethers.ZeroAddress]; const amounts: number[] = []; const finalResultsUrl = VALID_URL; const finalResultsHash = FAKE_HASH; @@ -1050,13 +1039,9 @@ describe('EscrowClient', () => { }); test('should throw an error if recipients and amounts do not have the same length', async () => { - const escrowAddress = ethers.constants.AddressZero; - const recipients = [ethers.constants.AddressZero]; - const amounts = [ - BigNumber.from(100), - BigNumber.from(100), - BigNumber.from(100), - ]; + const escrowAddress = ethers.ZeroAddress; + const recipients = [ethers.ZeroAddress]; + const amounts = [100n, 100n, 100n]; const finalResultsUrl = VALID_URL; const finalResultsHash = FAKE_HASH; @@ -1074,9 +1059,9 @@ describe('EscrowClient', () => { }); test('should throw an error if recipients contains invalid addresses', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const recipients = [FAKE_ADDRESS]; - const amounts = [BigNumber.from(100)]; + const amounts = [100n]; const finalResultsUrl = VALID_URL; const finalResultsHash = FAKE_HASH; @@ -1094,9 +1079,9 @@ describe('EscrowClient', () => { }); test('should throw an error if url is an empty string', async () => { - const escrowAddress = ethers.constants.AddressZero; - const recipients = [ethers.constants.AddressZero]; - const amounts = [BigNumber.from(100)]; + const escrowAddress = ethers.ZeroAddress; + const recipients = [ethers.ZeroAddress]; + const amounts = [100n]; const finalResultsUrl = ''; const finalResultsHash = FAKE_HASH; @@ -1114,9 +1099,9 @@ describe('EscrowClient', () => { }); test('should throw an error if final results url is an invalid url', async () => { - const escrowAddress = ethers.constants.AddressZero; - const recipients = [ethers.constants.AddressZero]; - const amounts = [BigNumber.from(100)]; + const escrowAddress = ethers.ZeroAddress; + const recipients = [ethers.ZeroAddress]; + const amounts = [100n]; const finalResultsUrl = FAKE_URL; const finalResultsHash = FAKE_HASH; @@ -1134,9 +1119,9 @@ describe('EscrowClient', () => { }); test('should throw an error if hash is an empty string', async () => { - const escrowAddress = ethers.constants.AddressZero; - const recipients = [ethers.constants.AddressZero]; - const amounts = [BigNumber.from(100)]; + const escrowAddress = ethers.ZeroAddress; + const recipients = [ethers.ZeroAddress]; + const amounts = [100n]; const finalResultsUrl = VALID_URL; const finalResultsHash = ''; @@ -1154,17 +1139,14 @@ describe('EscrowClient', () => { }); test('should throw an error if escrow does not have enough balance', async () => { - const escrowAddress = ethers.constants.AddressZero; - const recipients = [ - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ]; - const amounts = [BigNumber.from(90), BigNumber.from(20)]; + const escrowAddress = ethers.ZeroAddress; + const recipients = [ethers.ZeroAddress, ethers.ZeroAddress]; + const amounts = [90n, 20n]; const finalResultsUrl = VALID_URL; const finalResultsHash = FAKE_HASH; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); - escrowClient.getBalance = vi.fn().mockReturnValue(BigNumber.from(50)); + escrowClient.getBalance = vi.fn().mockReturnValue(50n); await expect( escrowClient.bulkPayOut( @@ -1178,17 +1160,14 @@ describe('EscrowClient', () => { }); test('should successfully bulkPayOut escrow', async () => { - const escrowAddress = ethers.constants.AddressZero; - const recipients = [ - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ]; - const amounts = [BigNumber.from(10), BigNumber.from(10)]; + const escrowAddress = ethers.ZeroAddress; + const recipients = [ethers.ZeroAddress, ethers.ZeroAddress]; + const amounts = [10n, 10n]; const finalResultsUrl = VALID_URL; const finalResultsHash = FAKE_HASH; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); - escrowClient.getBalance = vi.fn().mockReturnValue(BigNumber.from(100)); + escrowClient.getBalance = vi.fn().mockReturnValue(100n); const bulkPayOutSpy = vi .spyOn(escrowClient.escrowContract, 'bulkPayOut') @@ -1215,7 +1194,7 @@ describe('EscrowClient', () => { }); test('should throw an error if bulkPayOut fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.abort.mockRejectedValueOnce(new Error()); @@ -1226,17 +1205,14 @@ describe('EscrowClient', () => { }); test('should successfully bulkPayOut escrow with transaction options', async () => { - const escrowAddress = ethers.constants.AddressZero; - const recipients = [ - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ]; - const amounts = [BigNumber.from(10), BigNumber.from(10)]; + const escrowAddress = ethers.ZeroAddress; + const recipients = [ethers.ZeroAddress, ethers.ZeroAddress]; + const amounts = [10n, 10n]; const finalResultsUrl = VALID_URL; const finalResultsHash = FAKE_HASH; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); - escrowClient.getBalance = vi.fn().mockReturnValue(BigNumber.from(100)); + escrowClient.getBalance = vi.fn().mockReturnValue(100n); const bulkPayOutSpy = vi .spyOn(escrowClient.escrowContract, 'bulkPayOut') @@ -1275,7 +1251,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -1285,24 +1261,20 @@ describe('EscrowClient', () => { }); test('should successfully cancel escrow', async () => { - const escrowAddress = ethers.constants.AddressZero; - const amountRefunded = BigNumber.from(1); + const escrowAddress = ethers.ZeroAddress; + const amountRefunded = 1n; escrowClient.escrowContract.token.mockResolvedValueOnce( - ethers.constants.AddressZero + ethers.ZeroAddress ); const log = { - address: ethers.constants.AddressZero, + address: ethers.ZeroAddress, name: 'Transfer', - args: [ - ethers.constants.AddressZero, - ethers.constants.AddressZero, - amountRefunded, - ], + args: [ethers.ZeroAddress, ethers.ZeroAddress, amountRefunded], }; mockTx.wait.mockResolvedValueOnce({ - transactionHash: FAKE_HASH, + hash: FAKE_HASH, logs: [log], }); @@ -1329,7 +1301,7 @@ describe('EscrowClient', () => { }); test('should throw an error if the cancel fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.cancel.mockRejectedValueOnce(new Error()); @@ -1340,7 +1312,7 @@ describe('EscrowClient', () => { }); test('should throw an error if the wait fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; mockTx.wait.mockRejectedValueOnce(new Error()); escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.cancel.mockResolvedValueOnce(mockTx); @@ -1351,18 +1323,14 @@ describe('EscrowClient', () => { }); test('should throw an error if transfer event not found in transaction logs', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; mockTx.wait.mockResolvedValueOnce({ transactionHash: FAKE_HASH, logs: [ { - address: ethers.constants.AddressZero, + address: ethers.ZeroAddress, name: 'NotTransfer', - args: [ - ethers.constants.AddressZero, - ethers.constants.AddressZero, - undefined, - ], + args: [ethers.ZeroAddress, ethers.ZeroAddress, undefined], }, ], }); @@ -1385,24 +1353,20 @@ describe('EscrowClient', () => { }); test('should successfully cancel escrow with transaction options', async () => { - const escrowAddress = ethers.constants.AddressZero; - const amountRefunded = BigNumber.from(1); + const escrowAddress = ethers.ZeroAddress; + const amountRefunded = 1n; escrowClient.escrowContract.token.mockResolvedValueOnce( - ethers.constants.AddressZero + ethers.ZeroAddress ); const log = { - address: ethers.constants.AddressZero, + address: ethers.ZeroAddress, name: 'Transfer', - args: [ - ethers.constants.AddressZero, - ethers.constants.AddressZero, - amountRefunded, - ], + args: [ethers.ZeroAddress, ethers.ZeroAddress, amountRefunded], }; mockTx.wait.mockResolvedValueOnce({ - transactionHash: FAKE_HASH, + hash: FAKE_HASH, logs: [log], }); @@ -1442,7 +1406,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -1452,7 +1416,7 @@ describe('EscrowClient', () => { }); test('should successfully abort escrow', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); const abortSpy = vi @@ -1467,7 +1431,7 @@ describe('EscrowClient', () => { }); test('should throw an error if abort fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.abort.mockRejectedValueOnce(new Error()); @@ -1478,7 +1442,7 @@ describe('EscrowClient', () => { }); test('should successfully abort escrow with transaction options', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); const abortSpy = vi @@ -1497,7 +1461,7 @@ describe('EscrowClient', () => { describe('addTrustedHandlers', () => { test('should throw an error if escrowAddress is an invalid address', async () => { const escrowAddress = FAKE_ADDRESS; - const trustedHandlers = [ethers.constants.AddressZero]; + const trustedHandlers = [ethers.ZeroAddress]; await expect( escrowClient.addTrustedHandlers(escrowAddress, trustedHandlers) @@ -1505,8 +1469,8 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; - const trustedHandlers = [ethers.constants.AddressZero]; + const escrowAddress = ethers.ZeroAddress; + const trustedHandlers = [ethers.ZeroAddress]; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -1516,7 +1480,7 @@ describe('EscrowClient', () => { }); test('should throw an error if trusted handlers length is equal to 0', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const trustedHandlers: string[] = []; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); @@ -1527,7 +1491,7 @@ describe('EscrowClient', () => { }); test('should throw an error if trusted handlers contains invalid addresses', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const trustedHandlers = [FAKE_ADDRESS]; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); @@ -1538,8 +1502,8 @@ describe('EscrowClient', () => { }); test('should successfully addTrustedHandlers', async () => { - const escrowAddress = ethers.constants.AddressZero; - const trustedHandlers = [ethers.constants.AddressZero]; + const escrowAddress = ethers.ZeroAddress; + const trustedHandlers = [ethers.ZeroAddress]; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); const addTrustedHandlersSpy = vi @@ -1554,8 +1518,8 @@ describe('EscrowClient', () => { }); test('should throw an error if addTrustedHandlers fails', async () => { - const escrowAddress = ethers.constants.AddressZero; - const trustedHandlers = [ethers.constants.AddressZero]; + const escrowAddress = ethers.ZeroAddress; + const trustedHandlers = [ethers.ZeroAddress]; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.addTrustedHandlers.mockRejectedValueOnce( @@ -1572,8 +1536,8 @@ describe('EscrowClient', () => { }); test('should successfully addTrustedHandlers with transaction options', async () => { - const escrowAddress = ethers.constants.AddressZero; - const trustedHandlers = [ethers.constants.AddressZero]; + const escrowAddress = ethers.ZeroAddress; + const trustedHandlers = [ethers.ZeroAddress]; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); const addTrustedHandlersSpy = vi @@ -1606,7 +1570,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -1616,8 +1580,8 @@ describe('EscrowClient', () => { }); test('should successfully getBalance escrow', async () => { - const escrowAddress = ethers.constants.AddressZero; - const amount = BigNumber.from(100); + const escrowAddress = ethers.ZeroAddress; + const amount = 100n; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.getBalance.mockReturnValue(amount); @@ -1629,7 +1593,7 @@ describe('EscrowClient', () => { }); test('should throw an error if the getBalance fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.getBalance.mockRejectedValueOnce(new Error()); @@ -1650,7 +1614,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -1660,7 +1624,7 @@ describe('EscrowClient', () => { }); test('should successfully getManifestHash', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const hash = FAKE_HASH; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); @@ -1673,7 +1637,7 @@ describe('EscrowClient', () => { }); test('should throw an error if getManifestHash fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.manifestHash.mockRejectedValueOnce( @@ -1698,7 +1662,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -1708,7 +1672,7 @@ describe('EscrowClient', () => { }); test('should successfully getManifestUrl', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const url = FAKE_URL; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); @@ -1721,7 +1685,7 @@ describe('EscrowClient', () => { }); test('should throw an error if getManifestUrl fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.manifestUrl.mockRejectedValueOnce( @@ -1746,7 +1710,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -1756,7 +1720,7 @@ describe('EscrowClient', () => { }); test('should successfully getResultsUrl', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const url = FAKE_URL; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); @@ -1771,7 +1735,7 @@ describe('EscrowClient', () => { }); test('should throw an error if getResultsUrl fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.finalResultsUrl.mockRejectedValueOnce( @@ -1796,7 +1760,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -1806,7 +1770,7 @@ describe('EscrowClient', () => { }); test('should successfully getIntermediateResultsUrl', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; const url = FAKE_URL; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); @@ -1822,7 +1786,7 @@ describe('EscrowClient', () => { }); test('should throw an error if intermediateResultsUrl fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.intermediateResultsUrl.mockRejectedValueOnce( @@ -1849,7 +1813,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -1859,21 +1823,19 @@ describe('EscrowClient', () => { }); test('should successfully getTokenAddress', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); - escrowClient.escrowContract.token.mockReturnValue( - ethers.constants.AddressZero - ); + escrowClient.escrowContract.token.mockReturnValue(ethers.ZeroAddress); const tokenAddress = await escrowClient.getTokenAddress(escrowAddress); - expect(tokenAddress).toEqual(ethers.constants.AddressZero); + expect(tokenAddress).toEqual(ethers.ZeroAddress); expect(escrowClient.escrowContract.token).toHaveBeenCalledWith(); }); test('should throw an error if getTokenAddress fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.token.mockRejectedValueOnce(new Error()); @@ -1896,7 +1858,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -1906,7 +1868,7 @@ describe('EscrowClient', () => { }); test('should successfully getStatus', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.status.mockReturnValue(EscrowStatus.Complete); @@ -1918,7 +1880,7 @@ describe('EscrowClient', () => { }); test('should throw an error if getStatus fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.status.mockRejectedValueOnce(new Error()); @@ -1939,7 +1901,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -1949,24 +1911,24 @@ describe('EscrowClient', () => { }); test('should successfully getRecordingOracleAddress', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.recordingOracle.mockReturnValue( - ethers.constants.AddressZero + ethers.ZeroAddress ); const recordingOracleAddress = await escrowClient.getRecordingOracleAddress(escrowAddress); - expect(recordingOracleAddress).toEqual(ethers.constants.AddressZero); + expect(recordingOracleAddress).toEqual(ethers.ZeroAddress); expect( escrowClient.escrowContract.recordingOracle ).toHaveBeenCalledWith(); }); test('should throw an error if getRecordingOracleAddress fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.recordingOracle.mockRejectedValueOnce( @@ -1993,7 +1955,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -2003,24 +1965,24 @@ describe('EscrowClient', () => { }); test('should successfully getReputationOracleAddress', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.reputationOracle.mockReturnValue( - ethers.constants.AddressZero + ethers.ZeroAddress ); const reputationOracleAddress = await escrowClient.getReputationOracleAddress(escrowAddress); - expect(reputationOracleAddress).toEqual(ethers.constants.AddressZero); + expect(reputationOracleAddress).toEqual(ethers.ZeroAddress); expect( escrowClient.escrowContract.reputationOracle ).toHaveBeenCalledWith(); }); test('should throw an error if getReputationOracleAddress fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.reputationOracle.mockRejectedValueOnce( @@ -2047,7 +2009,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -2057,22 +2019,22 @@ describe('EscrowClient', () => { }); test('should successfully getExchangeOracleAddress', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.exchangeOracle.mockReturnValue( - ethers.constants.AddressZero + ethers.ZeroAddress ); const exchangeOracleAddress = await escrowClient.getExchangeOracleAddress(escrowAddress); - expect(exchangeOracleAddress).toEqual(ethers.constants.AddressZero); + expect(exchangeOracleAddress).toEqual(ethers.ZeroAddress); expect(escrowClient.escrowContract.exchangeOracle).toHaveBeenCalledWith(); }); test('should throw an error if getExchangeOracleAddress fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.exchangeOracle.mockRejectedValueOnce( @@ -2097,7 +2059,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -2107,22 +2069,20 @@ describe('EscrowClient', () => { }); test('should successfully get the job launcher address', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); - escrowClient.escrowContract.launcher.mockReturnValue( - ethers.constants.AddressZero - ); + escrowClient.escrowContract.launcher.mockReturnValue(ethers.ZeroAddress); const jobLauncherAddress = await escrowClient.getJobLauncherAddress(escrowAddress); - expect(jobLauncherAddress).toEqual(ethers.constants.AddressZero); + expect(jobLauncherAddress).toEqual(ethers.ZeroAddress); expect(escrowClient.escrowContract.launcher).toHaveBeenCalledWith(); }); test('should throw an error if getJobLauncherAddress fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.launcher.mockRejectedValueOnce(new Error()); @@ -2145,7 +2105,7 @@ describe('EscrowClient', () => { }); test('should throw an error if hasEscrow returns false', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(false); @@ -2155,22 +2115,22 @@ describe('EscrowClient', () => { }); test('should successfully get the escrow factory address', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.escrowFactory.mockReturnValue( - ethers.constants.AddressZero + ethers.ZeroAddress ); const escrowFactoryAddress = await escrowClient.getFactoryAddress(escrowAddress); - expect(escrowFactoryAddress).toEqual(ethers.constants.AddressZero); + expect(escrowFactoryAddress).toEqual(ethers.ZeroAddress); expect(escrowClient.escrowContract.escrowFactory).toHaveBeenCalledWith(); }); test('should throw an error if getFactoryAddress fails', async () => { - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; escrowClient.escrowFactoryContract.hasEscrow.mockReturnValue(true); escrowClient.escrowContract.escrowFactory.mockRejectedValueOnce( @@ -2297,7 +2257,7 @@ describe('EscrowUtils', () => { const result = await EscrowUtils.getEscrows({ networks: [ChainId.POLYGON_MUMBAI], - launcher: ethers.constants.AddressZero, + launcher: ethers.ZeroAddress, }); expect(result).toEqual(escrows); @@ -2384,7 +2344,7 @@ describe('EscrowUtils', () => { describe('getEscrow', () => { test('should throw an error if chain id is an unsupported id', async () => { const chainId = -1; - const escrowAddress = ethers.constants.AddressZero; + const escrowAddress = ethers.ZeroAddress; await expect( EscrowUtils.getEscrow(chainId, escrowAddress) @@ -2404,7 +2364,7 @@ describe('EscrowUtils', () => { const chainId = ChainId.LOCALHOST; const escrow = { id: '1', - address: ethers.constants.AddressZero, + address: ethers.ZeroAddress, amountPaid: '3', balance: '0', count: '1', @@ -2418,10 +2378,7 @@ describe('EscrowUtils', () => { .spyOn(gqlFetch, 'default') .mockResolvedValue({ escrow }); - const result = await EscrowUtils.getEscrow( - chainId, - ethers.constants.AddressZero - ); + const result = await EscrowUtils.getEscrow(chainId, ethers.ZeroAddress); expect(result).toEqual(escrow); expect(gqlFetchSpy).toHaveBeenCalledWith( diff --git a/packages/sdk/typescript/human-protocol-sdk/test/kvstore.test.ts b/packages/sdk/typescript/human-protocol-sdk/test/kvstore.test.ts index ae231d5b99..60abfc3c4c 100644 --- a/packages/sdk/typescript/human-protocol-sdk/test/kvstore.test.ts +++ b/packages/sdk/typescript/human-protocol-sdk/test/kvstore.test.ts @@ -31,17 +31,14 @@ describe('KVStoreClient', () => { mockKVStoreContract: any; beforeAll(async () => { - const provider = new ethers.providers.JsonRpcProvider(); mockProvider = { - ...provider, - getNetwork: vi.fn().mockReturnValue({ chainId: ChainId.LOCALHOST }), - }; - mockSigner = { - ...provider.getSigner(), provider: { - ...mockProvider, + getNetwork: vi.fn().mockReturnValue({ chainId: ChainId.LOCALHOST }), }, - getAddress: vi.fn().mockReturnValue(ethers.constants.AddressZero), + }; + mockSigner = { + provider: mockProvider.provider, + getAddress: vi.fn().mockReturnValue(ethers.ZeroAddress), }; network = NETWORKS[ChainId.LOCALHOST]; }); @@ -66,9 +63,7 @@ describe('KVStoreClient', () => { }); test('should create a new instance of KVStoreClient with a Provider', async () => { - const provider = ethers.getDefaultProvider(); - - const kvStoreClient = await KVStoreClient.build(provider); + const kvStoreClient = await KVStoreClient.build(mockProvider); expect(kvStoreClient).toBeInstanceOf(KVStoreClient); }); @@ -82,7 +77,7 @@ describe('KVStoreClient', () => { }); test('should throw an error if the chain ID is unsupported', async () => { - const provider = ethers.getDefaultProvider(); + const provider = new ethers.JsonRpcProvider(); vi.spyOn(provider, 'getNetwork').mockResolvedValue({ chainId: 1337, @@ -168,7 +163,7 @@ describe('KVStoreClient', () => { ['url', 'urlHash'], [ 'https://example.com', - ethers.utils.keccak256(ethers.utils.toUtf8Bytes('example')), + ethers.keccak256(ethers.toUtf8Bytes('example')), ], {} ); @@ -190,7 +185,7 @@ describe('KVStoreClient', () => { ['linkedinUrl', 'linkedinUrlHash'], [ 'https://example.com', - ethers.utils.keccak256(ethers.utils.toUtf8Bytes('example')), + ethers.keccak256(ethers.toUtf8Bytes('example')), ], {} ); @@ -223,7 +218,7 @@ describe('KVStoreClient', () => { ['url', 'urlHash'], [ 'https://example.com', - ethers.utils.keccak256(ethers.utils.toUtf8Bytes('example')), + ethers.keccak256(ethers.toUtf8Bytes('example')), ], {} ); @@ -251,7 +246,7 @@ describe('KVStoreClient', () => { ['linkedinUrl', 'linkedinUrlHash'], [ 'https://example.com', - ethers.utils.keccak256(ethers.utils.toUtf8Bytes('example')), + ethers.keccak256(ethers.toUtf8Bytes('example')), ], txOptions ); @@ -424,9 +419,7 @@ describe('KVStoreClient', () => { }); test('should return URL if the content is valid', async () => { - const validHash = ethers.utils.keccak256( - ethers.utils.toUtf8Bytes('example') - ); + const validHash = ethers.keccak256(ethers.toUtf8Bytes('example')); mockKVStoreContract.get.mockResolvedValueOnce('example.com'); mockKVStoreContract.get.mockResolvedValueOnce(validHash); @@ -447,9 +440,7 @@ describe('KVStoreClient', () => { }); test('should return URL for the given URL key if the content is valid', async () => { - const validHash = ethers.utils.keccak256( - ethers.utils.toUtf8Bytes('example') - ); + const validHash = ethers.keccak256(ethers.toUtf8Bytes('example')); mockKVStoreContract.get.mockResolvedValueOnce('example.com'); mockKVStoreContract.get.mockResolvedValueOnce(validHash); @@ -471,8 +462,8 @@ describe('KVStoreClient', () => { }); test('should throw an error if the content is not valid', async () => { - const invalidHash = ethers.utils.keccak256( - ethers.utils.toUtf8Bytes('invalid-example') + const invalidHash = ethers.keccak256( + ethers.toUtf8Bytes('invalid-example') ); mockKVStoreContract.get.mockResolvedValueOnce('example.com'); diff --git a/packages/sdk/typescript/human-protocol-sdk/test/staking.test.ts b/packages/sdk/typescript/human-protocol-sdk/test/staking.test.ts index 3b8597c175..affeaf0e51 100644 --- a/packages/sdk/typescript/human-protocol-sdk/test/staking.test.ts +++ b/packages/sdk/typescript/human-protocol-sdk/test/staking.test.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import * as gqlFetch from 'graphql-request'; -import { BigNumber, Overrides, Signer, ethers } from 'ethers'; +import { Overrides, Signer, ethers } from 'ethers'; import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; import { ChainId } from '../src/enums'; import { @@ -33,7 +33,6 @@ vi.mock('graphql-request', () => { vi.mock('../src/init'); describe('StakingClient', () => { - const provider = new ethers.providers.JsonRpcProvider(); let stakingClient: any, mockProvider: any, mockSigner: any, @@ -44,15 +43,13 @@ describe('StakingClient', () => { beforeEach(async () => { mockProvider = { - ...provider, - getNetwork: vi.fn().mockReturnValue({ chainId: ChainId.MAINNET }), - }; - mockSigner = { - ...provider.getSigner(), provider: { - ...mockProvider, + getNetwork: vi.fn().mockResolvedValue({ chainId: ChainId.LOCALHOST }), }, - getAddress: vi.fn().mockReturnValue(ethers.constants.AddressZero), + }; + mockSigner = { + provider: mockProvider.provider, + getAddress: vi.fn().mockResolvedValue(ethers.ZeroAddress), }; mockStakingContract = { @@ -67,7 +64,7 @@ describe('StakingClient', () => { getStaker: vi.fn(), getListOfStakers: vi.fn(), getAllocation: vi.fn(), - address: ethers.constants.AddressZero, + getAddress: vi.fn().mockResolvedValue(ethers.ZeroAddress), }; mockEscrowFactoryContract = { @@ -102,9 +99,7 @@ describe('StakingClient', () => { }); test('should create a new instance of StakingClient with a Provider', async () => { - const provider = ethers.getDefaultProvider(); - - const stakingClient = await StakingClient.build(provider); + const stakingClient = await StakingClient.build(mockProvider); expect(stakingClient).toBeInstanceOf(StakingClient); }); @@ -118,7 +113,7 @@ describe('StakingClient', () => { }); test('should throw an error if the chain ID is unsupported', async () => { - const provider = ethers.getDefaultProvider(); + const provider = new ethers.JsonRpcProvider(); vi.spyOn(provider, 'getNetwork').mockResolvedValue({ chainId: 1337, @@ -131,10 +126,10 @@ describe('StakingClient', () => { }); describe('approveStake', () => { - const amount = BigNumber.from(FAKE_AMOUNT); - const negativeAmount = BigNumber.from(FAKE_NEGATIVE_AMOUNT); + const amount = ethers.toBigInt(FAKE_AMOUNT); + const negativeAmount = ethers.toBigInt(FAKE_NEGATIVE_AMOUNT); - test('should throw an error if the amount is not a BigNumber', async () => { + test('should throw an error if the amount is not a bigint', async () => { await expect(stakingClient.approveStake('foo')).rejects.toThrow( ErrorInvalidStakingValueType ); @@ -158,11 +153,7 @@ describe('StakingClient', () => { })); await expect(await stakingClient.approveStake(amount)).toBeUndefined(); - expect(approveSpy).toBeCalledWith( - ethers.constants.AddressZero, - amount, - {} - ); + expect(approveSpy).toBeCalledWith(ethers.ZeroAddress, amount, {}); expect(mockTokenContract.approve).toHaveBeenCalledTimes(1); }); @@ -180,11 +171,7 @@ describe('StakingClient', () => { await expect( await stakingClient.approveStake(amount, txOptions) ).toBeUndefined(); - expect(approveSpy).toBeCalledWith( - ethers.constants.AddressZero, - amount, - txOptions - ); + expect(approveSpy).toBeCalledWith(ethers.ZeroAddress, amount, txOptions); expect(mockTokenContract.approve).toHaveBeenCalledTimes(1); }); @@ -195,7 +182,7 @@ describe('StakingClient', () => { await expect(stakingClient.approveStake(amount)).rejects.toThrow(); expect(mockTokenContract.approve).toBeCalledWith( - ethers.constants.AddressZero, + ethers.ZeroAddress, amount, {} ); @@ -204,10 +191,10 @@ describe('StakingClient', () => { }); describe('stake', () => { - const amount = BigNumber.from(FAKE_AMOUNT); - const negativeAmount = BigNumber.from(FAKE_NEGATIVE_AMOUNT); + const amount = ethers.toBigInt(FAKE_AMOUNT); + const negativeAmount = ethers.toBigInt(FAKE_NEGATIVE_AMOUNT); - test('should throw an error if amount is not a BigNumber', async () => { + test('should throw an error if amount is not a bigint', async () => { await expect(stakingClient.stake('foo')).rejects.toThrow( ErrorInvalidStakingValueType ); @@ -263,10 +250,10 @@ describe('StakingClient', () => { }); describe('unstake', () => { - const amount = BigNumber.from(FAKE_AMOUNT); - const negativeAmount = BigNumber.from(FAKE_NEGATIVE_AMOUNT); + const amount = ethers.toBigInt(FAKE_AMOUNT); + const negativeAmount = ethers.toBigInt(FAKE_NEGATIVE_AMOUNT); - test('should throw an error if amount is not a BigNumber', async () => { + test('should throw an error if amount is not a bigint', async () => { await expect(stakingClient.unstake('foo')).rejects.toThrow( ErrorInvalidStakingValueType ); @@ -356,16 +343,16 @@ describe('StakingClient', () => { }); describe('slash', () => { - const amount = BigNumber.from(FAKE_AMOUNT); - const negativeAmount = BigNumber.from(FAKE_NEGATIVE_AMOUNT); + const amount = ethers.toBigInt(FAKE_AMOUNT); + const negativeAmount = ethers.toBigInt(FAKE_NEGATIVE_AMOUNT); const invalidAddress = 'InvalidAddress'; - test('throws an error if amount is not a BigNumber', async () => { + test('throws an error if amount is not a bigint', async () => { await expect( stakingClient.slash( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, 'foo' ) ).rejects.toThrow(ErrorInvalidStakingValueType); @@ -375,9 +362,9 @@ describe('StakingClient', () => { test('throws an error if amount is negative', async () => { await expect( stakingClient.slash( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, negativeAmount ) ).rejects.toThrow(ErrorInvalidStakingValueSign); @@ -388,8 +375,8 @@ describe('StakingClient', () => { await expect( stakingClient.slash( invalidAddress, - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, amount ) ).rejects.toThrow(ErrorInvalidSlasherAddressProvided); @@ -399,9 +386,9 @@ describe('StakingClient', () => { test('throws an error if staker address is invalid', async () => { await expect( stakingClient.slash( - ethers.constants.AddressZero, + ethers.ZeroAddress, invalidAddress, - ethers.constants.AddressZero, + ethers.ZeroAddress, amount ) ).rejects.toThrow(ErrorInvalidStakerAddressProvided); @@ -411,8 +398,8 @@ describe('StakingClient', () => { test('throws an error if escrow address is invalid', async () => { await expect( stakingClient.slash( - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, invalidAddress, amount ) @@ -426,8 +413,8 @@ describe('StakingClient', () => { await expect( stakingClient.slash( invalidAddress, - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, amount ) ).rejects.toThrow(ErrorInvalidSlasherAddressProvided); @@ -440,17 +427,17 @@ describe('StakingClient', () => { await expect( stakingClient.slash( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, amount ) ).rejects.toThrow(); expect(mockStakingContract.slash).toHaveBeenCalledWith( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, amount, {} ); @@ -466,16 +453,16 @@ describe('StakingClient', () => { })); await stakingClient.slash( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, amount ); expect(slashSpy).toHaveBeenCalledWith( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, amount, {} ); @@ -493,17 +480,17 @@ describe('StakingClient', () => { const txOptions: Overrides = { gasLimit: 45000 }; await stakingClient.slash( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, amount, txOptions ); expect(slashSpy).toHaveBeenCalledWith( - ethers.constants.AddressZero, - ethers.constants.AddressZero, - ethers.constants.AddressZero, + ethers.ZeroAddress, + ethers.ZeroAddress, + ethers.ZeroAddress, amount, txOptions ); @@ -512,8 +499,8 @@ describe('StakingClient', () => { }); describe('allocate', () => { - const amount = BigNumber.from(FAKE_AMOUNT); - const negativeAmount = BigNumber.from(FAKE_NEGATIVE_AMOUNT); + const amount = ethers.toBigInt(FAKE_AMOUNT); + const negativeAmount = ethers.toBigInt(FAKE_NEGATIVE_AMOUNT); const invalidAddress = 'InvalidAddress'; test('throws an error if escrow address is invalid', async () => { @@ -523,16 +510,16 @@ describe('StakingClient', () => { expect(mockStakingContract.allocate).toHaveBeenCalledTimes(0); }); - test('throws an error if amount is not a BigNumber', async () => { + test('throws an error if amount is not a bigint', async () => { await expect( - stakingClient.allocate(ethers.constants.AddressZero, 'foo') + stakingClient.allocate(ethers.ZeroAddress, 'foo') ).rejects.toThrow(ErrorInvalidStakingValueType); expect(mockStakingContract.allocate).toHaveBeenCalledTimes(0); }); test('throws an error if amount is negative', async () => { await expect( - stakingClient.allocate(ethers.constants.AddressZero, negativeAmount) + stakingClient.allocate(ethers.ZeroAddress, negativeAmount) ).rejects.toThrow(ErrorInvalidStakingValueSign); expect(mockStakingContract.allocate).toHaveBeenCalledTimes(0); }); @@ -541,7 +528,7 @@ describe('StakingClient', () => { mockEscrowFactoryContract.hasEscrow.mockRejectedValueOnce(new Error()); await expect( - stakingClient.allocate(ethers.constants.AddressZero, amount) + stakingClient.allocate(ethers.ZeroAddress, amount) ).rejects.toThrow(); expect(mockStakingContract.allocate).toHaveBeenCalledTimes(0); }); @@ -553,13 +540,9 @@ describe('StakingClient', () => { .mockImplementation(() => ({ wait: vi.fn().mockResolvedValue(true), })); - await stakingClient.allocate(ethers.constants.AddressZero, amount); + await stakingClient.allocate(ethers.ZeroAddress, amount); - expect(allocateSpy).toHaveBeenCalledWith( - ethers.constants.AddressZero, - amount, - {} - ); + expect(allocateSpy).toHaveBeenCalledWith(ethers.ZeroAddress, amount, {}); expect(allocateSpy).toHaveBeenCalledTimes(1); }); @@ -573,14 +556,10 @@ describe('StakingClient', () => { const txOptions: Overrides = { gasLimit: 45000 }; - await stakingClient.allocate( - ethers.constants.AddressZero, - amount, - txOptions - ); + await stakingClient.allocate(ethers.ZeroAddress, amount, txOptions); expect(allocateSpy).toHaveBeenCalledWith( - ethers.constants.AddressZero, + ethers.ZeroAddress, amount, txOptions ); @@ -592,10 +571,10 @@ describe('StakingClient', () => { mockStakingContract.allocate.mockRejectedValueOnce(new Error()); await expect( - stakingClient.allocate(ethers.constants.AddressZero, amount) + stakingClient.allocate(ethers.ZeroAddress, amount) ).rejects.toThrow(); expect(mockStakingContract.allocate).toHaveBeenCalledWith( - ethers.constants.AddressZero, + ethers.ZeroAddress, amount, {} ); @@ -617,7 +596,7 @@ describe('StakingClient', () => { mockEscrowFactoryContract.hasEscrow.mockRejectedValueOnce(new Error()); await expect( - stakingClient.closeAllocation(ethers.constants.AddressZero) + stakingClient.closeAllocation(ethers.ZeroAddress) ).rejects.toThrow(); expect(mockStakingContract.closeAllocation).toHaveBeenCalledTimes(0); }); @@ -627,11 +606,11 @@ describe('StakingClient', () => { mockStakingContract.closeAllocation.mockRejectedValueOnce(new Error()); await expect( - stakingClient.closeAllocation(ethers.constants.AddressZero) + stakingClient.closeAllocation(ethers.ZeroAddress) ).rejects.toThrow(); expect(mockStakingContract.closeAllocation).toHaveBeenCalledWith( - ethers.constants.AddressZero, + ethers.ZeroAddress, {} ); expect(mockStakingContract.closeAllocation).toHaveBeenCalledTimes(1); @@ -645,12 +624,9 @@ describe('StakingClient', () => { wait: vi.fn().mockResolvedValue(true), })); - await stakingClient.closeAllocation(ethers.constants.AddressZero); + await stakingClient.closeAllocation(ethers.ZeroAddress); - expect(closeAllocationSpy).toHaveBeenCalledWith( - ethers.constants.AddressZero, - {} - ); + expect(closeAllocationSpy).toHaveBeenCalledWith(ethers.ZeroAddress, {}); expect(closeAllocationSpy).toHaveBeenCalledTimes(1); }); @@ -664,13 +640,10 @@ describe('StakingClient', () => { const txOptions: Overrides = { gasLimit: 45000 }; - await stakingClient.closeAllocation( - ethers.constants.AddressZero, - txOptions - ); + await stakingClient.closeAllocation(ethers.ZeroAddress, txOptions); expect(closeAllocationSpy).toHaveBeenCalledWith( - ethers.constants.AddressZero, + ethers.ZeroAddress, txOptions ); expect(closeAllocationSpy).toHaveBeenCalledTimes(1); @@ -691,7 +664,7 @@ describe('StakingClient', () => { mockEscrowFactoryContract.hasEscrow.mockRejectedValueOnce(new Error()); await expect( - stakingClient.distributeReward(ethers.constants.AddressZero) + stakingClient.distributeReward(ethers.ZeroAddress) ).rejects.toThrow(); expect(mockRewardPoolContract.distributeReward).toHaveBeenCalledTimes(0); }); @@ -704,12 +677,9 @@ describe('StakingClient', () => { wait: vi.fn().mockResolvedValue(true), })); - await stakingClient.distributeReward(ethers.constants.AddressZero); + await stakingClient.distributeReward(ethers.ZeroAddress); - expect(distributeRewardSpy).toHaveBeenCalledWith( - ethers.constants.AddressZero, - {} - ); + expect(distributeRewardSpy).toHaveBeenCalledWith(ethers.ZeroAddress, {}); expect(distributeRewardSpy).toHaveBeenCalledTimes(1); }); @@ -723,13 +693,10 @@ describe('StakingClient', () => { const txOptions: Overrides = { gasLimit: 45000 }; - await stakingClient.distributeReward( - ethers.constants.AddressZero, - txOptions - ); + await stakingClient.distributeReward(ethers.ZeroAddress, txOptions); expect(distributeRewardSpy).toHaveBeenCalledWith( - ethers.constants.AddressZero, + ethers.ZeroAddress, txOptions ); expect(distributeRewardSpy).toHaveBeenCalledTimes(1); @@ -737,21 +704,21 @@ describe('StakingClient', () => { }); describe('getLeader', () => { - const stakerAddress = ethers.constants.AddressZero; + const stakerAddress = ethers.ZeroAddress; const invalidAddress = 'InvalidAddress'; const mockLeader: ILeader = { id: stakerAddress, address: stakerAddress, - amountStaked: ethers.utils.parseEther('100'), - amountAllocated: ethers.utils.parseEther('50'), - amountLocked: ethers.utils.parseEther('25'), - lockedUntilTimestamp: ethers.BigNumber.from(0), - amountWithdrawn: ethers.utils.parseEther('25'), - amountSlashed: ethers.utils.parseEther('25'), - reputation: ethers.utils.parseEther('25'), - reward: ethers.utils.parseEther('25'), - amountJobsLaunched: ethers.utils.parseEther('25'), + amountStaked: ethers.parseEther('100'), + amountAllocated: ethers.parseEther('50'), + amountLocked: ethers.parseEther('25'), + lockedUntilTimestamp: ethers.toBigInt(0), + amountWithdrawn: ethers.parseEther('25'), + amountSlashed: ethers.parseEther('25'), + reputation: ethers.parseEther('25'), + reward: ethers.parseEther('25'), + amountJobsLaunched: ethers.parseEther('25'), }; test('should return staker information', async () => { @@ -761,13 +728,9 @@ describe('StakingClient', () => { const result = await stakingClient.getLeader(stakerAddress); - expect(gqlFetchSpy).toHaveBeenCalledWith( - 'https://api.thegraph.com/subgraphs/name/humanprotocol/mainnet-v2', - GET_LEADER_QUERY, - { - address: stakerAddress, - } - ); + expect(gqlFetchSpy).toHaveBeenCalledWith('', GET_LEADER_QUERY, { + address: stakerAddress, + }); expect(result).toEqual(mockLeader); }); @@ -789,20 +752,20 @@ describe('StakingClient', () => { }); describe('getLeaders', () => { - const stakerAddress = ethers.constants.AddressZero; + const stakerAddress = ethers.ZeroAddress; const mockLeader: ILeader = { id: stakerAddress, address: stakerAddress, - amountStaked: ethers.utils.parseEther('100'), - amountAllocated: ethers.utils.parseEther('50'), - amountLocked: ethers.utils.parseEther('25'), - lockedUntilTimestamp: ethers.BigNumber.from(0), - amountWithdrawn: ethers.utils.parseEther('25'), - amountSlashed: ethers.utils.parseEther('25'), - reputation: ethers.utils.parseEther('25'), - reward: ethers.utils.parseEther('25'), - amountJobsLaunched: ethers.utils.parseEther('25'), + amountStaked: ethers.parseEther('100'), + amountAllocated: ethers.parseEther('50'), + amountLocked: ethers.parseEther('25'), + lockedUntilTimestamp: ethers.toBigInt(0), + amountWithdrawn: ethers.parseEther('25'), + amountSlashed: ethers.parseEther('25'), + reputation: ethers.parseEther('25'), + reward: ethers.parseEther('25'), + amountJobsLaunched: ethers.parseEther('25'), }; test('should return an array of stakers', async () => { @@ -814,7 +777,7 @@ describe('StakingClient', () => { const result = await stakingClient.getLeaders(filter); expect(gqlFetchSpy).toHaveBeenCalledWith( - 'https://api.thegraph.com/subgraphs/name/humanprotocol/mainnet-v2', + '', GET_LEADERS_QUERY(filter), filter ); @@ -845,28 +808,26 @@ describe('StakingClient', () => { mockEscrowFactoryContract.hasEscrow.mockRejectedValueOnce(new Error()); await expect( - stakingClient.getAllocation(ethers.constants.AddressZero) + stakingClient.getAllocation(ethers.ZeroAddress) ).rejects.toThrow(); expect(mockStakingContract.getAllocation).toHaveBeenCalledTimes(0); }); test('should return allocation information', async () => { const mockAllocation: IAllocation = { - escrowAddress: ethers.constants.AddressZero, - staker: ethers.constants.AddressZero, - tokens: ethers.utils.parseEther('100'), - createdAt: ethers.utils.parseEther('100'), - closedAt: ethers.utils.parseEther('100'), + escrowAddress: ethers.ZeroAddress, + staker: ethers.ZeroAddress, + tokens: ethers.parseEther('100'), + createdAt: ethers.parseEther('100'), + closedAt: ethers.parseEther('100'), }; mockEscrowFactoryContract.hasEscrow.mockResolvedValueOnce(true); mockStakingContract.getAllocation.mockResolvedValueOnce(mockAllocation); - const result = await stakingClient.getAllocation( - ethers.constants.AddressZero - ); + const result = await stakingClient.getAllocation(ethers.ZeroAddress); expect(result).toEqual(mockAllocation); expect(mockStakingContract.getAllocation).toHaveBeenCalledWith( - ethers.constants.AddressZero + ethers.ZeroAddress ); expect(mockStakingContract.getAllocation).toHaveBeenCalledTimes(1); }); @@ -875,7 +836,7 @@ describe('StakingClient', () => { mockEscrowFactoryContract.hasEscrow.mockResolvedValueOnce(true); mockStakingContract.getAllocation.mockRejectedValue(new Error()); await expect( - stakingClient.getAllocation(ethers.constants.AddressZero) + stakingClient.getAllocation(ethers.ZeroAddress) ).rejects.toThrow(); }); }); @@ -884,8 +845,8 @@ describe('StakingClient', () => { const invalidAddress = 'InvalidAddress'; const mockReward: IReward = { - escrowAddress: ethers.constants.AddressZero, - amount: ethers.utils.parseEther('100'), + escrowAddress: ethers.ZeroAddress, + amount: ethers.parseEther('100'), }; test('should throw an error if an invalid escrow address is provided', async () => { @@ -900,9 +861,7 @@ describe('StakingClient', () => { Promise.resolve([mockReward, mockReward]) ); - const results = await stakingClient.getRewards( - ethers.constants.AddressZero - ); + const results = await stakingClient.getRewards(ethers.ZeroAddress); expect(results).toEqual([mockReward, mockReward]); }); diff --git a/packages/sdk/typescript/human-protocol-sdk/test/statistics.test.ts b/packages/sdk/typescript/human-protocol-sdk/test/statistics.test.ts index 84b8f4d9e1..1a15f73c60 100644 --- a/packages/sdk/typescript/human-protocol-sdk/test/statistics.test.ts +++ b/packages/sdk/typescript/human-protocol-sdk/test/statistics.test.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { BigNumber } from 'ethers'; +import { ethers } from 'ethers'; import * as gqlFetch from 'graphql-request'; import { afterEach, beforeEach, describe, expect, test, vi } from 'vitest'; import { NETWORKS } from '../src/constants'; @@ -192,9 +192,9 @@ describe('StatisticsClient', () => { dailyPaymentsData: [ { timestamp: new Date(1000), - totalAmountPaid: BigNumber.from(100), + totalAmountPaid: ethers.toBigInt(100), totalCount: 4, - averageAmountPerWorker: BigNumber.from(25), + averageAmountPerWorker: ethers.toBigInt(25), }, ], }); @@ -263,19 +263,19 @@ describe('StatisticsClient', () => { ); expect(result).toEqual({ - totalTransferAmount: BigNumber.from(100), + totalTransferAmount: ethers.toBigInt(100), totalTransferCount: 4, totalHolders: 2, holders: [ { address: '0x123', - balance: BigNumber.from(10), + balance: ethers.toBigInt(10), }, ], dailyHMTData: [ { timestamp: new Date(1000), - totalTransactionAmount: BigNumber.from(100), + totalTransactionAmount: ethers.toBigInt(100), totalTransactionCount: 4, }, ], diff --git a/yarn.lock b/yarn.lock index fa3b3c6868..b5a2e01e8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,7 +7,7 @@ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@adobe/css-tools@^4.3.1": +"@adobe/css-tools@^4.3.2": version "4.3.2" resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.3.2.tgz#a6abc715fb6884851fca9dad37fc34739a04fd11" integrity sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw== @@ -108,11 +108,11 @@ tslib "^1.11.1" "@aws-sdk/types@^3.1.0": - version "3.468.0" - resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.468.0.tgz#f97b34fc92a800d1d8b866f47693ae8f3d46517b" - integrity sha512-rx/9uHI4inRbp2tw3Y4Ih4PNZkVj32h7WneSg3MVgVjAoVD5Zti9KhS5hkvsBxfgmQmg0AQbE+b1sy5WGAgntA== + version "3.485.0" + resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.485.0.tgz#9ffebb602bba4b6b75e2b037ee93a8735c06da3e" + integrity sha512-+QW32YQdvZRDOwrAQPo/qCyXoSjgXB6RwJwCwkd8ebJXRXw6tmGKIHaZqYHt/LtBymvnaBgBBADNa4+qFvlOFw== dependencies: - "@smithy/types" "^2.7.0" + "@smithy/types" "^2.8.0" tslib "^2.5.0" "@aws-sdk/util-utf8-browser@^3.0.0": @@ -136,19 +136,19 @@ integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== "@babel/core@^7.1.0", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.16.0", "@babel/core@^7.20.12", "@babel/core@^7.22.20", "@babel/core@^7.23.5", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.6.tgz#8be77cd77c55baadcc1eae1c33df90ab6d2151d4" - integrity sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw== + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.7.tgz#4d8016e06a14b5f92530a13ed0561730b5c6483f" + integrity sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.23.5" "@babel/generator" "^7.23.6" "@babel/helper-compilation-targets" "^7.23.6" "@babel/helper-module-transforms" "^7.23.3" - "@babel/helpers" "^7.23.6" + "@babel/helpers" "^7.23.7" "@babel/parser" "^7.23.6" "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.6" + "@babel/traverse" "^7.23.7" "@babel/types" "^7.23.6" convert-source-map "^2.0.0" debug "^4.1.0" @@ -200,10 +200,10 @@ lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.22.15", "@babel/helper-create-class-features-plugin@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.6.tgz#b04d915ce92ce363666f816a884cdcfc9be04953" - integrity sha512-cBXU1vZni/CpGF29iTu4YRbOZt3Wat6zCoMDxRF1MayiEc4URxOj31tT65HUM0CRpMowA3HCJaAOVOUnMf96cw== +"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.22.15", "@babel/helper-create-class-features-plugin@^7.23.6", "@babel/helper-create-class-features-plugin@^7.23.7": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.7.tgz#b2e6826e0e20d337143655198b79d58fdc9bd43d" + integrity sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" "@babel/helper-environment-visitor" "^7.22.20" @@ -355,13 +355,13 @@ "@babel/template" "^7.22.15" "@babel/types" "^7.22.19" -"@babel/helpers@^7.23.6": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.6.tgz#d03af2ee5fb34691eec0cda90f5ecbb4d4da145a" - integrity sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA== +"@babel/helpers@^7.23.7": + version "7.23.8" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.8.tgz#fc6b2d65b16847fd50adddbd4232c76378959e34" + integrity sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ== dependencies: "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.6" + "@babel/traverse" "^7.23.7" "@babel/types" "^7.23.6" "@babel/highlight@^7.23.4": @@ -394,10 +394,10 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" "@babel/plugin-transform-optional-chaining" "^7.23.3" -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.23.3": - version "7.23.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.3.tgz#20c60d4639d18f7da8602548512e9d3a4c8d7098" - integrity sha512-XaJak1qcityzrX0/IU5nKHb34VaibwP3saKqG6a/tppelgllOH13LUann4ZCIBcVOeE6H18K4Vx9QKkVww3z/w== +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.23.7": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.7.tgz#516462a95d10a9618f197d39ad291a9b47ae1d7b" + integrity sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw== dependencies: "@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-plugin-utils" "^7.22.5" @@ -411,15 +411,12 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-proposal-decorators@^7.16.4": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.6.tgz#b34e9837c4fb0277c6d571581c76595521cf2db4" - integrity sha512-D7Ccq9LfkBFnow3azZGJvZYgcfeqAw3I1e5LoTpj6UKIFQilh8yqXsIGcRIqbBdsPWIz+Ze7ZZfggSj62Qp+Fg== + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.23.7.tgz#1d827902cbd3d9054e54fb2f2056cdd1eaa0e368" + integrity sha512-b1s5JyeMvqj7d9m9KhJNHKc18gEJiSyVzVX3bwbiPalQBQpuvfPh6lA9F7Kk/dWH0TIiXRpB9yicwijY6buPng== dependencies: - "@babel/helper-create-class-features-plugin" "^7.23.6" + "@babel/helper-create-class-features-plugin" "^7.23.7" "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-replace-supers" "^7.22.20" - "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" "@babel/plugin-syntax-decorators" "^7.23.3" "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.0": @@ -629,10 +626,10 @@ dependencies: "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-async-generator-functions@^7.23.4": - version "7.23.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.4.tgz#93ac8e3531f347fba519b4703f9ff2a75c6ae27a" - integrity sha512-efdkfPhHYTtn0G6n2ddrESE91fgXxjlqLsnUtPWnJs4a4mZIbUaK7ffqKIIUKXSHwcDvaCVX6GXkaJJFqtX7jw== +"@babel/plugin-transform-async-generator-functions@^7.23.7": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.7.tgz#3aa0b4f2fa3788b5226ef9346cf6d16ec61f99cd" + integrity sha512-PdxEpL71bJp1byMG0va5gwQcXHxuEYC/BgI/e88mGTtohbZN28O5Yit0Plkkm/dBzCF/BxmbNcses1RH1T+urA== dependencies: "@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-plugin-utils" "^7.22.5" @@ -679,16 +676,15 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-transform-classes@^7.23.5": - version "7.23.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.5.tgz#e7a75f815e0c534cc4c9a39c56636c84fc0d64f2" - integrity sha512-jvOTR4nicqYC9yzOHIhXG5emiFEOpappSJAl73SDSEDcybD+Puuze8Tnpb9p9qEyYup24tq891gkaygIFvWDqg== +"@babel/plugin-transform-classes@^7.23.8": + version "7.23.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.8.tgz#d08ae096c240347badd68cdf1b6d1624a6435d92" + integrity sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-compilation-targets" "^7.23.6" "@babel/helper-environment-visitor" "^7.22.20" "@babel/helper-function-name" "^7.23.0" - "@babel/helper-optimise-call-expression" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-replace-supers" "^7.22.20" "@babel/helper-split-export-declaration" "^7.22.6" @@ -1000,15 +996,15 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-runtime@^7.16.4": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.6.tgz#bf853cd0a675c16ee33e6ba2a63b536e75e5d754" - integrity sha512-kF1Zg62aPseQ11orDhFRw+aPG/eynNQtI+TyY+m33qJa2cJ5EEvza2P2BNTIA9E5MyqFABHEyY6CPHwgdy9aNg== + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.7.tgz#52bbd20054855beb9deae3bee9ceb05289c343e6" + integrity sha512-fa0hnfmiXc9fq/weK34MUV0drz2pOL/vfKWvN7Qw127hiUPabFCUMgAbYWcchRzMJit4o5ARsK/s+5h0249pLw== dependencies: "@babel/helper-module-imports" "^7.22.15" "@babel/helper-plugin-utils" "^7.22.5" - babel-plugin-polyfill-corejs2 "^0.4.6" - babel-plugin-polyfill-corejs3 "^0.8.5" - babel-plugin-polyfill-regenerator "^0.5.3" + babel-plugin-polyfill-corejs2 "^0.4.7" + babel-plugin-polyfill-corejs3 "^0.8.7" + babel-plugin-polyfill-regenerator "^0.5.4" semver "^6.3.1" "@babel/plugin-transform-shorthand-properties@^7.23.3": @@ -1089,9 +1085,9 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/preset-env@^7.16.4", "@babel/preset-env@^7.23.5": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.23.6.tgz#ad0ea799d5a3c07db5b9a172819bbd444092187a" - integrity sha512-2XPn/BqKkZCpzYhUUNZ1ssXw7DcXfKQEjv/uXZUXgaebCMYmkEsfZ2yY+vv+xtXv50WmL5SGhyB6/xsWxIvvOQ== + version "7.23.8" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.23.8.tgz#7d6f8171ea7c221ecd28059e65ad37c20e441e3e" + integrity sha512-lFlpmkApLkEP6woIKprO6DO60RImpatTQKtz4sUcDjVcK8M8mQ4sZsuxaTMNOZf0sqAq/ReYW1ZBHnOQwKpLWA== dependencies: "@babel/compat-data" "^7.23.5" "@babel/helper-compilation-targets" "^7.23.6" @@ -1099,7 +1095,7 @@ "@babel/helper-validator-option" "^7.23.5" "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.23.3" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.23.3" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.23.3" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.23.7" "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" @@ -1120,13 +1116,13 @@ "@babel/plugin-syntax-top-level-await" "^7.14.5" "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" "@babel/plugin-transform-arrow-functions" "^7.23.3" - "@babel/plugin-transform-async-generator-functions" "^7.23.4" + "@babel/plugin-transform-async-generator-functions" "^7.23.7" "@babel/plugin-transform-async-to-generator" "^7.23.3" "@babel/plugin-transform-block-scoped-functions" "^7.23.3" "@babel/plugin-transform-block-scoping" "^7.23.4" "@babel/plugin-transform-class-properties" "^7.23.3" "@babel/plugin-transform-class-static-block" "^7.23.4" - "@babel/plugin-transform-classes" "^7.23.5" + "@babel/plugin-transform-classes" "^7.23.8" "@babel/plugin-transform-computed-properties" "^7.23.3" "@babel/plugin-transform-destructuring" "^7.23.3" "@babel/plugin-transform-dotall-regex" "^7.23.3" @@ -1168,9 +1164,9 @@ "@babel/plugin-transform-unicode-regex" "^7.23.3" "@babel/plugin-transform-unicode-sets-regex" "^7.23.3" "@babel/preset-modules" "0.1.6-no-external-plugins" - babel-plugin-polyfill-corejs2 "^0.4.6" - babel-plugin-polyfill-corejs3 "^0.8.5" - babel-plugin-polyfill-regenerator "^0.5.3" + babel-plugin-polyfill-corejs2 "^0.4.7" + babel-plugin-polyfill-corejs3 "^0.8.7" + babel-plugin-polyfill-regenerator "^0.5.4" core-js-compat "^3.31.0" semver "^6.3.1" @@ -1212,17 +1208,17 @@ integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== "@babel/runtime-corejs3@^7.9.2": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.23.6.tgz#c25dd662fc205a03fdaefd122066eb9d4533ccf9" - integrity sha512-Djs/ZTAnpyj0nyg7p1J6oiE/tZ9G2stqAFlLGZynrW+F3k2w2jGK2mLOBxzYIOcZYA89+c3d3wXKpYLcpwcU6w== + version "7.23.8" + resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.23.8.tgz#b8aa3d47570bdd08fed77fdfd69542118af0df26" + integrity sha512-2ZzmcDugdm0/YQKFVYsXiwUN7USPX8PM7cytpb4PFl87fM+qYPSvTZX//8tyeJB1j0YDmafBJEbl5f8NfLyuKw== dependencies: core-js-pure "^3.30.2" regenerator-runtime "^0.14.0" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.5", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.9", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.6", "@babel/runtime@^7.21.0", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.5", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.6.tgz#c05e610dc228855dc92ef1b53d07389ed8ab521d" - integrity sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ== +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.5", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.9", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.6", "@babel/runtime@^7.21.0", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.4", "@babel/runtime@^7.23.6", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": + version "7.23.8" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.8.tgz#8ee6fe1ac47add7122902f257b8ddf55c898f650" + integrity sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw== dependencies: regenerator-runtime "^0.14.0" @@ -1235,10 +1231,10 @@ "@babel/parser" "^7.22.15" "@babel/types" "^7.22.15" -"@babel/traverse@^7.16.8", "@babel/traverse@^7.23.6", "@babel/traverse@^7.4.5", "@babel/traverse@^7.7.2": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.6.tgz#b53526a2367a0dd6edc423637f3d2d0f2521abc5" - integrity sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ== +"@babel/traverse@^7.16.8", "@babel/traverse@^7.23.7", "@babel/traverse@^7.4.5", "@babel/traverse@^7.7.2": + version "7.23.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.7.tgz#9a7bf285c928cb99b5ead19c3b1ce5b310c9c305" + integrity sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg== dependencies: "@babel/code-frame" "^7.23.5" "@babel/generator" "^7.23.6" @@ -1319,12 +1315,12 @@ "@lezer/common" "^1.0.0" "@codemirror/commands@^6.0.0", "@codemirror/commands@^6.1.0": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@codemirror/commands/-/commands-6.3.2.tgz#9fa47ccdacbea52fcddc6845089dfbf5be03f126" - integrity sha512-tjoi4MCWDNxgIpoLZ7+tezdS9OEB6pkiDKhfKx9ReJ/XBcs2G2RXIu+/FxXBlWsPTsz6C9q/r4gjzrsxpcnqCQ== + version "6.3.3" + resolved "https://registry.yarnpkg.com/@codemirror/commands/-/commands-6.3.3.tgz#03face5bf5f3de0fc4e09b177b3c91eda2ceb7e9" + integrity sha512-dO4hcF0fGT9tu1Pj1D2PvGvxjeGkbC6RGcZw6Qs74TH+Ed1gw98jmUgd2axWvIZEqTeTuFrg1lEB1KV6cK9h1A== dependencies: "@codemirror/language" "^6.0.0" - "@codemirror/state" "^6.2.0" + "@codemirror/state" "^6.4.0" "@codemirror/view" "^6.0.0" "@lezer/common" "^1.1.0" @@ -1337,12 +1333,12 @@ "@lezer/json" "^1.0.0" "@codemirror/language@^6.0.0": - version "6.9.3" - resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.9.3.tgz#1c127dc43e025d4c9b1ba1b79f4b1ba081d5aeaa" - integrity sha512-qq48pYzoi6ldYWV/52+Z9Ou6QouVI+8YwvxFbUypI33NbjG2UeRHKENRyhwljTTiOqjQ33FjyZj6EREQ9apAOQ== + version "6.10.0" + resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.10.0.tgz#2d0e818716825ee2ed0dacd04595eaa61bae8f23" + integrity sha512-2vaNn9aPGCRFKWcHPFksctzJ8yS5p7YoaT+jHpc0UGKzNuAIx4qy6R5wiqbP+heEEdyaABA582mNqSHzSoYdmg== dependencies: "@codemirror/state" "^6.0.0" - "@codemirror/view" "^6.0.0" + "@codemirror/view" "^6.23.0" "@lezer/common" "^1.1.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" @@ -1366,10 +1362,10 @@ "@codemirror/view" "^6.0.0" crelt "^1.0.5" -"@codemirror/state@^6.0.0", "@codemirror/state@^6.1.1", "@codemirror/state@^6.1.4", "@codemirror/state@^6.2.0": - version "6.3.3" - resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.3.3.tgz#6a647c2fa62b68604187152de497e91aabf43f82" - integrity sha512-0wufKcTw2dEwEaADajjHf6hBy1sh3M6V0e+q4JKIhLuiMSe5td5HOWpUdvKth1fT1M9VYOboajoBHpkCd7PG7A== +"@codemirror/state@^6.0.0", "@codemirror/state@^6.1.1", "@codemirror/state@^6.4.0": + version "6.4.0" + resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.4.0.tgz#8bc3e096c84360b34525a84696a84f86b305363a" + integrity sha512-hm8XshYj5Fo30Bb922QX9hXB/bxOAVH+qaqHBzw5TKa72vOeslyGwd4X8M0c1dJ9JqxlaMceOQ8RsL9tC7gU0A== "@codemirror/theme-one-dark@^6.0.0": version "6.1.2" @@ -1381,12 +1377,12 @@ "@codemirror/view" "^6.0.0" "@lezer/highlight" "^1.0.0" -"@codemirror/view@^6.0.0", "@codemirror/view@^6.17.0": - version "6.22.3" - resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.22.3.tgz#22514a0256d0fbd3e9079d7c49cb97f35593156c" - integrity sha512-rqnq+Zospwoi3x1vZ8BGV1MlRsaGljX+6qiGYmIpJ++M+LCC+wjfDaPklhwpWSgv7pr/qx29KiAKQBH5+DOn4w== +"@codemirror/view@^6.0.0", "@codemirror/view@^6.17.0", "@codemirror/view@^6.23.0": + version "6.23.0" + resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.23.0.tgz#8054a2043273abad7f1587d15accb0623e1960ed" + integrity sha512-/51px9N4uW8NpuWkyUX+iam5+PM6io2fm+QmRnzwqBy5v/pwGg9T0kILFtYeum8hjuvENtgsGNKluOfqIICmeQ== dependencies: - "@codemirror/state" "^6.1.4" + "@codemirror/state" "^6.4.0" style-mod "^4.1.0" w3c-keyname "^2.2.4" @@ -1502,23 +1498,23 @@ integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA== "@emotion/react@^11.10.5", "@emotion/react@^11.8.1": - version "11.11.1" - resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.11.1.tgz#b2c36afac95b184f73b08da8c214fdf861fa4157" - integrity sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA== + version "11.11.3" + resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.11.3.tgz#96b855dc40a2a55f52a72f518a41db4f69c31a25" + integrity sha512-Cnn0kuq4DoONOMcnoVsTOR8E+AdnKFf//6kUWc4LCdnxj31pZWn7rIULd6Y7/Js1PiPHzn7SKCM9vB/jBni8eA== dependencies: "@babel/runtime" "^7.18.3" "@emotion/babel-plugin" "^11.11.0" "@emotion/cache" "^11.11.0" - "@emotion/serialize" "^1.1.2" + "@emotion/serialize" "^1.1.3" "@emotion/use-insertion-effect-with-fallbacks" "^1.0.1" "@emotion/utils" "^1.2.1" "@emotion/weak-memoize" "^0.3.1" hoist-non-react-statics "^3.3.1" -"@emotion/serialize@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.1.2.tgz#017a6e4c9b8a803bd576ff3d52a0ea6fa5a62b51" - integrity sha512-zR6a/fkFP4EAcCMQtLOhIgpprZOwNmCldtpaISpvz348+DP4Mz8ZoKaGGCQpbzepNIUWbq4w6hNZkwDyKoS+HA== +"@emotion/serialize@^1.1.2", "@emotion/serialize@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.1.3.tgz#84b77bfcfe3b7bb47d326602f640ccfcacd5ffb0" + integrity sha512-iD4D6QVZFDhcbH0RAG1uVu1CwVLMWUkCvAqqlewO/rxf8+87yIBAlt4+AxMiiKPLs5hFc0owNk/sLLAOROw3cA== dependencies: "@emotion/hash" "^0.9.1" "@emotion/memoize" "^0.8.1" @@ -1573,10 +1569,10 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz#d0fce5d07b0620caa282b5131c297bb60f9d87e6" integrity sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww== -"@esbuild/aix-ppc64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.10.tgz#fb3922a0183d27446de00cf60d4f7baaadf98d84" - integrity sha512-Q+mk96KJ+FZ30h9fsJl+67IjNJm3x2eX+GBWGmocAKgzp27cowCOOqSdscX80s0SpdFXZnIv/+1xD1EctFx96Q== +"@esbuild/aix-ppc64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz#2acd20be6d4f0458bc8c784103495ff24f13b1d3" + integrity sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g== "@esbuild/android-arm64@0.16.17": version "0.16.17" @@ -1588,10 +1584,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== -"@esbuild/android-arm64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.10.tgz#ef31015416dd79398082409b77aaaa2ade4d531a" - integrity sha512-1X4CClKhDgC3by7k8aOWZeBXQX8dHT5QAMCAQDArCLaYfkppoARvh0fit3X2Qs+MXDngKcHv6XXyQCpY0hkK1Q== +"@esbuild/android-arm64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz#b45d000017385c9051a4f03e17078abb935be220" + integrity sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q== "@esbuild/android-arm64@0.19.2": version "0.19.2" @@ -1608,10 +1604,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw== -"@esbuild/android-arm@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.10.tgz#1c23c7e75473aae9fb323be5d9db225142f47f52" - integrity sha512-7W0bK7qfkw1fc2viBfrtAEkDKHatYfHzr/jKAHNr9BvkYDXPcC6bodtm8AyLJNNuqClLNaeTLuwURt4PRT9d7w== +"@esbuild/android-arm@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.11.tgz#f46f55414e1c3614ac682b29977792131238164c" + integrity sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw== "@esbuild/android-arm@0.19.2": version "0.19.2" @@ -1628,10 +1624,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg== -"@esbuild/android-x64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.10.tgz#df6a4e6d6eb8da5595cfce16d4e3f6bc24464707" - integrity sha512-O/nO/g+/7NlitUxETkUv/IvADKuZXyH4BHf/g/7laqKC4i/7whLpB0gvpPc2zpF0q9Q6FXS3TS75QHac9MvVWw== +"@esbuild/android-x64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.11.tgz#bfc01e91740b82011ef503c48f548950824922b2" + integrity sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg== "@esbuild/android-x64@0.19.2": version "0.19.2" @@ -1648,10 +1644,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== -"@esbuild/darwin-arm64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.10.tgz#8462a55db07c1b2fad61c8244ce04469ef1043be" - integrity sha512-YSRRs2zOpwypck+6GL3wGXx2gNP7DXzetmo5pHXLrY/VIMsS59yKfjPizQ4lLt5vEI80M41gjm2BxrGZ5U+VMA== +"@esbuild/darwin-arm64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz#533fb7f5a08c37121d82c66198263dcc1bed29bf" + integrity sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ== "@esbuild/darwin-arm64@0.19.2": version "0.19.2" @@ -1668,10 +1664,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ== -"@esbuild/darwin-x64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.10.tgz#d1de20bfd41bb75b955ba86a6b1004539e8218c1" - integrity sha512-alfGtT+IEICKtNE54hbvPg13xGBe4GkVxyGWtzr+yHO7HIiRJppPDhOKq3zstTcVf8msXb/t4eavW3jCDpMSmA== +"@esbuild/darwin-x64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz#62f3819eff7e4ddc656b7c6815a31cf9a1e7d98e" + integrity sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g== "@esbuild/darwin-x64@0.19.2": version "0.19.2" @@ -1688,10 +1684,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw== -"@esbuild/freebsd-arm64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.10.tgz#16904879e34c53a2e039d1284695d2db3e664d57" - integrity sha512-dMtk1wc7FSH8CCkE854GyGuNKCewlh+7heYP/sclpOG6Cectzk14qdUIY5CrKDbkA/OczXq9WesqnPl09mj5dg== +"@esbuild/freebsd-arm64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz#d478b4195aa3ca44160272dab85ef8baf4175b4a" + integrity sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA== "@esbuild/freebsd-arm64@0.19.2": version "0.19.2" @@ -1708,10 +1704,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ== -"@esbuild/freebsd-x64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.10.tgz#8ad9e5ca9786ca3f1ef1411bfd10b08dcd9d4cef" - integrity sha512-G5UPPspryHu1T3uX8WiOEUa6q6OlQh6gNl4CO4Iw5PS+Kg5bVggVFehzXBJY6X6RSOMS8iXDv2330VzaObm4Ag== +"@esbuild/freebsd-x64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz#7bdcc1917409178257ca6a1a27fe06e797ec18a2" + integrity sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw== "@esbuild/freebsd-x64@0.19.2": version "0.19.2" @@ -1728,10 +1724,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA== -"@esbuild/linux-arm64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.10.tgz#d82cf2c590faece82d28bbf1cfbe36f22ae25bd2" - integrity sha512-QxaouHWZ+2KWEj7cGJmvTIHVALfhpGxo3WLmlYfJ+dA5fJB6lDEIg+oe/0//FuyVHuS3l79/wyBxbHr0NgtxJQ== +"@esbuild/linux-arm64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz#58ad4ff11685fcc735d7ff4ca759ab18fcfe4545" + integrity sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg== "@esbuild/linux-arm64@0.19.2": version "0.19.2" @@ -1748,10 +1744,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg== -"@esbuild/linux-arm@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.10.tgz#477b8e7c7bcd34369717b04dd9ee6972c84f4029" - integrity sha512-j6gUW5aAaPgD416Hk9FHxn27On28H4eVI9rJ4az7oCGTFW48+LcgNDBN+9f8rKZz7EEowo889CPKyeaD0iw9Kg== +"@esbuild/linux-arm@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz#ce82246d873b5534d34de1e5c1b33026f35e60e3" + integrity sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q== "@esbuild/linux-arm@0.19.2": version "0.19.2" @@ -1768,10 +1764,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA== -"@esbuild/linux-ia32@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.10.tgz#d55ff822cf5b0252a57112f86857ff23be6cab0e" - integrity sha512-4ub1YwXxYjj9h1UIZs2hYbnTZBtenPw5NfXCRgEkGb0b6OJ2gpkMvDqRDYIDRjRdWSe/TBiZltm3Y3Q8SN1xNg== +"@esbuild/linux-ia32@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz#cbae1f313209affc74b80f4390c4c35c6ab83fa4" + integrity sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA== "@esbuild/linux-ia32@0.19.2": version "0.19.2" @@ -1793,10 +1789,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg== -"@esbuild/linux-loong64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.10.tgz#a9ad057d7e48d6c9f62ff50f6f208e331c4543c7" - integrity sha512-lo3I9k+mbEKoxtoIbM0yC/MZ1i2wM0cIeOejlVdZ3D86LAcFXFRdeuZmh91QJvUTW51bOK5W2BznGNIl4+mDaA== +"@esbuild/linux-loong64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz#5f32aead1c3ec8f4cccdb7ed08b166224d4e9121" + integrity sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg== "@esbuild/linux-loong64@0.19.2": version "0.19.2" @@ -1813,10 +1809,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ== -"@esbuild/linux-mips64el@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.10.tgz#b011a96924773d60ebab396fbd7a08de66668179" - integrity sha512-J4gH3zhHNbdZN0Bcr1QUGVNkHTdpijgx5VMxeetSk6ntdt+vR1DqGmHxQYHRmNb77tP6GVvD+K0NyO4xjd7y4A== +"@esbuild/linux-mips64el@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz#38eecf1cbb8c36a616261de858b3c10d03419af9" + integrity sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg== "@esbuild/linux-mips64el@0.19.2": version "0.19.2" @@ -1833,10 +1829,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA== -"@esbuild/linux-ppc64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.10.tgz#5d8b59929c029811e473f2544790ea11d588d4dd" - integrity sha512-tgT/7u+QhV6ge8wFMzaklOY7KqiyitgT1AUHMApau32ZlvTB/+efeCtMk4eXS+uEymYK249JsoiklZN64xt6oQ== +"@esbuild/linux-ppc64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz#9c5725a94e6ec15b93195e5a6afb821628afd912" + integrity sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA== "@esbuild/linux-ppc64@0.19.2": version "0.19.2" @@ -1853,10 +1849,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A== -"@esbuild/linux-riscv64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.10.tgz#292b06978375b271bd8bc0a554e0822957508d22" - integrity sha512-0f/spw0PfBMZBNqtKe5FLzBDGo0SKZKvMl5PHYQr3+eiSscfJ96XEknCe+JoOayybWUFQbcJTrk946i3j9uYZA== +"@esbuild/linux-riscv64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz#2dc4486d474a2a62bbe5870522a9a600e2acb916" + integrity sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ== "@esbuild/linux-riscv64@0.19.2": version "0.19.2" @@ -1873,10 +1869,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ== -"@esbuild/linux-s390x@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.10.tgz#d30af63530f8d4fa96930374c9dd0d62bf59e069" - integrity sha512-pZFe0OeskMHzHa9U38g+z8Yx5FNCLFtUnJtQMpwhS+r4S566aK2ci3t4NCP4tjt6d5j5uo4h7tExZMjeKoehAA== +"@esbuild/linux-s390x@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz#4ad8567df48f7dd4c71ec5b1753b6f37561a65a8" + integrity sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q== "@esbuild/linux-s390x@0.19.2": version "0.19.2" @@ -1893,10 +1889,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== -"@esbuild/linux-x64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.10.tgz#898c72eeb74d9f2fb43acf316125b475548b75ce" - integrity sha512-SpYNEqg/6pZYoc+1zLCjVOYvxfZVZj6w0KROZ3Fje/QrM3nfvT2llI+wmKSrWuX6wmZeTapbarvuNNK/qepSgA== +"@esbuild/linux-x64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz#b7390c4d5184f203ebe7ddaedf073df82a658766" + integrity sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA== "@esbuild/linux-x64@0.19.2": version "0.19.2" @@ -1913,10 +1909,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A== -"@esbuild/netbsd-x64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.10.tgz#fd473a5ae261b43eab6dad4dbd5a3155906e6c91" - integrity sha512-ACbZ0vXy9zksNArWlk2c38NdKg25+L9pr/mVaj9SUq6lHZu/35nx2xnQVRGLrC1KKQqJKRIB0q8GspiHI3J80Q== +"@esbuild/netbsd-x64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz#d633c09492a1721377f3bccedb2d821b911e813d" + integrity sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ== "@esbuild/netbsd-x64@0.19.2": version "0.19.2" @@ -1933,10 +1929,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg== -"@esbuild/openbsd-x64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.10.tgz#96eb8992e526717b5272321eaad3e21f3a608e46" - integrity sha512-PxcgvjdSjtgPMiPQrM3pwSaG4kGphP+bLSb+cihuP0LYdZv1epbAIecHVl5sD3npkfYBZ0ZnOjR878I7MdJDFg== +"@esbuild/openbsd-x64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz#17388c76e2f01125bf831a68c03a7ffccb65d1a2" + integrity sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw== "@esbuild/openbsd-x64@0.19.2": version "0.19.2" @@ -1953,10 +1949,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ== -"@esbuild/sunos-x64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.10.tgz#c16ee1c167f903eaaa6acf7372bee42d5a89c9bc" - integrity sha512-ZkIOtrRL8SEJjr+VHjmW0znkPs+oJXhlJbNwfI37rvgeMtk3sxOQevXPXjmAPZPigVTncvFqLMd+uV0IBSEzqA== +"@esbuild/sunos-x64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz#e320636f00bb9f4fdf3a80e548cb743370d41767" + integrity sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ== "@esbuild/sunos-x64@0.19.2": version "0.19.2" @@ -1973,10 +1969,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg== -"@esbuild/win32-arm64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.10.tgz#7e417d1971dbc7e469b4eceb6a5d1d667b5e3dcc" - integrity sha512-+Sa4oTDbpBfGpl3Hn3XiUe4f8TU2JF7aX8cOfqFYMMjXp6ma6NJDztl5FDG8Ezx0OjwGikIHw+iA54YLDNNVfw== +"@esbuild/win32-arm64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz#c778b45a496e90b6fc373e2a2bb072f1441fe0ee" + integrity sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ== "@esbuild/win32-arm64@0.19.2": version "0.19.2" @@ -1993,10 +1989,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g== -"@esbuild/win32-ia32@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.10.tgz#2b52dfec6cd061ecb36171c13bae554888b439e5" - integrity sha512-EOGVLK1oWMBXgfttJdPHDTiivYSjX6jDNaATeNOaCOFEVcfMjtbx7WVQwPSE1eIfCp/CaSF2nSrDtzc4I9f8TQ== +"@esbuild/win32-ia32@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz#481a65fee2e5cce74ec44823e6b09ecedcc5194c" + integrity sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg== "@esbuild/win32-ia32@0.19.2": version "0.19.2" @@ -2013,10 +2009,10 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== -"@esbuild/win32-x64@0.19.10": - version "0.19.10" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.10.tgz#bd123a74f243d2f3a1f046447bb9b363ee25d072" - integrity sha512-whqLG6Sc70AbU73fFYvuYzaE4MNMBIlR1Y/IrUeOXFrWHxBEjjbZaQ3IXIQS8wJdAzue2GwYZCjOrgrU1oUHoA== +"@esbuild/win32-x64@0.19.11": + version "0.19.11" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz#a5d300008960bb39677c46bf16f53ec70d8dee04" + integrity sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw== "@esbuild/win32-x64@0.19.2": version "0.19.2" @@ -2100,7 +2096,7 @@ "@ethersproject/properties" "^5.0.3" "@ethersproject/strings" "^5.0.4" -"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.9", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.4.7", "@ethersproject/abi@^5.5.0", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.9", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.5.0", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== @@ -2291,7 +2287,7 @@ dependencies: "@ethersproject/logger" "^5.7.0" -"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.4.7", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": +"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.1", "@ethersproject/providers@^5.7.2": version "5.7.2" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb" integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg== @@ -2457,32 +2453,32 @@ graphql-import-node "^0.0.5" js-yaml "^4.1.0" -"@floating-ui/core@^1.4.2": - version "1.5.2" - resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.5.2.tgz#53a0f7a98c550e63134d504f26804f6b83dbc071" - integrity sha512-Ii3MrfY/GAIN3OhXNzpCKaLxHQfJF9qvwq/kEJYdqDxeIHa01K8sldugal6TmeeXl+WMvhv9cnVzUTaFFJF09A== +"@floating-ui/core@^1.5.3": + version "1.5.3" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.5.3.tgz#b6aa0827708d70971c8679a16cf680a515b8a52a" + integrity sha512-O0WKDOo0yhJuugCx6trZQj5jVJ9yR0ystG2JaNAemYUWce+pmM6WUEFIibnWyEJKdrDxhm75NoSRME35FNaM/Q== dependencies: - "@floating-ui/utils" "^0.1.3" + "@floating-ui/utils" "^0.2.0" -"@floating-ui/dom@^1.0.1", "@floating-ui/dom@^1.5.1": - version "1.5.3" - resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.5.3.tgz#54e50efcb432c06c23cd33de2b575102005436fa" - integrity sha512-ClAbQnEqJAKCJOEbbLo5IUlZHkNszqhuxS4fHAVxRPXPya6Ysf2G8KypnYcOTpx6I8xcgF9bbHb6g/2KpbV8qA== +"@floating-ui/dom@^1.0.1", "@floating-ui/dom@^1.5.4": + version "1.5.4" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.5.4.tgz#28df1e1cb373884224a463235c218dcbd81a16bb" + integrity sha512-jByEsHIY+eEdCjnTVu+E3ephzTOzkQ8hgUfGwos+bg7NlH33Zc5uO+QHz1mrQUOgIKKDD1RtS201P9NvAfq3XQ== dependencies: - "@floating-ui/core" "^1.4.2" - "@floating-ui/utils" "^0.1.3" + "@floating-ui/core" "^1.5.3" + "@floating-ui/utils" "^0.2.0" "@floating-ui/react-dom@^2.0.0", "@floating-ui/react-dom@^2.0.2", "@floating-ui/react-dom@^2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.0.4.tgz#b076fafbdfeb881e1d86ae748b7ff95150e9f3ec" - integrity sha512-CF8k2rgKeh/49UrnIBs4BdxPUV6vize/Db1d/YbCLyp9GiVZ0BEwf5AiDSxJRCr6yOkGqTFHtmrULxkEfYZ7dQ== + version "2.0.5" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.0.5.tgz#851522899c34e3e2be1e29f3294f150834936e28" + integrity sha512-UsBK30Bg+s6+nsgblXtZmwHhgS2vmbuQK22qgt2pTQM6M3X6H1+cQcLXqgRY3ihVLcZJE6IvqDQozhsnIVqK/Q== dependencies: - "@floating-ui/dom" "^1.5.1" + "@floating-ui/dom" "^1.5.4" -"@floating-ui/utils@^0.1.3": - version "0.1.6" - resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.1.6.tgz#22958c042e10b67463997bd6ea7115fe28cbcaf9" - integrity sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A== +"@floating-ui/utils@^0.2.0": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.1.tgz#16308cea045f0fc777b6ff20a9f25474dd8293d2" + integrity sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q== "@formatjs/ecma402-abstract@1.14.3": version "1.14.3" @@ -2858,16 +2854,16 @@ integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== "@internationalized/date@^3.5.0": - version "3.5.0" - resolved "https://registry.yarnpkg.com/@internationalized/date/-/date-3.5.0.tgz#67f1dd62355f05140cc80e324842e9bfb4553abe" - integrity sha512-nw0Q+oRkizBWMioseI8+2TeUPEyopJVz5YxoYVzR0W1v+2YytiYah7s/ot35F149q/xAg4F1gT/6eTd+tsUpFQ== + version "3.5.1" + resolved "https://registry.yarnpkg.com/@internationalized/date/-/date-3.5.1.tgz#14401139f70c1ef14b845d3cac8912e82e82adcc" + integrity sha512-LUQIfwU9e+Fmutc/DpRTGXSdgYZLBegi4wygCWDSVmUdLTaMHsQyASDiJtREwanwKuQLq0hY76fCJ9J/9I2xOQ== dependencies: "@swc/helpers" "^0.5.0" "@internationalized/number@^3.3.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@internationalized/number/-/number-3.4.0.tgz#1c3ebf6ac40ce649d3d97bb835ff0559957f2e1f" - integrity sha512-8TvotW3qVDHC4uv/BVoN6Qx0Dm8clHY1/vpH+dh+XRiPW/9NVpKn1P8d1A+WLphWrMwyqyWXI7uWehJPviaeIw== + version "3.5.0" + resolved "https://registry.yarnpkg.com/@internationalized/number/-/number-3.5.0.tgz#9de6018424b441a6545f209afa286ad7df4a2906" + integrity sha512-ZY1BW8HT9WKYvaubbuqXbbDdHhOUMfE2zHHFJeTppid0S+pc8HtdIxFxaYMsGjCb4UsF+MEJ4n2TfU7iHnUK8w== dependencies: "@swc/helpers" "^0.5.0" @@ -2916,6 +2912,18 @@ dependencies: multiformats "^9.5.4" +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -3333,7 +3341,7 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.9": version "0.3.20" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f" integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q== @@ -3369,10 +3377,10 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.1.8.tgz#6cc32191660dd9d6e8f89047af09b0f201e30190" integrity sha512-mDJsOucVW8m3Lk2fdQst+P74SgiKebvq1iBk4sXLbADQOwhL9bWGaArvO+tW7jPJZwEfSPWBdHcHoYi11XAwZw== -"@lezer/common@^1.0.0", "@lezer/common@^1.1.0": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@lezer/common/-/common-1.1.2.tgz#2fc5cd6788094ffc816b539ab2bc55bafacd2abc" - integrity sha512-V+GqBsga5+cQJMfM0GdnHmg4DgWvLzgMWjbldBg0+jC3k9Gu6nJNZDLJxXEBT1Xj8KhRN4jmbC5CY7SIL++sVw== +"@lezer/common@^1.0.0", "@lezer/common@^1.1.0", "@lezer/common@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@lezer/common/-/common-1.2.0.tgz#f10493d12c4a196a02ff5fcf5695a516a4039aae" + integrity sha512-Wmvlm4q6tRpwiy20TnB3yyLTZim38Tkc50dPY8biQRwqE+ati/wD84rm3N15hikvdT4uSg9phs9ubjvcLmkpKg== "@lezer/highlight@^1.0.0": version "1.2.0" @@ -3382,10 +3390,11 @@ "@lezer/common" "^1.0.0" "@lezer/json@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@lezer/json/-/json-1.0.1.tgz#3bf5641f3d1408ec31a5f9b29e4e96c6e3a232e6" - integrity sha512-nkVC27qiEZEjySbi6gQRuMwa2sDu2PtfjSgz0A4QF81QyRGm3kb2YRzLcOPcTEtmcwvrX/cej7mlhbwViA4WJw== + version "1.0.2" + resolved "https://registry.yarnpkg.com/@lezer/json/-/json-1.0.2.tgz#bdc849e174113e2d9a569a5e6fb1a27e2f703eaf" + integrity sha512-xHT2P4S5eeCYECyKNPhr4cbEL9tc8w83SPwRC373o9uEdrvGKTZoJVAGxpOsZckMlEh9W23Pc72ew918RWQOBQ== dependencies: + "@lezer/common" "^1.2.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" @@ -3523,55 +3532,55 @@ "@motionone/dom" "^10.16.4" tslib "^2.3.1" -"@mui/base@5.0.0-beta.28", "@mui/base@^5.0.0-beta.22": - version "5.0.0-beta.28" - resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-beta.28.tgz#f072e55c0530f456ee5cb5cde2af788fdda3bf05" - integrity sha512-KIoSc5sUFceeCaZTq5MQBapFzhHqMo4kj+4azWaCAjorduhcRQtN+BCgVHmo+gvEjix74bUfxwTqGifnu2fNTg== +"@mui/base@5.0.0-beta.30", "@mui/base@^5.0.0-beta.22": + version "5.0.0-beta.30" + resolved "https://registry.yarnpkg.com/@mui/base/-/base-5.0.0-beta.30.tgz#8feca6b70f2b9cd4d5cb97799ae9fcb5376c7f83" + integrity sha512-dc38W4W3K42atE9nSaOeoJ7/x9wGIfawdwC/UmMxMLlZ1iSsITQ8dQJaTATCbn98YvYPINK/EH541YA5enQIPQ== dependencies: - "@babel/runtime" "^7.23.5" + "@babel/runtime" "^7.23.6" "@floating-ui/react-dom" "^2.0.4" - "@mui/types" "^7.2.11" - "@mui/utils" "^5.15.1" + "@mui/types" "^7.2.12" + "@mui/utils" "^5.15.3" "@popperjs/core" "^2.11.8" clsx "^2.0.0" prop-types "^15.8.1" -"@mui/core-downloads-tracker@^5.15.1": - version "5.15.1" - resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.1.tgz#8aad47e2b198640244f05f6486a927ce362e814e" - integrity sha512-y/nUEsWHyBzaKYp9zLtqJKrLod/zMNEWpMj488FuQY9QTmqBiyUhI2uh7PVaLqLewXRtdmG6JV0b6T5exyuYRw== +"@mui/core-downloads-tracker@^5.15.3": + version "5.15.3" + resolved "https://registry.yarnpkg.com/@mui/core-downloads-tracker/-/core-downloads-tracker-5.15.3.tgz#40fc854d7cf5505a182a4e121149dfe21cd277ef" + integrity sha512-sWeihiVyxdJjpLkp8SHkTy9kt2M/o11M60G1MzwljGL2BXdM3Ktzqv5QaQHdi00y7Y1ulvtI3GOSxP2xU8mQJw== "@mui/icons-material@^5.14.14": - version "5.15.1" - resolved "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.15.1.tgz#38f51a88d224a107e753313b4d9815247caa5398" - integrity sha512-VPJdBSyap6uOxCb5BLbWbkvd6aeJCp1pQZm8DcZBITCH0NOSv8Mz9c8Zvo8xr4Od7+xyWHUAgvRSL4047pL2WQ== + version "5.15.3" + resolved "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.15.3.tgz#eee07582ea3ad913982b7843ff1612d0fad21278" + integrity sha512-7LEs8AnO2Se/XYH+CcJndRsGAE+M8KAExiiQHf0V11poqmPVGcbbY82Ry2IUYf9+rOilCVnWI18ErghZ625BPQ== dependencies: - "@babel/runtime" "^7.23.5" + "@babel/runtime" "^7.23.6" "@mui/lab@^5.0.0-alpha.141": - version "5.0.0-alpha.157" - resolved "https://registry.yarnpkg.com/@mui/lab/-/lab-5.0.0-alpha.157.tgz#cb248823ffd881153eef86c2e3786c35601d1986" - integrity sha512-gY7UM2kNSxiVLfsm0o6HG2G5rM2Vr47prJhDCazY+VG/NOSRc8CG7la6dpL9WDTJhotEZdWwfj1FOUxTonmuQA== - dependencies: - "@babel/runtime" "^7.23.5" - "@mui/base" "5.0.0-beta.28" - "@mui/system" "^5.15.1" - "@mui/types" "^7.2.11" - "@mui/utils" "^5.15.1" + version "5.0.0-alpha.159" + resolved "https://registry.yarnpkg.com/@mui/lab/-/lab-5.0.0-alpha.159.tgz#d2b97b3e6b1b51d11d85f46096618490fe6d4e67" + integrity sha512-42Y8nf2/mDgYSLOw6PhOfHNV6P7tPcQkQEL0DTbY7a+gc+hXDsyVEzBMYST1MrV64EHTH68msfQm+k3CvLON/g== + dependencies: + "@babel/runtime" "^7.23.6" + "@mui/base" "5.0.0-beta.30" + "@mui/system" "^5.15.3" + "@mui/types" "^7.2.12" + "@mui/utils" "^5.15.3" clsx "^2.0.0" prop-types "^15.8.1" "@mui/material@^5.14.14": - version "5.15.1" - resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.15.1.tgz#5fc15c6eb9efe4b62b0c30b13bf5fa042bda71a1" - integrity sha512-WA5DVyvacxDakVyAhNqu/rRT28ppuuUFFw1bLpmRzrCJ4uw/zLTATcd4WB3YbB+7MdZNEGG/SJNWTDLEIyn3xQ== - dependencies: - "@babel/runtime" "^7.23.5" - "@mui/base" "5.0.0-beta.28" - "@mui/core-downloads-tracker" "^5.15.1" - "@mui/system" "^5.15.1" - "@mui/types" "^7.2.11" - "@mui/utils" "^5.15.1" + version "5.15.3" + resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.15.3.tgz#b77f1ac1275e5bf13b735e8224bdd301aab918c4" + integrity sha512-DODBBMouyq1B5f3YkEWL9vO8pGCxuEGqtfpltF6peMJzz/78tJFyLQsDas9MNLC/8AdFu2BQdkK7wox5UBPTAA== + dependencies: + "@babel/runtime" "^7.23.6" + "@mui/base" "5.0.0-beta.30" + "@mui/core-downloads-tracker" "^5.15.3" + "@mui/system" "^5.15.3" + "@mui/types" "^7.2.12" + "@mui/utils" "^5.15.3" "@types/react-transition-group" "^4.4.10" clsx "^2.0.0" csstype "^3.1.2" @@ -3579,58 +3588,58 @@ react-is "^18.2.0" react-transition-group "^4.4.5" -"@mui/private-theming@^5.15.1": - version "5.15.1" - resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.15.1.tgz#58fd8da48295e105067fa7361734ee0b166d9cca" - integrity sha512-wTbzuy5KjSvCPE9UVJktWHJ0b/tD5biavY9wvF+OpYDLPpdXK52vc1hTDxSbdkHIFMkJExzrwO9GvpVAHZBnFQ== +"@mui/private-theming@^5.15.3": + version "5.15.3" + resolved "https://registry.yarnpkg.com/@mui/private-theming/-/private-theming-5.15.3.tgz#2db0177d847dc6b28721d93308ed05d434a77c53" + integrity sha512-Q79MhVMmywC1l5bMsMZq5PsIudr1MNPJnx9/EqdMP0vpz5iNvFpnLmxsD7d8/hqTWgFAljI+LH3jX8MxlZH9Gw== dependencies: - "@babel/runtime" "^7.23.5" - "@mui/utils" "^5.15.1" + "@babel/runtime" "^7.23.6" + "@mui/utils" "^5.15.3" prop-types "^15.8.1" -"@mui/styled-engine@^5.15.1": - version "5.15.1" - resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.15.1.tgz#00f179e51afe252022bf356f72354968f9c5bf25" - integrity sha512-7WDZTJLqGexWDjqE9oAgjU8ak6hEtUw2yQU7SIYID5kLVO2Nj/Wi/KicbLsXnTsJNvSqePIlUIWTBSXwWJCPZw== +"@mui/styled-engine@^5.15.3": + version "5.15.3" + resolved "https://registry.yarnpkg.com/@mui/styled-engine/-/styled-engine-5.15.3.tgz#85cb294d701b1a3f197bfc90e87ec0685a0943b2" + integrity sha512-+d5XZCTeemOO/vBfWGEeHgTm8fjU1Psdgm+xAw+uegycO2EnoA/EfGSaG5UwZ6g3b66y48Mkxi35AggShMr88w== dependencies: - "@babel/runtime" "^7.23.5" + "@babel/runtime" "^7.23.6" "@emotion/cache" "^11.11.0" csstype "^3.1.2" prop-types "^15.8.1" -"@mui/system@^5.15.1": - version "5.15.1" - resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.15.1.tgz#e2a79b5e188ca89a3e58aa4d27e3484edf9e24b0" - integrity sha512-LAnP0ls69rqW9eBgI29phIx/lppv+WDGI7b3EJN7VZIqw0RezA0GD7NRpV12BgEYJABEii6z5Q9B5tg7dsX0Iw== +"@mui/system@^5.15.3": + version "5.15.3" + resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.15.3.tgz#062d0d6b5259c3dc0e1d4026b85ffcc3acf8637b" + integrity sha512-ewVU4eRgo4VfNMGpO61cKlfWmH7l9s6rA8EknRzuMX3DbSLfmtW2WJJg6qPwragvpPIir0Pp/AdWVSDhyNy5Tw== dependencies: - "@babel/runtime" "^7.23.5" - "@mui/private-theming" "^5.15.1" - "@mui/styled-engine" "^5.15.1" - "@mui/types" "^7.2.11" - "@mui/utils" "^5.15.1" + "@babel/runtime" "^7.23.6" + "@mui/private-theming" "^5.15.3" + "@mui/styled-engine" "^5.15.3" + "@mui/types" "^7.2.12" + "@mui/utils" "^5.15.3" clsx "^2.0.0" csstype "^3.1.2" prop-types "^15.8.1" -"@mui/types@^7.2.11": - version "7.2.11" - resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.11.tgz#36b99a88f8010dc716128e568dc05681a69dc7ae" - integrity sha512-KWe/QTEsFFlFSH+qRYf3zoFEj3z67s+qAuSnMMg+gFwbxG7P96Hm6g300inQL1Wy///gSRb8juX7Wafvp93m3w== +"@mui/types@^7.2.12": + version "7.2.12" + resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.12.tgz#602acbb5aa3eb56a31f569a19f87f75d33de5c01" + integrity sha512-3kaHiNm9khCAo0pVe0RenketDSFoZGAlVZ4zDjB/QNZV0XiCj+sh1zkX0VVhQPgYJDlBEzAag+MHJ1tU3vf0Zw== -"@mui/utils@^5.14.16", "@mui/utils@^5.15.1": - version "5.15.1" - resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.15.1.tgz#71d69dc8c0f13a1fd6aca20b53ec496636e6b854" - integrity sha512-V1/d0E3Bju5YdB59HJf2G0tnHrFEvWLN+f8hAXp9+JSNy/LC2zKyqUfPPahflR6qsI681P8G9r4mEZte/SrrYA== +"@mui/utils@^5.14.16", "@mui/utils@^5.15.3": + version "5.15.3" + resolved "https://registry.yarnpkg.com/@mui/utils/-/utils-5.15.3.tgz#421043be5279d31ca9b221a6398feb7c9d61209b" + integrity sha512-mT3LiSt9tZWCdx1pl7q4Q5tNo6gdZbvJel286ZHGuj6LQQXjWNAh8qiF9d+LogvNUI+D7eLkTnj605d1zoazfg== dependencies: - "@babel/runtime" "^7.23.5" + "@babel/runtime" "^7.23.6" "@types/prop-types" "^15.7.11" prop-types "^15.8.1" react-is "^18.2.0" "@mui/x-date-pickers@^6.18.6": - version "6.18.6" - resolved "https://registry.yarnpkg.com/@mui/x-date-pickers/-/x-date-pickers-6.18.6.tgz#416e0b83dd2774547e3c864c89bedf2f4ca3e05a" - integrity sha512-pqOrGPUDVY/1xXrM1hofqwgquno/SB9aG9CVS1m2Rs8hKF1VWRC+jYlEa1Qk08xKmvkia5g7NsdV/BBb+tHUZw== + version "6.18.7" + resolved "https://registry.yarnpkg.com/@mui/x-date-pickers/-/x-date-pickers-6.18.7.tgz#6b00163c77dc450c11b44a479baf62541e6f8b36" + integrity sha512-4NoapaCT3jvEk2cuAUjG0ReZvTEk1i4dGDz94Gt1Oc08GuC1AuzYRwCR1/1tdmbDynwkR8ilkKL6AyS3NL1H4A== dependencies: "@babel/runtime" "^7.23.2" "@mui/base" "^5.0.0-beta.22" @@ -3850,7 +3859,7 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== -"@noble/hashes@1.3.3", "@noble/hashes@^1.3.1", "@noble/hashes@~1.3.0", "@noble/hashes@~1.3.1", "@noble/hashes@~1.3.2": +"@noble/hashes@1.3.3", "@noble/hashes@^1.3.2", "@noble/hashes@~1.3.0", "@noble/hashes@~1.3.1", "@noble/hashes@~1.3.2": version "1.3.3" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== @@ -4015,18 +4024,17 @@ mcl-wasm "^0.7.1" rustbn.js "~0.2.0" -"@nomicfoundation/hardhat-chai-matchers@^1.0.0", "@nomicfoundation/hardhat-chai-matchers@^1.0.5": - version "1.0.6" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-1.0.6.tgz#72a2e312e1504ee5dd73fe302932736432ba96bc" - integrity sha512-f5ZMNmabZeZegEfuxn/0kW+mm7+yV7VNDxLpMOMGXWFJ2l/Ct3QShujzDRF9cOkK9Ui/hbDeOWGZqyQALDXVCQ== +"@nomicfoundation/hardhat-chai-matchers@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-chai-matchers/-/hardhat-chai-matchers-2.0.3.tgz#f4c074d39b74bd283c99e2c2bf143e3cef51ae18" + integrity sha512-A40s7EAK4Acr8UP1Yudgi9GGD9Cca/K3LHt3DzmRIje14lBfHtg9atGQ7qK56vdPcTwKmeaGn30FzxMUfPGEMw== dependencies: - "@ethersproject/abi" "^5.1.2" "@types/chai-as-promised" "^7.1.3" chai-as-promised "^7.1.1" deep-eql "^4.0.1" ordinal "^1.0.3" -"@nomicfoundation/hardhat-ethers@^3.0.4": +"@nomicfoundation/hardhat-ethers@^3.0.4", "@nomicfoundation/hardhat-ethers@^3.0.5": version "3.0.5" resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-ethers/-/hardhat-ethers-3.0.5.tgz#0422c2123dec7c42e7fb2be8e1691f1d9708db56" integrity sha512-RNFe8OtbZK6Ila9kIlHp0+S80/0Bu/3p41HUpaRIoHLm6X3WekTd83vob3rE54Duufu1edCiBDxspBzi2rxHHw== @@ -4034,17 +4042,32 @@ debug "^4.1.1" lodash.isequal "^4.5.0" -"@nomicfoundation/hardhat-network-helpers@^1.0.0", "@nomicfoundation/hardhat-network-helpers@^1.0.7": +"@nomicfoundation/hardhat-network-helpers@^1.0.10": version "1.0.10" resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-network-helpers/-/hardhat-network-helpers-1.0.10.tgz#c61042ceb104fdd6c10017859fdef6529c1d6585" integrity sha512-R35/BMBlx7tWN5V6d/8/19QCwEmIdbnA4ZrsuXgvs8i2qFx5i7h6mH5pBS4Pwi4WigLH+upl6faYusrNPuzMrQ== dependencies: ethereumjs-util "^7.1.4" -"@nomicfoundation/hardhat-toolbox@^2.0.1", "@nomicfoundation/hardhat-toolbox@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.2.tgz#ec95f23b53cb4e71a1a7091380fa223aad18f156" - integrity sha512-vnN1AzxbvpSx9pfdRHbUzTRIXpMLPXnUlkW855VaDk6N1pwRaQ2gNzEmFAABk4lWf11E00PKwFd/q27HuwYrYg== +"@nomicfoundation/hardhat-toolbox@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-4.0.0.tgz#eb1f619218dd1414fa161dfec92d3e5e53a2f407" + integrity sha512-jhcWHp0aHaL0aDYj8IJl80v4SZXWMS1A2XxXa1CA6pBiFfJKuZinCkO6wb+POAt0LIfXB3gA3AgdcOccrcwBwA== + +"@nomicfoundation/hardhat-verify@^2.0.3": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nomicfoundation/hardhat-verify/-/hardhat-verify-2.0.3.tgz#173557f8cfa53c8c9da23a326f54d24fe459ae68" + integrity sha512-ESbRu9by53wu6VvgwtMtm108RSmuNsVqXtzg061D+/4R7jaWh/Wl/8ve+p6SdDX7vA1Z3L02hDO1Q3BY4luLXQ== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@ethersproject/address" "^5.0.2" + cbor "^8.1.0" + chalk "^2.4.2" + debug "^4.1.1" + lodash.clonedeep "^4.5.0" + semver "^6.3.0" + table "^6.8.0" + undici "^5.14.0" "@nomicfoundation/solidity-analyzer-darwin-arm64@0.1.1": version "0.1.1" @@ -4112,27 +4135,6 @@ "@nomicfoundation/solidity-analyzer-win32-ia32-msvc" "0.1.1" "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.1" -"@nomiclabs/hardhat-ethers@^2.0.0", "@nomiclabs/hardhat-ethers@^2.2.2": - version "2.2.3" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0" - integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg== - -"@nomiclabs/hardhat-etherscan@^3.0.0", "@nomiclabs/hardhat-etherscan@^3.1.2": - version "3.1.8" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.8.tgz#3c12ee90b3733e0775e05111146ef9418d4f5a38" - integrity sha512-v5F6IzQhrsjHh6kQz4uNrym49brK9K5bYCq2zQZ729RYRaifI9hHbtmK+KkIVevfhut7huQFEQ77JLRMAzWYjQ== - dependencies: - "@ethersproject/abi" "^5.1.2" - "@ethersproject/address" "^5.0.2" - cbor "^8.1.0" - chalk "^2.4.2" - debug "^4.1.1" - fs-extra "^7.0.1" - lodash "^4.17.11" - semver "^6.3.0" - table "^6.8.0" - undici "^5.14.0" - "@nuxtjs/opencollective@0.3.2": version "0.3.2" resolved "https://registry.yarnpkg.com/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz#620ce1044f7ac77185e825e1936115bb38e2681c" @@ -4239,7 +4241,18 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.5.tgz#1eed23d4844c861a1835b5d33507c1017fa98de8" integrity sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg== -"@openzeppelin/defender-base-client@^1.46.0": +"@openzeppelin/defender-admin-client@^1.52.0": + version "1.54.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-admin-client/-/defender-admin-client-1.54.1.tgz#b877972992b95a0dc3787f2ade2f044586621357" + integrity sha512-kRpSUdTsnSqntp4FOXIm95t+6VKHc8CUY2Si71VDuxs0q7HSPZkdpRPSntcolwEzWy9L4a8NS/QMwDF5NJ4X1g== + dependencies: + "@openzeppelin/defender-base-client" "1.54.1" + axios "^1.4.0" + ethers "^5.7.2" + lodash "^4.17.19" + node-fetch "^2.6.0" + +"@openzeppelin/defender-base-client@1.54.1", "@openzeppelin/defender-base-client@^1.52.0": version "1.54.1" resolved "https://registry.yarnpkg.com/@openzeppelin/defender-base-client/-/defender-base-client-1.54.1.tgz#ed777ae56908d5a920e1f72ac735c63694e65b30" integrity sha512-DRGz/7KN3ZQwu28YWMOaojrC7jjPkz/uCwkC8/C8B11qwZhA5qIVvyhYHhhFOCl0J84+E3TNdvkPD2q3p2WaJw== @@ -4250,33 +4263,44 @@ lodash "^4.17.19" node-fetch "^2.6.0" -"@openzeppelin/hardhat-upgrades@^1.22.0": - version "1.28.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.28.0.tgz#6361f313a8a879d8a08a5e395acf0933bc190950" - integrity sha512-7sb/Jf+X+uIufOBnmHR0FJVWuxEs2lpxjJnLNN6eCJCP8nD0v+Ot5lTOW2Qb/GFnh+fLvJtEkhkowz4ZQ57+zQ== +"@openzeppelin/defender-sdk-base-client@^1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-sdk-base-client/-/defender-sdk-base-client-1.8.0.tgz#2209a060ce61b4dfc44c7ac0c2b1d86e18b69f7d" + integrity sha512-XIJat6BW2CTM74AwG5IL0Q/aE6RXj8x7smnVKmBql4wMvmirVW+njfwzZCLhUTiBXg9AlHxIInEF14SabfIisg== dependencies: - "@openzeppelin/defender-base-client" "^1.46.0" - "@openzeppelin/platform-deploy-client" "^0.8.0" - "@openzeppelin/upgrades-core" "^1.27.0" + amazon-cognito-identity-js "^6.3.6" + async-retry "^1.3.3" + +"@openzeppelin/defender-sdk-deploy-client@^1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/defender-sdk-deploy-client/-/defender-sdk-deploy-client-1.8.0.tgz#1e186d2b3ff176c6a4c03e8207bad8022528975f" + integrity sha512-/tNS2EnHuA5l095wzMbIkGMDNHZLcZQ2eLUP8z+AeKaAUeR2z4qzZ1ul21kR3EJURAyoy8aULFZanLggoBWHrA== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@openzeppelin/defender-sdk-base-client" "^1.8.0" + axios "^1.4.0" + lodash "^4.17.21" + +"@openzeppelin/hardhat-upgrades@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-3.0.1.tgz#f1a9c5e817ddb9163da0e79cf50a13dfe7e14856" + integrity sha512-NtD2/n2PKNqHBafQy3AM6KCvsDZD0w97po7fFa4wctl0fg/8QwGAg3fB8InkBFEhGn17+IgshRI8G94hUrFPcQ== + dependencies: + "@openzeppelin/defender-admin-client" "^1.52.0" + "@openzeppelin/defender-base-client" "^1.52.0" + "@openzeppelin/defender-sdk-base-client" "^1.8.0" + "@openzeppelin/defender-sdk-deploy-client" "^1.8.0" + "@openzeppelin/upgrades-core" "^1.32.0" chalk "^4.1.0" debug "^4.1.1" + ethereumjs-util "^7.1.5" proper-lockfile "^4.1.1" + undici "^5.28.2" -"@openzeppelin/platform-deploy-client@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/platform-deploy-client/-/platform-deploy-client-0.8.0.tgz#af6596275a19c283d6145f0128cc1247d18223c1" - integrity sha512-POx3AsnKwKSV/ZLOU/gheksj0Lq7Is1q2F3pKmcFjGZiibf+4kjGxr4eSMrT+2qgKYZQH1ZLQZ+SkbguD8fTvA== - dependencies: - "@ethersproject/abi" "^5.6.3" - "@openzeppelin/defender-base-client" "^1.46.0" - axios "^0.21.2" - lodash "^4.17.19" - node-fetch "^2.6.0" - -"@openzeppelin/upgrades-core@^1.27.0": - version "1.32.1" - resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.32.1.tgz#77d5590df6c3a4c8c9b6c47355a6f246ec47e1f5" - integrity sha512-LlaWp2UX5BYT6BXs6OxJc1eSGMR0pz7DOltj6WCAJ038NdqdEIoItP5p9VOrw7ZdUdvUYHKHY4IinLY+ITxaig== +"@openzeppelin/upgrades-core@^1.32.0": + version "1.32.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.32.2.tgz#4313bd0a547090a350817cf798af60e0eb0728e8" + integrity sha512-EkXriOHZfn6u00Tbq0zUuhHDeTQB9WyAZKZo3UeYdqULb7E3vqxZgxgXmWJwEzAb6E77DvprzQ4gwCAjMV/S4Q== dependencies: cbor "^9.0.0" chalk "^4.1.0" @@ -4406,7 +4430,17 @@ tslib "^2.5.0" webcrypto-core "^1.7.7" -"@pkgr/utils@^2.3.1", "@pkgr/utils@^2.4.2": +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== + +"@pkgr/core@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.0.tgz#7d8dacb7fdef0e4387caf7396cbd77f179867d06" + integrity sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ== + +"@pkgr/utils@^2.3.1": version "2.4.2" resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.4.2.tgz#9e638bbe9a6a6f165580dc943f138fd3309a2cbc" integrity sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw== @@ -4454,7 +4488,7 @@ "@pnpm/network.ca-file" "^1.0.1" config-chain "^1.1.11" -"@polka/url@^1.0.0-next.20": +"@polka/url@^1.0.0-next.24": version "1.0.0-next.24" resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.24.tgz#58601079e11784d20f82d0585865bb42305c4df3" integrity sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ== @@ -4852,10 +4886,10 @@ redux-thunk "^2.4.2" reselect "^4.1.8" -"@remix-run/router@1.14.0": - version "1.14.0" - resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.14.0.tgz#9bc39a5a3a71b81bdb310eba6def5bc3966695b7" - integrity sha512-WOHih+ClN7N8oHk9N4JUiMxQJmRVaOxcg8w7F/oHUXzJt920ekASLI/7cYX8XkntDWRhLZtsk6LbGrkgOAvi5A== +"@remix-run/router@1.14.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.14.1.tgz#6d2dd03d52e604279c38911afc1079d58c50a755" + integrity sha512-Qg4DMQsfPNAs88rb2xkdk03N3bjK4jgX5fR24eHCTR9q6PrhZQZ4UJBPzCHJkIpTRN1UKxx2DzjZmnC+7Lj0Ow== "@repeaterjs/repeater@3.0.4": version "3.0.4" @@ -4938,70 +4972,70 @@ estree-walker "^2.0.2" picomatch "^2.3.1" -"@rollup/rollup-android-arm-eabi@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.1.tgz#beaf518ee45a196448e294ad3f823d2d4576cf35" - integrity sha512-6vMdBZqtq1dVQ4CWdhFwhKZL6E4L1dV6jUjuBvsavvNJSppzi6dLBbuV+3+IyUREaj9ZFvQefnQm28v4OCXlig== - -"@rollup/rollup-android-arm64@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.1.tgz#6f76cfa759c2d0fdb92122ffe28217181a1664eb" - integrity sha512-Jto9Fl3YQ9OLsTDWtLFPtaIMSL2kwGyGoVCmPC8Gxvym9TCZm4Sie+cVeblPO66YZsYH8MhBKDMGZ2NDxuk/XQ== - -"@rollup/rollup-darwin-arm64@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.1.tgz#9aaefe33a5481d66322d1c62f368171c03eabe2b" - integrity sha512-LtYcLNM+bhsaKAIGwVkh5IOWhaZhjTfNOkGzGqdHvhiCUVuJDalvDxEdSnhFzAn+g23wgsycmZk1vbnaibZwwA== - -"@rollup/rollup-darwin-x64@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.1.tgz#707dcaadcdc6bd3fd6c69f55d9456cd4446306a3" - integrity sha512-KyP/byeXu9V+etKO6Lw3E4tW4QdcnzDG/ake031mg42lob5tN+5qfr+lkcT/SGZaH2PdW4Z1NX9GHEkZ8xV7og== - -"@rollup/rollup-linux-arm-gnueabihf@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.1.tgz#7a4dbbd1dd98731d88a55aefcef0ec4c578fa9c7" - integrity sha512-Yqz/Doumf3QTKplwGNrCHe/B2p9xqDghBZSlAY0/hU6ikuDVQuOUIpDP/YcmoT+447tsZTmirmjgG3znvSCR0Q== - -"@rollup/rollup-linux-arm64-gnu@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.1.tgz#967ba8e6f68a5f21bd00cd97773dcdd6107e94ed" - integrity sha512-u3XkZVvxcvlAOlQJ3UsD1rFvLWqu4Ef/Ggl40WAVCuogf4S1nJPHh5RTgqYFpCOvuGJ7H5yGHabjFKEZGExk5Q== - -"@rollup/rollup-linux-arm64-musl@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.1.tgz#d3a4e1c9f21eef3b9f4e4989f334a519a1341462" - integrity sha512-0XSYN/rfWShW+i+qjZ0phc6vZ7UWI8XWNz4E/l+6edFt+FxoEghrJHjX1EY/kcUGCnZzYYRCl31SNdfOi450Aw== - -"@rollup/rollup-linux-riscv64-gnu@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.1.tgz#415c0533bb752164effd05f5613858e8f6779bc9" - integrity sha512-LmYIO65oZVfFt9t6cpYkbC4d5lKHLYv5B4CSHRpnANq0VZUQXGcCPXHzbCXCz4RQnx7jvlYB1ISVNCE/omz5cw== - -"@rollup/rollup-linux-x64-gnu@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.1.tgz#0983385dd753a2e0ecaddea7a81dd37fea5114f5" - integrity sha512-kr8rEPQ6ns/Lmr/hiw8sEVj9aa07gh1/tQF2Y5HrNCCEPiCBGnBUt9tVusrcBBiJfIt1yNaXN6r1CCmpbFEDpg== - -"@rollup/rollup-linux-x64-musl@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.1.tgz#eb7494ebc5199cbd2e5c38c2b8acbe2603f35e03" - integrity sha512-t4QSR7gN+OEZLG0MiCgPqMWZGwmeHhsM4AkegJ0Kiy6TnJ9vZ8dEIwHw1LcZKhbHxTY32hp9eVCMdR3/I8MGRw== - -"@rollup/rollup-win32-arm64-msvc@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.1.tgz#5bebc66e3a7f82d4b9aa9ff448e7fc13a69656e9" - integrity sha512-7XI4ZCBN34cb+BH557FJPmh0kmNz2c25SCQeT9OiFWEgf8+dL6ZwJ8f9RnUIit+j01u07Yvrsuu1rZGxJCc51g== - -"@rollup/rollup-win32-ia32-msvc@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.1.tgz#34156ebf8b4de3b20e6497260fe519a30263f8cf" - integrity sha512-yE5c2j1lSWOH5jp+Q0qNL3Mdhr8WuqCNVjc6BxbVfS5cAS6zRmdiw7ktb8GNpDCEUJphILY6KACoFoRtKoqNQg== - -"@rollup/rollup-win32-x64-msvc@4.9.1": - version "4.9.1" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.1.tgz#d146db7a5949e10837b323ce933ed882ac878262" - integrity sha512-PyJsSsafjmIhVgaI1Zdj7m8BB8mMckFah/xbpplObyHfiXzKcI5UOUXRyOdHW7nz4DpMCuzLnF7v5IWHenCwYA== +"@rollup/rollup-android-arm-eabi@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.4.tgz#b1094962742c1a0349587040bc06185e2a667c9b" + integrity sha512-ub/SN3yWqIv5CWiAZPHVS1DloyZsJbtXmX4HxUTIpS0BHm9pW5iYBo2mIZi+hE3AeiTzHz33blwSnhdUo+9NpA== + +"@rollup/rollup-android-arm64@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.4.tgz#96eb86fb549e05b187f2ad06f51d191a23cb385a" + integrity sha512-ehcBrOR5XTl0W0t2WxfTyHCR/3Cq2jfb+I4W+Ch8Y9b5G+vbAecVv0Fx/J1QKktOrgUYsIKxWAKgIpvw56IFNA== + +"@rollup/rollup-darwin-arm64@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.4.tgz#2456630c007cc5905cb368acb9ff9fc04b2d37be" + integrity sha512-1fzh1lWExwSTWy8vJPnNbNM02WZDS8AW3McEOb7wW+nPChLKf3WG2aG7fhaUmfX5FKw9zhsF5+MBwArGyNM7NA== + +"@rollup/rollup-darwin-x64@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.4.tgz#97742214fc7dfd47a0f74efba6f5ae264e29c70c" + integrity sha512-Gc6cukkF38RcYQ6uPdiXi70JB0f29CwcQ7+r4QpfNpQFVHXRd0DfWFidoGxjSx1DwOETM97JPz1RXL5ISSB0pA== + +"@rollup/rollup-linux-arm-gnueabihf@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.4.tgz#cd933e61d6f689c9cdefde424beafbd92cfe58e2" + integrity sha512-g21RTeFzoTl8GxosHbnQZ0/JkuFIB13C3T7Y0HtKzOXmoHhewLbVTFBQZu+z5m9STH6FZ7L/oPgU4Nm5ErN2fw== + +"@rollup/rollup-linux-arm64-gnu@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.4.tgz#33b09bf462f1837afc1e02a1b352af6b510c78a6" + integrity sha512-TVYVWD/SYwWzGGnbfTkrNpdE4HON46orgMNHCivlXmlsSGQOx/OHHYiQcMIOx38/GWgwr/po2LBn7wypkWw/Mg== + +"@rollup/rollup-linux-arm64-musl@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.4.tgz#50257fb248832c2308064e3764a16273b6ee4615" + integrity sha512-XcKvuendwizYYhFxpvQ3xVpzje2HHImzg33wL9zvxtj77HvPStbSGI9czrdbfrf8DGMcNNReH9pVZv8qejAQ5A== + +"@rollup/rollup-linux-riscv64-gnu@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.4.tgz#09589e4e1a073cf56f6249b77eb6c9a8e9b613a8" + integrity sha512-LFHS/8Q+I9YA0yVETyjonMJ3UA+DczeBd/MqNEzsGSTdNvSJa1OJZcSH8GiXLvcizgp9AlHs2walqRcqzjOi3A== + +"@rollup/rollup-linux-x64-gnu@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.4.tgz#bd312bb5b5f02e54d15488605d15cfd3f90dda7c" + integrity sha512-dIYgo+j1+yfy81i0YVU5KnQrIJZE8ERomx17ReU4GREjGtDW4X+nvkBak2xAUpyqLs4eleDSj3RrV72fQos7zw== + +"@rollup/rollup-linux-x64-musl@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.4.tgz#25b3bede85d86438ce28cc642842d10d867d40e9" + integrity sha512-RoaYxjdHQ5TPjaPrLsfKqR3pakMr3JGqZ+jZM0zP2IkDtsGa4CqYaWSfQmZVgFUCgLrTnzX+cnHS3nfl+kB6ZQ== + +"@rollup/rollup-win32-arm64-msvc@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.4.tgz#95957067eb107f571da1d81939f017d37b4958d3" + integrity sha512-T8Q3XHV+Jjf5e49B4EAaLKV74BbX7/qYBRQ8Wop/+TyyU0k+vSjiLVSHNWdVd1goMjZcbhDmYZUYW5RFqkBNHQ== + +"@rollup/rollup-win32-ia32-msvc@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.4.tgz#71b6facad976db527863f698692c6964c0b6e10e" + integrity sha512-z+JQ7JirDUHAsMecVydnBPWLwJjbppU+7LZjffGf+Jvrxq+dVjIE7By163Sc9DKc3ADSU50qPVw0KonBS+a+HQ== + +"@rollup/rollup-win32-x64-msvc@4.9.4": + version "4.9.4" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.4.tgz#16295ccae354707c9bc6842906bdeaad4f3ba7a5" + integrity sha512-LfdGXCV9rdEify1oxlN9eamvDSjv9md9ZVMAbNHA87xqIfFCxImxan9qZ8+Un54iK2nnqPlbnSi4R54ONtbWBw== "@rushstack/eslint-patch@^1.1.0": version "1.6.1" @@ -5383,14 +5417,14 @@ bn.js "^5.2.1" web3-utils "^1.8.1" -"@smithy/types@^2.7.0": - version "2.7.0" - resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.7.0.tgz#6ed9ba5bff7c4d28c980cff967e6d8456840a4f3" - integrity sha512-1OIFyhK+vOkMbu4aN2HZz/MomREkrAC/HqY5mlJMUJfGrPRwijJDTeiN8Rnj9zUaB8ogXAfIOtZrrgqZ4w7Wnw== +"@smithy/types@^2.8.0": + version "2.8.0" + resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.8.0.tgz#bdbaa0a54c9c3538d6c763c6f32d3e4f76fe0df9" + integrity sha512-h9sz24cFgt/W1Re22OlhQKmUZkNh244ApgRsUDYinqF8R+QgcsBIX344u2j61TPshsTz3CvL6HYU1DnQdsSrHA== dependencies: tslib "^2.5.0" -"@solana/buffer-layout@^4.0.0": +"@solana/buffer-layout@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15" integrity sha512-E1ImOIAD1tBZFRdjeM4/pzTiTApC0AOBGwyAMS4fwIodCWArzJ3DWdoh8cKxeFM2fElkxBh2Aqts1BPC373rHA== @@ -5398,15 +5432,15 @@ buffer "~6.0.3" "@solana/web3.js@^1.70.1": - version "1.87.6" - resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.87.6.tgz#6744cfc5f4fc81e0f58241c0a92648a7320bb3bf" - integrity sha512-LkqsEBgTZztFiccZZXnawWa8qNCATEqE97/d0vIwjTclmVlc8pBpD1DmjfVHtZ1HS5fZorFlVhXfpwnCNDZfyg== + version "1.88.0" + resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.88.0.tgz#24e1482f63ac54914430b4ce5ab36eaf433ecdb8" + integrity sha512-E4BdfB0HZpb66OPFhIzPApNE2tG75Mc6XKIoeymUkx/IV+USSYuxDX29sjgE/KGNYxggrOf4YuYnRMI6UiPL8w== dependencies: - "@babel/runtime" "^7.23.2" + "@babel/runtime" "^7.23.4" "@noble/curves" "^1.2.0" - "@noble/hashes" "^1.3.1" - "@solana/buffer-layout" "^4.0.0" - agentkeepalive "^4.3.0" + "@noble/hashes" "^1.3.2" + "@solana/buffer-layout" "^4.0.1" + agentkeepalive "^4.5.0" bigint-buffer "^1.1.5" bn.js "^5.2.1" borsh "^0.7.0" @@ -5414,7 +5448,7 @@ buffer "6.0.3" fast-stable-stringify "^1.0.0" jayson "^4.1.0" - node-fetch "^2.6.12" + node-fetch "^2.7.0" rpc-websockets "^7.5.1" superstruct "^0.14.2" @@ -5425,13 +5459,18 @@ dependencies: antlr4ts "^0.5.0-alpha.4" -"@solidity-parser/parser@^0.16.0", "@solidity-parser/parser@^0.16.2": +"@solidity-parser/parser@^0.16.0": version "0.16.2" resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.16.2.tgz#42cb1e3d88b3e8029b0c9befff00b634cd92d2fa" integrity sha512-PI9NfoA3P8XK2VBkK5oIfRgKDsicwDZfkVq9ZTBCQYGOP1N2owgY2dyLGyU5/J/hQs8KRk55kdmvTLjy3Mu3vg== dependencies: antlr4ts "^0.5.0-alpha.4" +"@solidity-parser/parser@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.17.0.tgz#52a2fcc97ff609f72011014e4c5b485ec52243ef" + integrity sha512-Nko8R0/kUo391jsEHHxrGM07QFdnPGvlmox4rmH0kNiNAashItAilhy4Mv4pK5gQmW5f4sXAF58fwJbmlkGcVw== + "@sqltools/formatter@^1.2.5": version "1.2.5" resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.5.tgz#3abc203c79b8c3e90fd6c156a0c62d5403520e12" @@ -6108,37 +6147,10 @@ prettier "2.8.4" typescript "5.2.2" -"@strapi/ui-primitives@^1.13.0": - version "1.13.2" - resolved "https://registry.yarnpkg.com/@strapi/ui-primitives/-/ui-primitives-1.13.2.tgz#8e510bc56944d8bf93581fdc7934f77a76d17e3a" - integrity sha512-Koaun6riXoTOvvlKNgFy44BVUfLfchgpabRhrNH/KfmBQQlhLCqJDQu023FcFQDQQ4XFO3DpvzDk8pCbmva7oQ== - dependencies: - "@radix-ui/number" "^1.0.1" - "@radix-ui/primitive" "^1.0.1" - "@radix-ui/react-collection" "1.0.3" - "@radix-ui/react-compose-refs" "^1.0.1" - "@radix-ui/react-context" "^1.0.1" - "@radix-ui/react-direction" "1.0.1" - "@radix-ui/react-dismissable-layer" "^1.0.5" - "@radix-ui/react-focus-guards" "1.0.1" - "@radix-ui/react-focus-scope" "1.0.4" - "@radix-ui/react-id" "^1.0.1" - "@radix-ui/react-popper" "^1.1.3" - "@radix-ui/react-portal" "^1.0.4" - "@radix-ui/react-primitive" "^1.0.3" - "@radix-ui/react-slot" "^1.0.2" - "@radix-ui/react-use-callback-ref" "^1.0.1" - "@radix-ui/react-use-controllable-state" "^1.0.1" - "@radix-ui/react-use-layout-effect" "1.0.1" - "@radix-ui/react-use-previous" "^1.0.1" - "@radix-ui/react-visually-hidden" "^1.0.3" - aria-hidden "^1.2.3" - react-remove-scroll "^2.5.7" - -"@strapi/ui-primitives@^1.13.1": - version "1.14.0" - resolved "https://registry.yarnpkg.com/@strapi/ui-primitives/-/ui-primitives-1.14.0.tgz#98ff668701b4100bee8bc0212b392158c88744f7" - integrity sha512-M5RhM7/qVuu4gPvHWiSTOdI7bVDWK68aB+XyB/g1hGPqXL2Umsz8Iwn9bJPQk6YwCaHdrobaoB7lEDlfrlUAVA== +"@strapi/ui-primitives@^1.13.0", "@strapi/ui-primitives@^1.13.1": + version "1.14.1" + resolved "https://registry.yarnpkg.com/@strapi/ui-primitives/-/ui-primitives-1.14.1.tgz#f4100f68874754088322bdb6da98a206fa9fbc2d" + integrity sha512-AmwyfZuazN7J1AgVf7i7oly+zwcJdWFqh/UCd3uPtoonnPmdCIRjkK8aBWlU9M+k3277FGIaCHOwNHiMSiBbbA== dependencies: "@radix-ui/number" "^1.0.1" "@radix-ui/primitive" "^1.0.1" @@ -6194,9 +6206,9 @@ prop-types "^15.7.2" "@stripe/stripe-js@^2.2.1": - version "2.2.2" - resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-2.2.2.tgz#9c1318a3e09a6df0a667d54d7f6edb917670109d" - integrity sha512-LvFZRZEBoMe6vXC6RoOAIbXWo/0JDdndq43ekL9M6affcM7PtF5KALmwt91BazW7q49sbSl0l7TunWhhSwEW4w== + version "2.3.0" + resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-2.3.0.tgz#607f91b75990eb660b9a7a4a8a7c282f5babd3fc" + integrity sha512-iTwzjw1ORUR+1pH21+C/M05w+Jh5hAuE4QUei7Gnku65N7QpEaHtyVszYMYDBs6iNyLrD1tfQTSrjD6NkOA/ww== "@swc/helpers@^0.5.0": version "0.5.3" @@ -6254,9 +6266,9 @@ use-sync-external-store "^1.2.0" "@tenderly/hardhat-tenderly@^2.0.1": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@tenderly/hardhat-tenderly/-/hardhat-tenderly-2.0.1.tgz#a5e8a9aaeacd973ee006ed3b857f7808e71d4247" - integrity sha512-MaVq7UuWvsyqstya5wVwDc5ml5xo1pAS9PRQQZWhg/f6ats3KFboi9BP18Yhypjh4bPw2NPZOBip9u1lV0oaGw== + version "2.1.0" + resolved "https://registry.yarnpkg.com/@tenderly/hardhat-tenderly/-/hardhat-tenderly-2.1.0.tgz#20036426da8f11a5d8860703ef64cdb9086cc98d" + integrity sha512-wy6WnvrT4fxqTsln5DH3MgT+lvUV7AyqHVtSyGJgQh6NX0Q59ZXKoqedB8Hi3IkYMOhbjbPFlR0Z/zr8sYGEzQ== dependencies: "@ethersproject/bignumber" "^5.7.0" "@nomicfoundation/hardhat-ethers" "^3.0.4" @@ -6264,15 +6276,15 @@ ethers "^6.8.1" fs-extra "^10.1.0" hardhat-deploy "^0.11.43" - tenderly "^0.7.0" + tenderly "^0.8.0" ts-node "^10.9.1" tslog "^4.3.1" typescript "^5.2.2" "@testing-library/dom@^9.0.0": - version "9.3.3" - resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-9.3.3.tgz#108c23a5b0ef51121c26ae92eb3179416b0434f5" - integrity sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw== + version "9.3.4" + resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-9.3.4.tgz#50696ec28376926fec0a1bf87d9dbac5e27f60ce" + integrity sha512-FlS4ZWlp97iiNWig0Muq8p+3rVDjRiYE+YKGbAqXOu9nwJFFOdL00kFpz42M+4huzYi86vAK1sOOfyOG45muIQ== dependencies: "@babel/code-frame" "^7.10.4" "@babel/runtime" "^7.12.5" @@ -6284,16 +6296,16 @@ pretty-format "^27.0.2" "@testing-library/jest-dom@^6.1.3": - version "6.1.5" - resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.1.5.tgz#0a635d0ad4a1a880089d967299d94e9cfc81fbe1" - integrity sha512-3y04JLW+EceVPy2Em3VwNr95dOKqA8DhR0RJHhHKDZNYXcVXnEK7WIrpj4eYU8SVt/qYZ2aRWt/WgQ+grNES8g== + version "6.2.0" + resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.2.0.tgz#b572bd5cd6b29314487bac7ba393188e4987b4f7" + integrity sha512-+BVQlJ9cmEn5RDMUS8c2+TU6giLvzaHZ8sU/x0Jj7fk+6/46wPdwlgOPcpxS17CjcanBi/3VmGMqVr2rmbUmNw== dependencies: - "@adobe/css-tools" "^4.3.1" + "@adobe/css-tools" "^4.3.2" "@babel/runtime" "^7.9.2" aria-query "^5.0.0" chalk "^3.0.0" css.escape "^1.5.1" - dom-accessibility-api "^0.5.6" + dom-accessibility-api "^0.6.3" lodash "^4.17.15" redent "^3.0.0" @@ -6336,18 +6348,18 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== -"@typechain/ethers-v5@^10.1.0", "@typechain/ethers-v5@^10.1.1": - version "10.2.1" - resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-10.2.1.tgz#50241e6957683281ecfa03fb5a6724d8a3ce2391" - integrity sha512-n3tQmCZjRE6IU4h6lqUGiQ1j866n5MTCBJreNEHHVWXa2u9GJTaeYyU1/k+1qLutkyw+sS6VAN+AbeiTqsxd/A== +"@typechain/ethers-v6@^0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v6/-/ethers-v6-0.5.1.tgz#42fe214a19a8b687086c93189b301e2b878797ea" + integrity sha512-F+GklO8jBWlsaVV+9oHaPh5NJdd6rAKN4tklGfInX1Q7h0xPgVLP39Jl3eCulPB5qexI71ZFHwbljx4ZXNfouA== dependencies: lodash "^4.17.15" ts-essentials "^7.0.1" -"@typechain/hardhat@^6.1.2", "@typechain/hardhat@^6.1.4": - version "6.1.6" - resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-6.1.6.tgz#1a749eb35e5054c80df531cf440819cb347c62ea" - integrity sha512-BiVnegSs+ZHVymyidtK472syodx1sXYlYJJixZfRstHVGYTi8V1O7QG4nsjyb0PC/LORcq7sfBUcHto1y6UgJA== +"@typechain/hardhat@^9.1.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@typechain/hardhat/-/hardhat-9.1.0.tgz#6985015f01dfb37ef2ca8a29c742d05890351ddc" + integrity sha512-mtaUlzLlkqTlfPwB3FORdejqBskSnh+Jl8AIJGjXNAQfRQ4ofHADPl1+oU7Z3pAJzmZbUXII8MhOLQltcHgKnA== dependencies: fs-extra "^9.1.0" @@ -6388,9 +6400,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.20.4" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.4.tgz#ec2c06fed6549df8bc0eb4615b683749a4a92e1b" - integrity sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA== + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.5.tgz#7b7502be0aa80cc4ef22978846b983edaafcd4dd" + integrity sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ== dependencies: "@babel/types" "^7.20.7" @@ -6447,7 +6459,7 @@ dependencies: "@types/chai" "*" -"@types/chai@*", "@types/chai@^4.2.0", "@types/chai@^4.3.3", "@types/chai@^4.3.4": +"@types/chai@*", "@types/chai@^4.3.3", "@types/chai@^4.3.4": version "4.3.11" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.11.tgz#e95050bf79a932cb7305dd130254ccdf9bde671c" integrity sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ== @@ -6488,7 +6500,7 @@ dependencies: "@types/express" "*" -"@types/cookiejar@*": +"@types/cookiejar@^2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.5.tgz#14a3e83fa641beb169a2dd8422d91c3c345a9a78" integrity sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q== @@ -6572,14 +6584,14 @@ "@types/estree" "*" "@types/eslint@*": - version "8.44.9" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.44.9.tgz#5799663009645637bd1c45b2e1a7c8f4caf89534" - integrity sha512-6yBxcvwnnYoYT1Uk2d+jvIfsuP4mb2EdIxFnrPABj5a/838qe5bGkNLFOiipX4ULQ7XVQvTxOh7jO+BTAiqsEw== + version "8.56.1" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.1.tgz#988cabb39c973e9200f35fdbb29d17992965bb08" + integrity sha512-18PLWRzhy9glDQp3+wOgfLYRWlhgX0azxgJ63rdpoUHyrC9z0f5CkFburjQx4uD7ZCruw85ZtMt6K+L+R8fLJQ== dependencies: "@types/estree" "*" "@types/json-schema" "*" -"@types/estree@*", "@types/estree@^1.0.0": +"@types/estree@*", "@types/estree@1.0.5", "@types/estree@^1.0.0": version "1.0.5" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== @@ -6816,9 +6828,14 @@ integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== "@types/luxon@~3.3.0": - version "3.3.7" - resolved "https://registry.yarnpkg.com/@types/luxon/-/luxon-3.3.7.tgz#043d413b6492a012de47503907bdf3ec4f827933" - integrity sha512-gKc9P2d4g5uYwmy4s/MO/yOVPmvHyvzka1YH6i5dM03UrFofHSmgc0D0ymbDRStFWHusk6cwwF6nhLm/ckBbbQ== + version "3.3.8" + resolved "https://registry.yarnpkg.com/@types/luxon/-/luxon-3.3.8.tgz#84dbf2d020a9209a272058725e168f21d331a67e" + integrity sha512-jYvz8UMLDgy3a5SkGJne8H7VA7zPV2Lwohjx0V8V31+SqAjNmurWMkk9cQhfvlcnXWudBpK9xPM1n4rljOcHYQ== + +"@types/methods@^1.1.4": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@types/methods/-/methods-1.1.4.tgz#d3b7ac30ac47c91054ea951ce9eed07b1051e547" + integrity sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ== "@types/mime@*": version "3.0.4" @@ -6845,7 +6862,7 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.5.tgz#ec10755e871497bcd83efe927e43ec46e8c0747e" integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== -"@types/mocha@>=9.1.0", "@types/mocha@^10.0.2": +"@types/mocha@^10.0.2": version "10.0.6" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.6.tgz#818551d39113081048bdddbef96701b4e8bb9d1b" integrity sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg== @@ -6855,10 +6872,10 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.34.tgz#10964ba0dee6ac4cd462e2795b6bebd407303433" integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== -"@types/node@*", "@types/node@20.10.6", "@types/node@>=12.0.0", "@types/node@>=13.7.0", "@types/node@>=8.1.0", "@types/node@^20.10.6": - version "20.10.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.6.tgz#a3ec84c22965802bf763da55b2394424f22bfbb5" - integrity sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw== +"@types/node@*", "@types/node@>=13.7.0", "@types/node@>=8.1.0", "@types/node@^20.10.6": + version "20.10.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.7.tgz#40fe8faf25418a75de9fe68a8775546732a3a901" + integrity sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg== dependencies: undici-types "~5.26.4" @@ -6867,6 +6884,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469" integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q== +"@types/node@20.10.6": + version "20.10.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.6.tgz#a3ec84c22965802bf763da55b2394424f22bfbb5" + integrity sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw== + dependencies: + undici-types "~5.26.4" + "@types/node@^10.0.3": version "10.17.60" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" @@ -6939,9 +6963,9 @@ integrity sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng== "@types/qs@*", "@types/qs@^6.2.31", "@types/qs@^6.9.7": - version "6.9.10" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.10.tgz#0af26845b5067e1c9a622658a51f60a3934d51e8" - integrity sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw== + version "6.9.11" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.11.tgz#208d8a30bc507bd82e03ada29e4732ea46a6bbda" + integrity sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ== "@types/range-parser@*": version "1.2.7" @@ -6975,9 +6999,9 @@ "@types/react" "*" "@types/react@*", "@types/react@16 || 17 || 18", "@types/react@^18.2.43": - version "18.2.45" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.45.tgz#253f4fac288e7e751ab3dc542000fb687422c15c" - integrity sha512-TtAxCNrlrBp8GoeEp1npd5g+d/OejJHFxS3OWmrPBMFaVQMSN0OFySozJio5BHxTuTeug00AVXVAjfDSfk+lUg== + version "18.2.47" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.47.tgz#85074b27ab563df01fbc3f68dc64bf7050b0af40" + integrity sha512-xquNkkOirwyCgoClNk85BjP+aqnIS+ckAJ8i37gAbDs14jfW/J23f2GItAf33oiUPQnqNMALiFeoM9Y5mbjpVQ== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -7048,11 +7072,12 @@ integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== "@types/superagent@*": - version "4.1.24" - resolved "https://registry.yarnpkg.com/@types/superagent/-/superagent-4.1.24.tgz#e1f9ad3b66a21ed13c047e8529009735732dde0a" - integrity sha512-mEafCgyKiMFin24SDzWN7yAADt4gt6YawFiNMp0QS5ZPboORfyxFt0s3VzJKhTaKg9py/4FUmrHLTNfJKt9Rbw== + version "8.1.1" + resolved "https://registry.yarnpkg.com/@types/superagent/-/superagent-8.1.1.tgz#dbc620c5df3770b0c3092f947d6d5e808adae2bc" + integrity sha512-YQyEXA4PgCl7EVOoSAS3o0fyPFU6erv5mMixztQYe1bqbWmmn8c+IrqoxjQeZe4MgwXikgcaZPiI/DsbmOVlzA== dependencies: - "@types/cookiejar" "*" + "@types/cookiejar" "^2.1.5" + "@types/methods" "^1.1.4" "@types/node" "*" "@types/supertest@^2.0.15": @@ -7192,13 +7217,13 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/scope-manager@6.15.0": - version "6.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.15.0.tgz#40e5214a3e9e048aca55ce33381bc61b6b51c32a" - integrity sha512-+BdvxYBltqrmgCNu4Li+fGDIkW9n//NrruzG9X1vBzaNK+ExVXPoGB71kneaVw/Jp+4rH/vaMAGC6JfMbHstVg== +"@typescript-eslint/scope-manager@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.18.1.tgz#28c31c60f6e5827996aa3560a538693cb4bd3848" + integrity sha512-BgdBwXPFmZzaZUuw6wKiHKIovms97a7eTImjkXCZE04TGHysG+0hDQPmygyvgtkoB/aOQwSM/nWv3LzrOIQOBw== dependencies: - "@typescript-eslint/types" "6.15.0" - "@typescript-eslint/visitor-keys" "6.15.0" + "@typescript-eslint/types" "6.18.1" + "@typescript-eslint/visitor-keys" "6.18.1" "@typescript-eslint/type-utils@5.62.0": version "5.62.0" @@ -7215,10 +7240,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@6.15.0": - version "6.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.15.0.tgz#a9f7b006aee52b0948be6e03f521814bf435ddd5" - integrity sha512-yXjbt//E4T/ee8Ia1b5mGlbNj9fB9lJP4jqLbZualwpP2BCQ5is6BcWwxpIsY4XKAhmdv3hrW92GdtJbatC6dQ== +"@typescript-eslint/types@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.18.1.tgz#91617d8080bcd99ac355d9157079970d1d49fefc" + integrity sha512-4TuMAe+tc5oA7wwfqMtB0Y5OrREPF1GeJBAjqwgZh1lEMH5PJQgWgHGfYufVB51LtjD+peZylmeyxUXPfENLCw== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -7233,16 +7258,17 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@6.15.0": - version "6.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.15.0.tgz#2f8a513df1ce5e6e1ba8e5c6aa52f392ae023fc5" - integrity sha512-7mVZJN7Hd15OmGuWrp2T9UvqR2Ecg+1j/Bp1jXUEY2GZKV6FXlOIoqVDmLpBiEiq3katvj/2n2mR0SDwtloCew== +"@typescript-eslint/typescript-estree@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.18.1.tgz#a12b6440175b4cbc9d09ab3c4966c6b245215ab4" + integrity sha512-fv9B94UAhywPRhUeeV/v+3SBDvcPiLxRZJw/xZeeGgRLQZ6rLMG+8krrJUyIf6s1ecWTzlsbp0rlw7n9sjufHA== dependencies: - "@typescript-eslint/types" "6.15.0" - "@typescript-eslint/visitor-keys" "6.15.0" + "@typescript-eslint/types" "6.18.1" + "@typescript-eslint/visitor-keys" "6.18.1" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" + minimatch "9.0.3" semver "^7.5.4" ts-api-utils "^1.0.1" @@ -7261,16 +7287,16 @@ semver "^7.3.7" "@typescript-eslint/utils@^6.10.0": - version "6.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.15.0.tgz#f80dbb79f3b0f569077a8711dd44186a8933fa4c" - integrity sha512-eF82p0Wrrlt8fQSRL0bGXzK5nWPRV2dYQZdajcfzOD9+cQz9O7ugifrJxclB+xVOvWvagXfqS4Es7vpLP4augw== + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.18.1.tgz#3451cfe2e56babb6ac657e10b6703393d4b82955" + integrity sha512-zZmTuVZvD1wpoceHvoQpOiewmWu3uP9FuTWo8vqpy2ffsmfCE8mklRPi+vmnIYAIk9t/4kOThri2QCDgor+OpQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.15.0" - "@typescript-eslint/types" "6.15.0" - "@typescript-eslint/typescript-estree" "6.15.0" + "@typescript-eslint/scope-manager" "6.18.1" + "@typescript-eslint/types" "6.18.1" + "@typescript-eslint/typescript-estree" "6.18.1" semver "^7.5.4" "@typescript-eslint/visitor-keys@5.62.0": @@ -7281,12 +7307,12 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@6.15.0": - version "6.15.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.15.0.tgz#5baf97a7bfeec6f4894d400437055155a46b2330" - integrity sha512-1zvtdC1a9h5Tb5jU9x3ADNXO9yjP8rXlaoChu0DQX40vf5ACVpYIVIZhIMZ6d5sDXH7vq4dsZBT1fEGj8D2n2w== +"@typescript-eslint/visitor-keys@6.18.1": + version "6.18.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.18.1.tgz#704d789bda2565a15475e7d22f145b8fe77443f4" + integrity sha512-/kvt0C5lRqGoCfsbmm7/CwMqoSkY3zzHLIjdhHZQW3VFrnz7ATecOHR7nb7V+xn4286MBxfnQfQhAmCI0u+bJA== dependencies: - "@typescript-eslint/types" "6.15.0" + "@typescript-eslint/types" "6.18.1" eslint-visitor-keys "^3.4.1" "@ucast/core@^1.0.0", "@ucast/core@^1.4.1", "@ucast/core@^1.6.1": @@ -8170,9 +8196,9 @@ acorn@^7.1.1: integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== acorn@^8.0.4, acorn@^8.1.0, acorn@^8.10.0, acorn@^8.2.4, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.1, acorn@^8.8.2, acorn@^8.9.0: - version "8.11.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" - integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== address@^1.0.1: version "1.2.2" @@ -8211,7 +8237,7 @@ agent-base@6: dependencies: debug "4" -agentkeepalive@^4.3.0: +agentkeepalive@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== @@ -8275,7 +8301,7 @@ ajv@^6.11.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -amazon-cognito-identity-js@^6.0.1: +amazon-cognito-identity-js@^6.0.1, amazon-cognito-identity-js@^6.3.6: version "6.3.7" resolved "https://registry.yarnpkg.com/amazon-cognito-identity-js/-/amazon-cognito-identity-js-6.3.7.tgz#65c3d7ee4e0c0a1ffea01927248989c5bd1d1868" integrity sha512-tSjnM7KyAeOZ7UMah+oOZ6cW4Gf64FFcc7BE2l7MTcp7ekAPrXaCbpcW2xEpH1EiDS4cPcAouHzmCuc2tr72vQ== @@ -8806,9 +8832,9 @@ available-typed-arrays@^1.0.5: integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== aws-sdk@^2.1528.0: - version "2.1528.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1528.0.tgz#56dd74e3732fc8ba9dad652d1550816389fa540b" - integrity sha512-QyV8fTJJAqnBAbAGkRKgXfI/NvxAoeJHjEFVXDo77hv13cJZKOdBTe9dV56ztS4R1twDJxHibXdDi7IeBrag2w== + version "2.1532.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1532.0.tgz#7c78054e53584ce6396406e87d3edfbadb0ffa81" + integrity sha512-4QVQs01LEAxo7UpSHlq/HaO+SJ1WrYF8W1otO2WhKpVRYXkSxXIgZgfYaK+sQ762XTtB6tSuD2ZS2HGsKNXVLw== dependencies: buffer "4.9.2" events "1.1.1" @@ -8845,7 +8871,7 @@ axios@1.6.0: form-data "^4.0.0" proxy-from-env "^1.1.0" -axios@^0.21.1, axios@^0.21.2, axios@^0.21.4: +axios@^0.21.1, axios@^0.21.4: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== @@ -8868,11 +8894,11 @@ axios@^0.27.2: form-data "^4.0.0" axios@^1.1.3, axios@^1.2.3, axios@^1.3.4, axios@^1.4.0, axios@^1.5.1: - version "1.6.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.2.tgz#de67d42c755b571d3e698df1b6504cde9b0ee9f2" - integrity sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A== + version "1.6.5" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.5.tgz#2c090da14aeeab3770ad30c3a1461bc970fb0cd8" + integrity sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg== dependencies: - follow-redirects "^1.15.0" + follow-redirects "^1.15.4" form-data "^4.0.0" proxy-from-env "^1.1.0" @@ -8955,7 +8981,7 @@ babel-plugin-macros@^3.1.0: cosmiconfig "^7.0.0" resolve "^1.19.0" -babel-plugin-polyfill-corejs2@^0.4.6: +babel-plugin-polyfill-corejs2@^0.4.7: version "0.4.7" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.7.tgz#679d1b94bf3360f7682e11f2cb2708828a24fe8c" integrity sha512-LidDk/tEGDfuHW2DWh/Hgo4rmnw3cduK6ZkOI1NPFceSK3n/yAGeOsNT7FLnSGHkXj3RHGSEVkN3FsCTY6w2CQ== @@ -8964,7 +8990,7 @@ babel-plugin-polyfill-corejs2@^0.4.6: "@babel/helper-define-polyfill-provider" "^0.4.4" semver "^6.3.1" -babel-plugin-polyfill-corejs3@^0.8.5: +babel-plugin-polyfill-corejs3@^0.8.7: version "0.8.7" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.7.tgz#941855aa7fdaac06ed24c730a93450d2b2b76d04" integrity sha512-KyDvZYxAzkC0Aj2dAPyDzi2Ym15e5JKZSK+maI7NAwSqofvuFglbSsxE7wUOvTg9oFVnHMzVzBKcqEb4PJgtOA== @@ -8972,7 +8998,7 @@ babel-plugin-polyfill-corejs3@^0.8.5: "@babel/helper-define-polyfill-provider" "^0.4.4" core-js-compat "^3.33.1" -babel-plugin-polyfill-regenerator@^0.5.3: +babel-plugin-polyfill-regenerator@^0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.4.tgz#c6fc8eab610d3a11eb475391e52584bacfc020f4" integrity sha512-S/x2iOCvDaCASLYsOOgWOq4bCfKYVqvO/uxjkaYyZ3rVsVE3CeAI/c84NpyuBBymEgNvHgjEot3a9/Z/kXvqsg== @@ -9787,9 +9813,9 @@ camelize@^1.0.0: integrity sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ== caniuse-lite@^1.0.30001565: - version "1.0.30001570" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001570.tgz#b4e5c1fa786f733ab78fc70f592df6b3f23244ca" - integrity sha512-+3e0ASu4sw1SWaoCtvPeyXp+5PsjigkSt8OXZbF9StH5pQWbxEjLAZE3n8Aup5udop1uRiKA7a4utUk/uoSpUw== + version "1.0.30001576" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001576.tgz#893be772cf8ee6056d6c1e2d07df365b9ec0a5c4" + integrity sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg== carbites@^1.0.6: version "1.0.6" @@ -9850,7 +9876,7 @@ chai-as-promised@^7.1.1: dependencies: check-error "^1.0.2" -chai@^4.2.0, chai@^4.3.7, chai@^4.4.0: +chai@^4.3.7, chai@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.0.tgz#f9ac79f26726a867ac9d90a9b382120479d5f55b" integrity sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A== @@ -10109,9 +10135,9 @@ classic-level@^1.2.0: node-gyp-build "^4.3.0" classnames@^2.2.5: - version "2.3.2" - resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924" - integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw== + version "2.5.1" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b" + integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow== clean-css@^5.2.2: version "5.3.3" @@ -10302,9 +10328,9 @@ clsx@^1.1.0: integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== clsx@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b" - integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q== + version "2.1.0" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.1.0.tgz#e851283bcb5c80ee7608db18487433f7b23f77cb" + integrity sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg== cluster-key-slot@^1.1.0: version "1.1.2" @@ -10775,16 +10801,16 @@ copyfiles@2.4.1: yargs "^16.1.0" core-js-compat@^3.31.0, core-js-compat@^3.33.1: - version "3.34.0" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.34.0.tgz#61a4931a13c52f8f08d924522bba65f8c94a5f17" - integrity sha512-4ZIyeNbW/Cn1wkMMDy+mvrRUxrwFNjKwbhCfQpDd+eLgYipDqp8oGFGtLmhh18EDPKA0g3VUBYOxQGGwvWLVpA== + version "3.35.0" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.35.0.tgz#c149a3d1ab51e743bc1da61e39cb51f461a41873" + integrity sha512-5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw== dependencies: browserslist "^4.22.2" core-js-pure@^3.23.3, core-js-pure@^3.30.2: - version "3.34.0" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.34.0.tgz#981e462500708664c91b827a75b011f04a8134a0" - integrity sha512-pmhivkYXkymswFfbXsANmBAewXx86UBfmagP+w0wkK06kLsLlTK5oQmsURPivzMkIBQiYq2cjamcZExIwlFQIg== + version "3.35.0" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.35.0.tgz#4660033304a050215ae82e476bd2513a419fbb34" + integrity sha512-f+eRYmkou59uh7BPcyJ8MC76DiGhspj1KMxVIcF24tzP8NA9HVa1uC7BTW2tgx7E1QVCzDzsgp7kArrzhlz8Ew== core-util-is@1.0.2: version "1.0.2" @@ -11236,7 +11262,7 @@ dataloader@^2.2.2: resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-2.2.2.tgz#216dc509b5abe39d43a9b9d97e6e5e473dfbe3e0" integrity sha512-8YnDaaf7N3k/q5HnTJVuzSyLETjoZjVmHc4AeKAzOvKHEFQKcn64OKBfzHYtE9zGjctNM7V9I0MfnUVLpi7M5g== -date-fns@2.30.0, date-fns@^2.29.1, date-fns@^2.29.3: +date-fns@2.30.0, date-fns@^2.29.1: version "2.30.0" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== @@ -11487,9 +11513,9 @@ define-property@^2.0.2: isobject "^3.0.1" defu@^6.1.2, defu@^6.1.3: - version "6.1.3" - resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.3.tgz#6d7f56bc61668e844f9f593ace66fd67ef1205fd" - integrity sha512-Vy2wmG3NTkmHNg/kzpuvHhkqeIx3ODWqasgCRbKtbXEN0G+HpEEv9BtJLp7ZG1CZloFaC41Ah3ZFbq7aqCqMeQ== + version "6.1.4" + resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.4.tgz#4e0c9cf9ff68fe5f3d7f2765cc1a012dfdcb0479" + integrity sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg== del@^5.1.0: version "5.1.0" @@ -11757,11 +11783,16 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-accessibility-api@^0.5.6, dom-accessibility-api@^0.5.9: +dom-accessibility-api@^0.5.9: version "0.5.16" resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz#5a7429e6066eb3664d911e33fb0e45de8eb08453" integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg== +dom-accessibility-api@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz#993e925cc1d73f2c662e7d75dd5a5445259a8fd8" + integrity sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w== + dom-converter@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768" @@ -11975,9 +12006,9 @@ electron-fetch@^1.7.2: encoding "^0.1.13" electron-to-chromium@^1.4.601: - version "1.4.615" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.615.tgz#b1c41839962d2e4e63dca05519da9040e34848c2" - integrity sha512-/bKPPcgZVUziECqDc+0HkT87+0zhaWSZHNXqF8FLd2lQcptpmUFwoCSWjCdOng9Gdq+afKArPdEg/0ZW461Eng== + version "1.4.625" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.625.tgz#a9a1d18ee911f9074a9c42d9e84b1c79b29f4059" + integrity sha512-DENMhh3MFgaPDoXWrVIqSPInQoLImywfCwrSmVl3cf9QHzoZSiutHwGaB/Ql3VkqcQV30rzgdM+BjKqBAJxo5Q== elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" @@ -12497,33 +12528,33 @@ esbuild@^0.18.10: "@esbuild/win32-x64" "0.18.20" esbuild@^0.19.3: - version "0.19.10" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.10.tgz#55e83e4a6b702e3498b9f872d84bfb4ebcb6d16e" - integrity sha512-S1Y27QGt/snkNYrRcswgRFqZjaTG5a5xM3EQo97uNBnH505pdzSNe/HLBq1v0RO7iK/ngdbhJB6mDAp0OK+iUA== + version "0.19.11" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.19.11.tgz#4a02dca031e768b5556606e1b468fe72e3325d96" + integrity sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA== optionalDependencies: - "@esbuild/aix-ppc64" "0.19.10" - "@esbuild/android-arm" "0.19.10" - "@esbuild/android-arm64" "0.19.10" - "@esbuild/android-x64" "0.19.10" - "@esbuild/darwin-arm64" "0.19.10" - "@esbuild/darwin-x64" "0.19.10" - "@esbuild/freebsd-arm64" "0.19.10" - "@esbuild/freebsd-x64" "0.19.10" - "@esbuild/linux-arm" "0.19.10" - "@esbuild/linux-arm64" "0.19.10" - "@esbuild/linux-ia32" "0.19.10" - "@esbuild/linux-loong64" "0.19.10" - "@esbuild/linux-mips64el" "0.19.10" - "@esbuild/linux-ppc64" "0.19.10" - "@esbuild/linux-riscv64" "0.19.10" - "@esbuild/linux-s390x" "0.19.10" - "@esbuild/linux-x64" "0.19.10" - "@esbuild/netbsd-x64" "0.19.10" - "@esbuild/openbsd-x64" "0.19.10" - "@esbuild/sunos-x64" "0.19.10" - "@esbuild/win32-arm64" "0.19.10" - "@esbuild/win32-ia32" "0.19.10" - "@esbuild/win32-x64" "0.19.10" + "@esbuild/aix-ppc64" "0.19.11" + "@esbuild/android-arm" "0.19.11" + "@esbuild/android-arm64" "0.19.11" + "@esbuild/android-x64" "0.19.11" + "@esbuild/darwin-arm64" "0.19.11" + "@esbuild/darwin-x64" "0.19.11" + "@esbuild/freebsd-arm64" "0.19.11" + "@esbuild/freebsd-x64" "0.19.11" + "@esbuild/linux-arm" "0.19.11" + "@esbuild/linux-arm64" "0.19.11" + "@esbuild/linux-ia32" "0.19.11" + "@esbuild/linux-loong64" "0.19.11" + "@esbuild/linux-mips64el" "0.19.11" + "@esbuild/linux-ppc64" "0.19.11" + "@esbuild/linux-riscv64" "0.19.11" + "@esbuild/linux-s390x" "0.19.11" + "@esbuild/linux-x64" "0.19.11" + "@esbuild/netbsd-x64" "0.19.11" + "@esbuild/openbsd-x64" "0.19.11" + "@esbuild/sunos-x64" "0.19.11" + "@esbuild/win32-arm64" "0.19.11" + "@esbuild/win32-ia32" "0.19.11" + "@esbuild/win32-x64" "0.19.11" escalade@^3.1.1: version "3.1.1" @@ -12666,9 +12697,9 @@ eslint-plugin-jest@^25.3.0: "@typescript-eslint/experimental-utils" "^5.0.0" eslint-plugin-jest@^27.1.5: - version "27.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.6.0.tgz#e5c0cf735b3c8cad0ef9db5b565b2fc99f5e55ed" - integrity sha512-MTlusnnDMChbElsszJvrwD1dN3x6nZl//s4JD23BxB6MgR66TZlL064su24xEIS3VACfAoHV1vgyMgPw8nkdng== + version "27.6.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.6.1.tgz#5e43b07f3ca48d72e4b4fa243531e5153d9ca1dc" + integrity sha512-WEYkyVXD9NlmFBKvrkmzrC+C9yZoz5pAml2hO19PlS3spJtoiwj4p2u8spd/7zx5IvRsZsCmsoImaAvBB9X93Q== dependencies: "@typescript-eslint/utils" "^5.10.0" @@ -12695,12 +12726,12 @@ eslint-plugin-jsx-a11y@^6.5.1: object.fromentries "^2.0.7" eslint-plugin-prettier@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz#a3b399f04378f79f066379f544e42d6b73f11515" - integrity sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg== + version "5.1.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.2.tgz#584c94d4bf31329b2d4cbeb10fd600d17d6de742" + integrity sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg== dependencies: prettier-linter-helpers "^1.0.0" - synckit "^0.8.5" + synckit "^0.8.6" eslint-plugin-react-hooks@^4.3.0, eslint-plugin-react-hooks@^4.6.0: version "4.6.0" @@ -13045,7 +13076,7 @@ ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.4, ethereum ethereum-cryptography "^0.1.3" rlp "^2.2.4" -ethers@^5.0.0, ethers@^5.4.7, ethers@^5.7.0, ethers@^5.7.1, ethers@^5.7.2: +ethers@^5.7.0, ethers@^5.7.1, ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -13081,10 +13112,10 @@ ethers@^5.0.0, ethers@^5.4.7, ethers@^5.7.0, ethers@^5.7.1, ethers@^5.7.2: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" -ethers@^6.8.1: - version "6.9.0" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.9.0.tgz#a4534bdcdfde306aee94ef32f3d5c70d7e33fcb9" - integrity sha512-pmfNyQzc2mseLe91FnT2vmNaTt8dDzhxZ/xItAV7uGsF4dI4ek2ufMu3rAkgQETL/TIs0GS5A+U05g9QyWnv3Q== +ethers@^6.8.1, ethers@^6.9.1: + version "6.9.2" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.9.2.tgz#6f4632f62e2350fa8354ff28624027a175ef85a4" + integrity sha512-YpkrtILnMQz5jSEsJQRTpduaGT/CXuLnUIuOYzHA0v/7c8IX91m2J48wSKjzGL5L9J/Us3tLoUdb+OwE3U+FFQ== dependencies: "@adraffy/ens-normalize" "1.10.0" "@noble/curves" "1.2.0" @@ -13668,10 +13699,10 @@ fn.name@1.x.x: resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== -follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.8, follow-redirects@^1.14.9, follow-redirects@^1.15.0, follow-redirects@^1.15.2: - version "1.15.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" - integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== +follow-redirects@^1.12.1, follow-redirects@^1.14.0, follow-redirects@^1.14.8, follow-redirects@^1.14.9, follow-redirects@^1.15.0, follow-redirects@^1.15.2, follow-redirects@^1.15.4: + version "1.15.4" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf" + integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw== for-each@^0.3.3: version "0.3.3" @@ -13692,6 +13723,14 @@ for-own@^1.0.0: dependencies: for-in "^1.0.1" +foreground-child@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" + integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -14224,6 +14263,17 @@ glob@9.3.5, glob@^9.2.0: minipass "^4.2.4" path-scurry "^1.6.1" +glob@^10.3.10: + version "10.3.10" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" + integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g== + dependencies: + foreground-child "^3.1.0" + jackspeak "^2.3.5" + minimatch "^9.0.1" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-scurry "^1.10.1" + glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -14235,7 +14285,7 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3, glob@^8.1.0: +glob@^8.0.3: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -14515,7 +14565,7 @@ graphql@15.5.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.5.0.tgz#39d19494dbe69d1ea719915b578bf920344a69d5" integrity sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA== -graphql@^16.6.0, graphql@^16.7.1: +graphql@^16.6.0, graphql@^16.8.1: version "16.8.1" resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== @@ -14528,9 +14578,9 @@ gzip-size@^6.0.0: duplexer "^0.1.2" h3@^1.8.1, h3@^1.8.2: - version "1.9.0" - resolved "https://registry.yarnpkg.com/h3/-/h3-1.9.0.tgz#c5f512a93026df9837db6f30c9ef51135dd46752" - integrity sha512-+F3ZqrNV/CFXXfZ2lXBINHi+rM4Xw3CDC5z2CDK3NMPocjonKipGLLDSkrqY9DOrioZNPTIdDMWfQKm//3X2DA== + version "1.10.0" + resolved "https://registry.yarnpkg.com/h3/-/h3-1.10.0.tgz#55ac36deb6e250ada5ff1940b6324bc6acc4085f" + integrity sha512-Tw1kcIC+AeimwRmviiObaD5EB430Yt+lTgOxLJxNr96Vd/fGRu04EF7aKfOAcpwKCI+U2JlbxOLhycD86p3Ciw== dependencies: cookie-es "^1.0.0" defu "^6.1.3" @@ -14539,7 +14589,7 @@ h3@^1.8.1, h3@^1.8.2: radix3 "^1.1.0" ufo "^1.3.2" uncrypto "^0.1.3" - unenv "^1.7.4" + unenv "^1.8.0" hamt-sharding@^2.0.0: version "2.0.1" @@ -14599,32 +14649,6 @@ hardhat-abi-exporter@^2.10.1: "@ethersproject/abi" "^5.5.0" delete-empty "^3.0.0" -hardhat-celo@^0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/hardhat-celo/-/hardhat-celo-0.0.7.tgz#fb08fe6afcb95487977ca10cd614a12d1f6c3c7a" - integrity sha512-//LB0KD9HMRUMO9MLHnr6ODLJCAbJK2e3OWIhQvJr8PTzms+1uELW/skAi5wUcO+gOASV4PTo45g/yipgHfzeA== - dependencies: - "@ethersproject/abi" "^5.4.7" - "@ethersproject/providers" "^5.4.7" - "@nomicfoundation/hardhat-chai-matchers" "^1.0.0" - "@nomicfoundation/hardhat-network-helpers" "^1.0.0" - "@nomicfoundation/hardhat-toolbox" "^2.0.2" - "@nomiclabs/hardhat-ethers" "^2.0.0" - "@nomiclabs/hardhat-etherscan" "^3.0.0" - "@typechain/ethers-v5" "^10.1.0" - "@typechain/hardhat" "^6.1.2" - "@types/chai" "^4.2.0" - "@types/mocha" ">=9.1.0" - "@types/node" ">=12.0.0" - chai "^4.2.0" - ethers "^5.4.7" - hardhat "^2.11.0" - hardhat-gas-reporter "^1.0.8" - solidity-coverage "^0.8.1" - ts-node ">=8.0.0" - typechain "^8.1.0" - typescript ">=4.5.0" - hardhat-contract-sizer@^2.6.1: version "2.10.0" resolved "https://registry.yarnpkg.com/hardhat-contract-sizer/-/hardhat-contract-sizer-2.10.0.tgz#72646f43bfe50e9a5702c9720c9bc3e77d93a2c9" @@ -14669,7 +14693,7 @@ hardhat-deploy@^0.11.43: qs "^6.9.4" zksync-web3 "^0.14.3" -hardhat-gas-reporter@^1.0.8, hardhat-gas-reporter@^1.0.9: +hardhat-gas-reporter@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/hardhat-gas-reporter/-/hardhat-gas-reporter-1.0.9.tgz#9a2afb354bc3b6346aab55b1c02ca556d0e16450" integrity sha512-INN26G3EW43adGKBNzYWOlI3+rlLnasXTwW79YNnUhXPDa+yHESgt639dJEs37gCjhkbNKcRRJnomXEuMFBXJg== @@ -14678,10 +14702,10 @@ hardhat-gas-reporter@^1.0.8, hardhat-gas-reporter@^1.0.9: eth-gas-reporter "^0.2.25" sha1 "^1.1.1" -hardhat@^2.11.0, hardhat@^2.18.3: - version "2.19.3" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.19.3.tgz#fe3b28b889e34a074ea5b740c227e3c8d4ce56e8" - integrity sha512-zUvfILiu1O7W1a+t5E1nCJ6z1danRLNizQkSEQCCgDYcRx13AGXtH1MVZajKmdLmXIjKAPReTp/8JQQ4ZHaX3g== +hardhat@^2.18.3: + version "2.19.4" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.19.4.tgz#5112c30295d8be2e18e55d847373c50483ed1902" + integrity sha512-fTQJpqSt3Xo9Mn/WrdblNGAfcANM6XC3tAEi6YogB4s02DmTf93A8QsGb8uR0KR8TFcpcS8lgiW4ugAIYpnbrQ== dependencies: "@ethersproject/abi" "^5.1.2" "@metamask/eth-sig-util" "^4.0.0" @@ -16406,6 +16430,15 @@ iterator.prototype@^1.1.2: reflect.getprototypeof "^1.0.4" set-function-name "^2.0.1" +jackspeak@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8" + integrity sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ== + dependencies: + "@isaacs/cliui" "^8.0.2" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + jake@^10.8.5: version "10.8.7" resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.7.tgz#63a32821177940c33f356e0ba44ff9d34e1c7d8f" @@ -17949,9 +17982,9 @@ libmime@^2.0.3: libqp "1.1.0" libphonenumber-js@^1.10.14: - version "1.10.52" - resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.52.tgz#786d7743e75aba1996824057b60003bb539f8daa" - integrity sha512-6vCuCHgem+OW1/VCAKgkasfegItCea8zIT7s9/CG/QxdCMIM7GfzbEBG5d7lGO3rzipjt5woOQL3DiHa8Fy78Q== + version "1.10.53" + resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.10.53.tgz#8dbfe1355ef1a3d8e13b8d92849f7db7ebddc98f" + integrity sha512-sDTnnqlWK4vH4AlDQuswz3n4Hx7bIQWTpIcScJX+Sp7St3LXHmfiax/ZFfyYxHmkdCvydOLSuvtAO/XpXiSySw== libqp@1.1.0: version "1.1.0" @@ -18131,6 +18164,11 @@ 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.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -18937,6 +18975,13 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" +minimatch@9.0.3, minimatch@^9.0.1, minimatch@^9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + minimatch@^5.0.1: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" @@ -18951,13 +18996,6 @@ minimatch@^8.0.2: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.3: - version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== - dependencies: - brace-expansion "^2.0.1" - minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -19162,6 +19200,11 @@ mrmime@^1.0.0: resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== +mrmime@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-2.0.0.tgz#151082a6e06e59a9a39b46b3e14d5cfe92b3abb4" + integrity sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw== + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -19460,9 +19503,9 @@ no-case@^3.0.4: tslib "^2.0.3" node-abi@^3.3.0: - version "3.52.0" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.52.0.tgz#ffba0a85f54e552547e5849015f40f9514d5ba7c" - integrity sha512-JJ98b02z16ILv7859irtXn4oUaFWADtvkzy2c0IAatNVX2Mc9Yoh8z6hZInn3QwvMEYhHuQloYi+TTQy67SIdQ== + version "3.54.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.54.0.tgz#f6386f7548817acac6434c6cba02999c9aebcc69" + integrity sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA== dependencies: semver "^7.3.5" @@ -19505,12 +19548,12 @@ node-emoji@1.11.0, node-emoji@^1.10.0: dependencies: lodash "^4.17.21" -node-fetch-native@^1.4.0, node-fetch-native@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.4.1.tgz#5a336e55b4e1b1e72b9927da09fecd2b374c9be5" - integrity sha512-NsXBU0UgBxo2rQLOeWNZqS3fvflWePMECr8CoSWoSTqCqGbVVsvl9vZu1HfQicYN0g5piV9Gh8RTEvo/uP752w== +node-fetch-native@^1.4.0, node-fetch-native@^1.4.1, node-fetch-native@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.1.tgz#f95c74917d3cebc794cdae0cd2a9c7594aad0cb4" + integrity sha512-bW9T/uJDPAJB2YNYEpWzE54U5O3MQidXsOyTfnbKYtTtFexRvGzb1waphBN4ZwP6EcIvYYEOwW0b72BpAqydTw== -node-fetch@2.7.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7, node-fetch@^2.6.8: +node-fetch@2.7.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7, node-fetch@^2.6.8, node-fetch@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== @@ -19523,9 +19566,9 @@ node-forge@^1.0.0, node-forge@^1.3.1: integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: - version "4.7.1" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.7.1.tgz#cd7d2eb48e594874053150a9418ac85af83ca8f7" - integrity sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg== + version "4.8.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.0.tgz#3fee9c1731df4581a3f9ead74664369ff00d26dd" + integrity sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og== node-int64@^0.4.0: version "0.4.0" @@ -19685,9 +19728,9 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1: path-key "^3.0.0" npm-run-path@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.1.0.tgz#bc62f7f3f6952d9894bd08944ba011a6ee7b7e00" - integrity sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q== + version "5.2.0" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.2.0.tgz#224cdd22c755560253dd71b83a1ef2f758b2e955" + integrity sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg== dependencies: path-key "^4.0.0" @@ -20473,7 +20516,7 @@ path-root@^0.1.1: dependencies: path-root-regex "^0.1.0" -path-scurry@^1.6.1: +path-scurry@^1.10.1, path-scurry@^1.6.1: version "1.10.1" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.1.tgz#9ba6bf5aa8500fe9fd67df4f0d9483b2b0bfc698" integrity sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ== @@ -20774,9 +20817,9 @@ postcss-modules-local-by-default@^4.0.3: postcss-value-parser "^4.1.0" postcss-modules-scope@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz#9ef3151456d3bbfa120ca44898dfca6f2fa01f06" - integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== + version "3.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-3.1.0.tgz#fbfddfda93a31f310f1d152c2bb4d3f3c5592ee0" + integrity sha512-SaIbK8XW+MZbd0xHPf7kdfA/3eOt7vxJ72IRecn3EzuZVLr1r0orzf0MX/pN8m+NMDoo6X/SQd8oeKqGZd8PXg== dependencies: postcss-selector-parser "^6.0.4" @@ -20788,9 +20831,9 @@ postcss-modules-values@^4.0.0: icss-utils "^5.0.0" postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: - version "6.0.13" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz#d05d8d76b1e8e173257ef9d60b706a8e5e99bf1b" - integrity sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ== + version "6.0.15" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.15.tgz#11cc2b21eebc0b99ea374ffb9887174855a01535" + integrity sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw== dependencies: cssesc "^3.0.0" util-deprecate "^1.0.2" @@ -20801,9 +20844,9 @@ postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0, postcss-value-parser@^ integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== postcss@^8.3.11, postcss@^8.4.13, postcss@^8.4.21, postcss@^8.4.27, postcss@^8.4.32: - version "8.4.32" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.32.tgz#1dac6ac51ab19adb21b8b34fd2d93a86440ef6c9" - integrity sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw== + version "8.4.33" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.33.tgz#1378e859c9f69bf6f638b990a0212f43e2aaa742" + integrity sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg== dependencies: nanoid "^3.3.7" picocolors "^1.0.0" @@ -20880,13 +20923,13 @@ prettier-plugin-packagejson@2.4.5: synckit "0.8.5" prettier-plugin-solidity@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.2.0.tgz#dc620b4fc7708a60687a87cdc803e57a1856b6fd" - integrity sha512-fgxcUZpVAP+LlRfy5JI5oaAkXGkmsje2VJ5krv/YMm+rcTZbIUwFguSw5f+WFuttMjpDm6wB4UL7WVkArEfiVA== + version "1.3.1" + resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.3.1.tgz#59944d3155b249f7f234dee29f433524b9a4abcf" + integrity sha512-MN4OP5I2gHAzHZG1wcuJl0FsLS3c4Cc5494bbg+6oQWBPuEamjwDvmGfFMZ6NFzsh3Efd9UUxeT7ImgjNH4ozA== dependencies: - "@solidity-parser/parser" "^0.16.2" + "@solidity-parser/parser" "^0.17.0" semver "^7.5.4" - solidity-comments-extractor "^0.0.7" + solidity-comments-extractor "^0.0.8" prettier@2.8.4: version "2.8.4" @@ -21501,12 +21544,12 @@ react-router-dom@5.3.4: tiny-warning "^1.0.0" react-router-dom@^6.14.1, react-router-dom@^6.4.3: - version "6.21.0" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.21.0.tgz#aa4c6bc046a8e8723095bc09b3c0ab2254532712" - integrity sha512-1dUdVj3cwc1npzJaf23gulB562ESNvxf7E4x8upNJycqyUm5BRRZ6dd3LrlzhtLaMrwOCO8R0zoiYxdaJx4LlQ== + version "6.21.1" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.21.1.tgz#58b459d2fe1841388c95bb068f85128c45e27349" + integrity sha512-QCNrtjtDPwHDO+AO21MJd7yIcr41UetYt5jzaB9Y1UYaPTCnVuJq6S748g1dE11OQlCFIQg+RtAA1SEZIyiBeA== dependencies: - "@remix-run/router" "1.14.0" - react-router "6.21.0" + "@remix-run/router" "1.14.1" + react-router "6.21.1" react-router@5.3.4: version "5.3.4" @@ -21523,12 +21566,12 @@ react-router@5.3.4: tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-router@6.21.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.21.0.tgz#6fe3e59877aca3dccceec1801d26991ddf42d12b" - integrity sha512-hGZ0HXbwz3zw52pLZV3j3+ec+m/PQ9cTpBvqjFQmy2XVUWGn5MD+31oXHb6dVTxYzmAeaiUBYjkoNz66n3RGCg== +react-router@6.21.1: + version "6.21.1" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.21.1.tgz#8db7ee8d7cfc36513c9a66b44e0897208c33be34" + integrity sha512-W0l13YlMTm1YrpVIOpjCADJqEUpz1vm+CMo47RuFX4Ftegwm6KOYsL5G3eiE52jnJpKvzm6uB/vTKTPKM8dmkA== dependencies: - "@remix-run/router" "1.14.0" + "@remix-run/router" "1.14.1" react-select@5.7.0: version "5.7.0" @@ -22266,23 +22309,25 @@ rollup@^3.27.1: fsevents "~2.3.2" rollup@^4.2.0: - version "4.9.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.9.1.tgz#351d6c03e4e6bcd7a0339df3618d2aeeb108b507" - integrity sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw== + version "4.9.4" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.9.4.tgz#37bc0c09ae6b4538a9c974f4d045bb64b2e7c27c" + integrity sha512-2ztU7pY/lrQyXSCnnoU4ICjT/tCG9cdH3/G25ERqE3Lst6vl2BCM5hL2Nw+sslAvAf+ccKsAq1SkKQALyqhR7g== + dependencies: + "@types/estree" "1.0.5" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.9.1" - "@rollup/rollup-android-arm64" "4.9.1" - "@rollup/rollup-darwin-arm64" "4.9.1" - "@rollup/rollup-darwin-x64" "4.9.1" - "@rollup/rollup-linux-arm-gnueabihf" "4.9.1" - "@rollup/rollup-linux-arm64-gnu" "4.9.1" - "@rollup/rollup-linux-arm64-musl" "4.9.1" - "@rollup/rollup-linux-riscv64-gnu" "4.9.1" - "@rollup/rollup-linux-x64-gnu" "4.9.1" - "@rollup/rollup-linux-x64-musl" "4.9.1" - "@rollup/rollup-win32-arm64-msvc" "4.9.1" - "@rollup/rollup-win32-ia32-msvc" "4.9.1" - "@rollup/rollup-win32-x64-msvc" "4.9.1" + "@rollup/rollup-android-arm-eabi" "4.9.4" + "@rollup/rollup-android-arm64" "4.9.4" + "@rollup/rollup-darwin-arm64" "4.9.4" + "@rollup/rollup-darwin-x64" "4.9.4" + "@rollup/rollup-linux-arm-gnueabihf" "4.9.4" + "@rollup/rollup-linux-arm64-gnu" "4.9.4" + "@rollup/rollup-linux-arm64-musl" "4.9.4" + "@rollup/rollup-linux-riscv64-gnu" "4.9.4" + "@rollup/rollup-linux-x64-gnu" "4.9.4" + "@rollup/rollup-linux-x64-musl" "4.9.4" + "@rollup/rollup-win32-arm64-msvc" "4.9.4" + "@rollup/rollup-win32-ia32-msvc" "4.9.4" + "@rollup/rollup-win32-x64-msvc" "4.9.4" fsevents "~2.3.2" rpc-websockets@^7.5.1: @@ -22547,9 +22592,9 @@ serialize-javascript@6.0.0: randombytes "^2.1.0" serialize-javascript@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" - integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" @@ -22715,7 +22760,7 @@ shelljs@0.8.5, shelljs@^0.8.3: interpret "^1.0.0" rechoir "^0.6.2" -shiki@^0.14.1: +shiki@^0.14.7: version "0.14.7" resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.7.tgz#c3c9e1853e9737845f1d2ef81b31bcfb07056d4e" integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg== @@ -22749,7 +22794,7 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -signal-exit@^4.1.0: +signal-exit@^4.0.1, signal-exit@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== @@ -22819,12 +22864,12 @@ sinon@^7.2.3: supports-color "^5.5.0" sirv@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.3.tgz#ca5868b87205a74bef62a469ed0296abceccd446" - integrity sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA== + version "2.0.4" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.4.tgz#5dd9a725c578e34e449f332703eb2a74e46a29b0" + integrity sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ== dependencies: - "@polka/url" "^1.0.0-next.20" - mrmime "^1.0.0" + "@polka/url" "^1.0.0-next.24" + mrmime "^2.0.0" totalist "^3.0.0" sisteransi@^1.0.5: @@ -22957,12 +23002,12 @@ solidity-ast@^0.4.51: dependencies: array.prototype.findlast "^1.2.2" -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" - integrity sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw== +solidity-comments-extractor@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/solidity-comments-extractor/-/solidity-comments-extractor-0.0.8.tgz#f6e148ab0c49f30c1abcbecb8b8df01ed8e879f8" + integrity sha512-htM7Vn6LhHreR+EglVMd2s+sZhcXAirB1Zlyrv5zBuTxieCvjfnRpd7iZk75m/u6NOlEyQ94C6TWbBn2cY7w8g== -solidity-coverage@^0.8.1, solidity-coverage@^0.8.2: +solidity-coverage@^0.8.2: version "0.8.5" resolved "https://registry.yarnpkg.com/solidity-coverage/-/solidity-coverage-0.8.5.tgz#64071c3a0c06a0cecf9a7776c35f49edc961e875" integrity sha512-6C6N6OV2O8FQA0FWA95FdzVH+L16HU94iFgg5wAFZ29UpLFkgNI/DRR2HotG1bC0F4gAc/OMs2BJI44Q/DYlKQ== @@ -23218,9 +23263,9 @@ statuses@2.0.1, statuses@^2.0.1: integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== std-env@^3.3.2, std-env@^3.4.3: - version "3.6.0" - resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.6.0.tgz#94807562bddc68fa90f2e02c5fd5b6865bb4e98e" - integrity sha512-aFZ19IgVmhdB2uX599ve2kE6BIE3YMnQ6Gp6BURhW/oIzpXGKr878TQfAQZn1+i0Flcc/UKUy1gOlcfaUBCryg== + version "3.7.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" + integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== stop-iteration-iterator@^1.0.0: version "1.0.0" @@ -23332,7 +23377,7 @@ string-natural-compare@^3.0.1: resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, 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== @@ -23428,6 +23473,13 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -23449,13 +23501,6 @@ strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -23515,9 +23560,9 @@ strip-literal@^1.0.1: acorn "^8.10.0" stripe@^14.8.0: - version "14.9.0" - resolved "https://registry.yarnpkg.com/stripe/-/stripe-14.9.0.tgz#e814a3da09f47258bec87e24516c3f3e33041148" - integrity sha512-t2XdpNbRH4x3MYEoxNWhwUPl9D80aUd5OHds0zhDiwRYPZ0H7MrUI/dj9wOSYlzycD3xdvjn0q7pWeFWljtMUQ== + version "14.11.0" + resolved "https://registry.yarnpkg.com/stripe/-/stripe-14.11.0.tgz#1df63c31bcff3b136457c2b7584f917509e8030c" + integrity sha512-NmFEkDC0PldP7CQtdPgKs5dVZA/pF+IepldbmB+Kk9B4d7EBkWnbANp0y+/zJcbRGul48s8hmQzeqNWUlWW0wg== dependencies: "@types/node" ">=8.1.0" qs "^6.11.0" @@ -23710,12 +23755,12 @@ synckit@0.8.5: "@pkgr/utils" "^2.3.1" tslib "^2.5.0" -synckit@^0.8.5: - version "0.8.6" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.6.tgz#b69b7fbce3917c2673cbdc0d87fb324db4a5b409" - integrity sha512-laHF2savN6sMeHCjLRkheIU4wo3Zg9Ln5YOjOo7sZ5dVQW8yF5pPE5SIw1dsPhq3TRp1jisKRCdPhfs/1WMqDA== +synckit@^0.8.6: + version "0.8.8" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" + integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== dependencies: - "@pkgr/utils" "^2.4.2" + "@pkgr/core" "^0.1.0" tslib "^2.6.2" table-layout@^1.0.2: @@ -23861,6 +23906,19 @@ tenderly@^0.7.0: prompts "^2.4.2" tslog "^4.4.0" +tenderly@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/tenderly/-/tenderly-0.8.0.tgz#ffda1f40597b91470e728900e3bdfe6a4f152ec5" + integrity sha512-4Faw9jkwMuBOva82lAtvhTa9isc503GkWwVWSsR8ONm+i3SeFatv7hNyYPZIifQBeuU9GOVNkWHCAXon6NE/aw== + dependencies: + axios "^0.27.2" + cli-table3 "^0.6.2" + commander "^9.4.0" + js-yaml "^4.1.0" + open "^8.4.0" + prompts "^2.4.2" + tslog "^4.4.0" + terminal-link@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" @@ -23870,17 +23928,17 @@ terminal-link@^2.0.0: supports-hyperlinks "^2.0.0" terser-webpack-plugin@^5.3.7: - version "5.3.9" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz#832536999c51b46d468067f9e37662a3b96adfe1" - integrity sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA== + version "5.3.10" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== dependencies: - "@jridgewell/trace-mapping" "^0.3.17" + "@jridgewell/trace-mapping" "^0.3.20" jest-worker "^27.4.5" schema-utils "^3.1.1" serialize-javascript "^6.0.1" - terser "^5.16.8" + terser "^5.26.0" -terser@^5.10.0, terser@^5.16.8: +terser@^5.10.0, terser@^5.26.0: version "5.26.0" resolved "https://registry.yarnpkg.com/terser/-/terser-5.26.0.tgz#ee9f05d929f4189a9c28a0feb889d96d50126fe1" integrity sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ== @@ -24273,7 +24331,7 @@ ts-loader@^9.2.3: semver "^7.3.4" source-map "^0.7.4" -ts-node@>=8.0.0, ts-node@^10.9.1, ts-node@^10.9.2: +ts-node@^10.9.1, ts-node@^10.9.2: version "10.9.2" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== @@ -24466,7 +24524,7 @@ type@^2.7.2: resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== -typechain@^8.1.0, typechain@^8.1.1: +typechain@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/typechain/-/typechain-8.3.2.tgz#1090dd8d9c57b6ef2aed3640a516bdbf01b00d73" integrity sha512-x/sQYr5w9K7yv3es7jo4KTX05CLxOf7TRWwoHlrjRh8H82G64g+k7VuWPJlgMo6qrjfCulOdfBjiaDtmhFYD/Q== @@ -24541,14 +24599,14 @@ typedoc-plugin-markdown@^3.16.0: handlebars "^4.7.7" typedoc@^0.25.1: - version "0.25.4" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.4.tgz#5c2c0677881f504e41985f29d9aef0dbdb6f1e6f" - integrity sha512-Du9ImmpBCw54bX275yJrxPVnjdIyJO/84co0/L9mwe0R3G4FSR6rQ09AlXVRvZEGMUg09+z/usc8mgygQ1aidA== + version "0.25.7" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.7.tgz#11e3f527ca80ca3c029cb8e15f362e6d9f715e25" + integrity sha512-m6A6JjQRg39p2ZVRIN3NKXgrN8vzlHhOS+r9ymUYtcUP/TIQPvWSq7YgE5ZjASfv5Vd5BW5xrir6Gm2XNNcOow== dependencies: lunr "^2.3.9" marked "^4.3.0" minimatch "^9.0.3" - shiki "^0.14.1" + shiki "^0.14.7" typeorm-naming-strategies@^4.1.0: version "4.1.0" @@ -24556,19 +24614,19 @@ typeorm-naming-strategies@^4.1.0: integrity sha512-vPekJXzZOTZrdDvTl1YoM+w+sUIfQHG4kZTpbFYoTsufyv9NIBRe4Q+PdzhEAFA2std3D9LZHEb1EjE9zhRpiQ== typeorm@^0.3.16, typeorm@^0.3.17: - version "0.3.17" - resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.3.17.tgz#a73c121a52e4fbe419b596b244777be4e4b57949" - integrity sha512-UDjUEwIQalO9tWw9O2A4GU+sT3oyoUXheHJy4ft+RFdnRdQctdQ34L9SqE2p7LdwzafHx1maxT+bqXON+Qnmig== + version "0.3.19" + resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.3.19.tgz#a985ce8ae36d266018e44fed5e27a4a5da34ad2a" + integrity sha512-OGelrY5qEoAU80mR1iyvmUHiKCPUydL6xp6bebXzS7jyv/X70Gp/jBWRAfF4qGOfy2A7orMiGRfwsBUNbEL65g== dependencies: "@sqltools/formatter" "^1.2.5" app-root-path "^3.1.0" buffer "^6.0.3" chalk "^4.1.2" cli-highlight "^2.1.11" - date-fns "^2.29.3" + dayjs "^1.11.9" debug "^4.3.4" dotenv "^16.0.3" - glob "^8.1.0" + glob "^10.3.10" mkdirp "^2.1.3" reflect-metadata "^0.1.13" sha.js "^2.4.11" @@ -24586,7 +24644,7 @@ typescript@5.2.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== -typescript@>=4.5.0, typescript@^5.0.0, typescript@^5.2.2: +typescript@^5.0.0, typescript@^5.2.2: version "5.3.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== @@ -24679,22 +24737,22 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici@^5.14.0: +undici@^5.14.0, undici@^5.28.2: version "5.28.2" resolved "https://registry.yarnpkg.com/undici/-/undici-5.28.2.tgz#fea200eac65fc7ecaff80a023d1a0543423b4c91" integrity sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w== dependencies: "@fastify/busboy" "^2.0.0" -unenv@^1.7.4: - version "1.8.0" - resolved "https://registry.yarnpkg.com/unenv/-/unenv-1.8.0.tgz#0f860d5278405700bd95d47b23bc01f3a735d68c" - integrity sha512-uIGbdCWZfhRRmyKj1UioCepQ0jpq638j/Cf0xFTn4zD1nGJ2lSdzYHLzfdXN791oo/0juUiSWW1fBklXMTsuqg== +unenv@^1.8.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/unenv/-/unenv-1.9.0.tgz#469502ae85be1bd3a6aa60f810972b1a904ca312" + integrity sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g== dependencies: consola "^3.2.3" defu "^6.1.3" mime "^3.0.0" - node-fetch-native "^1.4.1" + node-fetch-native "^1.6.1" pathe "^1.1.1" unfetch@^4.2.0: @@ -24906,9 +24964,9 @@ urlpattern-polyfill@^8.0.0: integrity sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ== use-callback-ref@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.3.0.tgz#772199899b9c9a50526fedc4993fc7fa1f7e32d5" - integrity sha512-3FT9PRuRdbB9HfXhEq35u4oZkvpJ5kuYbpqhCfmiZyReuRgpnhDlbr2ZEnnuS0RrJAPn6l23xjFg9kpDM+Ms7w== + version "1.3.1" + resolved "https://registry.yarnpkg.com/use-callback-ref/-/use-callback-ref-1.3.1.tgz#9be64c3902cbd72b07fe55e56408ae3a26036fd0" + integrity sha512-Lg4Vx1XZQauB42Hw3kK7JM6yjVjgFmFC5/Ab797s79aARomD2nEErc4mCgM8EZrARLmmbWpi5DGCadmK50DcAQ== dependencies: tslib "^2.0.0" @@ -25109,9 +25167,9 @@ victory-vendor@^36.6.8: d3-timer "^3.0.1" viem@^1.16.6: - version "1.20.2" - resolved "https://registry.yarnpkg.com/viem/-/viem-1.20.2.tgz#42455f003bef012fcac7e51e510d50fa972d969a" - integrity sha512-f+duq2Gs38REUVsKaEmNq+JFcvXaYtaoZdw43QUAZEvm7D4iwQDkfDSMvsYSwCSUJC8rUUqX3JFcXZm03mYWlQ== + version "1.21.4" + resolved "https://registry.yarnpkg.com/viem/-/viem-1.21.4.tgz#883760e9222540a5a7e0339809202b45fe6a842d" + integrity sha512-BNVYdSaUjeS2zKQgPs+49e5JKocfo60Ib2yiXOWBT6LuVxY1I/6fFX3waEtpXvL1Xn4qu+BVitVtMh9lyThyhQ== dependencies: "@adraffy/ens-normalize" "1.10.0" "@noble/curves" "1.2.0" @@ -25209,9 +25267,9 @@ vite@^2.2.0: fsevents "~2.3.2" vite@^5.0.9: - version "5.0.10" - resolved "https://registry.yarnpkg.com/vite/-/vite-5.0.10.tgz#1e13ef5c3cf5aa4eed81f5df6d107b3c3f1f6356" - integrity sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw== + version "5.0.11" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.0.11.tgz#31562e41e004cb68e1d51f5d2c641ab313b289e4" + integrity sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA== dependencies: esbuild "^0.19.3" postcss "^8.4.32" @@ -25341,9 +25399,9 @@ web-encoding@1.1.5, web-encoding@^1.1.5: "@zxing/text-encoding" "0.9.0" web-streams-polyfill@^3.1.1, web-streams-polyfill@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" - integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== + version "3.3.2" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz#32e26522e05128203a7de59519be3c648004343b" + integrity sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ== web-vitals@^3.5.1: version "3.5.1" @@ -25999,25 +26057,25 @@ workerpool@6.2.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== -wrap-ansi@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" - integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== +"wrap-ansi-cjs@npm:wrap-ansi@^7.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" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== 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" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== +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@^8.0.1: +wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== @@ -26088,14 +26146,14 @@ ws@^7.3.1, ws@^7.4.5, ws@^7.4.6, ws@^7.5.1: integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== ws@^8.11.0, ws@^8.12.0, ws@^8.13.0, ws@^8.5.0: - version "8.15.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.15.1.tgz#271ba33a45ca0cc477940f7f200cd7fba7ee1997" - integrity sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ== + version "8.16.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" + integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ== -xdeployer@1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/xdeployer/-/xdeployer-1.2.7.tgz#371af982147e57f9712d120cedce529b4f43a951" - integrity sha512-953WaHUeQ1Rtigq0R5/8Rm4utYxvgHFqANbHG3DF/C2MRWyA8Jg/769lDNVP6mC8tG+S1P19cw6070j7Guo4Ew== +xdeployer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xdeployer/-/xdeployer-3.0.0.tgz#f39753c52fbeea10877652f99dc70cce47e814e5" + integrity sha512-YG5YsprDGDF3tXw9zDizsp2EdoEy8FYtl1ta72yaOnmCgbkP6DWAvwhavr59xfapWJg8cLqGasxa9h5YwL1TOA== xdg-basedir@^4.0.0: version "4.0.0"