From 4e8025befcb1317648f121df064db8cf89d0c895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Tue, 17 May 2022 14:44:34 +0200 Subject: [PATCH 01/59] =?UTF-8?q?=E2=9C=96=EF=B8=8F=20Add=20percentage=20m?= =?UTF-8?q?argin=20for=20useTransaction=20and=20useContractFunction=20(#74?= =?UTF-8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/add-percentage-margin.md | 5 ++ packages/core/src/constants/type/Config.ts | 6 ++ .../core/src/hooks/estimateGasLimit.test.ts | 65 +++++++++++++++++++ .../core/src/hooks/useContractFunction.ts | 19 +++++- .../core/src/hooks/usePromiseTransaction.ts | 21 +++++- .../core/src/hooks/useSendTransaction.test.ts | 7 +- packages/core/src/hooks/useSendTransaction.ts | 14 +++- .../03-Transactions/01-Ether Transactions.mdx | 3 + .../docs/src/examples/SendTransaction.tsx | 3 +- 9 files changed, 130 insertions(+), 13 deletions(-) create mode 100644 .changeset/add-percentage-margin.md create mode 100644 packages/core/src/hooks/estimateGasLimit.test.ts diff --git a/.changeset/add-percentage-margin.md b/.changeset/add-percentage-margin.md new file mode 100644 index 000000000..9e79d6b2f --- /dev/null +++ b/.changeset/add-percentage-margin.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +βœ–οΈ Add percentage margin for useTransaction diff --git a/packages/core/src/constants/type/Config.ts b/packages/core/src/constants/type/Config.ts index 07ef1e325..2615d8bbc 100644 --- a/packages/core/src/constants/type/Config.ts +++ b/packages/core/src/constants/type/Config.ts @@ -57,6 +57,12 @@ export type FullConfig = { localStorage: { transactionPath: string } + /** + * If set, adds an additional buffer of gas limit to estimated gas limit before sending a transaction. + * Useful if a gas limit of a transaction can be different depending on the state of the blockchain. + * Gas estimation can be not accurate because the state of the blockchain can change between the time of estimation and the time of transaction mining. + */ + bufferGasLimitPercentage?: number /** * Enables reconnecting to last used provider when user revisits the page. */ diff --git a/packages/core/src/hooks/estimateGasLimit.test.ts b/packages/core/src/hooks/estimateGasLimit.test.ts new file mode 100644 index 000000000..a3a53f144 --- /dev/null +++ b/packages/core/src/hooks/estimateGasLimit.test.ts @@ -0,0 +1,65 @@ +import { expect } from 'chai' +import { MockProvider } from 'ethereum-waffle' +import { estimateGasLimit } from './usePromiseTransaction' + +const BASE_TX_COST = 21000 +const LIMITED_TX_COST = 23100 // 21000 * 1.1 + +describe('estimateGasLimit', () => { + const mockProvider = new MockProvider() + const [signer, receiver] = mockProvider.getWallets() + + it('sending ether transaction', async () => { + const gasLimit = await estimateGasLimit( + { + value: 1, + to: receiver.address, + }, + signer, + 0 + ) + + expect(gasLimit).to.equal(BASE_TX_COST) + }) + + it('sending ether transaction with limit', async () => { + const gasLimit = await estimateGasLimit( + { + value: 1, + to: receiver.address, + }, + signer, + 10 + ) + + expect(gasLimit).to.equal(LIMITED_TX_COST) + }) + + it('sending ether transaction with gasLimit', async () => { + const gasLimit = await estimateGasLimit( + { + value: 1, + to: receiver.address, + gasLimit: BASE_TX_COST, + }, + signer, + 0 + ) + + expect(gasLimit).to.equal(BASE_TX_COST) + }) + + it('sending ether transaction with limit with gasLimit', async () => { + const gasLimit = await estimateGasLimit( + { + value: 1, + to: receiver.address, + gasLimit: BASE_TX_COST, + }, + signer, + 10 + ) + + expect(gasLimit).to.equal(LIMITED_TX_COST) + }) +}) diff --git a/packages/core/src/hooks/useContractFunction.ts b/packages/core/src/hooks/useContractFunction.ts index dd422ce35..0b8ab0ba5 100644 --- a/packages/core/src/hooks/useContractFunction.ts +++ b/packages/core/src/hooks/useContractFunction.ts @@ -1,9 +1,9 @@ -import { TransactionOptions } from '../../src' +import { TransactionOptions, useConfig } from '../../src' import { Contract } from '@ethersproject/contracts' import { JsonRpcProvider } from '@ethersproject/providers' import { useCallback, useState } from 'react' import { useEthers } from './useEthers' -import { usePromiseTransaction } from './usePromiseTransaction' +import { estimateGasLimit, usePromiseTransaction } from './usePromiseTransaction' import { LogDescription } from 'ethers/lib/utils' import { ContractFunctionNames, Falsy, Params, TypedContract } from '../model/types' @@ -68,12 +68,25 @@ export function useContractFunction(undefined) + const { bufferGasLimitPercentage = 0 } = useConfig() const send = useCallback( async (...args: Params): Promise => { if (contract) { + const hasOpts = args.length > (contract.interface?.getFunction(functionName).inputs.length ?? 0) + const contractWithSigner = connectContractToSigner(contract, options, library) - const receipt = await promiseTransaction(contractWithSigner[functionName](...args)) + const opts = hasOpts ? args[args.length - 1] : undefined + const gasLimit = await estimateGasLimit(opts, library?.getSigner(), bufferGasLimitPercentage) + + const modifiedOpts = { + ...opts, + gasLimit, + } + const modifiedArgs = hasOpts ? args.slice(0, args.length - 1) : args + modifiedArgs.push(modifiedOpts) + + const receipt = await promiseTransaction(contractWithSigner[functionName](...modifiedArgs)) if (receipt?.logs) { const events = receipt.logs.reduce((accumulatedLogs, log) => { try { diff --git a/packages/core/src/hooks/usePromiseTransaction.ts b/packages/core/src/hooks/usePromiseTransaction.ts index c530f4729..fcdfdc1d0 100644 --- a/packages/core/src/hooks/usePromiseTransaction.ts +++ b/packages/core/src/hooks/usePromiseTransaction.ts @@ -1,9 +1,26 @@ -import { TransactionResponse } from '@ethersproject/abstract-provider' +import { TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider' import { useCallback, useState } from 'react' import { useNotificationsContext, useTransactionsContext } from '../providers' import { TransactionStatus, TransactionOptions } from '../../src' import { TransactionState } from '../model' -import { errors } from 'ethers' +import { BigNumber, errors, Signer } from 'ethers' + +/** + * @internal + */ +export async function estimateGasLimit( + transactionRequest: TransactionRequest | undefined, + signer: Signer | undefined, + bufferGasLimitPercentage: number +) { + if (!signer || !transactionRequest) { + return undefined + } + const estimatedGas = transactionRequest.gasLimit + ? BigNumber.from(transactionRequest.gasLimit) + : await signer.estimateGas(transactionRequest) + return estimatedGas?.mul(bufferGasLimitPercentage + 100).div(100) +} const isDroppedAndReplaced = (e: any) => e?.code === errors.TRANSACTION_REPLACED && e?.replacement && (e?.reason === 'repriced' || e?.cancelled === false) diff --git a/packages/core/src/hooks/useSendTransaction.test.ts b/packages/core/src/hooks/useSendTransaction.test.ts index 1655f7d25..9c018ca8b 100644 --- a/packages/core/src/hooks/useSendTransaction.test.ts +++ b/packages/core/src/hooks/useSendTransaction.test.ts @@ -45,10 +45,9 @@ describe('useSendTransaction', () => { const { result, waitForCurrent, waitForNextUpdate } = await renderWeb3Hook(useSendTransaction, { mockProvider }) await waitForNextUpdate() - await result.current.sendTransaction({ to: '0x1', value: utils.parseEther('1') }) + await expect(result.current.sendTransaction({ to: '0x1', value: utils.parseEther('1') })).to.be.rejectedWith( + 'invalid address (argument="address", value="0x1", code=INVALID_ARGUMENT, version=address/5.6.0)' + ) await waitForCurrent((val) => val.state !== undefined) - - expect(result.current.state.status).to.eq('Exception') - if (result.current.state.status === 'Exception') expect(result.current.state?.errorMessage).to.eq('invalid address') }) }) diff --git a/packages/core/src/hooks/useSendTransaction.ts b/packages/core/src/hooks/useSendTransaction.ts index f07cc3271..ac2f615e1 100644 --- a/packages/core/src/hooks/useSendTransaction.ts +++ b/packages/core/src/hooks/useSendTransaction.ts @@ -1,7 +1,7 @@ import { TransactionRequest } from '@ethersproject/abstract-provider' -import { TransactionOptions } from '../../src' +import { TransactionOptions, useConfig } from '../../src' import { useEthers } from './useEthers' -import { usePromiseTransaction } from './usePromiseTransaction' +import { estimateGasLimit, usePromiseTransaction } from './usePromiseTransaction' /** * Hook returns an object with three variables: `state`, `resetState`, and `sendTransaction`. @@ -28,11 +28,19 @@ import { usePromiseTransaction } from './usePromiseTransaction' export function useSendTransaction(options?: TransactionOptions) { const { library, chainId } = useEthers() const { promiseTransaction, state, resetState } = usePromiseTransaction(chainId, options) + const { bufferGasLimitPercentage = 0 } = useConfig() const sendTransaction = async (transactionRequest: TransactionRequest) => { const signer = options?.signer || library?.getSigner() if (signer) { - await promiseTransaction(signer.sendTransaction(transactionRequest)) + const gasLimit = await estimateGasLimit(transactionRequest, signer, bufferGasLimitPercentage) + + await promiseTransaction( + signer.sendTransaction({ + ...transactionRequest, + gasLimit, + }) + ) } } diff --git a/packages/docs/docs/02-Guides/03-Transactions/01-Ether Transactions.mdx b/packages/docs/docs/02-Guides/03-Transactions/01-Ether Transactions.mdx index 949b2f24e..7d58b95d8 100644 --- a/packages/docs/docs/02-Guides/03-Transactions/01-Ether Transactions.mdx +++ b/packages/docs/docs/02-Guides/03-Transactions/01-Ether Transactions.mdx @@ -5,6 +5,9 @@ is to use [useSendTransaction](/docs/API%20Reference/Hooks#usesendtransaction) h See [Transaction Status](./03-Transaction%20Status.mdx) for reference on how to monitor the `state` of a transaction. +You can add additional buffer of gas limit by setting `bufferGasLimitPercentage ` in config, see live example below. +It adds 10% of gas limit more to what is estimated by the Ethers library. + **Example** Simply call a hook in a component. diff --git a/packages/docs/src/examples/SendTransaction.tsx b/packages/docs/src/examples/SendTransaction.tsx index e3a8bf755..4487540f9 100644 --- a/packages/docs/src/examples/SendTransaction.tsx +++ b/packages/docs/src/examples/SendTransaction.tsx @@ -8,7 +8,8 @@ const config: Config = { readOnlyChainId: Mainnet.chainId, readOnlyUrls: { [Mainnet.chainId]: getDefaultProvider('mainnet'), - } + }, + bufferGasLimitPercentage: 10, // The percentage by which the transaction may exceed the estimated gas limit. } ReactDOM.render( From 6cf9074097bec32da46cf20197bb75e3f7e004d0 Mon Sep 17 00:00:00 2001 From: Przemyslaw Rzad Date: Wed, 18 May 2022 11:23:58 +0200 Subject: [PATCH 02/59] =?UTF-8?q?=F0=9F=8D=9E=20Correct=20`nativeCurrency`?= =?UTF-8?q?=20in=20network=20params=20(#764)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/helpers/getAddNetworkParams.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/helpers/getAddNetworkParams.ts b/packages/core/src/helpers/getAddNetworkParams.ts index 76fcc11c1..58e6c5f1d 100644 --- a/packages/core/src/helpers/getAddNetworkParams.ts +++ b/packages/core/src/helpers/getAddNetworkParams.ts @@ -1,10 +1,11 @@ import { Chain } from '../constants' // https://docs.metamask.io/guide/rpc-api.html#wallet-addethereumchain +// https://docs.metamask.io/guide/rpc-api.html#unrestricted-methods export const getAddNetworkParams = (chain: Chain) => ({ chainId: `0x${chain.chainId.toString(16)}`, chainName: chain.chainName, rpcUrls: [chain.rpcUrl], blockExplorerUrls: chain.blockExplorerUrl ? [chain.blockExplorerUrl] : undefined, - nativeCurrency: chain.nativeCurrency && [chain.nativeCurrency], + nativeCurrency: chain.nativeCurrency, }) From 44cc5682ac6d87dfdd2b11c490a1e0c8541c1702 Mon Sep 17 00:00:00 2001 From: Przemyslaw Rzad Date: Wed, 18 May 2022 11:36:28 +0200 Subject: [PATCH 03/59] =?UTF-8?q?=F0=9F=91=A8=E2=80=8D=F0=9F=A6=BC=20Do=20?= =?UTF-8?q?not=20deploy=20apps=20on=20the=20release=20PR=20(#765)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 13b039074..c4b48a61c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,8 @@ name: Deploy on: pull_request: + branches-ignore: + - 'changeset-release/*' push: branches: - master From 9a8906e566e0ad40bba1fe082ae1b45f757b39ed Mon Sep 17 00:00:00 2001 From: Przemyslaw Rzad Date: Wed, 18 May 2022 14:15:52 +0200 Subject: [PATCH 04/59] =?UTF-8?q?=F0=9F=90=9B=20Fix=20CoinGecko=20Invalid?= =?UTF-8?q?=20Hook=20Call=20Error=20(#767)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/young-boxes-design.md | 5 +++++ packages/coingecko/package.json | 9 ++++++--- pnpm-lock.yaml | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .changeset/young-boxes-design.md diff --git a/.changeset/young-boxes-design.md b/.changeset/young-boxes-design.md new file mode 100644 index 000000000..fbe85a2e6 --- /dev/null +++ b/.changeset/young-boxes-design.md @@ -0,0 +1,5 @@ +--- +"@usedapp/coingecko": patch +--- + +πŸ› Fix CoinGecko Invalid Hook Call Error diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index 52f566e76..32f3a763c 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -32,14 +32,17 @@ "jsdom-global": "^3.0.2", "mocha": "^8.2.1", "prettier": "^2.1.2", - "typescript": "^4.6.2" + "typescript": "^4.6.2", + "react": "^17.0.1" }, "dependencies": { "@ethersproject/contracts": "^5.6.0", "@ethersproject/providers": "^5.6.2", "@usedapp/core": "workspace:*", - "isomorphic-fetch": "^3.0.0", - "react": "^17.0.1" + "isomorphic-fetch": "^3.0.0" + }, + "peerDependencies": { + "react": "*" }, "scripts": { "build": "yarn run build:esm && yarn run build:cjs", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 80333a5bb..195cac6b1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -49,7 +49,6 @@ importers: '@ethersproject/providers': 5.6.2 '@usedapp/core': link:../core isomorphic-fetch: 3.0.0 - react: 17.0.2 devDependencies: '@swc-node/register': 1.4.2 '@testing-library/react-hooks': 5.1.3_react@17.0.2 @@ -67,6 +66,7 @@ importers: jsdom-global: 3.0.2_jsdom@16.7.0 mocha: 8.4.0 prettier: 2.1.2 + react: 17.0.2 typescript: 4.6.2 packages/core: From fca5f74e252cf89bbcf5ac00e6c7181740e54c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Wed, 18 May 2022 17:27:58 +0200 Subject: [PATCH 05/59] =?UTF-8?q?=F0=9F=93=84=20Fill=20todo=20docs=20files?= =?UTF-8?q?=20(#732)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add handling falsy * Remove todo * Update handling falsy * Add replaced transaction * Add comment to doc * Update packages/docs/docs/02-Guides/02-Reading/03-Handling Falsy.mdx Co-authored-by: Przemyslaw Rzad * Apply suggestions from code review Co-authored-by: Przemyslaw Rzad * Add better example of handling falsy * Add better replaced transactions doc * Update 04-Replaced Transactions.mdx * Apply suggestions from code review Co-authored-by: Przemyslaw Rzad * Update packages/docs/docs/02-Guides/03-Transactions/04-Replaced Transactions.mdx Co-authored-by: Przemyslaw Rzad * Add static image for docs Co-authored-by: mateusz Co-authored-by: Przemyslaw Rzad --- .../02-Guides/02-Reading/03-Handling Falsy.mdx | 16 ++++++++++++++++ .../02-Reading/03-Handling Falsy.mdx.todo | 1 - .../04-Replaced Transactions.mdx | 10 ++++++++++ .../04-Replaced Transactions.mdx.todo | 1 - .../docs/docs/images/replacedTransaction.png | Bin 0 -> 32576 bytes 5 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 packages/docs/docs/02-Guides/02-Reading/03-Handling Falsy.mdx delete mode 100644 packages/docs/docs/02-Guides/02-Reading/03-Handling Falsy.mdx.todo create mode 100644 packages/docs/docs/02-Guides/03-Transactions/04-Replaced Transactions.mdx delete mode 100644 packages/docs/docs/02-Guides/03-Transactions/04-Replaced Transactions.mdx.todo create mode 100644 packages/docs/docs/images/replacedTransaction.png diff --git a/packages/docs/docs/02-Guides/02-Reading/03-Handling Falsy.mdx b/packages/docs/docs/02-Guides/02-Reading/03-Handling Falsy.mdx new file mode 100644 index 000000000..7a96cd73c --- /dev/null +++ b/packages/docs/docs/02-Guides/02-Reading/03-Handling Falsy.mdx @@ -0,0 +1,16 @@ +# Handling Falsy types + +Hooks in `useDapp` support handling "falsy" values in most parameters. + +```tsx +export type Falsy = false | 0 | '' | null | undefined +``` + +If you pass one of these types to a call, it will return `undefined` without making blockchain query. This allows us to conditionally make a call if a parameter is not known ahead of time, without breaking the [Rules of Hooks](https://reactjs.org/docs/hooks-rules.html). + +## Example + +```tsx +const {account} = useEthers() // account is of type "string | undefined" +const balance = useEtherBalance(account) // Will start making queries once account is defined +``` diff --git a/packages/docs/docs/02-Guides/02-Reading/03-Handling Falsy.mdx.todo b/packages/docs/docs/02-Guides/02-Reading/03-Handling Falsy.mdx.todo deleted file mode 100644 index fc7f070e7..000000000 --- a/packages/docs/docs/02-Guides/02-Reading/03-Handling Falsy.mdx.todo +++ /dev/null @@ -1 +0,0 @@ -# Handling Falsy types diff --git a/packages/docs/docs/02-Guides/03-Transactions/04-Replaced Transactions.mdx b/packages/docs/docs/02-Guides/03-Transactions/04-Replaced Transactions.mdx new file mode 100644 index 000000000..97cd7dc80 --- /dev/null +++ b/packages/docs/docs/02-Guides/03-Transactions/04-Replaced Transactions.mdx @@ -0,0 +1,10 @@ +# Replaced Transactions + +If the status is pending you can replace a transaction with increased gas limit to have it mined quicker. To do it just send another transaction with the same nonce as the previous one. The new transaction replaces the previous one. +After replacing a transaction on a wallet, Usedapp will detect this and track the new, replaced transaction. + +![replacedTransaction](../../images/replacedTransaction.png) + +## UseDapp behaviour + +UseDapp supports replaced transactions. It detects replacement and shows `Success` when new transaction will be mined. diff --git a/packages/docs/docs/02-Guides/03-Transactions/04-Replaced Transactions.mdx.todo b/packages/docs/docs/02-Guides/03-Transactions/04-Replaced Transactions.mdx.todo deleted file mode 100644 index 89788f937..000000000 --- a/packages/docs/docs/02-Guides/03-Transactions/04-Replaced Transactions.mdx.todo +++ /dev/null @@ -1 +0,0 @@ -# Replaced Transactions diff --git a/packages/docs/docs/images/replacedTransaction.png b/packages/docs/docs/images/replacedTransaction.png new file mode 100644 index 0000000000000000000000000000000000000000..26dd03811a131201581520110b4e1967f4fbe1aa GIT binary patch literal 32576 zcmd42bx@np*FPAFwiItmaSAOIinO>(u~LdtTuLeKP$XDrDeexzrMMLLq`12T4<6h- z32gd(XMXeUyt{w=c6Mj>kIXZ<&z1AsbMLvI&pGFYs;MXtJ)(XD004*-KgenT09bzk zfCmQzc$gCCeeJ&omaB%sdqBkq?GEM-j-|A+GyqT)O^7nZ#r%Kh^g+)R03iSV?}xQ) z!Qcr1_)ROyN^5x-(`peH!|IQ0wl0*{o8w3~OtiP?pucj(;zEhFsl&^_9?t)!x);&3N( z2k9%RsN~`1=B9jAdOIUpBC@_2IVN&+gaWJ}3Vj z+sOZH^Q~q=XTci0pl2h+8=2uztnTiva6t-~NS%d_sh==pHPVqctgkuOT~n^&hjwj7 z557oN;7T@>Xi5*e@6|$#WE724@%?y^-?skMQG?9^9*&${dy(pVv*9wZnK)?A;e0>= zn9xm}4b=(-k@>`YY;1LD+B~Is6N%$S378l*l?c)d=AQJH?2RTq9}GQ3n22G-`QOlO~d z>Hqz#ZB}N=^6y}-c*{1WiO(k(Cz^)H1f_GsExEM==$DEjjr{t+;z@GC)U&70N`lAh zj{2zd_INuTKfyV`B4w$q3{zXaTD9z2obST7KJ9)An99o*+Q0MqX(i?Dby6+R!)H5Z z%7x8{djiyo#aWpt={#R>yU*^NF5Le6P(p4Q65O91H4N5RC}TMs-Ly06w75h5?KS?qSU_b)`yO0@f5c-Hg$}a z))U116oN1jL9=`zVea(eOdZj|)Qu#SwwvGmG7;-H%-U6P#&?@fz|>A@Dy8gGV)X3E zDuu;RlhoyM{@ofNuvk_3_>W&Es&!efl3w8}l>0zJk_&D)lJ|lIt1qW_ICBxzzf0k# z69P^n(>|oJaR9U*Zw@oH^F!k;RVGvC$GA5TK#5E!Re%pmwh_o52~ zf(cv|#@Y_`BlRKEQ;3vcnQtQHZ>SXzNke&?PkXAHw)&OJxYGuoR)gNA9@3@e(Vuv6 z=K1hfw(IKf+!I&SL8SRm_!9bu`jXY$qFR#a7jvHqP;!&j!Z)xbUCAnxNmMou*{>Po z$BI$q*4{SY;P&Pz*>2kqbODt%)qMX2=Vti|q;2@7A!+C0st>#&v|C9}wFplYjy}m8 zG~$=+^_ErSyT!_z$4`j?GvKGZLCvOrZrQ%$J`oMh&iZhBFTf!2@{UIFx=R0|*-Bm6 zt>IL~V5vbcQkx^s!?UoWfP}Rw9yB@g(uz>0#`>a1dLsYii$rWUHkFg^JyB10y z4+6ZY4t1u#k^Pbes(CDFkb+;cgRc92$UP0`kT_FzY)oT607YMO5X#L8ODHj;XpcA_ zOcKbR2p(6P zm$Wq@2_>J8g-9$LC^HON%DlzzM!E8?t?MCO)Q|z+Jy74#T%Xk8Fncd%6xLfmrYGg| z@w4s5Zw@QMa1z0vz#R3!RWr17DrA<>2glj8WVfCWdi zu9!68Fk$?5&ndgs4R`XEZ!{;faMVs7PnB8H4^!MX@Q5v8xZgdou;^%gLKu2YYF=Rw z~Ck0Ap6o|x7wd$cLiTHMtpeuB&SzgV=-ZO&W?S?5qj+%_Q);^o42EZOE_cy zEX3_7|4`o$r0NiL;P`GiO*V4oq$xCj%Hgt%1I7oKyYQ{qhSlrCK@~#d*`(*RxFTGm zw-Z-%YagAMsh#URBuy{pl)se|OR>hzH<;?`M}z?_w)`dw!y#p|9^?40uD;*$lAnSRB=ypi$hZ*_T3 zZwic=LcruQ9{=u3V~CWHMli-JJE{~WgBWt7-+8yTH}k&2AEh9U#t0ggb($~ zgYvw4vk2s&>C_x~T3nlC6}!@pfzXB%paJ}coq!vin5^E*O|gU`e8zAE0t=IwpDZCD z;GYQOBd)|!rJY@(*l3E|Yf_uin0c_g=eMC`LEHHv=ZqJ9qh~&1AYY8`pZh9ke+X4; z-oekm-DDC9^;!`U-W{_vxD-WV?3Wv#`6aZQw#^En5@}bP@wHt!)@7<#ALb^i> zl7J*hJx_ZWnyQeoj12I)5(^sLYn!&xzxSszlZw6Zh3!2Oa0{tT$ETRI{o%6he4Q%v zM3`14Y(qagXUl#mq(X@4{o5&^e-a~t{Oilt`HY5yPbR2f^Kp0j*&JK^(m-mNH+mGc z@z_@KeCp91TkgnpBG7NVcGl7-m0HHmbse^8OFJb``S~OKP$5(%`^SQWs z4KwqIun1y$=5tvH*rEoxlh<{n01xtoC0w>Be*CGDVP8ER*c5oiFG*4V5J2Pve;A!< z%XVm%7yPYfGk%aQ8D@2L(`0G@7{fVI(ht2qR_r?PL@?1?hJvan{AJfpdpBbSnUj^c zvJ6$a@6EWl5LgcYfS2)&8Tc4n7h^~2k3n~@a2NpqtA|*a68-mp2LS)1jn`v6!}_KF z(B96$qN`WGdNvOrO|bJRHWv9RAAfGo^(vEpqX;71H65#u0>J18x!Ix-k<&Z1dIDG@ z{5OVw{r~8?gYmh)(DmK*!`r*rha!G!I2mOXIbblgh--ni1guCM&s<<6-$J>jtDLRQ zZahL?ptsM?U$^76n*VbVw-PWhy~O+Ak|+%e3o|M^&aV2ITE%DPp}mpR{7KLom#uT_ zk_usE)^1d)hcVA*RoD|pa+gEgm( zyYf`cs<89v6JH&-U&MYoatE>mTjmXvb+TkB0Me&IL=PAT8haYd6^iX<_F*leZUZ~d zov+{d5kZrZ+Xv^X+qAf70J->B1f;LL2jA?hL^35x9{_%>Rt#;D zd!W~6eOc29eN(k}WauvwOW(WeGNzyScdfo%qt+|4^>Z+!*r2v-eGemEc$<$+{I|yg z?t4X{x3T5uC*+etY?+ zH}GPh>f{MUxpil7@Ah`iI^S{Jp-n&Fq&Gk#idI}+yv1EZbFI*RFG3CkN>aa{pAaN=>E~^U1741YL+potyQ&-if=zdfz8rUa=j|Na?nEG zd0q3XjGziNyR!gVQ(12-u;5t!`c56+m`Ex-tDVvpHpXKx{6I-s}k!rs^S%P zu6SA052L6DF3dIXOs*7PALw&Bx(B;>#8xh_jM7LJ8h>26{1%#a-}N;Ub#Pf}eJ*$Z zQ7<(%%jq#G8@#=9suiedGdW<@V;gb=z0a(-Uyz@kp00I2&~HAUP-1)Y2BnmBqIg<3 znjWhYWj$Tp1f~|B4SHeZ%<$zC_VIety-Y8q50^kXhi#{6RHVWuVvkPK%gBFoFtX$f zrVhWqp!KOrCni<$9`HHc_zrpcAqi=r;@OeqSB!D_ozVGz&XRk?9ajb%a|&3*g^z3KiPvW z4uGKVDHdJ1$OlUv8*GOj-9NXhFfYz{csQI_U}mB){2G3>Jq-OVO`9-8K()0Adh=U} zk|SHs!z+4slImUq`@Temug+@x=V9|6*A4f&pEPmDhhveGW;soL`_5NcVdXly=PYeH zFADSdfKv2)L$C>*a{#CAF%5Njfqz2^?n+A?!^DE5$UbmEP3@j2(PXdg6Xe9Z=lu=5 zOP)Dw!ib4fpc2J?U@Hrhq*V@>@^un%KFvod=2`76w~3;W(EAoISw7dTPxH0b@m^Yj z#;kYc?N%SN>>JaUktSpy*s`2QMop@=U+kg5F(Wm)Q_PLweW)IQYxH%2xKXLNqtBY1 z?}=?&Qoo?z==Ph!N^OT{G^4-yZgX>{j?$>kbt+i`!>+bp)Xb?ZKd{x6=PkLvRFkrw zm^tqg^f+UNEw&cu9la7bH#v2IyK?m2OW53KUh7_qdwr6)SJS5@>m3Y@pFX`pb+qS+ z2zPa~RlTWf)wmnH+k@V{*`H+g%(xDA&ttQ%Uk$6Y+7y({gTlSoi2dTMM22$QmcZVkyk&^}EJU)(I4|k`dBX=zuOUzRr6(89 zY5VI~m?H~Z(bev%o|ZG~LfxP%c4WugtC z{wI!%w0_a{&~S@lL=!OgYDn=e@)O>+nQXl|ssQ#FtQGCoJIrf&oqRT6lq>R1(OxQG zn=4Zwkw#vA(s2VRCX=`B{j@Sc+qGH#F2!ER?<@`8H%Y_PG?ykJEOn1jlW5t$ueGts zrSadXCaOfAJ)ZX&F*+ZWlLh*az9GJoaHH$Ocoo2N2KE#_X>uO+lvrkgg!q$YwFe`5 zyTIirugQq4+fGHi?I$N~27^xa>tvpeTOX-!!)_$4$1Y;Cxm5o9#D}3 zPYEXGq8X!B{I~_)sy{y>r%7Qu3LXvVxB(dbCFxRMFbkIrxtlOn`}`dJT9u>Sn=0Ut zjAm8%V%wvZo7IDFiAf;Ie=NvL*tH;uIuJOWI4}@&|D7z0W%cZ4DsSZ)wh3IyWfQMA z&AW%d#|R_rN5w+WCI;n-v_2AouDp?%UdiPPNbtB+FYucY4nj zyheHj{YIip_V^j#*W!5}pX>@A&_u^vbsESnS@RBG*HFFQtW^-G^t=FXs%O6L+VrlU zdq4F`XNclEmHdkQ{LyS>+L`CuN*cTx+0QA$oxWazi%v4Kf>&&$VnRVk{Jn3Y!;Jb9 zrZfV#N67K9@G{O6`TIR9CU2b{i1^oVdgbJKVhK(gB*)U>BFXG#DDWqj44%Wr>U2vf zI^(p+fZL5Sm)!zuw&b&@jSoxb*-W1w-|Is`a)n>UXD5+a>%dPa{mPr`o+B#dO_Q=G zf#9?!ta|n*Fca=5oSS~REcr#ghsDvVVv?@%TAw?{pdip_452#>&$p0i%D!uI>(xvO zPYm*Dau`pzUHG#LMPScl-6AI=B%Er){9lLf!i&}!IwBgjAqf53y`kZ$(d8}22G#QvxgbmlT7XYMlp{%UJBU+RJ%WP?t~(Bj3|r&@*PX? zUQ;UuQcX(Z!l9njUG?wzC;_`mc$%+ueVSNzuN`=Qak|E2Y_#Y{pk3(0`p3e6USsT6 z^Yy(|xPvncA0kq4ztj+p=1g!EZj>{%fcGtl>xyk;jjp~?HMHqXoqs!K*71u%yu&aY zuxDzk-I*^&o!w#=tIsM|yGl%kXBkhe&bga1?%(xpbGgcY;I=g>onKm%fmOHw~9gp~T{vaNpqmK#X$yS8qQloHcLFee98l@zgDXJ?Se{kUWSt zAhYJGx0Ec^1*Z_f({4|dNgki zhMr1L-qGAIYUh_%#X98(R?u@Z^c7zYa?JGuZ=$@wX&OVo(Gbh!n{m_m$?n+~ZNODK z>UdB_EBtLwNadAh!nC-tulIxK`6q#CvP36TRBF5YJv9%at7|<%XmW)5pXnO5@EO~> zaIUAfSS5M?O7=1_V_Vz499iZwV~G}9zgmlQCoiYnHLUP~PZ-dG!a+vY1asami_$GO z$NsvF>308+`F=ZO4P>jeN_}UBSFT_8aT)QZ<2ccDD1NQ84({PkEok$pi7pTJD`jHg zZSdq1X97{TA7)=tGpdMUpr}%q?t^-e84_$dJu6mE2jh9r;7ly;Mvc9W;m@Og>}z@? z{1u!RU}+|27J|rXyS=r#teDnh+@O?uCZEyY=OyJSA699fc6 zRf_oY@2ctRUicFnZ}wd3&}K_4wG^=t)p(wK^*S3C-1H?Dmw3v=%Bmm{)iq<}U99P# zU^6Gy%(`QSK^ITY;MlF`GK1;1*>HsS4~Wng8yl5D6O)i2C~A}Y)PxwSz~EbJyxP0h zvG?TQ*bD=BGP=)Uj9gZ}FMI{=8SCK7na$eTx#jWzUY55;89#4@Hw)0j_rs; zV)2&GSNvKi(f!QC7gC-AkCBFFHH9?$f?lCvZqaHKCmw(<>U(O`Njz(@+h8Ae%VRe z#O0I2A{_({3}PnQtMqaX{f$nO`Lk5Gq$ugkaXX`Dr!Q8Yg#)xUa`G0bO{z<8fd(9N8kH zu+iK_U2pn9;T;|B?&U^r^q2w7a(2z-H}wXM^^iots0(ZroVI4MEM7h*8D0=vrom=@ zsSfNw@AO98ubYqmDdQb+7(mRkh~0+yJ##m+q-d?J44o{|TjPI_c||?@-2wJ@8m}1w zn|N5LyCZvngstKwRjtH)2!!6}J#oMmQJ=4^S2dZ@tsJ3^P9htka(4lIcs)+Rce4o6 zRKoobu{8{yIEgRZK90?ss&`Z3=a;~+FSYnGj)A@Ba6ewmtZ}VP;BN~+7NBE$(Cd&O z)S%H+uKhI)_vm2dD(sX85GS47YA52l_4t6(@tRxmS2zZ6#=}L){z({OOHq`poaMs^ z!Ucl};z5M_Et)-}Ikk=xQC{`iik-IjlhM2txp&DXoERTTo{{%pk$Rr|RC#>wE4SPb zTR&RArIw9Sw$R{zEO4k22RoahB9%_kIZg!Op8rf;f-M8Tb-z@IG0lkL^BMLB)^||y z$NnlpDV}NrBjV<#^XWcO#xf^7o_eBkMDfXy$Jim6@=qZFyIcUiC((WT3#Dl&x69!L z_x|IOQS-@bew4m39(SqZsDm@z!NZut%l$VB6tAVq(nUUVswN6)xh3%M(r6Ao8!if* zodFB<=W?7hl9@F9PLlnbkpxBbN?L#4@A?nr2ilLi+w1p_g>Nbz0-E15FiNE#SAKB% zlOY7uSS%^t`W{&}_YRUyeLu!^Kf~x4PMc8G_=g{G{Q`hRzMbX>$*T@Z2cHHPGnZ3GkQn>ebNhO07avGPp<~x+yJTSk5&Me8deyJ)MqCUs(NR9 zgTw`V(0)iHb$GUJq544*)pmMC2#6^or}h_H!L5UycfsG_@nK2vC~Y&Q>~N3d_g}$_ z>7|?7uLxsG1SV0GlDXpL_+yO*+=aBl<#F1rCzSdg`GiJp_g2)5g~c};zPSPc4%r5k zL)y_PXTac^iu``ql_tsB8#cUl06>a-{*Q8yHjHrS*evmUiHx`@{PT6_+%ueqf|}h} zB^n;_Wd9UI>w_;;->hcByOZ*`duFOFORsa`(-cx=Zh#lqc%@4W-&*1Uv=Hl@%{e|S zLC^hL7=H`m1olZkx7BzV@MGZVf^qJQ<+#5g|Bu^o0P-Y*T0rMy#o{yTlh1)Cx`hy`8d-&8_Fl~SXlUT5Fv1ABtGnJS2Mie zIkRR(DOe0#NIRI{t@2F%3rrmsP+9AvTvS9eK-f{#%hNh=?mCaL{ zpaQrc+ddaX4)WKr1T~@O@vDe%Sbe@P14yoPP=BHu5ki7SYUtOrD+n`bIiO!iIxdg= zrstgIf!yF92>JYSw-b?W3makL*Atc(h1unH9w0T$8NDh8%`2+nl-_;e}k4PUqxCH(UcNS>e}5R&!{>`&xQds~RM4b!BDUol38JdErIy{KQ}XQI5tBP!qt1glAKE zeX|U;?CZWS@fU~BW$NJDZeIz@xgBj5xG!GWHgsbk3#DkZ+N78(yx(2(q_?Gr9r}^zOygLm$^e(e-HVg+}v*!zr5wiPJkZc!S{d9EQkpM}yN?qVub0_UVAW$Bo9V zh-0o=%Nv7QrgY6EcaZFvU=i|#o$g)l9N~C56N*0_J*d%Uik%}*+$K_L?4;_=V$+(fA|5QOS)UIR_U8jn){`8_HeD-ep-=l zZy)%bZ?Klf6NahMAKX5g*cK%-Ttt-*$Yj`_`eSoZN!iN|+b@Tk&a}SoYjepb`1AHB zTag|0m?j5fgcQ9KI&msdRu_V%#~n7%(>2Vi007qdp4VA3?64Jq4Pnc%b+tDxT-rGZ zks^k-`hhEC^L4^ib$_Qyu(pg<8p24lc1oP zR#?^zVJS)N9Z%pmufza33AOw(VA@;0AiOZWDMf{ZYbeyTA4Yd%2|kDM3>oxE^8sR- zJptinqE|;Io61BSwU?!YyH*z(E-u);AF_`A?Va#U-^m2GwWj@oH#` z`Y(^pl!!=4^`)IW&(u|8Aie2Pxk5ON^xR>VJSzUPk?Nz-5FeuX{81QA+(r&Eq@z2g@m z`vf}~F`DvWDt%Y%YR+U$Nx3(O{*mb$eHvoLZC`xF@Bp9&vN$VTPZxKSOA(-BCMxm! z9w=t@ERoQIK)(>!1lFfutiyi$(WRnQ4|h_*Gz)(nX;qxkfUysX-wxKWE1=RB;>}zy zUjDp(Ago(}HCzP%T;vjO8!?M-_8(o)rp4s-=skZ?1XjH%7;$#swffefP*xgUWJ3ge zxJd36&c%9Xa(~N%X1wnQkRp|b6p*)y;w@IW9A^C!B(}jsZSTb+xFx7p1U8R>hUI_# z0u!7nan6il-cS_5;@$WI7cQ6gsF`+rLu0}PE0{$BcB!QdBI`xpKO1O)*4*>kXjFsI+`>0qTg;V0hz z(?OLv*+BB|fV)E_2iE%ba^aYUtsg~0749T%yf-mIFzUTJm-UJgYhL|#} zH3cOMAQ9vN@bd8dS0$%CRvUlJm~>PBfhv*I<|`UjnE$N**E0N9RE90DF+aaPJ6lQ| zhr6z>PD@=~x>VveBrH6v=-%<$Gzz z|H?}xLqx8o+Xe22w5R$Ni$T8;x((fY=s?P{0!)h32QIcb9Ix|j_1k{co_^3=)*WB; z>Dk#PI%w^$H-^nwul~ff3H!mFK9BKoP>Z^AT!>RD+|5*Ksm5ACU<%zQmg6G_DPixZP&Hz^vdnxdGfSiq4^S zx3%lmi!bNZXiLrzqaNo=b&l}NyY%ab3Zp1b_^L3@^4VI&sHeutmx6AN5d3+Lj zElrF(RQZMg6+)il&2CDQ?^BQV0`Obx=4%zj$)`71l($D(4qb5cjYQn{KU^((bJtl< z$}7K^Z*naZ^TjNyIE9b6j3l0H+}t|R=|ZSR>sm_|G3T@kb2! zTgRmp8qtqSwaYvFp9B0~#_?e3YHQ2an2?CC#iz+P3D-(QX?-3~;xw3I?tCf})TjR? zzp?l{PKhgLYdEcxO}543AdYns8zANKAr*i+aO|Yn)_`NZgA9DUJ#0CeV$Nf$QHZAB zRp0Q`vPtGLnqtmnC;NlEI?{>8eBrnT69DM1q^Ri0FIvGigIJWRz@nG*GZg2+gVx$i ze-sa+jV2!M@5d+rU$*bTzd>#R8xV2&74nA;?3;`czr61R>=!h&wUfM_2>X@$GCr0e zA_Xu4U-|-?M{fvq_(q9v0RHFkQ&`(>BPNZxZVs4Dn_rku{Pzn275Ii4frshT>*GA& z@xRy9UjKPrng952xk1AW@L!S3|0>E;h!WU-g43|Z|8H+PeH;LAP#eAkty!(vQ%on^ zva$0dxh`}CapD626RH|`jDmVD_jLG___I%wO)4@Us%9;>?U3A~;pf4Us0Krod;|_= z>|3RI>Xp1`F?J+Y6We*QwQ9fA`WM1Lgzxog@Xj>M__u`RRZd}+A9xvv$S6YVVhl)r zbpB(ho}8TBpN1X}_W2--ZUQm-Dt81R8!zFcZqjjsEy)LyT$h zQ>5`Xv_(!=(kCgWK+y+|J5i#3>}m4CEBojGm?3YNvG2vxIl}=M;pWOZm>KE-CK$IO zF2KS}UTiH^Uq$2EBPyo|)yV4`D4It6cH2z*e#QF;t^8}Fa>MLQxCZKYioR0MlJMQ| z#f;XFPb}4=oN@_)MoZq!st>OFNz}Motx5ArLQdo_UW*<2b(C}l7dJQSV>Ap+0zK%j z&@5EhrN@Mn^(XKd1x@dEV@+`R%)w}%!#&@v&CUKB=ILf-nqHFGQ%7u}O85 ziDFD*i2^3xZN*06AA!Vf3Y{c0x%mA;$H#iH@tu+9xZG4x>^(CZ7gqtlEhZswb)m`( zpY#4$=A!TIw?5K;R>%v(F+-Cyu=**Q40{%shld@TTv!`g->?SAI%u;cFZ5u#_X@$Po7*m|o7hEDCc=QUaPw7wt!KruhG=r0FlA~=EQukQLC^yUmP zX>y0M{FgrprlzkrK(F9SW}i^72!S=RF!q|%-*n9ts|gs71ayv<>Tow7TrL!wK>ZS8 zV{-~Ho2yz1An%V4)zZ=$D~XnfE0j-2N*eH!?%@}cXh-LUbLHlA2KBq5NqsQq5aEB) z7I?5pWhnkR0RFcK`~OF^U+DlGJfjPsCl7D_o&5f~(iqzYs7+8e)X*?cQ_H4j`OwXJ z-m^ec^ilk!jWS~SJ1^1TXA&bHhBmpg8G7|-UCQR&yK#&=?on?LF7Hm~(k_;*xPQ-* zm+)p$FxG>a*rL5-QER)Gj*l?8#ITod!jmcuQ*p5RhBF7RO7K;FVAZ5QF(8eOVO`cCFsC*If<^<*bFE2tM06L0Iw6vu2#^<2#+1(BB%pM#J?d zAl&Zi)2l|cH?kh=yUQIZ3>eAu*LxzZ5fw(EhuCHLM?wa&&xLIqu;nK|Tb^XFpMLIR z>#&&bsC!#k@bTUK#;Q?Q26L^g>+g5NO8;n8TUN_VlI!L$pM#pMvm>|t+?P*gH1*C0 zQ>7NO(LKwcS8h+QO5A+{eux49Y%Icf?fc8}^+U0Eh9FjD2>h7{O?`jCsDSwB$zdVQ z*aAVGOgr{i1F*sFc7J}MrJtt|t~Vu*GI0BA7(~@VL z5#Lew)dQPf7`==q;3#L$@$JuuTAwOoe>=;Qo+gkCt7XBYl#^y|Y-4|GN}enii}{VA zogW3l!>Cv1f7d=x4#&L3?x*k@y=o&PoEh*9V}$fx z2>@>L&nYdvOzwFLGs+dU)S?42UA{z-6OkDU(?z~IoU7Nn+p~xwx1St0lozN&3~a|P z)wb8L*kFnfl8%^FtnvOU_S-9$W~og1KR>oO{{)j~F*+KScRylAwjTbitzel1H(&8~ zhF4NEcU*KgpoWXExdiYQ_wPaqM3+bXfOT9`FcH>wX+cI`retAl_6AWKPdn_#!O6t>6`MKn!A7lAf;xx{_oWGa`KF%M%cSv=eTLcq?ox}mWSy2M zJWoS;&a3pZoi&Vi;tY==Lu)dn)n_4QMHxe!V|<2`a$faTN~bikot3)hfD$n*ARB9l z`in-?16%+gq;BJp6r_mX24nX~@r(YYI%%t9mavqR%l%88%KUH4=YPggkqV&j^hGqLs`JQAy-^-PyS{%M@#RcAjByF z55Aa1zhj~@SwNf5wp%O}X?=)E?i`-mHBCb551NsTT0gPon{<}+Rn*ZQ!CH6Gx zrK&RX?Y?T-b{LVYrul4fXcRze@`*60Nx`ZomCD}=qep+QrVUnf@z$0F-)1@Ic~Xme z%7cH(Py?YwCl>c7`TX>nz%e5KipBu;R@d1*vYUlPpOh7!{`+oHSD)EGY?X8SnI4OPm(z%Ls5KcN$UqjLVvuX+)Z0micNmS?Y@!Q ze^sU063buboh0U73Uz?IWdGA#s_hu)Ya}VAtmzna-@iZZk7){M7boa3V;l+!h(c^C z9%y2#da6EcB!7&VNnD+unB`gi|3oAIH~PC4emOP)seW`yC-ebMSCWfK&>O(yk6j+j zt2wyi?=8T4zfFWrI7Wr4-9gD)_Yi$>Pl)m!a#!{O8BOQ-_I1*N|W_=~Byx-?SHR zlZ2-3sw@JYdgVAp9-}(2rkX!1@xP+7&(|Xv$s@lA*^CB%ijLk;$NrB{qEwc=qZd0S8>SBg|+i2_IUfp{D&Sg^9ihk8M4 z#THvRyFpMwD&VG~4thd}Xya%Y&2eO?J%}GfOy;kujy<}F0p4YpLMjb}kSpE|kp#lg z`SqLPGpDUr4R=>ci+4gqw*H16K9{e}@!NoNu4QV}%5oL9M6$x8SM~~?R=t4QImoug zIvUErd)QFVVYiE`$?;1+D(JmZQLre?J&X8f_{8{6gC}K}UuWHC=t`L@6->q}HK`a$ z#b;)Ge4;f2X?LDHhxIP(~XV%gd z6JcuA{_(+>VXM^*S6axE>X7v7X&dc=-z$5x_7YJbZ0V`rknK{Zx5*!+T);*iR+Y>~ zM(%+&Y+OkQ&xBukiQ?!TJv!rIjYmt}3%K)VA1MCe*_q9Z-EwU)O0dSc;GfJ0*sHv1 ze%r{uRj?tvsO)!4J_BKbcqDJgTnM}G-h!qG*frum_3+3MIjpG-=uCc#3H$Op%)HjA z4ZNYj11oy>O!WzP2 ziaLUkgqknJ%Zx3ddV^mYOq2r-@IC9VypZnv2X%VqDoxF*-qva3PRzEtQRW79k_*j) z)CIP{uS+JI4$&dYf(a|gm3ET(f;kC>-sawuF9Q1K+t^}9SQoE;>zuLvipFpCoNM!t z^!?+)f53f3-2A0dskWM@QbdE;=q#qFPW&6m+rqe4^2+uRb}Vi@NvSe7ht!4+tWB-e z=pRRV_1{H?<9>+D)@8-%Ael;K@8I<3Cd6T z{s}VvY(&B%WQaf0SwZ!+E%_ec^Rx}Bk9!7V(A}GE@s0`bSrF^YY@W6va*%eYEV3VT^YCB6wa^!7BWuD-fDsioyICN_Sg>nV7hB({+fAn zhd4Ovv%s~zb=9)_bh%y+T-Y0d>si1$j_Q?FoTC!itYw>X4)S^ghb=O})8ef3H*=-l z4cW|+zyvEEcIqL1XymzhjDBh%X`Q4tpD{nMq&F!HT`ivq?_aEA-$RVYD|I#K2&r6% z23bbyU68epw}dypG1tthnO^$55Ri26!5BVv^{9uwtTWT=J)LeiqgGwc7fv0E*&FwR zn0vem9p7K~kd*``tiDys*&x;MtdNer-p}WKd3SWY-WN$o>o@{@OVD51=Ki)bkA~q& zuuLU*!C*Gx3(3AW=@Ehekm-mc{?+8Jgms%`?={~qf|<`jF`PyDu&&nKiooQZOjS=% zn2r;yo50=mZFJVPLy)LK!@vdM3@dqVWnRHnZ8KsDVsEfJok!y~a<%*;nD-0I3%sa! zU*M~n!ZF_(SV?G3Uo2JBq&4Q%n^7 zdo;Jk?w9j$oMzbLj8?nS%T3mS%g3&wC&3w#DUm!5bVGAj?~J_k_}iXFLrm>;x?Rzm zCho6fk1-P^ZKsSS#y)80n#sQ|=XKp`*X)cZnJME@1T4dPwkiMwpBdOM zlv)M8&f4ub&^q7|b<$YK*BZxXAv(UVMI0auLo9E}R zv1dM$@|P+M5iOKLyLu%5^g))n!;WMlf7J}qDAgDqS)++~d&q}D?{QmdNIFo9CT((o zCH81qUy>~sxdV||EOksuw;MOlg|CsAE`R+ahQxl-NAGrPqUN(`1nmdZc=5Z1z@HBS zjO_x<*^{UOtfmZi2K10;g34ZOelzZ4UdWeql8@d2z z1KE3$p&mUO9pRA0OphC_uh6=yMQVp};l%Ur%EFclcWb!e%Dt61tn{8Ldib)|_R^#kkji42652 znh|TlS-sMXinb=kDAd8#5BohMZ+zu2sm%rJv}PKO-}aCiZ(+i=^3*P+mwVLOpirJ` zX`KVj3;UUAO3J=^-l6~ynkjj590-P0lKPfg#O48GX%M$OOv|WhBWm^220uguv*Ne;c3-U%Wh@7@!NO?jr7P!-ijv@2l z16!s`^Oe?>R^%8L9Dft&l{>u+SuW-JYE(8! z^mF>o(085oeY@)BKtcK+FiUrXnXUWg!8fpXDp?zMiUtb+c#I9>`bNri#lQyiItX|z z5bO1aKXG2Pu!(eL4sxK|@SfTnuQ~4?ldXL$crm|KbNeE-4a7~*+dSXVZ)W7mMYGCa zEZ%9-a;fM0-MuwR>_acX`%1r#<8OmG3vqk?JibKp>Z>Twb z*1jJ?NVw*IW%gw&*d*a1@S?^Wq!R6Ck8dAHeV1;MP{nqK#b9CLbX^&3x7<97pXCX= zGhE2iQF|CQK60r(R?l*0ddc$K8!pCx!sYV~x`L3tF2-*^j`Xl;W!@nBsSSVh7jxEOoJs3A2j%uKA`q^GYu(9k;#NOsDT8oE)Mrc}g5G zcbH8^m*JFuRH6W`^f;b^|32J}5JIA&!={d%P$yx_>ab?<7V%n@OZTEOR5oN`bBTZa z1;ut0qa%aQQWqY(joOccH4EM>;gUE6uR<_5XpF8Q_~go~eDC0Htm-}B(Lo+)W2KDC?B5S zEWWYE^Hee19|656nBUUK#o3hNF1;_P1gheb``t9>w#PGd#!97vj=Dk5*0Z({O>Wt< zt?D`!$*-?voWyypcuh=?*8k)O*XFH%O{s~7U(h+u%Rdjk@Ol*o6c5FgSSZFMaTOJ2 zbLtsJmD`6H=-FYfsnvvwplIXj8=n>0#9R<_eR$-fvK&Y2)mlNQjqQ)26BD7dA6D#$ z-6JdrYe;b7v<}sNF-VDLQW3Gi1YtFM!u zb)N@G%%V^2bt>C;c)*%~M;>^q+As426)Yfj+fdu=4f6@9B`6x51@mi9yP6 zX^(fvO|s{&M1tyr26V)TCP~{h@!`u|F|jY1XI^)N>eEq-dn+ir#o^Ey5nNyu+Rn_RDN?Wf`u*cz9}B^?9r(I-h2;qb`{79 zgDNSLlx_CtJc0o}Q!v7QIv^vATk`W#Ecoag4(>C{cbr(!v#yBQSO@Am0wU4opGl%W z9q5MVYr#PmAih=$Sl;BeDNou9cwV73wbA}l8-dn!h$qGPq*<5kK7S*rPnP(r`x)dW zTv5x*vknED9M8}yIh^-x>zXMO*&@qT&MW`&Zl*XG#SsZLe|AAOx_}+kdDQzkdJItk zEF(?M;Sb$*IlIBAMqurX;2L!wP0vMV!HHNJxmS>^$A1;P(P2H+Tc2+09&)u@m}$Az zcGrn|+?IqDL;OwCs;EFUFKdJ>>S^v}!C`goN$#bS$k9^yVR@En*TuE7Br!2#@Me@O<5GgHFQk#WMH&eU*;J;)1-X0Nezz70}=AKakj47%60xM{RsQL8jEt2 z=&3@~p9c+APAknlnji62!jvbs6SbL8w4!2l0dT?o8IB&oidSJU+Ik&^PZnR=D!`&7 zW2YJwXteFM^km8Z(cM>v#r17j7J&p396|_ALXhC@?gR^Ng#@Rt;O_1uBuL@z?j8tU zxVxsP;O;g>e*OCO>z?lEufLg|`G)_vb?>=VSI${`uf5koc2aT4#Sk!0Y}%o+{CLyQ zL+Bk#5a8QoJ;!Z|xbLZ$mwt`Tn z%IV(eLAP`@54;h`>RHIfJBL)n1_3xcrFH1oI`W*xqY3bdw1c z$7U<{W`;aIPYjW4eb&pZ7d@-dzrDsNarJbQ>g7!4-qSmqnx#$9y2We(DI^l{WUVn!-S-h+SF7iP+>3lhJiH!xltGf6Ia;A3ha7@9Q8zy$cX%`31C3MhTdz5uLnG6BKF@d5_)! z!zF~Bg=r`D`VtsYB@#f^aR`9T@luJyBwVyDn8WYwWnkl_mpgqbu_R7KE43L>%ema^*v z|1-O8UpM7emx+?==H0s_kZR7u!76yfdikeEv8=og@T>bX*qWP5t4&?tw0wF1BJ<{LBpthq&tbJ(0zD)?AR zp332e94oqiKMmviLI&CzA9up_c_rZ=@S-DLUbiB!dinjkpk(3fzIvyprRHZS@}idr z0CPkHni0PU<5)P+lYc3N?_tX6z-@QXBsejKiC16&|C0Z~zj;r} z>Z<;B`m zC)MG!61aP{TpI~!1M!zWVLue^MMd^e zz{bV>1npUj@wJmBdx4dU;qXjTP(kjTPowU=VL(h9Fgu>Yr>yS`SL#^f<*pFhFAdfN z%W%W{j9N-1zLy;QgwXcB8WVws7aj;vEDvRine37+F|~|f_^l9j|I!ZB6UJ{!zIuj% zgYfB|woyeZDdrd%zu^g0Ncb~YA1tRL9x{}d>2s-e4|0Fg-Xn9*`sAUg$$hY)@bfgG z%{kh6obW=%nfn6d->&^Wl)x6 zp*KCJ@#XA_(H;NP3>7GNWY*hbMDl)^EGnZn;MSlFd$>;9s{4a>1J#j`*f;veXNARx zT`@k4P+J#KF{NwA)K;}Un@eq(3a{zeOrP&NLN=C3VVvqP=cc2LnlB|0x23{o*>#>O z?boE(J0T9K^|1lw>nLzy9SfD8Rs~6&AVjl*P#a6n>#M}ZRl=g0b+nXoxGz0eQ_5jS z8QZfujH(dJYfGy#^3Jd|?fFK+>J;V@7=d_eh5RV=;|=TN&|N@d7@Vf@J^i}yUOb8> zr0FS=BnH$)*`?J{c?gV6pP)#=tRREM=b^Cz^!5%-ZFk3xig;Y`&<`lrl%*u~%4`z(b6@U06Kz4xwku_#Ltl=#O(t@GgQuCB zKoWwq@6WFg=?0;Mu+gVN`ikdI%hqPNzlUCMi7B?_TM9?cX(XkuB$r`#5NcMhXKY;H zU6@!8(d~9%z%PJBo^Ma&0Cp|KO$K(gqI@dt5BX4_rShHj6-D=HxCuLi7b=3zTv(AR zinVF)7AtdKVAqjM1+~ClcRClWJv)gURn1pS+&RgyCOvUPdAOeJe%-wd)K6FPpeM$z z+ET@Tq;Ya`V>PV4Xvkx)b>0D|ubj$6sE)q{|Cqq+)Got!3wl{i#*jkS(XeS(QjD+n zU@|#WOMG$7JM&YgfUbjEuegjgj_k7&LG8YbH|6U;wS-UGQ852kQ^&tEqx`?K`A-o_ z#0%7^pO@DLP>>V+7dbkfjY1|{FM0lH8m)xiApn-GDd2HJ_{T<&e}~=re{?fi1)Oi9 z$*I0N-zDTgCl6CA$)SeXsA2-hf&WaLe)7Z<(vjwB%_Bu(`}JH~z=$4R3{u&P!0o38 zZT`bT$qkwzeyopT-|28u%_6P5Rf^j>`qEO1BnVSyx1*IOEFjh7*VEvR)+5xtGp7(z9{(Fk&vuCtaWIGUz~UglEUfoys2U#nR3Dm+xt7oq0&`v_k5r{lC%^tH?b&| z0z4E^P-Hv{BY0sxUahi48ME-N(Uu_tb!p9vk9Q?r`Vmr-=4ec95X>=3IX+l4v@+5R(5hL--Z+Nz7r0Q>fy$Zkk zbYFn2nnRToX%bGj*p>OMJg=V|uj2zA#C*-2qd(WUOv#8IOw&1@sEVwV&H5jZS0F8& za^)N1g|@zr(wN0FbGFm0vwIp729=QsLx9@WnT7gdi}Il=lEi~t>*7d{=sS{?lKFJ& zB@^_CTK>xYa&LzFsNY^buQRKiHDEXXVgpDS?QSYdyF?SeK!TD?u-pY4M0q%n{uXja@@TsJ}LG{f+9hU>J|zY=+; zB0ufpo#tBj zR;X+(A@O@#%hp?d)^~uypGB2wmj!acA48SWohI)W8!S|U!8|lQV+ zG&OW;E~ae?_PC=0NmmGYM`^%c`2jPdIOR+Wdd!2-s~`Pqa^p}GinCvnQ-)zFXA4u~ z9lu9YF^`w3HqWVTzx@)YRw17&lgd4tH?jU=qp>O%BHnkjg>k;ATub_v7=J*iV2f6I zkI8q;-ehn0UlSZ?_8E*A$NBE)ywA_tR^t~DG}}_^3Y#6BnR*jaCtCBHG`M^`JPdSP zXO=gyUkQUY{sXE4rD0J-^(C`ro-bpG<;$X<81wTP6W{-0Dn8zpJUE7D)C%!Xb?76; zQBab+F^;Cyl`OV?V@kGIWw@Z{q!`Npboh;N7JGF=V!iFT(lo0*Jh`_P`s`WbQ^pwE ze$_4MeZb(3MC+99wR3a3HLxN?TX*+UqjiD<`?q!mQt~q>>|}pZ%A}~Sr?dF(%KV5; z<+tDn-N3Jp-qc4U-jzTj(SS=#UX3qaLI>uA#N!c7$L)1~mZlECcjYm^Tel5`mdG{t zV#NBkZCFHUF2jD$eZw_v&uN|eZW%SP2#Ngd)$#3@d`1xafY&f8?$aaeYJ$#cl0}Z) ziY74x4WkO z6FASbKH=A#=XZuDz*XL~AdXR+^pA;6^@nP0l(g%bbfnhwXw^@#E{@wgepYy#quahN!vakrsKd{`;G=-8(OYonI)-FcDvu z2{YFN9j*fry0unL4*1(>&(;ye2Gr0s$ciml{@oT$Twlt!Fu<@FZ4*VR7A%*+2aI?s z{Twk$Hoad3i`#Y3XK!W?D5RL0vp;r`f4$SN>GCP_1-)J#2RP0$q{n)ikaW+Yy(@|3 zdV<)|DC*Vs1QS$moVEa|_E&Kft)<>{m3xY3w$&~zg=Mwd3yvseK_p9oUh%3uiS%{(ne5dHv(_=ITw-i4+U zGlTU10@C|Cr0b&9;Z02gin4EJ_B+a#fl=(tJTV2`+RfKh!R#NGgLp56>Ysp5ce!a< zsTQpMs^YO@@|iSt_cV@XAu#OJi`H67Z+y66arKFDVw!19A&&6^$Gj3^gWvjskhGK8 zBnTSI%C(#0ik1HA2_D^6|6_rV`|Dv&T~?PDL)zJ-vv|?jy(bAg_xAw9w1ghmYae~; zHvNpW!?^TMN969enUCvv_e8(SRE_%?wK%bFf95~MvKI(;$<-qAvJBl0$}UR`P&!b) z;GyVVmi^i5&bo&?{K#XX95l#rW?K5ScM$kRhh{qLKz(vwW1`cf<-By>@T{TES!{1G zHr-?O#1DdE)(8?ZeYl@#rPMQ8$?Ht&RTv`Mc8FbINMN{N1@7Q)o-;r|-098kD@i+( zMiIR$<`hD`?w;ji_Upe2=P?tQ%H`9jM$aH!W3k*#1eDRQrb}u`1Q2pEI8Mx`-JR0I zvK>Y!K%st7@EqpHaH@Gr+bmA5O5cHa`jf@_Zwz=7aH-LEI`WJ@zqkqG=>A2}oZCpo zhEDt@ej}S{rU2UKmFk+>YRdkZSf2JY3~H;2d;4M2US4UCtfuZAC?qRbDq9k%j<*En zW$}+;Geq@)3Mf-~xh{b~kE5@;_0_Fv^vFvn`?+tsF{72FlO6|hY-{+znAMx)XSYuw zOU7@CH%usq)tt=mmUddL<)24GBW_x(&( zd)r`qR|_3c^6a@l)06dK7gCw4=~~IZyE(sR48nqZTS-3iM8Lzd$-%)J?s3^fZS{1~ zs+g9oNULrgruEpYvncb4cC|g?(c&|@IQbAn1HlX@X}R+JaSZHQ>Gzp=eNo5pIW|$F zgebvo2BxOInSI;wv}{kUWM!3DnEsRJiVl;%uZu)ZW`ImXIW=aOn%3?spW9TN5m+6F+`u3E3O(ks8QGI`@EsB_730~%xp6OiKE5^Hx@eZnkU)^O z_IgR~t>bxdv!1v?KQyQsXqSOqu>{f1M5$GfTz$QU8+a$sWoB*FdrKl`=fxCUm77&1 zyq?jcms}IKW>wq`zR||ek&Xt?>r|_IZoR#n{PO+QzDsFEG^R6E2$WLW0mH|@k*Zqn z8=8LiM&FV%Gn~mIo<eAf|7*?0b-CM-Nu+} zYd(jvq<+MZ{^5h@{!Nw*n|`Z@RV1@H=AcG7qKzMYf-$^+ugGG9XoMTWAF41;C;3I{ zW_XhzED)!lS?9(^MLCbfTeQ;lfCoLh4CmBF^ver^{s=K$tL*iIlH%Il{>zd^NgEQ! zk)1 z7{r)e|FUNOEH(nEvJS8febv&6r%=qri+=8^T2AsEQ+g>*Sf3L|jIuRXWA)3O*K2-~ zyeQl#b|g8kZ)>r$&jRLL4!w_k#g-EM_q#gv^E&8_>R99G240spFDgXJe03tHd@{bf zp==V-Zxb0hn=tXdOJPx>wjt05D}fxS^J*c?D)qU#7;0y+VwE{RSx&(`as5D_I!Vkc zK=O}Q%<%lxr|H>JL`=2lv z>xQWMU9I{gHli+Aqu+L$5wDG<_~@o``H-dCO_Fje{zhl_3L8x_pU&tqn^>i?gZb%s zd!xCKuM3xd+R?_;lMgw=W0h;gNZjF008Zrz1-+^ll&CRqlt4cSNl zGEmpAPJqGuAi}H}yw~ zT1NUBJn`yO{pWKEWSAY(OZ*10lh3e6^|x`QHkNmo0%DVsJ4r1pt!DkCF6zL#qa$-y zNg%1oXj1(2S{D_{lLPjfU|CD-YBbU&~Qmf&3`ysU#`sk2vbRE#~`#WvMwMP=439 zfk`sDMyRR_Qlo*4N~cSxQ|zH(tAMN*1Zi9v-t9KSsY`fIG)xv!XSS zr@>*+YlvDAt9p_|2yZwdIgT4CFnOk^C0Z6JxcW6@*jAY7hYq7$<*A>i~-9Wm**SGRWr&?5nVytOK;jvI=`g$vO2NWL7UDvzEl-3**F4zvw4 zZpSQ4Rp=vWpZyY=UDL#y)mV3aNkjV8rtC($X>6V$me>&mB3q%|RnrhO<{8CfCg z>sS@6z~0t04REE`saw@tVN0+!BPhM_aF}y$PY?){AlH3uOvF0iY2a1^rWn%Bb^4(# z?D-+ci0^AQSl3535rV$UhRYJAy48b(YG_E9K<%LW<>0x!CG;I2O9SQ#@cA z;oIJ{ua_O`ha%Zbk=K`fYH8=#bHM<3%OgaiOfFa{V>K#fzgwwbgP)g0o^xeh${$`a z?*%UiDRBkJl*POn@WvEcDldBiz(NNiia)X>&VLw_`G3=a{-5r{_>UT~|9=?d@A&(g zXLir(F{Mi0#QV(~UXnO+{GCqev4%$A-}Dl^tQKLe{9W_dkNc{e{~wfhs6GM;Cg9Bi zwB-dk@czTXraVdcrznc*rc|{SOX0`%)rAh;W#DawH2Dm8<`reTZ|uP0B;NX4(sv2n zuIOUjX3k0RMdZ+~!fg<*V?p?NIAS58UAz9u@?-t}Sqbhn0D*js`?gK5+K)GEmB`b^ zXJBY6^f17E&Hg7e1cIGF&8Puv!+|R(1JW8cXPRMJleG?Q;3uP>foTmuyQ>fE@LP(s z`ltXPeknr#xpDot8%qBL9{OPUBDZ`_ClfCDe6?;LFa7xKeq;-{{XqSPE&03#KTx}H z63WHXl>;6-F&O^M)%h=q2$6e->u2e;x)&}8)MUuX*L%t{X^k}7Oth!0QamG7%m_JH6x}2$%^#b|3ZlYI~991usbLKr<-@Q1Sm2A^rwTv`D)?fK?!JO!0 zRsq}53$84SzBpqjz2g{p*vVa=;sh-%`6Se0>|arC+@+SY%=F)Dv7Wij=R+;;$_}>vacBG3n!9$Thni2x{K}bvbK<0Xv^-z^>G3@T7&+;%V=rtMGoctcO%lQuFID5zsG>_Ife?mN0& z)c$?{SJMj3_H@518kX#Hj2}@o=KJc{tQQT=W!_Kg!$)7t=V*rL-n_+7nCQ6>uQ*K- zzGz5(B9B;pwtN-A>~7;pX2u=Pe3yOA=d-9Qk19bg_ROckSItv)B^R^7jYYG-OkZB; zoYxo2XXd9NN&PcasW{C8mjrCxyN?x{vK!=-y8$nJV?AqNL`Ne|Gvm4Erb@oAWvl?| z``M|JA&f-8a#z$sgHxn!3J?#b916+XWzQPhguXCYR52u53_LyBA_qtt4$J;GwqsHX zV*Sn4qnYt1*HfZ24QHRQtqlp*Ydf|z;B9>Vv0j!>VfqXpk7A3c9X96a%IH{z1?uTl zP}7g86%;I@T-9rrqY<9m(>hDQplo*!F}%rg7VwR4mUNOwdaqnWe9vrv*hUnJl_ZQy zC5MtNGxqMuM`PI-g-k@cd=*Tmktj>aw?B*lLL^P`uT&A_UG)MRT+b#{TEV_*(k^8b zswaFACay|5uiqMb-MAbR1#+Vtu0OOy=^O%(KhrFT+2h`o!>kZZ&_?bG@RzD9+V*$= z%Q!^7_OO_82&z#o>x`2NIl=sE=#{~QV`uW9#-L_pCpYa^ow7~dg)9RpLR|W;;3{w`5j)b+D*WwpKJ`Fef3&HfFFap0V(uPkdh6X!k8!E3G9{R^z zOe48VEk{EoIE3tnEdA*WF7GY_4~og`(+RQYOnp+5L7gvaxnL`_hca93iDK+}fo87* zGzVjy*zzJ`(O=7TQA1DO<9M0F?wfWd0hvh}zHTy$CmCQVsk7gv{Le!DC!260`@Ooq zeAFQobfSDcF*D&Y7V`jcqkO&6>G69#-C@vmOxj5vn>K=Mk%pI6Pef5+;J4WtGkq01l`#daF-A#g0 zjfCgJ6bA>0R@l|Gh8oj#O|ZQQEU@vN8jfxs(W>xqsM$a9)-S6G$pHXi_KatbbhgC5 z;ix4{u;9I(!nFSYz5chN5x8)|F|r*Imu2arv{6pI!^jq;4;KEPGJ^RIrcT8FnV-Y| z8Jzu>;86iw6|p*$%NWsrvo&vqb83WJvDl?tzD#c0zis;V>49ET3{3* zw>?f3aqZZb<#3WbE};vah$Ur+Oky{(QL*gitZiF=xre);Iu%C9>jbWl7fE$Z28|~c z$XCm4)7KUHHOiZRd||Ef7ZmnsCdUtJWW_POYUeNy0##3aCiodB|FW91cZ1p|m$viF zDyPu21EU-HdsP;n#7gC*CeOSaN{fBfK*_`q`VrSD|#qp3|xU11_Jxqj5T#(_rP$?fO| z#H~OGTY}}IyW2+4%FfDzo=plYWB_ikrLBLuF~TaBA9uQqle{g)0BlA7^=Uf$ z*Y<5d>}JE`h`EVR$z#^nR!)AF^ZH`^*#!N~p~v}<*P(wcOIG~LR3##xvrOQ2w z4nX&_8_b>zZkw@x+-rrv-T_U8c$L7l`0=fIXnp!ggz(Ccuy`}g=st#R~CT2>|)x4TQP3wB5!|$?# zPTR7wOl+nBzgO+aBCNx^-vQcZJyICArhx)a6z59KV~jTTgjKkROY}q4(y|P%Y|;0= z;TnoOBBZ)0$9~I-r8D7G6fk0Ltk2WCD(vFDY5w9Bz@lx*hX3kvhQo-hm zP2%$YU90vZP@(zhaFgrk?WKp_wF|kC9?2ou>89QDiN?1m`Wx2N%_OBnmU2<)0qpi* z>>k*#MjSb9!=l4gOi&`+<}hGtlB+q)9cgV~WaETVaRMX#=(RHDpKDYHpX-%^dpLeT zhO?x^FO{H~u?PE!8&FLoT`sYrT_@ub-mn)td@h zCfFoRCE_MiV!PIyq7k~8plUJj(66`!WZEg^wN2_p_1gwV_GJn-&C!k~ob+ zl;h^e^~ByB^;Yfsg)N1&{mMZxz5zH(omXQ6;@f_=|B&mH<{AYIH)xB$!L{DWh%c{B ziBGC|5E@pG$ufe=09F}UCw;`e%|j}BL7WGPYs7YRBi zZR&HHgT>Eg23HvK1!@8?C3#*?9dD!LE8JDT_laY%J>R*9DP{5nodWF z%F;x|wr&PxVRT4nM_5G$Np(~y`z`mw0nHFhJEb+R&nt*4;^zQ5vPp&3$ne(m-_96Fj_~SbvlVvJj_@Ly$cHr%vil{;Sy4NJok`)K42RAhdmHBYA z8Dm|GQAAZ6g51W8A*68vJ+1{F>Wu9naFp^lfqXB`ezF{B8$dr@N1zN>YB-@0zno|f zLQ%|mZz)lcbb=1rF%Rbm#UhTEN;vI}t&{%T7$c#W3e1B$k)5$r6LD#ztnB}Jn zh)(5&tApw?UWJXd_xPEx%U5kq#w80hnwp;tHQI_Oc=YwZBYip?pxUBOZ3A3TJ;6)p zh0P>5{eY%Hd}=t>f}cdi(563ZB9Y*5)UDwMF5o-IIv+k22b(Ah8TsdnNg1-WkY-7L z^U%6CB8Q){Qi6(vn>1T;p~m=p2V33^LcBO09E^#x;vQ={Ts44|`F$zg25XHcD47RQ zHEgD+8Ps-ViRqEDs3&1tD*T|I^Jg}y<1~~itDS1L0PmurdPS!bpT5O7bWP)vcB7{b3et$?rGDzUms)2nz9SQni>vq~Vq8&y!2Y;z_ttovp z+X$n!2#*>qke$3f*@hNZg$m!{SJJmtMOtPIn)%Gr={3u6)E8YfBu!P)J85@?oX->s zM{iA;DwF+r1E;kZRSu$qVEQX>k;_lX=tUU~RE?>%sr?nxlnv78xP6-WS<+xGft#~> z$AQ;ke6$ooxleF1)W1LchR@ySTd@*4v_=l=hT3dW76abx45#XpGiYuZa<%-F9oxMg z#q-<@olc~g0WG|8_+TAI(ZTb1x`C(;uIWbKP0!=W7Y>4g)UhLos`9zvLa|X-w?nlC z>wjLLXPcbZHwe~z2n@vj$KU+a_fq7qRTjbsNz$dL2lDo6klYMCk7Ov=huo0O22@_} zW(&Lt3$tf}_@H(D62FAOEp|MLLBFpoS^Sv=RihYI#a%<|_33HxIey5wuO3H(J~$q7 zp6&J`_gx4yy%J{PVIZ0a&~S{r=ESSUU1QoFPZ6Yx8tRrs_)73kE9u}5%r*buhQ(gP zWJ8wcKi&vvk6s_+s=A>`72ADE8%YS!UzL8xcmUjQypkZ{0ZrKUYCKZv~1EC^961LHS5oLy8kRi z|CLS;Il)|IOj~>4#_=%x4X`1ejX&1u{T)c-`|ht};W(lE^Y**-N2FR9-A-3dDoHz7P&vZnmE8S!`;AOj7usc0X<|S@N($9wILWZ4N>X-6Jq-Z0RLzm!eb%g1ZXx#GG;BO#pTmdE@Rk2CT04 z1`t6ngs<0*hyDzhw4h1~^7}g~tLhClnOL`t8LzTlDSi*w3ixOA=JagI_iy{T0XQLp z87ueX38b39XzayU^#*>2#!dK`{CbzI_d8Ae+p}4fJwjiQEM&f!G0p(nHY(-2`2hqm z>y0%!4oxn87rDug2F~!$Dv5Jnp|!)%pO(Harv!_>@%jwMq9ouA8ll?Uvhtkl_A{ ze*iJ{{DRPy977f1#tW9%dGRagp99tjeOvk1GhKR|GDB9%g;7L5tiut1!Xr2q-*D1& zmDK=E$XN}bh)7FhE!x8mB0jLDEko#I{5_s>&)G(F=k7)c7JHNX7p_l$*j24Mx%sSX z9d~_V4-x(2>lhEQefuX$*bq7mSQyT_B8nLoKpptJ`a&iOLY<((SPry_dw(m}qClp& zt>DGW$u^8Fjv>m5`^WlGgRwqrJ`V@SH?p|tHsoaA4<^r(!HG` zW>cF!-S#Xo{!s9*?!SB^#cfocqYC53T)JJt@A#Jf1ti-F$cg?HAwi5W2FTdxNo8MS zmgB1Xz|5O&uWh;>&JwHIz;EC9>o^Gw9+4r&9`TSRdoSyx0p@NROHU&tpqF^h|7B>G z6nb(?7(V0Hi|F;c?qt4ydNd`TU-@M!dMqGo(e7%)z7P5ZVp3(L^7jh&^*ugiF(#jT zlGfuX7e|o<)6)$E>)#=F+A5s-XHUqVT_!AE^;%tB++I>gU22eAzHK>bs59eFT$qHU zljXe9B2aby#eR+Q=Dh3Z6&$=jR7>_G{QqTCuR@$M^YwrR`R!jp{YS09 zChmc-1{DYeuY^1kMF0j_`Iq)z!$PLXB@3$K$QesTslC4=T6-;Y=Va#HE5PUKY7>4& z9F9O@T?3tU;#8#o literal 0 HcmV?d00001 From 81021fb34139cc06bf4b63622209cf76682109b6 Mon Sep 17 00:00:00 2001 From: Kacper Date: Thu, 19 May 2022 08:53:05 +0200 Subject: [PATCH 06/59] =?UTF-8?q?=F0=9F=A7=B9=20Code=20Cleaning=20=20=20(#?= =?UTF-8?q?766)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add missing lint:fix in @usedapp/website; run lint:fix --- packages/docs/src/examples/CodeWrapper.tsx | 2 +- .../docs/src/examples/ConnectingToNetwork.tsx | 71 +++++++------- .../docs/src/examples/ContractFunction.tsx | 63 ++++++------ packages/docs/src/examples/EthBalance.tsx | 32 +++---- packages/docs/src/examples/EthPrice.tsx | 21 ++-- .../docs/src/examples/ExampleContainer.tsx | 34 +++---- packages/docs/src/examples/GettingStarted.tsx | 28 ++---- packages/docs/src/examples/Multichain.tsx | 46 ++++----- packages/docs/src/examples/Notifications.tsx | 96 +++++++++---------- .../src/examples/ReadingWithoutWallet.tsx | 30 +++--- .../docs/src/examples/SendTransaction.tsx | 72 +++++++------- packages/docs/src/examples/Siwe.tsx | 50 +++++----- .../docs/src/examples/SwitchingNetworks.tsx | 88 +++++++++-------- packages/docs/src/examples/TokenBalance.tsx | 32 +++---- .../docs/src/examples/TransactionHistory.tsx | 94 +++++++++--------- .../src/examples/WalletConnectExample.tsx | 95 +++++++++--------- packages/docs/src/examples/WethPrice.tsx | 23 ++--- packages/siwe/src/provider.tsx | 6 +- packages/siwe/src/requests.tsx | 10 +- packages/website/package.json | 1 + 20 files changed, 420 insertions(+), 474 deletions(-) diff --git a/packages/docs/src/examples/CodeWrapper.tsx b/packages/docs/src/examples/CodeWrapper.tsx index 4153c75c7..6e1a624cb 100644 --- a/packages/docs/src/examples/CodeWrapper.tsx +++ b/packages/docs/src/examples/CodeWrapper.tsx @@ -9,7 +9,7 @@ export interface CodeWrapperProps { children?: string } -export const CodeWrapper = ({title, children}: CodeWrapperProps) => { +export const CodeWrapper = ({ title, children }: CodeWrapperProps) => { return ( {children} diff --git a/packages/docs/src/examples/ConnectingToNetwork.tsx b/packages/docs/src/examples/ConnectingToNetwork.tsx index 54c9217b2..9bf1a38db 100644 --- a/packages/docs/src/examples/ConnectingToNetwork.tsx +++ b/packages/docs/src/examples/ConnectingToNetwork.tsx @@ -6,17 +6,17 @@ import { getDefaultProvider } from 'ethers' import { AccountIcon } from './components/AccountIcon' const config: Config = { - readOnlyChainId: Mainnet.chainId, - readOnlyUrls: { - [Mainnet.chainId]: getDefaultProvider('mainnet'), - }, + readOnlyChainId: Mainnet.chainId, + readOnlyUrls: { + [Mainnet.chainId]: getDefaultProvider('mainnet'), + }, } - + ReactDOM.render( - - - , - document.getElementById('root') + + + , + document.getElementById('root') ) const STAKING_CONTRACT = '0x00000000219ab540356cBB839Cbe05303d7705Fa' @@ -28,48 +28,45 @@ export function App() { const ConnectButton = () => (
- -

Connect to wallet to interact with the example.

+ +

Connect to wallet to interact with the example.

) const MetamaskConnect = () => (
{account && ( -
+
- -   -
{account}
+ +   +
{account}
-
-
)} +
+
+ )} {!account && } {account && } -
+
) - + return (
- {userBalance && - ( -
-
- Ether balance: -

{formatEther(userBalance)} ETH

-
- ) - } - {stakingBalance && - ( -
- ETH2 staking balance: -

{formatEther(stakingBalance)} ETH

-
- ) - } + {userBalance && ( +
+
+ Ether balance: +

{formatEther(userBalance)} ETH

+
+ )} + {stakingBalance && ( +
+ ETH2 staking balance: +

{formatEther(stakingBalance)} ETH

+
+ )}
) -} \ No newline at end of file +} diff --git a/packages/docs/src/examples/ContractFunction.tsx b/packages/docs/src/examples/ContractFunction.tsx index 5c34a5bd0..011ca6391 100644 --- a/packages/docs/src/examples/ContractFunction.tsx +++ b/packages/docs/src/examples/ContractFunction.tsx @@ -7,48 +7,39 @@ import { WethAbi, WETH_ADDRESSES, SUPPORTED_TEST_CHAINS } from './constants/Weth import { MetamaskConnect } from './components/MetamaskConnect' ReactDOM.render( - - - , - document.getElementById('root') + + + , + document.getElementById('root') ) export function App() { - const { account, chainId } = useEthers() - const isSupportedChain = SUPPORTED_TEST_CHAINS.includes(chainId) - - const WrapEtherComponent = () => { - const wethAddress = WETH_ADDRESSES[chainId] - const wethInterface = new utils.Interface(WethAbi) - const contract = new Contract(wethAddress, wethInterface) as any - - const { state, send } = useContractFunction(contract, 'deposit', { transactionName: 'Wrap' }) - const { status } = state - - const wrapEther = () => { - void send({ value: 1 }) - } - - return ( -
- -

Status: {status}

-
- ) - } + const { account, chainId } = useEthers() + const isSupportedChain = SUPPORTED_TEST_CHAINS.includes(chainId) + + const WrapEtherComponent = () => { + const wethAddress = WETH_ADDRESSES[chainId] + const wethInterface = new utils.Interface(WethAbi) + const contract = new Contract(wethAddress, wethInterface) as any + + const { state, send } = useContractFunction(contract, 'deposit', { transactionName: 'Wrap' }) + const { status } = state - const ChainFilter = () => { - return isSupportedChain - ? - :

Set network to: Ropsten, Kovan, Rinkeby or Goerli

+ const wrapEther = () => { + void send({ value: 1 }) } return ( -
- {!account - ? - : - } -
+
+ +

Status: {status}

+
) + } + + const ChainFilter = () => { + return isSupportedChain ? :

Set network to: Ropsten, Kovan, Rinkeby or Goerli

+ } + + return
{!account ? : }
} diff --git a/packages/docs/src/examples/EthBalance.tsx b/packages/docs/src/examples/EthBalance.tsx index a47527491..3adca78b8 100644 --- a/packages/docs/src/examples/EthBalance.tsx +++ b/packages/docs/src/examples/EthBalance.tsx @@ -6,17 +6,17 @@ import { getDefaultProvider } from 'ethers' import { MetamaskConnect } from './components/MetamaskConnect' const config: Config = { - readOnlyChainId: Mainnet.chainId, - readOnlyUrls: { - [Mainnet.chainId]: getDefaultProvider('mainnet'), - }, + readOnlyChainId: Mainnet.chainId, + readOnlyUrls: { + [Mainnet.chainId]: getDefaultProvider('mainnet'), + }, } ReactDOM.render( - - - , - document.getElementById('root') + + + , + document.getElementById('root') ) export function App() { @@ -26,14 +26,12 @@ export function App() { return (
- {etherBalance && - ( -
- Ether balance: -

{formatEther(etherBalance)} ETH

-
- ) - } + {etherBalance && ( +
+ Ether balance: +

{formatEther(etherBalance)} ETH

+
+ )}
) -} \ No newline at end of file +} diff --git a/packages/docs/src/examples/EthPrice.tsx b/packages/docs/src/examples/EthPrice.tsx index f12711a86..e31499c56 100644 --- a/packages/docs/src/examples/EthPrice.tsx +++ b/packages/docs/src/examples/EthPrice.tsx @@ -2,18 +2,15 @@ import React from 'react' import ReactDOM from 'react-dom' import { useCoingeckoPrice } from '@usedapp/coingecko' -ReactDOM.render( - , - document.getElementById('root') -) +ReactDOM.render(, document.getElementById('root')) -export function App() { - const etherPrice = useCoingeckoPrice('ethereum', 'usd') +export function App() { + const etherPrice = useCoingeckoPrice('ethereum', 'usd') - return ( -
- Ether price: -

{etherPrice} $

-
- ) + return ( +
+ Ether price: +

{etherPrice} $

+
+ ) } diff --git a/packages/docs/src/examples/ExampleContainer.tsx b/packages/docs/src/examples/ExampleContainer.tsx index ff845e4fa..9d449ec67 100644 --- a/packages/docs/src/examples/ExampleContainer.tsx +++ b/packages/docs/src/examples/ExampleContainer.tsx @@ -1,15 +1,15 @@ import React, { useState } from 'react' import CodeWrapper from './CodeWrapper' import BrowserOnly from '@docusaurus/BrowserOnly' -import ReactDOM from 'react-dom' +import ReactDOM from 'react-dom' import { ErrorBoundary, FallbackProps } from 'react-error-boundary' export interface Example { source: { ts: string - }, - name: string, - path: string, + } + name: string + path: string load: () => { default: React.FC } } @@ -19,13 +19,9 @@ export interface ExampleContainerProps { export const ExampleContainer = ({ example }: ExampleContainerProps) => ( <> - - {() => } - -
- - {example.source.ts} - + {() => } +
+ {example.source.ts} ) @@ -37,9 +33,9 @@ function ExampleRenderer({ example }: ExampleRendererProps) { const [Component = () => <>] = useState(() => loadExample(example)) return ( -
+
- +
) @@ -54,25 +50,25 @@ const exampleCache = new Map() * This function hooks the `ReactDOM.render` so we can use it in examples and not crash the docs app. * Crash happens because the example tries to render into a '#root` component, which is not immediately available, * and could be repeated if there is more than one example in a mdx file. - * + * * @param example Result of importing the example script using `example-loader.js * @returns A renderable component */ function loadExample(example: Example): React.FC { - if(exampleCache.has(example.path)) { + if (exampleCache.has(example.path)) { return exampleCache.get(example.path) } const originalRender = (ReactDOM as any).render - let renderJsx = undefined; - (ReactDOM as any).render = (jsx: any) => { + let renderJsx = undefined + ;(ReactDOM as any).render = (jsx: any) => { renderJsx = jsx // Not rendering anything, overriding default behaviour of App examples. } const exports = example.load() const component = renderJsx ? () => renderJsx : exports.default ;(ReactDOM as any).render = originalRender - + exampleCache.set(example.path, component) return component } @@ -82,4 +78,4 @@ const ErrorFallback: React.FC = ({ error, resetErrorBoundary }) =
{error.stack}
-) \ No newline at end of file +) diff --git a/packages/docs/src/examples/GettingStarted.tsx b/packages/docs/src/examples/GettingStarted.tsx index 75f533bbd..ce0e71fff 100644 --- a/packages/docs/src/examples/GettingStarted.tsx +++ b/packages/docs/src/examples/GettingStarted.tsx @@ -1,13 +1,7 @@ import React from 'react' import ReactDOM from 'react-dom' -import { - Mainnet, - DAppProvider, - useEtherBalance, - useEthers, - Config, -} from '@usedapp/core' +import { Mainnet, DAppProvider, useEtherBalance, useEthers, Config } from '@usedapp/core' import { formatEther } from '@ethersproject/units' import { getDefaultProvider } from 'ethers' import { MetamaskConnect } from './components/MetamaskConnect' @@ -31,18 +25,16 @@ function App() { const etherBalance = useEtherBalance(account) return ( -
+
{account && } - {etherBalance && - ( -
-
- Balance: -

{formatEther(etherBalance)}

-
- ) - } + {etherBalance && ( +
+
+ Balance: +

{formatEther(etherBalance)}

+
+ )}
) -} \ No newline at end of file +} diff --git a/packages/docs/src/examples/Multichain.tsx b/packages/docs/src/examples/Multichain.tsx index 9bdd6586a..5f0fc6495 100644 --- a/packages/docs/src/examples/Multichain.tsx +++ b/packages/docs/src/examples/Multichain.tsx @@ -8,18 +8,18 @@ import { AccountIcon } from './components/AccountIcon' const address = '0xe13610d0a3e4303c70791773C5DF8Bb16de185d1' const config: Config = { - readOnlyUrls: { - [Mainnet.chainId]: getDefaultProvider('mainnet'), - [Arbitrum.chainId]: 'https://arb1.arbitrum.io/rpc', - [ZkSyncTestnet.chainId]: 'https://zksync2-testnet.zksync.dev', - }, + readOnlyUrls: { + [Mainnet.chainId]: getDefaultProvider('mainnet'), + [Arbitrum.chainId]: 'https://arb1.arbitrum.io/rpc', + [ZkSyncTestnet.chainId]: 'https://zksync2-testnet.zksync.dev', + }, } - + ReactDOM.render( - - - , - document.getElementById('root') + + + , + document.getElementById('root') ) export function App() { @@ -31,23 +31,23 @@ export function App() { <>
Account:
- -   + +  
{address}
-
-
- Balance on Mainnet: +
+
+ Balance on Mainnet:

{mainnetBalance && formatEther(mainnetBalance)} Eth

-
- Balance on Arbitrum: -

{arbitrumBalance && formatEther(arbitrumBalance)} AEth -

-
- Balance on ZkSync Testnet: -

{zkSyncBalance && formatEther(zkSyncBalance)} ZKEth -

+
+ Balance on Arbitrum: +

{arbitrumBalance && formatEther(arbitrumBalance)} AEth

+
+
+ Balance on ZkSync Testnet: +

{zkSyncBalance && formatEther(zkSyncBalance)} ZKEth

+
) } diff --git a/packages/docs/src/examples/Notifications.tsx b/packages/docs/src/examples/Notifications.tsx index 908927de6..ea691fe81 100644 --- a/packages/docs/src/examples/Notifications.tsx +++ b/packages/docs/src/examples/Notifications.tsx @@ -7,69 +7,61 @@ import { WethAbi, WETH_ADDRESSES, SUPPORTED_TEST_CHAINS } from './constants/Weth import { MetamaskConnect } from './components/MetamaskConnect' const config: Config = { - notifications: { - expirationPeriod: 0, - } + notifications: { + expirationPeriod: 0, + }, } ReactDOM.render( - - - , - document.getElementById('root') + + + , + document.getElementById('root') ) export function App() { - const { notifications } = useNotifications() - const { account, chainId } = useEthers() - const isSupportedChain = SUPPORTED_TEST_CHAINS.includes(chainId) - - const WrapEtherComponent = () => { - const wethAddress = WETH_ADDRESSES[chainId] - const wethInterface = new utils.Interface(WethAbi) - const contract = new Contract(wethAddress, wethInterface) as any - - const { state, send } = useContractFunction(contract, 'deposit', { transactionName: 'Wrap' }) - const { status } = state + const { notifications } = useNotifications() + const { account, chainId } = useEthers() + const isSupportedChain = SUPPORTED_TEST_CHAINS.includes(chainId) - const wrapEther = () => { - void send({ value: 1 }) - } + const WrapEtherComponent = () => { + const wethAddress = WETH_ADDRESSES[chainId] + const wethInterface = new utils.Interface(WethAbi) + const contract = new Contract(wethAddress, wethInterface) as any - return ( -
- -

Status: {status}

-

Notifications

- {notifications.length !== 0 && - ( - - - {notifications.map((notification) => { - return ( - - - - - ) - })} -
TypeDate
{notification.type}{new Date(notification.submittedAt).toDateString()}
)} -
- ) - } + const { state, send } = useContractFunction(contract, 'deposit', { transactionName: 'Wrap' }) + const { status } = state - const ChainFilter = () => { - return isSupportedChain - ? - :

Set network to: Ropsten, Kovan, Rinkeby or Goerli

+ const wrapEther = () => { + void send({ value: 1 }) } return ( -
- {!account - ? - : - } -
+
+ +

Status: {status}

+

Notifications

+ {notifications.length !== 0 && ( + + + + {notifications.map((notification) => { + return ( + + + + + ) + })} +
TypeDate
{notification.type}{new Date(notification.submittedAt).toDateString()}
+ )} +
) + } + + const ChainFilter = () => { + return isSupportedChain ? :

Set network to: Ropsten, Kovan, Rinkeby or Goerli

+ } + + return
{!account ? : }
} diff --git a/packages/docs/src/examples/ReadingWithoutWallet.tsx b/packages/docs/src/examples/ReadingWithoutWallet.tsx index 6e1b2f2e0..2dc90b75f 100644 --- a/packages/docs/src/examples/ReadingWithoutWallet.tsx +++ b/packages/docs/src/examples/ReadingWithoutWallet.tsx @@ -7,17 +7,17 @@ import ReactDOM from 'react-dom' const STAKING_CONTRACT = '0x00000000219ab540356cBB839Cbe05303d7705Fa' const config: Config = { - readOnlyChainId: Mainnet.chainId, - readOnlyUrls: { - [Mainnet.chainId]: getDefaultProvider('mainnet'), - }, + readOnlyChainId: Mainnet.chainId, + readOnlyUrls: { + [Mainnet.chainId]: getDefaultProvider('mainnet'), + }, } ReactDOM.render( - - - , - document.getElementById('root') + + + , + document.getElementById('root') ) export function App() { @@ -25,14 +25,12 @@ export function App() { return (
- {etherBalance && - ( -
- Staking contract balance: -

{formatEther(etherBalance)} ETH

-
- ) - } + {etherBalance && ( +
+ Staking contract balance: +

{formatEther(etherBalance)} ETH

+
+ )}
) } diff --git a/packages/docs/src/examples/SendTransaction.tsx b/packages/docs/src/examples/SendTransaction.tsx index 4487540f9..a0fca0b5e 100644 --- a/packages/docs/src/examples/SendTransaction.tsx +++ b/packages/docs/src/examples/SendTransaction.tsx @@ -5,50 +5,50 @@ import { getDefaultProvider } from 'ethers' import { MetamaskConnect } from './components/MetamaskConnect' const config: Config = { - readOnlyChainId: Mainnet.chainId, - readOnlyUrls: { - [Mainnet.chainId]: getDefaultProvider('mainnet'), - }, - bufferGasLimitPercentage: 10, // The percentage by which the transaction may exceed the estimated gas limit. + readOnlyChainId: Mainnet.chainId, + readOnlyUrls: { + [Mainnet.chainId]: getDefaultProvider('mainnet'), + }, + bufferGasLimitPercentage: 10, // The percentage by which the transaction may exceed the estimated gas limit. } ReactDOM.render( - - - , - document.getElementById('root') + + + , + document.getElementById('root') ) export function App() { - const { chainId } = useEthers() - const { sendTransaction, state } = useSendTransaction() - - // We prevent the example from running on Mainnet so that the users do not use real Ether without realizing. - const disabled = chainId === ChainId.Mainnet - const status = state.status - const address = '0xe13610d0a3e4303c70791773C5DF8Bb16de185d1' - - const send = () => { - void sendTransaction({ to: address, value: 1 }) - } - - const { account } = useEthers() - - const WalletContent = () => { - return disabled - ?

Please change the network from Mainnet to proceed.

- : ( -
- -

Status: {status}

-
- ) - } - - return ( + const { chainId } = useEthers() + const { sendTransaction, state } = useSendTransaction() + + // We prevent the example from running on Mainnet so that the users do not use real Ether without realizing. + const disabled = chainId === ChainId.Mainnet + const status = state.status + const address = '0xe13610d0a3e4303c70791773C5DF8Bb16de185d1' + + const send = () => { + void sendTransaction({ to: address, value: 1 }) + } + + const { account } = useEthers() + + const WalletContent = () => { + return disabled ? ( +

Please change the network from Mainnet to proceed.

+ ) : ( +
+ +

Status: {status}

+
+ ) + } + + return (
{account && }
- ) + ) } diff --git a/packages/docs/src/examples/Siwe.tsx b/packages/docs/src/examples/Siwe.tsx index 2c9394cfb..02eb86855 100644 --- a/packages/docs/src/examples/Siwe.tsx +++ b/packages/docs/src/examples/Siwe.tsx @@ -5,19 +5,19 @@ import { getDefaultProvider } from 'ethers' import { SiweProvider, useSiwe } from '@usedapp/siwe' const config: Config = { - readOnlyChainId: Mainnet.chainId, - readOnlyUrls: { - [Mainnet.chainId]: getDefaultProvider('mainnet'), - }, + readOnlyChainId: Mainnet.chainId, + readOnlyUrls: { + [Mainnet.chainId]: getDefaultProvider('mainnet'), + }, } ReactDOM.render( - - - - - , - document.getElementById('root') + + + + + , + document.getElementById('root') ) export function App() { @@ -25,22 +25,22 @@ export function App() { const { signIn, signOut, isLoggedIn } = useSiwe() const SiweComponent = () => { - return ( -
- -   - - {isLoggedIn ? ( -

Logged in with {account}

- ) :

Not logged in

} -
- ) + return ( +
+ +   + + {isLoggedIn ?

Logged in with {account}

:

Not logged in

} +
+ ) } return ( -
- {!account && } - {account && } -
- ) +
+ {!account && } + {account && } +
+ ) } diff --git a/packages/docs/src/examples/SwitchingNetworks.tsx b/packages/docs/src/examples/SwitchingNetworks.tsx index 55d0b2cf7..8c8184fda 100644 --- a/packages/docs/src/examples/SwitchingNetworks.tsx +++ b/packages/docs/src/examples/SwitchingNetworks.tsx @@ -4,56 +4,60 @@ import { Mainnet, DAppProvider, useSendTransaction, useEthers, Config, Rinkeby } import { getDefaultProvider } from 'ethers' const config: Config = { - readOnlyChainId: Mainnet.chainId, - readOnlyUrls: { - [Mainnet.chainId]: getDefaultProvider('mainnet'), - [Rinkeby.chainId]: getDefaultProvider('rinkeby'), - }, + readOnlyChainId: Mainnet.chainId, + readOnlyUrls: { + [Mainnet.chainId]: getDefaultProvider('mainnet'), + [Rinkeby.chainId]: getDefaultProvider('rinkeby'), + }, } ReactDOM.render( - - - , - document.getElementById('root') + + + , + document.getElementById('root') ) export function App() { - const { chainId, switchNetwork, activateBrowserWallet, account } = useEthers() - const { sendTransaction, state } = useSendTransaction() + const { chainId, switchNetwork, activateBrowserWallet, account } = useEthers() + const { sendTransaction, state } = useSendTransaction() - const status = state.status - const address = '0xe13610d0a3e4303c70791773C5DF8Bb16de185d1' + const status = state.status + const address = '0xe13610d0a3e4303c70791773C5DF8Bb16de185d1' - const send = () => { - void sendTransaction({ to: address, value: 1 }) - } + const send = () => { + void sendTransaction({ to: address, value: 1 }) + } - const WalletContent = () => ( - <> -
Current chain: {chainId}
-
- {} - {' '} - {} -
-
-
-
Account: {account ?? 'not connected'}
- -

Status: {status}

- {state.errorMessage &&

Error: {state.errorMessage}

} -
- - ) + const WalletContent = () => ( + <> +
Current chain: {chainId}
+
+ { + + }{' '} + { + + } +
+
+
+
Account: {account ?? 'not connected'}
+ +

Status: {status}

+ {state.errorMessage &&

Error: {state.errorMessage}

} +
+ + ) - return ( -
- {!account && } - {account - ? - :

Connect to wallet to interact with the example.

- } -
- ) + return ( +
+ {!account && } + {account ? :

Connect to wallet to interact with the example.

} +
+ ) } diff --git a/packages/docs/src/examples/TokenBalance.tsx b/packages/docs/src/examples/TokenBalance.tsx index bcfc782c3..0ec34642c 100644 --- a/packages/docs/src/examples/TokenBalance.tsx +++ b/packages/docs/src/examples/TokenBalance.tsx @@ -8,17 +8,17 @@ import { MetamaskConnect } from './components/MetamaskConnect' const DAI = '0x6b175474e89094c44da98b954eedeac495271d0f' const config: Config = { - readOnlyChainId: Mainnet.chainId, - readOnlyUrls: { - [Mainnet.chainId]: getDefaultProvider('mainnet'), - }, + readOnlyChainId: Mainnet.chainId, + readOnlyUrls: { + [Mainnet.chainId]: getDefaultProvider('mainnet'), + }, } ReactDOM.render( - - - , - document.getElementById('root') + + + , + document.getElementById('root') ) export function TokenBalance() { @@ -28,14 +28,12 @@ export function TokenBalance() { return (
- {daiBalance && - ( -
- Dai balance: -

{formatEther(daiBalance)}

-
- ) - } + {daiBalance && ( +
+ Dai balance: +

{formatEther(daiBalance)}

+
+ )}
) -} \ No newline at end of file +} diff --git a/packages/docs/src/examples/TransactionHistory.tsx b/packages/docs/src/examples/TransactionHistory.tsx index 90254c3e8..9ab0fd126 100644 --- a/packages/docs/src/examples/TransactionHistory.tsx +++ b/packages/docs/src/examples/TransactionHistory.tsx @@ -7,65 +7,57 @@ import { WethAbi, WETH_ADDRESSES, SUPPORTED_TEST_CHAINS } from './constants/Weth import { MetamaskConnect } from './components/MetamaskConnect' ReactDOM.render( - - - , - document.getElementById('root') + + + , + document.getElementById('root') ) export function App() { - const { transactions } = useTransactions() - const { account, chainId } = useEthers() - const isSupportedChain = SUPPORTED_TEST_CHAINS.includes(chainId) + const { transactions } = useTransactions() + const { account, chainId } = useEthers() + const isSupportedChain = SUPPORTED_TEST_CHAINS.includes(chainId) - const WrapEtherComponent = () => { - const wethAddress = WETH_ADDRESSES[chainId] - const wethInterface = new utils.Interface(WethAbi) - const contract = new Contract(wethAddress, wethInterface) as any - - const { state, send } = useContractFunction(contract, 'deposit', { transactionName: 'Wrap' }) - const { status } = state + const WrapEtherComponent = () => { + const wethAddress = WETH_ADDRESSES[chainId] + const wethInterface = new utils.Interface(WethAbi) + const contract = new Contract(wethAddress, wethInterface) as any - const wrapEther = () => { - void send({ value: 1 }) - } + const { state, send } = useContractFunction(contract, 'deposit', { transactionName: 'Wrap' }) + const { status } = state - return ( -
- -

Status: {status}

-

Transactions

- {transactions.length !== 0 && - ( - - - - {transactions.map((transaction) => { - return ( - - - - - - ) - })} -
NameBlock hashDate
{transaction.transactionName}{transaction.receipt?.blockHash ?? 'Pending...'}{new Date(transaction.submittedAt).toDateString()}
)} -
- ) - } - - const ChainFilter = () => { - return isSupportedChain - ? - :

Set network to: Ropsten, Kovan, Rinkeby or Goerli

+ const wrapEther = () => { + void send({ value: 1 }) } return ( -
- {!account - ? - : - } -
+
+ +

Status: {status}

+

Transactions

+ {transactions.length !== 0 && ( + + + + + {transactions.map((transaction) => { + return ( + + + + + + ) + })} +
NameBlock hashDate
{transaction.transactionName}{transaction.receipt?.blockHash ?? 'Pending...'}{new Date(transaction.submittedAt).toDateString()}
+ )} +
) + } + + const ChainFilter = () => { + return isSupportedChain ? :

Set network to: Ropsten, Kovan, Rinkeby or Goerli

+ } + + return
{!account ? : }
} diff --git a/packages/docs/src/examples/WalletConnectExample.tsx b/packages/docs/src/examples/WalletConnectExample.tsx index c64fd492f..e09b0fb39 100644 --- a/packages/docs/src/examples/WalletConnectExample.tsx +++ b/packages/docs/src/examples/WalletConnectExample.tsx @@ -1,13 +1,7 @@ import React from 'react' import ReactDOM from 'react-dom' -import { - Mainnet, - DAppProvider, - useEthers, - Config, - useEtherBalance -} from '@usedapp/core' +import { Mainnet, DAppProvider, useEthers, Config, useEtherBalance } from '@usedapp/core' import WalletConnectProvider from '@walletconnect/web3-provider' import { formatEther } from '@ethersproject/units' import { getDefaultProvider } from 'ethers' @@ -28,56 +22,55 @@ ReactDOM.render( ) function App() { - const { account, activate, deactivate } = useEthers() - const etherBalance = useEtherBalance(account) - - async function onConnect() { - try { - const provider = new WalletConnectProvider({ - infuraId: '62687d1a985d4508b2b7a24827551934', - }) - await provider.enable() - await activate(provider) - } catch (error) { - console.error(error) - } + const { account, activate, deactivate } = useEthers() + const etherBalance = useEtherBalance(account) + + async function onConnect() { + try { + const provider = new WalletConnectProvider({ + infuraId: '62687d1a985d4508b2b7a24827551934', + }) + await provider.enable() + await activate(provider) + } catch (error) { + console.error(error) } + } + + const ConnectButton = () => ( +
+ +
+ ) - const ConnectButton = () => ( -
- -
- ) - - const WalletConnectConnect = () => ( -
- {account && ( + const WalletConnectConnect = () => ( +
+ {account && (
-
- -   -
{account}
-
-
-
)} - {!account && } - {account && } -
-
- ) - +
+ +   +
{account}
+
+
+
+ )} + {!account && } + {account && } +
+
+ ) + return (
- {etherBalance && - ( -
-
- Balance: -

{formatEther(etherBalance)} ETH

-
- ) - } + {etherBalance && ( +
+
+ Balance: +

{formatEther(etherBalance)} ETH

+
+ )}
) } diff --git a/packages/docs/src/examples/WethPrice.tsx b/packages/docs/src/examples/WethPrice.tsx index aab1ef3d5..b7800ba1d 100644 --- a/packages/docs/src/examples/WethPrice.tsx +++ b/packages/docs/src/examples/WethPrice.tsx @@ -2,19 +2,16 @@ import React from 'react' import ReactDOM from 'react-dom' import { useCoingeckoTokenPrice } from '@usedapp/coingecko' -ReactDOM.render( - , - document.getElementById('root') -) +ReactDOM.render(, document.getElementById('root')) -export function App() { - const WETH_CONTRACT = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' - const wethPrice = useCoingeckoTokenPrice(WETH_CONTRACT, 'usd') +export function App() { + const WETH_CONTRACT = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' + const wethPrice = useCoingeckoTokenPrice(WETH_CONTRACT, 'usd') - return ( -
- Wrapped ether price: -

{wethPrice} $

-
- ) + return ( +
+ Wrapped ether price: +

{wethPrice} $

+
+ ) } diff --git a/packages/siwe/src/provider.tsx b/packages/siwe/src/provider.tsx index e901e0454..713617ca3 100644 --- a/packages/siwe/src/provider.tsx +++ b/packages/siwe/src/provider.tsx @@ -44,7 +44,7 @@ export const SiweProvider = ({ children, backendUrl, api }: SiweProviderProps) = if (authToken === null) { return } - void getAuth().then((res) => res.loggedIn ? setLoggedIn(true) : undefined) + void getAuth().then((res) => (res.loggedIn ? setLoggedIn(true) : undefined)) }, [authToken, getAuth]) const signIn = async (signInOptions?: SignInOptions) => { @@ -64,13 +64,13 @@ export const SiweProvider = ({ children, backendUrl, api }: SiweProviderProps) = nonce, }) const signature = await signer.signMessage(message.prepareMessage()) - + const session = JSON.stringify({ signature, message }) localStorage.setItem('authToken', session) setAuthToken(session) - void getAuth().then((res) => res.loggedIn ? setLoggedIn(true) : undefined) + void getAuth().then((res) => (res.loggedIn ? setLoggedIn(true) : undefined)) } const signOut = async () => { diff --git a/packages/siwe/src/requests.tsx b/packages/siwe/src/requests.tsx index 990843375..b7bc68cc5 100644 --- a/packages/siwe/src/requests.tsx +++ b/packages/siwe/src/requests.tsx @@ -22,11 +22,11 @@ export const getFetchers = (backendUrl: string): SiweFetchers => { const authRequest = await fetch(`${backendUrl}/siwe/me`, { headers: { - 'Authorization': `Bearer ${token}` - } + Authorization: `Bearer ${token}`, + }, }) const authResponse = await authRequest.json() - + return { ...authRequest, ...authResponse, @@ -35,10 +35,10 @@ export const getFetchers = (backendUrl: string): SiweFetchers => { getNonce: async () => { const nonceRequest = await fetch(`${backendUrl}/siwe/init`, { method: 'POST' }) const nonceResponse = await nonceRequest.json() - + return { ...nonceResponse, } as NonceResponse - } + }, } } diff --git a/packages/website/package.json b/packages/website/package.json index 86eae0110..a9f22a5d0 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -6,6 +6,7 @@ "scripts": { "build": "rm -rf dist && gulp build", "lint": "true", + "lint:fix": "true", "test": "true", "compile:sass": "node-sass sass/main.scss css/main.css -w", "gulp": "gulp" From 5229eea3302af616418becb0cf4dc7ce54f59f40 Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Fri, 20 May 2022 14:23:21 +0200 Subject: [PATCH 07/59] =?UTF-8?q?=E2=9C=89=EF=B8=8F=20Add=20useResolveName?= =?UTF-8?q?=20hook=20(#768)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/smart-coats-hang.md | 6 + packages/core/src/hooks/index.ts | 1 + packages/core/src/hooks/useLookupAddress.ts | 46 +++--- packages/core/src/hooks/useResolveName.ts | 43 +++++ packages/core/src/index.ts | 1 + .../02-Guides/07-Migration/1.0.3-to-1.0.4.mdx | 21 +++ packages/example/src/App.tsx | 2 + .../example/src/components/ENS/ENSExample.tsx | 149 ++++++++++++++++++ packages/example/src/components/NavBar.tsx | 4 + .../src/components/account/AccountButton.tsx | 2 +- .../components/account/Web3ModalButton.tsx | 2 +- .../account/Web3ReactConnectorButton.tsx | 2 +- 12 files changed, 258 insertions(+), 21 deletions(-) create mode 100644 .changeset/smart-coats-hang.md create mode 100644 packages/core/src/hooks/useResolveName.ts create mode 100644 packages/docs/docs/02-Guides/07-Migration/1.0.3-to-1.0.4.mdx create mode 100644 packages/example/src/components/ENS/ENSExample.tsx diff --git a/.changeset/smart-coats-hang.md b/.changeset/smart-coats-hang.md new file mode 100644 index 000000000..b987e69d8 --- /dev/null +++ b/.changeset/smart-coats-hang.md @@ -0,0 +1,6 @@ +--- +'@usedapp/core': patch +'@usedapp/example': patch +--- + +Update ENS hooks diff --git a/packages/core/src/hooks/index.ts b/packages/core/src/hooks/index.ts index c99439fae..2b2020ed5 100644 --- a/packages/core/src/hooks/index.ts +++ b/packages/core/src/hooks/index.ts @@ -27,3 +27,4 @@ export * from './useChainMeta' export * from './useReadonlyProvider' export * from './useLogs' export * from './useRawCalls' +export * from './useResolveName' diff --git a/packages/core/src/hooks/useLookupAddress.ts b/packages/core/src/hooks/useLookupAddress.ts index b5d6cfa0a..37f5d652c 100644 --- a/packages/core/src/hooks/useLookupAddress.ts +++ b/packages/core/src/hooks/useLookupAddress.ts @@ -2,39 +2,49 @@ import { useEffect, useState } from 'react' import { useEthers } from './useEthers' /** - * `useLookupAddress` is a hook that is used to retrieve the ENS (e.g. `name.eth`) for the connected wallet. - * @returns a string if the connected account has an ENS attached. + * `useLookupAddress` is a hook that is used to retrieve the ENS (e.g. `name.eth`) for a specific address. + * @param address address to lookup + * @returns {} Object with the following: + - `ens: string | null | undefined` - ENS name of the account or null if not found. + - `isLoading: boolean` - indicates whether the lookup is in progress. + - `error: Error | null` - error that occurred during the lookup or null if no error occurred. * @public * @example * const { account } = useEthers() - * const ens = useLookupAddress() + * const { ens } = useLookupAddress(account) * * return ( *

Account: {ens ?? account}

* ) */ -export function useLookupAddress() { - const { account, library } = useEthers() - const [ens, setEns] = useState() +export function useLookupAddress(address: string | undefined) { + const { library } = useEthers() + const [ens, setENS] = useState() + const [isLoading, setIsLoading] = useState(false) + const [error, setError] = useState(null) useEffect(() => { let mounted = true - if (account && library) { - library - ?.lookupAddress(account) - .then((name) => { - if (mounted) { - setEns(name) - } - }) - .catch(() => setEns(null)) - } + void (async () => { + if (!library || !address) return + try { + setIsLoading(true) + const resolved = await library.lookupAddress(address) + if (!mounted) return + setENS(resolved) + } catch (e: any) { + if (!mounted) return + setError(e) + } finally { + setIsLoading(false) + } + })() return () => { mounted = false } - }, [account, library]) + }, [address, library]) - return ens + return { ens, isLoading, error } } diff --git a/packages/core/src/hooks/useResolveName.ts b/packages/core/src/hooks/useResolveName.ts new file mode 100644 index 000000000..6a9aa2e3a --- /dev/null +++ b/packages/core/src/hooks/useResolveName.ts @@ -0,0 +1,43 @@ +import { useEffect, useState } from 'react' +import { useEthers } from './useEthers' + +/** + * `useLookupAddress` is a hook that is used to resolve an ENS name (e.g. `name.eth`) to a specific address. + * @param name ENS name to be resolved + * @returns {} Object with the following: + - `address: string | null | undefined` - resolved address for the given ENS name or null if not found. + - `isLoading: boolean` - indicates whether the lookup is in progress. + - `error: Error | null` - error that occurred during the lookup or null if no error occurred. + * @public + */ +export const useResolveName = (name: string | undefined) => { + const { library } = useEthers() + const [isLoading, setIsLoading] = useState(false) + const [error, setError] = useState(null) + const [address, setAddress] = useState() + + useEffect(() => { + let mounted = true + + void (async () => { + if (!library || !name) return + try { + setIsLoading(true) + const resolved = await library.resolveName(name) + if (!mounted) return + setAddress(resolved) + } catch (e: any) { + if (!mounted) return + setError(e) + } finally { + setIsLoading(false) + } + })() + + return () => { + mounted = false + } + }, [library, name]) + + return { address, isLoading, error } +} diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 53944c74c..9ee7c731f 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -68,6 +68,7 @@ export { useTransactions, useRawCall, useRawCalls, + useResolveName, } from './hooks' export type { CurrencyFormatOptions, TransactionOptions, TransactionState, TransactionStatus } from './model' export { Currency, CurrencyValue, FiatCurrency, NativeCurrency, Token, transactionErrored } from './model' diff --git a/packages/docs/docs/02-Guides/07-Migration/1.0.3-to-1.0.4.mdx b/packages/docs/docs/02-Guides/07-Migration/1.0.3-to-1.0.4.mdx new file mode 100644 index 000000000..2ff44b298 --- /dev/null +++ b/packages/docs/docs/02-Guides/07-Migration/1.0.3-to-1.0.4.mdx @@ -0,0 +1,21 @@ +# Migrating to 1.0.4 + +## Updated useLookupAddress hook + +`useLookupAddress` hook now takes an argument and returns object instead of string. +The argument is of type `string | undefined` and is the address to be looked up. +The return object consists of three values: +- `ens: string | null | undefined` - ENS name of the account. +- `isLoading: boolean` - indicates whether the lookup is in progress. +- `error: Error | null` - error that occurred during the lookup or null if no error occurred. + +To preserve behaviour of the hook, update your code in the following manner: +````diff + - const ens = useLookupAddress() + + const { account } = useEthers() + + const { ens } = useLookupAddress(account) +```` + +## Added useResolveName hook + +`useResolveName` hook is used to resolve an ENS name to a specific address. You can check out the docs on the hook [here](../../API%20Reference/Hooks#useresolvename). diff --git a/packages/example/src/App.tsx b/packages/example/src/App.tsx index 1c4ce4c2c..7e7779754 100644 --- a/packages/example/src/App.tsx +++ b/packages/example/src/App.tsx @@ -15,6 +15,7 @@ import { Web3Modal } from './pages/Web3Modal' import { Web3ReactConnector } from './pages/Web3ReactConnector' import { Multichain } from './pages/Multichain' import { WalletConnect } from './pages/WalletConnect' +import { ENSExample } from './components/ENS/ENSExample' export function App() { return ( @@ -25,6 +26,7 @@ export function App() { + diff --git a/packages/example/src/components/ENS/ENSExample.tsx b/packages/example/src/components/ENS/ENSExample.tsx new file mode 100644 index 000000000..462600b50 --- /dev/null +++ b/packages/example/src/components/ENS/ENSExample.tsx @@ -0,0 +1,149 @@ +import React, { useState } from 'react' +import { Label } from '../../typography/Label' +import { TextInline } from '../../typography/Text' +import { Title } from '../../typography/Title' +import { MainContent, Container, Section, SectionRow, ContentBlock, ContentRow } from '../base/base' +import { useLookupAddress, useResolveName } from '@usedapp/core' +import styled from 'styled-components' +import { BorderRad, Colors, Transitions } from '../../global/styles' +import { Button } from '../base/Button' + +export const ENSExample = () => { + return ( + + +
+ + +
+
+
+ ) +} + +export const ResolveName = () => { + const [input, setInput] = useState('') + const [name, setName] = useState(undefined) + const { address, isLoading } = useResolveName(name) + + return ( + <> + + Resolve name + + + + + setInput(e.currentTarget.value)} + disabled={isLoading} + /> + setName(input)} disabled={isLoading}> + {isLoading ? 'Loading' : 'Resolve'} + + + + + + {address === null ? 'Address not found' : address} + + + + ) +} + +export const LookupAddress = () => { + const [input, setInput] = useState('') + const [address, setAddress] = useState(undefined) + const { ens, isLoading } = useLookupAddress(address) + + return ( + <> + + Lookup address + + + + + setInput(e.currentTarget.value)} + disabled={isLoading} + /> + setAddress(input)} disabled={isLoading}> + {isLoading ? 'Loading' : 'Lookup'} + + + + + + {ens === null ? 'No name found' : ens} + + + + ) +} + +const Input = styled.input` + height: 100%; + width: 100%; + padding: 0 0 0 24px; + border: 0; + border-radius: ${BorderRad.m}; + -moz-appearance: textfield; + outline: none; + + &::-webkit-outer-spin-button, + &::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + &:-webkit-autofill, + &:-webkit-autofill:hover, + &:-webkit-autofill:focus, + &:-webkit-autofill:active { + -webkit-background-clip: text; + } +` + +const InputRow = styled.div` + height: 44px; + display: flex; + margin: 0 auto; + color: ${Colors.Gray['600']}; + align-items: center; + border: ${Colors.Gray['300']} 1px solid; + border-radius: ${BorderRad.m}; + overflow: hidden; + transition: ${Transitions.all}; + + &:hover, + &:focus-within { + border-color: ${Colors.Black[900]}; + } +` + +const SmallButton = styled(Button)` + display: flex; + justify-content: center; + min-width: 95px; + height: 100%; + padding: 8px 24px; + + &:disabled { + color: ${Colors.Gray['600']}; + cursor: unset; + } + + &:disabled:hover, + &:disabled:focus { + background-color: unset; + color: unset; + } +` diff --git a/packages/example/src/components/NavBar.tsx b/packages/example/src/components/NavBar.tsx index eb9b08c5e..ac4cbffab 100644 --- a/packages/example/src/components/NavBar.tsx +++ b/packages/example/src/components/NavBar.tsx @@ -24,6 +24,10 @@ export function NavBar() { {' '} Prices{' '} + + {' '} + ENS{' '} + {' '} Block{' '} diff --git a/packages/example/src/components/account/AccountButton.tsx b/packages/example/src/components/account/AccountButton.tsx index 0bed9a3b8..9fc373d37 100644 --- a/packages/example/src/components/account/AccountButton.tsx +++ b/packages/example/src/components/account/AccountButton.tsx @@ -8,7 +8,7 @@ import { AccountModal } from './AccountModal' export const AccountButton = () => { const { account, deactivate, activateBrowserWallet } = useEthers() - const ens = useLookupAddress() + const { ens } = useLookupAddress(account) const [showModal, setShowModal] = useState(false) const [activateError, setActivateError] = useState('') diff --git a/packages/example/src/components/account/Web3ModalButton.tsx b/packages/example/src/components/account/Web3ModalButton.tsx index 1f13c9e61..1f442c9a3 100644 --- a/packages/example/src/components/account/Web3ModalButton.tsx +++ b/packages/example/src/components/account/Web3ModalButton.tsx @@ -10,7 +10,7 @@ import WalletConnectProvider from '@walletconnect/web3-provider' export const Web3ModalButton = () => { const { account, activate, deactivate } = useEthers() - const ens = useLookupAddress() + const { ens } = useLookupAddress(account) const [showModal, setShowModal] = useState(false) const [activateError, setActivateError] = useState('') const { error } = useEthers() diff --git a/packages/example/src/components/account/Web3ReactConnectorButton.tsx b/packages/example/src/components/account/Web3ReactConnectorButton.tsx index 859e6f98e..731e7ea9d 100644 --- a/packages/example/src/components/account/Web3ReactConnectorButton.tsx +++ b/packages/example/src/components/account/Web3ReactConnectorButton.tsx @@ -15,7 +15,7 @@ const NETWORK_CONNECTIONS = { export const Web3ReactConnectorButton = () => { const { account, activate, deactivate } = useEthers() - const ens = useLookupAddress() + const { ens } = useLookupAddress(account) const [showModal, setShowModal] = useState(false) const [activateError, setActivateError] = useState('') const { error } = useEthers() From 1db0df9535e6e521e45d0cdaf05bd4facb4c179b Mon Sep 17 00:00:00 2001 From: Przemyslaw Rzad Date: Mon, 23 May 2022 10:39:42 +0200 Subject: [PATCH 08/59] =?UTF-8?q?=F0=9F=8C=B3=20Do=20not=20include=20ignor?= =?UTF-8?q?ed=20package=20in=20changeset=20(#773)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/smart-coats-hang.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.changeset/smart-coats-hang.md b/.changeset/smart-coats-hang.md index b987e69d8..f191a2735 100644 --- a/.changeset/smart-coats-hang.md +++ b/.changeset/smart-coats-hang.md @@ -1,6 +1,5 @@ --- '@usedapp/core': patch -'@usedapp/example': patch --- Update ENS hooks From 360752c66ce57fe9f26e25580ae3a9fe9fb2c453 Mon Sep 17 00:00:00 2001 From: truefi-bot <102036168+truefi-bot@users.noreply.github.com> Date: Mon, 23 May 2022 10:50:21 +0200 Subject: [PATCH 09/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#745)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: truefi-bot --- .changeset/add-percentage-margin.md | 5 ----- .changeset/add-use-logs.md | 5 ----- .changeset/clever-jars-wait.md | 5 ----- .changeset/green-keys-juggle.md | 5 ----- .changeset/nasty-coins-scream.md | 5 ----- .changeset/quick-knives-occur.md | 5 ----- .changeset/smart-coats-hang.md | 5 ----- .changeset/yellow-seahorses-live.md | 5 ----- .changeset/young-boxes-design.md | 5 ----- packages/coingecko/CHANGELOG.md | 15 +++++++++++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 13 +++++++++++++ packages/core/package.json | 2 +- packages/testing/CHANGELOG.md | 14 ++++++++++++++ packages/testing/package.json | 2 +- 15 files changed, 45 insertions(+), 48 deletions(-) delete mode 100644 .changeset/add-percentage-margin.md delete mode 100644 .changeset/add-use-logs.md delete mode 100644 .changeset/clever-jars-wait.md delete mode 100644 .changeset/green-keys-juggle.md delete mode 100644 .changeset/nasty-coins-scream.md delete mode 100644 .changeset/quick-knives-occur.md delete mode 100644 .changeset/smart-coats-hang.md delete mode 100644 .changeset/yellow-seahorses-live.md delete mode 100644 .changeset/young-boxes-design.md diff --git a/.changeset/add-percentage-margin.md b/.changeset/add-percentage-margin.md deleted file mode 100644 index 9e79d6b2f..000000000 --- a/.changeset/add-percentage-margin.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -βœ–οΈ Add percentage margin for useTransaction diff --git a/.changeset/add-use-logs.md b/.changeset/add-use-logs.md deleted file mode 100644 index 3e78783d9..000000000 --- a/.changeset/add-use-logs.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -🧻 Add useLogs hook diff --git a/.changeset/clever-jars-wait.md b/.changeset/clever-jars-wait.md deleted file mode 100644 index 7f39b6549..000000000 --- a/.changeset/clever-jars-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -πŸ› Fix EventRecord type issue diff --git a/.changeset/green-keys-juggle.md b/.changeset/green-keys-juggle.md deleted file mode 100644 index 6e39f33ce..000000000 --- a/.changeset/green-keys-juggle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -Add error throwing to browser wallet activation diff --git a/.changeset/nasty-coins-scream.md b/.changeset/nasty-coins-scream.md deleted file mode 100644 index ee42593df..000000000 --- a/.changeset/nasty-coins-scream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -βš—οΈ Support `isolatedModules` diff --git a/.changeset/quick-knives-occur.md b/.changeset/quick-knives-occur.md deleted file mode 100644 index 3c264b889..000000000 --- a/.changeset/quick-knives-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -Improved handling of Falsy parameters in hooks diff --git a/.changeset/smart-coats-hang.md b/.changeset/smart-coats-hang.md deleted file mode 100644 index f191a2735..000000000 --- a/.changeset/smart-coats-hang.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -Update ENS hooks diff --git a/.changeset/yellow-seahorses-live.md b/.changeset/yellow-seahorses-live.md deleted file mode 100644 index 3e90ea910..000000000 --- a/.changeset/yellow-seahorses-live.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -πŸͺ΅ Add useRawLogs hook diff --git a/.changeset/young-boxes-design.md b/.changeset/young-boxes-design.md deleted file mode 100644 index fbe85a2e6..000000000 --- a/.changeset/young-boxes-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/coingecko": patch ---- - -πŸ› Fix CoinGecko Invalid Hook Call Error diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index 14442c686..1bffb088a 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,20 @@ # @usedapp/coingecko +## 1.0.3 + +### Patch Changes + +- 9a8906e: πŸ› Fix CoinGecko Invalid Hook Call Error +- Updated dependencies [4e8025b] +- Updated dependencies [ad8b91a] +- Updated dependencies [17b8021] +- Updated dependencies [d9e2ff3] +- Updated dependencies [3904895] +- Updated dependencies [bd27e6b] +- Updated dependencies [5229eea] +- Updated dependencies [8701d7d] + - @usedapp/core@1.0.3 + ## 1.0.2 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index 32f3a763c..4893835a9 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.2", + "version": "1.0.3", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index b362aba6c..0b07008f0 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,18 @@ # @usedapp/core +## 1.0.3 + +### Patch Changes + +- 4e8025b: βœ–οΈ Add percentage margin for useTransaction +- ad8b91a: 🧻 Add useLogs hook +- 17b8021: πŸ› Fix EventRecord type issue +- d9e2ff3: Add error throwing to browser wallet activation +- 3904895: βš—οΈ Support `isolatedModules` +- bd27e6b: Improved handling of Falsy parameters in hooks +- 5229eea: Update ENS hooks +- 8701d7d: πŸͺ΅ Add useRawLogs hook + ## 1.0.2 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 2ab3a7279..a36e77361 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.2", + "version": "1.0.3", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 5c8081f36..689f8f7fc 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,19 @@ # @usedapp/testing +## 1.0.3 + +### Patch Changes + +- Updated dependencies [4e8025b] +- Updated dependencies [ad8b91a] +- Updated dependencies [17b8021] +- Updated dependencies [d9e2ff3] +- Updated dependencies [3904895] +- Updated dependencies [bd27e6b] +- Updated dependencies [5229eea] +- Updated dependencies [8701d7d] + - @usedapp/core@1.0.3 + ## 1.0.2 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index 8b1aad674..e94abe320 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.2", + "version": "1.0.3", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git", From 411d0383de907c0ed2ba24bb9a48490329153596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Mon, 23 May 2022 10:51:48 +0200 Subject: [PATCH 10/59] =?UTF-8?q?=F0=9F=9B=A1=20Add=20guards=20for=20bad?= =?UTF-8?q?=20requests=20in=20SIWE=20(#769)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: mateusz --- packages/siwe/src/provider.tsx | 10 +++++++--- packages/siwe/src/requests.tsx | 28 ++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/packages/siwe/src/provider.tsx b/packages/siwe/src/provider.tsx index 713617ca3..121facae4 100644 --- a/packages/siwe/src/provider.tsx +++ b/packages/siwe/src/provider.tsx @@ -8,7 +8,7 @@ export interface SiweContextValue { signIn: (signInOptions?: SignInOptions) => void signOut: () => void isLoggedIn: boolean - authToken: string | undefined + authToken: string | undefined | null } const SiweContext = createContext({ @@ -37,10 +37,10 @@ export const SiweProvider = ({ children, backendUrl, api }: SiweProviderProps) = const { account, chainId, library } = useEthers() const [isLoggedIn, setLoggedIn] = useState(false) const { getNonce, getAuth } = api ?? getFetchers(backendUrl ?? '') - const [authToken, setAuthToken] = useState(undefined) + const [authToken, setAuthToken] = useState(undefined) useEffect(() => { - setAuthToken(localStorage.getItem('authToken') ?? undefined) + setAuthToken(localStorage.getItem('authToken')) if (authToken === null) { return } @@ -54,6 +54,10 @@ export const SiweProvider = ({ children, backendUrl, api }: SiweProviderProps) = const signer = library.getSigner() const { nonce } = await getNonce() + if (!nonce) { + return + } + const message = new SiweMessage({ domain: signInOptions?.domain ?? window.location.host, address: await signer.getAddress(), diff --git a/packages/siwe/src/requests.tsx b/packages/siwe/src/requests.tsx index b7bc68cc5..128cf0f94 100644 --- a/packages/siwe/src/requests.tsx +++ b/packages/siwe/src/requests.tsx @@ -1,12 +1,12 @@ import { SiweMessage } from 'siwe' export interface NonceResponse { - nonce: string + nonce: string | undefined ok: boolean } export interface AuthResponse { - message: SiweMessage + message: SiweMessage | undefined loggedIn: boolean } @@ -15,16 +15,35 @@ export interface SiweFetchers { getAuth: () => Promise } +const failedAuthResponse = { + loggedIn: false, + message: undefined +} + +const failedNonceResponse = { + nonce: undefined, + ok: false, +} + export const getFetchers = (backendUrl: string): SiweFetchers => { return { getAuth: async () => { const token = localStorage.getItem('authToken') + if (token === undefined || token === null) { + return failedAuthResponse + } + const authRequest = await fetch(`${backendUrl}/siwe/me`, { headers: { Authorization: `Bearer ${token}`, }, }) + + if (!authRequest.ok) { + return failedAuthResponse + } + const authResponse = await authRequest.json() return { @@ -34,6 +53,11 @@ export const getFetchers = (backendUrl: string): SiweFetchers => { }, getNonce: async () => { const nonceRequest = await fetch(`${backendUrl}/siwe/init`, { method: 'POST' }) + + if (!nonceRequest.ok) { + return failedNonceResponse + } + const nonceResponse = await nonceRequest.json() return { From fe52f50cd4e00cfe333551c54c1833068bd9ab1a Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Wed, 25 May 2022 14:28:15 +0200 Subject: [PATCH 11/59] =?UTF-8?q?=F0=9F=A5=9D=20Add=20fast=20multicall=20e?= =?UTF-8?q?ncoding=20option=20(#775)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/shiny-jobs-applaud.md | 5 + packages/core/.eslintrc.js | 3 + packages/core/src/abi/benchmark.ts | 31 +++ packages/core/src/abi/common.ts | 12 + packages/core/src/abi/multicall/constants.ts | 4 + .../core/src/abi/multicall/decoder.test.ts | 34 +++ packages/core/src/abi/multicall/decoder.ts | 32 +++ .../core/src/abi/multicall/encoder.test.ts | 40 +++ packages/core/src/abi/multicall/encoder.ts | 17 ++ packages/core/src/abi/multicall/index.ts | 2 + packages/core/src/abi/multicall2/constants.ts | 7 + .../core/src/abi/multicall2/decoder.test.ts | 34 +++ packages/core/src/abi/multicall2/decoder.ts | 41 +++ .../core/src/abi/multicall2/encoder.test.ts | 46 ++++ packages/core/src/abi/multicall2/encoder.ts | 51 ++++ packages/core/src/abi/multicall2/index.ts | 2 + packages/core/src/constants/type/Config.ts | 4 + .../chainState/common/multicall.test.ts | 125 ++++----- .../providers/chainState/common/multicall.ts | 33 +++ .../chainState/common/multicall2.test.ts | 246 +++++++++--------- .../providers/chainState/common/multicall2.ts | 36 +++ .../chainState/multiChainStates/provider.tsx | 8 +- .../docs/docs/03-API Reference/03-Models.mdx | 15 +- packages/example/src/index.tsx | 1 + 24 files changed, 645 insertions(+), 184 deletions(-) create mode 100644 .changeset/shiny-jobs-applaud.md create mode 100644 packages/core/src/abi/benchmark.ts create mode 100644 packages/core/src/abi/common.ts create mode 100644 packages/core/src/abi/multicall/constants.ts create mode 100644 packages/core/src/abi/multicall/decoder.test.ts create mode 100644 packages/core/src/abi/multicall/decoder.ts create mode 100644 packages/core/src/abi/multicall/encoder.test.ts create mode 100644 packages/core/src/abi/multicall/encoder.ts create mode 100644 packages/core/src/abi/multicall/index.ts create mode 100644 packages/core/src/abi/multicall2/constants.ts create mode 100644 packages/core/src/abi/multicall2/decoder.test.ts create mode 100644 packages/core/src/abi/multicall2/decoder.ts create mode 100644 packages/core/src/abi/multicall2/encoder.test.ts create mode 100644 packages/core/src/abi/multicall2/encoder.ts create mode 100644 packages/core/src/abi/multicall2/index.ts diff --git a/.changeset/shiny-jobs-applaud.md b/.changeset/shiny-jobs-applaud.md new file mode 100644 index 000000000..0a1651018 --- /dev/null +++ b/.changeset/shiny-jobs-applaud.md @@ -0,0 +1,5 @@ +--- +'@usedapp/core': patch +--- + +Add fast encoding options diff --git a/packages/core/.eslintrc.js b/packages/core/.eslintrc.js index 39be3a73e..6435c7041 100644 --- a/packages/core/.eslintrc.js +++ b/packages/core/.eslintrc.js @@ -1,3 +1,6 @@ module.exports = { extends: [`${__dirname}/../../.eslintrc.json`, 'plugin:react-hooks/recommended'], + env: { + es2020: true + } } diff --git a/packages/core/src/abi/benchmark.ts b/packages/core/src/abi/benchmark.ts new file mode 100644 index 000000000..8c6f5fec7 --- /dev/null +++ b/packages/core/src/abi/benchmark.ts @@ -0,0 +1,31 @@ +export interface BenchResult { + iterations: number + timePerIter: bigint + iterPerSec: bigint +} + +export function bench(func: () => void): BenchResult { + let totalElapsed = BigInt(0) + let iterations = 0 + while (iterations++ < 10_000) { + const before = process.hrtime.bigint() + func() + const after = process.hrtime.bigint() + totalElapsed += after - before + if (totalElapsed > BigInt(1_000_000_000)) { + break + } + } + + const timePerIter = totalElapsed / BigInt(iterations) + const iterPerSec = (BigInt(1_000_000_000) * BigInt(iterations)) / totalElapsed + return { iterations, timePerIter, iterPerSec } +} + +export function formatBench(result: BenchResult, label?: string) { + console.log( + `${label || 'bench'}: ${result.iterPerSec} iterations/sec, ${result.timePerIter} ns/iter, made ${ + result.iterations + } iters` + ) +} diff --git a/packages/core/src/abi/common.ts b/packages/core/src/abi/common.ts new file mode 100644 index 000000000..b829d7f47 --- /dev/null +++ b/packages/core/src/abi/common.ts @@ -0,0 +1,12 @@ +// number of bytes in the hext string - '0x' at the start doesn't count +// each two characters are one byte +export const buffLength = (buf: string) => (buf.length - 2) / 2 +// length of the buffer padded to the nearest 32 bytes +export const bufPaddedLength = (buf: string) => Math.ceil(buffLength(buf) / 32) * 32 +export const encodeUint = (uint: number) => uint.toString(16).padStart(64, '0') +export const decodeUint = (buf: string) => parseInt(buf, 16) +// word length in characters - 32 bytes = 64 characters +export const wordLength = 64 +export const fail = () => { + throw new Error('Invalid calldata') +} diff --git a/packages/core/src/abi/multicall/constants.ts b/packages/core/src/abi/multicall/constants.ts new file mode 100644 index 000000000..ffef48d02 --- /dev/null +++ b/packages/core/src/abi/multicall/constants.ts @@ -0,0 +1,4 @@ +import { Interface } from '@ethersproject/abi' +import MultiCall from '../../constants/abi/MultiCall.json' + +export const ethersAbi = new Interface(MultiCall.abi) diff --git a/packages/core/src/abi/multicall/decoder.test.ts b/packages/core/src/abi/multicall/decoder.test.ts new file mode 100644 index 000000000..2d16ab4c1 --- /dev/null +++ b/packages/core/src/abi/multicall/decoder.test.ts @@ -0,0 +1,34 @@ +import { expect } from 'chai' +import { randomBytes } from 'crypto' +import { formatBench, bench } from '../benchmark' +import { ethersAbi } from './constants' +import { decodeAggregate } from './decoder' + +describe('Multicall decoder', () => { + const testData: [number, string[]] = [ + 1, + Array.from(Array(20).keys()).map((i) => '0x' + randomBytes((i + 1) * 8).toString('hex')), + ] + const encoded = ethersAbi.encodeFunctionResult('aggregate', testData) + + it('Properly decodes', () => { + const manual = decodeAggregate(encoded) + expect(manual).to.deep.eq(testData) + }) + + it('bench ethers', () => { + formatBench( + bench(() => { + ethersAbi.decodeFunctionResult('aggregate', encoded) + }) + ) + }) + + it('bench manual', () => { + formatBench( + bench(() => { + decodeAggregate(encoded) + }) + ) + }) +}) diff --git a/packages/core/src/abi/multicall/decoder.ts b/packages/core/src/abi/multicall/decoder.ts new file mode 100644 index 000000000..6b9d0e2cd --- /dev/null +++ b/packages/core/src/abi/multicall/decoder.ts @@ -0,0 +1,32 @@ +import { decodeUint, fail, wordLength } from '../common' + +export function decodeAggregate(calldata: string): [number, string[]] { + // function aggregate(tuple(address target, bytes callData)[] calls) public returns (tuple(uint256 blockNumber, bytes returnData)[]) + const errorMethodId = '0x08c379a0' + if (calldata.startsWith(errorMethodId)) { + throw new Error('Multicall aggregate: call failed') + } + calldata = calldata.slice(2) // 'remove 0x prefix' + const getNumber = (offset: number) => decodeUint(calldata.slice(offset * wordLength, (offset + 1) * wordLength)) + + const blockNumber = getNumber(0) + // The array offset must be 0x40 - blockNumber + array offset + if (getNumber(1) !== 0x40) { + fail() + } + const arraySize = getNumber(2) + const calls: string[] = [] + + for (let i = 0; i < arraySize; i++) { + // offset of the call number i + const callOffset = 2 * getNumber(i + 3) + 3 * wordLength // * 2 because 1 byte = 2 chars + // position of the call if we split calldata in chunks of 32 bytes + const pos = callOffset / wordLength + // returnData is encoded as its length and the data itself + const returnDataOffset = (pos + 1) * wordLength + const returnDataLength = getNumber(pos) + const returnData = calldata.slice(returnDataOffset, returnDataOffset + 2 * returnDataLength) // * 2 because 1 byte = 2 chars + calls.push('0x' + returnData) + } + return [blockNumber, calls] +} diff --git a/packages/core/src/abi/multicall/encoder.test.ts b/packages/core/src/abi/multicall/encoder.test.ts new file mode 100644 index 000000000..ddf58580c --- /dev/null +++ b/packages/core/src/abi/multicall/encoder.test.ts @@ -0,0 +1,40 @@ +import { expect } from 'chai' +import { Wallet } from 'ethers' +import { formatBench, bench } from '../benchmark' +import { ethersAbi } from './constants' +import { encodeAggregate } from './encoder' + +describe('Multicall encoder', () => { + const address = Wallet.createRandom().address + + const calls = [ + ...[...Array(10)].map(() => ethersAbi.encodeFunctionData('getCurrentBlockGasLimit')), + ...[...Array(10)].map((_, i) => ethersAbi.encodeFunctionData('getBlockHash', [i])), + ] + + it('Properly encodes', () => { + const calldata = ethersAbi.encodeFunctionData('aggregate', [calls.map((calldata) => [address, calldata])]) + + const manual = encodeAggregate(calls.map((calldata) => [address, calldata])) + + expect(manual).to.eq(calldata) + }) + + it('bench ethers', () => { + const callsLong = [...Array(20)].flatMap(() => calls) + formatBench( + bench(() => { + ethersAbi.encodeFunctionData('aggregate', [callsLong.map((calldata) => [address, calldata])]) + }) + ) + }) + + it('bench manual', () => { + const callsLong = [...Array(20)].flatMap(() => calls) + formatBench( + bench(() => { + encodeAggregate(callsLong.map((calldata) => [address, calldata])) + }) + ) + }) +}) diff --git a/packages/core/src/abi/multicall/encoder.ts b/packages/core/src/abi/multicall/encoder.ts new file mode 100644 index 000000000..ea126ef9a --- /dev/null +++ b/packages/core/src/abi/multicall/encoder.ts @@ -0,0 +1,17 @@ +import { encodeUint } from '../common' +import { encodeCalls } from '../multicall2/encoder' +import { ethersAbi } from './constants' + +const selector = ethersAbi.getSighash('aggregate') + +export function encodeAggregate(calls: [string, string][]) { + // function aggregate(tuple(address target, bytes callData)[] calls) public returns (tuple(uint256 blockNumber, bytes returnData)[]) + + // offset of the array is 0x20 because the only thing + // that goes before the array is the offset itself + const dynamicOffset = 0x20 + const res = selector + encodeUint(dynamicOffset) + + // encode dynamic array of calls + return encodeCalls(res, calls) +} diff --git a/packages/core/src/abi/multicall/index.ts b/packages/core/src/abi/multicall/index.ts new file mode 100644 index 000000000..690ca20a2 --- /dev/null +++ b/packages/core/src/abi/multicall/index.ts @@ -0,0 +1,2 @@ +export { encodeAggregate } from './encoder' +export { decodeAggregate } from './decoder' diff --git a/packages/core/src/abi/multicall2/constants.ts b/packages/core/src/abi/multicall2/constants.ts new file mode 100644 index 000000000..f1c352376 --- /dev/null +++ b/packages/core/src/abi/multicall2/constants.ts @@ -0,0 +1,7 @@ +import { Interface } from '@ethersproject/abi' +import MultiCall2 from '../../constants/abi/MultiCall2.json' + +export const ethersAbi = new Interface(MultiCall2.abi) + +export const trueEncoded = '0'.repeat(63) + '1' +export const falseEncoded = '0'.repeat(63) + '0' diff --git a/packages/core/src/abi/multicall2/decoder.test.ts b/packages/core/src/abi/multicall2/decoder.test.ts new file mode 100644 index 000000000..89a7bab00 --- /dev/null +++ b/packages/core/src/abi/multicall2/decoder.test.ts @@ -0,0 +1,34 @@ +import { expect } from 'chai' +import { randomBytes } from 'crypto' +import { formatBench, bench } from '../benchmark' +import { ethersAbi } from './constants' +import { decodeTryAggregate } from './decoder' + +describe('Multicall v2 decoder', () => { + const testData: [boolean, string][] = Array.from(Array(20).keys()).map((i) => [ + Math.random() < 0.5, + '0x' + randomBytes((i + 1) * 8).toString('hex'), + ]) + const encoded = ethersAbi.encodeFunctionResult('tryAggregate', [testData]) + + it('Properly decodes', () => { + const manual = decodeTryAggregate(encoded) + expect(manual).to.deep.eq([testData]) + }) + + it('bench ethers', () => { + formatBench( + bench(() => { + ethersAbi.decodeFunctionResult('tryAggregate', encoded) + }) + ) + }) + + it('bench manual', () => { + formatBench( + bench(() => { + decodeTryAggregate(encoded) + }) + ) + }) +}) diff --git a/packages/core/src/abi/multicall2/decoder.ts b/packages/core/src/abi/multicall2/decoder.ts new file mode 100644 index 000000000..75e788d5d --- /dev/null +++ b/packages/core/src/abi/multicall2/decoder.ts @@ -0,0 +1,41 @@ +import { decodeUint, wordLength, fail } from '../common' + +export function decodeTryAggregate(calldata: string) { + // function tryAggregate(bool requireSuccess, tuple(address target, bytes callData)[] calls) public returns (tuple(bool success, bytes returnData)[]) + const errorMethodId = '0x08c379a0' + if (calldata.startsWith(errorMethodId)) { + throw new Error('Multicall2 aggregate: call failed') + } + calldata = calldata.slice(2) // 'remove 0x prefix' + const getNumber = (offset: number) => decodeUint(calldata.slice(offset * wordLength, (offset + 1) * wordLength)) + + // The array offset must be 0x20 - nothing is before the array + if (getNumber(0) !== 0x20) { + fail() + } + const arraySize = getNumber(1) + const calls: [boolean, string][] = [] + + for (let i = 0; i < arraySize; i++) { + // offset of the call number i + const callOffset = 2 * getNumber(i + 2) + 2 * wordLength + // position of the call if we split calldata in chunks of 32 bytes + const pos = callOffset / wordLength + // returnData is encoded as a flag showing if the call was successful, + // data offset, which should be equal to 0x40, data length and the data itself + const successEncoded = getNumber(pos) + if (successEncoded !== 1 && successEncoded !== 0) { + fail() + } + const success = successEncoded === 1 + if (getNumber(pos + 1) !== 0x40) { + fail() + } + const returnDataOffset = (pos + 3) * wordLength + const returnDataLength = getNumber(pos + 2) + const returnData = calldata.slice(returnDataOffset, returnDataOffset + 2 * returnDataLength) + const call: [boolean, string] = [success, '0x' + returnData] + calls.push(call) + } + return [calls] +} diff --git a/packages/core/src/abi/multicall2/encoder.test.ts b/packages/core/src/abi/multicall2/encoder.test.ts new file mode 100644 index 000000000..f1cd98b57 --- /dev/null +++ b/packages/core/src/abi/multicall2/encoder.test.ts @@ -0,0 +1,46 @@ +import { expect } from 'chai' +import { Wallet } from 'ethers' +import { formatBench, bench } from '../benchmark' +import { ethersAbi } from './constants' +import { encodeTryAggregate } from './encoder' + +describe('Multicall v2 encoder', () => { + const address = Wallet.createRandom().address + + const calls = [ + ...[...Array(10)].map(() => ethersAbi.encodeFunctionData('getCurrentBlockGasLimit')), + ...[...Array(10)].map((_, i) => ethersAbi.encodeFunctionData('getBlockHash', [i])), + ] + + it('Properly encodes', () => { + const calldata = ethersAbi.encodeFunctionData('tryAggregate', [true, calls.map((calldata) => [address, calldata])]) + + const manual = encodeTryAggregate( + true, + calls.map((calldata) => [address, calldata]) + ) + + expect(manual).to.eq(calldata) + }) + + it('bench ethers', () => { + const callsLong = [...Array(20)].flatMap(() => calls) + formatBench( + bench(() => { + ethersAbi.encodeFunctionData('tryAggregate', [true, callsLong.map((calldata) => [address, calldata])]) + }) + ) + }) + + it('bench manual', () => { + const callsLong = [...Array(20)].flatMap(() => calls) + formatBench( + bench(() => { + encodeTryAggregate( + true, + callsLong.map((calldata) => [address, calldata]) + ) + }) + ) + }) +}) diff --git a/packages/core/src/abi/multicall2/encoder.ts b/packages/core/src/abi/multicall2/encoder.ts new file mode 100644 index 000000000..4462bdc5f --- /dev/null +++ b/packages/core/src/abi/multicall2/encoder.ts @@ -0,0 +1,51 @@ +import { encodeUint, bufPaddedLength, buffLength } from '../common' +import { ethersAbi, falseEncoded, trueEncoded } from './constants' + +const selector = ethersAbi.getSighash('tryAggregate') + +export function encodeCalls(start: string, calls: [string, string][]) { + let res = start + // the first offset is calls.length * 0x20 because the first + // item of a dynamic array starts after all offsets + let dynamicOffset = calls.length * 0x20 + // number of items in the array + res += encodeUint(calls.length) + for (const call of calls) { + // offset of the current call + res += encodeUint(dynamicOffset) + // offset for the next call - current offset + // + length of the current call + // + space taken by the current offset + // + the first item in the next tuple - address for the next call + // + space taken by the offset for the next call data + dynamicOffset += 3 * 0x20 + bufPaddedLength(call[1]) + } + + for (const call of calls) { + // address + calldata offset + dynamicOffset = 0x40 + res += '000000000000000000000000' + call[0].slice(2).toLowerCase() + res += encodeUint(dynamicOffset) + + // call data length + res += buffLength(call[1]).toString(16).padStart(64, '0') + // calldata + res += call[1].slice(2).padEnd(bufPaddedLength(call[1]) * 2, '0') + } + + return res +} + +export function encodeTryAggregate(b: boolean, calls: [string, string][]) { + // function tryAggregate(bool requireSuccess, tuple(address target, bytes callData)[] calls) public returns (tuple(bool success, bytes returnData)[]) + let res = selector + + // offset of the array is 0x40 because we need to + // encode requireSuccess flag and the offset itself + const dynamicOffset = 0x40 + res += b ? trueEncoded : falseEncoded + res += encodeUint(dynamicOffset) + + // encode dynamic array of calls + return encodeCalls(res, calls) +} diff --git a/packages/core/src/abi/multicall2/index.ts b/packages/core/src/abi/multicall2/index.ts new file mode 100644 index 000000000..664beb76f --- /dev/null +++ b/packages/core/src/abi/multicall2/index.ts @@ -0,0 +1,2 @@ +export { encodeTryAggregate } from './encoder' +export { decodeTryAggregate } from './decoder' diff --git a/packages/core/src/constants/type/Config.ts b/packages/core/src/constants/type/Config.ts index 2615d8bbc..9ca1926c6 100644 --- a/packages/core/src/constants/type/Config.ts +++ b/packages/core/src/constants/type/Config.ts @@ -32,6 +32,10 @@ export type FullConfig = { * Version of multicall contract on the chain. */ multicallVersion: 1 | 2 + /** + * @experimental + */ + fastMulticallEncoding?: boolean /** * @deprecated */ diff --git a/packages/core/src/providers/chainState/common/multicall.test.ts b/packages/core/src/providers/chainState/common/multicall.test.ts index 4459cafb8..72367dcb1 100644 --- a/packages/core/src/providers/chainState/common/multicall.test.ts +++ b/packages/core/src/providers/chainState/common/multicall.test.ts @@ -4,9 +4,10 @@ import { Contract } from '@ethersproject/contracts' import chai, { expect } from 'chai' import { deployContract, solidity } from 'ethereum-waffle' import chaiAsPromised from 'chai-as-promised' -import { RawCall, ERC20Mock, MultiCall, multicall } from '../../..' +import { RawCall, ERC20Mock, MultiCall } from '../../..' import { BigNumber } from '@ethersproject/bignumber' import { sendEmptyTx } from '../../../testing/utils/sendEmptyTx' +import { multicall1Factory } from './multicall' chai.use(solidity) chai.use(chaiAsPromised) @@ -24,69 +25,75 @@ describe('Multicall', () => { multicallContract = await deployContract(deployer, MultiCall) }) - it('Retrieves token balance using aggregate', async () => { - const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) - const call: RawCall = { - address: tokenContract.address, - data, - chainId: mockProvider._network.chainId, - } + for (const fastEncoding of [false, true]) { + describe(fastEncoding ? 'Fast encoding' : 'Ethers encoding', () => { + const multicall = multicall1Factory(fastEncoding) - const blockNumber = await mockProvider.getBlockNumber() - const result = await multicall(mockProvider, multicallContract.address, blockNumber, [call]) - const unwrappedResult = result[tokenContract.address]![data] - expect(BigNumber.from(unwrappedResult?.value)).to.eq('10000') - }) + it('Retrieves token balance using aggregate', async () => { + const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) + const call: RawCall = { + address: tokenContract.address, + data, + chainId: mockProvider._network.chainId, + } - it('Fails to retrieve data on block number in the future', async () => { - const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) - const call: RawCall = { - address: tokenContract.address, - data, - chainId: mockProvider._network.chainId, - } + const blockNumber = await mockProvider.getBlockNumber() + const result = await multicall(mockProvider, multicallContract.address, blockNumber, [call]) + const unwrappedResult = result[tokenContract.address]![data] + expect(BigNumber.from(unwrappedResult?.value)).to.eq('10000') + }) - const blockNumber = (await mockProvider.getBlockNumber()) + 1 - await expect(multicall(mockProvider, multicallContract.address, blockNumber, [call])).to.be.eventually.rejected - }) + it('Fails to retrieve data on block number in the future', async () => { + const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) + const call: RawCall = { + address: tokenContract.address, + data, + chainId: mockProvider._network.chainId, + } - it('Does not fail when retrieving data on block number from the past', async () => { - const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) - const call: RawCall = { - address: tokenContract.address, - data, - chainId: mockProvider._network.chainId, - } + const blockNumber = (await mockProvider.getBlockNumber()) + 1 + await expect(multicall(mockProvider, multicallContract.address, blockNumber, [call])).to.be.eventually.rejected + }) - await sendEmptyTx(deployer) - const blockNumber = (await mockProvider.getBlockNumber()) - 1 - const result = await multicall(mockProvider, multicallContract.address, blockNumber, [call]) - const unwrappedResult = result[tokenContract.address]![data] - expect(BigNumber.from(unwrappedResult?.value)).to.eq('10000') - }) + it('Does not fail when retrieving data on block number from the past', async () => { + const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) + const call: RawCall = { + address: tokenContract.address, + data, + chainId: mockProvider._network.chainId, + } - it('Does not fail when doing multiple calls at once', async () => { - const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) - const call: RawCall = { - address: tokenContract.address, - data, - chainId: mockProvider._network.chainId, - } + await sendEmptyTx(deployer) + const blockNumber = (await mockProvider.getBlockNumber()) - 1 + const result = await multicall(mockProvider, multicallContract.address, blockNumber, [call]) + const unwrappedResult = result[tokenContract.address]![data] + expect(BigNumber.from(unwrappedResult?.value)).to.eq('10000') + }) - const blockNumber = await mockProvider.getBlockNumber() - await Promise.all([ - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - multicall(mockProvider, multicallContract.address, blockNumber, [call]), - ]) - }) + it('Does not fail when doing multiple calls at once', async () => { + const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) + const call: RawCall = { + address: tokenContract.address, + data, + chainId: mockProvider._network.chainId, + } + + const blockNumber = await mockProvider.getBlockNumber() + await Promise.all([ + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + multicall(mockProvider, multicallContract.address, blockNumber, [call]), + ]) + }) + }) + } }) diff --git a/packages/core/src/providers/chainState/common/multicall.ts b/packages/core/src/providers/chainState/common/multicall.ts index 393e97922..4b40cac0a 100644 --- a/packages/core/src/providers/chainState/common/multicall.ts +++ b/packages/core/src/providers/chainState/common/multicall.ts @@ -1,6 +1,7 @@ import { BigNumber } from '@ethersproject/bignumber' import { Contract } from '@ethersproject/contracts' import { Provider } from '@ethersproject/providers' +import { encodeAggregate, decodeAggregate } from '../../../abi/multicall' import { RawCall } from './callsReducer' import { ChainState } from './model' @@ -8,6 +9,11 @@ const ABI = [ 'function aggregate(tuple(address target, bytes callData)[] calls) view returns (uint256 blockNumber, bytes[] returnData)', ] +/** + * @public + */ +export const multicall1Factory = (fastEncoding: boolean) => (fastEncoding ? fastEncodingMulticall : multicall) + /** * @public */ @@ -25,6 +31,33 @@ export async function multicall( requests.map(({ address, data }) => [address, data]), { blockTag: blockNumber } ) + return decodeResult(results, requests) +} + +/** + * @public + */ +export async function fastEncodingMulticall( + provider: Provider, + address: string, + blockNumber: number, + requests: RawCall[] +): Promise { + if (requests.length === 0) { + return {} + } + const response = await provider.call( + { + to: address, + data: encodeAggregate(requests.map(({ address, data }) => [address, data])), + }, + blockNumber + ) + const [, results] = decodeAggregate(response) + return decodeResult(results, requests) +} + +function decodeResult(results: string[], requests: RawCall[]) { const state: ChainState = {} for (let i = 0; i < requests.length; i++) { const { address, data } = requests[i] diff --git a/packages/core/src/providers/chainState/common/multicall2.test.ts b/packages/core/src/providers/chainState/common/multicall2.test.ts index 94032893f..0f3464e01 100644 --- a/packages/core/src/providers/chainState/common/multicall2.test.ts +++ b/packages/core/src/providers/chainState/common/multicall2.test.ts @@ -8,7 +8,7 @@ import { BigNumber } from '@ethersproject/bignumber' import { utils } from 'ethers' import { ERC20Mock, MultiCall2 } from '../../../constants' import { RawCall } from './callsReducer' -import { multicall2 } from './multicall2' +import { multicall2Factory } from './multicall2' import { sendEmptyTx } from '../../../testing/utils/sendEmptyTx' chai.use(solidity) @@ -27,123 +27,129 @@ describe('Multicall2', () => { multicallContract = await deployContract(deployer, MultiCall2) }) - it('Retrieves token balance using tryAggregate', async () => { - const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) - const call: RawCall = { - address: tokenContract.address, - data, - chainId: mockProvider._network.chainId, - } - - const blockNumber = await mockProvider.getBlockNumber() - const result = await multicall2(mockProvider, multicallContract.address, blockNumber, [call]) - const { value, success } = result[tokenContract.address]![data] || {} - expect(success).to.be.true - expect(BigNumber.from(value)).to.eq('10000') - }) - - it('Fails to retrieve data on block number in the future', async () => { - const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) - const call: RawCall = { - address: tokenContract.address, - data, - chainId: mockProvider._network.chainId, - } - - const blockNumber = (await mockProvider.getBlockNumber()) + 1 - await expect(multicall2(mockProvider, multicallContract.address, blockNumber, [call])).to.be.eventually.rejected - }) - - it('Does not fail when retrieving data on block number from the past', async () => { - const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) - const call: RawCall = { - address: tokenContract.address, - data, - chainId: mockProvider._network.chainId, - } - - await sendEmptyTx(deployer) - const blockNumber = (await mockProvider.getBlockNumber()) - 1 - const result = await multicall2(mockProvider, multicallContract.address, blockNumber, [call]) - const { value, success } = result[tokenContract.address]![data] || {} - expect(success).to.be.true - expect(BigNumber.from(value)).to.eq('10000') - }) - - it('Does not fail when doing multiple calls at once', async () => { - const erc20Interface = new Interface(ERC20Mock.abi) - - const calls: RawCall[] = [ - { - address: tokenContract.address, - data: erc20Interface.encodeFunctionData('balanceOf', [deployer.address]), - chainId: mockProvider._network.chainId, - }, - { - address: tokenContract.address, - data: erc20Interface.encodeFunctionData('symbol', []), - chainId: mockProvider._network.chainId, - }, - { - address: tokenContract.address, - data: erc20Interface.encodeFunctionData('balanceOf', [tokenContract.address]), - chainId: mockProvider._network.chainId, - }, - ] - - const blockNumber = await mockProvider.getBlockNumber() - const result = await multicall2(mockProvider, multicallContract.address, blockNumber, calls) - - let { value, success } = result[calls[0].address]![calls[0].data] || {} - expect(value).to.equal(BigNumber.from(10000)) - expect(success).to.be.true - ;({ value, success } = result[calls[1].address]![calls[1].data] || {}) - const decodedSymbol = utils.defaultAbiCoder.decode(['string'], value!)[0] - expect(decodedSymbol).to.equal('MOCK') - expect(success).to.be.true - ;({ value, success } = result[calls[2].address]![calls[2].data] || {}) - expect(value).to.equal(BigNumber.from(0)) - expect(success).to.be.true - }) - - it('Does not fail when some of the calls fail', async () => { - const erc20Interface = new Interface(ERC20Mock.abi) - - const calls: RawCall[] = [ - { - address: tokenContract.address, - data: erc20Interface.encodeFunctionData('balanceOf', [deployer.address]), - chainId: mockProvider._network.chainId, - }, - // invalid one - { - address: tokenContract.address, - data: erc20Interface.encodeFunctionData('transferFrom', [ - multicallContract.address, - deployer.address, - BigNumber.from(10000), - ]), - chainId: mockProvider._network.chainId, - }, - { - address: tokenContract.address, - data: erc20Interface.encodeFunctionData('balanceOf', [tokenContract.address]), - chainId: mockProvider._network.chainId, - }, - ] - - const blockNumber = await mockProvider.getBlockNumber() - const result = await multicall2(mockProvider, multicallContract.address, blockNumber, calls) - - let { value, success } = result[calls[0].address]![calls[0].data] || {} - expect(value).to.equal(BigNumber.from(10000)) - expect(success).to.be.true - ;({ value, success } = result[calls[1].address]![calls[1].data] || {}) - const decodedValue = new utils.Interface(['function Error(string)']).decodeFunctionData('Error', value!)[0] - expect(decodedValue).to.equal('ERC20: transfer amount exceeds balance') - expect(success).to.be.false - ;({ value, success } = result[calls[2].address]![calls[2].data] || {}) - expect(value).to.equal(BigNumber.from(0)) - expect(success).to.be.true - }) + for (const fastEncoding of [false, true]) { + describe(fastEncoding ? 'Fast encoding' : 'Ethers encoding', () => { + const multicall2 = multicall2Factory(fastEncoding) + + it('Retrieves token balance using tryAggregate', async () => { + const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) + const call: RawCall = { + address: tokenContract.address, + data, + chainId: mockProvider._network.chainId, + } + + const blockNumber = await mockProvider.getBlockNumber() + const result = await multicall2(mockProvider, multicallContract.address, blockNumber, [call]) + const { value, success } = result[tokenContract.address]![data] || {} + expect(success).to.be.true + expect(BigNumber.from(value)).to.eq('10000') + }) + + it('Fails to retrieve data on block number in the future', async () => { + const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) + const call: RawCall = { + address: tokenContract.address, + data, + chainId: mockProvider._network.chainId, + } + + const blockNumber = (await mockProvider.getBlockNumber()) + 1 + await expect(multicall2(mockProvider, multicallContract.address, blockNumber, [call])).to.be.eventually.rejected + }) + + it('Does not fail when retrieving data on block number from the past', async () => { + const data = new Interface(ERC20Mock.abi).encodeFunctionData('balanceOf', [deployer.address]) + const call: RawCall = { + address: tokenContract.address, + data, + chainId: mockProvider._network.chainId, + } + + await sendEmptyTx(deployer) + const blockNumber = (await mockProvider.getBlockNumber()) - 1 + const result = await multicall2(mockProvider, multicallContract.address, blockNumber, [call]) + const { value, success } = result[tokenContract.address]![data] || {} + expect(success).to.be.true + expect(BigNumber.from(value)).to.eq('10000') + }) + + it('Does not fail when doing multiple calls at once', async () => { + const erc20Interface = new Interface(ERC20Mock.abi) + + const calls: RawCall[] = [ + { + address: tokenContract.address, + data: erc20Interface.encodeFunctionData('balanceOf', [deployer.address]), + chainId: mockProvider._network.chainId, + }, + { + address: tokenContract.address, + data: erc20Interface.encodeFunctionData('symbol', []), + chainId: mockProvider._network.chainId, + }, + { + address: tokenContract.address, + data: erc20Interface.encodeFunctionData('balanceOf', [tokenContract.address]), + chainId: mockProvider._network.chainId, + }, + ] + + const blockNumber = await mockProvider.getBlockNumber() + const result = await multicall2(mockProvider, multicallContract.address, blockNumber, calls) + + let { value, success } = result[calls[0].address]![calls[0].data] || {} + expect(value).to.equal(BigNumber.from(10000)) + expect(success).to.be.true + ;({ value, success } = result[calls[1].address]![calls[1].data] || {}) + const decodedSymbol = utils.defaultAbiCoder.decode(['string'], value!)[0] + expect(decodedSymbol).to.equal('MOCK') + expect(success).to.be.true + ;({ value, success } = result[calls[2].address]![calls[2].data] || {}) + expect(value).to.equal(BigNumber.from(0)) + expect(success).to.be.true + }) + + it('Does not fail when some of the calls fail', async () => { + const erc20Interface = new Interface(ERC20Mock.abi) + + const calls: RawCall[] = [ + { + address: tokenContract.address, + data: erc20Interface.encodeFunctionData('balanceOf', [deployer.address]), + chainId: mockProvider._network.chainId, + }, + // invalid one + { + address: tokenContract.address, + data: erc20Interface.encodeFunctionData('transferFrom', [ + multicallContract.address, + deployer.address, + BigNumber.from(10000), + ]), + chainId: mockProvider._network.chainId, + }, + { + address: tokenContract.address, + data: erc20Interface.encodeFunctionData('balanceOf', [tokenContract.address]), + chainId: mockProvider._network.chainId, + }, + ] + + const blockNumber = await mockProvider.getBlockNumber() + const result = await multicall2(mockProvider, multicallContract.address, blockNumber, calls) + + let { value, success } = result[calls[0].address]![calls[0].data] || {} + expect(value).to.equal(BigNumber.from(10000)) + expect(success).to.be.true + ;({ value, success } = result[calls[1].address]![calls[1].data] || {}) + const decodedValue = new utils.Interface(['function Error(string)']).decodeFunctionData('Error', value!)[0] + expect(decodedValue).to.equal('ERC20: transfer amount exceeds balance') + expect(success).to.be.false + ;({ value, success } = result[calls[2].address]![calls[2].data] || {}) + expect(value).to.equal(BigNumber.from(0)) + expect(success).to.be.true + }) + }) + } }) diff --git a/packages/core/src/providers/chainState/common/multicall2.ts b/packages/core/src/providers/chainState/common/multicall2.ts index f0979ce98..ac6a93b61 100644 --- a/packages/core/src/providers/chainState/common/multicall2.ts +++ b/packages/core/src/providers/chainState/common/multicall2.ts @@ -1,5 +1,6 @@ import { Contract } from '@ethersproject/contracts' import { Provider } from '@ethersproject/providers' +import { decodeTryAggregate, encodeTryAggregate } from '../../../abi/multicall2' import { RawCall } from './callsReducer' import { ChainState } from './model' @@ -7,6 +8,11 @@ const ABI = [ 'function tryAggregate(bool requireSuccess, tuple(address target, bytes callData)[] calls) public view returns (tuple(bool success, bytes returnData)[])', ] +/** + * @public + */ +export const multicall2Factory = (fastEncoding: boolean) => (fastEncoding ? fastEncodingMulticall2 : multicall2) + /** * @public */ @@ -25,6 +31,36 @@ export async function multicall2( requests.map(({ address, data }) => [address, data]), { blockTag: blockNumber } ) + return decodeResult(results, requests) +} + +/** + * @public + */ +export async function fastEncodingMulticall2( + provider: Provider, + address: string, + blockNumber: number, + requests: RawCall[] +): Promise { + if (requests.length === 0) { + return {} + } + const response = await provider.call( + { + to: address, + data: encodeTryAggregate( + false, + requests.map(({ address, data }) => [address, data]) + ), + }, + blockNumber + ) + const [results] = decodeTryAggregate(response) + return decodeResult(results, requests) +} + +function decodeResult(results: [boolean, string][], requests: RawCall[]) { const state: ChainState = {} for (let i = 0; i < requests.length; i++) { const { address, data } = requests[i] diff --git a/packages/core/src/providers/chainState/multiChainStates/provider.tsx b/packages/core/src/providers/chainState/multiChainStates/provider.tsx index 69ffd19be..4ca4c6418 100644 --- a/packages/core/src/providers/chainState/multiChainStates/provider.tsx +++ b/packages/core/src/providers/chainState/multiChainStates/provider.tsx @@ -1,13 +1,13 @@ import { ReactNode, useEffect, useMemo, useReducer } from 'react' import { useDebouncePair, useBlockNumbers } from '../../../hooks' import { MultiChainStatesContext } from './context' -import { ChainId, multicall as multicall1, multicall2, State, useConfig, useNetwork } from '../../..' +import { ChainId, State, useConfig, useNetwork } from '../../..' import { useReadonlyNetworks } from '../../network' import { fromEntries } from '../../../helpers/fromEntries' import { performMulticall } from '../common/performMulticall' import { Providers } from '../../network/readonlyNetworks/model' import { BaseProvider } from '@ethersproject/providers' -import { callsReducer, chainStateReducer } from '../common' +import { callsReducer, chainStateReducer, multicall1Factory, multicall2Factory } from '../common' import { getUniqueActiveCalls } from '../../../helpers' import { useDevtoolsReporting } from '../common/useDevtoolsReporting' import { useChainId } from '../../../hooks/useChainId' @@ -35,7 +35,7 @@ function composeChainState(networks: Providers, state: State, multicallAddresses * @internal Intended for internal use - use it on your own risk */ export function MultiChainStateProvider({ children, multicallAddresses }: Props) { - const { multicallVersion } = useConfig() + const { multicallVersion, fastMulticallEncoding } = useConfig() const networks = useReadonlyNetworks() const blockNumbers = useBlockNumbers() const { reportError } = useNetwork() @@ -43,7 +43,7 @@ export function MultiChainStateProvider({ children, multicallAddresses }: Props) const [calls, dispatchCalls] = useReducer(callsReducer, []) const [state, dispatchState] = useReducer(chainStateReducer, {}) - const multicall = multicallVersion === 1 ? multicall1 : multicall2 + const multicall = (multicallVersion === 1 ? multicall1Factory : multicall2Factory)(fastMulticallEncoding ?? false) const [debouncedCalls, debouncedNetworks] = useDebouncePair(calls, networks, 50) const uniqueCalls = useMemo(() => getUniqueActiveCalls(debouncedCalls), [debouncedCalls]) diff --git a/packages/docs/docs/03-API Reference/03-Models.mdx b/packages/docs/docs/03-API Reference/03-Models.mdx index 4355454bb..6a37503ad 100644 --- a/packages/docs/docs/03-API Reference/03-Models.mdx +++ b/packages/docs/docs/03-API Reference/03-Models.mdx @@ -63,6 +63,19 @@ Enables reconnecting to last used provider when user revisits the page. } ``` +**fastMulticallEncoding** +When set to `true` improves performance by using own written encoders and decoders for multicall data. + +***Default value:*** + +`false` + +:::note + +The flag is experimental and is not fully tested yet. + +::: + ## ChainId A number describing the ID of the chain. See [ChainList](https://chainlist.org/) for a list of known chains and their IDs. @@ -249,7 +262,7 @@ Fields: - **Mining** - when a transaction is sent to the network, but not yet mined. In this state ``transaction: TransactionResponse`` is available. - **Success** - when a transaction has been mined successfully. In this state ``transaction: TransactionResponse`` and ``receipt: TransactionReceipt`` are available. - **Fail** - when a transaction has been mined, but ended up reverted. Again ``transaction: TransactionResponse`` and ``receipt: TransactionReceipt`` are available. -- **Exception** - when a transaction hasn't started, due to the exception that was thrown before the transaction was propagated to the network. The exception can come from application/library code (e.g. unexpected exception like malformed arguments)Β or externally (e.g user discarded transaction in Metamask).Β In this state the ``errorMessage: string`` is available (as well as exception object). +- **Exception** - when a transaction hasn't started, due to the exception that was thrown before the transaction was propagated to the network. The exception can come from application/library code (e.g. unexpected exception like malformed arguments) or externally (e.g user discarded transaction in Metamask). In this state the ``errorMessage: string`` is available (as well as exception object). Additionally all states except ``None``, contain ``chainId: ChainId``. diff --git a/packages/example/src/index.tsx b/packages/example/src/index.tsx index 17788b485..ee0c8ba48 100644 --- a/packages/example/src/index.tsx +++ b/packages/example/src/index.tsx @@ -13,6 +13,7 @@ const config: Config = { [Arbitrum.chainId]: 'https://arb1.arbitrum.io/rpc', }, multicallVersion: 2 as const, + fastMulticallEncoding: true, } ReactDOM.render( From af1b4cbee20868d95b69f39af4a88ed44e9779c6 Mon Sep 17 00:00:00 2001 From: truefi-bot <102036168+truefi-bot@users.noreply.github.com> Date: Thu, 26 May 2022 10:06:58 +0200 Subject: [PATCH 12/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#777)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: truefi-bot --- .changeset/shiny-jobs-applaud.md | 5 ----- packages/coingecko/CHANGELOG.md | 7 +++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/testing/CHANGELOG.md | 7 +++++++ packages/testing/package.json | 2 +- 7 files changed, 23 insertions(+), 8 deletions(-) delete mode 100644 .changeset/shiny-jobs-applaud.md diff --git a/.changeset/shiny-jobs-applaud.md b/.changeset/shiny-jobs-applaud.md deleted file mode 100644 index 0a1651018..000000000 --- a/.changeset/shiny-jobs-applaud.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -Add fast encoding options diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index 1bffb088a..9969d289e 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/coingecko +## 1.0.4 + +### Patch Changes + +- Updated dependencies [fe52f50] + - @usedapp/core@1.0.4 + ## 1.0.3 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index 4893835a9..9a47aa626 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.3", + "version": "1.0.4", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 0b07008f0..a11f1b151 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @usedapp/core +## 1.0.4 + +### Patch Changes + +- fe52f50: Add fast encoding options + ## 1.0.3 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index a36e77361..7b725966c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.3", + "version": "1.0.4", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 689f8f7fc..3a04315cf 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/testing +## 1.0.4 + +### Patch Changes + +- Updated dependencies [fe52f50] + - @usedapp/core@1.0.4 + ## 1.0.3 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index e94abe320..c14b19d8a 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.3", + "version": "1.0.4", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git", From a0ab27fcbf892d91c7b03e29db7205b8e49b77d4 Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Thu, 26 May 2022 14:36:46 +0200 Subject: [PATCH 13/59] =?UTF-8?q?=F0=9F=A5=8F=20Remove=20submodules=20from?= =?UTF-8?q?=20core=20package=20(#778)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/shaggy-dodos-sell.md | 5 + .github/workflows/CI.yml | 2 + packages/core/internal.d.ts | 4 - packages/core/internal.js | 4 - packages/core/package.json | 20 ---- packages/core/testing.d.ts | 4 - packages/core/testing.js | 4 - packages/siwe/package.json | 1 + packages/siwe/src/provider.test.tsx | 2 +- packages/testing/src/index.ts | 20 +--- pnpm-lock.yaml | 163 ++++++++++++++-------------- 11 files changed, 93 insertions(+), 136 deletions(-) create mode 100644 .changeset/shaggy-dodos-sell.md delete mode 100644 packages/core/internal.d.ts delete mode 100644 packages/core/internal.js delete mode 100644 packages/core/testing.d.ts delete mode 100644 packages/core/testing.js diff --git a/.changeset/shaggy-dodos-sell.md b/.changeset/shaggy-dodos-sell.md new file mode 100644 index 000000000..4b5cf89b2 --- /dev/null +++ b/.changeset/shaggy-dodos-sell.md @@ -0,0 +1,5 @@ +--- +'@usedapp/core': patch +--- + +Remove testing submodule diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index de3619bae..ad7728dd2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -37,6 +37,7 @@ jobs: run: | set -e cd core && pnpm run build && cd - + cd testing && pnpm run build && cd - cd siwe && pnpm run build && cd - cd coingecko && pnpm run build && cd - cd playwright && pnpm run build && cd - @@ -65,6 +66,7 @@ jobs: run: | set -e cd core && pnpm run build && cd - + cd testing && pnpm run build && cd - cd siwe && pnpm run build && cd - cd coingecko && pnpm run build && cd - cd playwright && pnpm run build && cd - diff --git a/packages/core/internal.d.ts b/packages/core/internal.d.ts deleted file mode 100644 index 2df2d9128..000000000 --- a/packages/core/internal.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file is a workaround to provide types for imports from "@usedapp/core/internal". -// We need to have it until https://github.com/microsoft/TypeScript/issues/33079 is closed. - -export * from './dist/esm/src/internal' diff --git a/packages/core/internal.js b/packages/core/internal.js deleted file mode 100644 index 65f23163e..000000000 --- a/packages/core/internal.js +++ /dev/null @@ -1,4 +0,0 @@ -// This file is a workaround to provide exports for older node and webpack versions for "@usedapp/core/internal". -// We need to have it until https://github.com/microsoft/TypeScript/issues/33079 is closed. - -module.exports = require('./dist/cjs/src/internal') diff --git a/packages/core/package.json b/packages/core/package.json index 7b725966c..e4afce07e 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -8,26 +8,6 @@ "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", - "exports": { - ".": { - "require": "./dist/cjs/src/index.js", - "import": "./dist/esm/src/index.js", - "default": "./dist/esm/src/index.js", - "types": "./dist/esm/src/index.d.ts" - }, - "./testing": { - "require": "./dist/cjs/src/testing/index.js", - "import": "./dist/esm/src/testing/index.js", - "default": "./dist/esm/src/testing/index.js", - "types": "./dist/esm/src/testing/index.d.ts" - }, - "./internal": { - "require": "./dist/cjs/src/internal.js", - "import": "./dist/esm/src/internal.js", - "default": "./dist/esm/src/internal.js", - "types": "./dist/esm/src/internal.d.ts" - } - }, "files": [ "dist", "internal.js", diff --git a/packages/core/testing.d.ts b/packages/core/testing.d.ts deleted file mode 100644 index 9774db5ed..000000000 --- a/packages/core/testing.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file is a workaround to provide types for imports from "@usedapp/core/testing". -// We need to have it until https://github.com/microsoft/TypeScript/issues/33079 is closed. - -export * from './dist/esm/src/testing' diff --git a/packages/core/testing.js b/packages/core/testing.js deleted file mode 100644 index fe3e27fa9..000000000 --- a/packages/core/testing.js +++ /dev/null @@ -1,4 +0,0 @@ -// This file is a workaround to provide exports for older node and webpack versions for "@usedapp/core/testing". -// We need to have it until https://github.com/microsoft/TypeScript/issues/33079 is closed. - -module.exports = require('./dist/cjs/src/testing') diff --git a/packages/siwe/package.json b/packages/siwe/package.json index 401946172..c11c4969c 100644 --- a/packages/siwe/package.json +++ b/packages/siwe/package.json @@ -37,6 +37,7 @@ "@typescript-eslint/eslint-plugin": "^4.10.0", "@typescript-eslint/parser": "^4.10.0", "@usedapp/core": "workspace:*", + "@usedapp/testing": "workspace:*", "chai": "^4.2.0", "chai-as-promised": "^7.1.1", "eslint": "7.19.0", diff --git a/packages/siwe/src/provider.test.tsx b/packages/siwe/src/provider.test.tsx index 1000facda..d4ef6c116 100644 --- a/packages/siwe/src/provider.test.tsx +++ b/packages/siwe/src/provider.test.tsx @@ -6,7 +6,7 @@ import { IdentityWrapper, renderDAppHook, getWaitUtils, -} from '@usedapp/core/testing' +} from '@usedapp/testing' import { SiweProvider, useSiwe } from './provider' import React, { useEffect } from 'react' import { expect } from 'chai' diff --git a/packages/testing/src/index.ts b/packages/testing/src/index.ts index 46b33ce29..e16098a9c 100644 --- a/packages/testing/src/index.ts +++ b/packages/testing/src/index.ts @@ -1,22 +1,4 @@ // Workaround before support for conditional exports lands in typescript. // https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#packagejson-exports-imports-and-self-referencing -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -export * from '@usedapp/core/testing' - -export type { - ChildrenProps, - IdentityWrapper, - MOCK_TOKEN_INITIAL_BALANCE, - contractCallOutOfGasMock, - deployMockToken, - deployMulticall, - getAdminWallet, - getWaitUtils, - mineBlock, - renderWeb3Hook, - renderWeb3HookOptions, - sleep, - waitUntil, -} from '@usedapp/core/dist/cjs/src/testing' +export * from '@usedapp/core/dist/cjs/src/testing' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 195cac6b1..531f26a05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -447,6 +447,7 @@ importers: '@typescript-eslint/eslint-plugin': ^4.10.0 '@typescript-eslint/parser': ^4.10.0 '@usedapp/core': workspace:* + '@usedapp/testing': workspace:* chai: ^4.2.0 chai-as-promised: ^7.1.1 eslint: 7.19.0 @@ -473,6 +474,7 @@ importers: '@typescript-eslint/eslint-plugin': 4.33.0_95407711204725ba8d2ef915af8a79e5 '@typescript-eslint/parser': 4.33.0_eslint@7.19.0+typescript@4.6.2 '@usedapp/core': link:../core + '@usedapp/testing': link:../testing chai: 4.3.6 chai-as-promised: 7.1.1_chai@4.3.6 eslint: 7.19.0 @@ -725,7 +727,7 @@ packages: '@babel/traverse': 7.17.3 '@babel/types': 7.17.0 convert-source-map: 1.8.0 - debug: 4.3.3 + debug: 4.3.4 gensync: 1.0.0-beta.2 json5: 2.2.0 semver: 6.3.0 @@ -5948,7 +5950,7 @@ packages: /@types/react-dom/17.0.1: resolution: {integrity: sha512-yIVyopxQb8IDZ7SOHeTovurFq+fXiPICa+GV3gp0Xedsl+MwQlMLKmvrnEjFbQxjliH5YVAEWFh975eVNmKj7Q==} dependencies: - '@types/react': 17.0.1 + '@types/react': 17.0.40 dev: false /@types/react-dom/17.0.13: @@ -7083,7 +7085,7 @@ packages: dev: true /ansi-regex/2.1.1: - resolution: {integrity: sha1-w7M6te42DYbg5ijwRorn7yfWVN8=} + resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} engines: {node: '>=0.10.0'} /ansi-regex/3.0.0: @@ -7105,7 +7107,7 @@ packages: dev: false /ansi-styles/2.2.1: - resolution: {integrity: sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=} + resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==} engines: {node: '>=0.10.0'} /ansi-styles/3.2.1: @@ -7220,7 +7222,7 @@ packages: dev: true /arr-diff/4.0.0: - resolution: {integrity: sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=} + resolution: {integrity: sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==} engines: {node: '>=0.10.0'} /arr-filter/1.1.2: @@ -7247,7 +7249,7 @@ packages: dev: true /arr-union/3.1.0: - resolution: {integrity: sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=} + resolution: {integrity: sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==} engines: {node: '>=0.10.0'} /array-back/3.1.0: @@ -7336,7 +7338,7 @@ packages: dev: true /array-unique/0.3.2: - resolution: {integrity: sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=} + resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==} engines: {node: '>=0.10.0'} /array.prototype.flat/1.2.5: @@ -7396,7 +7398,7 @@ packages: safer-buffer: 2.1.2 /assert-plus/1.0.0: - resolution: {integrity: sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=} + resolution: {integrity: sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==} engines: {node: '>=0.8'} /assert/1.5.0: @@ -7420,7 +7422,7 @@ packages: dev: true /assign-symbols/1.0.0: - resolution: {integrity: sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=} + resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} engines: {node: '>=0.10.0'} /ast-types/0.14.2: @@ -7475,7 +7477,7 @@ packages: dev: true /async/1.5.2: - resolution: {integrity: sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=} + resolution: {integrity: sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==} /async/2.6.2: resolution: {integrity: sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==} @@ -7541,7 +7543,7 @@ packages: dev: false /aws-sign2/0.7.0: - resolution: {integrity: sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=} + resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==} /aws4/1.11.0: resolution: {integrity: sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==} @@ -7563,7 +7565,7 @@ packages: dev: false /babel-code-frame/6.26.0: - resolution: {integrity: sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=} + resolution: {integrity: sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==} dependencies: chalk: 1.1.3 esutils: 2.0.3 @@ -7605,14 +7607,14 @@ packages: trim-right: 1.0.1 /babel-helper-builder-binary-assignment-operator-visitor/6.24.1: - resolution: {integrity: sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=} + resolution: {integrity: sha512-gCtfYORSG1fUMX4kKraymq607FWgMWg+j42IFPc18kFQEsmtaibP4UrqsXt8FlEJle25HUd4tsoDR7H2wDhe9Q==} dependencies: babel-helper-explode-assignable-expression: 6.24.1 babel-runtime: 6.26.0 babel-types: 6.26.0 /babel-helper-call-delegate/6.24.1: - resolution: {integrity: sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=} + resolution: {integrity: sha512-RL8n2NiEj+kKztlrVJM9JT1cXzzAdvWFh76xh/H1I4nKwunzE4INBXn8ieCZ+wh4zWszZk7NBS1s/8HR5jDkzQ==} dependencies: babel-helper-hoist-variables: 6.24.1 babel-runtime: 6.26.0 @@ -7620,7 +7622,7 @@ packages: babel-types: 6.26.0 /babel-helper-define-map/6.26.0: - resolution: {integrity: sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=} + resolution: {integrity: sha512-bHkmjcC9lM1kmZcVpA5t2om2nzT/xiZpo6TJq7UlZ3wqKfzia4veeXbIhKvJXAMzhhEBd3cR1IElL5AenWEUpA==} dependencies: babel-helper-function-name: 6.24.1 babel-runtime: 6.26.0 @@ -7628,14 +7630,14 @@ packages: lodash: 4.17.21 /babel-helper-explode-assignable-expression/6.24.1: - resolution: {integrity: sha1-8luCz33BBDPFX3BZLVdGQArCLKo=} + resolution: {integrity: sha512-qe5csbhbvq6ccry9G7tkXbzNtcDiH4r51rrPUbwwoTzZ18AqxWYRZT6AOmxrpxKnQBW0pYlBI/8vh73Z//78nQ==} dependencies: babel-runtime: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 /babel-helper-function-name/6.24.1: - resolution: {integrity: sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=} + resolution: {integrity: sha512-Oo6+e2iX+o9eVvJ9Y5eKL5iryeRdsIkwRYheCuhYdVHsdEQysbc2z2QkqCLIYnNxkT5Ss3ggrHdXiDI7Dhrn4Q==} dependencies: babel-helper-get-function-arity: 6.24.1 babel-runtime: 6.26.0 @@ -7644,32 +7646,32 @@ packages: babel-types: 6.26.0 /babel-helper-get-function-arity/6.24.1: - resolution: {integrity: sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=} + resolution: {integrity: sha512-WfgKFX6swFB1jS2vo+DwivRN4NB8XUdM3ij0Y1gnC21y1tdBoe6xjVnd7NSI6alv+gZXCtJqvrTeMW3fR/c0ng==} dependencies: babel-runtime: 6.26.0 babel-types: 6.26.0 /babel-helper-hoist-variables/6.24.1: - resolution: {integrity: sha1-HssnaJydJVE+rbyZFKc/VAi+enY=} + resolution: {integrity: sha512-zAYl3tqerLItvG5cKYw7f1SpvIxS9zi7ohyGHaI9cgDUjAT6YcY9jIEH5CstetP5wHIVSceXwNS7Z5BpJg+rOw==} dependencies: babel-runtime: 6.26.0 babel-types: 6.26.0 /babel-helper-optimise-call-expression/6.24.1: - resolution: {integrity: sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=} + resolution: {integrity: sha512-Op9IhEaxhbRT8MDXx2iNuMgciu2V8lDvYCNQbDGjdBNCjaMvyLf4wl4A3b8IgndCyQF8TwfgsQ8T3VD8aX1/pA==} dependencies: babel-runtime: 6.26.0 babel-types: 6.26.0 /babel-helper-regex/6.26.0: - resolution: {integrity: sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=} + resolution: {integrity: sha512-VlPiWmqmGJp0x0oK27Out1D+71nVVCTSdlbhIVoaBAj2lUgrNjBCRR9+llO4lTSb2O4r7PJg+RobRkhBrf6ofg==} dependencies: babel-runtime: 6.26.0 babel-types: 6.26.0 lodash: 4.17.21 /babel-helper-remap-async-to-generator/6.24.1: - resolution: {integrity: sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=} + resolution: {integrity: sha512-RYqaPD0mQyQIFRu7Ho5wE2yvA/5jxqCIj/Lv4BXNq23mHYu/vxikOy2JueLiBxQknwapwrJeNCesvY0ZcfnlHg==} dependencies: babel-helper-function-name: 6.24.1 babel-runtime: 6.26.0 @@ -7678,7 +7680,7 @@ packages: babel-types: 6.26.0 /babel-helper-replace-supers/6.24.1: - resolution: {integrity: sha1-v22/5Dk40XNpohPKiov3S2qQqxo=} + resolution: {integrity: sha512-sLI+u7sXJh6+ToqDr57Bv973kCepItDhMou0xCP2YPVmR1jkHSCY+p1no8xErbV1Siz5QE8qKT1WIwybSWlqjw==} dependencies: babel-helper-optimise-call-expression: 6.24.1 babel-messages: 6.23.0 @@ -7688,7 +7690,7 @@ packages: babel-types: 6.26.0 /babel-helpers/6.24.1: - resolution: {integrity: sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=} + resolution: {integrity: sha512-n7pFrqQm44TCYvrCDb0MqabAF+JUBq+ijBvNMUxpkLjJaAu32faIexewMumrH5KLLJ1HDyT0PTEqRyAe/GwwuQ==} dependencies: babel-runtime: 6.26.0 babel-template: 6.26.0 @@ -7724,7 +7726,7 @@ packages: dev: false /babel-messages/6.23.0: - resolution: {integrity: sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=} + resolution: {integrity: sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==} dependencies: babel-runtime: 6.26.0 @@ -7742,7 +7744,7 @@ packages: '@mdx-js/util': 1.6.22 /babel-plugin-check-es2015-constants/6.22.0: - resolution: {integrity: sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=} + resolution: {integrity: sha512-B1M5KBP29248dViEo1owyY32lk1ZSH2DaNNrXLGt8lyjjHm7pBqAdQ7VKUPR6EEDO323+OvT3MQXbCin8ooWdA==} dependencies: babel-runtime: 6.26.0 @@ -7917,36 +7919,36 @@ packages: dev: false /babel-plugin-syntax-async-functions/6.13.0: - resolution: {integrity: sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=} + resolution: {integrity: sha512-4Zp4unmHgw30A1eWI5EpACji2qMocisdXhAftfhXoSV9j0Tvj6nRFE3tOmRY912E0FMRm/L5xWE7MGVT2FoLnw==} /babel-plugin-syntax-exponentiation-operator/6.13.0: - resolution: {integrity: sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=} + resolution: {integrity: sha512-Z/flU+T9ta0aIEKl1tGEmN/pZiI1uXmCiGFRegKacQfEJzp7iNsKloZmyJlQr+75FCJtiFfGIK03SiCvCt9cPQ==} /babel-plugin-syntax-jsx/6.18.0: resolution: {integrity: sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=} /babel-plugin-syntax-trailing-function-commas/6.22.0: - resolution: {integrity: sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=} + resolution: {integrity: sha512-Gx9CH3Q/3GKbhs07Bszw5fPTlU+ygrOGfAhEt7W2JICwufpC4SuO0mG0+4NykPBSYPMJhqvVlDBU17qB1D+hMQ==} /babel-plugin-transform-async-to-generator/6.24.1: - resolution: {integrity: sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=} + resolution: {integrity: sha512-7BgYJujNCg0Ti3x0c/DL3tStvnKS6ktIYOmo9wginv/dfZOrbSZ+qG4IRRHMBOzZ5Awb1skTiAsQXg/+IWkZYw==} dependencies: babel-helper-remap-async-to-generator: 6.24.1 babel-plugin-syntax-async-functions: 6.13.0 babel-runtime: 6.26.0 /babel-plugin-transform-es2015-arrow-functions/6.22.0: - resolution: {integrity: sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=} + resolution: {integrity: sha512-PCqwwzODXW7JMrzu+yZIaYbPQSKjDTAsNNlK2l5Gg9g4rz2VzLnZsStvp/3c46GfXpwkyufb3NCyG9+50FF1Vg==} dependencies: babel-runtime: 6.26.0 /babel-plugin-transform-es2015-block-scoped-functions/6.22.0: - resolution: {integrity: sha1-u8UbSflk1wy42OC5ToICRs46YUE=} + resolution: {integrity: sha512-2+ujAT2UMBzYFm7tidUsYh+ZoIutxJ3pN9IYrF1/H6dCKtECfhmB8UkHVpyxDwkj0CYbQG35ykoz925TUnBc3A==} dependencies: babel-runtime: 6.26.0 /babel-plugin-transform-es2015-block-scoping/6.26.0: - resolution: {integrity: sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=} + resolution: {integrity: sha512-YiN6sFAQ5lML8JjCmr7uerS5Yc/EMbgg9G8ZNmk2E3nYX4ckHR01wrkeeMijEf5WHNK5TW0Sl0Uu3pv3EdOJWw==} dependencies: babel-runtime: 6.26.0 babel-template: 6.26.0 @@ -7955,7 +7957,7 @@ packages: lodash: 4.17.21 /babel-plugin-transform-es2015-classes/6.24.1: - resolution: {integrity: sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=} + resolution: {integrity: sha512-5Dy7ZbRinGrNtmWpquZKZ3EGY8sDgIVB4CU8Om8q8tnMLrD/m94cKglVcHps0BCTdZ0TJeeAWOq2TK9MIY6cag==} dependencies: babel-helper-define-map: 6.26.0 babel-helper-function-name: 6.24.1 @@ -7968,41 +7970,41 @@ packages: babel-types: 6.26.0 /babel-plugin-transform-es2015-computed-properties/6.24.1: - resolution: {integrity: sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=} + resolution: {integrity: sha512-C/uAv4ktFP/Hmh01gMTvYvICrKze0XVX9f2PdIXuriCSvUmV9j+u+BB9f5fJK3+878yMK6dkdcq+Ymr9mrcLzw==} dependencies: babel-runtime: 6.26.0 babel-template: 6.26.0 /babel-plugin-transform-es2015-destructuring/6.23.0: - resolution: {integrity: sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=} + resolution: {integrity: sha512-aNv/GDAW0j/f4Uy1OEPZn1mqD+Nfy9viFGBfQ5bZyT35YqOiqx7/tXdyfZkJ1sC21NyEsBdfDY6PYmLHF4r5iA==} dependencies: babel-runtime: 6.26.0 /babel-plugin-transform-es2015-duplicate-keys/6.24.1: - resolution: {integrity: sha1-c+s9MQypaePvnskcU3QabxV2Qj4=} + resolution: {integrity: sha512-ossocTuPOssfxO2h+Z3/Ea1Vo1wWx31Uqy9vIiJusOP4TbF7tPs9U0sJ9pX9OJPf4lXRGj5+6Gkl/HHKiAP5ug==} dependencies: babel-runtime: 6.26.0 babel-types: 6.26.0 /babel-plugin-transform-es2015-for-of/6.23.0: - resolution: {integrity: sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=} + resolution: {integrity: sha512-DLuRwoygCoXx+YfxHLkVx5/NpeSbVwfoTeBykpJK7JhYWlL/O8hgAK/reforUnZDlxasOrVPPJVI/guE3dCwkw==} dependencies: babel-runtime: 6.26.0 /babel-plugin-transform-es2015-function-name/6.24.1: - resolution: {integrity: sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=} + resolution: {integrity: sha512-iFp5KIcorf11iBqu/y/a7DK3MN5di3pNCzto61FqCNnUX4qeBwcV1SLqe10oXNnCaxBUImX3SckX2/o1nsrTcg==} dependencies: babel-helper-function-name: 6.24.1 babel-runtime: 6.26.0 babel-types: 6.26.0 /babel-plugin-transform-es2015-literals/6.22.0: - resolution: {integrity: sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=} + resolution: {integrity: sha512-tjFl0cwMPpDYyoqYA9li1/7mGFit39XiNX5DKC/uCNjBctMxyL1/PT/l4rSlbvBG1pOKI88STRdUsWXB3/Q9hQ==} dependencies: babel-runtime: 6.26.0 /babel-plugin-transform-es2015-modules-amd/6.24.1: - resolution: {integrity: sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=} + resolution: {integrity: sha512-LnIIdGWIKdw7zwckqx+eGjcS8/cl8D74A3BpJbGjKTFFNJSMrjN4bIh22HY1AlkUbeLG6X6OZj56BDvWD+OeFA==} dependencies: babel-plugin-transform-es2015-modules-commonjs: 6.26.2 babel-runtime: 6.26.0 @@ -8017,27 +8019,27 @@ packages: babel-types: 6.26.0 /babel-plugin-transform-es2015-modules-systemjs/6.24.1: - resolution: {integrity: sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=} + resolution: {integrity: sha512-ONFIPsq8y4bls5PPsAWYXH/21Hqv64TBxdje0FvU3MhIV6QM2j5YS7KvAzg/nTIVLot2D2fmFQrFWCbgHlFEjg==} dependencies: babel-helper-hoist-variables: 6.24.1 babel-runtime: 6.26.0 babel-template: 6.26.0 /babel-plugin-transform-es2015-modules-umd/6.24.1: - resolution: {integrity: sha1-rJl+YoXNGO1hdq22B9YCNErThGg=} + resolution: {integrity: sha512-LpVbiT9CLsuAIp3IG0tfbVo81QIhn6pE8xBJ7XSeCtFlMltuar5VuBV6y6Q45tpui9QWcy5i0vLQfCfrnF7Kiw==} dependencies: babel-plugin-transform-es2015-modules-amd: 6.24.1 babel-runtime: 6.26.0 babel-template: 6.26.0 /babel-plugin-transform-es2015-object-super/6.24.1: - resolution: {integrity: sha1-JM72muIcuDp/hgPa0CH1cusnj40=} + resolution: {integrity: sha512-8G5hpZMecb53vpD3mjs64NhI1au24TAmokQ4B+TBFBjN9cVoGoOvotdrMMRmHvVZUEvqGUPWL514woru1ChZMA==} dependencies: babel-helper-replace-supers: 6.24.1 babel-runtime: 6.26.0 /babel-plugin-transform-es2015-parameters/6.24.1: - resolution: {integrity: sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=} + resolution: {integrity: sha512-8HxlW+BB5HqniD+nLkQ4xSAVq3bR/pcYW9IigY+2y0dI+Y7INFeTbfAQr+63T3E4UDsZGjyb+l9txUnABWxlOQ==} dependencies: babel-helper-call-delegate: 6.24.1 babel-helper-get-function-arity: 6.24.1 @@ -8047,54 +8049,54 @@ packages: babel-types: 6.26.0 /babel-plugin-transform-es2015-shorthand-properties/6.24.1: - resolution: {integrity: sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=} + resolution: {integrity: sha512-mDdocSfUVm1/7Jw/FIRNw9vPrBQNePy6wZJlR8HAUBLybNp1w/6lr6zZ2pjMShee65t/ybR5pT8ulkLzD1xwiw==} dependencies: babel-runtime: 6.26.0 babel-types: 6.26.0 /babel-plugin-transform-es2015-spread/6.22.0: - resolution: {integrity: sha1-1taKmfia7cRTbIGlQujdnxdG+NE=} + resolution: {integrity: sha512-3Ghhi26r4l3d0Js933E5+IhHwk0A1yiutj9gwvzmFbVV0sPMYk2lekhOufHBswX7NCoSeF4Xrl3sCIuSIa+zOg==} dependencies: babel-runtime: 6.26.0 /babel-plugin-transform-es2015-sticky-regex/6.24.1: - resolution: {integrity: sha1-AMHNsaynERLN8M9hJsLta0V8zbw=} + resolution: {integrity: sha512-CYP359ADryTo3pCsH0oxRo/0yn6UsEZLqYohHmvLQdfS9xkf+MbCzE3/Kolw9OYIY4ZMilH25z/5CbQbwDD+lQ==} dependencies: babel-helper-regex: 6.26.0 babel-runtime: 6.26.0 babel-types: 6.26.0 /babel-plugin-transform-es2015-template-literals/6.22.0: - resolution: {integrity: sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=} + resolution: {integrity: sha512-x8b9W0ngnKzDMHimVtTfn5ryimars1ByTqsfBDwAqLibmuuQY6pgBQi5z1ErIsUOWBdw1bW9FSz5RZUojM4apg==} dependencies: babel-runtime: 6.26.0 /babel-plugin-transform-es2015-typeof-symbol/6.23.0: - resolution: {integrity: sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=} + resolution: {integrity: sha512-fz6J2Sf4gYN6gWgRZaoFXmq93X+Li/8vf+fb0sGDVtdeWvxC9y5/bTD7bvfWMEq6zetGEHpWjtzRGSugt5kNqw==} dependencies: babel-runtime: 6.26.0 /babel-plugin-transform-es2015-unicode-regex/6.24.1: - resolution: {integrity: sha1-04sS9C6nMj9yk4fxinxa4frrNek=} + resolution: {integrity: sha512-v61Dbbihf5XxnYjtBN04B/JBvsScY37R1cZT5r9permN1cp+b70DY3Ib3fIkgn1DI9U3tGgBJZVD8p/mE/4JbQ==} dependencies: babel-helper-regex: 6.26.0 babel-runtime: 6.26.0 regexpu-core: 2.0.0 /babel-plugin-transform-exponentiation-operator/6.24.1: - resolution: {integrity: sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=} + resolution: {integrity: sha512-LzXDmbMkklvNhprr20//RStKVcT8Cu+SQtX18eMHLhjHf2yFzwtQ0S2f0jQ+89rokoNdmwoSqYzAhq86FxlLSQ==} dependencies: babel-helper-builder-binary-assignment-operator-visitor: 6.24.1 babel-plugin-syntax-exponentiation-operator: 6.13.0 babel-runtime: 6.26.0 /babel-plugin-transform-regenerator/6.26.0: - resolution: {integrity: sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=} + resolution: {integrity: sha512-LS+dBkUGlNR15/5WHKe/8Neawx663qttS6AGqoOUhICc9d1KciBvtrQSuc0PI+CxQ2Q/S1aKuJ+u64GtLdcEZg==} dependencies: regenerator-transform: 0.10.1 /babel-plugin-transform-strict-mode/6.24.1: - resolution: {integrity: sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=} + resolution: {integrity: sha512-j3KtSpjyLSJxNoCDrhwiJad8kw0gJ9REGj8/CqL0HeRyLnvUNYV9zcqluL6QJSXh3nfsLEmSLvwRfGzrgR96Pw==} dependencies: babel-runtime: 6.26.0 babel-types: 6.26.0 @@ -8134,7 +8136,7 @@ packages: semver: 5.7.1 /babel-register/6.26.0: - resolution: {integrity: sha1-btAhFz4vy0htestFxgCahW9kcHE=} + resolution: {integrity: sha512-veliHlHX06wjaeY8xNITbveXSiI+ASFnOqvne/LaIJIqOWi2Ogmj91KOugEz/hoh/fwMhXNBJPCv8Xaz5CyM4A==} dependencies: babel-core: 6.26.3 babel-runtime: 6.26.0 @@ -8145,13 +8147,13 @@ packages: source-map-support: 0.4.18 /babel-runtime/6.26.0: - resolution: {integrity: sha1-llxwWGaOgrVde/4E/yM3vItWR/4=} + resolution: {integrity: sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==} dependencies: core-js: 2.6.12 regenerator-runtime: 0.11.1 /babel-template/6.26.0: - resolution: {integrity: sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=} + resolution: {integrity: sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==} dependencies: babel-runtime: 6.26.0 babel-traverse: 6.26.0 @@ -8160,7 +8162,7 @@ packages: lodash: 4.17.21 /babel-traverse/6.26.0: - resolution: {integrity: sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=} + resolution: {integrity: sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==} dependencies: babel-code-frame: 6.26.0 babel-messages: 6.23.0 @@ -8173,7 +8175,7 @@ packages: lodash: 4.17.21 /babel-types/6.26.0: - resolution: {integrity: sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=} + resolution: {integrity: sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==} dependencies: babel-runtime: 6.26.0 esutils: 2.0.3 @@ -8181,7 +8183,7 @@ packages: to-fast-properties: 1.0.3 /babelify/7.3.0: - resolution: {integrity: sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU=} + resolution: {integrity: sha512-vID8Fz6pPN5pJMdlUnNFSfrlcx5MUule4k9aKs/zbZPyXxMTcRrB0M4Tarw22L8afr8eYSWxDPYCob3TdrqtlA==} dependencies: babel-core: 6.26.3 object-assign: 4.1.1 @@ -8210,7 +8212,7 @@ packages: dev: true /backoff/2.5.0: - resolution: {integrity: sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=} + resolution: {integrity: sha512-wC5ihrnUXmR2douXmXLCe5O3zg3GKIyvRi/hi58a/XyRxVI+3/yM0PYueQOZXPXQ9pxBislYkw+sF9b7C/RuMA==} engines: {node: '>= 0.6'} dependencies: precond: 0.2.3 @@ -8258,7 +8260,7 @@ packages: resolution: {integrity: sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY=} /bcrypt-pbkdf/1.0.2: - resolution: {integrity: sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=} + resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} dependencies: tweetnacl: 0.14.5 @@ -8318,7 +8320,7 @@ packages: resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} /bn.js/4.11.6: - resolution: {integrity: sha1-UzRK2xRhehP26N0s4okF0cC6MhU=} + resolution: {integrity: sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA==} /bn.js/4.11.8: resolution: {integrity: sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==} @@ -8425,7 +8427,7 @@ packages: dev: false /brorand/1.1.0: - resolution: {integrity: sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=} + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} /browser-process-hrtime/1.0.0: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} @@ -8587,7 +8589,7 @@ packages: dev: true /bs58/4.0.1: - resolution: {integrity: sha1-vhYedsNU9veIrkBx9j806MTwpCo=} + resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} dependencies: base-x: 3.0.9 @@ -8641,11 +8643,11 @@ packages: resolution: {integrity: sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==} /buffer-to-arraybuffer/0.0.5: - resolution: {integrity: sha1-YGSkD6dutDxyOrqe+PbhIW0QURo=} + resolution: {integrity: sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ==} optional: true /buffer-xor/1.0.3: - resolution: {integrity: sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=} + resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} /buffer-xor/2.0.2: resolution: {integrity: sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ==} @@ -8692,12 +8694,12 @@ packages: engines: {node: '>= 0.8'} /bytewise-core/1.2.3: - resolution: {integrity: sha1-P7QQx+kVWOsasiqCg0V3qmvWHUI=} + resolution: {integrity: sha512-nZD//kc78OOxeYtRlVk8/zXqTB4gf/nlguL1ggWA8FuchMyOxcyHR4QPQZMUmA7czC+YnaBrPUCubqAWe50DaA==} dependencies: typewise-core: 1.2.0 /bytewise/1.1.0: - resolution: {integrity: sha1-HRPL/3F65xWAlKqIGzXQgbOHJT4=} + resolution: {integrity: sha512-rHuuseJ9iQ0na6UDhnrRVDh8YnWVlU6xM3VH6q/+yHDeUH2zIhUzP+2/h3LIrhLDBtTqzWpE3p3tP/boefskKQ==} dependencies: bytewise-core: 1.2.3 typewise: 1.0.3 @@ -8831,7 +8833,7 @@ packages: dev: false /camelcase/3.0.0: - resolution: {integrity: sha1-MvxLn82vhF/N9+c7uXysImHwqwo=} + resolution: {integrity: sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==} engines: {node: '>=0.10.0'} /camelcase/5.3.1: @@ -8871,7 +8873,7 @@ packages: dev: true /caseless/0.12.0: - resolution: {integrity: sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=} + resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} /ccount/1.1.0: resolution: {integrity: sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==} @@ -8899,7 +8901,7 @@ packages: dev: true /chalk/1.1.3: - resolution: {integrity: sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=} + resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} engines: {node: '>=0.10.0'} dependencies: ansi-styles: 2.2.1 @@ -8954,7 +8956,7 @@ packages: dev: true /checkpoint-store/1.1.0: - resolution: {integrity: sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=} + resolution: {integrity: sha512-J/NdY2WvIx654cc6LWSq/IYFFCUf75fFTgwzFnmbqyORH4MwgiQCgswLLKBGzmsyTI5V7i5bp/So6sMbDWhedg==} dependencies: functional-red-black-tree: 1.0.1 @@ -9137,7 +9139,7 @@ packages: colors: 1.4.0 /cliui/3.2.0: - resolution: {integrity: sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=} + resolution: {integrity: sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==} dependencies: string-width: 1.0.2 strip-ansi: 3.0.1 @@ -9179,7 +9181,7 @@ packages: shallow-clone: 3.0.1 /clone-response/1.0.2: - resolution: {integrity: sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=} + resolution: {integrity: sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q==} dependencies: mimic-response: 1.0.1 @@ -9193,7 +9195,7 @@ packages: dev: false /clone/2.1.2: - resolution: {integrity: sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=} + resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} engines: {node: '>=0.8'} /cloneable-readable/1.1.3: @@ -9209,7 +9211,7 @@ packages: engines: {node: '>=6'} /code-point-at/1.1.0: - resolution: {integrity: sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=} + resolution: {integrity: sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==} engines: {node: '>=0.10.0'} /collapse-white-space/1.0.6: @@ -9225,7 +9227,7 @@ packages: dev: true /collection-visit/1.0.0: - resolution: {integrity: sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=} + resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==} engines: {node: '>=0.10.0'} dependencies: map-visit: 1.0.0 @@ -10026,6 +10028,7 @@ packages: optional: true dependencies: ms: 2.1.2 + dev: true /debug/4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} @@ -12079,7 +12082,7 @@ packages: '@babel/core': 7.17.5 '@babel/runtime': 7.17.2 core-js: 3.21.1 - debug: 4.3.3 + debug: 4.3.4 glob-to-regexp: 0.4.1 is-subset: 0.1.1 lodash.isequal: 4.5.0 @@ -20985,7 +20988,7 @@ packages: js-sha3: 0.8.0 lodash: 4.17.21 mkdirp: 1.0.4 - prettier: 2.1.2 + prettier: 2.3.0 ts-command-line-args: 2.2.1 ts-essentials: 7.0.3_typescript@4.6.2 typescript: 4.6.2 From bcff9596e090c5a4cf1c8f18fa65d137e007d471 Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Thu, 26 May 2022 16:16:31 +0200 Subject: [PATCH 14/59] =?UTF-8?q?=F0=9F=94=92=20Fix=20ethers=20versions=20?= =?UTF-8?q?(#780)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/early-penguins-smash.md | 6 + package.json | 4 +- packages/coingecko/package.json | 4 +- packages/core/package.json | 16 +- .../docs/02-Guides/06-Troubleshooting.mdx | 2 +- packages/docs/package.json | 8 +- packages/example/package.json | 8 +- packages/extension/package.json | 6 +- packages/testing/package.json | 8 +- pnpm-lock.yaml | 176 ++++++++---------- 10 files changed, 113 insertions(+), 125 deletions(-) create mode 100644 .changeset/early-penguins-smash.md diff --git a/.changeset/early-penguins-smash.md b/.changeset/early-penguins-smash.md new file mode 100644 index 000000000..f85dd5a9b --- /dev/null +++ b/.changeset/early-penguins-smash.md @@ -0,0 +1,6 @@ +--- +'@usedapp/coingecko': patch +'@usedapp/core': patch +--- + +Fix ethers version diff --git a/package.json b/package.json index 31d380b12..76dc7d8f3 100644 --- a/package.json +++ b/package.json @@ -16,12 +16,12 @@ }, "dependencies": { "@changesets/cli": "^2.14.1", - "ethers": "^5.6.2", + "ethers": "5.6.2", "prettier": "2.1.2", "wsrun": "^5.2.1" }, "resolutions": { - "ethers": "^5.6.2" + "ethers": "5.6.2" }, "devDependencies": { "eslint-plugin-no-only-tests": "^2.6.0" diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index 9a47aa626..cb3109c8b 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -36,8 +36,8 @@ "react": "^17.0.1" }, "dependencies": { - "@ethersproject/contracts": "^5.6.0", - "@ethersproject/providers": "^5.6.2", + "@ethersproject/contracts": "5.6.0", + "@ethersproject/providers": "5.6.2", "@usedapp/core": "workspace:*", "isomorphic-fetch": "^3.0.0" }, diff --git a/packages/core/package.json b/packages/core/package.json index e4afce07e..2daf4e7d9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -17,16 +17,16 @@ "src" ], "dependencies": { - "@ethersproject/abi": "^5.6.1", - "@ethersproject/abstract-provider": "^5.6.0", - "@ethersproject/bignumber": "^5.6.0", - "@ethersproject/constants": "^5.6.0", - "@ethersproject/contracts": "^5.6.0", - "@ethersproject/providers": "^5.6.2", - "@ethersproject/wallet": "^5.6.0", + "@ethersproject/abi": "5.6.1", + "@ethersproject/abstract-provider": "5.6.0", + "@ethersproject/bignumber": "5.6.0", + "@ethersproject/constants": "5.6.0", + "@ethersproject/contracts": "5.6.0", + "@ethersproject/providers": "5.6.2", + "@ethersproject/wallet": "5.6.0", "@metamask/detect-provider": "^1.2.0", "@uniswap/token-lists": "^1.0.0-beta.27", - "ethers": "^5.6.2", + "ethers": "5.6.2", "fetch-mock": "^9.11.0", "lodash.merge": "^4.6.2", "lodash.pickby": "^4.6.0", diff --git a/packages/docs/docs/02-Guides/06-Troubleshooting.mdx b/packages/docs/docs/02-Guides/06-Troubleshooting.mdx index c572c98bf..693d76305 100644 --- a/packages/docs/docs/02-Guides/06-Troubleshooting.mdx +++ b/packages/docs/docs/02-Guides/06-Troubleshooting.mdx @@ -38,6 +38,6 @@ For example: ```json "resolutions": { "@ethersproject/abi": "5.2.0", - "@ethersproject/contracts": "^5.6.0" + "@ethersproject/contracts": "5.6.0" } ``` diff --git a/packages/docs/package.json b/packages/docs/package.json index cca58b90f..e30e685d5 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -25,9 +25,9 @@ "@docusaurus/core": "2.0.0-beta.17", "@docusaurus/preset-classic": "2.0.0-beta.17", "@docusaurus/remark-plugin-npm2yarn": "^2.0.0-beta.17", - "@ethersproject/contracts": "^5.6.0", - "@ethersproject/providers": "^5.6.2", - "@ethersproject/units": "^5.6.0", + "@ethersproject/contracts": "5.6.0", + "@ethersproject/providers": "5.6.2", + "@ethersproject/units": "5.6.0", "@mdx-js/react": "^1.6.22", "@metamask/jazzicon": "^2.0.0", "@usedapp/coingecko": "workspace:*", @@ -38,7 +38,7 @@ "clsx": "^1.1.1", "eslint": "7.19.0", "eslint-plugin-react-hooks": "^4.3.0", - "ethers": "^5.6.2", + "ethers": "5.6.2", "node-polyfill-webpack-plugin": "^1.1.4", "prettier": "^2.1.2", "prism-react-renderer": "^1.2.1", diff --git a/packages/example/package.json b/packages/example/package.json index fb0529843..fe74a9993 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -17,10 +17,10 @@ "@usedapp/coingecko": "workspace:*", "@usedapp/core": "workspace:*", "@walletconnect/web3-provider": "^1.7.1", - "@ethersproject/contracts": "^5.6.0", + "@ethersproject/contracts": "5.6.0", "@web3-react/walletconnect-connector": "6.2.4", - "@ethersproject/units": "^5.6.0", - "@ethersproject/abi": "^5.6.1", + "@ethersproject/units": "5.6.0", + "@ethersproject/abi": "5.6.1", "debug": "^4.3.4", "file-loader": "^6.2.0", "framer-motion": "^4.1.5", @@ -43,7 +43,7 @@ "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "@types/react-router-dom": "^5.1.7", - "@ethersproject/providers": "^5.6.2", + "@ethersproject/providers": "5.6.2", "@usedapp/playwright": "workspace:*", "chai": "^4.2.0", "copy-webpack-plugin": "^6.2.1", diff --git a/packages/extension/package.json b/packages/extension/package.json index 90acae793..e51291553 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -15,9 +15,9 @@ "build-storybook": "build-storybook -s ./static" }, "dependencies": { - "@ethersproject/abi": "^5.6.1", - "@ethersproject/address": "^5.6.0", - "ethers": "^5.6.2", + "@ethersproject/abi": "5.6.1", + "@ethersproject/address": "5.6.0", + "ethers": "5.6.2", "react": "^17.0.0", "react-dom": "^17.0.0", "styled-components": "^5.2.1" diff --git a/packages/testing/package.json b/packages/testing/package.json index c14b19d8a..a00d9e9a9 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -26,14 +26,14 @@ "typescript": "^4.6.2" }, "dependencies": { - "@ethersproject/constants": "^5.6.0", - "@ethersproject/contracts": "^5.6.0", - "@ethersproject/providers": "^5.6.2", + "@ethersproject/constants": "5.6.0", + "@ethersproject/contracts": "5.6.0", + "@ethersproject/providers": "5.6.2", "@types/react": "17.0.1", "@types/react-dom": "17.0.1", "@usedapp/core": "workspace:*", "ethereum-waffle": "4.0.0-alpha.0", - "ethers": "^5.6.2", + "ethers": "5.6.2", "react": "17.0.1", "react-dom": "17.0.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 531f26a05..7eb324ce8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: 5.3 overrides: - ethers: ^5.6.2 + ethers: 5.6.2 importers: @@ -9,12 +9,12 @@ importers: specifiers: '@changesets/cli': ^2.14.1 eslint-plugin-no-only-tests: ^2.6.0 - ethers: ^5.6.2 + ethers: 5.6.2 prettier: 2.1.2 wsrun: ^5.2.1 dependencies: '@changesets/cli': 2.21.1 - ethers: 5.6.3 + ethers: 5.6.2 prettier: 2.1.2 wsrun: 5.2.4 devDependencies: @@ -22,8 +22,8 @@ importers: packages/coingecko: specifiers: - '@ethersproject/contracts': ^5.6.0 - '@ethersproject/providers': ^5.6.2 + '@ethersproject/contracts': 5.6.0 + '@ethersproject/providers': 5.6.2 '@swc-node/register': ^1.4.2 '@testing-library/react-hooks': ^5.0.3 '@types/chai': ^4.2.14 @@ -72,13 +72,13 @@ importers: packages/core: specifiers: '@ethereum-waffle/provider': 4.0.0-alpha.0 - '@ethersproject/abi': ^5.6.1 - '@ethersproject/abstract-provider': ^5.6.0 - '@ethersproject/bignumber': ^5.6.0 - '@ethersproject/constants': ^5.6.0 - '@ethersproject/contracts': ^5.6.0 - '@ethersproject/providers': ^5.6.2 - '@ethersproject/wallet': ^5.6.0 + '@ethersproject/abi': 5.6.1 + '@ethersproject/abstract-provider': 5.6.0 + '@ethersproject/bignumber': 5.6.0 + '@ethersproject/constants': 5.6.0 + '@ethersproject/contracts': 5.6.0 + '@ethersproject/providers': 5.6.2 + '@ethersproject/wallet': 5.6.0 '@metamask/detect-provider': ^1.2.0 '@swc-node/register': ^1.4.2 '@testing-library/react-hooks': ^5.0.3 @@ -98,7 +98,7 @@ importers: eslint: 7.19.0 eslint-plugin-react-hooks: ^4.3.0 ethereum-waffle: 4.0.0-alpha.0 - ethers: ^5.6.2 + ethers: 5.6.2 fetch-mock: ^9.11.0 jsdom: ^16.4.0 jsdom-global: ^3.0.2 @@ -122,7 +122,7 @@ importers: '@ethersproject/wallet': 5.6.0 '@metamask/detect-provider': 1.2.0 '@uniswap/token-lists': 1.0.0-beta.27 - ethers: 5.6.3 + ethers: 5.6.2 fetch-mock: 9.11.0 lodash.merge: 4.6.2 lodash.pickby: 4.6.0 @@ -164,9 +164,9 @@ importers: '@docusaurus/module-type-aliases': 2.0.0-beta.20 '@docusaurus/preset-classic': 2.0.0-beta.17 '@docusaurus/remark-plugin-npm2yarn': ^2.0.0-beta.17 - '@ethersproject/contracts': ^5.6.0 - '@ethersproject/providers': ^5.6.2 - '@ethersproject/units': ^5.6.0 + '@ethersproject/contracts': 5.6.0 + '@ethersproject/providers': 5.6.2 + '@ethersproject/units': 5.6.0 '@mdx-js/react': ^1.6.22 '@metamask/jazzicon': ^2.0.0 '@tsconfig/docusaurus': ^1.0.4 @@ -185,7 +185,7 @@ importers: clsx: ^1.1.1 eslint: 7.19.0 eslint-plugin-react-hooks: ^4.3.0 - ethers: ^5.6.2 + ethers: 5.6.2 mocha: ^8.2.1 node-polyfill-webpack-plugin: ^1.1.4 playwright: ^1.20.2 @@ -216,7 +216,7 @@ importers: clsx: 1.1.1 eslint: 7.19.0 eslint-plugin-react-hooks: 4.3.0_eslint@7.19.0 - ethers: 5.6.3 + ethers: 5.6.2 node-polyfill-webpack-plugin: 1.1.4 prettier: 2.3.0 prism-react-renderer: 1.3.1_react@17.0.2 @@ -243,10 +243,10 @@ importers: packages/example: specifiers: - '@ethersproject/abi': ^5.6.1 - '@ethersproject/contracts': ^5.6.0 - '@ethersproject/providers': ^5.6.2 - '@ethersproject/units': ^5.6.0 + '@ethersproject/abi': 5.6.1 + '@ethersproject/contracts': 5.6.0 + '@ethersproject/providers': 5.6.2 + '@ethersproject/units': 5.6.0 '@pmmmwh/react-refresh-webpack-plugin': ^0.5.4 '@testing-library/react': ^11.0.0 '@typechain/ethers-v5': ^9.0.0 @@ -316,7 +316,7 @@ importers: '@ethersproject/providers': 5.6.2 '@pmmmwh/react-refresh-webpack-plugin': 0.5.4_2fa0d36f70fb0ce5409dce10fc1ff3ae '@testing-library/react': 11.2.7_react-dom@17.0.2+react@17.0.2 - '@typechain/ethers-v5': 9.0.0_713a96eb398ea1eefb91819463c29afe + '@typechain/ethers-v5': 9.0.0_8d7fa4ccdda916073c1de28cb1536173 '@types/chai': 4.3.0 '@types/debug': 4.1.7 '@types/mocha': 8.2.3 @@ -349,8 +349,8 @@ importers: packages/extension: specifiers: '@babel/core': ^7.14.0 - '@ethersproject/abi': ^5.6.1 - '@ethersproject/address': ^5.6.0 + '@ethersproject/abi': 5.6.1 + '@ethersproject/address': 5.6.0 '@storybook/addon-actions': ^6.2.9 '@storybook/addon-essentials': ^6.2.9 '@storybook/addon-links': ^6.2.9 @@ -367,7 +367,7 @@ importers: copy-webpack-plugin: ^6.2.1 esbuild-loader: ^2.11.0 eslint: 7.19.0 - ethers: ^5.6.2 + ethers: 5.6.2 mocha: ^8.2.1 prettier: ^2.0.5 react: ^17.0.0 @@ -383,7 +383,7 @@ importers: dependencies: '@ethersproject/abi': 5.6.1 '@ethersproject/address': 5.6.0 - ethers: 5.6.3 + ethers: 5.6.2 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 styled-components: 5.3.3_react-dom@17.0.2+react@17.0.2 @@ -461,7 +461,7 @@ importers: siwe: ^1.1.6 typescript: ^4.6.2 dependencies: - siwe: 1.1.6_ethers@5.6.3 + siwe: 1.1.6_ethers@5.6.2 devDependencies: '@swc-node/register': 1.4.2 '@testing-library/react-hooks': 5.1.3_react@17.0.2 @@ -490,9 +490,9 @@ importers: packages/testing: specifiers: '@ethereum-waffle/provider': 4.0.0-alpha.0 - '@ethersproject/constants': ^5.6.0 - '@ethersproject/contracts': ^5.6.0 - '@ethersproject/providers': ^5.6.2 + '@ethersproject/constants': 5.6.0 + '@ethersproject/contracts': 5.6.0 + '@ethersproject/providers': 5.6.2 '@swc-node/register': ^1.4.2 '@testing-library/react-hooks': ^5.0.3 '@types/chai': ^4.2.14 @@ -505,7 +505,7 @@ importers: chai: ^4.2.0 eslint: 7.19.0 ethereum-waffle: 4.0.0-alpha.0 - ethers: ^5.6.2 + ethers: 5.6.2 jsdom: ^16.4.0 jsdom-global: ^3.0.2 mocha: ^8.2.1 @@ -521,7 +521,7 @@ importers: '@types/react-dom': 17.0.1 '@usedapp/core': link:../core ethereum-waffle: 4.0.0-alpha.0_6bddc23fe2c0b9af3ce0fdadeab54392 - ethers: 5.6.3 + ethers: 5.6.2 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 devDependencies: @@ -3130,12 +3130,12 @@ packages: engines: {node: '>=10.0'} dependencies: '@ethereum-waffle/provider': 4.0.0-alpha.0 - ethers: 5.6.3 + ethers: 5.6.2 transitivePeerDependencies: - bufferutil - utf-8-validate - /@ethereum-waffle/compiler/4.0.0-alpha.0_5e4b2fdf6aa9e7852f0a17d58fc82927: + /@ethereum-waffle/compiler/4.0.0-alpha.0_256cf69a3c5e8c20d955f1f7b5311c9a: resolution: {integrity: sha512-FGnU3eWVODjKncEXJHbaqfnP4GLKEpqlvQ7W3yRE4ovmSWCRjNAjTeeKwFW7zZlDwG8WIRFVvSWlySKeuWc8MQ==} engines: {node: '>=10.0'} peerDependencies: @@ -3145,10 +3145,10 @@ packages: dependencies: '@resolver-engine/imports': 0.3.3 '@resolver-engine/imports-fs': 0.3.3 - '@typechain/ethers-v5': 9.0.0_5e4b2fdf6aa9e7852f0a17d58fc82927 + '@typechain/ethers-v5': 9.0.0_256cf69a3c5e8c20d955f1f7b5311c9a '@types/mkdirp': 0.5.2 '@types/node-fetch': 2.6.1 - ethers: 5.6.3 + ethers: 5.6.2 mkdirp: 0.5.5 node-fetch: 2.6.7 typechain: 7.0.1_typescript@4.6.2 @@ -3160,7 +3160,7 @@ packages: - typescript dev: false - /@ethereum-waffle/compiler/4.0.0-alpha.0_805095ea6e505494679731b88ebc7678: + /@ethereum-waffle/compiler/4.0.0-alpha.0_efb9faae6de36dfed0f85db0b5aa6048: resolution: {integrity: sha512-FGnU3eWVODjKncEXJHbaqfnP4GLKEpqlvQ7W3yRE4ovmSWCRjNAjTeeKwFW7zZlDwG8WIRFVvSWlySKeuWc8MQ==} engines: {node: '>=10.0'} peerDependencies: @@ -3170,10 +3170,10 @@ packages: dependencies: '@resolver-engine/imports': 0.3.3 '@resolver-engine/imports-fs': 0.3.3 - '@typechain/ethers-v5': 9.0.0_713a96eb398ea1eefb91819463c29afe + '@typechain/ethers-v5': 9.0.0_8d7fa4ccdda916073c1de28cb1536173 '@types/mkdirp': 0.5.2 '@types/node-fetch': 2.6.1 - ethers: 5.6.3 + ethers: 5.6.2 mkdirp: 0.5.5 node-fetch: 2.6.7 solc: 0.8.12 @@ -3192,7 +3192,7 @@ packages: dependencies: '@ensdomains/ens': 0.4.5 '@ensdomains/resolver': 0.2.4 - ethers: 5.6.3 + ethers: 5.6.2 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -3202,7 +3202,7 @@ packages: engines: {node: '>=10.0'} dependencies: '@ethersproject/abi': 5.6.1 - ethers: 5.6.3 + ethers: 5.6.2 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -3212,7 +3212,7 @@ packages: engines: {node: '>=10.0'} dependencies: '@ethereum-waffle/ens': 4.0.0-alpha.0 - ethers: 5.6.3 + ethers: 5.6.2 ganache-core: 2.13.2 patch-package: 6.4.7 postinstall-postinstall: 2.1.0 @@ -3234,6 +3234,19 @@ packages: '@ethersproject/strings': 5.6.0 optional: true + /@ethersproject/abi/5.6.0: + resolution: {integrity: sha512-AhVByTwdXCc2YQ20v300w6KVHle9g2OFc28ZAFCPnJyEpkv1xKXjZcSTgWOlv1i+0dqlgF8RCF2Rn2KC1t+1Vg==} + dependencies: + '@ethersproject/address': 5.6.0 + '@ethersproject/bignumber': 5.6.0 + '@ethersproject/bytes': 5.6.1 + '@ethersproject/constants': 5.6.0 + '@ethersproject/hash': 5.6.0 + '@ethersproject/keccak256': 5.6.0 + '@ethersproject/logger': 5.6.0 + '@ethersproject/properties': 5.6.0 + '@ethersproject/strings': 5.6.0 + /@ethersproject/abi/5.6.1: resolution: {integrity: sha512-0cqssYh6FXjlwKWBmLm3+zH2BNARoS5u/hxbz+LpQmcDB3w0W553h2btWui1/uZp2GBM/SI3KniTuMcYyHpA5w==} dependencies: @@ -3251,9 +3264,9 @@ packages: resolution: {integrity: sha512-oPMFlKLN+g+y7a79cLK3WiLcjWFnZQtXWgnLAbHZcN3s7L4v90UHpTOrLk+m3yr0gt+/h9STTM6zrr7PM8uoRw==} dependencies: '@ethersproject/bignumber': 5.6.0 - '@ethersproject/bytes': 5.6.0 + '@ethersproject/bytes': 5.6.1 '@ethersproject/logger': 5.6.0 - '@ethersproject/networks': 5.6.0 + '@ethersproject/networks': 5.6.2 '@ethersproject/properties': 5.6.0 '@ethersproject/transactions': 5.6.0 '@ethersproject/web': 5.6.0 @@ -3290,15 +3303,10 @@ packages: /@ethersproject/bignumber/5.6.0: resolution: {integrity: sha512-VziMaXIUHQlHJmkv1dlcd6GY2PmT0khtAqaMctCIDogxkrarMzA9L94KN1NeXqqOfFD6r0sJT3vCTOFSmZ07DA==} dependencies: - '@ethersproject/bytes': 5.6.0 + '@ethersproject/bytes': 5.6.1 '@ethersproject/logger': 5.6.0 bn.js: 4.11.9 - /@ethersproject/bytes/5.6.0: - resolution: {integrity: sha512-3hJPlYemb9V4VLfJF5BfN0+55vltPZSHU3QKUyP9M3Y2TcajbiRrz65UG+xVHOzBereB1b9mn7r12o177xgN7w==} - dependencies: - '@ethersproject/logger': 5.6.0 - /@ethersproject/bytes/5.6.1: resolution: {integrity: sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==} dependencies: @@ -3317,7 +3325,7 @@ packages: '@ethersproject/abstract-signer': 5.6.0 '@ethersproject/address': 5.6.0 '@ethersproject/bignumber': 5.6.0 - '@ethersproject/bytes': 5.6.0 + '@ethersproject/bytes': 5.6.1 '@ethersproject/constants': 5.6.0 '@ethersproject/logger': 5.6.0 '@ethersproject/properties': 5.6.0 @@ -3377,8 +3385,8 @@ packages: /@ethersproject/logger/5.6.0: resolution: {integrity: sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==} - /@ethersproject/networks/5.6.0: - resolution: {integrity: sha512-DaVzgyThzHgSDLuURhvkp4oviGoGe9iTZW4jMEORHDRCgSZ9K9THGFKqL+qGXqPAYLEgZTf5z2w56mRrPR1MjQ==} + /@ethersproject/networks/5.6.1: + resolution: {integrity: sha512-b2rrupf3kCTcc3jr9xOWBuHylSFtbpJf79Ga7QR98ienU2UqGimPGEsYMgbI29KHJfA5Us89XwGVmxrlxmSrMg==} dependencies: '@ethersproject/logger': 5.6.0 @@ -3424,32 +3432,6 @@ packages: - bufferutil - utf-8-validate - /@ethersproject/providers/5.6.3: - resolution: {integrity: sha512-PKTEZXjdAhGK/+hUwRLQqlGrwTRrK4D0FHEP2V9klUF8C6+AWfHkA3AoLI+a8oq5CUZoRAH0nMecYGkKxUjeSw==} - dependencies: - '@ethersproject/abstract-provider': 5.6.0 - '@ethersproject/abstract-signer': 5.6.0 - '@ethersproject/address': 5.6.0 - '@ethersproject/basex': 5.6.0 - '@ethersproject/bignumber': 5.6.0 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.0 - '@ethersproject/hash': 5.6.0 - '@ethersproject/logger': 5.6.0 - '@ethersproject/networks': 5.6.2 - '@ethersproject/properties': 5.6.0 - '@ethersproject/random': 5.6.0 - '@ethersproject/rlp': 5.6.0 - '@ethersproject/sha2': 5.6.0 - '@ethersproject/strings': 5.6.0 - '@ethersproject/transactions': 5.6.0 - '@ethersproject/web': 5.6.0 - bech32: 1.1.4 - ws: 7.4.6 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - /@ethersproject/random/5.6.0: resolution: {integrity: sha512-si0PLcLjq+NG/XHSZz90asNf+YfKEqJGVdxoEkSukzbnBgC8rydbgbUgBbBGLeHN4kAJwUFEKsu3sCXT93YMsw==} dependencies: @@ -5585,7 +5567,7 @@ packages: resolution: {integrity: sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==} dev: true - /@typechain/ethers-v5/9.0.0_5e4b2fdf6aa9e7852f0a17d58fc82927: + /@typechain/ethers-v5/9.0.0_256cf69a3c5e8c20d955f1f7b5311c9a: resolution: {integrity: sha512-bAanuPl1L2itaUdMvor/QvwnIH+TM/CmG00q17Ilv3ZZMeJ2j8HcarhgJUZ9pBY1teBb85P8cC03dz3mSSx+tQ==} peerDependencies: '@ethersproject/abi': ^5.0.0 @@ -5596,14 +5578,14 @@ packages: typescript: '>=4.0.0' dependencies: '@ethersproject/providers': 5.6.2 - ethers: 5.6.3 + ethers: 5.6.2 lodash: 4.17.21 ts-essentials: 7.0.3_typescript@4.6.2 typechain: 7.0.1_typescript@4.6.2 typescript: 4.6.2 dev: false - /@typechain/ethers-v5/9.0.0_713a96eb398ea1eefb91819463c29afe: + /@typechain/ethers-v5/9.0.0_8d7fa4ccdda916073c1de28cb1536173: resolution: {integrity: sha512-bAanuPl1L2itaUdMvor/QvwnIH+TM/CmG00q17Ilv3ZZMeJ2j8HcarhgJUZ9pBY1teBb85P8cC03dz3mSSx+tQ==} peerDependencies: '@ethersproject/abi': ^5.0.0 @@ -5615,7 +5597,7 @@ packages: dependencies: '@ethersproject/abi': 5.6.1 '@ethersproject/providers': 5.6.2 - ethers: 5.6.3 + ethers: 5.6.2 lodash: 4.17.21 ts-essentials: 7.0.3_typescript@4.6.2 typechain: 7.0.1_typescript@4.6.2 @@ -6917,7 +6899,7 @@ packages: engines: {node: '>= 0.12.0'} /aes-js/3.0.0: - resolution: {integrity: sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=} + resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} /aes-js/3.1.2: resolution: {integrity: sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==} @@ -11490,10 +11472,10 @@ packages: hasBin: true dependencies: '@ethereum-waffle/chai': 4.0.0-alpha.0 - '@ethereum-waffle/compiler': 4.0.0-alpha.0_805095ea6e505494679731b88ebc7678 + '@ethereum-waffle/compiler': 4.0.0-alpha.0_efb9faae6de36dfed0f85db0b5aa6048 '@ethereum-waffle/mock-contract': 4.0.0-alpha.0 '@ethereum-waffle/provider': 4.0.0-alpha.0 - ethers: 5.6.3 + ethers: 5.6.2 typechain: 7.0.1_typescript@4.6.2 transitivePeerDependencies: - '@ethersproject/abi' @@ -11513,10 +11495,10 @@ packages: hasBin: true dependencies: '@ethereum-waffle/chai': 4.0.0-alpha.0 - '@ethereum-waffle/compiler': 4.0.0-alpha.0_5e4b2fdf6aa9e7852f0a17d58fc82927 + '@ethereum-waffle/compiler': 4.0.0-alpha.0_256cf69a3c5e8c20d955f1f7b5311c9a '@ethereum-waffle/mock-contract': 4.0.0-alpha.0 '@ethereum-waffle/provider': 4.0.0-alpha.0 - ethers: 5.6.3 + ethers: 5.6.2 typechain: 7.0.1_typescript@4.6.2 transitivePeerDependencies: - '@ethersproject/abi' @@ -11702,10 +11684,10 @@ packages: uuid: 3.4.0 optional: true - /ethers/5.6.3: - resolution: {integrity: sha512-TkZAYGtbnzsGzEzqonLEMpOkmD5JIKCoWlAlj9ShAJlJszEkgKh3jVSeX1edLkYmqnpvJvGlBDK2y/HVe84LNg==} + /ethers/5.6.2: + resolution: {integrity: sha512-EzGCbns24/Yluu7+ToWnMca3SXJ1Jk1BvWB7CCmVNxyOeM4LLvw2OLuIHhlkhQk1dtOcj9UMsdkxUh8RiG1dxQ==} dependencies: - '@ethersproject/abi': 5.6.1 + '@ethersproject/abi': 5.6.0 '@ethersproject/abstract-provider': 5.6.0 '@ethersproject/abstract-signer': 5.6.0 '@ethersproject/address': 5.6.0 @@ -11720,10 +11702,10 @@ packages: '@ethersproject/json-wallets': 5.6.0 '@ethersproject/keccak256': 5.6.0 '@ethersproject/logger': 5.6.0 - '@ethersproject/networks': 5.6.2 + '@ethersproject/networks': 5.6.1 '@ethersproject/pbkdf2': 5.6.0 '@ethersproject/properties': 5.6.0 - '@ethersproject/providers': 5.6.3 + '@ethersproject/providers': 5.6.2 '@ethersproject/random': 5.6.0 '@ethersproject/rlp': 5.6.0 '@ethersproject/sha2': 5.6.0 @@ -19466,7 +19448,7 @@ packages: sax: 1.2.4 dev: false - /siwe/1.1.6_ethers@5.6.3: + /siwe/1.1.6_ethers@5.6.2: resolution: {integrity: sha512-3WRdEil32Tc2vuNzqJ2/Z/MIvsvy0Nkzc2ov+QujmpHO7tM83dgcb47z0Pu236T4JQkOQCqQkq3AJ/rVIezniA==} peerDependencies: ethers: 5.5.1 @@ -19474,7 +19456,7 @@ packages: '@spruceid/siwe-parser': 1.1.3 '@stablelib/random': 1.0.1 apg-js: 4.1.1 - ethers: 5.6.3 + ethers: 5.6.2 dev: false /slash/1.0.0: From 841d6ebafc8b2dc30ef5e6cee451f14ee905923f Mon Sep 17 00:00:00 2001 From: truefi-bot <102036168+truefi-bot@users.noreply.github.com> Date: Thu, 26 May 2022 16:39:03 +0200 Subject: [PATCH 15/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#779)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: truefi-bot --- .changeset/early-penguins-smash.md | 6 ------ .changeset/shaggy-dodos-sell.md | 5 ----- packages/coingecko/CHANGELOG.md | 9 +++++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 7 +++++++ packages/core/package.json | 2 +- packages/testing/CHANGELOG.md | 8 ++++++++ packages/testing/package.json | 2 +- 8 files changed, 27 insertions(+), 14 deletions(-) delete mode 100644 .changeset/early-penguins-smash.md delete mode 100644 .changeset/shaggy-dodos-sell.md diff --git a/.changeset/early-penguins-smash.md b/.changeset/early-penguins-smash.md deleted file mode 100644 index f85dd5a9b..000000000 --- a/.changeset/early-penguins-smash.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@usedapp/coingecko': patch -'@usedapp/core': patch ---- - -Fix ethers version diff --git a/.changeset/shaggy-dodos-sell.md b/.changeset/shaggy-dodos-sell.md deleted file mode 100644 index 4b5cf89b2..000000000 --- a/.changeset/shaggy-dodos-sell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -Remove testing submodule diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index 9969d289e..8e9157491 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,14 @@ # @usedapp/coingecko +## 1.0.5 + +### Patch Changes + +- bcff959: Fix ethers version +- Updated dependencies [bcff959] +- Updated dependencies [a0ab27f] + - @usedapp/core@1.0.5 + ## 1.0.4 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index cb3109c8b..888197b20 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.4", + "version": "1.0.5", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index a11f1b151..096b5a234 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/core +## 1.0.5 + +### Patch Changes + +- bcff959: Fix ethers version +- a0ab27f: Remove testing submodule + ## 1.0.4 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 2daf4e7d9..b472754c7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.4", + "version": "1.0.5", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 3a04315cf..05fabb5d8 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,13 @@ # @usedapp/testing +## 1.0.5 + +### Patch Changes + +- Updated dependencies [bcff959] +- Updated dependencies [a0ab27f] + - @usedapp/core@1.0.5 + ## 1.0.4 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index a00d9e9a9..c70ef48fa 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.4", + "version": "1.0.5", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git", From 63488329169085145faab24253323d8f39c5d728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Mon, 30 May 2022 15:11:13 +0200 Subject: [PATCH 16/59] =?UTF-8?q?=E2=9D=97=EF=B8=8F=20Fix=20exception=20du?= =?UTF-8?q?ring=20estimating=20gas=20price=20(#784)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/fix-estimated-gas-exception.md | 5 +++++ packages/core/src/hooks/usePromiseTransaction.ts | 13 +++++++++---- packages/core/src/hooks/useSendTransaction.test.ts | 6 +++--- 3 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 .changeset/fix-estimated-gas-exception.md diff --git a/.changeset/fix-estimated-gas-exception.md b/.changeset/fix-estimated-gas-exception.md new file mode 100644 index 000000000..dc642560c --- /dev/null +++ b/.changeset/fix-estimated-gas-exception.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +❗️ Fix exception during estimating gas price diff --git a/packages/core/src/hooks/usePromiseTransaction.ts b/packages/core/src/hooks/usePromiseTransaction.ts index fcdfdc1d0..e63a735de 100644 --- a/packages/core/src/hooks/usePromiseTransaction.ts +++ b/packages/core/src/hooks/usePromiseTransaction.ts @@ -16,10 +16,15 @@ export async function estimateGasLimit( if (!signer || !transactionRequest) { return undefined } - const estimatedGas = transactionRequest.gasLimit - ? BigNumber.from(transactionRequest.gasLimit) - : await signer.estimateGas(transactionRequest) - return estimatedGas?.mul(bufferGasLimitPercentage + 100).div(100) + try { + const estimatedGas = transactionRequest.gasLimit + ? BigNumber.from(transactionRequest.gasLimit) + : await signer.estimateGas(transactionRequest) + return estimatedGas?.mul(bufferGasLimitPercentage + 100).div(100) + } catch (err: any) { + console.error(err) + return undefined + } } const isDroppedAndReplaced = (e: any) => diff --git a/packages/core/src/hooks/useSendTransaction.test.ts b/packages/core/src/hooks/useSendTransaction.test.ts index 9c018ca8b..70d8c261d 100644 --- a/packages/core/src/hooks/useSendTransaction.test.ts +++ b/packages/core/src/hooks/useSendTransaction.test.ts @@ -45,9 +45,9 @@ describe('useSendTransaction', () => { const { result, waitForCurrent, waitForNextUpdate } = await renderWeb3Hook(useSendTransaction, { mockProvider }) await waitForNextUpdate() - await expect(result.current.sendTransaction({ to: '0x1', value: utils.parseEther('1') })).to.be.rejectedWith( - 'invalid address (argument="address", value="0x1", code=INVALID_ARGUMENT, version=address/5.6.0)' - ) + await result.current.sendTransaction({ to: '0x1', value: utils.parseEther('1') }) await waitForCurrent((val) => val.state !== undefined) + expect(result.current.state.status).to.eq('Exception') + expect(result.current.state.errorMessage).to.eq('invalid address') }) }) From 1bbb64b3ce83a2b6bd3f1039fd15a125fa60c478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Mon, 30 May 2022 23:28:31 +0200 Subject: [PATCH 17/59] =?UTF-8?q?=F0=9F=90=8A=20Disable=20fetching=20data?= =?UTF-8?q?=20while=20window=20inactive=20(#786)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add window provider * Add hook value to providers * Export provider and hook * Add Przemek's proposals * Fix lint * Add cleaner in useEffect Co-authored-by: mateusz --- packages/core/src/internal.ts | 3 ++ packages/core/src/providers/DAppProvider.tsx | 33 ++++++++++--------- .../blockNumber/blockNumber/provider.tsx | 4 ++- .../blockNumber/blockNumbers/provider.tsx | 6 ++-- .../blockNumber/common/subscribeToNewBlock.ts | 5 +-- .../chainState/multiChainStates/provider.tsx | 5 +++ packages/core/src/providers/index.ts | 1 + packages/core/src/providers/window/context.ts | 17 ++++++++++ packages/core/src/providers/window/index.ts | 2 ++ .../core/src/providers/window/provider.tsx | 30 +++++++++++++++++ 10 files changed, 86 insertions(+), 20 deletions(-) create mode 100644 packages/core/src/providers/window/context.ts create mode 100644 packages/core/src/providers/window/index.ts create mode 100644 packages/core/src/providers/window/provider.tsx diff --git a/packages/core/src/internal.ts b/packages/core/src/internal.ts index 5443e3916..7453bfe94 100644 --- a/packages/core/src/internal.ts +++ b/packages/core/src/internal.ts @@ -26,6 +26,9 @@ export { useNotificationsContext, ReadonlyNetworksProvider, useReadonlyNetworks, + useWindow, + WindowProvider, + WindowContext, } from './providers' export { connectContractToSigner, diff --git a/packages/core/src/providers/DAppProvider.tsx b/packages/core/src/providers/DAppProvider.tsx index 4bb210384..7fa756928 100644 --- a/packages/core/src/providers/DAppProvider.tsx +++ b/packages/core/src/providers/DAppProvider.tsx @@ -9,6 +9,7 @@ import { TransactionProvider } from './transactions/provider' import { LocalMulticallProvider } from './LocalMulticallProvider' import { NetworkProvider, ReadonlyNetworksProvider } from './network' import { BlockNumbersProvider } from './blockNumber/blockNumbers' +import { WindowProvider } from './window' export interface DAppProviderProps { children?: ReactNode @@ -59,20 +60,22 @@ function DAppProviderWithConfig({ children }: WithConfigProps) { const multicallAddressesMerged = { ...defaultAddresses, ...multicallAddresses } return ( - - - - - - - - {children} - - - - - - - + + + + + + + + + {children} + + + + + + + + ) } diff --git a/packages/core/src/providers/blockNumber/blockNumber/provider.tsx b/packages/core/src/providers/blockNumber/blockNumber/provider.tsx index 20fca749c..65c5624c4 100644 --- a/packages/core/src/providers/blockNumber/blockNumber/provider.tsx +++ b/packages/core/src/providers/blockNumber/blockNumber/provider.tsx @@ -3,6 +3,7 @@ import { BlockNumberContext } from './context' import { blockNumberReducer } from '../common/reducer' import { useDebounce, useEthers } from '../../../hooks' import { subscribeToNewBlock } from '../common/subscribeToNewBlock' +import { useWindow } from '../../window' interface Props { children: ReactNode @@ -14,8 +15,9 @@ interface Props { export function BlockNumberProvider({ children }: Props) { const { library, chainId } = useEthers() const [state, dispatch] = useReducer(blockNumberReducer, {}) + const { isActive } = useWindow() - useEffect(() => subscribeToNewBlock(library, chainId, dispatch), [library, chainId]) + useEffect(() => subscribeToNewBlock(library, chainId, dispatch, isActive), [library, chainId, isActive]) const debouncedState = useDebounce(state, 100) const blockNumber = chainId !== undefined ? debouncedState[chainId] : undefined diff --git a/packages/core/src/providers/blockNumber/blockNumbers/provider.tsx b/packages/core/src/providers/blockNumber/blockNumbers/provider.tsx index 1612edc94..7d1f2de46 100644 --- a/packages/core/src/providers/blockNumber/blockNumbers/provider.tsx +++ b/packages/core/src/providers/blockNumber/blockNumbers/provider.tsx @@ -4,6 +4,7 @@ import { useReadonlyNetworks } from '../../network' import { BlockNumbersContext } from './context' import { blockNumberReducer } from '../common/reducer' import { subscribeToNewBlock } from '../common/subscribeToNewBlock' +import { useWindow } from '../../window' interface Props { children: ReactNode @@ -12,16 +13,17 @@ interface Props { export function BlockNumbersProvider({ children }: Props) { const networks = useReadonlyNetworks() const [state, dispatch] = useReducer(blockNumberReducer, {}) + const { isActive } = useWindow() useEffect(() => { const onUnmount = Object.entries(networks).map(([chainId, provider]) => - subscribeToNewBlock(provider, Number(chainId), dispatch) + subscribeToNewBlock(provider, Number(chainId), dispatch, isActive) ) return () => { onUnmount.forEach((fn) => fn()) } - }, [networks]) + }, [networks, isActive]) const debouncedState = useDebounce(state, 100) diff --git a/packages/core/src/providers/blockNumber/common/subscribeToNewBlock.ts b/packages/core/src/providers/blockNumber/common/subscribeToNewBlock.ts index 97f015fba..ac189d9e2 100644 --- a/packages/core/src/providers/blockNumber/common/subscribeToNewBlock.ts +++ b/packages/core/src/providers/blockNumber/common/subscribeToNewBlock.ts @@ -6,9 +6,10 @@ import { BlockNumberChanged } from './reducer' export function subscribeToNewBlock( provider: BaseProvider | undefined, chainId: ChainId | undefined, - dispatch: Dispatch + dispatch: Dispatch, + isActive: boolean ) { - if (provider && chainId !== undefined) { + if (provider && chainId !== undefined && isActive) { const update = (blockNumber: number) => dispatch({ chainId, blockNumber }) provider.on('block', update) diff --git a/packages/core/src/providers/chainState/multiChainStates/provider.tsx b/packages/core/src/providers/chainState/multiChainStates/provider.tsx index 4ca4c6418..c395fa169 100644 --- a/packages/core/src/providers/chainState/multiChainStates/provider.tsx +++ b/packages/core/src/providers/chainState/multiChainStates/provider.tsx @@ -11,6 +11,7 @@ import { callsReducer, chainStateReducer, multicall1Factory, multicall2Factory } import { getUniqueActiveCalls } from '../../../helpers' import { useDevtoolsReporting } from '../common/useDevtoolsReporting' import { useChainId } from '../../../hooks/useChainId' +import { useWindow } from '../../window/context' interface Props { children: ReactNode @@ -39,6 +40,7 @@ export function MultiChainStateProvider({ children, multicallAddresses }: Props) const networks = useReadonlyNetworks() const blockNumbers = useBlockNumbers() const { reportError } = useNetwork() + const { isActive } = useWindow() const [calls, dispatchCalls] = useReducer(callsReducer, []) const [state, dispatchState] = useReducer(chainStateReducer, {}) @@ -60,6 +62,9 @@ export function MultiChainStateProvider({ children, multicallAddresses }: Props) ) function multicallForChain(chainId: ChainId, provider?: BaseProvider) { + if (!isActive) { + return + } const blockNumber = blockNumbers[chainId] const multicallAddress = multicallAddresses[chainId] diff --git a/packages/core/src/providers/index.ts b/packages/core/src/providers/index.ts index 40f6703f5..729bad1a1 100644 --- a/packages/core/src/providers/index.ts +++ b/packages/core/src/providers/index.ts @@ -8,3 +8,4 @@ export { useNotificationsContext } from './notifications/context' export * from './transactions/model' export * from './notifications/model' export * from './network/readonlyNetworks' +export * from './window' diff --git a/packages/core/src/providers/window/context.ts b/packages/core/src/providers/window/context.ts new file mode 100644 index 000000000..5c1b3a238 --- /dev/null +++ b/packages/core/src/providers/window/context.ts @@ -0,0 +1,17 @@ +import { createContext, useContext } from 'react' + +/** + * @internal Intended for internal use - use it on your own risk + */ +export const WindowContext = createContext<{ + isActive: boolean +}>({ + isActive: true, +}) + +/** + * @internal + */ +export function useWindow() { + return useContext(WindowContext) +} diff --git a/packages/core/src/providers/window/index.ts b/packages/core/src/providers/window/index.ts new file mode 100644 index 000000000..709eb6cce --- /dev/null +++ b/packages/core/src/providers/window/index.ts @@ -0,0 +1,2 @@ +export * from './context' +export * from './provider' diff --git a/packages/core/src/providers/window/provider.tsx b/packages/core/src/providers/window/provider.tsx new file mode 100644 index 000000000..5dc120f69 --- /dev/null +++ b/packages/core/src/providers/window/provider.tsx @@ -0,0 +1,30 @@ +import { ReactNode, useState, useEffect } from 'react' +import { WindowContext } from './context' + +interface Props { + children: ReactNode +} + +/** + * @internal Intended for internal use - use it on your own risk + */ +export function WindowProvider({ children }: Props) { + const [isActiveWindow, setActiveWindow] = useState(true) + + useEffect(() => { + const visibilityChangeListener = () => { + switch (document.visibilityState) { + case 'hidden': + setActiveWindow(false) + break + case 'visible': + setActiveWindow(true) + break + } + } + document.addEventListener('visibilitychange', visibilityChangeListener) + return () => document.removeEventListener('visibilitychange', visibilityChangeListener) + }, []) + + return +} From 4619282b3eeb60e95ac35086e90432831c530a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Wed, 1 Jun 2022 10:40:03 +0200 Subject: [PATCH 18/59] =?UTF-8?q?=F0=9F=A5=BF=20Add=20flat=20providers=20(?= =?UTF-8?q?#787)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add flat providers Co-authored-by: mateusz --- packages/core/package.json | 3 +- packages/core/src/providers/DAppProvider.tsx | 33 ++++++++++---------- pnpm-lock.yaml | 11 +++++++ 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index b472754c7..16d5436e5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -30,7 +30,8 @@ "fetch-mock": "^9.11.0", "lodash.merge": "^4.6.2", "lodash.pickby": "^4.6.0", - "nanoid": "3.1.22" + "nanoid": "3.1.22", + "react-flat-providers": "^2.1.0" }, "peerDependencies": { "react": "*" diff --git a/packages/core/src/providers/DAppProvider.tsx b/packages/core/src/providers/DAppProvider.tsx index 7fa756928..4181ce1e3 100644 --- a/packages/core/src/providers/DAppProvider.tsx +++ b/packages/core/src/providers/DAppProvider.tsx @@ -10,6 +10,7 @@ import { LocalMulticallProvider } from './LocalMulticallProvider' import { NetworkProvider, ReadonlyNetworksProvider } from './network' import { BlockNumbersProvider } from './blockNumber/blockNumbers' import { WindowProvider } from './window' +import { FlatProviders } from 'react-flat-providers' export interface DAppProviderProps { children?: ReactNode @@ -60,22 +61,20 @@ function DAppProviderWithConfig({ children }: WithConfigProps) { const multicallAddressesMerged = { ...defaultAddresses, ...multicallAddresses } return ( - - - - - - - - - {children} - - - - - - - - + + {children} + ) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7eb324ce8..da29eae2d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -109,6 +109,7 @@ importers: nanoid: 3.1.22 prettier: ^2.1.2 react: ^17.0.1 + react-flat-providers: ^2.1.0 solc: ^0.8.12 typechain: ^7.0.0 typescript: ^4.6.2 @@ -127,6 +128,7 @@ importers: lodash.merge: 4.6.2 lodash.pickby: 4.6.0 nanoid: 3.1.22 + react-flat-providers: 2.1.0_react@17.0.2 devDependencies: '@ethereum-waffle/provider': 4.0.0-alpha.0 '@swc-node/register': 1.4.2 @@ -18125,6 +18127,15 @@ packages: /react-fast-compare/3.2.0: resolution: {integrity: sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==} + /react-flat-providers/2.1.0_react@17.0.2: + resolution: {integrity: sha512-kYbIB5TmNkgf79Nbv2lb5bj3T2spLSZ6BLwLS3mgN61WPsYUeviuKV+FyfLbQDU1rFV1Z1tDvNLaS8cFKucEeQ==} + engines: {node: '>=16'} + peerDependencies: + react: '>= 17.0.0' + dependencies: + react: 17.0.2 + dev: false + /react-helmet-async/1.2.3_react-dom@17.0.2+react@17.0.2: resolution: {integrity: sha512-mCk2silF53Tq/YaYdkl2sB+/tDoPnaxN7dFS/6ZLJb/rhUY2EWGI5Xj2b4jHppScMqY45MbgPSwTxDchKpZ5Kw==} peerDependencies: From 06bedacc5870c1f645d2c173456c7f2b68296bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Wed, 1 Jun 2022 15:16:09 +0200 Subject: [PATCH 19/59] =?UTF-8?q?=F0=9F=93=84=20Add=20misssing=20tests=20(?= =?UTF-8?q?#789)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add misssing tests Co-authored-by: mateusz --- .github/workflows/CI.yml | 2 +- packages/core/src/hooks/useBlockMeta.test.tsx | 27 +++++++++++++++++-- .../core/src/hooks/useEtherBalance.test.tsx | 19 +++++++++++-- 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ad7728dd2..b92e1f527 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -21,7 +21,7 @@ jobs: - run: pnpm install --frozen-lockfile --strict-peer-dependencies - run: pnpm run lint - run: pnpm run build - - run: pnpm run test + - run: pnpm run test -- --timeout 0 test-example: runs-on: ubuntu-latest timeout-minutes: 25 diff --git a/packages/core/src/hooks/useBlockMeta.test.tsx b/packages/core/src/hooks/useBlockMeta.test.tsx index 0d3d1001b..d7240a43e 100644 --- a/packages/core/src/hooks/useBlockMeta.test.tsx +++ b/packages/core/src/hooks/useBlockMeta.test.tsx @@ -1,8 +1,17 @@ import { expect } from 'chai' -import { useBlockMeta } from '..' -import { renderWeb3Hook, sleep } from '../testing' +import { Wallet } from 'ethers' +import { Config, useBlockMeta } from '..' +import { renderDAppHook, renderWeb3Hook, sleep, setupTestingConfig, TestingNetwork } from '../testing' describe('useBlockMeta', () => { + let network1: TestingNetwork + let config: Config + const receiver = Wallet.createRandom().address + + beforeEach(async () => { + ;({ config, network1 } = await setupTestingConfig()) + await network1.wallets[0].sendTransaction({ to: receiver, value: 100 }) + }) it('retrieves block timestamp and difficulty', async () => { const { result, waitForCurrent } = await renderWeb3Hook(useBlockMeta) await waitForCurrent((val) => val?.timestamp !== undefined && val?.difficulty !== undefined) @@ -24,4 +33,18 @@ describe('useBlockMeta', () => { await waitForCurrent((val) => val.timestamp?.getTime() !== firstTimestamp?.getTime()) expect(result.current.timestamp).to.be.greaterThan(firstTimestamp) }) + + it('updates the block timestamp when a transaction gets mined qith dappHook', async () => { + const { result, waitForCurrent } = await renderDAppHook(useBlockMeta, { config }) + await waitForCurrent((val) => val.timestamp !== undefined && val.difficulty !== undefined) + + expect(result.error).to.be.undefined + const firstTimestamp = result.current.timestamp + + await sleep(1000) + await network1.wallets[0].sendTransaction({ to: receiver, value: 100 }) + await sleep(1000) + await waitForCurrent((val) => val.timestamp?.getTime() !== firstTimestamp?.getTime()) + expect(result.current.timestamp).to.be.greaterThan(firstTimestamp) + }) }) diff --git a/packages/core/src/hooks/useEtherBalance.test.tsx b/packages/core/src/hooks/useEtherBalance.test.tsx index 77af64e91..3f5a25cb4 100644 --- a/packages/core/src/hooks/useEtherBalance.test.tsx +++ b/packages/core/src/hooks/useEtherBalance.test.tsx @@ -3,7 +3,7 @@ import { Wallet } from 'ethers' import { useEffect } from 'react' import { Config } from '../constants' import { Mainnet } from '../model' -import { TestingNetwork, renderDAppHook, setupTestingConfig, SECOND_TEST_CHAIN_ID } from '../testing' +import { TestingNetwork, renderDAppHook, setupTestingConfig, SECOND_TEST_CHAIN_ID, sleep } from '../testing' import { useEtherBalance } from './useEtherBalance' import { useEthers } from './useEthers' @@ -34,7 +34,7 @@ describe('useEtherBalance', () => { expect(result.current).to.eq(100) }) - it('do not change static value when changing ether value', async () => { + it('does not change static value when changing ether value', async () => { const { result, waitForCurrent } = await renderDAppHook(() => useEtherBalance(receiver, { isStatic: true }), { config, }) @@ -46,6 +46,21 @@ describe('useEtherBalance', () => { expect(result.current).to.eq(100) }) + it('does change non-static value when changing ether value', async () => { + const { result, waitForCurrent } = await renderDAppHook(() => useEtherBalance(receiver, { isStatic: false }), { + config, + }) + await waitForCurrent((val) => val !== undefined) + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + await sleep(1000) + await network1.wallets[0].sendTransaction({ to: receiver, value: 100 }) + await sleep(1000) + await waitForCurrent((val) => val?.toString() === '200') + expect(result.error).to.be.undefined + expect(result.current).to.eq(200) + }) + it('defaults to active read-write provider chain id', async () => { const { result, waitForCurrent } = await renderDAppHook( () => { From 2972e56c7c57087a29d2e312cb5073ae381ae624 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Wed, 1 Jun 2022 15:30:22 +0200 Subject: [PATCH 20/59] =?UTF-8?q?=F0=9F=A5=B3=20Remove=20unnecessary=20req?= =?UTF-8?q?uests=20(#791)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor test a little * Create olive-peaches-enjoy.md Co-authored-by: mateusz --- .changeset/olive-peaches-enjoy.md | 5 +++++ packages/siwe/src/provider.test.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/olive-peaches-enjoy.md diff --git a/.changeset/olive-peaches-enjoy.md b/.changeset/olive-peaches-enjoy.md new file mode 100644 index 000000000..b0ed8ae57 --- /dev/null +++ b/.changeset/olive-peaches-enjoy.md @@ -0,0 +1,5 @@ +--- +"@usedapp/siwe": patch +--- + +πŸ₯³ Remove unnecessary requests diff --git a/packages/siwe/src/provider.test.tsx b/packages/siwe/src/provider.test.tsx index d4ef6c116..449b988e9 100644 --- a/packages/siwe/src/provider.test.tsx +++ b/packages/siwe/src/provider.test.tsx @@ -57,7 +57,7 @@ describe('siwe provider tests', async () => { let address: string before(async () => { - ;({ config, network1: network } = await setupTestingConfig()) + ({ config, network1: network } = await setupTestingConfig()) address = network.provider.getWallets()[0].address global.localStorage = mockLocalStorage as any }) From 1ce58ad90e14c54f4bbe02df4fe475c6ac3af178 Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Wed, 1 Jun 2022 18:16:55 +0200 Subject: [PATCH 21/59] =?UTF-8?q?=F0=9F=A6=86=20No=20metamask=20deactivate?= =?UTF-8?q?=20option=20(#792)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/poor-radios-jump.md | 5 +++++ packages/core/src/constants/type/Config.ts | 4 ++++ .../providers/network/network/provider.tsx | 22 ++++++++++++++----- .../docs/docs/03-API Reference/03-Models.mdx | 13 +++++++++++ packages/example/src/index.tsx | 1 + 5 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 .changeset/poor-radios-jump.md diff --git a/.changeset/poor-radios-jump.md b/.changeset/poor-radios-jump.md new file mode 100644 index 000000000..888723aff --- /dev/null +++ b/.changeset/poor-radios-jump.md @@ -0,0 +1,5 @@ +--- +'@usedapp/core': patch +--- + +Add no metamask deactivate option diff --git a/packages/core/src/constants/type/Config.ts b/packages/core/src/constants/type/Config.ts index 9ca1926c6..55f04db7f 100644 --- a/packages/core/src/constants/type/Config.ts +++ b/packages/core/src/constants/type/Config.ts @@ -36,6 +36,10 @@ export type FullConfig = { * @experimental */ fastMulticallEncoding?: boolean + /** + * @experimental + */ + noMetamaskDeactivate?: boolean /** * @deprecated */ diff --git a/packages/core/src/providers/network/network/provider.tsx b/packages/core/src/providers/network/network/provider.tsx index 1ce4c49d4..9bb0f22e9 100644 --- a/packages/core/src/providers/network/network/provider.tsx +++ b/packages/core/src/providers/network/network/provider.tsx @@ -28,7 +28,7 @@ async function tryToGetAccount(provider: JsonRpcProvider) { * @internal Intended for internal use - use it on your own risk */ export function NetworkProvider({ children, providerOverride }: NetworkProviderProps) { - const { autoConnect, pollingInterval } = useConfig() + const { autoConnect, pollingInterval, noMetamaskDeactivate } = useConfig() const [network, dispatch] = useReducer(networksReducer, defaultNetworkState) const [onUnsubscribe, setOnUnsubscribe] = useState<() => void>(() => () => undefined) @@ -81,10 +81,16 @@ export function NetworkProvider({ children, providerOverride }: NetworkProviderP }) }, []) - const onDisconnect = useCallback((error) => { - deactivate() - reportError(error) - }, []) + const onDisconnect = useCallback( + (provider: JsonRpcProvider) => (error: any) => { + const isMetaMask = (provider as any).provider.isMetaMask + if (!noMetamaskDeactivate || !isMetaMask) { + reportError(error) + deactivate() + } + }, + [] + ) useEffect(() => { setTimeout(async () => { @@ -114,7 +120,11 @@ export function NetworkProvider({ children, providerOverride }: NetworkProviderP const account = await tryToGetAccount(wrappedProvider) const chainId = (await wrappedProvider.getNetwork())?.chainId onUnsubscribe() - const clearSubscriptions = subscribeToProviderEvents((wrappedProvider as any).provider, update, onDisconnect) + const clearSubscriptions = subscribeToProviderEvents( + (wrappedProvider as any).provider, + update, + onDisconnect(wrappedProvider) + ) setOnUnsubscribe(() => clearSubscriptions) update({ provider: wrappedProvider, diff --git a/packages/docs/docs/03-API Reference/03-Models.mdx b/packages/docs/docs/03-API Reference/03-Models.mdx index 6a37503ad..84dac2e0d 100644 --- a/packages/docs/docs/03-API Reference/03-Models.mdx +++ b/packages/docs/docs/03-API Reference/03-Models.mdx @@ -76,6 +76,19 @@ The flag is experimental and is not fully tested yet. ::: +**noMetamaskDeactivate** +Don't listen on `disconnect` event from Metamask. Might be useful in dealing with [this Metamask bug](https://github.com/MetaMask/metamask-extension/issues/13375). + +***Default value:*** + +`false` + +:::note + +The flag is experimental and is not fully tested yet. + +::: + ## ChainId A number describing the ID of the chain. See [ChainList](https://chainlist.org/) for a list of known chains and their IDs. diff --git a/packages/example/src/index.tsx b/packages/example/src/index.tsx index ee0c8ba48..03c107356 100644 --- a/packages/example/src/index.tsx +++ b/packages/example/src/index.tsx @@ -14,6 +14,7 @@ const config: Config = { }, multicallVersion: 2 as const, fastMulticallEncoding: true, + noMetamaskDeactivate: true, } ReactDOM.render( From 3a2e2646d642f0dd2218881ab0d5a5ec523b6780 Mon Sep 17 00:00:00 2001 From: truefi-bot <102036168+truefi-bot@users.noreply.github.com> Date: Wed, 1 Jun 2022 19:09:52 +0200 Subject: [PATCH 22/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#785)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: truefi-bot --- .changeset/fix-estimated-gas-exception.md | 5 ----- .changeset/olive-peaches-enjoy.md | 5 ----- .changeset/poor-radios-jump.md | 5 ----- packages/coingecko/CHANGELOG.md | 8 ++++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 7 +++++++ packages/core/package.json | 2 +- packages/siwe/CHANGELOG.md | 9 +++++++++ packages/siwe/package.json | 2 +- packages/testing/CHANGELOG.md | 8 ++++++++ packages/testing/package.json | 2 +- 11 files changed, 36 insertions(+), 19 deletions(-) delete mode 100644 .changeset/fix-estimated-gas-exception.md delete mode 100644 .changeset/olive-peaches-enjoy.md delete mode 100644 .changeset/poor-radios-jump.md diff --git a/.changeset/fix-estimated-gas-exception.md b/.changeset/fix-estimated-gas-exception.md deleted file mode 100644 index dc642560c..000000000 --- a/.changeset/fix-estimated-gas-exception.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -❗️ Fix exception during estimating gas price diff --git a/.changeset/olive-peaches-enjoy.md b/.changeset/olive-peaches-enjoy.md deleted file mode 100644 index b0ed8ae57..000000000 --- a/.changeset/olive-peaches-enjoy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/siwe": patch ---- - -πŸ₯³ Remove unnecessary requests diff --git a/.changeset/poor-radios-jump.md b/.changeset/poor-radios-jump.md deleted file mode 100644 index 888723aff..000000000 --- a/.changeset/poor-radios-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -Add no metamask deactivate option diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index 8e9157491..e5fb4299a 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,13 @@ # @usedapp/coingecko +## 1.0.6 + +### Patch Changes + +- Updated dependencies [6348832] +- Updated dependencies [1ce58ad] + - @usedapp/core@1.0.6 + ## 1.0.5 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index 888197b20..e459957ee 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.5", + "version": "1.0.6", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 096b5a234..38335844b 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/core +## 1.0.6 + +### Patch Changes + +- 6348832: ❗️ Fix exception during estimating gas price +- 1ce58ad: Add no metamask deactivate option + ## 1.0.5 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 16d5436e5..1d0126e77 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.5", + "version": "1.0.6", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/siwe/CHANGELOG.md b/packages/siwe/CHANGELOG.md index 3ef570997..60cf9695f 100644 --- a/packages/siwe/CHANGELOG.md +++ b/packages/siwe/CHANGELOG.md @@ -1,5 +1,14 @@ # @usedapp/siwe +## 0.1.3 + +### Patch Changes + +- 2972e56: πŸ₯³ Remove unnecessary requests +- Updated dependencies [6348832] +- Updated dependencies [1ce58ad] + - @usedapp/core@1.0.6 + ## 0.1.2 ### Patch Changes diff --git a/packages/siwe/package.json b/packages/siwe/package.json index c11c4969c..d31fc9084 100644 --- a/packages/siwe/package.json +++ b/packages/siwe/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/siwe", - "version": "0.1.2", + "version": "0.1.3", "repository": "git@github.com:TrueFiEng/useDApp.git", "author": "TrueFiEng", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 05fabb5d8..3c5bc2200 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,13 @@ # @usedapp/testing +## 1.0.6 + +### Patch Changes + +- Updated dependencies [6348832] +- Updated dependencies [1ce58ad] + - @usedapp/core@1.0.6 + ## 1.0.5 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index c70ef48fa..21895b9e6 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.5", + "version": "1.0.6", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git", From 2a65bfbf2241dd436ce3208cd7fccc435c804e04 Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Thu, 2 Jun 2022 11:58:15 +0200 Subject: [PATCH 23/59] =?UTF-8?q?=F0=9F=97=BD=20Use=20more=20specific=20im?= =?UTF-8?q?ports=20(#793)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/large-roses-sing.md | 5 +++++ packages/core/src/hooks/useContractFunction.ts | 3 ++- packages/core/src/hooks/usePromiseTransaction.ts | 3 +-- packages/core/src/hooks/useSendTransaction.ts | 3 ++- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .changeset/large-roses-sing.md diff --git a/.changeset/large-roses-sing.md b/.changeset/large-roses-sing.md new file mode 100644 index 000000000..4ec12dac9 --- /dev/null +++ b/.changeset/large-roses-sing.md @@ -0,0 +1,5 @@ +--- +'@usedapp/core': patch +--- + +Use more specific imports diff --git a/packages/core/src/hooks/useContractFunction.ts b/packages/core/src/hooks/useContractFunction.ts index 0b8ab0ba5..6de75312b 100644 --- a/packages/core/src/hooks/useContractFunction.ts +++ b/packages/core/src/hooks/useContractFunction.ts @@ -1,4 +1,5 @@ -import { TransactionOptions, useConfig } from '../../src' +import { TransactionOptions } from '../model/TransactionOptions' +import { useConfig } from './useConfig' import { Contract } from '@ethersproject/contracts' import { JsonRpcProvider } from '@ethersproject/providers' import { useCallback, useState } from 'react' diff --git a/packages/core/src/hooks/usePromiseTransaction.ts b/packages/core/src/hooks/usePromiseTransaction.ts index e63a735de..1d5fe5ada 100644 --- a/packages/core/src/hooks/usePromiseTransaction.ts +++ b/packages/core/src/hooks/usePromiseTransaction.ts @@ -1,8 +1,7 @@ import { TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider' import { useCallback, useState } from 'react' import { useNotificationsContext, useTransactionsContext } from '../providers' -import { TransactionStatus, TransactionOptions } from '../../src' -import { TransactionState } from '../model' +import { TransactionStatus, TransactionOptions, TransactionState } from '../model' import { BigNumber, errors, Signer } from 'ethers' /** diff --git a/packages/core/src/hooks/useSendTransaction.ts b/packages/core/src/hooks/useSendTransaction.ts index ac2f615e1..475fb1c26 100644 --- a/packages/core/src/hooks/useSendTransaction.ts +++ b/packages/core/src/hooks/useSendTransaction.ts @@ -1,5 +1,6 @@ import { TransactionRequest } from '@ethersproject/abstract-provider' -import { TransactionOptions, useConfig } from '../../src' +import { TransactionOptions } from '../model/TransactionOptions' +import { useConfig } from './useConfig' import { useEthers } from './useEthers' import { estimateGasLimit, usePromiseTransaction } from './usePromiseTransaction' From fbe2965d9de1a0fdf2908389fb3b22eb3a5831da Mon Sep 17 00:00:00 2001 From: truefi-bot <102036168+truefi-bot@users.noreply.github.com> Date: Thu, 2 Jun 2022 12:10:38 +0200 Subject: [PATCH 24/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#794)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/large-roses-sing.md | 5 ----- packages/coingecko/CHANGELOG.md | 7 +++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/testing/CHANGELOG.md | 7 +++++++ packages/testing/package.json | 2 +- 7 files changed, 23 insertions(+), 8 deletions(-) delete mode 100644 .changeset/large-roses-sing.md diff --git a/.changeset/large-roses-sing.md b/.changeset/large-roses-sing.md deleted file mode 100644 index 4ec12dac9..000000000 --- a/.changeset/large-roses-sing.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -Use more specific imports diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index e5fb4299a..ed2545c08 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/coingecko +## 1.0.7 + +### Patch Changes + +- Updated dependencies [2a65bfb] + - @usedapp/core@1.0.7 + ## 1.0.6 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index e459957ee..d70231eb6 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.6", + "version": "1.0.7", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 38335844b..71e2b7f35 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @usedapp/core +## 1.0.7 + +### Patch Changes + +- 2a65bfb: Use more specific imports + ## 1.0.6 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 1d0126e77..02395e486 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.6", + "version": "1.0.7", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 3c5bc2200..69abf714f 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/testing +## 1.0.7 + +### Patch Changes + +- Updated dependencies [2a65bfb] + - @usedapp/core@1.0.7 + ## 1.0.6 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index 21895b9e6..5b5bc98d4 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.6", + "version": "1.0.7", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git", From 9ba803ca637198631958791d1ae537562f8290f5 Mon Sep 17 00:00:00 2001 From: Dmitry Lobachevsky Date: Fri, 3 Jun 2022 17:54:01 +0700 Subject: [PATCH 25/59] =?UTF-8?q?=F0=9F=91=BD=20Update=20usePromiseTransac?= =?UTF-8?q?tion.ts=20error=20message=20(#796)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update usePromiseTransaction.ts error message Co-authored-by: Przemyslaw Rzad --- packages/core/src/hooks/usePromiseTransaction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/hooks/usePromiseTransaction.ts b/packages/core/src/hooks/usePromiseTransaction.ts index 1d5fe5ada..94fe7c1e0 100644 --- a/packages/core/src/hooks/usePromiseTransaction.ts +++ b/packages/core/src/hooks/usePromiseTransaction.ts @@ -60,7 +60,7 @@ export function usePromiseTransaction(chainId: number | undefined, options?: Tra setState({ receipt, transaction, status: 'Success', chainId }) return receipt } catch (e: any) { - const errorMessage = e.error?.message ?? e.reason ?? e.data?.message ?? e.message + const errorMessage = e.error?.data?.message ?? e.error?.message ?? e.reason ?? e.data?.message ?? e.message if (transaction) { const droppedAndReplaced = isDroppedAndReplaced(e) From 24e96686816e3881ba5c896a15aa744e1673c0cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Fri, 3 Jun 2022 13:37:44 +0200 Subject: [PATCH 26/59] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Add=20block=20refres?= =?UTF-8?q?her=20(#795)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add refreshing logic * Add refreshing tests * Remake refreshing logic * Rename refresh objects * Add validator before multicall Co-authored-by: mateusz --- .changeset/add-block-refresher.md | 5 + packages/core/src/constants/type/Config.ts | 4 + .../core/src/constants/type/QueryParams.ts | 2 + packages/core/src/helpers/calls.ts | 14 +- packages/core/src/hooks/refreshing.test.ts | 141 ++++++++++++++++++ packages/core/src/hooks/useCall.ts | 10 +- .../chainState/common/callsReducer.ts | 33 +++- .../chainState/common/performMulticall.ts | 4 + .../chainState/multiChainStates/provider.tsx | 6 +- 9 files changed, 207 insertions(+), 12 deletions(-) create mode 100644 .changeset/add-block-refresher.md create mode 100644 packages/core/src/hooks/refreshing.test.ts diff --git a/.changeset/add-block-refresher.md b/.changeset/add-block-refresher.md new file mode 100644 index 000000000..18bf910e5 --- /dev/null +++ b/.changeset/add-block-refresher.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +⚑️ Add block refresher diff --git a/packages/core/src/constants/type/Config.ts b/packages/core/src/constants/type/Config.ts index 55f04db7f..1d03eeefe 100644 --- a/packages/core/src/constants/type/Config.ts +++ b/packages/core/src/constants/type/Config.ts @@ -75,6 +75,10 @@ export type FullConfig = { * Enables reconnecting to last used provider when user revisits the page. */ autoConnect: boolean + /** + * Refresh standard calls each time the n-th block is mined. + */ + refresh?: number | 'never' | 'everyBlock' } /* eslint-disable @typescript-eslint/ban-types */ diff --git a/packages/core/src/constants/type/QueryParams.ts b/packages/core/src/constants/type/QueryParams.ts index 30b6b5df1..1ff6d2d84 100644 --- a/packages/core/src/constants/type/QueryParams.ts +++ b/packages/core/src/constants/type/QueryParams.ts @@ -1,4 +1,5 @@ import { BlockTag } from '@ethersproject/abstract-provider' +import { Config } from '..' import { ChainId } from '../chainId' /** @@ -12,6 +13,7 @@ export interface QueryParams { */ chainId?: ChainId isStatic?: boolean + refresh?: Config['refresh'] } /** diff --git a/packages/core/src/helpers/calls.ts b/packages/core/src/helpers/calls.ts index 75b35aa7d..5388c7dc5 100644 --- a/packages/core/src/helpers/calls.ts +++ b/packages/core/src/helpers/calls.ts @@ -2,6 +2,7 @@ import { utils } from 'ethers' import { Call } from '../hooks/useCall' import { Awaited, ContractMethodNames, Falsy, TypedContract } from '../model/types' import { RawCall, RawCallResult } from '../providers' +import { QueryParams } from '../constants/type/QueryParams' /** * @internal Intended for internal use - use it on your own risk @@ -17,7 +18,7 @@ export function warnOnInvalidCall(call: Call | Falsy) { /** * @internal Intended for internal use - use it on your own risk */ -export function encodeCallData(call: Call | Falsy, chainId: number, isStatic?: boolean): RawCall | Falsy { +export function encodeCallData(call: Call | Falsy, chainId: number, queryParams: QueryParams = {}): RawCall | Falsy { if (!call) { return undefined } @@ -27,7 +28,16 @@ export function encodeCallData(call: Call | Falsy, chainId: number, isStatic?: b return undefined } try { - return { address: contract.address, data: contract.interface.encodeFunctionData(method, args), chainId, isStatic } + const isStatic = queryParams.isStatic ?? queryParams.refresh === 'never' + const refreshPerBlocks = typeof queryParams.refresh === 'number' ? queryParams.refresh : undefined + + return { + address: contract.address, + data: contract.interface.encodeFunctionData(method, args), + chainId, + isStatic, + refreshPerBlocks, + } } catch { warnOnInvalidCall(call) return undefined diff --git a/packages/core/src/hooks/refreshing.test.ts b/packages/core/src/hooks/refreshing.test.ts new file mode 100644 index 000000000..f48fde5e3 --- /dev/null +++ b/packages/core/src/hooks/refreshing.test.ts @@ -0,0 +1,141 @@ +import { expect } from 'chai' +import { Wallet } from 'ethers' +import { Config } from '../constants' +import { TestingNetwork, renderDAppHook, setupTestingConfig } from '../testing' +import { useEtherBalance } from './useEtherBalance' +import { sleep } from '../testing/utils/waitUntil' + +describe('useEtherBalance with refreshing', () => { + let network1: TestingNetwork + let config: Config + const receiver = Wallet.createRandom().address + + const mineBlock = async () => { + await network1.wallets[0].sendTransaction({ to: receiver, value: 100 }) + await sleep(1000) // block needs time to be mined + } + + beforeEach(async () => { + ;({ config, network1 } = await setupTestingConfig()) + await network1.wallets[0].sendTransaction({ to: receiver, value: 100 }) + }) + + it('does not change value with never refreshing with global config', async () => { + const { result, waitForCurrent } = await renderDAppHook(() => useEtherBalance(receiver), { + config: { + ...config, + refresh: 'never', + }, + }) + await waitForCurrent((val) => val !== undefined) + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + await mineBlock() + await waitForCurrent((val) => val !== undefined) + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + await mineBlock() + await waitForCurrent((val) => val !== undefined) + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + }) + + it('does not change value with never refreshing with query param', async () => { + const { result, waitForCurrent } = await renderDAppHook( + () => + useEtherBalance(receiver, { + refresh: 'never', + }), + { + config, + } + ) + await waitForCurrent((val) => val !== undefined) + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + await mineBlock() + await waitForCurrent((val) => val !== undefined) + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + await mineBlock() + await waitForCurrent((val) => val !== undefined) + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + }) + + it('does change value every block', async () => { + const { result, waitForCurrent } = await renderDAppHook(() => useEtherBalance(receiver), { + config: { + ...config, + refresh: 'everyBlock', + }, + }) + await waitForCurrent((val) => val !== undefined) + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + await mineBlock() + await waitForCurrent((val) => val?.toString() === '200') + expect(result.error).to.be.undefined + expect(result.current).to.eq(200) + }) + + it('overrides global config with query param', async () => { + const { result, waitForCurrent } = await renderDAppHook( + () => + useEtherBalance(receiver, { + refresh: 'everyBlock', + }), + { + config, + } + ) + await waitForCurrent((val) => val !== undefined) + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + await mineBlock() + await waitForCurrent((val) => val?.toString() === '200') + expect(result.error).to.be.undefined + expect(result.current).to.eq(200) + }) + + it('does change value after specified number of blocks with global config', async () => { + const { result, waitForCurrent } = await renderDAppHook(() => useEtherBalance(receiver), { + config: { + ...config, + refresh: 2, + }, + }) + await waitForCurrent((val) => val !== undefined) + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + await mineBlock() + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + await mineBlock() + await waitForCurrent((val) => val?.toString() === '300') + expect(result.error).to.be.undefined + expect(result.current).to.eq(300) + }) + + it('does change value after specified number of blocks with query param', async () => { + const { result, waitForCurrent } = await renderDAppHook( + () => + useEtherBalance(receiver, { + refresh: 2, + }), + { + config, + } + ) + await waitForCurrent((val) => val !== undefined) + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + await mineBlock() + expect(result.error).to.be.undefined + expect(result.current).to.eq(100) + await mineBlock() + await waitForCurrent((val) => val?.toString() === '300') + expect(result.error).to.be.undefined + expect(result.current).to.eq(300) + }) +}) diff --git a/packages/core/src/hooks/useCall.ts b/packages/core/src/hooks/useCall.ts index 8b16effa5..8143289b6 100644 --- a/packages/core/src/hooks/useCall.ts +++ b/packages/core/src/hooks/useCall.ts @@ -5,6 +5,7 @@ import { useRawCalls } from './useRawCalls' import { CallResult, decodeCallResult, encodeCallData } from '../helpers' import { QueryParams } from '../constants/type/QueryParams' import { useChainId } from './useChainId' +import { useConfig } from './useConfig' /** * @public @@ -76,10 +77,15 @@ export function useCall[] { const chainId = useChainId({ queryParams }) - const { isStatic } = queryParams + const { refresh } = useConfig() const rawCalls = useMemo( - () => calls.map((call) => (chainId !== undefined ? encodeCallData(call, chainId, isStatic) : undefined)), + () => + calls.map((call) => + chainId !== undefined + ? encodeCallData(call, chainId, { ...queryParams, refresh: queryParams.refresh ?? refresh }) + : undefined + ), [ JSON.stringify( calls.map( diff --git a/packages/core/src/providers/chainState/common/callsReducer.ts b/packages/core/src/providers/chainState/common/callsReducer.ts index ac81efcc1..af2935f78 100644 --- a/packages/core/src/providers/chainState/common/callsReducer.ts +++ b/packages/core/src/providers/chainState/common/callsReducer.ts @@ -14,6 +14,8 @@ export interface RawCall { data: string isStatic?: boolean isDisabled?: boolean + lastUpdatedBlockNumber?: number + refreshPerBlocks?: number } /** @@ -34,6 +36,8 @@ interface AddCall { interface UpdateCall { type: 'UPDATE_CALLS' calls: RawCall[] + blockNumber: number + chainId: number } interface RemoveCall { @@ -48,14 +52,35 @@ export function callsReducer(state: RawCall[] = [], action: Action) { if (action.type === 'ADD_CALLS') { return [...state, ...action.calls.map((call) => ({ ...call, address: call.address.toLowerCase() }))] } else if (action.type === 'UPDATE_CALLS') { - return state.map((call) => - call.isStatic + return state.map((call) => { + if (call.chainId !== action.chainId) { + return call + } + const blockNumber = action.blockNumber + if (call.refreshPerBlocks && call.lastUpdatedBlockNumber) { + return call.lastUpdatedBlockNumber + call.refreshPerBlocks === blockNumber + ? { + ...call, + lastUpdatedBlockNumber: blockNumber, + isDisabled: false, + } + : { + ...call, + isDisabled: true, + } + } + + return call.isStatic ? { ...call, isDisabled: true, } - : call - ) + : { + ...call, + lastUpdatedBlockNumber: blockNumber, + isDisabled: call.refreshPerBlocks !== undefined ? true : false, + } + }) } else { let finalState = state for (const call of action.calls) { diff --git a/packages/core/src/providers/chainState/common/performMulticall.ts b/packages/core/src/providers/chainState/common/performMulticall.ts index 0783c0acc..1ca21e546 100644 --- a/packages/core/src/providers/chainState/common/performMulticall.ts +++ b/packages/core/src/providers/chainState/common/performMulticall.ts @@ -20,6 +20,10 @@ export function performMulticall( chainId: ChainId, reportError: (error: Error) => void ) { + if (uniqueCalls.length === 0) { + return + } + const start = Date.now() multicallExecutor(provider, multicallAddress, blockNumber, uniqueCalls) .then((state) => { diff --git a/packages/core/src/providers/chainState/multiChainStates/provider.tsx b/packages/core/src/providers/chainState/multiChainStates/provider.tsx index c395fa169..5ab07afdf 100644 --- a/packages/core/src/providers/chainState/multiChainStates/provider.tsx +++ b/packages/core/src/providers/chainState/multiChainStates/provider.tsx @@ -81,9 +81,7 @@ export function MultiChainStateProvider({ children, multicallAddresses }: Props) } const callsOnThisChain = uniqueCalls.filter((call) => call.chainId === chainId) - if (callsOnThisChain.length === 0) { - return - } + performMulticall( provider, multicall, @@ -94,7 +92,7 @@ export function MultiChainStateProvider({ children, multicallAddresses }: Props) chainId, reportError ) - dispatchCalls({ type: 'UPDATE_CALLS', calls }) + dispatchCalls({ type: 'UPDATE_CALLS', calls, blockNumber, chainId }) } useEffect(() => { From 4afd9b504d662203bf091dae3e006e952a41c8af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Fri, 3 Jun 2022 15:10:29 +0200 Subject: [PATCH 27/59] =?UTF-8?q?=F0=9F=8E=97=20Remove=20chainId=20request?= =?UTF-8?q?s=20(#800)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove chainId requests * Create remove-chainId-requests.md Co-authored-by: mateusz --- .changeset/remove-chainId-requests.md | 5 +++++ .../core/src/providers/network/readonlyNetworks/provider.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/remove-chainId-requests.md diff --git a/.changeset/remove-chainId-requests.md b/.changeset/remove-chainId-requests.md new file mode 100644 index 000000000..1c5b5405a --- /dev/null +++ b/.changeset/remove-chainId-requests.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +πŸŽ— Remove chainId requests diff --git a/packages/core/src/providers/network/readonlyNetworks/provider.tsx b/packages/core/src/providers/network/readonlyNetworks/provider.tsx index 878e547a1..0a9abfb9d 100644 --- a/packages/core/src/providers/network/readonlyNetworks/provider.tsx +++ b/packages/core/src/providers/network/readonlyNetworks/provider.tsx @@ -1,5 +1,5 @@ import { ReactNode, useEffect, useState } from 'react' -import { JsonRpcProvider, Provider, BaseProvider } from '@ethersproject/providers' +import { Provider, BaseProvider, StaticJsonRpcProvider } from '@ethersproject/providers' import { useConfig } from '../../../hooks' import { Providers } from './model' import { ReadonlyNetworksContext } from './context' @@ -18,7 +18,7 @@ const getProviderFromConfig = (urlOrProviderOrProviderFunction: string | BasePro if (typeof urlOrProviderOrProviderFunction === 'function') { return urlOrProviderOrProviderFunction() } - return new JsonRpcProvider(urlOrProviderOrProviderFunction) + return new StaticJsonRpcProvider(urlOrProviderOrProviderFunction) } export const getProvidersFromConfig = (readOnlyUrls: NodeUrls) => From 3d815ab4f674ce1b63998bc783d7be4408331bff Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Fri, 3 Jun 2022 15:58:27 +0200 Subject: [PATCH 28/59] =?UTF-8?q?=F0=9F=91=AF=20Ethers=20as=20peer=20dep?= =?UTF-8?q?=20(#798)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/clean-drinks-visit.md | 7 + packages/coingecko/package.json | 5 +- packages/core/.mocharc.json | 2 +- packages/core/package.json | 17 +- packages/core/src/abi/multicall/constants.ts | 4 +- packages/core/src/abi/multicall2/constants.ts | 4 +- packages/core/src/constants/abi/index.ts | 4 +- packages/core/src/constants/type/Config.ts | 6 +- packages/core/src/helpers/address.ts | 2 +- packages/core/src/helpers/injectedProvider.ts | 4 +- packages/core/src/helpers/logs.test.ts | 4 +- packages/core/src/helpers/logs.ts | 6 +- packages/core/src/hooks/useBlockMeta.ts | 2 +- packages/core/src/hooks/useCall.test.tsx | 2 +- packages/core/src/hooks/useChainCall.test.tsx | 2 +- .../core/src/hooks/useContractCall.test.tsx | 2 +- packages/core/src/hooks/useContractCall.ts | 4 +- .../core/src/hooks/useContractFunction.ts | 5 +- packages/core/src/hooks/useEtherBalance.ts | 2 +- packages/core/src/hooks/useEthers.ts | 5 +- packages/core/src/hooks/useLogs.test.tsx | 8 +- .../core/src/hooks/usePromiseTransaction.ts | 2 +- packages/core/src/hooks/useRawCall.test.ts | 2 +- packages/core/src/hooks/useRawLogs.test.ts | 11 +- packages/core/src/hooks/useRawLogs.ts | 2 +- .../core/src/hooks/useReadonlyProvider.tsx | 4 +- packages/core/src/hooks/useSendTransaction.ts | 2 +- packages/core/src/hooks/useToken.test.tsx | 2 +- .../core/src/hooks/useTokenAllowance.test.tsx | 2 +- packages/core/src/hooks/useTokenAllowance.ts | 2 +- .../core/src/hooks/useTokenBalance.test.tsx | 2 +- packages/core/src/hooks/useTokenBalance.ts | 2 +- packages/core/src/model/Currency.test.ts | 4 +- packages/core/src/model/CurrencyValue.ts | 2 +- packages/core/src/model/TokenInfo.ts | 2 +- packages/core/src/model/TransactionStatus.ts | 2 +- .../blockNumber/common/subscribeToNewBlock.ts | 4 +- .../chainState/common/multicall.test.ts | 8 +- .../providers/chainState/common/multicall.ts | 10 +- .../chainState/common/multicall2.test.ts | 9 +- .../providers/chainState/common/multicall2.ts | 7 +- .../chainState/common/performMulticall.ts | 6 +- .../chainState/multiChainStates/provider.tsx | 4 +- .../src/providers/network/network/context.ts | 5 +- .../src/providers/network/network/model.ts | 4 +- .../providers/network/network/provider.tsx | 7 +- .../network/readonlyNetworks/model.ts | 4 +- .../network/readonlyNetworks/provider.tsx | 5 +- .../readonlyNetworksProvider.test.ts | 7 +- .../core/src/providers/notifications/model.ts | 2 +- .../notificationsReducer.test.ts | 2 +- .../core/src/providers/transactions/model.ts | 2 +- .../transactions/transactionsReducer.test.ts | 2 +- .../testing/mocks/contractCallOutOfGasMock.ts | 2 +- packages/core/src/testing/utils/mineBlock.ts | 4 +- .../core/src/testing/utils/sendEmptyTx.ts | 6 +- .../01-Getting Started/01-Installation.mdx | 4 +- .../02-Guides/07-Migration/1.0.7-to-1.0.8.mdx | 8 + packages/siwe/package.json | 3 +- pnpm-lock.yaml | 209 +++++++++++++----- 60 files changed, 296 insertions(+), 168 deletions(-) create mode 100644 .changeset/clean-drinks-visit.md create mode 100644 packages/docs/docs/02-Guides/07-Migration/1.0.7-to-1.0.8.mdx diff --git a/.changeset/clean-drinks-visit.md b/.changeset/clean-drinks-visit.md new file mode 100644 index 000000000..8c5a9bdc8 --- /dev/null +++ b/.changeset/clean-drinks-visit.md @@ -0,0 +1,7 @@ +--- +'@usedapp/coingecko': patch +'@usedapp/core': patch +'@usedapp/siwe': patch +--- + +Ethers as peer deps diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index d70231eb6..534236910 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -36,13 +36,12 @@ "react": "^17.0.1" }, "dependencies": { - "@ethersproject/contracts": "5.6.0", - "@ethersproject/providers": "5.6.2", "@usedapp/core": "workspace:*", "isomorphic-fetch": "^3.0.0" }, "peerDependencies": { - "react": "*" + "react": "*", + "ethers": "*" }, "scripts": { "build": "yarn run build:esm && yarn run build:cjs", diff --git a/packages/core/.mocharc.json b/packages/core/.mocharc.json index 1d0854ab5..79f1d2738 100644 --- a/packages/core/.mocharc.json +++ b/packages/core/.mocharc.json @@ -3,7 +3,7 @@ "require": "@swc-node/register", "watchExtensions": "ts", "extension": "ts", - "timeout": 3000, + "timeout": 5000, "file": "./src/testing/test-setup.ts", "exit": true } diff --git a/packages/core/package.json b/packages/core/package.json index 02395e486..ad8ab89a7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -10,23 +10,11 @@ "types": "dist/esm/src/index.d.ts", "files": [ "dist", - "internal.js", - "internal.d.ts", - "testing.js", - "testing.d.ts", "src" ], "dependencies": { - "@ethersproject/abi": "5.6.1", - "@ethersproject/abstract-provider": "5.6.0", - "@ethersproject/bignumber": "5.6.0", - "@ethersproject/constants": "5.6.0", - "@ethersproject/contracts": "5.6.0", - "@ethersproject/providers": "5.6.2", - "@ethersproject/wallet": "5.6.0", "@metamask/detect-provider": "^1.2.0", "@uniswap/token-lists": "^1.0.0-beta.27", - "ethers": "5.6.2", "fetch-mock": "^9.11.0", "lodash.merge": "^4.6.2", "lodash.pickby": "^4.6.0", @@ -34,10 +22,12 @@ "react-flat-providers": "^2.1.0" }, "peerDependencies": { - "react": "*" + "react": "*", + "ethers": "*" }, "devDependencies": { "@ethereum-waffle/provider": "4.0.0-alpha.0", + "@ethersproject/abstract-provider": "^5.6.1", "@swc-node/register": "^1.4.2", "@testing-library/react-hooks": "^5.0.3", "@types/chai": "^4.2.14", @@ -55,6 +45,7 @@ "eslint": "7.19.0", "eslint-plugin-react-hooks": "^4.3.0", "ethereum-waffle": "4.0.0-alpha.0", + "ethers": "^5.6.8", "jsdom": "^16.4.0", "jsdom-global": "^3.0.2", "mocha": "^8.2.1", diff --git a/packages/core/src/abi/multicall/constants.ts b/packages/core/src/abi/multicall/constants.ts index ffef48d02..dfab59030 100644 --- a/packages/core/src/abi/multicall/constants.ts +++ b/packages/core/src/abi/multicall/constants.ts @@ -1,4 +1,4 @@ -import { Interface } from '@ethersproject/abi' +import { utils } from 'ethers' import MultiCall from '../../constants/abi/MultiCall.json' -export const ethersAbi = new Interface(MultiCall.abi) +export const ethersAbi = new utils.Interface(MultiCall.abi) diff --git a/packages/core/src/abi/multicall2/constants.ts b/packages/core/src/abi/multicall2/constants.ts index f1c352376..777bce863 100644 --- a/packages/core/src/abi/multicall2/constants.ts +++ b/packages/core/src/abi/multicall2/constants.ts @@ -1,7 +1,7 @@ -import { Interface } from '@ethersproject/abi' +import { utils } from 'ethers' import MultiCall2 from '../../constants/abi/MultiCall2.json' -export const ethersAbi = new Interface(MultiCall2.abi) +export const ethersAbi = new utils.Interface(MultiCall2.abi) export const trueEncoded = '0'.repeat(63) + '1' export const falseEncoded = '0'.repeat(63) + '0' diff --git a/packages/core/src/constants/abi/index.ts b/packages/core/src/constants/abi/index.ts index 6b08c78d2..a4d3595b0 100644 --- a/packages/core/src/constants/abi/index.ts +++ b/packages/core/src/constants/abi/index.ts @@ -1,9 +1,11 @@ -import { Interface } from '@ethersproject/abi' +import { utils } from 'ethers' import MultiCall from './MultiCall.json' import MultiCall2 from './MultiCall2.json' import ERC20 from './ERC20.json' import ERC20Mock from './ERC20Mock.json' +const Interface = utils.Interface + const MultiCallABI = new Interface(MultiCall.abi) export { MultiCall, MultiCallABI } diff --git a/packages/core/src/constants/type/Config.ts b/packages/core/src/constants/type/Config.ts index 1d03eeefe..0ee874869 100644 --- a/packages/core/src/constants/type/Config.ts +++ b/packages/core/src/constants/type/Config.ts @@ -1,10 +1,10 @@ import { Chain } from '../../constants' -import { BaseProvider } from '@ethersproject/providers' +import { providers } from 'ethers' -export type BaseProviderFactory = () => BaseProvider +export type BaseProviderFactory = () => providers.BaseProvider export type NodeUrls = { - [chainId: number]: string | BaseProvider | BaseProviderFactory + [chainId: number]: string | providers.BaseProvider | BaseProviderFactory } export type MulticallAddresses = { diff --git a/packages/core/src/helpers/address.ts b/packages/core/src/helpers/address.ts index 1b3ae00ef..c96f06045 100644 --- a/packages/core/src/helpers/address.ts +++ b/packages/core/src/helpers/address.ts @@ -1,5 +1,5 @@ import { utils } from 'ethers' -import { BigNumber } from '@ethersproject/bignumber' +import { BigNumber } from 'ethers' import { Falsy } from '../model/types' import { shortenString } from './common' diff --git a/packages/core/src/helpers/injectedProvider.ts b/packages/core/src/helpers/injectedProvider.ts index 2bf87f817..b080fc96d 100644 --- a/packages/core/src/helpers/injectedProvider.ts +++ b/packages/core/src/helpers/injectedProvider.ts @@ -1,4 +1,4 @@ -import { Web3Provider } from '@ethersproject/providers' +import { providers } from 'ethers' import detectEthereumProvider from '@metamask/detect-provider' export async function getInjectedProvider(pollingInterval: number) { @@ -7,7 +7,7 @@ export async function getInjectedProvider(pollingInterval: number) { return undefined } - const provider = new Web3Provider(injectedProvider, 'any') + const provider = new providers.Web3Provider(injectedProvider, 'any') provider.pollingInterval = pollingInterval return provider } diff --git a/packages/core/src/helpers/logs.test.ts b/packages/core/src/helpers/logs.test.ts index ab0a69298..bf3c64593 100644 --- a/packages/core/src/helpers/logs.test.ts +++ b/packages/core/src/helpers/logs.test.ts @@ -1,5 +1,5 @@ import { Filter, FilterByBlockHash, Log } from '@ethersproject/abstract-provider' -import { AddressZero } from '@ethersproject/constants' +import { constants } from 'ethers' import { expect } from 'chai' import { MockProvider } from 'ethereum-waffle' import { BigNumber, Contract, ethers } from 'ethers' @@ -7,6 +7,8 @@ import { TypedFilter } from '../hooks' import { deployMockToken } from '../testing' import { decodeLogs, encodeFilterData, LogsResult } from './logs' +const AddressZero = constants.AddressZero + describe('encodeFilterData', () => { const mockProvider = new MockProvider() const [deployer] = mockProvider.getWallets() diff --git a/packages/core/src/helpers/logs.ts b/packages/core/src/helpers/logs.ts index f095a5b75..eb2a16f5a 100644 --- a/packages/core/src/helpers/logs.ts +++ b/packages/core/src/helpers/logs.ts @@ -1,5 +1,5 @@ -import { EventFragment } from '@ethersproject/abi' -import { BlockTag, Filter, FilterByBlockHash, Log } from '@ethersproject/abstract-provider' +import { utils } from 'ethers' +import type { BlockTag, Filter, FilterByBlockHash, Log } from '@ethersproject/abstract-provider' import { TypedFilter } from '../hooks/useLogs' import { Awaited, ContractEventNames, DetailedEventRecord, EventRecord, Falsy, TypedContract } from '../model/types' @@ -32,7 +32,7 @@ export function encodeFilterData( return undefined } try { - const encodedTopics = contract.interface.encodeFilterTopics((event as unknown) as EventFragment, args) + const encodedTopics = contract.interface.encodeFilterTopics((event as unknown) as utils.EventFragment, args) if (blockHash) { return { diff --git a/packages/core/src/hooks/useBlockMeta.ts b/packages/core/src/hooks/useBlockMeta.ts index a9c1f6e89..6b9cff84c 100644 --- a/packages/core/src/hooks/useBlockMeta.ts +++ b/packages/core/src/hooks/useBlockMeta.ts @@ -1,5 +1,5 @@ import { MultiCallABI } from '../constants' -import { BigNumber } from '@ethersproject/bignumber' +import { BigNumber } from 'ethers' import { useMulticallAddress } from './useMulticallAddress' import { QueryParams } from '../constants/type/QueryParams' import { useRawCall } from './useRawCalls' diff --git a/packages/core/src/hooks/useCall.test.tsx b/packages/core/src/hooks/useCall.test.tsx index 51ba9cca5..8548d6e87 100644 --- a/packages/core/src/hooks/useCall.test.tsx +++ b/packages/core/src/hooks/useCall.test.tsx @@ -1,5 +1,5 @@ import { MockProvider } from '@ethereum-waffle/provider' -import { Contract } from '@ethersproject/contracts' +import { Contract } from 'ethers' import { useCall } from '..' import { expect } from 'chai' import { diff --git a/packages/core/src/hooks/useChainCall.test.tsx b/packages/core/src/hooks/useChainCall.test.tsx index 16f1cde25..165d1b7b0 100644 --- a/packages/core/src/hooks/useChainCall.test.tsx +++ b/packages/core/src/hooks/useChainCall.test.tsx @@ -1,5 +1,5 @@ import { MockProvider } from '@ethereum-waffle/provider' -import { Contract } from '@ethersproject/contracts' +import { Contract } from 'ethers' import { expect } from 'chai' import { renderWeb3Hook, diff --git a/packages/core/src/hooks/useContractCall.test.tsx b/packages/core/src/hooks/useContractCall.test.tsx index 2172dfea3..84229a493 100644 --- a/packages/core/src/hooks/useContractCall.test.tsx +++ b/packages/core/src/hooks/useContractCall.test.tsx @@ -1,5 +1,5 @@ import { MockProvider } from '@ethereum-waffle/provider' -import { Contract } from '@ethersproject/contracts' +import { Contract } from 'ethers' import { expect } from 'chai' import { renderWeb3Hook, diff --git a/packages/core/src/hooks/useContractCall.ts b/packages/core/src/hooks/useContractCall.ts index d13bcb4ef..e08930dc6 100644 --- a/packages/core/src/hooks/useContractCall.ts +++ b/packages/core/src/hooks/useContractCall.ts @@ -1,4 +1,4 @@ -import { Interface } from '@ethersproject/abi' +import { utils } from 'ethers' import { useMemo } from 'react' import { ChainId } from '../constants' import { QueryParams } from '../constants/type/QueryParams' @@ -34,7 +34,7 @@ function encodeCallData(call: ContractCall | Falsy, chainId: ChainId): RawCall | * @deprecated Use {@link useCall} instead. */ export interface ContractCall { - abi: Interface + abi: utils.Interface address: string method: string args: any[] diff --git a/packages/core/src/hooks/useContractFunction.ts b/packages/core/src/hooks/useContractFunction.ts index 6de75312b..762066bc7 100644 --- a/packages/core/src/hooks/useContractFunction.ts +++ b/packages/core/src/hooks/useContractFunction.ts @@ -1,13 +1,14 @@ import { TransactionOptions } from '../model/TransactionOptions' import { useConfig } from './useConfig' -import { Contract } from '@ethersproject/contracts' -import { JsonRpcProvider } from '@ethersproject/providers' +import { Contract, providers } from 'ethers' import { useCallback, useState } from 'react' import { useEthers } from './useEthers' import { estimateGasLimit, usePromiseTransaction } from './usePromiseTransaction' import { LogDescription } from 'ethers/lib/utils' import { ContractFunctionNames, Falsy, Params, TypedContract } from '../model/types' +type JsonRpcProvider = providers.JsonRpcProvider + /** * @internal Intended for internal use - use it on your own risk */ diff --git a/packages/core/src/hooks/useEtherBalance.ts b/packages/core/src/hooks/useEtherBalance.ts index 065ab1d2f..3550c0c90 100644 --- a/packages/core/src/hooks/useEtherBalance.ts +++ b/packages/core/src/hooks/useEtherBalance.ts @@ -1,7 +1,7 @@ import { MultiCallABI } from '../constants' import { useMulticallAddress } from './useMulticallAddress' import { Falsy } from '../model/types' -import { BigNumber } from '@ethersproject/bignumber' +import { BigNumber } from 'ethers' import { QueryParams } from '../constants/type/QueryParams' import { useCall } from './useCall' import { Contract } from 'ethers' diff --git a/packages/core/src/hooks/useEthers.ts b/packages/core/src/hooks/useEthers.ts index 2cb639cce..8262b19c0 100644 --- a/packages/core/src/hooks/useEthers.ts +++ b/packages/core/src/hooks/useEthers.ts @@ -1,4 +1,4 @@ -import { ExternalProvider, JsonRpcProvider } from '@ethersproject/providers' +import { providers } from 'ethers' import { getAddress } from 'ethers/lib/utils' import { getAddNetworkParams } from '../helpers/getAddNetworkParams' import { validateArguments } from '../helpers/validateArgument' @@ -6,6 +6,9 @@ import { useNetwork } from '../providers' import { useConfig } from '../hooks' import { useReadonlyNetwork } from './useReadonlyProvider' +type JsonRpcProvider = providers.JsonRpcProvider +type ExternalProvider = providers.ExternalProvider + type MaybePromise = Promise | any type SupportedProviders = diff --git a/packages/core/src/hooks/useLogs.test.tsx b/packages/core/src/hooks/useLogs.test.tsx index 743662aa2..0efa741b1 100644 --- a/packages/core/src/hooks/useLogs.test.tsx +++ b/packages/core/src/hooks/useLogs.test.tsx @@ -1,7 +1,7 @@ import { MockProvider } from '@ethereum-waffle/provider' -import { TransactionRequest } from '@ethersproject/abstract-provider' -import { AddressZero } from '@ethersproject/constants' -import { Contract } from '@ethersproject/contracts' +import type { TransactionRequest } from '@ethersproject/abstract-provider' +import { constants } from 'ethers' +import { Contract } from 'ethers' import { expect } from 'chai' import { BigNumber, ethers } from 'ethers' import { getAddress } from 'ethers/lib/utils' @@ -16,6 +16,8 @@ import { import { useLogs } from './useLogs' import { useSendTransaction } from './useSendTransaction' +const AddressZero = constants.AddressZero + describe('useLogs', () => { const mockProvider = new MockProvider() const secondMockProvider = new MockProvider({ ganacheOptions: { _chainIdRpc: SECOND_TEST_CHAIN_ID } as any }) diff --git a/packages/core/src/hooks/usePromiseTransaction.ts b/packages/core/src/hooks/usePromiseTransaction.ts index 94fe7c1e0..028f2819c 100644 --- a/packages/core/src/hooks/usePromiseTransaction.ts +++ b/packages/core/src/hooks/usePromiseTransaction.ts @@ -1,4 +1,4 @@ -import { TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider' +import type { TransactionRequest, TransactionResponse } from '@ethersproject/abstract-provider' import { useCallback, useState } from 'react' import { useNotificationsContext, useTransactionsContext } from '../providers' import { TransactionStatus, TransactionOptions, TransactionState } from '../model' diff --git a/packages/core/src/hooks/useRawCall.test.ts b/packages/core/src/hooks/useRawCall.test.ts index 1ceed38e1..91dc32ab7 100644 --- a/packages/core/src/hooks/useRawCall.test.ts +++ b/packages/core/src/hooks/useRawCall.test.ts @@ -1,5 +1,5 @@ import { MockProvider } from '@ethereum-waffle/provider' -import { Contract } from '@ethersproject/contracts' +import { Contract } from 'ethers' import { expect } from 'chai' import { utils } from 'ethers' import { RawCall } from '..' diff --git a/packages/core/src/hooks/useRawLogs.test.ts b/packages/core/src/hooks/useRawLogs.test.ts index f4be18e5c..af78255eb 100644 --- a/packages/core/src/hooks/useRawLogs.test.ts +++ b/packages/core/src/hooks/useRawLogs.test.ts @@ -1,11 +1,7 @@ import { MockProvider } from '@ethereum-waffle/provider' -import { defaultAbiCoder } from '@ethersproject/abi' -import { Filter, TransactionRequest } from '@ethersproject/abstract-provider' -import { AddressZero } from '@ethersproject/constants' -import { Contract } from '@ethersproject/contracts' +import type { Filter, TransactionRequest } from '@ethersproject/abstract-provider' +import { Contract, constants, BigNumber, ethers, utils } from 'ethers' import { expect } from 'chai' -import { BigNumber, ethers } from 'ethers' -import { getAddress, hexStripZeros } from 'ethers/lib/utils' import { ERC20MockInterface } from '../constants' import { deployMockToken, @@ -17,6 +13,9 @@ import { import { useRawLogs } from './useRawLogs' import { useSendTransaction } from './useSendTransaction' +const AddressZero = constants.AddressZero +const { defaultAbiCoder, getAddress, hexStripZeros } = utils + describe('useRawLogs', () => { const mockProvider = new MockProvider() const secondMockProvider = new MockProvider({ ganacheOptions: { _chainIdRpc: SECOND_TEST_CHAIN_ID } as any }) diff --git a/packages/core/src/hooks/useRawLogs.ts b/packages/core/src/hooks/useRawLogs.ts index 9219a92bc..3996bdebf 100644 --- a/packages/core/src/hooks/useRawLogs.ts +++ b/packages/core/src/hooks/useRawLogs.ts @@ -3,7 +3,7 @@ import { useEthers } from './useEthers' import { useReadonlyNetworks } from '../providers/network/readonlyNetworks' import { useBlockNumbers, useBlockNumber } from '../hooks' import { QueryParams } from '../constants/type/QueryParams' -import { Filter, FilterByBlockHash, Log } from '@ethersproject/abstract-provider' +import type { Filter, FilterByBlockHash, Log } from '@ethersproject/abstract-provider' import { Falsy } from '../model/types' /** diff --git a/packages/core/src/hooks/useReadonlyProvider.tsx b/packages/core/src/hooks/useReadonlyProvider.tsx index 375fdb88b..94c61c76f 100644 --- a/packages/core/src/hooks/useReadonlyProvider.tsx +++ b/packages/core/src/hooks/useReadonlyProvider.tsx @@ -1,14 +1,14 @@ import { ChainId } from '../constants' import { useReadonlyNetworks } from '../providers/network' import { useChainId } from './useChainId' -import type { BaseProvider } from '@ethersproject/providers' +import type { providers } from 'ethers' export interface UseReadonlyProviderOptions { chainId?: number } export interface ReadonlyNetwork { - provider: BaseProvider + provider: providers.BaseProvider chainId: number } diff --git a/packages/core/src/hooks/useSendTransaction.ts b/packages/core/src/hooks/useSendTransaction.ts index 475fb1c26..7ad9f4e45 100644 --- a/packages/core/src/hooks/useSendTransaction.ts +++ b/packages/core/src/hooks/useSendTransaction.ts @@ -1,4 +1,4 @@ -import { TransactionRequest } from '@ethersproject/abstract-provider' +import type { TransactionRequest } from '@ethersproject/abstract-provider' import { TransactionOptions } from '../model/TransactionOptions' import { useConfig } from './useConfig' import { useEthers } from './useEthers' diff --git a/packages/core/src/hooks/useToken.test.tsx b/packages/core/src/hooks/useToken.test.tsx index 5e7ebadc4..d8ec4982b 100644 --- a/packages/core/src/hooks/useToken.test.tsx +++ b/packages/core/src/hooks/useToken.test.tsx @@ -1,5 +1,5 @@ import { MockProvider } from '@ethereum-waffle/provider' -import { Contract } from '@ethersproject/contracts' +import { Contract } from 'ethers' import { useToken } from '..' import { expect } from 'chai' import { renderWeb3Hook, deployMockToken, MOCK_TOKEN_INITIAL_BALANCE } from '../testing' diff --git a/packages/core/src/hooks/useTokenAllowance.test.tsx b/packages/core/src/hooks/useTokenAllowance.test.tsx index fb837b0eb..84d6665ce 100644 --- a/packages/core/src/hooks/useTokenAllowance.test.tsx +++ b/packages/core/src/hooks/useTokenAllowance.test.tsx @@ -1,5 +1,5 @@ import { MockProvider } from '@ethereum-waffle/provider' -import { Contract } from '@ethersproject/contracts' +import { Contract } from 'ethers' import { expect } from 'chai' import { renderWeb3Hook, diff --git a/packages/core/src/hooks/useTokenAllowance.ts b/packages/core/src/hooks/useTokenAllowance.ts index e0a56bbc2..6c0ecd0f0 100644 --- a/packages/core/src/hooks/useTokenAllowance.ts +++ b/packages/core/src/hooks/useTokenAllowance.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@ethersproject/bignumber' +import { BigNumber } from 'ethers' import { Contract } from 'ethers' import { ERC20Interface } from '../constants' import { QueryParams } from '../constants/type/QueryParams' diff --git a/packages/core/src/hooks/useTokenBalance.test.tsx b/packages/core/src/hooks/useTokenBalance.test.tsx index 86831cf69..97774d56b 100644 --- a/packages/core/src/hooks/useTokenBalance.test.tsx +++ b/packages/core/src/hooks/useTokenBalance.test.tsx @@ -1,4 +1,4 @@ -import { Contract } from '@ethersproject/contracts' +import { Contract } from 'ethers' import { expect } from 'chai' import { Wallet } from 'ethers' import { Config } from '../constants' diff --git a/packages/core/src/hooks/useTokenBalance.ts b/packages/core/src/hooks/useTokenBalance.ts index d4ea165af..c04afeb41 100644 --- a/packages/core/src/hooks/useTokenBalance.ts +++ b/packages/core/src/hooks/useTokenBalance.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@ethersproject/bignumber' +import { BigNumber } from 'ethers' import { Contract } from 'ethers' import { ERC20Interface } from '../constants' import { QueryParams } from '../constants/type/QueryParams' diff --git a/packages/core/src/model/Currency.test.ts b/packages/core/src/model/Currency.test.ts index d992b5a3b..abc2902b3 100644 --- a/packages/core/src/model/Currency.test.ts +++ b/packages/core/src/model/Currency.test.ts @@ -1,7 +1,9 @@ import { expect } from 'chai' -import { AddressZero } from '@ethersproject/constants' +import { constants } from 'ethers' import { Mainnet, Currency, FiatCurrency, NativeCurrency, Token } from '..' +const AddressZero = constants.AddressZero + describe('Currency', () => { it('can be constructed', () => { const zuckBucks = new Currency('Zuck Bucks', 'ZB', 2, { diff --git a/packages/core/src/model/CurrencyValue.ts b/packages/core/src/model/CurrencyValue.ts index 95ce1f653..24d35a6f3 100644 --- a/packages/core/src/model/CurrencyValue.ts +++ b/packages/core/src/model/CurrencyValue.ts @@ -1,4 +1,4 @@ -import { BigNumber, BigNumberish } from '@ethersproject/bignumber' +import { BigNumber, BigNumberish } from 'ethers' import { Currency } from './Currency' import { CurrencyFormatOptions } from './formatting' diff --git a/packages/core/src/model/TokenInfo.ts b/packages/core/src/model/TokenInfo.ts index ccf791de7..e4f1baba8 100644 --- a/packages/core/src/model/TokenInfo.ts +++ b/packages/core/src/model/TokenInfo.ts @@ -1,4 +1,4 @@ -import { BigNumberish } from '@ethersproject/bignumber' +import { BigNumberish } from 'ethers' export interface TokenInfo { name: string diff --git a/packages/core/src/model/TransactionStatus.ts b/packages/core/src/model/TransactionStatus.ts index 89855a03c..13aa63341 100644 --- a/packages/core/src/model/TransactionStatus.ts +++ b/packages/core/src/model/TransactionStatus.ts @@ -1,4 +1,4 @@ -import { TransactionResponse, TransactionReceipt } from '@ethersproject/abstract-provider' +import type { TransactionResponse, TransactionReceipt } from '@ethersproject/abstract-provider' /** * @public diff --git a/packages/core/src/providers/blockNumber/common/subscribeToNewBlock.ts b/packages/core/src/providers/blockNumber/common/subscribeToNewBlock.ts index ac189d9e2..b4728d085 100644 --- a/packages/core/src/providers/blockNumber/common/subscribeToNewBlock.ts +++ b/packages/core/src/providers/blockNumber/common/subscribeToNewBlock.ts @@ -1,10 +1,10 @@ -import { BaseProvider } from '@ethersproject/providers' +import { providers } from 'ethers' import { ChainId } from '../../../constants' import { Dispatch } from 'react' import { BlockNumberChanged } from './reducer' export function subscribeToNewBlock( - provider: BaseProvider | undefined, + provider: providers.BaseProvider | undefined, chainId: ChainId | undefined, dispatch: Dispatch, isActive: boolean diff --git a/packages/core/src/providers/chainState/common/multicall.test.ts b/packages/core/src/providers/chainState/common/multicall.test.ts index 72367dcb1..1eb38bcf6 100644 --- a/packages/core/src/providers/chainState/common/multicall.test.ts +++ b/packages/core/src/providers/chainState/common/multicall.test.ts @@ -1,17 +1,19 @@ import { MockProvider } from '@ethereum-waffle/provider' -import { Interface } from '@ethersproject/abi' -import { Contract } from '@ethersproject/contracts' +import { utils } from 'ethers' +import { Contract } from 'ethers' import chai, { expect } from 'chai' import { deployContract, solidity } from 'ethereum-waffle' import chaiAsPromised from 'chai-as-promised' import { RawCall, ERC20Mock, MultiCall } from '../../..' -import { BigNumber } from '@ethersproject/bignumber' +import { BigNumber } from 'ethers' import { sendEmptyTx } from '../../../testing/utils/sendEmptyTx' import { multicall1Factory } from './multicall' chai.use(solidity) chai.use(chaiAsPromised) +const Interface = utils.Interface + describe('Multicall', () => { const mockProvider = new MockProvider() const [deployer] = mockProvider.getWallets() diff --git a/packages/core/src/providers/chainState/common/multicall.ts b/packages/core/src/providers/chainState/common/multicall.ts index 4b40cac0a..02ee6825e 100644 --- a/packages/core/src/providers/chainState/common/multicall.ts +++ b/packages/core/src/providers/chainState/common/multicall.ts @@ -1,6 +1,6 @@ -import { BigNumber } from '@ethersproject/bignumber' -import { Contract } from '@ethersproject/contracts' -import { Provider } from '@ethersproject/providers' +import { BigNumber } from 'ethers' +import { Contract } from 'ethers' +import type { providers } from 'ethers' import { encodeAggregate, decodeAggregate } from '../../../abi/multicall' import { RawCall } from './callsReducer' import { ChainState } from './model' @@ -18,7 +18,7 @@ export const multicall1Factory = (fastEncoding: boolean) => (fastEncoding ? fast * @public */ export async function multicall( - provider: Provider, + provider: providers.Provider, address: string, blockNumber: number, requests: RawCall[] @@ -38,7 +38,7 @@ export async function multicall( * @public */ export async function fastEncodingMulticall( - provider: Provider, + provider: providers.Provider, address: string, blockNumber: number, requests: RawCall[] diff --git a/packages/core/src/providers/chainState/common/multicall2.test.ts b/packages/core/src/providers/chainState/common/multicall2.test.ts index 0f3464e01..05e828c4c 100644 --- a/packages/core/src/providers/chainState/common/multicall2.test.ts +++ b/packages/core/src/providers/chainState/common/multicall2.test.ts @@ -1,11 +1,10 @@ import { MockProvider } from '@ethereum-waffle/provider' -import { Interface } from '@ethersproject/abi' -import { Contract } from '@ethersproject/contracts' +import { utils } from 'ethers' +import { Contract } from 'ethers' import chai, { expect } from 'chai' import { deployContract, solidity } from 'ethereum-waffle' import chaiAsPromised from 'chai-as-promised' -import { BigNumber } from '@ethersproject/bignumber' -import { utils } from 'ethers' +import { BigNumber } from 'ethers' import { ERC20Mock, MultiCall2 } from '../../../constants' import { RawCall } from './callsReducer' import { multicall2Factory } from './multicall2' @@ -14,6 +13,8 @@ import { sendEmptyTx } from '../../../testing/utils/sendEmptyTx' chai.use(solidity) chai.use(chaiAsPromised) +const Interface = utils.Interface + describe('Multicall2', () => { const mockProvider = new MockProvider() const [deployer] = mockProvider.getWallets() diff --git a/packages/core/src/providers/chainState/common/multicall2.ts b/packages/core/src/providers/chainState/common/multicall2.ts index ac6a93b61..e0b6c38e0 100644 --- a/packages/core/src/providers/chainState/common/multicall2.ts +++ b/packages/core/src/providers/chainState/common/multicall2.ts @@ -1,5 +1,4 @@ -import { Contract } from '@ethersproject/contracts' -import { Provider } from '@ethersproject/providers' +import { Contract, providers } from 'ethers' import { decodeTryAggregate, encodeTryAggregate } from '../../../abi/multicall2' import { RawCall } from './callsReducer' import { ChainState } from './model' @@ -17,7 +16,7 @@ export const multicall2Factory = (fastEncoding: boolean) => (fastEncoding ? fast * @public */ export async function multicall2( - provider: Provider, + provider: providers.Provider, address: string, blockNumber: number, requests: RawCall[] @@ -38,7 +37,7 @@ export async function multicall2( * @public */ export async function fastEncodingMulticall2( - provider: Provider, + provider: providers.Provider, address: string, blockNumber: number, requests: RawCall[] diff --git a/packages/core/src/providers/chainState/common/performMulticall.ts b/packages/core/src/providers/chainState/common/performMulticall.ts index 1ca21e546..477806895 100644 --- a/packages/core/src/providers/chainState/common/performMulticall.ts +++ b/packages/core/src/providers/chainState/common/performMulticall.ts @@ -1,4 +1,4 @@ -import { BaseProvider } from '@ethersproject/providers' +import { providers } from 'ethers' import { RawCall } from './callsReducer' import { Dispatch } from 'react' import { ChainStateAction } from './chainStateReducer' @@ -6,9 +6,9 @@ import { ChainId } from '../../../constants' import { notifyDevtools } from '../../devtools' export function performMulticall( - provider: BaseProvider, + provider: providers.BaseProvider, multicallExecutor: ( - provider: BaseProvider, + provider: providers.BaseProvider, multicallAddress: string, blockNumber: number, uniqueCalls: RawCall[] diff --git a/packages/core/src/providers/chainState/multiChainStates/provider.tsx b/packages/core/src/providers/chainState/multiChainStates/provider.tsx index 5ab07afdf..07a278d86 100644 --- a/packages/core/src/providers/chainState/multiChainStates/provider.tsx +++ b/packages/core/src/providers/chainState/multiChainStates/provider.tsx @@ -6,7 +6,7 @@ import { useReadonlyNetworks } from '../../network' import { fromEntries } from '../../../helpers/fromEntries' import { performMulticall } from '../common/performMulticall' import { Providers } from '../../network/readonlyNetworks/model' -import { BaseProvider } from '@ethersproject/providers' +import { providers } from 'ethers' import { callsReducer, chainStateReducer, multicall1Factory, multicall2Factory } from '../common' import { getUniqueActiveCalls } from '../../../helpers' import { useDevtoolsReporting } from '../common/useDevtoolsReporting' @@ -61,7 +61,7 @@ export function MultiChainStateProvider({ children, multicallAddresses }: Props) multicallAddresses ) - function multicallForChain(chainId: ChainId, provider?: BaseProvider) { + function multicallForChain(chainId: ChainId, provider?: providers.BaseProvider) { if (!isActive) { return } diff --git a/packages/core/src/providers/network/network/context.ts b/packages/core/src/providers/network/network/context.ts index cc4f46123..bd3b1a180 100644 --- a/packages/core/src/providers/network/network/context.ts +++ b/packages/core/src/providers/network/network/context.ts @@ -1,7 +1,10 @@ import { createContext, useContext } from 'react' import { ChainId } from '../../../constants' import { Network } from './model' -import { ExternalProvider, JsonRpcProvider } from '@ethersproject/providers' +import type { providers } from 'ethers' + +type JsonRpcProvider = providers.JsonRpcProvider +type ExternalProvider = providers.ExternalProvider export const NetworkContext = createContext<{ update: (network: Partial) => void diff --git a/packages/core/src/providers/network/network/model.ts b/packages/core/src/providers/network/network/model.ts index aa1144559..7e56a5a94 100644 --- a/packages/core/src/providers/network/network/model.ts +++ b/packages/core/src/providers/network/network/model.ts @@ -1,10 +1,10 @@ -import { JsonRpcProvider } from '@ethersproject/providers' +import type { providers } from 'ethers' /** * @public */ export interface Network { - provider?: JsonRpcProvider + provider?: providers.JsonRpcProvider chainId?: number accounts: string[] errors: Error[] diff --git a/packages/core/src/providers/network/network/provider.tsx b/packages/core/src/providers/network/network/provider.tsx index 9bb0f22e9..6a93a03ef 100644 --- a/packages/core/src/providers/network/network/provider.tsx +++ b/packages/core/src/providers/network/network/provider.tsx @@ -2,11 +2,16 @@ import { ReactNode, useCallback, useEffect, useReducer, useState } from 'react' import { NetworkContext } from './context' import { defaultNetworkState, networksReducer } from './reducer' import { Network } from './model' -import { JsonRpcProvider, Web3Provider, ExternalProvider, Provider } from '@ethersproject/providers' +import { providers } from 'ethers' import { subscribeToProviderEvents, getInjectedProvider } from '../../../helpers' import { useLocalStorage, useConfig } from '../../../hooks' import detectEthereumProvider from '@metamask/detect-provider' +type JsonRpcProvider = providers.JsonRpcProvider +type ExternalProvider = providers.ExternalProvider +const Provider = providers.Provider +const Web3Provider = providers.Web3Provider + interface NetworkProviderProps { children: ReactNode providerOverride?: JsonRpcProvider diff --git a/packages/core/src/providers/network/readonlyNetworks/model.ts b/packages/core/src/providers/network/readonlyNetworks/model.ts index 9a592a944..ea6e03376 100644 --- a/packages/core/src/providers/network/readonlyNetworks/model.ts +++ b/packages/core/src/providers/network/readonlyNetworks/model.ts @@ -1,6 +1,6 @@ import { ChainId } from '../../../constants' -import { BaseProvider } from '@ethersproject/providers' +import type { providers } from 'ethers' export type Providers = { - [chainId in ChainId]?: BaseProvider + [chainId in ChainId]?: providers.BaseProvider } diff --git a/packages/core/src/providers/network/readonlyNetworks/provider.tsx b/packages/core/src/providers/network/readonlyNetworks/provider.tsx index 0a9abfb9d..2283b0740 100644 --- a/packages/core/src/providers/network/readonlyNetworks/provider.tsx +++ b/packages/core/src/providers/network/readonlyNetworks/provider.tsx @@ -1,11 +1,14 @@ import { ReactNode, useEffect, useState } from 'react' -import { Provider, BaseProvider, StaticJsonRpcProvider } from '@ethersproject/providers' +import { providers } from 'ethers' import { useConfig } from '../../../hooks' import { Providers } from './model' import { ReadonlyNetworksContext } from './context' import { BaseProviderFactory, NodeUrls } from '../../../constants' import { fromEntries } from '../../../helpers/fromEntries' +const { Provider, StaticJsonRpcProvider } = providers +type BaseProvider = providers.BaseProvider + interface NetworkProviderProps { providerOverrides?: Providers children?: ReactNode diff --git a/packages/core/src/providers/network/readonlyNetworks/readonlyNetworksProvider.test.ts b/packages/core/src/providers/network/readonlyNetworks/readonlyNetworksProvider.test.ts index 1367aa953..1beb10e74 100644 --- a/packages/core/src/providers/network/readonlyNetworks/readonlyNetworksProvider.test.ts +++ b/packages/core/src/providers/network/readonlyNetworks/readonlyNetworksProvider.test.ts @@ -1,9 +1,10 @@ import { expect } from 'chai' +import { providers } from 'ethers' import { getProvidersFromConfig } from './provider' -import { Kovan, Mainnet, Rinkeby } from '../../..' -import { JsonRpcProvider } from '@ethersproject/providers' +import { Kovan, Mainnet, Rinkeby, Localhost } from '../../../model/chain' import { MockProvider } from 'ethereum-waffle' -import { Localhost } from '../../../model/chain/local' + +const JsonRpcProvider = providers.JsonRpcProvider describe('ReadonlyNetworksProvider', () => { it('getProvidersFromConfig creates provider for each network that has URL', async () => { diff --git a/packages/core/src/providers/notifications/model.ts b/packages/core/src/providers/notifications/model.ts index 3162472b7..a737f57c7 100644 --- a/packages/core/src/providers/notifications/model.ts +++ b/packages/core/src/providers/notifications/model.ts @@ -1,4 +1,4 @@ -import { TransactionReceipt, TransactionResponse } from '@ethersproject/abstract-provider' +import type { TransactionReceipt, TransactionResponse } from '@ethersproject/abstract-provider' type NotificationPayload = { submittedAt: number } & ( | { type: 'transactionStarted'; transaction: TransactionResponse; transactionName?: string } diff --git a/packages/core/src/providers/notifications/notificationsReducer.test.ts b/packages/core/src/providers/notifications/notificationsReducer.test.ts index d1757a52a..8d3d355d4 100644 --- a/packages/core/src/providers/notifications/notificationsReducer.test.ts +++ b/packages/core/src/providers/notifications/notificationsReducer.test.ts @@ -1,4 +1,4 @@ -import { TransactionResponse } from '@ethersproject/abstract-provider' +import type { TransactionResponse } from '@ethersproject/abstract-provider' import { expect } from 'chai' import { Notification } from './model' import { notificationReducer } from './reducer' diff --git a/packages/core/src/providers/transactions/model.ts b/packages/core/src/providers/transactions/model.ts index a5ca00d94..006325a37 100644 --- a/packages/core/src/providers/transactions/model.ts +++ b/packages/core/src/providers/transactions/model.ts @@ -1,4 +1,4 @@ -import { TransactionReceipt, TransactionResponse } from '@ethersproject/providers' +import type { TransactionReceipt, TransactionResponse } from '@ethersproject/abstract-provider' /** * @public diff --git a/packages/core/src/providers/transactions/transactionsReducer.test.ts b/packages/core/src/providers/transactions/transactionsReducer.test.ts index 0815a93c0..95cfb45b8 100644 --- a/packages/core/src/providers/transactions/transactionsReducer.test.ts +++ b/packages/core/src/providers/transactions/transactionsReducer.test.ts @@ -1,4 +1,4 @@ -import { TransactionResponse } from '@ethersproject/abstract-provider' +import type { TransactionResponse } from '@ethersproject/abstract-provider' import { expect } from 'chai' import { StoredTransaction } from '../..' import { transactionReducer } from './reducer' diff --git a/packages/core/src/testing/mocks/contractCallOutOfGasMock.ts b/packages/core/src/testing/mocks/contractCallOutOfGasMock.ts index 235de3f51..8582f839a 100644 --- a/packages/core/src/testing/mocks/contractCallOutOfGasMock.ts +++ b/packages/core/src/testing/mocks/contractCallOutOfGasMock.ts @@ -1,4 +1,4 @@ -import { TransactionReceipt, TransactionResponse } from '@ethersproject/providers' +import type { TransactionReceipt, TransactionResponse } from '@ethersproject/abstract-provider' import { Contract } from 'ethers' const transferOutOfGasMock = (): TransactionResponse => { diff --git a/packages/core/src/testing/utils/mineBlock.ts b/packages/core/src/testing/utils/mineBlock.ts index af407439c..a62ea6952 100644 --- a/packages/core/src/testing/utils/mineBlock.ts +++ b/packages/core/src/testing/utils/mineBlock.ts @@ -1,9 +1,9 @@ import { MockProvider } from '@ethereum-waffle/provider' -import { AddressZero } from '@ethersproject/constants' +import { constants } from 'ethers' import { getAdminWallet } from './getAdminWallet' export const mineBlock = async (provider: MockProvider) => { const wallet = await getAdminWallet(provider) - const tx = await wallet.sendTransaction({ to: AddressZero, value: 0 }) + const tx = await wallet.sendTransaction({ to: constants.AddressZero, value: 0 }) await tx.wait() } diff --git a/packages/core/src/testing/utils/sendEmptyTx.ts b/packages/core/src/testing/utils/sendEmptyTx.ts index c29345fdb..f60f121e3 100644 --- a/packages/core/src/testing/utils/sendEmptyTx.ts +++ b/packages/core/src/testing/utils/sendEmptyTx.ts @@ -1,6 +1,6 @@ -import { Wallet } from '@ethersproject/wallet' -import { AddressZero } from '@ethersproject/constants' +import { Wallet } from 'ethers' +import { constants } from 'ethers' export async function sendEmptyTx(wallet: Wallet) { - return wallet.sendTransaction({ to: AddressZero }) + return wallet.sendTransaction({ to: constants.AddressZero }) } diff --git a/packages/docs/docs/01-Getting Started/01-Installation.mdx b/packages/docs/docs/01-Getting Started/01-Installation.mdx index 573bc3f3f..a7f7418a3 100644 --- a/packages/docs/docs/01-Getting Started/01-Installation.mdx +++ b/packages/docs/docs/01-Getting Started/01-Installation.mdx @@ -6,10 +6,10 @@ slug: / To start working with useDapp you need to have a working React environment. -To get started, add the following npm package `@usedapp/core` to your project: +To get started, add the following npm package `@usedapp/core` and its peer dependency in your project: ```bash npm2yarn -npm install @usedapp/core +npm install @usedapp/core ethers ``` ## Example diff --git a/packages/docs/docs/02-Guides/07-Migration/1.0.7-to-1.0.8.mdx b/packages/docs/docs/02-Guides/07-Migration/1.0.7-to-1.0.8.mdx new file mode 100644 index 000000000..7bb47c0c8 --- /dev/null +++ b/packages/docs/docs/02-Guides/07-Migration/1.0.7-to-1.0.8.mdx @@ -0,0 +1,8 @@ +# Migrating to 1.0.8 + +## Moved ethers to peer dependencies + +`ethers` is now a peer dependency of `@usedapp/core`, `@usedapp/coingecko` and `@usedapp/siwe`. The packages will use version of the `ethers` package that is installed in your project. If you haven't installed `ethers` yet, you can install it with: +```bash npm2yarn +npm install ethers +``` diff --git a/packages/siwe/package.json b/packages/siwe/package.json index d31fc9084..835631392 100644 --- a/packages/siwe/package.json +++ b/packages/siwe/package.json @@ -20,7 +20,8 @@ ], "peerDependencies": { "@usedapp/core": "*", - "react": "*" + "react": "*", + "ethers": "*" }, "dependencies": { "siwe": "^1.1.6" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da29eae2d..d3d12b23e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,8 +22,6 @@ importers: packages/coingecko: specifiers: - '@ethersproject/contracts': 5.6.0 - '@ethersproject/providers': 5.6.2 '@swc-node/register': ^1.4.2 '@testing-library/react-hooks': ^5.0.3 '@types/chai': ^4.2.14 @@ -45,8 +43,6 @@ importers: react: ^17.0.1 typescript: ^4.6.2 dependencies: - '@ethersproject/contracts': 5.6.0 - '@ethersproject/providers': 5.6.2 '@usedapp/core': link:../core isomorphic-fetch: 3.0.0 devDependencies: @@ -72,13 +68,7 @@ importers: packages/core: specifiers: '@ethereum-waffle/provider': 4.0.0-alpha.0 - '@ethersproject/abi': 5.6.1 - '@ethersproject/abstract-provider': 5.6.0 - '@ethersproject/bignumber': 5.6.0 - '@ethersproject/constants': 5.6.0 - '@ethersproject/contracts': 5.6.0 - '@ethersproject/providers': 5.6.2 - '@ethersproject/wallet': 5.6.0 + '@ethersproject/abstract-provider': ^5.6.1 '@metamask/detect-provider': ^1.2.0 '@swc-node/register': ^1.4.2 '@testing-library/react-hooks': ^5.0.3 @@ -114,16 +104,8 @@ importers: typechain: ^7.0.0 typescript: ^4.6.2 dependencies: - '@ethersproject/abi': 5.6.1 - '@ethersproject/abstract-provider': 5.6.0 - '@ethersproject/bignumber': 5.6.0 - '@ethersproject/constants': 5.6.0 - '@ethersproject/contracts': 5.6.0 - '@ethersproject/providers': 5.6.2 - '@ethersproject/wallet': 5.6.0 '@metamask/detect-provider': 1.2.0 '@uniswap/token-lists': 1.0.0-beta.27 - ethers: 5.6.2 fetch-mock: 9.11.0 lodash.merge: 4.6.2 lodash.pickby: 4.6.0 @@ -131,6 +113,7 @@ importers: react-flat-providers: 2.1.0_react@17.0.2 devDependencies: '@ethereum-waffle/provider': 4.0.0-alpha.0 + '@ethersproject/abstract-provider': 5.6.1 '@swc-node/register': 1.4.2 '@testing-library/react-hooks': 5.1.3_react@17.0.2 '@types/chai': 4.3.0 @@ -147,7 +130,8 @@ importers: chai-as-promised: 7.1.1_chai@4.3.6 eslint: 7.19.0 eslint-plugin-react-hooks: 4.3.0_eslint@7.19.0 - ethereum-waffle: 4.0.0-alpha.0_0b0f918ed7711740df0dccc361ac0497 + ethereum-waffle: 4.0.0-alpha.0_solc@0.8.12+typescript@4.6.2 + ethers: 5.6.2 jsdom: 16.7.0 jsdom-global: 3.0.2_jsdom@16.7.0 mocha: 8.4.0 @@ -3162,7 +3146,7 @@ packages: - typescript dev: false - /@ethereum-waffle/compiler/4.0.0-alpha.0_efb9faae6de36dfed0f85db0b5aa6048: + /@ethereum-waffle/compiler/4.0.0-alpha.0_5d9f16c28e51f28c6b558e793d1166d1: resolution: {integrity: sha512-FGnU3eWVODjKncEXJHbaqfnP4GLKEpqlvQ7W3yRE4ovmSWCRjNAjTeeKwFW7zZlDwG8WIRFVvSWlySKeuWc8MQ==} engines: {node: '>=10.0'} peerDependencies: @@ -3172,7 +3156,7 @@ packages: dependencies: '@resolver-engine/imports': 0.3.3 '@resolver-engine/imports-fs': 0.3.3 - '@typechain/ethers-v5': 9.0.0_8d7fa4ccdda916073c1de28cb1536173 + '@typechain/ethers-v5': 9.0.0_65ac1934a17b69618ed69019e39a382e '@types/mkdirp': 0.5.2 '@types/node-fetch': 2.6.1 ethers: 5.6.2 @@ -3225,15 +3209,15 @@ packages: /@ethersproject/abi/5.0.0-beta.153: resolution: {integrity: sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg==} dependencies: - '@ethersproject/address': 5.6.0 - '@ethersproject/bignumber': 5.6.0 + '@ethersproject/address': 5.6.1 + '@ethersproject/bignumber': 5.6.2 '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.0 + '@ethersproject/constants': 5.6.1 '@ethersproject/hash': 5.6.0 '@ethersproject/keccak256': 5.6.0 '@ethersproject/logger': 5.6.0 '@ethersproject/properties': 5.6.0 - '@ethersproject/strings': 5.6.0 + '@ethersproject/strings': 5.6.1 optional: true /@ethersproject/abi/5.6.0: @@ -3242,7 +3226,7 @@ packages: '@ethersproject/address': 5.6.0 '@ethersproject/bignumber': 5.6.0 '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.0 + '@ethersproject/constants': 5.6.1 '@ethersproject/hash': 5.6.0 '@ethersproject/keccak256': 5.6.0 '@ethersproject/logger': 5.6.0 @@ -3255,7 +3239,7 @@ packages: '@ethersproject/address': 5.6.0 '@ethersproject/bignumber': 5.6.0 '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.0 + '@ethersproject/constants': 5.6.1 '@ethersproject/hash': 5.6.0 '@ethersproject/keccak256': 5.6.0 '@ethersproject/logger': 5.6.0 @@ -3273,10 +3257,21 @@ packages: '@ethersproject/transactions': 5.6.0 '@ethersproject/web': 5.6.0 + /@ethersproject/abstract-provider/5.6.1: + resolution: {integrity: sha512-BxlIgogYJtp1FS8Muvj8YfdClk3unZH0vRMVX791Z9INBNT/kuACZ9GzaY1Y4yFq+YSy6/w4gzj3HCRKrK9hsQ==} + dependencies: + '@ethersproject/bignumber': 5.6.2 + '@ethersproject/bytes': 5.6.1 + '@ethersproject/logger': 5.6.0 + '@ethersproject/networks': 5.6.3 + '@ethersproject/properties': 5.6.0 + '@ethersproject/transactions': 5.6.2 + '@ethersproject/web': 5.6.1 + /@ethersproject/abstract-signer/5.6.0: resolution: {integrity: sha512-WOqnG0NJKtI8n0wWZPReHtaLkDByPL67tn4nBaDAhmVq8sjHTPbCdz4DRhVu/cfTOvfy9w3iq5QZ7BX7zw56BQ==} dependencies: - '@ethersproject/abstract-provider': 5.6.0 + '@ethersproject/abstract-provider': 5.6.1 '@ethersproject/bignumber': 5.6.0 '@ethersproject/bytes': 5.6.1 '@ethersproject/logger': 5.6.0 @@ -3291,11 +3286,25 @@ packages: '@ethersproject/logger': 5.6.0 '@ethersproject/rlp': 5.6.0 + /@ethersproject/address/5.6.1: + resolution: {integrity: sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q==} + dependencies: + '@ethersproject/bignumber': 5.6.2 + '@ethersproject/bytes': 5.6.1 + '@ethersproject/keccak256': 5.6.1 + '@ethersproject/logger': 5.6.0 + '@ethersproject/rlp': 5.6.1 + /@ethersproject/base64/5.6.0: resolution: {integrity: sha512-2Neq8wxJ9xHxCF9TUgmKeSh9BXJ6OAxWfeGWvbauPh8FuHEjamgHilllx8KkSd5ErxyHIX7Xv3Fkcud2kY9ezw==} dependencies: '@ethersproject/bytes': 5.6.1 + /@ethersproject/base64/5.6.1: + resolution: {integrity: sha512-qB76rjop6a0RIYYMiB4Eh/8n+Hxu2NIZm8S/Q7kNo5pmZfXhHGHmS4MinUainiBC54SCyRnwzL+KZjj8zbsSsw==} + dependencies: + '@ethersproject/bytes': 5.6.1 + /@ethersproject/basex/5.6.0: resolution: {integrity: sha512-qN4T+hQd/Md32MoJpc69rOwLYRUXwjTlhHDIeUkUmiN/JyWkkLLMoG0TqvSQKNqZOMgN5stbUYN6ILC+eD7MEQ==} dependencies: @@ -3309,6 +3318,13 @@ packages: '@ethersproject/logger': 5.6.0 bn.js: 4.11.9 + /@ethersproject/bignumber/5.6.2: + resolution: {integrity: sha512-v7+EEUbhGqT3XJ9LMPsKvXYHFc8eHxTowFCG/HgJErmq4XHJ2WR7aeyICg3uTOAQ7Icn0GFHAohXEhxQHq4Ubw==} + dependencies: + '@ethersproject/bytes': 5.6.1 + '@ethersproject/logger': 5.6.0 + bn.js: 5.2.1 + /@ethersproject/bytes/5.6.1: resolution: {integrity: sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==} dependencies: @@ -3317,21 +3333,26 @@ packages: /@ethersproject/constants/5.6.0: resolution: {integrity: sha512-SrdaJx2bK0WQl23nSpV/b1aq293Lh0sUaZT/yYKPDKn4tlAbkH96SPJwIhwSwTsoQQZxuh1jnqsKwyymoiBdWA==} dependencies: - '@ethersproject/bignumber': 5.6.0 + '@ethersproject/bignumber': 5.6.2 + + /@ethersproject/constants/5.6.1: + resolution: {integrity: sha512-QSq9WVnZbxXYFftrjSjZDUshp6/eKp6qrtdBtUCm0QxCV5z1fG/w3kdlcsjMCQuQHUnAclKoK7XpXMezhRDOLg==} + dependencies: + '@ethersproject/bignumber': 5.6.2 /@ethersproject/contracts/5.6.0: resolution: {integrity: sha512-74Ge7iqTDom0NX+mux8KbRUeJgu1eHZ3iv6utv++sLJG80FVuU9HnHeKVPfjd9s3woFhaFoQGf3B3iH/FrQmgw==} dependencies: '@ethersproject/abi': 5.6.1 - '@ethersproject/abstract-provider': 5.6.0 + '@ethersproject/abstract-provider': 5.6.1 '@ethersproject/abstract-signer': 5.6.0 - '@ethersproject/address': 5.6.0 - '@ethersproject/bignumber': 5.6.0 + '@ethersproject/address': 5.6.1 + '@ethersproject/bignumber': 5.6.2 '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.0 + '@ethersproject/constants': 5.6.1 '@ethersproject/logger': 5.6.0 '@ethersproject/properties': 5.6.0 - '@ethersproject/transactions': 5.6.0 + '@ethersproject/transactions': 5.6.2 /@ethersproject/hash/5.6.0: resolution: {integrity: sha512-fFd+k9gtczqlr0/BruWLAu7UAOas1uRRJvOR84uDf4lNZ+bTkGl366qvniUZHKtlqxBRU65MkOobkmvmpHU+jA==} @@ -3384,6 +3405,12 @@ packages: '@ethersproject/bytes': 5.6.1 js-sha3: 0.8.0 + /@ethersproject/keccak256/5.6.1: + resolution: {integrity: sha512-bB7DQHCTRDooZZdL3lk9wpL0+XuG3XLGHLh3cePnybsO3V0rdCAOQGpn/0R3aODmnTOOkCATJiD2hnL+5bwthA==} + dependencies: + '@ethersproject/bytes': 5.6.1 + js-sha3: 0.8.0 + /@ethersproject/logger/5.6.0: resolution: {integrity: sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==} @@ -3397,6 +3424,11 @@ packages: dependencies: '@ethersproject/logger': 5.6.0 + /@ethersproject/networks/5.6.3: + resolution: {integrity: sha512-QZxRH7cA5Ut9TbXwZFiCyuPchdWi87ZtVNHWZd0R6YFgYtes2jQ3+bsslJ0WdyDe0i6QumqtoYqvY3rrQFRZOQ==} + dependencies: + '@ethersproject/logger': 5.6.0 + /@ethersproject/pbkdf2/5.6.0: resolution: {integrity: sha512-Wu1AxTgJo3T3H6MIu/eejLFok9TYoSdgwRr5oGY1LTLfmGesDoSx05pemsbrPT2gG4cQME+baTSCp5sEo2erZQ==} dependencies: @@ -3411,23 +3443,23 @@ packages: /@ethersproject/providers/5.6.2: resolution: {integrity: sha512-6/EaFW/hNWz+224FXwl8+HdMRzVHt8DpPmu5MZaIQqx/K/ELnC9eY236SMV7mleCM3NnEArFwcAAxH5kUUgaRg==} dependencies: - '@ethersproject/abstract-provider': 5.6.0 + '@ethersproject/abstract-provider': 5.6.1 '@ethersproject/abstract-signer': 5.6.0 - '@ethersproject/address': 5.6.0 + '@ethersproject/address': 5.6.1 '@ethersproject/basex': 5.6.0 - '@ethersproject/bignumber': 5.6.0 + '@ethersproject/bignumber': 5.6.2 '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.0 + '@ethersproject/constants': 5.6.1 '@ethersproject/hash': 5.6.0 '@ethersproject/logger': 5.6.0 - '@ethersproject/networks': 5.6.2 + '@ethersproject/networks': 5.6.3 '@ethersproject/properties': 5.6.0 '@ethersproject/random': 5.6.0 - '@ethersproject/rlp': 5.6.0 + '@ethersproject/rlp': 5.6.1 '@ethersproject/sha2': 5.6.0 - '@ethersproject/strings': 5.6.0 - '@ethersproject/transactions': 5.6.0 - '@ethersproject/web': 5.6.0 + '@ethersproject/strings': 5.6.1 + '@ethersproject/transactions': 5.6.2 + '@ethersproject/web': 5.6.1 bech32: 1.1.4 ws: 7.4.6 transitivePeerDependencies: @@ -3446,6 +3478,12 @@ packages: '@ethersproject/bytes': 5.6.1 '@ethersproject/logger': 5.6.0 + /@ethersproject/rlp/5.6.1: + resolution: {integrity: sha512-uYjmcZx+DKlFUk7a5/W9aQVaoEC7+1MOBgNtvNg13+RnuUwT4F0zTovC0tmay5SmRslb29V1B7Y5KCri46WhuQ==} + dependencies: + '@ethersproject/bytes': 5.6.1 + '@ethersproject/logger': 5.6.0 + /@ethersproject/sha2/5.6.0: resolution: {integrity: sha512-1tNWCPFLu1n3JM9t4/kytz35DkuF9MxqkGGEHNauEbaARdm2fafnOyw1s0tIQDPKF/7bkP1u3dbrmjpn5CelyA==} dependencies: @@ -3463,6 +3501,16 @@ packages: elliptic: 6.5.4 hash.js: 1.1.7 + /@ethersproject/signing-key/5.6.2: + resolution: {integrity: sha512-jVbu0RuP7EFpw82vHcL+GP35+KaNruVAZM90GxgQnGqB6crhBqW/ozBfFvdeImtmb4qPko0uxXjn8l9jpn0cwQ==} + dependencies: + '@ethersproject/bytes': 5.6.1 + '@ethersproject/logger': 5.6.0 + '@ethersproject/properties': 5.6.0 + bn.js: 5.2.1 + elliptic: 6.5.4 + hash.js: 1.1.7 + /@ethersproject/solidity/5.6.0: resolution: {integrity: sha512-YwF52vTNd50kjDzqKaoNNbC/r9kMDPq3YzDWmsjFTRBcIF1y4JCQJ8gB30wsTfHbaxgxelI5BfxQSxD/PbJOww==} dependencies: @@ -3477,7 +3525,14 @@ packages: resolution: {integrity: sha512-uv10vTtLTZqrJuqBZR862ZQjTIa724wGPWQqZrofaPI/kUsf53TBG0I0D+hQ1qyNtllbNzaW+PDPHHUI6/65Mg==} dependencies: '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.0 + '@ethersproject/constants': 5.6.1 + '@ethersproject/logger': 5.6.0 + + /@ethersproject/strings/5.6.1: + resolution: {integrity: sha512-2X1Lgk6Jyfg26MUnsHiT456U9ijxKUybz8IM1Vih+NJxYtXhmvKBcHOmvGqpFSVJ0nQ4ZCoIViR8XlRw1v/+Cw==} + dependencies: + '@ethersproject/bytes': 5.6.1 + '@ethersproject/constants': 5.6.1 '@ethersproject/logger': 5.6.0 /@ethersproject/transactions/5.6.0: @@ -3486,24 +3541,37 @@ packages: '@ethersproject/address': 5.6.0 '@ethersproject/bignumber': 5.6.0 '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.0 + '@ethersproject/constants': 5.6.1 '@ethersproject/keccak256': 5.6.0 '@ethersproject/logger': 5.6.0 '@ethersproject/properties': 5.6.0 '@ethersproject/rlp': 5.6.0 '@ethersproject/signing-key': 5.6.0 + /@ethersproject/transactions/5.6.2: + resolution: {integrity: sha512-BuV63IRPHmJvthNkkt9G70Ullx6AcM+SDc+a8Aw/8Yew6YwT51TcBKEp1P4oOQ/bP25I18JJr7rcFRgFtU9B2Q==} + dependencies: + '@ethersproject/address': 5.6.1 + '@ethersproject/bignumber': 5.6.2 + '@ethersproject/bytes': 5.6.1 + '@ethersproject/constants': 5.6.1 + '@ethersproject/keccak256': 5.6.1 + '@ethersproject/logger': 5.6.0 + '@ethersproject/properties': 5.6.0 + '@ethersproject/rlp': 5.6.1 + '@ethersproject/signing-key': 5.6.2 + /@ethersproject/units/5.6.0: resolution: {integrity: sha512-tig9x0Qmh8qbo1w8/6tmtyrm/QQRviBh389EQ+d8fP4wDsBrJBf08oZfoiz1/uenKK9M78yAP4PoR7SsVoTjsw==} dependencies: '@ethersproject/bignumber': 5.6.0 - '@ethersproject/constants': 5.6.0 + '@ethersproject/constants': 5.6.1 '@ethersproject/logger': 5.6.0 /@ethersproject/wallet/5.6.0: resolution: {integrity: sha512-qMlSdOSTyp0MBeE+r7SUhr1jjDlC1zAXB8VD84hCnpijPQiSNbxr6GdiLXxpUs8UKzkDiNYYC5DRI3MZr+n+tg==} dependencies: - '@ethersproject/abstract-provider': 5.6.0 + '@ethersproject/abstract-provider': 5.6.1 '@ethersproject/abstract-signer': 5.6.0 '@ethersproject/address': 5.6.0 '@ethersproject/bignumber': 5.6.0 @@ -3528,6 +3596,15 @@ packages: '@ethersproject/properties': 5.6.0 '@ethersproject/strings': 5.6.0 + /@ethersproject/web/5.6.1: + resolution: {integrity: sha512-/vSyzaQlNXkO1WV+RneYKqCJwualcUdx/Z3gseVovZP0wIlOFcCE1hkRhKBH8ImKbGQbMl9EAAyJFrJu7V0aqA==} + dependencies: + '@ethersproject/base64': 5.6.1 + '@ethersproject/bytes': 5.6.1 + '@ethersproject/logger': 5.6.0 + '@ethersproject/properties': 5.6.0 + '@ethersproject/strings': 5.6.1 + /@ethersproject/wordlists/5.6.0: resolution: {integrity: sha512-q0bxNBfIX3fUuAo9OmjlEYxP40IB8ABgb7HjEZCL5IKubzV3j30CWi2rqQbjTS2HfoyQbfINoKcTVWP4ejwR7Q==} dependencies: @@ -5587,6 +5664,23 @@ packages: typescript: 4.6.2 dev: false + /@typechain/ethers-v5/9.0.0_65ac1934a17b69618ed69019e39a382e: + resolution: {integrity: sha512-bAanuPl1L2itaUdMvor/QvwnIH+TM/CmG00q17Ilv3ZZMeJ2j8HcarhgJUZ9pBY1teBb85P8cC03dz3mSSx+tQ==} + peerDependencies: + '@ethersproject/abi': ^5.0.0 + '@ethersproject/bytes': ^5.0.0 + '@ethersproject/providers': ^5.0.0 + ethers: ^5.1.3 + typechain: ^7.0.0 + typescript: '>=4.0.0' + dependencies: + ethers: 5.6.2 + lodash: 4.17.21 + ts-essentials: 7.0.3_typescript@4.6.2 + typechain: 7.0.1_typescript@4.6.2 + typescript: 4.6.2 + dev: true + /@typechain/ethers-v5/9.0.0_8d7fa4ccdda916073c1de28cb1536173: resolution: {integrity: sha512-bAanuPl1L2itaUdMvor/QvwnIH+TM/CmG00q17Ilv3ZZMeJ2j8HcarhgJUZ9pBY1teBb85P8cC03dz3mSSx+tQ==} peerDependencies: @@ -8316,6 +8410,9 @@ packages: /bn.js/5.2.0: resolution: {integrity: sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==} + /bn.js/5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + /body-parser/1.19.2: resolution: {integrity: sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==} engines: {node: '>= 0.8'} @@ -11468,13 +11565,13 @@ packages: secp256k1: 4.0.3 setimmediate: 1.0.5 - /ethereum-waffle/4.0.0-alpha.0_0b0f918ed7711740df0dccc361ac0497: + /ethereum-waffle/4.0.0-alpha.0_6bddc23fe2c0b9af3ce0fdadeab54392: resolution: {integrity: sha512-gDNoneCUuaidULiWuEXsygdgnRWHn8TWdg4BchQ/2poxtWomBjsPa4KeX7fmRLCLiklgTx/Lr2AsPv6XCG62uA==} engines: {node: '>=10.0'} hasBin: true dependencies: '@ethereum-waffle/chai': 4.0.0-alpha.0 - '@ethereum-waffle/compiler': 4.0.0-alpha.0_efb9faae6de36dfed0f85db0b5aa6048 + '@ethereum-waffle/compiler': 4.0.0-alpha.0_256cf69a3c5e8c20d955f1f7b5311c9a '@ethereum-waffle/mock-contract': 4.0.0-alpha.0 '@ethereum-waffle/provider': 4.0.0-alpha.0 ethers: 5.6.2 @@ -11489,15 +11586,15 @@ packages: - supports-color - typescript - utf-8-validate - dev: true + dev: false - /ethereum-waffle/4.0.0-alpha.0_6bddc23fe2c0b9af3ce0fdadeab54392: + /ethereum-waffle/4.0.0-alpha.0_solc@0.8.12+typescript@4.6.2: resolution: {integrity: sha512-gDNoneCUuaidULiWuEXsygdgnRWHn8TWdg4BchQ/2poxtWomBjsPa4KeX7fmRLCLiklgTx/Lr2AsPv6XCG62uA==} engines: {node: '>=10.0'} hasBin: true dependencies: '@ethereum-waffle/chai': 4.0.0-alpha.0 - '@ethereum-waffle/compiler': 4.0.0-alpha.0_256cf69a3c5e8c20d955f1f7b5311c9a + '@ethereum-waffle/compiler': 4.0.0-alpha.0_5d9f16c28e51f28c6b558e793d1166d1 '@ethereum-waffle/mock-contract': 4.0.0-alpha.0 '@ethereum-waffle/provider': 4.0.0-alpha.0 ethers: 5.6.2 @@ -11512,7 +11609,7 @@ packages: - supports-color - typescript - utf-8-validate - dev: false + dev: true /ethereumjs-abi/0.6.5: resolution: {integrity: sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE=} @@ -18951,7 +19048,7 @@ packages: resolution: {integrity: sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==} hasBin: true dependencies: - bn.js: 5.2.0 + bn.js: 5.2.1 /rsvp/4.8.5: resolution: {integrity: sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==} @@ -21731,7 +21828,7 @@ packages: resolution: {integrity: sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw==} engines: {node: '>=8.0.0'} dependencies: - '@ethersproject/transactions': 5.6.0 + '@ethersproject/transactions': 5.6.2 underscore: 1.9.1 web3-core-helpers: 1.2.11 web3-core-promievent: 1.2.11 From 5e8dbcfe160b7985ef8e228fe9d83a86ff4d0f24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Fri, 3 Jun 2022 16:29:07 +0200 Subject: [PATCH 29/59] =?UTF-8?q?=F0=9F=A7=BA=20Add=20refreshing=20docs=20?= =?UTF-8?q?(#802)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add refreshing page * Add interpunction and infos * Add example infos Co-authored-by: mateusz --- .../02-Reading/04-Refresh Per Blocks.mdx | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 packages/docs/docs/02-Guides/02-Reading/04-Refresh Per Blocks.mdx diff --git a/packages/docs/docs/02-Guides/02-Reading/04-Refresh Per Blocks.mdx b/packages/docs/docs/02-Guides/02-Reading/04-Refresh Per Blocks.mdx new file mode 100644 index 000000000..6995b06bf --- /dev/null +++ b/packages/docs/docs/02-Guides/02-Reading/04-Refresh Per Blocks.mdx @@ -0,0 +1,67 @@ +# Refresh Per Blocks + +### Never + +To disable refreshing calls per block, just pass `refresh` parameter as `never` to config, it will fetch data only once. + +**Example** + +```tsx + import { Mainnet } from '@usedapp/core' + + const config = { + readOnlyChainId: Mainnet.chainID, + readOnlyUrls: { + [Mainnet.chainID]: 'https://mainnet.infura.io/v3/62687d1a985d4508b2b7a24827551934', + }, + refresh: 'never', + } +``` + +### Specified number of blocks + +To enable refreshing calls per specified number of blocks, just pass `refresh` parameter as specified number to config, it will refresh each 10 mined blocks. + +**Example** + +```tsx + import { Mainnet } from '@usedapp/core' + + const config = { + readOnlyChainId: Mainnet.chainID, + readOnlyUrls: { + [Mainnet.chainID]: 'https://mainnet.infura.io/v3/62687d1a985d4508b2b7a24827551934', + }, + refresh: 10, + } +``` + +### Every block + +If you want to have your calls refreshed per single, mined block just pass `refresh` parameter as `everyBlock` to config or just do not fill it. + +**Example** + +```tsx + import { Mainnet } from '@usedapp/core' + + const config = { + readOnlyChainId: Mainnet.chainID, + readOnlyUrls: { + [Mainnet.chainID]: 'https://mainnet.infura.io/v3/62687d1a985d4508b2b7a24827551934', + }, + refresh: 'everyBlock', + } +``` + +## Calls + +There is also possible to override call refreshing behaviour by adding `refresh` parameter to `queryParams`, example below: + +**Example** + +```tsx +const firstBalance = useEtherBalance(account1, { refresh: 'never' }) // fetches only once +const secondBalance = useEtherBalance(account2, { refresh: 10 }) // fetches every 10 blocks +const thirdBalance = useEtherBalance(account3, { refresh: 'everyBlock' }) // fetches every single block +``` From 437cd3682ad53ea1181fe6fb4cc519ac20f23a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Tue, 7 Jun 2022 10:11:44 +0200 Subject: [PATCH 30/59] =?UTF-8?q?=F0=9F=91=A8=F0=9F=8F=BB=E2=80=8D?= =?UTF-8?q?=F0=9F=94=A7=20Change=20estimating=20function=20in=20useContrac?= =?UTF-8?q?tCall=20(#806)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change estimating function in useContractCall Co-authored-by: mateusz --- .../core/src/hooks/estimateGasLimit.test.ts | 10 ++++---- .../core/src/hooks/useContractFunction.ts | 10 ++++++-- .../core/src/hooks/usePromiseTransaction.ts | 23 +++++++++++++++++-- packages/core/src/hooks/useSendTransaction.ts | 4 ++-- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/packages/core/src/hooks/estimateGasLimit.test.ts b/packages/core/src/hooks/estimateGasLimit.test.ts index a3a53f144..a7d21f8b8 100644 --- a/packages/core/src/hooks/estimateGasLimit.test.ts +++ b/packages/core/src/hooks/estimateGasLimit.test.ts @@ -1,6 +1,6 @@ import { expect } from 'chai' import { MockProvider } from 'ethereum-waffle' -import { estimateGasLimit } from './usePromiseTransaction' +import { estimateTransactionGasLimit } from './usePromiseTransaction' const BASE_TX_COST = 21000 const LIMITED_TX_COST = 23100 // 21000 * 1.1 @@ -10,7 +10,7 @@ describe('estimateGasLimit', () => { const [signer, receiver] = mockProvider.getWallets() it('sending ether transaction', async () => { - const gasLimit = await estimateGasLimit( + const gasLimit = await estimateTransactionGasLimit( { value: 1, to: receiver.address, @@ -23,7 +23,7 @@ describe('estimateGasLimit', () => { }) it('sending ether transaction with limit', async () => { - const gasLimit = await estimateGasLimit( + const gasLimit = await estimateTransactionGasLimit( { value: 1, to: receiver.address, @@ -36,7 +36,7 @@ describe('estimateGasLimit', () => { }) it('sending ether transaction with gasLimit', async () => { - const gasLimit = await estimateGasLimit( + const gasLimit = await estimateTransactionGasLimit( { value: 1, to: receiver.address, @@ -50,7 +50,7 @@ describe('estimateGasLimit', () => { }) it('sending ether transaction with limit with gasLimit', async () => { - const gasLimit = await estimateGasLimit( + const gasLimit = await estimateTransactionGasLimit( { value: 1, to: receiver.address, diff --git a/packages/core/src/hooks/useContractFunction.ts b/packages/core/src/hooks/useContractFunction.ts index 762066bc7..0b45a49ca 100644 --- a/packages/core/src/hooks/useContractFunction.ts +++ b/packages/core/src/hooks/useContractFunction.ts @@ -3,7 +3,7 @@ import { useConfig } from './useConfig' import { Contract, providers } from 'ethers' import { useCallback, useState } from 'react' import { useEthers } from './useEthers' -import { estimateGasLimit, usePromiseTransaction } from './usePromiseTransaction' +import { estimateContractFunctionGasLimit, usePromiseTransaction } from './usePromiseTransaction' import { LogDescription } from 'ethers/lib/utils' import { ContractFunctionNames, Falsy, Params, TypedContract } from '../model/types' @@ -79,7 +79,13 @@ export function useContractFunction { + try { + const estimatedGas = await contractWithSigner.estimateGas[functionName](...args) + const gasLimit = estimatedGas?.mul(bufferGasLimitPercentage + 100).div(100) + return gasLimit + } catch (err: any) { + console.error(err) + return undefined + } +} + const isDroppedAndReplaced = (e: any) => e?.code === errors.TRANSACTION_REPLACED && e?.replacement && (e?.reason === 'repriced' || e?.cancelled === false) diff --git a/packages/core/src/hooks/useSendTransaction.ts b/packages/core/src/hooks/useSendTransaction.ts index 7ad9f4e45..33154f67c 100644 --- a/packages/core/src/hooks/useSendTransaction.ts +++ b/packages/core/src/hooks/useSendTransaction.ts @@ -2,7 +2,7 @@ import type { TransactionRequest } from '@ethersproject/abstract-provider' import { TransactionOptions } from '../model/TransactionOptions' import { useConfig } from './useConfig' import { useEthers } from './useEthers' -import { estimateGasLimit, usePromiseTransaction } from './usePromiseTransaction' +import { estimateTransactionGasLimit, usePromiseTransaction } from './usePromiseTransaction' /** * Hook returns an object with three variables: `state`, `resetState`, and `sendTransaction`. @@ -34,7 +34,7 @@ export function useSendTransaction(options?: TransactionOptions) { const sendTransaction = async (transactionRequest: TransactionRequest) => { const signer = options?.signer || library?.getSigner() if (signer) { - const gasLimit = await estimateGasLimit(transactionRequest, signer, bufferGasLimitPercentage) + const gasLimit = await estimateTransactionGasLimit(transactionRequest, signer, bufferGasLimitPercentage) await promiseTransaction( signer.sendTransaction({ From e004a6617ad3ab6f472c98cf869d0619c7e27795 Mon Sep 17 00:00:00 2001 From: Przemyslaw Rzad Date: Tue, 7 Jun 2022 11:42:45 +0200 Subject: [PATCH 31/59] =?UTF-8?q?=F0=9F=8F=B5=20Add=20missing=20documentat?= =?UTF-8?q?ion=20related=20to=20log=20queries=20(#801)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/hooks/index.ts | 1 + packages/core/src/hooks/useLogs.ts | 3 +- packages/core/src/hooks/useRawLogs.ts | 6 +++ packages/core/src/index.ts | 1 + .../docs/docs/03-API Reference/03-Models.mdx | 52 ++++++++++++++++++- packages/docs/generate/generate-content.ts | 9 ++++ packages/docs/generate/replace-links.ts | 16 +++++- 7 files changed, 84 insertions(+), 4 deletions(-) diff --git a/packages/core/src/hooks/index.ts b/packages/core/src/hooks/index.ts index 2b2020ed5..1e2c68d49 100644 --- a/packages/core/src/hooks/index.ts +++ b/packages/core/src/hooks/index.ts @@ -26,5 +26,6 @@ export * from './useChainState' export * from './useChainMeta' export * from './useReadonlyProvider' export * from './useLogs' +export * from './useRawLogs' export * from './useRawCalls' export * from './useResolveName' diff --git a/packages/core/src/hooks/useLogs.ts b/packages/core/src/hooks/useLogs.ts index fe6ddfbdf..91b50a858 100644 --- a/packages/core/src/hooks/useLogs.ts +++ b/packages/core/src/hooks/useLogs.ts @@ -20,10 +20,11 @@ export interface TypedFilter< /** * Makes a call to get the logs for a specific contract event and returns the decoded logs or an error if present. * The hook will cause the component to refresh when a new block is mined and the returned logs change. - * A syntax sugar for useRawLogs that uses ABI, event name, and arguments instead of raw data. + * A syntax sugar for {@link useRawLogs} that uses ABI, event name, and arguments instead of raw data. * @param filter an event filter (see {@link TypedFilter}) * @param queryParams allows for additional configuration of the query (see {@link LogQueryParams}) * @returns an array of decoded logs (see {@link LogsResult}) + * @public */ export function useLogs(filter: TypedFilter | Falsy, queryParams: LogQueryParams = {}): LogsResult { const { fromBlock, toBlock, blockHash } = queryParams diff --git a/packages/core/src/hooks/useRawLogs.ts b/packages/core/src/hooks/useRawLogs.ts index 3996bdebf..d311f8210 100644 --- a/packages/core/src/hooks/useRawLogs.ts +++ b/packages/core/src/hooks/useRawLogs.ts @@ -7,6 +7,12 @@ import type { Filter, FilterByBlockHash, Log } from '@ethersproject/abstract-pro import { Falsy } from '../model/types' /** + * Returns all blockchain logs given a block filter. + * The hook will cause the component to refresh when a new block is mined and the returned logs change. + * @see {@link useLogs} for a more easy-to-use version of the query. + * @param filter an event filter, which blocks to query + * @param queryParams allows for additional configuration of the query (see {@link QueryParams}) + * @returns an array of [logs](https://docs.ethers.io/v5/api/providers/types/#providers-Log) * @public */ export function useRawLogs( diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 9ee7c731f..bd1ba955d 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -41,6 +41,7 @@ export type { TypedFilter, Call, ContractCall, Web3Ethers, TokenList } from './h export { useBlockMeta, useLogs, + useRawLogs, useBlockNumber, useBlockNumbers, useCall, diff --git a/packages/docs/docs/03-API Reference/03-Models.mdx b/packages/docs/docs/03-API Reference/03-Models.mdx index 84dac2e0d..4f57a02fa 100644 --- a/packages/docs/docs/03-API Reference/03-Models.mdx +++ b/packages/docs/docs/03-API Reference/03-Models.mdx @@ -106,7 +106,7 @@ Fields: - ``args: any[]`` - arguments for the function -Typecheking: +Typechecking: If you want a variable of type Call to be type checked you need to pass a typechain contract type as in below example @@ -150,6 +150,30 @@ It is `undefined` when call didn't return yet or object `{ success: boolean, val - `success` - boolean indicating whether call was successful or not, - `value` - encoded result when success is `true` or encoded error message when success is `false`. +## LogsResult + +Result of a [useLogs](./02-Hooks.mdx#uselogs) query. + +It is `undefined` when the query didn't return yet or one of the following objects: + +- `{ value: DetailedEventRecord[], error: undefined }`, if the query succeeded, +- `{ value: undefined, error: Error }`, if the query failed. + +Type `DetailedEventRecord` represents a single event (log) on a typed contract: + +```typescript +type DetailedEventRecord> = { + data: EventRecord, + blockNumber: number, + blockHash: string, + transactionIndex: number, + transactionHash: string, + removed: boolean, +} +``` + +Additional resources related to events can be found [here](https://docs.soliditylang.org/en/latest/abi-spec.html#events). + ## ChainCall Represents a single call on the blockchain that can be included in multicall. @@ -281,6 +305,22 @@ Additionally all states except ``None``, contain ``chainId: ChainId``. Change in ``state`` will update the component so you can use it in useEffect. +## TypedFilter + +Represents a filter of logs emitted on a typed contract. + +**Example** + +```typescript +const filter: TypedFilter = { + contract: token, + event: 'Transfer', + args: [null, deployer.address], +} +``` + +To be used with the [useLogs](./02-Hooks.mdx#uselogs) hook. + ## QueryParams Optional overrides for hooks querying the state of the blockchain. @@ -289,3 +329,13 @@ An object consisting of: - ``chainId?: ChainId`` - ChainId of the chain you want to perform the query on. Defaults to the chainId of the connected wallet. See [ChainID](#chainid). - ``isStatic?: boolean`` - Whether the query is static (not expected to change between calls). Used for optimizations. + +## LogQueryParams + +Extends the [QueryParams](#queryparams) object with parameters related to querying logs (blockchain events). + +Adds fields: + +- `fromBlock?: BlockTag` - The starting block (inclusive) to search for logs matching the filter criteria. +- `toBlock?: BlockTag` - The end block (inclusive) to search for logs matching the filter criteria. +- `blockHash?: string` - The specific block (by its block hash) to search for logs matching the filter criteria. diff --git a/packages/docs/generate/generate-content.ts b/packages/docs/generate/generate-content.ts index a07f6b4e9..c24da0394 100644 --- a/packages/docs/generate/generate-content.ts +++ b/packages/docs/generate/generate-content.ts @@ -61,6 +61,14 @@ const examples = (child: Child) => { examples.map(example).join('\n') + '\n' } +const see = (child: Child) => { + const seeRecords = child.signatures[0]?.comment?.tags?.filter(tag => tag.tagName === 'see') ?? [] + if (seeRecords.length === 0) return undefined + return seeRecords.map(seeRecord => ( + `\n**See:** ${seeRecord.text}` + )).join('\n') + '\n' +} + const returns = (child: Child) => { const value = child.signatures[0]?.comment?.returns return value ? `\n**Returns**: ${value}` : undefined @@ -73,6 +81,7 @@ const entry = (child: Child): string => { parameters(child), returns(child), examples(child), + see(child), ].map(newLine).join('') } diff --git a/packages/docs/generate/replace-links.ts b/packages/docs/generate/replace-links.ts index 0c2ffd8ff..5f2cc541a 100644 --- a/packages/docs/generate/replace-links.ts +++ b/packages/docs/generate/replace-links.ts @@ -19,7 +19,10 @@ const models = [ 'Config', 'TransactionStatus', 'TransactionOptions', - 'TokenInfo' + 'TokenInfo', + 'TypedFilter', + 'LogQueryParams', + 'LogsResult', ] /** @@ -34,7 +37,9 @@ const hooks = [ 'useChainCalls', 'ContractCall', 'useContractFunction', - 'useSendTransaction' + 'useSendTransaction', + 'useLogs', + 'useRawLogs', ] const ahref = (title: string, link: string) => `${title}` @@ -61,5 +66,12 @@ export const replaceLinks = (content: string) => { createLink(linked) ) }) + + const linksLeft = newContent.match(/{@link (.*)}/g) + if (linksLeft?.length > 0) { + console.log('Not replaced links:') + linksLeft.forEach(link => console.log(link)) + throw new Error('Links left not replaced.') + } return newContent } From a3b134099c6c08950d8f1c7813c6347b6d67dede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Tue, 7 Jun 2022 13:35:14 +0200 Subject: [PATCH 32/59] =?UTF-8?q?=F0=9F=95=B8=20Change=20type=20declaratio?= =?UTF-8?q?n=20in=20swithNetwork=20(#808)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Change type declaration * Create change-switchNetwork-to-promise.md Co-authored-by: mateusz --- .changeset/change-switchNetwork-to-promise.md | 5 +++++ packages/core/src/hooks/useEthers.ts | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/change-switchNetwork-to-promise.md diff --git a/.changeset/change-switchNetwork-to-promise.md b/.changeset/change-switchNetwork-to-promise.md new file mode 100644 index 000000000..f9f0a698d --- /dev/null +++ b/.changeset/change-switchNetwork-to-promise.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +πŸ•Έ Change swithNetwork to promise diff --git a/packages/core/src/hooks/useEthers.ts b/packages/core/src/hooks/useEthers.ts index 8262b19c0..1b57d14f7 100644 --- a/packages/core/src/hooks/useEthers.ts +++ b/packages/core/src/hooks/useEthers.ts @@ -37,7 +37,7 @@ export type Web3Ethers = { /** * Switch to a different network. */ - switchNetwork: (chainId: number) => void + switchNetwork: (chainId: number) => Promise } /** @@ -121,7 +121,6 @@ export function useEthers(): Web3Ethers { error, isLoading, - switchNetwork, } } From 3faea126d189682016ec14aa72d973bfa82b2bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Tue, 7 Jun 2022 14:42:23 +0200 Subject: [PATCH 33/59] =?UTF-8?q?=F0=9F=A7=AA=20Add=20estimateContractFunc?= =?UTF-8?q?tionGasLimit=20tests=20(#807)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add tests * Add useContractFunction test * Change to at most * Rename started into starting Co-authored-by: mateusz --- .../core/src/hooks/estimateGasLimit.test.ts | 21 ++++++++++++- .../src/hooks/useContractFunction.test.tsx | 31 +++++++++++++++++-- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/packages/core/src/hooks/estimateGasLimit.test.ts b/packages/core/src/hooks/estimateGasLimit.test.ts index a7d21f8b8..ac7ef758e 100644 --- a/packages/core/src/hooks/estimateGasLimit.test.ts +++ b/packages/core/src/hooks/estimateGasLimit.test.ts @@ -1,13 +1,22 @@ import { expect } from 'chai' import { MockProvider } from 'ethereum-waffle' -import { estimateTransactionGasLimit } from './usePromiseTransaction' +import { Contract } from 'ethers' +import { deployMockToken } from '../testing' +import { estimateContractFunctionGasLimit, estimateTransactionGasLimit } from './usePromiseTransaction' const BASE_TX_COST = 21000 const LIMITED_TX_COST = 23100 // 21000 * 1.1 +const CONTRACT_FUNCTION_COST = 51941 // mock transfer transaction cost + describe('estimateGasLimit', () => { const mockProvider = new MockProvider() const [signer, receiver] = mockProvider.getWallets() + let token: Contract + + beforeEach(async () => { + token = await deployMockToken(signer) + }) it('sending ether transaction', async () => { const gasLimit = await estimateTransactionGasLimit( @@ -62,4 +71,14 @@ describe('estimateGasLimit', () => { expect(gasLimit).to.equal(LIMITED_TX_COST) }) + + it('transfer token', async () => { + const gasLimit = await estimateContractFunctionGasLimit(token, 'transfer', [receiver.address, 1], 0) + expect(gasLimit).to.equal(CONTRACT_FUNCTION_COST) + }) + + it('transfer token with limit', async () => { + const gasLimit = await estimateContractFunctionGasLimit(token, 'transfer', [receiver.address, 1], 100) + expect(gasLimit).to.equal(2 * CONTRACT_FUNCTION_COST) + }) }) diff --git a/packages/core/src/hooks/useContractFunction.test.tsx b/packages/core/src/hooks/useContractFunction.test.tsx index ba7e9b1aa..d4baebb09 100644 --- a/packages/core/src/hooks/useContractFunction.test.tsx +++ b/packages/core/src/hooks/useContractFunction.test.tsx @@ -1,15 +1,20 @@ -import { useContractFunction } from '../../src' +import { Config, useContractFunction } from '../../src' import { expect } from 'chai' import { MockProvider } from 'ethereum-waffle' import { BigNumber, Contract } from 'ethers' -import { renderWeb3Hook, contractCallOutOfGasMock, deployMockToken } from '../../src/testing' +import { renderWeb3Hook, contractCallOutOfGasMock, deployMockToken, setupTestingConfig } from '../../src/testing' +import { renderDAppHook } from '../testing/renderDAppHook' + +const CONTRACT_FUNCTION_COST = 51941 // mock transfer transaction cost describe('useContractFunction', () => { const mockProvider = new MockProvider() const [deployer, spender] = mockProvider.getWallets() let token: Contract + let config: Config beforeEach(async () => { + ;({ config } = await setupTestingConfig()) token = await deployMockToken(deployer) }) @@ -94,4 +99,26 @@ describe('useContractFunction', () => { await waitForNextUpdate() await result.current.send(spender.address, 200) }) + + it('transfer amount with limit', async () => { + const { result, waitForCurrent, waitForNextUpdate } = await renderDAppHook( + () => useContractFunction(token, 'transfer'), + { + config: { + ...config, + bufferGasLimitPercentage: 100, + }, + } + ) + + await waitForNextUpdate() + const startingBalance = await deployer.getBalance() + await result.current.send(spender.address, 200) + await waitForCurrent((val) => val.state !== undefined) + + expect(result.current.state.status).to.eq('Success') + const finalBalance = await deployer.getBalance() + const txCost = finalBalance.sub(startingBalance) + expect(txCost).to.be.at.most(2 * CONTRACT_FUNCTION_COST) + }) }) From edfd60b951734253a594c3b9fd8ebdbfb97ed0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Tue, 7 Jun 2022 15:19:49 +0200 Subject: [PATCH 34/59] =?UTF-8?q?=F0=9F=98=B6=E2=80=8D=F0=9F=8C=AB?= =?UTF-8?q?=EF=B8=8F=20Add=20receipt=20and=20tests=20for=20contract=20func?= =?UTF-8?q?tion=20and=20transaction=20(#811)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add receipt and test for contract function and transaction * Create add-receipt-for-write-functions.md * Remove await Co-authored-by: mateusz --- .changeset/add-receipt-for-write-functions.md | 5 ++++ .../src/hooks/useContractFunction.test.tsx | 24 +++++++++++++++++++ .../core/src/hooks/useContractFunction.ts | 4 +++- .../core/src/hooks/useSendTransaction.test.ts | 23 ++++++++++++++++++ packages/core/src/hooks/useSendTransaction.ts | 2 +- 5 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 .changeset/add-receipt-for-write-functions.md diff --git a/.changeset/add-receipt-for-write-functions.md b/.changeset/add-receipt-for-write-functions.md new file mode 100644 index 000000000..0b090f617 --- /dev/null +++ b/.changeset/add-receipt-for-write-functions.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +πŸ˜Άβ€πŸŒ«οΈ Add receipt for executing contract functions and sending transactions diff --git a/packages/core/src/hooks/useContractFunction.test.tsx b/packages/core/src/hooks/useContractFunction.test.tsx index d4baebb09..b66b2a552 100644 --- a/packages/core/src/hooks/useContractFunction.test.tsx +++ b/packages/core/src/hooks/useContractFunction.test.tsx @@ -121,4 +121,28 @@ describe('useContractFunction', () => { const txCost = finalBalance.sub(startingBalance) expect(txCost).to.be.at.most(2 * CONTRACT_FUNCTION_COST) }) + + it('success with correct receipt', async () => { + const { result, waitForCurrent, waitForNextUpdate } = await renderWeb3Hook( + () => useContractFunction(token, 'approve'), + { + mockProvider, + } + ) + await waitForNextUpdate() + await result.current.send(spender.address, 200) + await waitForCurrent((val) => val.state !== undefined) + + expect(result.current.state.status).to.eq('Success') + expect(await token.allowance(deployer.address, spender.address)).to.eq(200) + + expect(result.current.state.receipt).to.not.be.undefined + expect(result.current.state.receipt?.to).to.eq(token.address) + expect(result.current.state.receipt?.from).to.eq(deployer.address) + expect(result.current.state.receipt?.gasUsed).to.be.gt(0) + expect(result.current.state.receipt?.status).to.eq(1) + expect(result.current.state.receipt?.blockHash).to.match(/^0x/) + expect(result.current.state.receipt?.transactionHash).to.match(/^0x/) + expect(result.current.state.receipt?.gasUsed).to.be.gt(0) + }) }) diff --git a/packages/core/src/hooks/useContractFunction.ts b/packages/core/src/hooks/useContractFunction.ts index 0b45a49ca..3e2d553d1 100644 --- a/packages/core/src/hooks/useContractFunction.ts +++ b/packages/core/src/hooks/useContractFunction.ts @@ -6,6 +6,7 @@ import { useEthers } from './useEthers' import { estimateContractFunctionGasLimit, usePromiseTransaction } from './usePromiseTransaction' import { LogDescription } from 'ethers/lib/utils' import { ContractFunctionNames, Falsy, Params, TypedContract } from '../model/types' +import { TransactionReceipt } from '@ethersproject/abstract-provider' type JsonRpcProvider = providers.JsonRpcProvider @@ -73,7 +74,7 @@ export function useContractFunction): Promise => { + async (...args: Params): Promise => { if (contract) { const hasOpts = args.length > (contract.interface?.getFunction(functionName).inputs.length ?? 0) @@ -107,6 +108,7 @@ export function useContractFunction { expect(result.current.state.status).to.eq('Exception') expect(result.current.state.errorMessage).to.eq('invalid address') }) + + it('Returns receipt after correct transaction', async () => { + const { result, waitForCurrent } = await renderWeb3Hook(useSendTransaction, { mockProvider }) + + const spenderBalance = await spender.getBalance() + const receiverBalance = await receiver.getBalance() + + await result.current.sendTransaction({ to: receiver.address, value: BigNumber.from(10), gasPrice: 0 }) + + await waitForCurrent((val) => val.state !== undefined) + expect(result.current.state.status).to.eq('Success') + expect(await receiver.getBalance()).to.eq(receiverBalance.add(10)) + expect(await spender.getBalance()).to.eq(spenderBalance.sub(10)) + + expect(result.current.state.receipt).to.not.be.undefined + expect(result.current.state.receipt?.to).to.eq(receiver.address) + expect(result.current.state.receipt?.from).to.eq(spender.address) + expect(result.current.state.receipt?.gasUsed).to.be.gt(0) + expect(result.current.state.receipt?.status).to.eq(1) + expect(result.current.state.receipt?.blockHash).to.match(/^0x/) + expect(result.current.state.receipt?.transactionHash).to.match(/^0x/) + expect(result.current.state.receipt?.gasUsed).to.be.gt(0) + }) }) diff --git a/packages/core/src/hooks/useSendTransaction.ts b/packages/core/src/hooks/useSendTransaction.ts index 33154f67c..e84567e1c 100644 --- a/packages/core/src/hooks/useSendTransaction.ts +++ b/packages/core/src/hooks/useSendTransaction.ts @@ -36,7 +36,7 @@ export function useSendTransaction(options?: TransactionOptions) { if (signer) { const gasLimit = await estimateTransactionGasLimit(transactionRequest, signer, bufferGasLimitPercentage) - await promiseTransaction( + return promiseTransaction( signer.sendTransaction({ ...transactionRequest, gasLimit, From 1c987ba33bf635e0ee3682f6caf07e20f91adef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Tue, 7 Jun 2022 16:53:26 +0200 Subject: [PATCH 35/59] =?UTF-8?q?=F0=9F=90=AD=20Add=20better=20siwe=20acco?= =?UTF-8?q?unt=20holders=20and=20useCallbacks=20for=20functions=20(#813)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add useCallbacks and better session holder * Create siwe-session-improvements.md Co-authored-by: mateusz --- .changeset/siwe-session-improvements.md | 5 +++++ packages/siwe/src/provider.tsx | 28 +++++++++++++++---------- packages/siwe/src/requests.tsx | 6 +++--- 3 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 .changeset/siwe-session-improvements.md diff --git a/.changeset/siwe-session-improvements.md b/.changeset/siwe-session-improvements.md new file mode 100644 index 000000000..aa2c956b7 --- /dev/null +++ b/.changeset/siwe-session-improvements.md @@ -0,0 +1,5 @@ +--- +"@usedapp/siwe": patch +--- + +🐭 Add better siwe account holders and useCallbacks for functions diff --git a/packages/siwe/src/provider.tsx b/packages/siwe/src/provider.tsx index 121facae4..1a5dc090d 100644 --- a/packages/siwe/src/provider.tsx +++ b/packages/siwe/src/provider.tsx @@ -1,5 +1,5 @@ import { useEthers } from '@usedapp/core' -import React, { useEffect, ReactNode, useState } from 'react' +import React, { useEffect, ReactNode, useState, useCallback } from 'react' import { createContext, useContext } from 'react' import { SiweMessage } from 'siwe' import { SiweFetchers, getFetchers } from './requests' @@ -40,14 +40,17 @@ export const SiweProvider = ({ children, backendUrl, api }: SiweProviderProps) = const [authToken, setAuthToken] = useState(undefined) useEffect(() => { - setAuthToken(localStorage.getItem('authToken')) + if (!account || !chainId) { + return + } + setAuthToken(localStorage.getItem('authToken' + account + chainId)) if (authToken === null) { return } - void getAuth().then((res) => (res.loggedIn ? setLoggedIn(true) : undefined)) - }, [authToken, getAuth]) + void getAuth(account, chainId).then((res) => (res.loggedIn ? setLoggedIn(true) : undefined)) + }, [authToken, getAuth, account, chainId]) - const signIn = async (signInOptions?: SignInOptions) => { + const signIn = useCallback(async(signInOptions?: SignInOptions) => { if (!account || !chainId || !library) { return } @@ -71,17 +74,20 @@ export const SiweProvider = ({ children, backendUrl, api }: SiweProviderProps) = const session = JSON.stringify({ signature, message }) - localStorage.setItem('authToken', session) + localStorage.setItem('authToken' + account + chainId, session) setAuthToken(session) - void getAuth().then((res) => (res.loggedIn ? setLoggedIn(true) : undefined)) - } + void getAuth(account, chainId).then((res) => (res.loggedIn ? setLoggedIn(true) : undefined)) + }, [account, chainId, library, getAuth, setAuthToken, getNonce]) - const signOut = async () => { - localStorage.removeItem('authToken') + const signOut = useCallback(async () => { + if (!account || !chainId) { + return + } + localStorage.removeItem('authToken' + account + chainId) setLoggedIn(false) setAuthToken(undefined) - } + }, [setLoggedIn, setAuthToken, account, chainId]) const value = { signIn, diff --git a/packages/siwe/src/requests.tsx b/packages/siwe/src/requests.tsx index 128cf0f94..ca2a25bb3 100644 --- a/packages/siwe/src/requests.tsx +++ b/packages/siwe/src/requests.tsx @@ -12,7 +12,7 @@ export interface AuthResponse { export interface SiweFetchers { getNonce: () => Promise - getAuth: () => Promise + getAuth: (account: string, chainId: number) => Promise } const failedAuthResponse = { @@ -27,8 +27,8 @@ const failedNonceResponse = { export const getFetchers = (backendUrl: string): SiweFetchers => { return { - getAuth: async () => { - const token = localStorage.getItem('authToken') + getAuth: async (account: string, chainId: number) => { + const token = localStorage.getItem('authToken' + account + chainId) if (token === undefined || token === null) { return failedAuthResponse From 71df0c40e113964497637af74f5d5115dc499c44 Mon Sep 17 00:00:00 2001 From: truefi-bot <102036168+truefi-bot@users.noreply.github.com> Date: Tue, 7 Jun 2022 19:51:20 +0200 Subject: [PATCH 36/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#797)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: truefi-bot --- .changeset/add-block-refresher.md | 5 ----- .changeset/add-receipt-for-write-functions.md | 5 ----- .changeset/change-switchNetwork-to-promise.md | 5 ----- .changeset/clean-drinks-visit.md | 7 ------- .changeset/remove-chainId-requests.md | 5 ----- .changeset/siwe-session-improvements.md | 5 ----- packages/coingecko/CHANGELOG.md | 12 ++++++++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 10 ++++++++++ packages/core/package.json | 2 +- packages/siwe/CHANGELOG.md | 13 +++++++++++++ packages/siwe/package.json | 2 +- packages/testing/CHANGELOG.md | 11 +++++++++++ packages/testing/package.json | 2 +- 14 files changed, 50 insertions(+), 36 deletions(-) delete mode 100644 .changeset/add-block-refresher.md delete mode 100644 .changeset/add-receipt-for-write-functions.md delete mode 100644 .changeset/change-switchNetwork-to-promise.md delete mode 100644 .changeset/clean-drinks-visit.md delete mode 100644 .changeset/remove-chainId-requests.md delete mode 100644 .changeset/siwe-session-improvements.md diff --git a/.changeset/add-block-refresher.md b/.changeset/add-block-refresher.md deleted file mode 100644 index 18bf910e5..000000000 --- a/.changeset/add-block-refresher.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -⚑️ Add block refresher diff --git a/.changeset/add-receipt-for-write-functions.md b/.changeset/add-receipt-for-write-functions.md deleted file mode 100644 index 0b090f617..000000000 --- a/.changeset/add-receipt-for-write-functions.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -πŸ˜Άβ€πŸŒ«οΈ Add receipt for executing contract functions and sending transactions diff --git a/.changeset/change-switchNetwork-to-promise.md b/.changeset/change-switchNetwork-to-promise.md deleted file mode 100644 index f9f0a698d..000000000 --- a/.changeset/change-switchNetwork-to-promise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -πŸ•Έ Change swithNetwork to promise diff --git a/.changeset/clean-drinks-visit.md b/.changeset/clean-drinks-visit.md deleted file mode 100644 index 8c5a9bdc8..000000000 --- a/.changeset/clean-drinks-visit.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@usedapp/coingecko': patch -'@usedapp/core': patch -'@usedapp/siwe': patch ---- - -Ethers as peer deps diff --git a/.changeset/remove-chainId-requests.md b/.changeset/remove-chainId-requests.md deleted file mode 100644 index 1c5b5405a..000000000 --- a/.changeset/remove-chainId-requests.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -πŸŽ— Remove chainId requests diff --git a/.changeset/siwe-session-improvements.md b/.changeset/siwe-session-improvements.md deleted file mode 100644 index aa2c956b7..000000000 --- a/.changeset/siwe-session-improvements.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/siwe": patch ---- - -🐭 Add better siwe account holders and useCallbacks for functions diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index ed2545c08..94e7005cc 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,17 @@ # @usedapp/coingecko +## 1.0.8 + +### Patch Changes + +- 3d815ab: Ethers as peer deps +- Updated dependencies [24e9668] +- Updated dependencies [edfd60b] +- Updated dependencies [a3b1340] +- Updated dependencies [3d815ab] +- Updated dependencies [4afd9b5] + - @usedapp/core@1.0.8 + ## 1.0.7 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index 534236910..7c1dd292c 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.7", + "version": "1.0.8", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 71e2b7f35..47337e41e 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,15 @@ # @usedapp/core +## 1.0.8 + +### Patch Changes + +- 24e9668: ⚑️ Add block refresher +- edfd60b: πŸ˜Άβ€πŸŒ«οΈ Add receipt for executing contract functions and sending transactions +- a3b1340: πŸ•Έ Change swithNetwork to promise +- 3d815ab: Ethers as peer deps +- 4afd9b5: πŸŽ— Remove chainId requests + ## 1.0.7 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index ad8ab89a7..522c3fb34 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.7", + "version": "1.0.8", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/siwe/CHANGELOG.md b/packages/siwe/CHANGELOG.md index 60cf9695f..3224b86c3 100644 --- a/packages/siwe/CHANGELOG.md +++ b/packages/siwe/CHANGELOG.md @@ -1,5 +1,18 @@ # @usedapp/siwe +## 0.1.4 + +### Patch Changes + +- 3d815ab: Ethers as peer deps +- 1c987ba: 🐭 Add better siwe account holders and useCallbacks for functions +- Updated dependencies [24e9668] +- Updated dependencies [edfd60b] +- Updated dependencies [a3b1340] +- Updated dependencies [3d815ab] +- Updated dependencies [4afd9b5] + - @usedapp/core@1.0.8 + ## 0.1.3 ### Patch Changes diff --git a/packages/siwe/package.json b/packages/siwe/package.json index 835631392..a56b93696 100644 --- a/packages/siwe/package.json +++ b/packages/siwe/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/siwe", - "version": "0.1.3", + "version": "0.1.4", "repository": "git@github.com:TrueFiEng/useDApp.git", "author": "TrueFiEng", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 69abf714f..f201c69e6 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,16 @@ # @usedapp/testing +## 1.0.8 + +### Patch Changes + +- Updated dependencies [24e9668] +- Updated dependencies [edfd60b] +- Updated dependencies [a3b1340] +- Updated dependencies [3d815ab] +- Updated dependencies [4afd9b5] + - @usedapp/core@1.0.8 + ## 1.0.7 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index 5b5bc98d4..6b078fcaf 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.7", + "version": "1.0.8", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git", From fcb6f41dc1f4ac83c6af737d94e4be80a2765157 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Wed, 8 Jun 2022 11:04:23 +0200 Subject: [PATCH 37/59] =?UTF-8?q?=F0=9F=A6=8A=20Add=20provider=20filtering?= =?UTF-8?q?=20logic=20after=20activate=20browser=20wallet=20(#816)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add provider filtering logic * Add error description * Create only-metamask.md Co-authored-by: mateusz --- .changeset/only-metamask.md | 5 +++++ packages/core/src/helpers/injectedProvider.ts | 17 +++++++++++++++-- .../src/providers/network/network/provider.tsx | 3 ++- 3 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 .changeset/only-metamask.md diff --git a/.changeset/only-metamask.md b/.changeset/only-metamask.md new file mode 100644 index 000000000..556b970a9 --- /dev/null +++ b/.changeset/only-metamask.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +🦊 Add metamask filtering logic after activate browser wallet diff --git a/packages/core/src/helpers/injectedProvider.ts b/packages/core/src/helpers/injectedProvider.ts index b080fc96d..d3defa66c 100644 --- a/packages/core/src/helpers/injectedProvider.ts +++ b/packages/core/src/helpers/injectedProvider.ts @@ -1,9 +1,22 @@ -import { providers } from 'ethers' import detectEthereumProvider from '@metamask/detect-provider' +import { providers } from 'ethers' + +const GET_METAMASK_LINK = 'https://metamask.io/download.html' export async function getInjectedProvider(pollingInterval: number) { - const injectedProvider: any = await detectEthereumProvider() + if (!window.ethereum) { + window.open(GET_METAMASK_LINK) + return undefined + } + + const injectedProviders: any[] = (window?.ethereum as any).providers || [] + const injectedProvider: any = + injectedProviders.find((provider) => { + return provider.isMetaMask ?? false + }) ?? (await detectEthereumProvider()) + if (!injectedProvider) { + window.open(GET_METAMASK_LINK) return undefined } diff --git a/packages/core/src/providers/network/network/provider.tsx b/packages/core/src/providers/network/network/provider.tsx index 6a93a03ef..50989d4a3 100644 --- a/packages/core/src/providers/network/network/provider.tsx +++ b/packages/core/src/providers/network/network/provider.tsx @@ -47,7 +47,8 @@ export function NetworkProvider({ children, providerOverride }: NetworkProviderP if (!injectedProvider) { reportError(new Error('No injected provider available')) setLoading(false) - throw new Error('No injected provider available') + console.error('No injected provider available') // we do not want to crash the app when there is no metamask + return } try { await injectedProvider.send('eth_requestAccounts', []) From c4b8ae032935f791a8fb0ea9c977a43515dc6339 Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Wed, 8 Jun 2022 14:08:49 +0200 Subject: [PATCH 38/59] =?UTF-8?q?=F0=9F=8C=B5=20Add=20error=20code=20to=20?= =?UTF-8?q?transaction=20status=20(#817)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/flat-windows-walk.md | 5 +++++ packages/core/src/hooks/usePromiseTransaction.ts | 7 +++++-- packages/core/src/model/TransactionStatus.ts | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/flat-windows-walk.md diff --git a/.changeset/flat-windows-walk.md b/.changeset/flat-windows-walk.md new file mode 100644 index 000000000..df728bb48 --- /dev/null +++ b/.changeset/flat-windows-walk.md @@ -0,0 +1,5 @@ +--- +'@usedapp/core': patch +--- + +Add error code to transaction status diff --git a/packages/core/src/hooks/usePromiseTransaction.ts b/packages/core/src/hooks/usePromiseTransaction.ts index a74efea58..b290d97df 100644 --- a/packages/core/src/hooks/usePromiseTransaction.ts +++ b/packages/core/src/hooks/usePromiseTransaction.ts @@ -79,6 +79,8 @@ export function usePromiseTransaction(chainId: number | undefined, options?: Tra setState({ receipt, transaction, status: 'Success', chainId }) return receipt } catch (e: any) { + const parsedErrorCode = parseInt(e.error?.data?.code ?? e.error?.code ?? e.data?.code ?? e.code) + const errorCode = isNaN(parsedErrorCode) ? undefined : parsedErrorCode const errorMessage = e.error?.data?.message ?? e.error?.message ?? e.reason ?? e.data?.message ?? e.message if (transaction) { const droppedAndReplaced = isDroppedAndReplaced(e) @@ -105,13 +107,14 @@ export function usePromiseTransaction(chainId: number | undefined, options?: Tra originalTransaction: transaction, receipt: e.receipt, errorMessage, + errorCode, chainId, }) } else { - setState({ status: 'Fail', transaction, receipt: e.receipt, errorMessage, chainId }) + setState({ status: 'Fail', transaction, receipt: e.receipt, errorMessage, errorCode, chainId }) } } else { - setState({ status: 'Exception', errorMessage, chainId }) + setState({ status: 'Exception', errorMessage, errorCode, chainId }) } return undefined } diff --git a/packages/core/src/model/TransactionStatus.ts b/packages/core/src/model/TransactionStatus.ts index 13aa63341..07d8da120 100644 --- a/packages/core/src/model/TransactionStatus.ts +++ b/packages/core/src/model/TransactionStatus.ts @@ -14,6 +14,7 @@ export interface TransactionStatus { receipt?: TransactionReceipt chainId?: number errorMessage?: string + errorCode?: number originalTransaction?: TransactionResponse } From 5877e2d2b1c440b1c1d1fa2d38cf88fa60d39dc1 Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Wed, 8 Jun 2022 15:14:55 +0200 Subject: [PATCH 39/59] =?UTF-8?q?=F0=9F=8F=8E=20Fix=20race=20condition=20b?= =?UTF-8?q?etween=20chain=20id=20and=20provider=20(#812)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/thirty-suits-push.md | 5 +++++ .../src/providers/chainState/multiChainStates/provider.tsx | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/thirty-suits-push.md diff --git a/.changeset/thirty-suits-push.md b/.changeset/thirty-suits-push.md new file mode 100644 index 000000000..9698879e9 --- /dev/null +++ b/.changeset/thirty-suits-push.md @@ -0,0 +1,5 @@ +--- +'@usedapp/core': patch +--- + +Fix race condition between chain id and provider diff --git a/packages/core/src/providers/chainState/multiChainStates/provider.tsx b/packages/core/src/providers/chainState/multiChainStates/provider.tsx index 07a278d86..7360aaf52 100644 --- a/packages/core/src/providers/chainState/multiChainStates/provider.tsx +++ b/packages/core/src/providers/chainState/multiChainStates/provider.tsx @@ -97,7 +97,11 @@ export function MultiChainStateProvider({ children, multicallAddresses }: Props) useEffect(() => { for (const [_chainId, provider] of Object.entries(networks)) { - multicallForChain(Number(_chainId), provider) + const chainId = Number(_chainId) + // chainId is in provider is not the same as the chainId in the state wait for chainId to catch up + if (chainId === provider.network?.chainId || chainId === provider._network?.chainId) { + multicallForChain(chainId, provider) + } } }, [blockNumbers, networks, multicallAddresses, uniqueCallsJSON]) From 8ed7ce64751f0a4a510acf9d297a3faa7131f886 Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Wed, 8 Jun 2022 15:31:41 +0200 Subject: [PATCH 40/59] =?UTF-8?q?=F0=9F=8E=A2=20Updgrade=20pnpm=20to=20v7?= =?UTF-8?q?=20(#820)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 6 +- .github/workflows/deploy.yml | 2 +- .github/workflows/release.yml | 2 +- packages/example/package.json | 9 +- packages/playwright/package.json | 5 +- packages/siwe/src/provider.test.tsx | 10 +- packages/siwe/src/provider.tsx | 61 +- packages/siwe/src/requests.tsx | 4 +- pnpm-lock.yaml | 1518 +++++++++++++++++---------- 9 files changed, 1038 insertions(+), 579 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b92e1f527..e7ce17511 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,7 +17,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node }} - - run: npm i -g pnpm@6.20.3 + - run: npm i -g pnpm@7.1.9 - run: pnpm install --frozen-lockfile --strict-peer-dependencies - run: pnpm run lint - run: pnpm run build @@ -31,7 +31,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: '16.x' - - run: npm i -g pnpm@6.20.3 + - run: npm i -g pnpm@7.1.9 - run: pnpm install --frozen-lockfile --strict-peer-dependencies - name: Build dependencies run: | @@ -60,7 +60,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: '16.x' - - run: npm i -g pnpm@6.20.3 + - run: npm i -g pnpm@7.1.9 - run: pnpm install --frozen-lockfile --strict-peer-dependencies - name: Build dependencies run: | diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c4b48a61c..81130c6bc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: '16.14' - - run: npm i -g pnpm@6.20.3 + - run: npm i -g pnpm@7.1.9 - run: pnpm install --frozen-lockfile - run: pnpm build - name: Deploy usedapp-docs.netlify.app diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bb183f8f1..a4b805559 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: node-version: 16.x - name: Install package manager - run: npm i -g pnpm@6.20.3 + run: npm i -g pnpm@7.1.9 - name: Install Dependencies run: pnpm install --frozen-lockfile diff --git a/packages/example/package.json b/packages/example/package.json index fe74a9993..715692c01 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -13,14 +13,14 @@ "test:playwright": "mocha -r ts-node/register/transpile-only './playwright/**/*.test.ts' --timeout 60000" }, "dependencies": { + "@ethersproject/abi": "5.6.1", + "@ethersproject/contracts": "5.6.0", + "@ethersproject/units": "5.6.0", "@types/styled-components": "^5.1.7", "@usedapp/coingecko": "workspace:*", "@usedapp/core": "workspace:*", "@walletconnect/web3-provider": "^1.7.1", - "@ethersproject/contracts": "5.6.0", "@web3-react/walletconnect-connector": "6.2.4", - "@ethersproject/units": "5.6.0", - "@ethersproject/abi": "5.6.1", "debug": "^4.3.4", "file-loader": "^6.2.0", "framer-motion": "^4.1.5", @@ -33,6 +33,7 @@ "web3modal": "^1.9.5" }, "devDependencies": { + "@ethersproject/providers": "5.6.2", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.4", "@testing-library/react": "^11.0.0", "@typechain/ethers-v5": "^9.0.0", @@ -42,8 +43,8 @@ "@types/node": "^17.0.10", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", + "@types/react-router": "^5.1.18", "@types/react-router-dom": "^5.1.7", - "@ethersproject/providers": "5.6.2", "@usedapp/playwright": "workspace:*", "chai": "^4.2.0", "copy-webpack-plugin": "^6.2.1", diff --git a/packages/playwright/package.json b/packages/playwright/package.json index ba7b46af7..71d89dbf7 100644 --- a/packages/playwright/package.json +++ b/packages/playwright/package.json @@ -17,10 +17,11 @@ }, "devDependencies": { "@types/debug": "^4.1.7", + "@types/node": "^17.0.10", "eslint": "7.19.0", + "playwright": "^1.20.2", "prettier": "^2.0.5", "rimraf": "^3.0.2", - "typescript": "^4.6.2", - "playwright": "^1.20.2" + "typescript": "^4.6.2" } } diff --git a/packages/siwe/src/provider.test.tsx b/packages/siwe/src/provider.test.tsx index 449b988e9..1424b2d92 100644 --- a/packages/siwe/src/provider.test.tsx +++ b/packages/siwe/src/provider.test.tsx @@ -1,12 +1,6 @@ import { AuthResponse, NonceResponse, SiweFetchers } from './requests' import { Config, useEthers } from '@usedapp/core' -import { - setupTestingConfig, - TestingNetwork, - IdentityWrapper, - renderDAppHook, - getWaitUtils, -} from '@usedapp/testing' +import { setupTestingConfig, TestingNetwork, IdentityWrapper, renderDAppHook, getWaitUtils } from '@usedapp/testing' import { SiweProvider, useSiwe } from './provider' import React, { useEffect } from 'react' import { expect } from 'chai' @@ -57,7 +51,7 @@ describe('siwe provider tests', async () => { let address: string before(async () => { - ({ config, network1: network } = await setupTestingConfig()) + ;({ config, network1: network } = await setupTestingConfig()) address = network.provider.getWallets()[0].address global.localStorage = mockLocalStorage as any }) diff --git a/packages/siwe/src/provider.tsx b/packages/siwe/src/provider.tsx index 1a5dc090d..f53349a81 100644 --- a/packages/siwe/src/provider.tsx +++ b/packages/siwe/src/provider.tsx @@ -50,35 +50,38 @@ export const SiweProvider = ({ children, backendUrl, api }: SiweProviderProps) = void getAuth(account, chainId).then((res) => (res.loggedIn ? setLoggedIn(true) : undefined)) }, [authToken, getAuth, account, chainId]) - const signIn = useCallback(async(signInOptions?: SignInOptions) => { - if (!account || !chainId || !library) { - return - } - const signer = library.getSigner() - const { nonce } = await getNonce() - - if (!nonce) { - return - } - - const message = new SiweMessage({ - domain: signInOptions?.domain ?? window.location.host, - address: await signer.getAddress(), - statement: 'Sign in with Ethereum.', - uri: signInOptions?.uri ?? window.location.origin, - version: '1', - chainId, - nonce, - }) - const signature = await signer.signMessage(message.prepareMessage()) - - const session = JSON.stringify({ signature, message }) - - localStorage.setItem('authToken' + account + chainId, session) - setAuthToken(session) - - void getAuth(account, chainId).then((res) => (res.loggedIn ? setLoggedIn(true) : undefined)) - }, [account, chainId, library, getAuth, setAuthToken, getNonce]) + const signIn = useCallback( + async (signInOptions?: SignInOptions) => { + if (!account || !chainId || !library) { + return + } + const signer = library.getSigner() + const { nonce } = await getNonce() + + if (!nonce) { + return + } + + const message = new SiweMessage({ + domain: signInOptions?.domain ?? window.location.host, + address: await signer.getAddress(), + statement: 'Sign in with Ethereum.', + uri: signInOptions?.uri ?? window.location.origin, + version: '1', + chainId, + nonce, + }) + const signature = await signer.signMessage(message.prepareMessage()) + + const session = JSON.stringify({ signature, message }) + + localStorage.setItem('authToken' + account + chainId, session) + setAuthToken(session) + + void getAuth(account, chainId).then((res) => (res.loggedIn ? setLoggedIn(true) : undefined)) + }, + [account, chainId, library, getAuth, setAuthToken, getNonce] + ) const signOut = useCallback(async () => { if (!account || !chainId) { diff --git a/packages/siwe/src/requests.tsx b/packages/siwe/src/requests.tsx index ca2a25bb3..31e6780d3 100644 --- a/packages/siwe/src/requests.tsx +++ b/packages/siwe/src/requests.tsx @@ -17,10 +17,10 @@ export interface SiweFetchers { const failedAuthResponse = { loggedIn: false, - message: undefined + message: undefined, } -const failedNonceResponse = { +const failedNonceResponse = { nonce: undefined, ok: false, } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d3d12b23e..74568ba1e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: 5.3 +lockfileVersion: 5.4 overrides: ethers: 5.6.2 @@ -53,8 +53,8 @@ importers: '@types/isomorphic-fetch': 0.0.36 '@types/mocha': 8.2.3 '@types/react': 17.0.1 - '@typescript-eslint/eslint-plugin': 4.33.0_95407711204725ba8d2ef915af8a79e5 - '@typescript-eslint/parser': 4.33.0_eslint@7.19.0+typescript@4.6.2 + '@typescript-eslint/eslint-plugin': 4.33.0_svahoejai4s3vdjo7ek27ctz4u + '@typescript-eslint/parser': 4.33.0_bpt3vuhlsupxpqo5l4aahunrmm chai: 4.3.6 chai-as-promised: 7.1.1_chai@4.3.6 eslint: 7.19.0 @@ -124,13 +124,13 @@ importers: '@types/mocha': 8.2.3 '@types/node': 17.0.21 '@types/react': 17.0.1 - '@typescript-eslint/eslint-plugin': 4.33.0_95407711204725ba8d2ef915af8a79e5 - '@typescript-eslint/parser': 4.33.0_eslint@7.19.0+typescript@4.6.2 + '@typescript-eslint/eslint-plugin': 4.33.0_svahoejai4s3vdjo7ek27ctz4u + '@typescript-eslint/parser': 4.33.0_bpt3vuhlsupxpqo5l4aahunrmm chai: 4.3.6 chai-as-promised: 7.1.1_chai@4.3.6 eslint: 7.19.0 eslint-plugin-react-hooks: 4.3.0_eslint@7.19.0 - ethereum-waffle: 4.0.0-alpha.0_solc@0.8.12+typescript@4.6.2 + ethereum-waffle: 4.0.0-alpha.0_gzj4ydv7m5mpgbh7clk7xznzjy ethers: 5.6.2 jsdom: 16.7.0 jsdom-global: 3.0.2_jsdom@16.7.0 @@ -186,8 +186,8 @@ importers: wait-for-expect: ^3.0.2 dependencies: '@algolia/client-search': 4.12.2 - '@docusaurus/core': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/preset-classic': 2.0.0-beta.17_881404fbc54bd1a20a9902f0565537a5 + '@docusaurus/core': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/preset-classic': 2.0.0-beta.17_rakaj66fjpi2ecuzalyfmvjxuu '@docusaurus/remark-plugin-npm2yarn': 2.0.0-beta.17 '@ethersproject/contracts': 5.6.0 '@ethersproject/providers': 5.6.2 @@ -211,18 +211,18 @@ importers: react-error-boundary: 3.1.4_react@17.0.2 devDependencies: '@babel/core': 7.17.5 - '@docusaurus/module-type-aliases': 2.0.0-beta.20_react-dom@17.0.2+react@17.0.2 + '@docusaurus/module-type-aliases': 2.0.0-beta.20_sfoxds7t5ydpegc3knd667wn6m '@tsconfig/docusaurus': 1.0.4 '@types/mocha': 8.2.3 '@types/node': 17.0.21 '@types/react': 17.0.40 '@types/webpack': 5.28.0 - '@typescript-eslint/eslint-plugin': 4.33.0_95407711204725ba8d2ef915af8a79e5 - '@typescript-eslint/parser': 4.33.0_eslint@7.19.0+typescript@4.6.2 + '@typescript-eslint/eslint-plugin': 4.33.0_svahoejai4s3vdjo7ek27ctz4u + '@typescript-eslint/parser': 4.33.0_bpt3vuhlsupxpqo5l4aahunrmm '@usedapp/playwright': link:../playwright mocha: 8.4.0 playwright: 1.20.2 - ts-node: 10.7.0_e79e62fe450383fd2d418267dc75e645 + ts-node: 10.7.0_46pgf7sfaob72lkbqjt5y5pgiu typedoc: 0.22.15_typescript@4.6.2 typescript: 4.6.2 wait-for-expect: 3.0.2 @@ -242,6 +242,7 @@ importers: '@types/node': ^17.0.10 '@types/react': ^17.0.0 '@types/react-dom': ^17.0.0 + '@types/react-router': ^5.1.18 '@types/react-router-dom': ^5.1.7 '@types/styled-components': ^5.1.7 '@usedapp/coingecko': workspace:* @@ -290,25 +291,26 @@ importers: '@web3-react/walletconnect-connector': 6.2.4 debug: 4.3.4 file-loader: 6.2.0_webpack@4.46.0 - framer-motion: 4.1.17_react-dom@17.0.2+react@17.0.2 + framer-motion: 4.1.17_sfoxds7t5ydpegc3knd667wn6m react: 17.0.2 react-dom: 17.0.2_react@17.0.2 react-is: 18.0.0 react-router: 5.2.1_react@17.0.2 react-router-dom: 5.3.0_react@17.0.2 - styled-components: 5.3.3_593d83ffa91d3905c79d53314235220d + styled-components: 5.3.3_le6yh75jdu4qlr45kmyuenjcbu web3modal: 1.9.5_react-is@18.0.0 devDependencies: '@ethersproject/providers': 5.6.2 - '@pmmmwh/react-refresh-webpack-plugin': 0.5.4_2fa0d36f70fb0ce5409dce10fc1ff3ae - '@testing-library/react': 11.2.7_react-dom@17.0.2+react@17.0.2 - '@typechain/ethers-v5': 9.0.0_8d7fa4ccdda916073c1de28cb1536173 + '@pmmmwh/react-refresh-webpack-plugin': 0.5.4_f6qng33q7mgokqe5zyipyh7tvy + '@testing-library/react': 11.2.7_sfoxds7t5ydpegc3knd667wn6m + '@typechain/ethers-v5': 9.0.0_ixvmdjrencug4ne2vgafvfmk2q '@types/chai': 4.3.0 '@types/debug': 4.1.7 '@types/mocha': 8.2.3 '@types/node': 17.0.21 '@types/react': 17.0.1 '@types/react-dom': 17.0.13 + '@types/react-router': 5.1.18 '@types/react-router-dom': 5.3.3 '@usedapp/playwright': link:../playwright chai: 4.3.6 @@ -322,15 +324,15 @@ importers: react-refresh: 0.10.0 rimraf: 3.0.2 speed-measure-webpack-plugin: 1.5.0_webpack@4.46.0 - ts-loader: 8.3.0_typescript@4.6.2+webpack@4.46.0 - ts-node: 10.7.0_e79e62fe450383fd2d418267dc75e645 + ts-loader: 8.3.0_7in6qbnjgkqokibdcer35wqugu + ts-node: 10.7.0_46pgf7sfaob72lkbqjt5y5pgiu typechain: 7.0.1_typescript@4.6.2 typescript: 4.6.2 wait-for-expect: 3.0.2 webpack: 4.46.0_webpack-cli@4.9.2 webpack-bundle-analyzer: 4.5.0 - webpack-cli: 4.9.2_27c49171c07fef207546213a9aedd6fd - webpack-dev-server: 3.11.3_webpack-cli@4.9.2+webpack@4.46.0 + webpack-cli: 4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u + webpack-dev-server: 3.11.3_wruvbxbxznejtxbdxokfuvupnq packages/extension: specifiers: @@ -372,13 +374,13 @@ importers: ethers: 5.6.2 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 - styled-components: 5.3.3_react-dom@17.0.2+react@17.0.2 + styled-components: 5.3.3_sfoxds7t5ydpegc3knd667wn6m devDependencies: '@babel/core': 7.17.5 - '@storybook/addon-actions': 6.4.19_197e271930a90d8b2e7cc592a319b2eb - '@storybook/addon-essentials': 6.4.19_ecc23f3233566ce29833169d0f6b9bb9 - '@storybook/addon-links': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/react': 6.4.19_e4f5e22d19a80f897ab9a22097753242 + '@storybook/addon-actions': 6.4.19_df7cogjqvegywlt4ywjkggns5m + '@storybook/addon-essentials': 6.4.19_5tbd6mrtkzwofgbtc2oq6243xe + '@storybook/addon-links': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/react': 6.4.19_4t26elizvahys6vzuiqjo5jsii '@swc-node/register': 1.4.2 '@types/chai': 4.3.0 '@types/chrome': 0.0.136 @@ -386,7 +388,7 @@ importers: '@types/react': 17.0.1 '@types/react-dom': 17.0.13 '@types/styled-components': 5.1.24 - babel-loader: 8.2.3_a58183228c2c7b1a132de84b2b6f9adf + babel-loader: 8.2.3_uwaygiumfr5ruezn5bfsw34234 chai: 4.3.6 copy-webpack-plugin: 6.4.1_webpack@4.46.0 esbuild-loader: 2.18.0_webpack@4.46.0 @@ -395,15 +397,16 @@ importers: prettier: 2.1.2 react-refresh: 0.10.0 rimraf: 3.0.2 - ts-loader: 8.3.0_typescript@4.6.2+webpack@4.46.0 + ts-loader: 8.3.0_7in6qbnjgkqokibdcer35wqugu typescript: 4.6.2 webpack: 4.46.0_webpack-cli@4.9.2 - webpack-cli: 4.9.2_9c6227b1f4ab411ec71902ed1b15f9d5 - webpack-dev-server: 3.11.3_webpack-cli@4.9.2+webpack@4.46.0 + webpack-cli: 4.9.2_trrcpmpuvnar5ryzalwrwfpz2u + webpack-dev-server: 3.11.3_wruvbxbxznejtxbdxokfuvupnq packages/playwright: specifiers: '@types/debug': ^4.1.7 + '@types/node': ^17.0.10 debug: ^4.3.4 eslint: 7.19.0 playwright: ^1.20.2 @@ -414,6 +417,7 @@ importers: debug: 4.3.4 devDependencies: '@types/debug': 4.1.7 + '@types/node': 17.0.21 eslint: 7.19.0 playwright: 1.20.2 prettier: 2.3.0 @@ -447,7 +451,7 @@ importers: siwe: ^1.1.6 typescript: ^4.6.2 dependencies: - siwe: 1.1.6_ethers@5.6.2 + siwe: 1.1.6 devDependencies: '@swc-node/register': 1.4.2 '@testing-library/react-hooks': 5.1.3_react@17.0.2 @@ -457,8 +461,8 @@ importers: '@types/mocha': 8.2.3 '@types/node': 17.0.21 '@types/react': 17.0.1 - '@typescript-eslint/eslint-plugin': 4.33.0_95407711204725ba8d2ef915af8a79e5 - '@typescript-eslint/parser': 4.33.0_eslint@7.19.0+typescript@4.6.2 + '@typescript-eslint/eslint-plugin': 4.33.0_svahoejai4s3vdjo7ek27ctz4u + '@typescript-eslint/parser': 4.33.0_bpt3vuhlsupxpqo5l4aahunrmm '@usedapp/core': link:../core '@usedapp/testing': link:../testing chai: 4.3.6 @@ -506,18 +510,18 @@ importers: '@types/react': 17.0.1 '@types/react-dom': 17.0.1 '@usedapp/core': link:../core - ethereum-waffle: 4.0.0-alpha.0_6bddc23fe2c0b9af3ce0fdadeab54392 + ethereum-waffle: 4.0.0-alpha.0_npo4ep7cyc426pha7ww6vnkdsi ethers: 5.6.2 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 devDependencies: '@ethereum-waffle/provider': 4.0.0-alpha.0 '@swc-node/register': 1.4.2 - '@testing-library/react-hooks': 5.1.3_react-dom@17.0.1+react@17.0.1 + '@testing-library/react-hooks': 5.1.3_w7o5yyljkiidx2s2nzb26ottzu '@types/chai': 4.3.0 '@types/mocha': 8.2.3 - '@typescript-eslint/eslint-plugin': 4.33.0_95407711204725ba8d2ef915af8a79e5 - '@typescript-eslint/parser': 4.33.0_eslint@7.19.0+typescript@4.6.2 + '@typescript-eslint/eslint-plugin': 4.33.0_svahoejai4s3vdjo7ek27ctz4u + '@typescript-eslint/parser': 4.33.0_bpt3vuhlsupxpqo5l4aahunrmm chai: 4.3.6 eslint: 7.19.0 jsdom: 16.7.0 @@ -550,7 +554,7 @@ packages: '@algolia/autocomplete-shared': 1.5.2 dev: false - /@algolia/autocomplete-preset-algolia/1.5.2_14692054139f70b780ac93b62be8ffd8: + /@algolia/autocomplete-preset-algolia/1.5.2_crusavatt5ylpafmso3cx2h73a: resolution: {integrity: sha512-3MRYnYQFJyovANzSX2CToS6/5cfVjbLLqFsZTKcvF3abhQzxbqwwaMBlJtt620uBUOeMzhdfasKhCc40+RHiZw==} peerDependencies: '@algolia/client-search': ^4.9.1 @@ -997,6 +1001,8 @@ packages: resolution: {integrity: sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==} engines: {node: '>=6.0.0'} hasBin: true + dependencies: + '@babel/types': 7.17.0 /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/7.16.7_@babel+core@7.17.5: resolution: {integrity: sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg==} @@ -2268,13 +2274,12 @@ packages: /@discoveryjs/json-ext/0.5.7: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} - dev: true /@docsearch/css/3.0.0: resolution: {integrity: sha512-1kkV7tkAsiuEd0shunYRByKJe3xQDG2q7wYg24SOw1nV9/2lwEd4WrUYRJC/ukGTl2/kHeFxsaUvtiOy0y6fFA==} dev: false - /@docsearch/react/3.0.0_b7370fe379365cb66d103ab107c4222a: + /@docsearch/react/3.0.0_w43q7y3zgzolm3iqhkyqprbcfi: resolution: {integrity: sha512-yhMacqS6TVQYoBh/o603zszIb5Bl8MIXuOc6Vy617I74pirisDzzcNh0NEaYQt50fVVR3khUbeEhUEWEWipESg==} peerDependencies: '@types/react': '>= 16.8.0 < 18.0.0' @@ -2282,7 +2287,7 @@ packages: react-dom: '>= 16.8.0 < 18.0.0' dependencies: '@algolia/autocomplete-core': 1.5.2 - '@algolia/autocomplete-preset-algolia': 1.5.2_14692054139f70b780ac93b62be8ffd8 + '@algolia/autocomplete-preset-algolia': 1.5.2_crusavatt5ylpafmso3cx2h73a '@docsearch/css': 3.0.0 '@types/react': 17.0.40 algoliasearch: 4.12.2 @@ -2292,7 +2297,7 @@ packages: - '@algolia/client-search' dev: false - /@docusaurus/core/2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1: + /@docusaurus/core/2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue: resolution: {integrity: sha512-iNdW7CsmHNOgc4PxD9BFxa+MD8+i7ln7erOBkF3FSMMPnsKUeVqsR3rr31aLmLZRlTXMITSPLxlXwtBZa3KPCw==} engines: {node: '>=14'} hasBin: true @@ -2312,7 +2317,7 @@ packages: '@babel/traverse': 7.17.3 '@docusaurus/cssnano-preset': 2.0.0-beta.17 '@docusaurus/logger': 2.0.0-beta.17 - '@docusaurus/mdx-loader': 2.0.0-beta.17_react-dom@17.0.2+react@17.0.2 + '@docusaurus/mdx-loader': 2.0.0-beta.17_sfoxds7t5ydpegc3knd667wn6m '@docusaurus/react-loadable': 5.5.2_react@17.0.2 '@docusaurus/utils': 2.0.0-beta.17 '@docusaurus/utils-common': 2.0.0-beta.17 @@ -2320,7 +2325,7 @@ packages: '@slorber/static-site-generator-webpack-plugin': 4.0.1 '@svgr/webpack': 6.2.1 autoprefixer: 10.4.2_postcss@8.4.8 - babel-loader: 8.2.3_ed870ac3ba52c4ec230ba2bc3dbb311c + babel-loader: 8.2.3_5wdqvq52klcoyiyluk6d3ozrdq babel-plugin-dynamic-import-node: 2.3.0 boxen: 6.2.1 chokidar: 3.5.3 @@ -2331,7 +2336,7 @@ packages: copy-webpack-plugin: 10.2.4_webpack@5.70.0 core-js: 3.21.1 css-loader: 6.7.1_webpack@5.70.0 - css-minimizer-webpack-plugin: 3.4.1_clean-css@5.2.4+webpack@5.70.0 + css-minimizer-webpack-plugin: 3.4.1_35zgfab327w3ywmceygpdsm34e cssnano: 5.1.1_postcss@8.4.8 del: 6.0.0 detect-port: 1.3.0 @@ -2349,16 +2354,16 @@ packages: mini-css-extract-plugin: 2.6.0_webpack@5.70.0 nprogress: 0.2.0 postcss: 8.4.8 - postcss-loader: 6.2.1_postcss@8.4.8+webpack@5.70.0 + postcss-loader: 6.2.1_ekn6crlz27cphneud6qwcz75tm prompts: 2.4.2 react: 17.0.2 - react-dev-utils: 12.0.0_a9e29ceb10bb184c389afc87c5f7cb16 + react-dev-utils: 12.0.0_vhrjz2yqxmmeyoe27sd4l56lcy react-dom: 17.0.2_react@17.0.2 - react-helmet-async: 1.2.3_react-dom@17.0.2+react@17.0.2 + react-helmet-async: 1.2.3_sfoxds7t5ydpegc3knd667wn6m react-loadable: /@docusaurus/react-loadable/5.5.2_react@17.0.2 - react-loadable-ssr-addon-v5-slorber: 1.0.1_fc6fb9624e95c2b0f71335ab282dbb6a + react-loadable-ssr-addon-v5-slorber: 1.0.1_7rx3sysosxblb5ytgwvsqln3ni react-router: 5.2.1_react@17.0.2 - react-router-config: 5.1.1_react-router@5.2.1+react@17.0.2 + react-router-config: 5.1.1_eui4og74r262zsjriwu2mckbem react-router-dom: 5.3.0_react@17.0.2 remark-admonitions: 1.2.1 rtl-detect: 1.0.4 @@ -2368,7 +2373,7 @@ packages: terser-webpack-plugin: 5.3.1_webpack@5.70.0 tslib: 2.3.1 update-notifier: 5.1.0 - url-loader: 4.1.1_file-loader@6.2.0+webpack@5.70.0 + url-loader: 4.1.1_plzek67nbn24rjxjp577ruq77e wait-on: 6.0.1 webpack: 5.70.0 webpack-bundle-analyzer: 4.5.0 @@ -2407,7 +2412,7 @@ packages: tslib: 2.3.1 dev: false - /@docusaurus/mdx-loader/2.0.0-beta.17_react-dom@17.0.2+react@17.0.2: + /@docusaurus/mdx-loader/2.0.0-beta.17_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-AhJ3GWRmjQYCyINHE595pff5tn3Rt83oGpdev5UT9uvG9lPYPC8nEmh1LI6c0ogfw7YkNznzxWSW4hyyVbYQ3A==} engines: {node: '>=14'} peerDependencies: @@ -2430,7 +2435,7 @@ packages: stringify-object: 3.3.0 tslib: 2.3.1 unist-util-visit: 2.0.3 - url-loader: 4.1.1_file-loader@6.2.0+webpack@5.70.0 + url-loader: 4.1.1_plzek67nbn24rjxjp577ruq77e webpack: 5.70.0 transitivePeerDependencies: - '@swc/core' @@ -2440,7 +2445,7 @@ packages: - webpack-cli dev: false - /@docusaurus/module-type-aliases/2.0.0-beta.17_react-dom@17.0.2+react@17.0.2: + /@docusaurus/module-type-aliases/2.0.0-beta.17_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-Tu+8geC/wyygBudbSwvWIHEvt5RwyA7dEoE1JmPbgQtmqUxOZ9bgnfemwXpJW5mKuDiJASbN4of1DhbLqf4sPg==} peerDependencies: react: '*' @@ -2452,7 +2457,7 @@ packages: '@types/react-router-dom': 5.3.3 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 - react-helmet-async: 1.3.0_react-dom@17.0.2+react@17.0.2 + react-helmet-async: 1.3.0_sfoxds7t5ydpegc3knd667wn6m transitivePeerDependencies: - '@swc/core' - esbuild @@ -2460,19 +2465,19 @@ packages: - webpack-cli dev: false - /@docusaurus/module-type-aliases/2.0.0-beta.20_react-dom@17.0.2+react@17.0.2: + /@docusaurus/module-type-aliases/2.0.0-beta.20_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-lUIXLwQEOyYwcb3iCNibPUL6O9ijvYF5xQwehGeVraTEBts/Ch8ZwELFk+XbaGHKh52PiVxuWL2CP4Gdjy5QKw==} peerDependencies: react: '*' react-dom: '*' dependencies: - '@docusaurus/types': 2.0.0-beta.20_react-dom@17.0.2+react@17.0.2 + '@docusaurus/types': 2.0.0-beta.20_sfoxds7t5ydpegc3knd667wn6m '@types/react': 17.0.40 '@types/react-router-config': 5.0.6 '@types/react-router-dom': 5.3.3 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 - react-helmet-async: 1.2.3_react-dom@17.0.2+react@17.0.2 + react-helmet-async: 1.2.3_sfoxds7t5ydpegc3knd667wn6m transitivePeerDependencies: - '@swc/core' - esbuild @@ -2480,16 +2485,16 @@ packages: - webpack-cli dev: true - /@docusaurus/plugin-content-blog/2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1: + /@docusaurus/plugin-content-blog/2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue: resolution: {integrity: sha512-gcX4UR+WKT4bhF8FICBQHy+ESS9iRMeaglSboTZbA/YHGax/3EuZtcPU3dU4E/HFJeZ866wgUdbLKpIpsZOidg==} engines: {node: '>=14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 + '@docusaurus/core': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue '@docusaurus/logger': 2.0.0-beta.17 - '@docusaurus/mdx-loader': 2.0.0-beta.17_react-dom@17.0.2+react@17.0.2 + '@docusaurus/mdx-loader': 2.0.0-beta.17_sfoxds7t5ydpegc3knd667wn6m '@docusaurus/utils': 2.0.0-beta.17 '@docusaurus/utils-common': 2.0.0-beta.17 '@docusaurus/utils-validation': 2.0.0-beta.17 @@ -2520,16 +2525,16 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-content-docs/2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1: + /@docusaurus/plugin-content-docs/2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue: resolution: {integrity: sha512-YYrBpuRfTfE6NtENrpSHTJ7K7PZifn6j6hcuvdC0QKE+WD8pS+O2/Ws30yoyvHwLnAnfhvaderh1v9Kaa0/ANg==} engines: {node: '>=14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 + '@docusaurus/core': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue '@docusaurus/logger': 2.0.0-beta.17 - '@docusaurus/mdx-loader': 2.0.0-beta.17_react-dom@17.0.2+react@17.0.2 + '@docusaurus/mdx-loader': 2.0.0-beta.17_sfoxds7t5ydpegc3knd667wn6m '@docusaurus/utils': 2.0.0-beta.17 '@docusaurus/utils-validation': 2.0.0-beta.17 combine-promises: 1.1.0 @@ -2559,15 +2564,15 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-content-pages/2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1: + /@docusaurus/plugin-content-pages/2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue: resolution: {integrity: sha512-d5x0mXTMJ44ojRQccmLyshYoamFOep2AnBe69osCDnwWMbD3Or3pnc2KMK9N7mVpQFnNFKbHNCLrX3Rv0uwEHA==} engines: {node: '>=14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/mdx-loader': 2.0.0-beta.17_react-dom@17.0.2+react@17.0.2 + '@docusaurus/core': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/mdx-loader': 2.0.0-beta.17_sfoxds7t5ydpegc3knd667wn6m '@docusaurus/utils': 2.0.0-beta.17 '@docusaurus/utils-validation': 2.0.0-beta.17 fs-extra: 10.0.1 @@ -2592,19 +2597,19 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-debug/2.0.0-beta.17_3d8b3ea0605de7369d8e09d7eef386ac: + /@docusaurus/plugin-debug/2.0.0-beta.17_hwft5idalxttnhmobhl6544gvq: resolution: {integrity: sha512-p26fjYFRSC0esEmKo/kRrLVwXoFnzPCFDumwrImhPyqfVxbj+IKFaiXkayb2qHnyEGE/1KSDIgRF4CHt/pyhiw==} engines: {node: '>=14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 + '@docusaurus/core': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue '@docusaurus/utils': 2.0.0-beta.17 fs-extra: 10.0.1 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 - react-json-view: 1.21.3_f456dfc349ace84b0ea11d9e6e4ef3ab + react-json-view: 1.21.3_6rln7q2jvtuewdvbdwpg4txtvm tslib: 2.3.1 transitivePeerDependencies: - '@parcel/css' @@ -2624,14 +2629,14 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-google-analytics/2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1: + /@docusaurus/plugin-google-analytics/2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue: resolution: {integrity: sha512-jvgYIhggYD1W2jymqQVAAyjPJUV1xMCn70bAzaCMxriureMWzhQ/kQMVQpop0ijTMvifOxaV9yTcL1VRXev++A==} engines: {node: '>=14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 + '@docusaurus/core': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue '@docusaurus/utils-validation': 2.0.0-beta.17 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 @@ -2652,14 +2657,14 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-google-gtag/2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1: + /@docusaurus/plugin-google-gtag/2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue: resolution: {integrity: sha512-1pnWHtIk1Jfeqwvr8PlcPE5SODWT1gW4TI+ptmJbJ296FjjyvL/pG0AcGEJmYLY/OQc3oz0VQ0W2ognw9jmFIw==} engines: {node: '>=14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 + '@docusaurus/core': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue '@docusaurus/utils-validation': 2.0.0-beta.17 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 @@ -2680,14 +2685,14 @@ packages: - webpack-cli dev: false - /@docusaurus/plugin-sitemap/2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1: + /@docusaurus/plugin-sitemap/2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue: resolution: {integrity: sha512-19/PaGCsap6cjUPZPGs87yV9e1hAIyd0CTSeVV6Caega8nmOKk20FTrQGFJjZPeX8jvD9QIXcdg6BJnPxcKkaQ==} engines: {node: '>=14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 + '@docusaurus/core': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue '@docusaurus/utils': 2.0.0-beta.17 '@docusaurus/utils-common': 2.0.0-beta.17 '@docusaurus/utils-validation': 2.0.0-beta.17 @@ -2712,24 +2717,24 @@ packages: - webpack-cli dev: false - /@docusaurus/preset-classic/2.0.0-beta.17_881404fbc54bd1a20a9902f0565537a5: + /@docusaurus/preset-classic/2.0.0-beta.17_rakaj66fjpi2ecuzalyfmvjxuu: resolution: {integrity: sha512-7YUxPEgM09aZWr25/hpDEp1gPl+1KsCPV1ZTRW43sbQ9TinPm+9AKR3rHVDa8ea8MdiS7BpqCVyK+H/eiyQrUw==} engines: {node: '>=14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/plugin-content-blog': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/plugin-content-docs': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/plugin-content-pages': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/plugin-debug': 2.0.0-beta.17_3d8b3ea0605de7369d8e09d7eef386ac - '@docusaurus/plugin-google-analytics': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/plugin-google-gtag': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/plugin-sitemap': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/theme-classic': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/theme-common': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/theme-search-algolia': 2.0.0-beta.17_881404fbc54bd1a20a9902f0565537a5 + '@docusaurus/core': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/plugin-content-blog': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/plugin-content-docs': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/plugin-content-pages': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/plugin-debug': 2.0.0-beta.17_hwft5idalxttnhmobhl6544gvq + '@docusaurus/plugin-google-analytics': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/plugin-google-gtag': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/plugin-sitemap': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/theme-classic': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/theme-common': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/theme-search-algolia': 2.0.0-beta.17_rakaj66fjpi2ecuzalyfmvjxuu react: 17.0.2 react-dom: 17.0.2_react@17.0.2 transitivePeerDependencies: @@ -2770,18 +2775,18 @@ packages: unist-util-visit: 2.0.3 dev: false - /@docusaurus/theme-classic/2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1: + /@docusaurus/theme-classic/2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue: resolution: {integrity: sha512-xfZ9kpgqo0lP9YO4rJj79wtiQJXU6ARo5wYy10IIwiWN+lg00scJHhkmNV431b05xIUjUr0cKeH9nqZmEsQRKg==} engines: {node: '>=14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/core': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/plugin-content-blog': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/plugin-content-docs': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/plugin-content-pages': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/theme-common': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 + '@docusaurus/core': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/plugin-content-blog': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/plugin-content-docs': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/plugin-content-pages': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/theme-common': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue '@docusaurus/theme-translations': 2.0.0-beta.17 '@docusaurus/utils': 2.0.0-beta.17 '@docusaurus/utils-common': 2.0.0-beta.17 @@ -2814,17 +2819,17 @@ packages: - webpack-cli dev: false - /@docusaurus/theme-common/2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1: + /@docusaurus/theme-common/2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue: resolution: {integrity: sha512-LJBDhx+Qexn1JHBqZbE4k+7lBaV1LgpE33enXf43ShB7ebhC91d5HLHhBwgt0pih4+elZU4rG+BG/roAmsNM0g==} engines: {node: '>=14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docusaurus/module-type-aliases': 2.0.0-beta.17_react-dom@17.0.2+react@17.0.2 - '@docusaurus/plugin-content-blog': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/plugin-content-docs': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 - '@docusaurus/plugin-content-pages': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 + '@docusaurus/module-type-aliases': 2.0.0-beta.17_sfoxds7t5ydpegc3knd667wn6m + '@docusaurus/plugin-content-blog': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/plugin-content-docs': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue + '@docusaurus/plugin-content-pages': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue clsx: 1.1.1 parse-numeric-range: 1.3.0 prism-react-renderer: 1.3.1_react@17.0.2 @@ -2848,17 +2853,17 @@ packages: - webpack-cli dev: false - /@docusaurus/theme-search-algolia/2.0.0-beta.17_881404fbc54bd1a20a9902f0565537a5: + /@docusaurus/theme-search-algolia/2.0.0-beta.17_rakaj66fjpi2ecuzalyfmvjxuu: resolution: {integrity: sha512-W12XKM7QC5Jmrec359bJ7aDp5U8DNkCxjVKsMNIs8rDunBoI/N+R35ERJ0N7Bg9ONAWO6o7VkUERQsfGqdvr9w==} engines: {node: '>=14'} peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 dependencies: - '@docsearch/react': 3.0.0_b7370fe379365cb66d103ab107c4222a - '@docusaurus/core': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 + '@docsearch/react': 3.0.0_w43q7y3zgzolm3iqhkyqprbcfi + '@docusaurus/core': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue '@docusaurus/logger': 2.0.0-beta.17 - '@docusaurus/theme-common': 2.0.0-beta.17_72930604384df1a714c28d463cf7f2a1 + '@docusaurus/theme-common': 2.0.0-beta.17_okjqmbbyjxy2ofgcrvddz57sue '@docusaurus/theme-translations': 2.0.0-beta.17 '@docusaurus/utils': 2.0.0-beta.17 '@docusaurus/utils-validation': 2.0.0-beta.17 @@ -2914,13 +2919,13 @@ packages: - webpack-cli dev: false - /@docusaurus/types/2.0.0-beta.20_react-dom@17.0.2+react@17.0.2: + /@docusaurus/types/2.0.0-beta.20_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-d4ZIpcrzGsUUcZJL3iz8/iSaewobPPiYfn2Lmmv7GTT5ZPtPkOAtR5mE6+LAf/KpjjgqrC7mpwDKADnOL/ic4Q==} dependencies: commander: 5.1.0 history: 4.10.1 joi: 17.6.0 - react-helmet-async: 1.3.0_react-dom@17.0.2+react@17.0.2 + react-helmet-async: 1.3.0_sfoxds7t5ydpegc3knd667wn6m utility-types: 3.10.0 webpack: 5.72.1 webpack-merge: 5.8.0 @@ -2973,7 +2978,7 @@ packages: resolve-pathname: 3.0.0 shelljs: 0.8.5 tslib: 2.3.1 - url-loader: 4.1.1_file-loader@6.2.0+webpack@5.70.0 + url-loader: 4.1.1_plzek67nbn24rjxjp577ruq77e webpack: 5.70.0 transitivePeerDependencies: - '@swc/core' @@ -3040,7 +3045,7 @@ packages: resolution: {integrity: sha512-zM9PFmgVSqBw4zL101Q0HrBVTGmpAxFZH/pYx/cjJT5advXguvcgjHFTCaIO3enL/xr89vK2bh0Mfyj9aa0ANA==} dev: true - /@emotion/styled-base/10.3.0_316248eb6686a2fd4fbadcfd00de37f3: + /@emotion/styled-base/10.3.0_gfrer23gq2rp2t523t6qbxrx6m: resolution: {integrity: sha512-PBRqsVKR7QRNkmfH78hTSSwHWcwDpecH9W6heujWAcyp2wdz/64PP73s7fWS1dIPm8/Exc8JAzYS8dEWXjv60w==} peerDependencies: '@emotion/core': ^10.0.28 @@ -3054,14 +3059,14 @@ packages: react: 17.0.2 dev: true - /@emotion/styled/10.3.0_316248eb6686a2fd4fbadcfd00de37f3: + /@emotion/styled/10.3.0_gfrer23gq2rp2t523t6qbxrx6m: resolution: {integrity: sha512-GgcUpXBBEU5ido+/p/mCT2/Xx+Oqmp9JzQRuC+a4lYM4i4LBBn/dWvc0rQ19N9ObA8/T4NWMrPNe79kMBDJqoQ==} peerDependencies: '@emotion/core': ^10.0.27 react: '>=16.3.0' dependencies: '@emotion/core': 10.3.1_react@17.0.2 - '@emotion/styled-base': 10.3.0_316248eb6686a2fd4fbadcfd00de37f3 + '@emotion/styled-base': 10.3.0_gfrer23gq2rp2t523t6qbxrx6m babel-plugin-emotion: 10.2.2 react: 17.0.2 dev: true @@ -3119,9 +3124,10 @@ packages: ethers: 5.6.2 transitivePeerDependencies: - bufferutil + - supports-color - utf-8-validate - /@ethereum-waffle/compiler/4.0.0-alpha.0_256cf69a3c5e8c20d955f1f7b5311c9a: + /@ethereum-waffle/compiler/4.0.0-alpha.0_evwpngr4l2gcbwkv6h33kmi4ti: resolution: {integrity: sha512-FGnU3eWVODjKncEXJHbaqfnP4GLKEpqlvQ7W3yRE4ovmSWCRjNAjTeeKwFW7zZlDwG8WIRFVvSWlySKeuWc8MQ==} engines: {node: '>=10.0'} peerDependencies: @@ -3131,7 +3137,7 @@ packages: dependencies: '@resolver-engine/imports': 0.3.3 '@resolver-engine/imports-fs': 0.3.3 - '@typechain/ethers-v5': 9.0.0_256cf69a3c5e8c20d955f1f7b5311c9a + '@typechain/ethers-v5': 9.0.0_evwpngr4l2gcbwkv6h33kmi4ti '@types/mkdirp': 0.5.2 '@types/node-fetch': 2.6.1 ethers: 5.6.2 @@ -3143,10 +3149,11 @@ packages: - '@ethersproject/bytes' - '@ethersproject/providers' - encoding + - supports-color - typescript dev: false - /@ethereum-waffle/compiler/4.0.0-alpha.0_5d9f16c28e51f28c6b558e793d1166d1: + /@ethereum-waffle/compiler/4.0.0-alpha.0_lwprnquokhziy22vrz4t2elg2e: resolution: {integrity: sha512-FGnU3eWVODjKncEXJHbaqfnP4GLKEpqlvQ7W3yRE4ovmSWCRjNAjTeeKwFW7zZlDwG8WIRFVvSWlySKeuWc8MQ==} engines: {node: '>=10.0'} peerDependencies: @@ -3156,7 +3163,7 @@ packages: dependencies: '@resolver-engine/imports': 0.3.3 '@resolver-engine/imports-fs': 0.3.3 - '@typechain/ethers-v5': 9.0.0_65ac1934a17b69618ed69019e39a382e + '@typechain/ethers-v5': 9.0.0_mwwbsnfbpnuwddwwsam6hgryfy '@types/mkdirp': 0.5.2 '@types/node-fetch': 2.6.1 ethers: 5.6.2 @@ -3169,6 +3176,7 @@ packages: - '@ethersproject/bytes' - '@ethersproject/providers' - encoding + - supports-color - typescript dev: true @@ -3204,6 +3212,7 @@ packages: postinstall-postinstall: 2.1.0 transitivePeerDependencies: - bufferutil + - supports-color - utf-8-validate /@ethersproject/abi/5.0.0-beta.153: @@ -3826,7 +3835,7 @@ packages: rimraf: 3.0.2 dev: true - /@pmmmwh/react-refresh-webpack-plugin/0.5.4_2fa0d36f70fb0ce5409dce10fc1ff3ae: + /@pmmmwh/react-refresh-webpack-plugin/0.5.4_f6qng33q7mgokqe5zyipyh7tvy: resolution: {integrity: sha512-zZbZeHQDnoTlt2AF+diQT0wsSXpvWiaIOZwBRdltNFhG1+I3ozyaw7U/nBiUwyJ0D+zwdXp0E3bWOl38Ag2BMw==} engines: {node: '>= 10.13'} peerDependencies: @@ -3863,10 +3872,10 @@ packages: schema-utils: 3.1.1 source-map: 0.7.3 webpack: 4.46.0_webpack-cli@4.9.2 - webpack-dev-server: 3.11.3_webpack-cli@4.9.2+webpack@4.46.0 + webpack-dev-server: 3.11.3_wruvbxbxznejtxbdxokfuvupnq dev: true - /@pmmmwh/react-refresh-webpack-plugin/0.5.4_bba734de70ee13bc43bd5c4a13e07a03: + /@pmmmwh/react-refresh-webpack-plugin/0.5.4_xottjxtq5yj3yq55lrfbhyd2am: resolution: {integrity: sha512-zZbZeHQDnoTlt2AF+diQT0wsSXpvWiaIOZwBRdltNFhG1+I3ozyaw7U/nBiUwyJ0D+zwdXp0E3bWOl38Ag2BMw==} engines: {node: '>= 10.13'} peerDependencies: @@ -3903,7 +3912,7 @@ packages: schema-utils: 3.1.1 source-map: 0.7.3 webpack: 4.46.0_webpack-cli@4.9.2 - webpack-dev-server: 3.11.3_webpack-cli@4.9.2+webpack@4.46.0 + webpack-dev-server: 3.11.3_wruvbxbxznejtxbdxokfuvupnq dev: true /@polka/url/1.0.0-next.21: @@ -3919,12 +3928,16 @@ packages: debug: 3.2.7 is-url: 1.2.4 request: 2.88.2 + transitivePeerDependencies: + - supports-color /@resolver-engine/fs/0.3.3: resolution: {integrity: sha512-wQ9RhPUcny02Wm0IuJwYMyAG8fXVeKdmhm8xizNByD4ryZlx6PP6kRen+t/haF43cMfmaV7T3Cx6ChOdHEhFUQ==} dependencies: '@resolver-engine/core': 0.3.3 debug: 3.2.7 + transitivePeerDependencies: + - supports-color /@resolver-engine/imports-fs/0.3.3: resolution: {integrity: sha512-7Pjg/ZAZtxpeyCFlZR5zqYkz+Wdo84ugB5LApwriT8XFeQoLwGUj4tZFFvvCuxaNCcqZzCYbonJgmGObYBzyCA==} @@ -3932,6 +3945,8 @@ packages: '@resolver-engine/fs': 0.3.3 '@resolver-engine/imports': 0.3.3 debug: 3.2.7 + transitivePeerDependencies: + - supports-color /@resolver-engine/imports/0.3.3: resolution: {integrity: sha512-anHpS4wN4sRMwsAbMXhMfOD/y4a4Oo0Cw/5+rue7hSwGWsDOQaAU1ClK1OxjUC35/peazxEl8JaSRRS+Xb8t3Q==} @@ -3941,6 +3956,8 @@ packages: hosted-git-info: 2.8.8 path-browserify: 1.0.1 url: 0.11.0 + transitivePeerDependencies: + - supports-color /@sideway/address/4.1.3: resolution: {integrity: sha512-8ncEUtmnTsMmL7z1YPB47kPUq7LpKWJNFPsRzHiIajGC5uXlWGn+AmkYPcHNl8S4tcEGx+cnORnNYaw2wvL+LQ==} @@ -4003,7 +4020,7 @@ packages: resolution: {integrity: sha512-WfqfX/eXGiAd3RJe4VU2snh/ZPwtSjLG4ynQ/vYzvghTh7dHFcI1wl+nrkWG6lGhukOxOsUHfv8dUXr58D0ayg==} dev: false - /@storybook/addon-actions/6.4.19_197e271930a90d8b2e7cc592a319b2eb: + /@storybook/addon-actions/6.4.19_df7cogjqvegywlt4ywjkggns5m: resolution: {integrity: sha512-GpSvP8xV8GfNkmtGJjfCgaOx6mbjtyTK0aT9FqX9pU0s+KVMmoCTrBh43b7dWrwxxas01yleBK9VpYggzhi/Fw==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4014,12 +4031,12 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/components': 6.4.19_197e271930a90d8b2e7cc592a319b2eb + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/components': 6.4.19_df7cogjqvegywlt4ywjkggns5m '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m core-js: 3.21.1 fast-deep-equal: 3.1.3 global: 4.4.0 @@ -4038,7 +4055,7 @@ packages: - '@types/react' dev: true - /@storybook/addon-backgrounds/6.4.19_197e271930a90d8b2e7cc592a319b2eb: + /@storybook/addon-backgrounds/6.4.19_df7cogjqvegywlt4ywjkggns5m: resolution: {integrity: sha512-yn8MTE7lctO48Rdw+DmmA1wKdf5eyAbA/vrug5ske/U2WPgGc65sApzwT8BItZfuyAMjuT5RnCWwd7o6hGRgGQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4049,13 +4066,13 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/client-logger': 6.4.19 - '@storybook/components': 6.4.19_197e271930a90d8b2e7cc592a319b2eb + '@storybook/components': 6.4.19_df7cogjqvegywlt4ywjkggns5m '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m core-js: 3.21.1 global: 4.4.0 memoizerific: 1.11.3 @@ -4068,7 +4085,7 @@ packages: - '@types/react' dev: true - /@storybook/addon-controls/6.4.19_493d4a0608ccc69483fe2fb362b8d57a: + /@storybook/addon-controls/6.4.19_je6uubqiztdjja76f6zwfogvpi: resolution: {integrity: sha512-JHi5z9i6NsgQLfG5WOeQE1AyOrM+QJLrjT+uOYx40bq+OC1yWHH7qHiphPP8kjJJhCZlaQk1qqXYkkQXgaeHSw==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4079,15 +4096,15 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/client-logger': 6.4.19 - '@storybook/components': 6.4.19_197e271930a90d8b2e7cc592a319b2eb - '@storybook/core-common': 6.4.19_90195ed1d00fcc07efbb0f55a9003b7b + '@storybook/components': 6.4.19_df7cogjqvegywlt4ywjkggns5m + '@storybook/core-common': 6.4.19_samv5uoqb7gap353b5k2sab3pm '@storybook/csf': 0.0.2--canary.87bc651.0 '@storybook/node-logger': 6.4.19 - '@storybook/store': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m core-js: 3.21.1 lodash: 4.17.21 react: 17.0.2 @@ -4103,7 +4120,7 @@ packages: - webpack-command dev: true - /@storybook/addon-docs/6.4.19_744b9e8fd729fb70d7e0fd7b6223a445: + /@storybook/addon-docs/6.4.19_orfz5d6xfh5xbv7a7v5wei5eiu: resolution: {integrity: sha512-OEPyx/5ZXmZOPqIAWoPjlIP8Q/YfNjAmBosA8tmA8t5KCSiq/vpLcAvQhxqK6n0wk/B8Xp67Z8RpLfXjU8R3tw==} peerDependencies: '@storybook/angular': 6.4.19 @@ -4159,22 +4176,22 @@ packages: '@mdx-js/loader': 1.6.22_react@17.0.2 '@mdx-js/mdx': 1.6.22 '@mdx-js/react': 1.6.22_react@17.0.2 - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/builder-webpack4': 6.4.19_493d4a0608ccc69483fe2fb362b8d57a + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/builder-webpack4': 6.4.19_je6uubqiztdjja76f6zwfogvpi '@storybook/client-logger': 6.4.19 - '@storybook/components': 6.4.19_197e271930a90d8b2e7cc592a319b2eb - '@storybook/core': 6.4.19_01848b22432636b4107861e00a83acaa + '@storybook/components': 6.4.19_df7cogjqvegywlt4ywjkggns5m + '@storybook/core': 6.4.19_agciwisdey3liedymhqava5mvi '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 '@storybook/csf-tools': 6.4.19 '@storybook/node-logger': 6.4.19 '@storybook/postinstall': 6.4.19 - '@storybook/preview-web': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/react': 6.4.19_e4f5e22d19a80f897ab9a22097753242 - '@storybook/source-loader': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/store': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/preview-web': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/react': 6.4.19_4t26elizvahys6vzuiqjo5jsii + '@storybook/source-loader': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m acorn: 7.4.1 acorn-jsx: 5.3.2_acorn@7.4.1 acorn-walk: 7.2.0 @@ -4193,7 +4210,7 @@ packages: prop-types: 15.8.1 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 - react-element-to-jsx-string: 14.3.4_react-dom@17.0.2+react@17.0.2 + react-element-to-jsx-string: 14.3.4_sfoxds7t5ydpegc3knd667wn6m regenerator-runtime: 0.13.7 remark-external-links: 8.0.0 remark-slug: 6.1.0 @@ -4204,6 +4221,7 @@ packages: - '@storybook/builder-webpack5' - '@storybook/manager-webpack5' - '@types/react' + - bluebird - bufferutil - encoding - eslint @@ -4215,7 +4233,7 @@ packages: - webpack-command dev: true - /@storybook/addon-essentials/6.4.19_ecc23f3233566ce29833169d0f6b9bb9: + /@storybook/addon-essentials/6.4.19_5tbd6mrtkzwofgbtc2oq6243xe: resolution: {integrity: sha512-vbV8sjepMVEuwhTDBHjO3E6vXluG7RiEeozV1QVuS9lGhjQdvUPdZ9rDNUcP6WHhTdEkS/ffTMaGIy1v8oZd7g==} peerDependencies: '@babel/core': ^7.9.6 @@ -4241,18 +4259,18 @@ packages: optional: true dependencies: '@babel/core': 7.17.5 - '@storybook/addon-actions': 6.4.19_197e271930a90d8b2e7cc592a319b2eb - '@storybook/addon-backgrounds': 6.4.19_197e271930a90d8b2e7cc592a319b2eb - '@storybook/addon-controls': 6.4.19_493d4a0608ccc69483fe2fb362b8d57a - '@storybook/addon-docs': 6.4.19_744b9e8fd729fb70d7e0fd7b6223a445 - '@storybook/addon-measure': 6.4.19_197e271930a90d8b2e7cc592a319b2eb - '@storybook/addon-outline': 6.4.19_197e271930a90d8b2e7cc592a319b2eb - '@storybook/addon-toolbars': 6.4.19_197e271930a90d8b2e7cc592a319b2eb - '@storybook/addon-viewport': 6.4.19_197e271930a90d8b2e7cc592a319b2eb - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addon-actions': 6.4.19_df7cogjqvegywlt4ywjkggns5m + '@storybook/addon-backgrounds': 6.4.19_df7cogjqvegywlt4ywjkggns5m + '@storybook/addon-controls': 6.4.19_je6uubqiztdjja76f6zwfogvpi + '@storybook/addon-docs': 6.4.19_orfz5d6xfh5xbv7a7v5wei5eiu + '@storybook/addon-measure': 6.4.19_df7cogjqvegywlt4ywjkggns5m + '@storybook/addon-outline': 6.4.19_df7cogjqvegywlt4ywjkggns5m + '@storybook/addon-toolbars': 6.4.19_df7cogjqvegywlt4ywjkggns5m + '@storybook/addon-viewport': 6.4.19_df7cogjqvegywlt4ywjkggns5m + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/node-logger': 6.4.19 - babel-loader: 8.2.3_a58183228c2c7b1a132de84b2b6f9adf + babel-loader: 8.2.3_uwaygiumfr5ruezn5bfsw34234 core-js: 3.21.1 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 @@ -4267,6 +4285,7 @@ packages: - '@storybook/react' - '@storybook/vue3' - '@types/react' + - bluebird - bufferutil - encoding - eslint @@ -4282,7 +4301,7 @@ packages: - webpack-command dev: true - /@storybook/addon-links/6.4.19_react-dom@17.0.2+react@17.0.2: + /@storybook/addon-links/6.4.19_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-ebFHYlGDQkHSmI5QEJb1NxGNToVOLgjKkxXUe+JXX7AfHvrWiXVrN/57aOtBPZzj4h2jRPRTZgwR5glhPIlfEQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4293,11 +4312,11 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/client-logger': 6.4.19 '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 - '@storybook/router': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/router': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@types/qs': 6.9.7 core-js: 3.21.1 global: 4.4.0 @@ -4309,7 +4328,7 @@ packages: ts-dedent: 2.2.0 dev: true - /@storybook/addon-measure/6.4.19_197e271930a90d8b2e7cc592a319b2eb: + /@storybook/addon-measure/6.4.19_df7cogjqvegywlt4ywjkggns5m: resolution: {integrity: sha512-PXeU0AlpnGEvnzBQ6snkzmlIpwE0ci8LdFtL1Vz1V1Xk5fbuETWYuEkPuk1oZ7L9igB9cfT32SyJlE5MC1iaGg==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4320,10 +4339,10 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/client-logger': 6.4.19 - '@storybook/components': 6.4.19_197e271930a90d8b2e7cc592a319b2eb + '@storybook/components': 6.4.19_df7cogjqvegywlt4ywjkggns5m '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 core-js: 3.21.1 @@ -4334,7 +4353,7 @@ packages: - '@types/react' dev: true - /@storybook/addon-outline/6.4.19_197e271930a90d8b2e7cc592a319b2eb: + /@storybook/addon-outline/6.4.19_df7cogjqvegywlt4ywjkggns5m: resolution: {integrity: sha512-7ZDXo8qrms6dx0KRP9PInXIie82h5g9XCNrGOUdfZkQPvgofJVj0kNv6p+WOiGiaVfKPC5KMgIofqzBTFV+k6Q==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4345,10 +4364,10 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/client-logger': 6.4.19 - '@storybook/components': 6.4.19_197e271930a90d8b2e7cc592a319b2eb + '@storybook/components': 6.4.19_df7cogjqvegywlt4ywjkggns5m '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 core-js: 3.21.1 @@ -4361,7 +4380,7 @@ packages: - '@types/react' dev: true - /@storybook/addon-toolbars/6.4.19_197e271930a90d8b2e7cc592a319b2eb: + /@storybook/addon-toolbars/6.4.19_df7cogjqvegywlt4ywjkggns5m: resolution: {integrity: sha512-2UtuX9yB1rD/CAZv1etnOnunfPTvsEKEg/J2HYMKE1lhenWC5muIUXvDXCXvwDC65WviPJ56nFNKaKK1Zz7JDg==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4372,10 +4391,10 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/components': 6.4.19_197e271930a90d8b2e7cc592a319b2eb - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/components': 6.4.19_df7cogjqvegywlt4ywjkggns5m + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m core-js: 3.21.1 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 @@ -4384,7 +4403,7 @@ packages: - '@types/react' dev: true - /@storybook/addon-viewport/6.4.19_197e271930a90d8b2e7cc592a319b2eb: + /@storybook/addon-viewport/6.4.19_df7cogjqvegywlt4ywjkggns5m: resolution: {integrity: sha512-T1hdImxbLj8suQSTbp6HSA1LLHOlqaNK5jjnqzEOoAxY0O8LNPXMJ2jKIeT2fPQ0v+tWGU3tbwf+3xFq0parVQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4395,12 +4414,12 @@ packages: react-dom: optional: true dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/client-logger': 6.4.19 - '@storybook/components': 6.4.19_197e271930a90d8b2e7cc592a319b2eb + '@storybook/components': 6.4.19_df7cogjqvegywlt4ywjkggns5m '@storybook/core-events': 6.4.19 - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m core-js: 3.21.1 global: 4.4.0 memoizerific: 1.11.3 @@ -4412,19 +4431,19 @@ packages: - '@types/react' dev: true - /@storybook/addons/6.4.19_react-dom@17.0.2+react@17.0.2: + /@storybook/addons/6.4.19_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-QNyRYhpqmHV8oJxxTBdkRlLSbDFhpBvfvMfIrIT1UXb/eemdBZTaCGVvXZ9UixoEEI7f8VwAQ44IvkU5B1509w==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/channels': 6.4.19 '@storybook/client-logger': 6.4.19 '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 - '@storybook/router': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/router': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@types/webpack-env': 1.16.3 core-js: 3.21.1 global: 4.4.0 @@ -4433,7 +4452,7 @@ packages: regenerator-runtime: 0.13.7 dev: true - /@storybook/api/6.4.19_react-dom@17.0.2+react@17.0.2: + /@storybook/api/6.4.19_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-aDvea+NpQCBjpNp9YidO1Pr7fzzCp15FSdkG+2ihGQfv5raxrN+IIJnGUXecpe71nvlYiB+29UXBVK7AL0j51Q==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4443,9 +4462,9 @@ packages: '@storybook/client-logger': 6.4.19 '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 - '@storybook/router': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/router': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/semver': 7.3.2 - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m core-js: 3.21.1 fast-deep-equal: 3.1.3 global: 4.4.0 @@ -4460,7 +4479,7 @@ packages: util-deprecate: 1.0.2 dev: true - /@storybook/builder-webpack4/6.4.19_493d4a0608ccc69483fe2fb362b8d57a: + /@storybook/builder-webpack4/6.4.19_je6uubqiztdjja76f6zwfogvpi: resolution: {integrity: sha512-wxA6SMH11duc9D53aeVVBwrVRemFIoxHp/dOugkkg6ZZFAb4ZmWzf/ENc3vQIZdZpfNRi7IZIZEOfoHc994cmw==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4491,26 +4510,26 @@ packages: '@babel/preset-env': 7.16.11_@babel+core@7.17.5 '@babel/preset-react': 7.16.7_@babel+core@7.17.5 '@babel/preset-typescript': 7.16.7_@babel+core@7.17.5 - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/channel-postmessage': 6.4.19 '@storybook/channels': 6.4.19 - '@storybook/client-api': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/client-api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/client-logger': 6.4.19 - '@storybook/components': 6.4.19_197e271930a90d8b2e7cc592a319b2eb - '@storybook/core-common': 6.4.19_90195ed1d00fcc07efbb0f55a9003b7b + '@storybook/components': 6.4.19_df7cogjqvegywlt4ywjkggns5m + '@storybook/core-common': 6.4.19_samv5uoqb7gap353b5k2sab3pm '@storybook/core-events': 6.4.19 '@storybook/node-logger': 6.4.19 - '@storybook/preview-web': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/router': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/preview-web': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/router': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/semver': 7.3.2 - '@storybook/store': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/ui': 6.4.19_197e271930a90d8b2e7cc592a319b2eb + '@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/ui': 6.4.19_df7cogjqvegywlt4ywjkggns5m '@types/node': 14.18.12 '@types/webpack': 4.41.32 autoprefixer: 9.8.8 - babel-loader: 8.2.3_a58183228c2c7b1a132de84b2b6f9adf + babel-loader: 8.2.3_uwaygiumfr5ruezn5bfsw34234 babel-plugin-macros: 2.8.0 babel-plugin-polyfill-corejs3: 0.1.7_@babel+core@7.17.5 case-sensitive-paths-webpack-plugin: 2.4.0 @@ -4518,7 +4537,7 @@ packages: css-loader: 3.6.0_webpack@4.46.0 file-loader: 6.2.0_webpack@4.46.0 find-up: 5.0.0 - fork-ts-checker-webpack-plugin: 4.1.6 + fork-ts-checker-webpack-plugin: 4.1.6_m7oz2meinfq2uoednww5reueli glob: 7.2.0 glob-promise: 3.4.0_glob@7.2.0 global: 4.4.0 @@ -4526,7 +4545,7 @@ packages: pnp-webpack-plugin: 1.6.4_typescript@4.6.2 postcss: 7.0.39 postcss-flexbugs-fixes: 4.2.1 - postcss-loader: 4.3.0_postcss@7.0.39+webpack@4.46.0 + postcss-loader: 4.3.0_gzaxsinx64nntyd3vmdqwl7coe raw-loader: 4.0.2_webpack@4.46.0 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 @@ -4535,7 +4554,7 @@ packages: terser-webpack-plugin: 4.2.3_webpack@4.46.0 ts-dedent: 2.2.0 typescript: 4.6.2 - url-loader: 4.1.1_file-loader@6.2.0+webpack@4.46.0 + url-loader: 4.1.1_lit45vopotvaqup7lrvlnvtxwy util-deprecate: 1.0.2 webpack: 4.46.0_webpack-cli@4.9.2 webpack-dev-middleware: 3.7.3_webpack@4.46.0 @@ -4544,6 +4563,7 @@ packages: webpack-virtual-modules: 0.2.2 transitivePeerDependencies: - '@types/react' + - bluebird - eslint - supports-color - vue-template-compiler @@ -4581,19 +4601,19 @@ packages: util-deprecate: 1.0.2 dev: true - /@storybook/client-api/6.4.19_react-dom@17.0.2+react@17.0.2: + /@storybook/client-api/6.4.19_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-OCrT5Um3FDvZnimQKwWtwsaI+5agPwq2i8YiqlofrI/NPMKp0I7DEkCGwE5IRD1Q8BIKqHcMo5tTmfYi0AxyOg==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/channel-postmessage': 6.4.19 '@storybook/channels': 6.4.19 '@storybook/client-logger': 6.4.19 '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 - '@storybook/store': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@types/qs': 6.9.7 '@types/webpack-env': 1.16.3 core-js: 3.21.1 @@ -4618,7 +4638,7 @@ packages: global: 4.4.0 dev: true - /@storybook/components/6.4.19_197e271930a90d8b2e7cc592a319b2eb: + /@storybook/components/6.4.19_df7cogjqvegywlt4ywjkggns5m: resolution: {integrity: sha512-q/0V37YAJA7CNc+wSiiefeM9+3XVk8ixBNylY36QCGJgIeGQ5/79vPyUe6K4lLmsQwpmZsIq1s1Ad5+VbboeOA==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4627,7 +4647,7 @@ packages: '@popperjs/core': 2.11.2 '@storybook/client-logger': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@types/color-convert': 2.0.0 '@types/overlayscrollbars': 1.12.1 '@types/react-syntax-highlighter': 11.0.5 @@ -4642,11 +4662,11 @@ packages: polished: 4.1.4 prop-types: 15.8.1 react: 17.0.2 - react-colorful: 5.5.1_react-dom@17.0.2+react@17.0.2 + react-colorful: 5.5.1_sfoxds7t5ydpegc3knd667wn6m react-dom: 17.0.2_react@17.0.2 - react-popper-tooltip: 3.1.1_react-dom@17.0.2+react@17.0.2 + react-popper-tooltip: 3.1.1_sfoxds7t5ydpegc3knd667wn6m react-syntax-highlighter: 13.5.3_react@17.0.2 - react-textarea-autosize: 8.3.3_@types+react@17.0.1+react@17.0.2 + react-textarea-autosize: 8.3.3_wk7fohhuxwcjfgq2kdoh4ny7by regenerator-runtime: 0.13.7 ts-dedent: 2.2.0 util-deprecate: 1.0.2 @@ -4654,7 +4674,7 @@ packages: - '@types/react' dev: true - /@storybook/core-client/6.4.19_683ef08afae9d0e1788e6c4d2f4e139e: + /@storybook/core-client/6.4.19_na7pbcx25hioc6eonrgs6tqtty: resolution: {integrity: sha512-rQHRZjhArPleE7/S8ZUolgzwY+hC0smSKX/3PQxO2GcebDjnJj6+iSV3h+aSMHMmTdoCQvjYw9aBpT8scuRe+A==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4665,16 +4685,16 @@ packages: typescript: optional: true dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/channel-postmessage': 6.4.19 '@storybook/channel-websocket': 6.4.19 - '@storybook/client-api': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/client-api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/client-logger': 6.4.19 '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 - '@storybook/preview-web': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/store': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/ui': 6.4.19_197e271930a90d8b2e7cc592a319b2eb + '@storybook/preview-web': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/ui': 6.4.19_df7cogjqvegywlt4ywjkggns5m airbnb-js-shims: 2.2.1 ansi-to-html: 0.6.15 core-js: 3.21.1 @@ -4693,7 +4713,7 @@ packages: - '@types/react' dev: true - /@storybook/core-common/6.4.19_90195ed1d00fcc07efbb0f55a9003b7b: + /@storybook/core-common/6.4.19_samv5uoqb7gap353b5k2sab3pm: resolution: {integrity: sha512-X1pJJkO48DFxl6iyEemIKqRkJ7j9/cBh3BRBUr+xZHXBvnD0GKDXIocwh0PjSxSC6XSu3UCQnqtKi3PbjRl8Dg==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4728,7 +4748,7 @@ packages: '@storybook/semver': 7.3.2 '@types/node': 14.18.12 '@types/pretty-hrtime': 1.0.1 - babel-loader: 8.2.3_a58183228c2c7b1a132de84b2b6f9adf + babel-loader: 8.2.3_uwaygiumfr5ruezn5bfsw34234 babel-plugin-macros: 3.1.0 babel-plugin-polyfill-corejs3: 0.1.7_@babel+core@7.17.5 chalk: 4.1.2 @@ -4736,7 +4756,7 @@ packages: express: 4.17.3 file-system-cache: 1.0.5 find-up: 5.0.0 - fork-ts-checker-webpack-plugin: 6.5.0_67dd9d30886961aa38836dadd892845a + fork-ts-checker-webpack-plugin: 6.5.0_m7oz2meinfq2uoednww5reueli fs-extra: 9.1.0 glob: 7.2.0 handlebars: 4.7.7 @@ -4769,7 +4789,7 @@ packages: core-js: 3.21.1 dev: true - /@storybook/core-server/6.4.19_493d4a0608ccc69483fe2fb362b8d57a: + /@storybook/core-server/6.4.19_je6uubqiztdjja76f6zwfogvpi: resolution: {integrity: sha512-bKsUB9f7hl5ya2JXxpIrErmbDQjoH39FVbzYZWjMo4t/b7+Xyi6vYadwyWcqlpUQmis09ZaSMv8L/Tw0TuwLAA==} peerDependencies: '@storybook/builder-webpack5': 6.4.19 @@ -4786,16 +4806,16 @@ packages: optional: true dependencies: '@discoveryjs/json-ext': 0.5.7 - '@storybook/builder-webpack4': 6.4.19_493d4a0608ccc69483fe2fb362b8d57a - '@storybook/core-client': 6.4.19_683ef08afae9d0e1788e6c4d2f4e139e - '@storybook/core-common': 6.4.19_90195ed1d00fcc07efbb0f55a9003b7b + '@storybook/builder-webpack4': 6.4.19_je6uubqiztdjja76f6zwfogvpi + '@storybook/core-client': 6.4.19_na7pbcx25hioc6eonrgs6tqtty + '@storybook/core-common': 6.4.19_samv5uoqb7gap353b5k2sab3pm '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 '@storybook/csf-tools': 6.4.19 - '@storybook/manager-webpack4': 6.4.19_493d4a0608ccc69483fe2fb362b8d57a + '@storybook/manager-webpack4': 6.4.19_je6uubqiztdjja76f6zwfogvpi '@storybook/node-logger': 6.4.19 '@storybook/semver': 7.3.2 - '@storybook/store': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@types/node': 14.18.12 '@types/node-fetch': 2.6.1 '@types/pretty-hrtime': 1.0.1 @@ -4832,6 +4852,7 @@ packages: ws: 8.5.0 transitivePeerDependencies: - '@types/react' + - bluebird - bufferutil - encoding - eslint @@ -4842,7 +4863,7 @@ packages: - webpack-command dev: true - /@storybook/core/6.4.19_01848b22432636b4107861e00a83acaa: + /@storybook/core/6.4.19_agciwisdey3liedymhqava5mvi: resolution: {integrity: sha512-55LOQ/h/kf1jMhjN85t/pIEdIwWEG9yV7bdwv3niVvmoypCxyyjn9/QNK0RKYAeDSUtdm6FVoJ6k5CpxWz2d8w==} peerDependencies: '@storybook/builder-webpack5': 6.4.19 @@ -4856,8 +4877,8 @@ packages: typescript: optional: true dependencies: - '@storybook/core-client': 6.4.19_683ef08afae9d0e1788e6c4d2f4e139e - '@storybook/core-server': 6.4.19_493d4a0608ccc69483fe2fb362b8d57a + '@storybook/core-client': 6.4.19_na7pbcx25hioc6eonrgs6tqtty + '@storybook/core-server': 6.4.19_je6uubqiztdjja76f6zwfogvpi react: 17.0.2 react-dom: 17.0.2_react@17.0.2 typescript: 4.6.2 @@ -4865,6 +4886,7 @@ packages: transitivePeerDependencies: - '@storybook/manager-webpack5' - '@types/react' + - bluebird - bufferutil - encoding - eslint @@ -4905,7 +4927,7 @@ packages: lodash: 4.17.21 dev: true - /@storybook/manager-webpack4/6.4.19_493d4a0608ccc69483fe2fb362b8d57a: + /@storybook/manager-webpack4/6.4.19_je6uubqiztdjja76f6zwfogvpi: resolution: {integrity: sha512-R8ugZjTYqXvlc6gDOcw909L65sIleOmIJLZR+N6/H85MivGXHu39jOwONqB7tVACufRty4FNecn8tEiQL2SAKA==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -4918,15 +4940,15 @@ packages: '@babel/core': 7.17.5 '@babel/plugin-transform-template-literals': 7.16.7_@babel+core@7.17.5 '@babel/preset-react': 7.16.7_@babel+core@7.17.5 - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/core-client': 6.4.19_683ef08afae9d0e1788e6c4d2f4e139e - '@storybook/core-common': 6.4.19_90195ed1d00fcc07efbb0f55a9003b7b + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/core-client': 6.4.19_na7pbcx25hioc6eonrgs6tqtty + '@storybook/core-common': 6.4.19_samv5uoqb7gap353b5k2sab3pm '@storybook/node-logger': 6.4.19 - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/ui': 6.4.19_197e271930a90d8b2e7cc592a319b2eb + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/ui': 6.4.19_df7cogjqvegywlt4ywjkggns5m '@types/node': 14.18.12 '@types/webpack': 4.41.32 - babel-loader: 8.2.3_a58183228c2c7b1a132de84b2b6f9adf + babel-loader: 8.2.3_uwaygiumfr5ruezn5bfsw34234 case-sensitive-paths-webpack-plugin: 2.4.0 chalk: 4.1.2 core-js: 3.21.1 @@ -4949,13 +4971,14 @@ packages: terser-webpack-plugin: 4.2.3_webpack@4.46.0 ts-dedent: 2.2.0 typescript: 4.6.2 - url-loader: 4.1.1_file-loader@6.2.0+webpack@4.46.0 + url-loader: 4.1.1_lit45vopotvaqup7lrvlnvtxwy util-deprecate: 1.0.2 webpack: 4.46.0_webpack-cli@4.9.2 webpack-dev-middleware: 3.7.3_webpack@4.46.0 webpack-virtual-modules: 0.2.2 transitivePeerDependencies: - '@types/react' + - bluebird - encoding - eslint - supports-color @@ -4980,18 +5003,18 @@ packages: core-js: 3.21.1 dev: true - /@storybook/preview-web/6.4.19_react-dom@17.0.2+react@17.0.2: + /@storybook/preview-web/6.4.19_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-jqltoBv5j7lvnxEfV9w8dLX9ASWGuvgz97yg8Yo5FqkftEwrHJenyvMGcTgDJKJPorF+wiz/9aIqnmd3LCAcZQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/channel-postmessage': 6.4.19 '@storybook/client-logger': 6.4.19 '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 - '@storybook/store': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m ansi-to-html: 0.6.15 core-js: 3.21.1 global: 4.4.0 @@ -5006,7 +5029,7 @@ packages: util-deprecate: 1.0.2 dev: true - /@storybook/react-docgen-typescript-plugin/1.0.2-canary.253f8c1.0_typescript@4.6.2+webpack@4.46.0: + /@storybook/react-docgen-typescript-plugin/1.0.2-canary.253f8c1.0_7in6qbnjgkqokibdcer35wqugu: resolution: {integrity: sha512-mmoRG/rNzAiTbh+vGP8d57dfcR2aP+5/Ll03KKFyfy5FqWFm/Gh7u27ikx1I3LmVMI8n6jh5SdWMkMKon7/tDw==} peerDependencies: typescript: '>= 3.x' @@ -5025,7 +5048,7 @@ packages: - supports-color dev: true - /@storybook/react/6.4.19_e4f5e22d19a80f897ab9a22097753242: + /@storybook/react/6.4.19_4t26elizvahys6vzuiqjo5jsii: resolution: {integrity: sha512-5b3i8jkVrjQGmcxxxXwCduHPIh+cluWkfeweKeQOe+lW4BR8fuUICo3AMLrYPAtB/UcaJyYkIYmTvF2mkfepFA==} engines: {node: '>=10.13.0'} hasBin: true @@ -5043,15 +5066,15 @@ packages: '@babel/core': 7.17.5 '@babel/preset-flow': 7.16.7_@babel+core@7.17.5 '@babel/preset-react': 7.16.7_@babel+core@7.17.5 - '@pmmmwh/react-refresh-webpack-plugin': 0.5.4_bba734de70ee13bc43bd5c4a13e07a03 - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/core': 6.4.19_01848b22432636b4107861e00a83acaa - '@storybook/core-common': 6.4.19_90195ed1d00fcc07efbb0f55a9003b7b + '@pmmmwh/react-refresh-webpack-plugin': 0.5.4_xottjxtq5yj3yq55lrfbhyd2am + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/core': 6.4.19_agciwisdey3liedymhqava5mvi + '@storybook/core-common': 6.4.19_samv5uoqb7gap353b5k2sab3pm '@storybook/csf': 0.0.2--canary.87bc651.0 '@storybook/node-logger': 6.4.19 - '@storybook/react-docgen-typescript-plugin': 1.0.2-canary.253f8c1.0_typescript@4.6.2+webpack@4.46.0 + '@storybook/react-docgen-typescript-plugin': 1.0.2-canary.253f8c1.0_7in6qbnjgkqokibdcer35wqugu '@storybook/semver': 7.3.2 - '@storybook/store': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/store': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@types/webpack-env': 1.16.3 babel-plugin-add-react-displayname: 0.0.5 babel-plugin-named-asset-import: 0.3.8_@babel+core@7.17.5 @@ -5073,6 +5096,7 @@ packages: - '@storybook/manager-webpack5' - '@types/react' - '@types/webpack' + - bluebird - bufferutil - encoding - eslint @@ -5088,7 +5112,7 @@ packages: - webpack-plugin-serve dev: true - /@storybook/router/6.4.19_react-dom@17.0.2+react@17.0.2: + /@storybook/router/6.4.19_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-KWWwIzuyeEIWVezkCihwY2A76Il9tUNg0I410g9qT7NrEsKyqXGRYOijWub7c1GGyNjLqz0jtrrehtixMcJkuA==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -5105,7 +5129,7 @@ packages: react: 17.0.2 react-dom: 17.0.2_react@17.0.2 react-router: 6.2.2_react@17.0.2 - react-router-dom: 6.2.2_react-dom@17.0.2+react@17.0.2 + react-router-dom: 6.2.2_sfoxds7t5ydpegc3knd667wn6m ts-dedent: 2.2.0 dev: true @@ -5118,13 +5142,13 @@ packages: find-up: 4.1.0 dev: true - /@storybook/source-loader/6.4.19_react-dom@17.0.2+react@17.0.2: + /@storybook/source-loader/6.4.19_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-XqTsqddRglvfW7mhyjwoqd/B8L6samcBehhO0OEbsFp6FPWa9eXuObCxtRYIcjcSIe+ksbW3D/54ppEs1L/g1Q==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/client-logger': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 core-js: 3.21.1 @@ -5138,13 +5162,13 @@ packages: regenerator-runtime: 0.13.7 dev: true - /@storybook/store/6.4.19_react-dom@17.0.2+react@17.0.2: + /@storybook/store/6.4.19_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-N9/ZjemRHGfT3InPIbqQqc6snkcfnf3Qh9oOr0smbfaVGJol//KOX65kzzobtzFcid0WxtTDZ3HmgFVH+GvuhQ==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/client-logger': 6.4.19 '@storybook/core-events': 6.4.19 '@storybook/csf': 0.0.2--canary.87bc651.0 @@ -5163,7 +5187,7 @@ packages: util-deprecate: 1.0.2 dev: true - /@storybook/theming/6.4.19_react-dom@17.0.2+react@17.0.2: + /@storybook/theming/6.4.19_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-V4pWmTvAxmbHR6B3jA4hPkaxZPyExHvCToy7b76DpUTpuHihijNDMAn85KhOQYIeL9q14zP/aiz899tOHsOidg==} peerDependencies: react: ^16.8.0 || ^17.0.0 @@ -5171,11 +5195,11 @@ packages: dependencies: '@emotion/core': 10.3.1_react@17.0.2 '@emotion/is-prop-valid': 0.8.8 - '@emotion/styled': 10.3.0_316248eb6686a2fd4fbadcfd00de37f3 + '@emotion/styled': 10.3.0_gfrer23gq2rp2t523t6qbxrx6m '@storybook/client-logger': 6.4.19 core-js: 3.21.1 deep-object-diff: 1.1.7 - emotion-theming: 10.3.0_316248eb6686a2fd4fbadcfd00de37f3 + emotion-theming: 10.3.0_gfrer23gq2rp2t523t6qbxrx6m global: 4.4.0 memoizerific: 1.11.3 polished: 4.1.4 @@ -5185,27 +5209,27 @@ packages: ts-dedent: 2.2.0 dev: true - /@storybook/ui/6.4.19_197e271930a90d8b2e7cc592a319b2eb: + /@storybook/ui/6.4.19_df7cogjqvegywlt4ywjkggns5m: resolution: {integrity: sha512-gFwdn5LA2U6oQ4bfUFLyHZnNasGQ01YVdwjbi+l6yjmnckBNtZfJoVTZ1rzGUbxSE9rK48InJRU+latTsr7xAg==} peerDependencies: react: ^16.8.0 || ^17.0.0 react-dom: ^16.8.0 || ^17.0.0 dependencies: '@emotion/core': 10.3.1_react@17.0.2 - '@storybook/addons': 6.4.19_react-dom@17.0.2+react@17.0.2 - '@storybook/api': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/addons': 6.4.19_sfoxds7t5ydpegc3knd667wn6m + '@storybook/api': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/channels': 6.4.19 '@storybook/client-logger': 6.4.19 - '@storybook/components': 6.4.19_197e271930a90d8b2e7cc592a319b2eb + '@storybook/components': 6.4.19_df7cogjqvegywlt4ywjkggns5m '@storybook/core-events': 6.4.19 - '@storybook/router': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/router': 6.4.19_sfoxds7t5ydpegc3knd667wn6m '@storybook/semver': 7.3.2 - '@storybook/theming': 6.4.19_react-dom@17.0.2+react@17.0.2 + '@storybook/theming': 6.4.19_sfoxds7t5ydpegc3knd667wn6m copy-to-clipboard: 3.3.1 core-js: 3.21.1 core-js-pure: 3.21.1 downshift: 6.1.7_react@17.0.2 - emotion-theming: 10.3.0_316248eb6686a2fd4fbadcfd00de37f3 + emotion-theming: 10.3.0_gfrer23gq2rp2t523t6qbxrx6m fuse.js: 3.6.1 global: 4.4.0 lodash: 4.17.21 @@ -5215,8 +5239,8 @@ packages: qs: 6.10.3 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 - react-draggable: 4.4.4_react-dom@17.0.2+react@17.0.2 - react-helmet-async: 1.2.3_react-dom@17.0.2+react@17.0.2 + react-draggable: 4.4.4_sfoxds7t5ydpegc3knd667wn6m + react-helmet-async: 1.2.3_sfoxds7t5ydpegc3knd667wn6m react-sizeme: 3.0.2 regenerator-runtime: 0.13.7 resolve-from: 5.0.0 @@ -5560,7 +5584,7 @@ packages: pretty-format: 26.6.2 dev: true - /@testing-library/react-hooks/5.1.3_react-dom@17.0.1+react@17.0.1: + /@testing-library/react-hooks/5.1.3_react@17.0.2: resolution: {integrity: sha512-UdEUtlQapQ579NEcXDAUE275u+KUsPtxW7NmFrNt0bE6lW8lqNCyxDK0RSuECmNZ/S0/fgP00W9RWRhVKO/hRg==} peerDependencies: react: '>=16.9.0' @@ -5577,12 +5601,11 @@ packages: '@types/react-dom': 17.0.13 '@types/react-test-renderer': 17.0.1 filter-console: 0.1.1 - react: 17.0.1 - react-dom: 17.0.1_react@17.0.1 - react-error-boundary: 3.1.4_react@17.0.1 + react: 17.0.2 + react-error-boundary: 3.1.4_react@17.0.2 dev: true - /@testing-library/react-hooks/5.1.3_react@17.0.2: + /@testing-library/react-hooks/5.1.3_w7o5yyljkiidx2s2nzb26ottzu: resolution: {integrity: sha512-UdEUtlQapQ579NEcXDAUE275u+KUsPtxW7NmFrNt0bE6lW8lqNCyxDK0RSuECmNZ/S0/fgP00W9RWRhVKO/hRg==} peerDependencies: react: '>=16.9.0' @@ -5599,11 +5622,12 @@ packages: '@types/react-dom': 17.0.13 '@types/react-test-renderer': 17.0.1 filter-console: 0.1.1 - react: 17.0.2 - react-error-boundary: 3.1.4_react@17.0.2 + react: 17.0.1 + react-dom: 17.0.1_react@17.0.1 + react-error-boundary: 3.1.4_react@17.0.1 dev: true - /@testing-library/react/11.2.7_react-dom@17.0.2+react@17.0.2: + /@testing-library/react/11.2.7_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-tzRNp7pzd5QmbtXNG/mhdcl7Awfu/Iz1RaVHY75zTdOkmHCuzMhRL83gWHSgOAcjS3CCbyfwUHMZgRJb4kAfpA==} engines: {node: '>=10'} peerDependencies: @@ -5646,7 +5670,7 @@ packages: resolution: {integrity: sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==} dev: true - /@typechain/ethers-v5/9.0.0_256cf69a3c5e8c20d955f1f7b5311c9a: + /@typechain/ethers-v5/9.0.0_evwpngr4l2gcbwkv6h33kmi4ti: resolution: {integrity: sha512-bAanuPl1L2itaUdMvor/QvwnIH+TM/CmG00q17Ilv3ZZMeJ2j8HcarhgJUZ9pBY1teBb85P8cC03dz3mSSx+tQ==} peerDependencies: '@ethersproject/abi': ^5.0.0 @@ -5664,7 +5688,7 @@ packages: typescript: 4.6.2 dev: false - /@typechain/ethers-v5/9.0.0_65ac1934a17b69618ed69019e39a382e: + /@typechain/ethers-v5/9.0.0_ixvmdjrencug4ne2vgafvfmk2q: resolution: {integrity: sha512-bAanuPl1L2itaUdMvor/QvwnIH+TM/CmG00q17Ilv3ZZMeJ2j8HcarhgJUZ9pBY1teBb85P8cC03dz3mSSx+tQ==} peerDependencies: '@ethersproject/abi': ^5.0.0 @@ -5674,14 +5698,15 @@ packages: typechain: ^7.0.0 typescript: '>=4.0.0' dependencies: - ethers: 5.6.2 + '@ethersproject/abi': 5.6.1 + '@ethersproject/providers': 5.6.2 lodash: 4.17.21 ts-essentials: 7.0.3_typescript@4.6.2 typechain: 7.0.1_typescript@4.6.2 typescript: 4.6.2 dev: true - /@typechain/ethers-v5/9.0.0_8d7fa4ccdda916073c1de28cb1536173: + /@typechain/ethers-v5/9.0.0_mwwbsnfbpnuwddwwsam6hgryfy: resolution: {integrity: sha512-bAanuPl1L2itaUdMvor/QvwnIH+TM/CmG00q17Ilv3ZZMeJ2j8HcarhgJUZ9pBY1teBb85P8cC03dz3mSSx+tQ==} peerDependencies: '@ethersproject/abi': ^5.0.0 @@ -5691,8 +5716,6 @@ packages: typechain: ^7.0.0 typescript: '>=4.0.0' dependencies: - '@ethersproject/abi': 5.6.1 - '@ethersproject/providers': 5.6.2 ethers: 5.6.2 lodash: 4.17.21 ts-essentials: 7.0.3_typescript@4.6.2 @@ -5832,7 +5855,6 @@ packages: dependencies: '@types/minimatch': 3.0.5 '@types/node': 17.0.21 - dev: true /@types/graceful-fs/4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} @@ -5855,7 +5877,7 @@ packages: /@types/hoist-non-react-statics/3.3.1: resolution: {integrity: sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==} dependencies: - '@types/react': 17.0.1 + '@types/react': 17.0.40 hoist-non-react-statics: 3.3.2 /@types/html-minifier-terser/5.1.2: @@ -5924,6 +5946,11 @@ packages: /@types/json-schema/7.0.9: resolution: {integrity: sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==} + /@types/keyv/3.1.4: + resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} + dependencies: + '@types/node': 17.0.21 + /@types/lodash.merge/4.6.6: resolution: {integrity: sha512-IB90krzMf7YpfgP3u/EvZEdXVvm4e3gJbUvh5ieuI+o+XqiNEt6fCzqNRaiLlPVScLI59RxIGZMQ3+Ko/DJ8vQ==} dependencies: @@ -5951,7 +5978,6 @@ packages: /@types/minimatch/3.0.5: resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} - dev: true /@types/minimist/1.2.2: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} @@ -6082,6 +6108,11 @@ packages: '@types/scheduler': 0.16.2 csstype: 3.0.11 + /@types/responselike/1.0.0: + resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} + dependencies: + '@types/node': 17.0.21 + /@types/retry/0.12.1: resolution: {integrity: sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g==} dev: false @@ -6216,7 +6247,7 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin/4.33.0_95407711204725ba8d2ef915af8a79e5: + /@typescript-eslint/eslint-plugin/4.33.0_svahoejai4s3vdjo7ek27ctz4u: resolution: {integrity: sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -6227,8 +6258,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/experimental-utils': 4.33.0_eslint@7.19.0+typescript@4.6.2 - '@typescript-eslint/parser': 4.33.0_eslint@7.19.0+typescript@4.6.2 + '@typescript-eslint/experimental-utils': 4.33.0_bpt3vuhlsupxpqo5l4aahunrmm + '@typescript-eslint/parser': 4.33.0_bpt3vuhlsupxpqo5l4aahunrmm '@typescript-eslint/scope-manager': 4.33.0 debug: 4.3.4 eslint: 7.19.0 @@ -6242,7 +6273,7 @@ packages: - supports-color dev: true - /@typescript-eslint/experimental-utils/4.33.0_eslint@7.19.0+typescript@4.6.2: + /@typescript-eslint/experimental-utils/4.33.0_bpt3vuhlsupxpqo5l4aahunrmm: resolution: {integrity: sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -6260,7 +6291,7 @@ packages: - typescript dev: true - /@typescript-eslint/parser/4.33.0_eslint@7.19.0+typescript@4.6.2: + /@typescript-eslint/parser/4.33.0_bpt3vuhlsupxpqo5l4aahunrmm: resolution: {integrity: sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -6664,44 +6695,37 @@ packages: '@webassemblyjs/helper-module-context': 1.9.0 '@webassemblyjs/helper-wasm-bytecode': 1.9.0 '@webassemblyjs/wast-parser': 1.9.0 - dev: true /@webassemblyjs/floating-point-hex-parser/1.11.1: resolution: {integrity: sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==} /@webassemblyjs/floating-point-hex-parser/1.9.0: resolution: {integrity: sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==} - dev: true /@webassemblyjs/helper-api-error/1.11.1: resolution: {integrity: sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==} /@webassemblyjs/helper-api-error/1.9.0: resolution: {integrity: sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==} - dev: true /@webassemblyjs/helper-buffer/1.11.1: resolution: {integrity: sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==} /@webassemblyjs/helper-buffer/1.9.0: resolution: {integrity: sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==} - dev: true /@webassemblyjs/helper-code-frame/1.9.0: resolution: {integrity: sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==} dependencies: '@webassemblyjs/wast-printer': 1.9.0 - dev: true /@webassemblyjs/helper-fsm/1.9.0: resolution: {integrity: sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==} - dev: true /@webassemblyjs/helper-module-context/1.9.0: resolution: {integrity: sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==} dependencies: '@webassemblyjs/ast': 1.9.0 - dev: true /@webassemblyjs/helper-numbers/1.11.1: resolution: {integrity: sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==} @@ -6715,7 +6739,6 @@ packages: /@webassemblyjs/helper-wasm-bytecode/1.9.0: resolution: {integrity: sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==} - dev: true /@webassemblyjs/helper-wasm-section/1.11.1: resolution: {integrity: sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==} @@ -6732,7 +6755,6 @@ packages: '@webassemblyjs/helper-buffer': 1.9.0 '@webassemblyjs/helper-wasm-bytecode': 1.9.0 '@webassemblyjs/wasm-gen': 1.9.0 - dev: true /@webassemblyjs/ieee754/1.11.1: resolution: {integrity: sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==} @@ -6743,7 +6765,6 @@ packages: resolution: {integrity: sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==} dependencies: '@xtuc/ieee754': 1.2.0 - dev: true /@webassemblyjs/leb128/1.11.1: resolution: {integrity: sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==} @@ -6754,14 +6775,12 @@ packages: resolution: {integrity: sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==} dependencies: '@xtuc/long': 4.2.2 - dev: true /@webassemblyjs/utf8/1.11.1: resolution: {integrity: sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==} /@webassemblyjs/utf8/1.9.0: resolution: {integrity: sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==} - dev: true /@webassemblyjs/wasm-edit/1.11.1: resolution: {integrity: sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==} @@ -6786,7 +6805,6 @@ packages: '@webassemblyjs/wasm-opt': 1.9.0 '@webassemblyjs/wasm-parser': 1.9.0 '@webassemblyjs/wast-printer': 1.9.0 - dev: true /@webassemblyjs/wasm-gen/1.11.1: resolution: {integrity: sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==} @@ -6805,7 +6823,6 @@ packages: '@webassemblyjs/ieee754': 1.9.0 '@webassemblyjs/leb128': 1.9.0 '@webassemblyjs/utf8': 1.9.0 - dev: true /@webassemblyjs/wasm-opt/1.11.1: resolution: {integrity: sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==} @@ -6822,7 +6839,6 @@ packages: '@webassemblyjs/helper-buffer': 1.9.0 '@webassemblyjs/wasm-gen': 1.9.0 '@webassemblyjs/wasm-parser': 1.9.0 - dev: true /@webassemblyjs/wasm-parser/1.11.1: resolution: {integrity: sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==} @@ -6843,7 +6859,6 @@ packages: '@webassemblyjs/ieee754': 1.9.0 '@webassemblyjs/leb128': 1.9.0 '@webassemblyjs/utf8': 1.9.0 - dev: true /@webassemblyjs/wast-parser/1.9.0: resolution: {integrity: sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==} @@ -6854,7 +6869,6 @@ packages: '@webassemblyjs/helper-code-frame': 1.9.0 '@webassemblyjs/helper-fsm': 1.9.0 '@xtuc/long': 4.2.2 - dev: true /@webassemblyjs/wast-printer/1.11.1: resolution: {integrity: sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==} @@ -6868,17 +6882,15 @@ packages: '@webassemblyjs/ast': 1.9.0 '@webassemblyjs/wast-parser': 1.9.0 '@xtuc/long': 4.2.2 - dev: true - /@webpack-cli/configtest/1.1.1_webpack-cli@4.9.2+webpack@4.46.0: + /@webpack-cli/configtest/1.1.1_wruvbxbxznejtxbdxokfuvupnq: resolution: {integrity: sha512-1FBc1f9G4P/AxMqIgfZgeOTuRnwZMten8E7zap5zgpPInnCrP8D4Q81+4CWIch8i/Nf7nXjP0v6CjjbHOrXhKg==} peerDependencies: webpack: 4.x.x || 5.x.x webpack-cli: 4.x.x dependencies: webpack: 4.46.0_webpack-cli@4.9.2 - webpack-cli: 4.9.2_9c6227b1f4ab411ec71902ed1b15f9d5 - dev: true + webpack-cli: 4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u /@webpack-cli/info/1.4.1_webpack-cli@4.9.2: resolution: {integrity: sha512-PKVGmazEq3oAo46Q63tpMr4HipI3OPfP7LiNOEJg963RMgT0rqheag28NCML0o3GIzA3DmxP1ZIAv9oTX1CUIA==} @@ -6886,10 +6898,9 @@ packages: webpack-cli: 4.x.x dependencies: envinfo: 7.8.1 - webpack-cli: 4.9.2_9c6227b1f4ab411ec71902ed1b15f9d5 - dev: true + webpack-cli: 4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u - /@webpack-cli/serve/1.6.1_5a68400b9ca2652ea4444e5d81612c20: + /@webpack-cli/serve/1.6.1_ljueac44ujss5jcejzoycyjmea: resolution: {integrity: sha512-gNGTiTrjEVQ0OcVnzsRSqTxaBSr+dmTfm+qJsCDluky8uhdLWep7Gcr62QsAKHTMxjCS/8nEITsmFAhfIx+QSw==} peerDependencies: webpack-cli: 4.x.x @@ -6898,9 +6909,8 @@ packages: webpack-dev-server: optional: true dependencies: - webpack-cli: 4.9.2_9c6227b1f4ab411ec71902ed1b15f9d5 - webpack-dev-server: 3.11.3_webpack-cli@4.9.2+webpack@4.46.0 - dev: true + webpack-cli: 4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u + webpack-dev-server: 3.11.3_wruvbxbxznejtxbdxokfuvupnq /@xtuc/ieee754/1.2.0: resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} @@ -6978,7 +6988,6 @@ packages: resolution: {integrity: sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==} engines: {node: '>=0.4.0'} hasBin: true - dev: true /acorn/7.4.1: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} @@ -7044,7 +7053,6 @@ packages: ajv: '>=5.0.0' dependencies: ajv: 6.12.6 - dev: true /ajv-formats/2.1.1: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} @@ -7130,7 +7138,6 @@ packages: /ansi-colors/3.2.4: resolution: {integrity: sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==} engines: {node: '>=6'} - dev: true /ansi-colors/4.1.1: resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} @@ -7223,7 +7230,16 @@ packages: dependencies: micromatch: 3.1.10 normalize-path: 2.1.1 - dev: true + transitivePeerDependencies: + - supports-color + + /anymatch/2.0.0_supports-color@6.1.0: + resolution: {integrity: sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==} + dependencies: + micromatch: 3.1.10_supports-color@6.1.0 + normalize-path: 2.1.1 + transitivePeerDependencies: + - supports-color /anymatch/3.1.2: resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} @@ -7249,7 +7265,6 @@ packages: /aproba/1.2.0: resolution: {integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==} - dev: true /aproba/2.0.0: resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} @@ -7399,7 +7414,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: array-uniq: 1.0.3 - dev: true /array-union/2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} @@ -7413,7 +7427,6 @@ packages: /array-uniq/1.0.3: resolution: {integrity: sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=} engines: {node: '>=0.10.0'} - dev: true /array-unique/0.3.2: resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==} @@ -7484,7 +7497,6 @@ packages: dependencies: object-assign: 4.1.1 util: 0.10.3 - dev: true /assert/2.0.0: resolution: {integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==} @@ -7531,7 +7543,6 @@ packages: /async-each/1.0.3: resolution: {integrity: sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==} - dev: true /async-eventemitter/0.2.4: resolution: {integrity: sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==} @@ -7671,6 +7682,8 @@ packages: private: 0.1.8 slash: 1.0.0 source-map: 0.5.7 + transitivePeerDependencies: + - supports-color /babel-generator/6.26.1: resolution: {integrity: sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==} @@ -7690,6 +7703,8 @@ packages: babel-helper-explode-assignable-expression: 6.24.1 babel-runtime: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-helper-call-delegate/6.24.1: resolution: {integrity: sha512-RL8n2NiEj+kKztlrVJM9JT1cXzzAdvWFh76xh/H1I4nKwunzE4INBXn8ieCZ+wh4zWszZk7NBS1s/8HR5jDkzQ==} @@ -7698,6 +7713,8 @@ packages: babel-runtime: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-helper-define-map/6.26.0: resolution: {integrity: sha512-bHkmjcC9lM1kmZcVpA5t2om2nzT/xiZpo6TJq7UlZ3wqKfzia4veeXbIhKvJXAMzhhEBd3cR1IElL5AenWEUpA==} @@ -7706,6 +7723,8 @@ packages: babel-runtime: 6.26.0 babel-types: 6.26.0 lodash: 4.17.21 + transitivePeerDependencies: + - supports-color /babel-helper-explode-assignable-expression/6.24.1: resolution: {integrity: sha512-qe5csbhbvq6ccry9G7tkXbzNtcDiH4r51rrPUbwwoTzZ18AqxWYRZT6AOmxrpxKnQBW0pYlBI/8vh73Z//78nQ==} @@ -7713,6 +7732,8 @@ packages: babel-runtime: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-helper-function-name/6.24.1: resolution: {integrity: sha512-Oo6+e2iX+o9eVvJ9Y5eKL5iryeRdsIkwRYheCuhYdVHsdEQysbc2z2QkqCLIYnNxkT5Ss3ggrHdXiDI7Dhrn4Q==} @@ -7722,6 +7743,8 @@ packages: babel-template: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-helper-get-function-arity/6.24.1: resolution: {integrity: sha512-WfgKFX6swFB1jS2vo+DwivRN4NB8XUdM3ij0Y1gnC21y1tdBoe6xjVnd7NSI6alv+gZXCtJqvrTeMW3fR/c0ng==} @@ -7756,6 +7779,8 @@ packages: babel-template: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-helper-replace-supers/6.24.1: resolution: {integrity: sha512-sLI+u7sXJh6+ToqDr57Bv973kCepItDhMou0xCP2YPVmR1jkHSCY+p1no8xErbV1Siz5QE8qKT1WIwybSWlqjw==} @@ -7766,14 +7791,18 @@ packages: babel-template: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-helpers/6.24.1: resolution: {integrity: sha512-n7pFrqQm44TCYvrCDb0MqabAF+JUBq+ijBvNMUxpkLjJaAu32faIexewMumrH5KLLJ1HDyT0PTEqRyAe/GwwuQ==} dependencies: babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color - /babel-loader/8.2.3_a58183228c2c7b1a132de84b2b6f9adf: + /babel-loader/8.2.3_5wdqvq52klcoyiyluk6d3ozrdq: resolution: {integrity: sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw==} engines: {node: '>= 8.9'} peerDependencies: @@ -7785,10 +7814,10 @@ packages: loader-utils: 1.4.0 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 4.46.0_webpack-cli@4.9.2 - dev: true + webpack: 5.70.0 + dev: false - /babel-loader/8.2.3_ed870ac3ba52c4ec230ba2bc3dbb311c: + /babel-loader/8.2.3_uwaygiumfr5ruezn5bfsw34234: resolution: {integrity: sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw==} engines: {node: '>= 8.9'} peerDependencies: @@ -7800,8 +7829,8 @@ packages: loader-utils: 1.4.0 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.70.0 - dev: false + webpack: 4.46.0_webpack-cli@4.9.2 + dev: true /babel-messages/6.23.0: resolution: {integrity: sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==} @@ -7993,7 +8022,7 @@ packages: babel-plugin-syntax-jsx: 6.18.0 lodash: 4.17.21 picomatch: 2.3.1 - styled-components: 5.3.3_react-dom@17.0.2+react@17.0.2 + styled-components: 5.3.3_le6yh75jdu4qlr45kmyuenjcbu dev: false /babel-plugin-syntax-async-functions/6.13.0: @@ -8014,6 +8043,8 @@ packages: babel-helper-remap-async-to-generator: 6.24.1 babel-plugin-syntax-async-functions: 6.13.0 babel-runtime: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-es2015-arrow-functions/6.22.0: resolution: {integrity: sha512-PCqwwzODXW7JMrzu+yZIaYbPQSKjDTAsNNlK2l5Gg9g4rz2VzLnZsStvp/3c46GfXpwkyufb3NCyG9+50FF1Vg==} @@ -8033,6 +8064,8 @@ packages: babel-traverse: 6.26.0 babel-types: 6.26.0 lodash: 4.17.21 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-es2015-classes/6.24.1: resolution: {integrity: sha512-5Dy7ZbRinGrNtmWpquZKZ3EGY8sDgIVB4CU8Om8q8tnMLrD/m94cKglVcHps0BCTdZ0TJeeAWOq2TK9MIY6cag==} @@ -8046,12 +8079,16 @@ packages: babel-template: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-es2015-computed-properties/6.24.1: resolution: {integrity: sha512-C/uAv4ktFP/Hmh01gMTvYvICrKze0XVX9f2PdIXuriCSvUmV9j+u+BB9f5fJK3+878yMK6dkdcq+Ymr9mrcLzw==} dependencies: babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-es2015-destructuring/6.23.0: resolution: {integrity: sha512-aNv/GDAW0j/f4Uy1OEPZn1mqD+Nfy9viFGBfQ5bZyT35YqOiqx7/tXdyfZkJ1sC21NyEsBdfDY6PYmLHF4r5iA==} @@ -8075,6 +8112,8 @@ packages: babel-helper-function-name: 6.24.1 babel-runtime: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-es2015-literals/6.22.0: resolution: {integrity: sha512-tjFl0cwMPpDYyoqYA9li1/7mGFit39XiNX5DKC/uCNjBctMxyL1/PT/l4rSlbvBG1pOKI88STRdUsWXB3/Q9hQ==} @@ -8087,6 +8126,8 @@ packages: babel-plugin-transform-es2015-modules-commonjs: 6.26.2 babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-es2015-modules-commonjs/6.26.2: resolution: {integrity: sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==} @@ -8095,6 +8136,8 @@ packages: babel-runtime: 6.26.0 babel-template: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-es2015-modules-systemjs/6.24.1: resolution: {integrity: sha512-ONFIPsq8y4bls5PPsAWYXH/21Hqv64TBxdje0FvU3MhIV6QM2j5YS7KvAzg/nTIVLot2D2fmFQrFWCbgHlFEjg==} @@ -8102,6 +8145,8 @@ packages: babel-helper-hoist-variables: 6.24.1 babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-es2015-modules-umd/6.24.1: resolution: {integrity: sha512-LpVbiT9CLsuAIp3IG0tfbVo81QIhn6pE8xBJ7XSeCtFlMltuar5VuBV6y6Q45tpui9QWcy5i0vLQfCfrnF7Kiw==} @@ -8109,12 +8154,16 @@ packages: babel-plugin-transform-es2015-modules-amd: 6.24.1 babel-runtime: 6.26.0 babel-template: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-es2015-object-super/6.24.1: resolution: {integrity: sha512-8G5hpZMecb53vpD3mjs64NhI1au24TAmokQ4B+TBFBjN9cVoGoOvotdrMMRmHvVZUEvqGUPWL514woru1ChZMA==} dependencies: babel-helper-replace-supers: 6.24.1 babel-runtime: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-es2015-parameters/6.24.1: resolution: {integrity: sha512-8HxlW+BB5HqniD+nLkQ4xSAVq3bR/pcYW9IigY+2y0dI+Y7INFeTbfAQr+63T3E4UDsZGjyb+l9txUnABWxlOQ==} @@ -8125,6 +8174,8 @@ packages: babel-template: 6.26.0 babel-traverse: 6.26.0 babel-types: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-es2015-shorthand-properties/6.24.1: resolution: {integrity: sha512-mDdocSfUVm1/7Jw/FIRNw9vPrBQNePy6wZJlR8HAUBLybNp1w/6lr6zZ2pjMShee65t/ybR5pT8ulkLzD1xwiw==} @@ -8167,6 +8218,8 @@ packages: babel-helper-builder-binary-assignment-operator-visitor: 6.24.1 babel-plugin-syntax-exponentiation-operator: 6.13.0 babel-runtime: 6.26.0 + transitivePeerDependencies: + - supports-color /babel-plugin-transform-regenerator/6.26.0: resolution: {integrity: sha512-LS+dBkUGlNR15/5WHKe/8Neawx663qttS6AGqoOUhICc9d1KciBvtrQSuc0PI+CxQ2Q/S1aKuJ+u64GtLdcEZg==} @@ -8212,6 +8265,8 @@ packages: browserslist: 3.2.8 invariant: 2.2.4 semver: 5.7.1 + transitivePeerDependencies: + - supports-color /babel-register/6.26.0: resolution: {integrity: sha512-veliHlHX06wjaeY8xNITbveXSiI+ASFnOqvne/LaIJIqOWi2Ogmj91KOugEz/hoh/fwMhXNBJPCv8Xaz5CyM4A==} @@ -8223,6 +8278,8 @@ packages: lodash: 4.17.21 mkdirp: 0.5.5 source-map-support: 0.4.18 + transitivePeerDependencies: + - supports-color /babel-runtime/6.26.0: resolution: {integrity: sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==} @@ -8238,6 +8295,8 @@ packages: babel-types: 6.26.0 babylon: 6.18.0 lodash: 4.17.21 + transitivePeerDependencies: + - supports-color /babel-traverse/6.26.0: resolution: {integrity: sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==} @@ -8251,6 +8310,8 @@ packages: globals: 9.18.0 invariant: 2.2.4 lodash: 4.17.21 + transitivePeerDependencies: + - supports-color /babel-types/6.26.0: resolution: {integrity: sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==} @@ -8265,6 +8326,8 @@ packages: dependencies: babel-core: 6.26.3 object-assign: 4.1.1 + transitivePeerDependencies: + - supports-color /babylon/6.18.0: resolution: {integrity: sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==} @@ -8369,7 +8432,6 @@ packages: /binary-extensions/1.13.1: resolution: {integrity: sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==} engines: {node: '>=0.10.0'} - dev: true /binary-extensions/2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} @@ -8379,7 +8441,6 @@ packages: resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} dependencies: file-uri-to-path: 1.0.0 - dev: true optional: true /bip39/2.5.0: @@ -8427,6 +8488,25 @@ packages: qs: 6.9.7 raw-body: 2.4.3 type-is: 1.6.18 + transitivePeerDependencies: + - supports-color + + /body-parser/1.19.2_supports-color@6.1.0: + resolution: {integrity: sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==} + engines: {node: '>= 0.8'} + dependencies: + bytes: 3.1.2 + content-type: 1.0.4 + debug: 2.6.9_supports-color@6.1.0 + depd: 1.1.2 + http-errors: 1.8.1 + iconv-lite: 0.4.24 + on-finished: 2.3.0 + qs: 6.9.7 + raw-body: 2.4.3 + type-is: 1.6.18 + transitivePeerDependencies: + - supports-color /bonjour/3.5.0: resolution: {integrity: sha1-jokKGD2O6aI5OzhExpGkK897yfU=} @@ -8494,6 +8574,25 @@ packages: snapdragon-node: 2.1.1 split-string: 3.1.0 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color + + /braces/2.3.2_supports-color@6.1.0: + resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} + engines: {node: '>=0.10.0'} + dependencies: + arr-flatten: 1.1.0 + array-unique: 0.3.2 + extend-shallow: 2.0.1 + fill-range: 4.0.0 + isobject: 3.0.1 + repeat-element: 1.1.4 + snapdragon: 0.8.2_supports-color@6.1.0 + snapdragon-node: 2.1.1 + split-string: 3.1.0 + to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color /braces/3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} @@ -8741,7 +8840,6 @@ packages: base64-js: 1.5.1 ieee754: 1.2.1 isarray: 1.0.0 - dev: true /buffer/5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -8817,12 +8915,11 @@ packages: mississippi: 3.0.0 mkdirp: 0.5.5 move-concurrently: 1.0.1 - promise-inflight: 1.0.1 + promise-inflight: 1.0.1_bluebird@3.7.2 rimraf: 2.7.1 ssri: 6.0.2 unique-filename: 1.1.1 y18n: 4.0.1 - dev: true /cacache/15.3.0: resolution: {integrity: sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==} @@ -8841,11 +8938,13 @@ packages: minipass-pipeline: 1.2.4 mkdirp: 1.0.4 p-map: 4.0.0 - promise-inflight: 1.0.1 + promise-inflight: 1.0.1_bluebird@3.7.2 rimraf: 3.0.2 ssri: 8.0.1 tar: 6.1.11 unique-filename: 1.1.1 + transitivePeerDependencies: + - bluebird dev: true /cache-base/1.0.1: @@ -9103,7 +9202,28 @@ packages: upath: 1.2.0 optionalDependencies: fsevents: 1.2.13 - dev: true + transitivePeerDependencies: + - supports-color + + /chokidar/2.1.8_supports-color@6.1.0: + resolution: {integrity: sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==} + deprecated: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies + dependencies: + anymatch: 2.0.0_supports-color@6.1.0 + async-each: 1.0.3 + braces: 2.3.2_supports-color@6.1.0 + glob-parent: 3.1.0 + inherits: 2.0.4 + is-binary-path: 1.0.1 + is-glob: 4.0.3 + normalize-path: 3.0.0 + path-is-absolute: 1.0.1 + readdirp: 2.2.1_supports-color@6.1.0 + upath: 1.2.0 + optionalDependencies: + fsevents: 1.2.13 + transitivePeerDependencies: + - supports-color /chokidar/3.5.1: resolution: {integrity: sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==} @@ -9450,6 +9570,22 @@ packages: on-headers: 1.0.2 safe-buffer: 5.1.2 vary: 1.1.2 + transitivePeerDependencies: + - supports-color + + /compression/1.7.4_supports-color@6.1.0: + resolution: {integrity: sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==} + engines: {node: '>= 0.8.0'} + dependencies: + accepts: 1.3.8 + bytes: 3.0.0 + compressible: 2.0.18 + debug: 2.6.9_supports-color@6.1.0 + on-headers: 1.0.2 + safe-buffer: 5.1.2 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color /compute-scroll-into-view/1.0.17: resolution: {integrity: sha512-j4dx+Fb0URmzbwwMUrhqWM2BEWHdFGx+qZ9qqASHRPqvTYdqvWnHg0H1hIbcyLnvgnoNAVMlwkepyqM3DaIFUg==} @@ -9491,6 +9627,8 @@ packages: finalhandler: 1.1.0 parseurl: 1.3.3 utils-merge: 1.0.1 + transitivePeerDependencies: + - supports-color dev: true /consola/2.15.3: @@ -9554,7 +9692,6 @@ packages: mkdirp: 0.5.5 rimraf: 2.7.1 run-queue: 1.0.3 - dev: true /copy-descriptor/0.1.1: resolution: {integrity: sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=} @@ -9610,6 +9747,8 @@ packages: serialize-javascript: 5.0.1 webpack: 4.46.0_webpack-cli@4.9.2 webpack-sources: 1.4.3 + transitivePeerDependencies: + - bluebird dev: true /core-js-compat/3.21.1: @@ -9687,6 +9826,8 @@ packages: p-all: 2.1.0 p-filter: 2.1.0 p-map: 3.0.0 + transitivePeerDependencies: + - supports-color dev: true /create-ecdh/4.0.4: @@ -9832,7 +9973,7 @@ packages: webpack: 5.70.0 dev: false - /css-minimizer-webpack-plugin/3.4.1_clean-css@5.2.4+webpack@5.70.0: + /css-minimizer-webpack-plugin/3.4.1_35zgfab327w3ywmceygpdsm34e: resolution: {integrity: sha512-1u6D71zeIfgngN2XNRJefc/hY7Ybsxd74Jm4qngIXyUEk7fss3VUzuHxLAq/R8NAba4QU9OUSaMZlbpRc7bM4Q==} engines: {node: '>= 12.13.0'} peerDependencies: @@ -10035,7 +10176,6 @@ packages: /cyclist/1.0.1: resolution: {integrity: sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=} - dev: true /d/1.0.1: resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==} @@ -10060,36 +10200,73 @@ packages: /debug/2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.0.0 + + /debug/2.6.9_supports-color@6.1.0: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true dependencies: ms: 2.0.0 + supports-color: 6.1.0 /debug/3.2.6: resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true dependencies: ms: 2.1.3 /debug/3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - dependencies: - ms: 2.1.3 - - /debug/4.3.1_supports-color@8.1.1: - resolution: {integrity: sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==} - engines: {node: '>=6.0'} peerDependencies: supports-color: '*' peerDependenciesMeta: supports-color: optional: true dependencies: - ms: 2.1.2 - supports-color: 8.1.1 - dev: true + ms: 2.1.3 - /debug/4.3.2: - resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==} - engines: {node: '>=6.0'} + /debug/3.2.7_supports-color@6.1.0: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.3 + supports-color: 6.1.0 + + /debug/4.3.1_supports-color@8.1.1: + resolution: {integrity: sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + supports-color: 8.1.1 + dev: true + + /debug/4.3.2: + resolution: {integrity: sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==} + engines: {node: '>=6.0'} peerDependencies: supports-color: '*' peerDependenciesMeta: @@ -10146,7 +10323,6 @@ packages: dependencies: ms: 2.1.2 supports-color: 6.1.0 - dev: true /decamelize-keys/1.1.0: resolution: {integrity: sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=} @@ -10228,7 +10404,6 @@ packages: dependencies: execa: 1.0.0 ip-regex: 2.1.0 - dev: true /default-gateway/6.0.3: resolution: {integrity: sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==} @@ -10319,7 +10494,6 @@ packages: p-map: 2.1.0 pify: 4.0.1 rimraf: 2.7.1 - dev: true /del/6.0.0: resolution: {integrity: sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==} @@ -10395,6 +10569,8 @@ packages: dependencies: address: 1.1.2 debug: 2.6.9 + transitivePeerDependencies: + - supports-color dev: false /detect-port/1.3.0: @@ -10404,6 +10580,8 @@ packages: dependencies: address: 1.1.2 debug: 2.6.9 + transitivePeerDependencies: + - supports-color /dev-ip/1.0.1: resolution: {integrity: sha1-p2o+0YVb56ASu4rBbLgPPADcKPA=} @@ -10498,7 +10676,6 @@ packages: /domain-browser/1.2.0: resolution: {integrity: sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==} engines: {node: '>=0.4', npm: '>=1.2'} - dev: true /domain-browser/4.22.0: resolution: {integrity: sha512-IGBwjF7tNk3cwypFNH/7bfzBcgSCbaMOD3GsaY1AU/JRrnHnYgEM0+9kQt52iZxjNsjBtJYtao146V+f8jFZNw==} @@ -10606,7 +10783,6 @@ packages: inherits: 2.0.4 readable-stream: 2.3.7 stream-shift: 1.0.1 - dev: true /each-props/1.3.2: resolution: {integrity: sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==} @@ -10680,7 +10856,7 @@ packages: resolution: {integrity: sha512-SNujglcLTTg+lDAcApPNgEdudaqQFiAbJCqzjNxJkvN9vAwCGi0uu8IUVvx+f16h+V44KCY6Y2yboroc9pilHg==} dev: false - /emotion-theming/10.3.0_316248eb6686a2fd4fbadcfd00de37f3: + /emotion-theming/10.3.0_gfrer23gq2rp2t523t6qbxrx6m: resolution: {integrity: sha512-mXiD2Oj7N9b6+h/dC6oLf9hwxbtKHQjoIqtodEyL8CpkN4F3V4IK/BT4D0C7zSs4BBFOu4UlPJbvvBLa88SGEA==} peerDependencies: '@emotion/core': ^10.0.27 @@ -10777,7 +10953,6 @@ packages: graceful-fs: 4.2.9 memory-fs: 0.5.0 tapable: 1.1.3 - dev: true /enhanced-resolve/5.9.2: resolution: {integrity: sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA==} @@ -10815,7 +10990,6 @@ packages: resolution: {integrity: sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==} engines: {node: '>=4'} hasBin: true - dev: true /errno/0.1.8: resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} @@ -11210,7 +11384,6 @@ packages: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - dev: true /eslint-scope/5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} @@ -11355,6 +11528,8 @@ packages: json-rpc-engine: 3.8.0 pify: 2.3.0 tape: 4.15.0 + transitivePeerDependencies: + - supports-color /eth-block-tracker/4.4.3: resolution: {integrity: sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw==} @@ -11410,6 +11585,8 @@ packages: eth-json-rpc-middleware: 1.6.0 json-rpc-engine: 3.8.0 json-rpc-error: 2.0.0 + transitivePeerDependencies: + - supports-color /eth-json-rpc-infura/5.1.0: resolution: {integrity: sha512-THzLye3PHUSGn1EXMhg6WTLW9uim7LQZKeKaeYsS9+wOBcamRiCQVGHa6D2/4P0oS0vSaxsBnU/J6qvn0MPdow==} @@ -11438,6 +11615,8 @@ packages: json-stable-stringify: 1.0.1 promise-to-callback: 1.0.0 tape: 4.15.0 + transitivePeerDependencies: + - supports-color /eth-json-rpc-middleware/6.0.0: resolution: {integrity: sha512-qqBfLU2Uq1Ou15Wox1s+NX05S9OcAEL4JZ04VZox2NS0U+RtCMjSxzXhLFWekdShUPZ+P8ax3zCO2xcPrp6XJQ==} @@ -11466,6 +11645,10 @@ packages: servify: 0.1.12 ws: 3.3.3 xhr-request-promise: 0.1.3 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate optional: true /eth-lib/0.2.8: @@ -11565,13 +11748,13 @@ packages: secp256k1: 4.0.3 setimmediate: 1.0.5 - /ethereum-waffle/4.0.0-alpha.0_6bddc23fe2c0b9af3ce0fdadeab54392: + /ethereum-waffle/4.0.0-alpha.0_gzj4ydv7m5mpgbh7clk7xznzjy: resolution: {integrity: sha512-gDNoneCUuaidULiWuEXsygdgnRWHn8TWdg4BchQ/2poxtWomBjsPa4KeX7fmRLCLiklgTx/Lr2AsPv6XCG62uA==} engines: {node: '>=10.0'} hasBin: true dependencies: '@ethereum-waffle/chai': 4.0.0-alpha.0 - '@ethereum-waffle/compiler': 4.0.0-alpha.0_256cf69a3c5e8c20d955f1f7b5311c9a + '@ethereum-waffle/compiler': 4.0.0-alpha.0_lwprnquokhziy22vrz4t2elg2e '@ethereum-waffle/mock-contract': 4.0.0-alpha.0 '@ethereum-waffle/provider': 4.0.0-alpha.0 ethers: 5.6.2 @@ -11586,15 +11769,15 @@ packages: - supports-color - typescript - utf-8-validate - dev: false + dev: true - /ethereum-waffle/4.0.0-alpha.0_solc@0.8.12+typescript@4.6.2: + /ethereum-waffle/4.0.0-alpha.0_npo4ep7cyc426pha7ww6vnkdsi: resolution: {integrity: sha512-gDNoneCUuaidULiWuEXsygdgnRWHn8TWdg4BchQ/2poxtWomBjsPa4KeX7fmRLCLiklgTx/Lr2AsPv6XCG62uA==} engines: {node: '>=10.0'} hasBin: true dependencies: '@ethereum-waffle/chai': 4.0.0-alpha.0 - '@ethereum-waffle/compiler': 4.0.0-alpha.0_5d9f16c28e51f28c6b558e793d1166d1 + '@ethereum-waffle/compiler': 4.0.0-alpha.0_evwpngr4l2gcbwkv6h33kmi4ti '@ethereum-waffle/mock-contract': 4.0.0-alpha.0 '@ethereum-waffle/provider': 4.0.0-alpha.0 ethers: 5.6.2 @@ -11609,7 +11792,7 @@ packages: - supports-color - typescript - utf-8-validate - dev: true + dev: false /ethereumjs-abi/0.6.5: resolution: {integrity: sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE=} @@ -11857,7 +12040,6 @@ packages: engines: {node: '>=0.12.0'} dependencies: original: 1.0.2 - dev: true /evp_bytestokey/1.0.3: resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} @@ -11906,6 +12088,22 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color + + /expand-brackets/2.1.4_supports-color@6.1.0: + resolution: {integrity: sha1-t3c14xXOMPa27/D4OwQVGiJEliI=} + engines: {node: '>=0.10.0'} + dependencies: + debug: 2.6.9_supports-color@6.1.0 + define-property: 0.2.5 + extend-shallow: 2.0.1 + posix-character-classes: 0.1.1 + regex-not: 1.0.2 + snapdragon: 0.8.2_supports-color@6.1.0 + to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color /expand-tilde/2.0.2: resolution: {integrity: sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=} @@ -11948,6 +12146,45 @@ packages: type-is: 1.6.18 utils-merge: 1.0.1 vary: 1.1.2 + transitivePeerDependencies: + - supports-color + + /express/4.17.3_supports-color@6.1.0: + resolution: {integrity: sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg==} + engines: {node: '>= 0.10.0'} + dependencies: + accepts: 1.3.8 + array-flatten: 1.1.1 + body-parser: 1.19.2_supports-color@6.1.0 + content-disposition: 0.5.4 + content-type: 1.0.4 + cookie: 0.4.2 + cookie-signature: 1.0.6 + debug: 2.6.9_supports-color@6.1.0 + depd: 1.1.2 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 1.1.2_supports-color@6.1.0 + fresh: 0.5.2 + merge-descriptors: 1.0.1 + methods: 1.1.2 + on-finished: 2.3.0 + parseurl: 1.3.3 + path-to-regexp: 0.1.7 + proxy-addr: 2.0.7 + qs: 6.9.7 + range-parser: 1.2.1 + safe-buffer: 5.2.1 + send: 0.17.2_supports-color@6.1.0 + serve-static: 1.14.2_supports-color@6.1.0 + setprototypeof: 1.2.0 + statuses: 1.5.0 + type-is: 1.6.18 + utils-merge: 1.0.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color /ext/1.6.0: resolution: {integrity: sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==} @@ -12002,6 +12239,23 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color + + /extglob/2.0.4_supports-color@6.1.0: + resolution: {integrity: sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==} + engines: {node: '>=0.10.0'} + dependencies: + array-unique: 0.3.2 + define-property: 1.0.0 + expand-brackets: 2.1.4_supports-color@6.1.0 + extend-shallow: 2.0.1 + fragment-cache: 0.2.1 + regex-not: 1.0.2 + snapdragon: 0.8.2_supports-color@6.1.0 + to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color /extract-zip/2.0.1: resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} @@ -12049,6 +12303,8 @@ packages: is-glob: 4.0.3 merge2: 1.4.1 micromatch: 3.1.10 + transitivePeerDependencies: + - supports-color dev: true /fast-glob/3.2.11: @@ -12087,7 +12343,6 @@ packages: /fastest-levenshtein/1.0.12: resolution: {integrity: sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==} - dev: true /fastq/1.10.1: resolution: {integrity: sha512-AWuv6Ery3pM+dY7LYS8YIaCiQvUaos9OB1RyNgaOWnaX+Tik7Onvcsf8x8c+YtDeT0maYLniBip2hox5KtEXXA==} @@ -12181,7 +12436,6 @@ packages: /figgy-pudding/3.5.2: resolution: {integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==} - dev: true /file-entry-cache/6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} @@ -12220,7 +12474,6 @@ packages: /file-uri-to-path/1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} - dev: true optional: true /filesize/8.0.7: @@ -12264,6 +12517,8 @@ packages: parseurl: 1.3.3 statuses: 1.3.1 unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color dev: true /finalhandler/1.1.2: @@ -12277,6 +12532,22 @@ packages: parseurl: 1.3.3 statuses: 1.5.0 unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + + /finalhandler/1.1.2_supports-color@6.1.0: + resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} + engines: {node: '>= 0.8'} + dependencies: + debug: 2.6.9_supports-color@6.1.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + on-finished: 2.3.0 + parseurl: 1.3.3 + statuses: 1.5.0 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color /find-cache-dir/2.1.0: resolution: {integrity: sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==} @@ -12285,7 +12556,6 @@ packages: commondir: 1.0.1 make-dir: 2.1.0 pkg-dir: 3.0.0 - dev: true /find-cache-dir/3.3.2: resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==} @@ -12337,6 +12607,8 @@ packages: dependencies: fs-extra: 4.0.3 micromatch: 3.1.10 + transitivePeerDependencies: + - supports-color /find-yarn-workspace-root/2.0.0: resolution: {integrity: sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==} @@ -12358,6 +12630,8 @@ packages: is-glob: 3.1.0 micromatch: 3.1.10 resolve-dir: 1.0.1 + transitivePeerDependencies: + - supports-color dev: true /findup-sync/3.0.0: @@ -12368,6 +12642,8 @@ packages: is-glob: 4.0.3 micromatch: 3.1.10 resolve-dir: 1.0.1 + transitivePeerDependencies: + - supports-color dev: true /fined/1.2.0: @@ -12409,7 +12685,6 @@ packages: dependencies: inherits: 2.0.4 readable-stream: 2.3.7 - dev: true /flux/4.0.3_react@17.0.2: resolution: {integrity: sha512-yKAbrp7JhZhj6uiT1FTuVMlIAT1J4jqEyBpFApi1kxpGZCvacMVc/t1pMQyotqHhAgvoE3bNvAykhCo2CLjnYw==} @@ -12442,7 +12717,6 @@ packages: optional: true dependencies: debug: 4.3.4_supports-color@6.1.0 - dev: true /for-each/0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -12475,20 +12749,35 @@ packages: /forever-agent/0.6.1: resolution: {integrity: sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=} - /fork-ts-checker-webpack-plugin/4.1.6: + /fork-ts-checker-webpack-plugin/4.1.6_m7oz2meinfq2uoednww5reueli: resolution: {integrity: sha512-DUxuQaKoqfNne8iikd14SAkh5uw4+8vNifp6gmA73yYNS6ywLIWSLD/n/mBzHQRpW3J7rbATEakmiA8JvkTyZw==} engines: {node: '>=6.11.5', yarn: '>=1.0.0'} + peerDependencies: + eslint: '>= 6' + typescript: '>= 2.7' + vue-template-compiler: '*' + webpack: '>= 4' + peerDependenciesMeta: + eslint: + optional: true + vue-template-compiler: + optional: true dependencies: '@babel/code-frame': 7.16.7 chalk: 2.4.2 + eslint: 7.19.0 micromatch: 3.1.10 minimatch: 3.0.4 semver: 5.7.1 tapable: 1.1.3 + typescript: 4.6.2 + webpack: 4.46.0_webpack-cli@4.9.2 worker-rpc: 0.1.1 + transitivePeerDependencies: + - supports-color dev: true - /fork-ts-checker-webpack-plugin/6.5.0_67dd9d30886961aa38836dadd892845a: + /fork-ts-checker-webpack-plugin/6.5.0_m7oz2meinfq2uoednww5reueli: resolution: {integrity: sha512-cS178Y+xxtIjEUorcHddKS7yCMlrDPV31mt47blKKRfMd70Kxu5xruAFE2o9sDY6wVC5deuob/u/alD04YYHnw==} engines: {node: '>=10', yarn: '>=1.0.0'} peerDependencies: @@ -12520,7 +12809,7 @@ packages: webpack: 4.46.0_webpack-cli@4.9.2 dev: true - /fork-ts-checker-webpack-plugin/6.5.0_a9e29ceb10bb184c389afc87c5f7cb16: + /fork-ts-checker-webpack-plugin/6.5.0_vhrjz2yqxmmeyoe27sd4l56lcy: resolution: {integrity: sha512-cS178Y+xxtIjEUorcHddKS7yCMlrDPV31mt47blKKRfMd70Kxu5xruAFE2o9sDY6wVC5deuob/u/alD04YYHnw==} engines: {node: '>=10', yarn: '>=1.0.0'} peerDependencies: @@ -12587,7 +12876,7 @@ packages: dependencies: map-cache: 0.2.2 - /framer-motion/4.1.17_react-dom@17.0.2+react@17.0.2: + /framer-motion/4.1.17_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-thx1wvKzblzbs0XaK2X0G1JuwIdARcoNOW7VVwjO8BUltzXPyONGAElLu6CiCScsOQRI7FIk/45YTFtJw5Yozw==} peerDependencies: react: '>=16.8 || ^17.0.0' @@ -12619,7 +12908,6 @@ packages: dependencies: inherits: 2.0.4 readable-stream: 2.3.7 - dev: true /fs-extra/0.30.0: resolution: {integrity: sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=} @@ -12711,7 +12999,6 @@ packages: iferr: 0.1.5 imurmurhash: 0.1.4 readable-stream: 2.3.7 - dev: true /fs.realpath/1.0.0: resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=} @@ -12725,7 +13012,6 @@ packages: dependencies: bindings: 1.5.0 nan: 2.15.0 - dev: true optional: true /fsevents/2.3.2: @@ -12795,6 +13081,10 @@ packages: optionalDependencies: ethereumjs-wallet: 0.6.5 web3: 1.2.11 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate bundledDependencies: - keccak @@ -12889,7 +13179,6 @@ packages: dependencies: is-glob: 3.1.0 path-dirname: 1.0.2 - dev: true /glob-parent/5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} @@ -12948,6 +13237,8 @@ packages: just-debounce: 1.1.0 normalize-path: 3.0.0 object.defaults: 1.1.0 + transitivePeerDependencies: + - supports-color dev: true /glob/7.1.6: @@ -13084,7 +13375,6 @@ packages: object-assign: 4.1.1 pify: 2.3.0 pinkie-promise: 2.0.1 - dev: true /globby/9.2.0: resolution: {integrity: sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==} @@ -13098,6 +13388,8 @@ packages: ignore: 4.0.6 pify: 4.0.1 slash: 2.0.0 + transitivePeerDependencies: + - supports-color dev: true /glogg/1.0.2: @@ -13111,6 +13403,8 @@ packages: resolution: {integrity: sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==} engines: {node: '>=4'} dependencies: + '@types/keyv': 3.1.4 + '@types/responselike': 1.0.0 decompress-response: 3.3.0 duplexer3: 0.1.4 get-stream: 3.0.0 @@ -13133,6 +13427,8 @@ packages: dependencies: '@sindresorhus/is': 0.14.0 '@szmarczak/http-timer': 1.1.2 + '@types/keyv': 3.1.4 + '@types/responselike': 1.0.0 cacheable-request: 6.1.0 decompress-response: 3.3.0 duplexer3: 0.1.4 @@ -13200,6 +13496,8 @@ packages: semver-greatest-satisfied-range: 1.1.0 v8flags: 3.2.0 yargs: 7.1.2 + transitivePeerDependencies: + - supports-color dev: true /gulp-sass/5.1.0: @@ -13223,6 +13521,8 @@ packages: gulp-cli: 2.3.0 undertaker: 1.3.0 vinyl-fs: 3.0.3 + transitivePeerDependencies: + - supports-color dev: true /gulplog/1.0.0: @@ -13533,7 +13833,6 @@ packages: /html-entities/1.4.0: resolution: {integrity: sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==} - dev: true /html-entities/2.3.2: resolution: {integrity: sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ==} @@ -13671,17 +13970,17 @@ packages: - supports-color dev: true - /http-proxy-middleware/0.19.1_debug@4.3.4: + /http-proxy-middleware/0.19.1_tmpgdztspuwvsxzgjkhoqk7duq: resolution: {integrity: sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q==} engines: {node: '>=4.0.0'} dependencies: http-proxy: 1.18.1_debug@4.3.4 is-glob: 4.0.3 lodash: 4.17.21 - micromatch: 3.1.10 + micromatch: 3.1.10_supports-color@6.1.0 transitivePeerDependencies: - debug - dev: true + - supports-color /http-proxy-middleware/2.0.3_@types+express@4.17.13: resolution: {integrity: sha512-1bloEwnrHMnCoO/Gcwbz7eSVvW50KPES01PecpagI+YLNLci4AcuKJrujW4Mc3sBLpFxMSlsLNHS5Nl/lvrTPA==} @@ -13721,7 +14020,6 @@ packages: requires-port: 1.0.0 transitivePeerDependencies: - debug - dev: true /http-signature/1.2.0: resolution: {integrity: sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=} @@ -13791,7 +14089,6 @@ packages: /iferr/0.1.5: resolution: {integrity: sha1-xg7taebY/bazEEofy8ocGS3FtQE=} - dev: true /ignore/4.0.6: resolution: {integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==} @@ -13847,7 +14144,6 @@ packages: dependencies: pkg-dir: 3.0.0 resolve-cwd: 2.0.0 - dev: true /import-local/3.1.0: resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} @@ -13856,7 +14152,6 @@ packages: dependencies: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 - dev: true /imurmurhash/0.1.4: resolution: {integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=} @@ -13868,7 +14163,6 @@ packages: /infer-owner/1.0.4: resolution: {integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==} - dev: true /infima/0.2.0-alpha.37: resolution: {integrity: sha512-4GX7Baw+/lwS4PPW/UJNY89tWSvYG1DL6baKVdpK6mC593iRgMssxNtORMTFArLPJ/A/lzsGhRmx+z6MaMxj0Q==} @@ -13883,7 +14177,6 @@ packages: /inherits/2.0.1: resolution: {integrity: sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=} - dev: true /inherits/2.0.3: resolution: {integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=} @@ -13908,7 +14201,6 @@ packages: dependencies: default-gateway: 4.2.0 ipaddr.js: 1.9.1 - dev: true /internal-slot/1.0.3: resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} @@ -13925,7 +14217,6 @@ packages: /interpret/2.2.0: resolution: {integrity: sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==} engines: {node: '>= 0.10'} - dev: true /invariant/2.2.4: resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} @@ -13939,7 +14230,6 @@ packages: /ip-regex/2.1.0: resolution: {integrity: sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=} engines: {node: '>=4'} - dev: true /ip/1.1.5: resolution: {integrity: sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=} @@ -13956,7 +14246,6 @@ packages: /is-absolute-url/3.0.3: resolution: {integrity: sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==} engines: {node: '>=8'} - dev: true /is-absolute/1.0.0: resolution: {integrity: sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==} @@ -14007,7 +14296,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: binary-extensions: 1.13.1 - dev: true /is-binary-path/2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} @@ -14151,7 +14439,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 - dev: true /is-glob/4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} @@ -14261,7 +14548,6 @@ packages: engines: {node: '>=6'} dependencies: is-path-inside: 2.1.0 - dev: true /is-path-inside/1.0.1: resolution: {integrity: sha1-jvW33lBDej/cprToZe96pVy0gDY=} @@ -14275,7 +14561,6 @@ packages: engines: {node: '>=6'} dependencies: path-is-inside: 1.0.2 - dev: true /is-path-inside/3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} @@ -14431,7 +14716,6 @@ packages: /is-wsl/1.1.0: resolution: {integrity: sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=} engines: {node: '>=4'} - dev: true /is-wsl/2.2.0: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} @@ -14564,6 +14848,8 @@ packages: walker: 1.0.8 optionalDependencies: fsevents: 2.3.2 + transitivePeerDependencies: + - supports-color dev: true /jest-regex-util/26.0.0: @@ -14748,6 +15034,8 @@ packages: json-rpc-error: 2.0.0 promise-to-callback: 1.0.0 safe-event-emitter: 1.0.1 + transitivePeerDependencies: + - supports-color /json-rpc-engine/5.4.0: resolution: {integrity: sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g==} @@ -14877,7 +15165,6 @@ packages: /killable/1.0.1: resolution: {integrity: sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg==} - dev: true /kind-of/1.1.0: resolution: {integrity: sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=} @@ -15111,6 +15398,8 @@ packages: object.map: 1.0.1 rechoir: 0.6.2 resolve: 1.22.0 + transitivePeerDependencies: + - supports-color dev: true /lilconfig/2.0.4: @@ -15148,7 +15437,6 @@ packages: /loader-runner/2.4.0: resolution: {integrity: sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==} engines: {node: '>=4.3.0 <5.0.0 || >=5.10'} - dev: true /loader-runner/4.2.0: resolution: {integrity: sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==} @@ -15331,7 +15619,6 @@ packages: /loglevel/1.8.0: resolution: {integrity: sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA==} engines: {node: '>= 0.6.0'} - dev: true /looper/2.0.0: resolution: {integrity: sha1-Zs0Md0rz1P7axTeU90LbVtqPCew=} @@ -15415,7 +15702,6 @@ packages: dependencies: pify: 4.0.1 semver: 5.7.1 - dev: true /make-dir/3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} @@ -15490,6 +15776,8 @@ packages: micromatch: 3.1.10 resolve: 1.22.0 stack-trace: 0.0.10 + transitivePeerDependencies: + - supports-color dev: true /md5.js/1.3.5: @@ -15578,7 +15866,6 @@ packages: dependencies: errno: 0.1.8 readable-stream: 2.3.7 - dev: true /memory-fs/0.5.0: resolution: {integrity: sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==} @@ -15586,7 +15873,6 @@ packages: dependencies: errno: 0.1.8 readable-stream: 2.3.7 - dev: true /memorystream/0.3.1: resolution: {integrity: sha1-htcJCzDORV1j+64S3aUaR93K+bI=} @@ -15671,6 +15957,28 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color + + /micromatch/3.1.10_supports-color@6.1.0: + resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==} + engines: {node: '>=0.10.0'} + dependencies: + arr-diff: 4.0.0 + array-unique: 0.3.2 + braces: 2.3.2_supports-color@6.1.0 + define-property: 2.0.2 + extend-shallow: 3.0.2 + extglob: 2.0.4_supports-color@6.1.0 + fragment-cache: 0.2.1 + kind-of: 6.0.3 + nanomatch: 1.2.13_supports-color@6.1.0 + object.pick: 1.3.0 + regex-not: 1.0.2 + snapdragon: 0.8.2_supports-color@6.1.0 + to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color /micromatch/4.0.4: resolution: {integrity: sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==} @@ -15722,7 +16030,6 @@ packages: resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} engines: {node: '>=4.0.0'} hasBin: true - dev: true /mime/3.0.0: resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} @@ -15747,7 +16054,7 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} - /mini-create-react-context/0.4.1_prop-types@15.8.1+react@17.0.2: + /mini-create-react-context/0.4.1_at7mkepldmzoo6silmqc5bca74: resolution: {integrity: sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ==} peerDependencies: prop-types: ^15.0.0 @@ -15867,7 +16174,6 @@ packages: pumpify: 1.5.1 stream-each: 1.2.3 through2: 2.0.5 - dev: true /mitt/1.2.0: resolution: {integrity: sha512-r6lj77KlwqLhIUku9UWYes7KJtsczvolZkzp8hbaDPPaE24OmWl5s539Mytlj22siEQKosZ26qCBgda2PKwoJw==} @@ -15956,7 +16262,6 @@ packages: mkdirp: 0.5.5 rimraf: 2.7.1 run-queue: 1.0.3 - dev: true /mrmime/1.0.0: resolution: {integrity: sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ==} @@ -16031,7 +16336,6 @@ packages: /nan/2.15.0: resolution: {integrity: sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==} - dev: true optional: true /nano-json-stream-parser/0.1.2: @@ -16070,6 +16374,26 @@ packages: regex-not: 1.0.2 snapdragon: 0.8.2 to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color + + /nanomatch/1.2.13_supports-color@6.1.0: + resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==} + engines: {node: '>=0.10.0'} + dependencies: + arr-diff: 4.0.0 + array-unique: 0.3.2 + define-property: 2.0.2 + extend-shallow: 3.0.2 + fragment-cache: 0.2.1 + is-windows: 1.0.2 + kind-of: 6.0.3 + object.pick: 1.3.0 + regex-not: 1.0.2 + snapdragon: 0.8.2_supports-color@6.1.0 + to-regex: 3.0.2 + transitivePeerDependencies: + - supports-color /natural-compare/1.4.0: resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=} @@ -16137,7 +16461,6 @@ packages: /node-forge/0.10.0: resolution: {integrity: sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==} engines: {node: '>= 6.0.0'} - dev: true /node-forge/1.2.1: resolution: {integrity: sha512-Fcvtbb+zBcZXbTTVwqGA5W+MKBj56UjVRevvchv5XrcyXbmNdesfZL37nlcWOfpgHhgmxApw3tQbTr4CqNmX4w==} @@ -16178,7 +16501,6 @@ packages: url: 0.11.0 util: 0.11.1 vm-browserify: 1.1.2 - dev: true /node-polyfill-webpack-plugin/1.1.4: resolution: {integrity: sha512-Z0XTKj1wRWO8o/Vjobsw5iOJCN+Sua3EZEUc2Ziy9CyVvmHKu6o+t4gUH9GOE0czyPR94LI6ZCV/PpcM8b5yow==} @@ -16228,7 +16550,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: remove-trailing-separator: 1.1.0 - dev: true /normalize-path/3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} @@ -16498,7 +16819,6 @@ packages: engines: {node: '>=4'} dependencies: is-wsl: 1.1.0 - dev: true /optionator/0.8.3: resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} @@ -16533,7 +16853,6 @@ packages: resolution: {integrity: sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==} dependencies: url-parse: 1.5.10 - dev: true /os-browserify/0.3.0: resolution: {integrity: sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=} @@ -16650,7 +16969,6 @@ packages: engines: {node: '>=6'} dependencies: retry: 0.12.0 - dev: true /p-retry/4.6.1: resolution: {integrity: sha512-e2xXGNhZOZ0lfgR9kL34iGlU8N/KO0xZnQxVEwdeOvpqNDQfdnxIYizvWtK8RglUa3bGqI8g0R/BdfzLMxRkiA==} @@ -16697,7 +17015,6 @@ packages: cyclist: 1.0.1 inherits: 2.0.4 readable-stream: 2.3.7 - dev: true /param-case/3.0.4: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} @@ -16823,6 +17140,8 @@ packages: semver: 5.7.1 slash: 2.0.0 tmp: 0.0.33 + transitivePeerDependencies: + - supports-color /patch-package/6.4.7: resolution: {integrity: sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ==} @@ -16845,14 +17164,12 @@ packages: /path-browserify/0.0.1: resolution: {integrity: sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==} - dev: true /path-browserify/1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} /path-dirname/1.0.2: resolution: {integrity: sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=} - dev: true /path-exists/2.1.0: resolution: {integrity: sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=} @@ -17006,7 +17323,6 @@ packages: engines: {node: '>=6'} dependencies: find-up: 3.0.0 - dev: true /pkg-dir/4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} @@ -17138,6 +17454,19 @@ packages: async: 2.6.2 debug: 3.2.7 mkdirp: 0.5.5 + transitivePeerDependencies: + - supports-color + dev: false + + /portfinder/1.0.28_supports-color@6.1.0: + resolution: {integrity: sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==} + engines: {node: '>= 0.12.0'} + dependencies: + async: 2.6.2 + debug: 3.2.7_supports-color@6.1.0 + mkdirp: 0.5.5 + transitivePeerDependencies: + - supports-color /portscanner/2.1.1: resolution: {integrity: sha1-6rtAnk3iSVD1oqUW01rnaTQ/u5Y=} @@ -17236,7 +17565,7 @@ packages: postcss: 7.0.39 dev: true - /postcss-loader/4.3.0_postcss@7.0.39+webpack@4.46.0: + /postcss-loader/4.3.0_gzaxsinx64nntyd3vmdqwl7coe: resolution: {integrity: sha512-M/dSoIiNDOo8Rk0mUqoj4kpGq91gcxCfb9PoyZVdZ76/AuhxylHDYZblNE8o+EQ9AMSASeMFEKxZf5aU6wlx1Q==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -17252,7 +17581,7 @@ packages: webpack: 4.46.0_webpack-cli@4.9.2 dev: true - /postcss-loader/6.2.1_postcss@8.4.8+webpack@5.70.0: + /postcss-loader/6.2.1_ekn6crlz27cphneud6qwcz75tm: resolution: {integrity: sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q==} engines: {node: '>= 12.13.0'} peerDependencies: @@ -17748,9 +18077,15 @@ packages: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} engines: {node: '>=0.4.0'} - /promise-inflight/1.0.1: + /promise-inflight/1.0.1_bluebird@3.7.2: resolution: {integrity: sha1-mEcocL8igTL8vdhoEputEsPAKeM=} - dev: true + peerDependencies: + bluebird: '*' + peerDependenciesMeta: + bluebird: + optional: true + dependencies: + bluebird: 3.7.2 /promise-to-callback/1.0.0: resolution: {integrity: sha1-XSp0kBC/tn2WNZj805YHRqaP7vc=} @@ -17882,7 +18217,6 @@ packages: dependencies: end-of-stream: 1.4.4 once: 1.4.0 - dev: true /pump/3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} @@ -17896,7 +18230,6 @@ packages: duplexify: 3.7.1 inherits: 2.0.4 pump: 2.0.1 - dev: true /punycode/1.3.2: resolution: {integrity: sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=} @@ -17988,7 +18321,6 @@ packages: /querystringify/2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} - dev: true /queue-microtask/1.2.2: resolution: {integrity: sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==} @@ -18067,7 +18399,7 @@ packages: pure-color: 1.3.0 dev: false - /react-colorful/5.5.1_react-dom@17.0.2+react@17.0.2: + /react-colorful/5.5.1_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-M1TJH2X3RXEt12sWkpa6hLc/bbYS0H6F4rIqjQZ+RxNBstpY67d9TrFXtqdZwhpmBXcCwEi7stKqFue3ZRkiOg==} peerDependencies: react: '>=16.8.0' @@ -18077,7 +18409,7 @@ packages: react-dom: 17.0.2_react@17.0.2 dev: true - /react-dev-utils/12.0.0_a9e29ceb10bb184c389afc87c5f7cb16: + /react-dev-utils/12.0.0_vhrjz2yqxmmeyoe27sd4l56lcy: resolution: {integrity: sha512-xBQkitdxozPxt1YZ9O1097EJiVpwHr9FoAuEVURCKV0Av8NBERovJauzP7bo1ThvuhZ4shsQ1AJiu4vQpoT1AQ==} engines: {node: '>=14'} dependencies: @@ -18090,7 +18422,7 @@ packages: escape-string-regexp: 4.0.0 filesize: 8.0.7 find-up: 5.0.0 - fork-ts-checker-webpack-plugin: 6.5.0_a9e29ceb10bb184c389afc87c5f7cb16 + fork-ts-checker-webpack-plugin: 6.5.0_vhrjz2yqxmmeyoe27sd4l56lcy global-modules: 2.0.0 globby: 11.0.4 gzip-size: 6.0.0 @@ -18107,6 +18439,7 @@ packages: text-table: 0.2.0 transitivePeerDependencies: - eslint + - supports-color - typescript - vue-template-compiler - webpack @@ -18160,7 +18493,6 @@ packages: object-assign: 4.1.1 react: 17.0.1 scheduler: 0.20.2 - dev: false /react-dom/17.0.2_react@17.0.2: resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} @@ -18171,9 +18503,8 @@ packages: object-assign: 4.1.1 react: 17.0.2 scheduler: 0.20.2 - dev: false - /react-draggable/4.4.4_react-dom@17.0.2+react@17.0.2: + /react-draggable/4.4.4_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-6e0WdcNLwpBx/YIDpoyd2Xb04PB0elrDrulKUgdrIlwuYvxh5Ok9M+F8cljm8kPXXs43PmMzek9RrB1b7mLMqA==} peerDependencies: react: '>= 16.3.0' @@ -18185,7 +18516,7 @@ packages: react-dom: 17.0.2_react@17.0.2 dev: true - /react-element-to-jsx-string/14.3.4_react-dom@17.0.2+react@17.0.2: + /react-element-to-jsx-string/14.3.4_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-t4ZwvV6vwNxzujDQ+37bspnLwA4JlgUPWhLjBJWsNIDceAf6ZKUTCjdm08cN6WeZ5pTMKiCJkmAYnpmR4Bm+dg==} peerDependencies: react: ^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1 @@ -18233,7 +18564,7 @@ packages: react: 17.0.2 dev: false - /react-helmet-async/1.2.3_react-dom@17.0.2+react@17.0.2: + /react-helmet-async/1.2.3_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-mCk2silF53Tq/YaYdkl2sB+/tDoPnaxN7dFS/6ZLJb/rhUY2EWGI5Xj2b4jHppScMqY45MbgPSwTxDchKpZ5Kw==} peerDependencies: react: ^16.6.0 || ^17.0.0 @@ -18247,7 +18578,7 @@ packages: react-fast-compare: 3.2.0 shallowequal: 1.1.0 - /react-helmet-async/1.3.0_react-dom@17.0.2+react@17.0.2: + /react-helmet-async/1.3.0_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg==} peerDependencies: react: ^16.6.0 || ^17.0.0 || ^18.0.0 @@ -18283,7 +18614,7 @@ packages: resolution: {integrity: sha512-yUcBYdBBbo3QiPsgYDcfQcIkGZHfxOaoE6HLSnr1sPzMhdyxusbfKOSUbSd/ocGi32dxcj366PsTj+5oggeKKw==} dev: false - /react-json-view/1.21.3_f456dfc349ace84b0ea11d9e6e4ef3ab: + /react-json-view/1.21.3_6rln7q2jvtuewdvbdwpg4txtvm: resolution: {integrity: sha512-13p8IREj9/x/Ye4WI/JpjhoIwuzEgUAtgJZNBJckfzJt1qyh24BdTm6UQNGnyTq9dapQdrqvquZTo3dz1X6Cjw==} peerDependencies: react: ^17.0.0 || ^16.3.0 || ^15.5.4 @@ -18294,7 +18625,7 @@ packages: react-base16-styling: 0.6.0 react-dom: 17.0.2_react@17.0.2 react-lifecycles-compat: 3.0.4 - react-textarea-autosize: 8.3.3_00d6772dea80510e818fd171caaa025a + react-textarea-autosize: 8.3.3_adlholpkqbiq5amp2fy4vkqcli transitivePeerDependencies: - '@types/react' - encoding @@ -18304,7 +18635,7 @@ packages: resolution: {integrity: sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==} dev: false - /react-loadable-ssr-addon-v5-slorber/1.0.1_fc6fb9624e95c2b0f71335ab282dbb6a: + /react-loadable-ssr-addon-v5-slorber/1.0.1_7rx3sysosxblb5ytgwvsqln3ni: resolution: {integrity: sha512-lq3Lyw1lGku8zUEJPDxsNm1AfYHBrO9Y1+olAYwpUJ2IGFBskM0DMKok97A6LWUpHm+o7IvQBOWu9MLenp9Z+A==} engines: {node: '>=10.13.0'} peerDependencies: @@ -18316,7 +18647,7 @@ packages: webpack: 5.70.0 dev: false - /react-popper-tooltip/3.1.1_react-dom@17.0.2+react@17.0.2: + /react-popper-tooltip/3.1.1_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-EnERAnnKRptQBJyaee5GJScWNUKQPDD2ywvzZyUjst/wj5U64C8/CnSYLNEmP2hG0IJ3ZhtDxE8oDN+KOyavXQ==} peerDependencies: react: ^16.6.0 || ^17.0.0 @@ -18326,10 +18657,10 @@ packages: '@popperjs/core': 2.11.2 react: 17.0.2 react-dom: 17.0.2_react@17.0.2 - react-popper: 2.2.5_4d48938cec404f33c7375aa6b453941c + react-popper: 2.2.5_jvejhdhmibhthrzxlktliu4udq dev: true - /react-popper/2.2.5_4d48938cec404f33c7375aa6b453941c: + /react-popper/2.2.5_jvejhdhmibhthrzxlktliu4udq: resolution: {integrity: sha512-kxGkS80eQGtLl18+uig1UIf9MKixFSyPxglsgLBxlYnyDf65BiY9B3nZSc6C9XUNDgStROB0fMQlTEz1KxGddw==} peerDependencies: '@popperjs/core': ^2.0.0 @@ -18351,7 +18682,7 @@ packages: engines: {node: '>=0.10.0'} dev: true - /react-router-config/5.1.1_react-router@5.2.1+react@17.0.2: + /react-router-config/5.1.1_eui4og74r262zsjriwu2mckbem: resolution: {integrity: sha512-DuanZjaD8mQp1ppHjgnnUnyOlqYXZVjnov/JzFhjLEwd3Z4dYjMSnqrEzzGThH47vpCOqPPwJM2FtthLeJ8Pbg==} peerDependencies: react: '>=15' @@ -18377,7 +18708,7 @@ packages: tiny-warning: 1.0.3 dev: false - /react-router-dom/6.2.2_react-dom@17.0.2+react@17.0.2: + /react-router-dom/6.2.2_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-AtYEsAST7bDD4dLSQHDnk/qxWLJdad5t1HFa1qJyUrCeGgEuCSw0VB/27ARbF9Fi/W5598ujvJOm3ujUCVzuYQ==} peerDependencies: react: '>=16.8' @@ -18398,7 +18729,7 @@ packages: history: 4.10.1 hoist-non-react-statics: 3.3.2 loose-envify: 1.4.0 - mini-create-react-context: 0.4.1_prop-types@15.8.1+react@17.0.2 + mini-create-react-context: 0.4.1_at7mkepldmzoo6silmqc5bca74 path-to-regexp: 1.8.0 prop-types: 15.8.1 react: 17.0.2 @@ -18438,7 +18769,7 @@ packages: refractor: 3.6.0 dev: true - /react-textarea-autosize/8.3.3_00d6772dea80510e818fd171caaa025a: + /react-textarea-autosize/8.3.3_adlholpkqbiq5amp2fy4vkqcli: resolution: {integrity: sha512-2XlHXK2TDxS6vbQaoPbMOfQ8GK7+irc2fVK6QFIcC8GOnH3zI/v481n+j1L0WaPVvKxwesnY93fEfH++sus2rQ==} engines: {node: '>=10'} peerDependencies: @@ -18447,12 +18778,12 @@ packages: '@babel/runtime': 7.17.2 react: 17.0.2 use-composed-ref: 1.2.1_react@17.0.2 - use-latest: 1.2.0_00d6772dea80510e818fd171caaa025a + use-latest: 1.2.0_adlholpkqbiq5amp2fy4vkqcli transitivePeerDependencies: - '@types/react' dev: false - /react-textarea-autosize/8.3.3_@types+react@17.0.1+react@17.0.2: + /react-textarea-autosize/8.3.3_wk7fohhuxwcjfgq2kdoh4ny7by: resolution: {integrity: sha512-2XlHXK2TDxS6vbQaoPbMOfQ8GK7+irc2fVK6QFIcC8GOnH3zI/v481n+j1L0WaPVvKxwesnY93fEfH++sus2rQ==} engines: {node: '>=10'} peerDependencies: @@ -18461,7 +18792,7 @@ packages: '@babel/runtime': 7.17.2 react: 17.0.2 use-composed-ref: 1.2.1_react@17.0.2 - use-latest: 1.2.0_@types+react@17.0.1+react@17.0.2 + use-latest: 1.2.0_wk7fohhuxwcjfgq2kdoh4ny7by transitivePeerDependencies: - '@types/react' dev: true @@ -18481,7 +18812,6 @@ packages: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - dev: false /react/17.0.2: resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} @@ -18566,7 +18896,18 @@ packages: graceful-fs: 4.2.9 micromatch: 3.1.10 readable-stream: 2.3.7 - dev: true + transitivePeerDependencies: + - supports-color + + /readdirp/2.2.1_supports-color@6.1.0: + resolution: {integrity: sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==} + engines: {node: '>=0.10'} + dependencies: + graceful-fs: 4.2.9 + micromatch: 3.1.10_supports-color@6.1.0 + readable-stream: 2.3.7 + transitivePeerDependencies: + - supports-color /readdirp/3.5.0: resolution: {integrity: sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==} @@ -18596,7 +18937,6 @@ packages: engines: {node: '>= 0.10'} dependencies: resolve: 1.22.0 - dev: true /recursive-readdir/2.2.2: resolution: {integrity: sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==} @@ -18827,7 +19167,6 @@ packages: /remove-trailing-separator/1.1.0: resolution: {integrity: sha1-wkvOKig62tW8P1jg1IJJuSN52O8=} - dev: true /renderkid/2.0.7: resolution: {integrity: sha512-oCcFyxaMrKsKcTY59qnCAtmDVSLfPbrv6A3tVbPdFMMrv5jaK10V6m40cKsoPNhAqN6rmHW9sswW4o3ruSrwUQ==} @@ -18938,14 +19277,12 @@ packages: engines: {node: '>=4'} dependencies: resolve-from: 3.0.0 - dev: true /resolve-cwd/3.0.0: resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} engines: {node: '>=8'} dependencies: resolve-from: 5.0.0 - dev: true /resolve-dir/1.0.1: resolution: {integrity: sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=} @@ -18958,7 +19295,6 @@ packages: /resolve-from/3.0.0: resolution: {integrity: sha1-six699nWiBvItuZTM17rywoYh0g=} engines: {node: '>=4'} - dev: true /resolve-from/4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} @@ -18996,6 +19332,8 @@ packages: dependencies: debug: 2.6.9 minimatch: 3.0.4 + transitivePeerDependencies: + - supports-color dev: true /responselike/1.0.2: @@ -19015,7 +19353,6 @@ packages: /retry/0.12.0: resolution: {integrity: sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=} engines: {node: '>= 4'} - dev: true /retry/0.13.1: resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} @@ -19078,7 +19415,6 @@ packages: resolution: {integrity: sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=} dependencies: aproba: 1.2.0 - dev: true /rustbn.js/0.2.0: resolution: {integrity: sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==} @@ -19139,6 +19475,8 @@ packages: micromatch: 3.1.10 minimist: 1.2.5 walker: 1.0.8 + transitivePeerDependencies: + - supports-color dev: true /sass/1.49.9: @@ -19174,7 +19512,6 @@ packages: dependencies: loose-envify: 1.4.0 object-assign: 4.1.1 - dev: false /schema-utils/1.0.0: resolution: {integrity: sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==} @@ -19183,7 +19520,6 @@ packages: ajv: 6.12.6 ajv-errors: 1.0.1_ajv@6.12.6 ajv-keywords: 3.5.2_ajv@6.12.6 - dev: true /schema-utils/2.7.0: resolution: {integrity: sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==} @@ -19255,7 +19591,6 @@ packages: resolution: {integrity: sha512-lkjaiAye+wBZDCBsu5BGi0XiLRxeUlsGod5ZP924CRSEoGuZAw/f7y9RKu28rwTfiHVhdavhB0qH0INV6P1lEA==} dependencies: node-forge: 0.10.0 - dev: true /selfsigned/2.0.0: resolution: {integrity: sha512-cUdFiCbKoa1mZ6osuJs2uDHrs0k0oprsKveFiiaBKCNq3SYyb5gs2HxhQyDNLCmL51ZZThqi4YNDpCK6GOP1iQ==} @@ -19322,6 +19657,8 @@ packages: on-finished: 2.3.0 range-parser: 1.2.1 statuses: 1.4.0 + transitivePeerDependencies: + - supports-color dev: true /send/0.17.2: @@ -19341,12 +19678,33 @@ packages: on-finished: 2.3.0 range-parser: 1.2.1 statuses: 1.5.0 + transitivePeerDependencies: + - supports-color + + /send/0.17.2_supports-color@6.1.0: + resolution: {integrity: sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==} + engines: {node: '>= 0.8.0'} + dependencies: + debug: 2.6.9_supports-color@6.1.0 + depd: 1.1.2 + destroy: 1.0.4 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 0.5.2 + http-errors: 1.8.1 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.3.0 + range-parser: 1.2.1 + statuses: 1.5.0 + transitivePeerDependencies: + - supports-color /serialize-javascript/4.0.0: resolution: {integrity: sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==} dependencies: randombytes: 2.1.0 - dev: true /serialize-javascript/5.0.1: resolution: {integrity: sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==} @@ -19394,6 +19752,22 @@ packages: http-errors: 1.6.3 mime-types: 2.1.34 parseurl: 1.3.3 + transitivePeerDependencies: + - supports-color + + /serve-index/1.9.1_supports-color@6.1.0: + resolution: {integrity: sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=} + engines: {node: '>= 0.8.0'} + dependencies: + accepts: 1.3.8 + batch: 0.6.1 + debug: 2.6.9_supports-color@6.1.0 + escape-html: 1.0.3 + http-errors: 1.6.3 + mime-types: 2.1.34 + parseurl: 1.3.3 + transitivePeerDependencies: + - supports-color /serve-static/1.13.2: resolution: {integrity: sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==} @@ -19403,6 +19777,8 @@ packages: escape-html: 1.0.3 parseurl: 1.3.3 send: 0.16.2 + transitivePeerDependencies: + - supports-color dev: true /serve-static/1.14.2: @@ -19413,6 +19789,19 @@ packages: escape-html: 1.0.3 parseurl: 1.3.3 send: 0.17.2 + transitivePeerDependencies: + - supports-color + + /serve-static/1.14.2_supports-color@6.1.0: + resolution: {integrity: sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==} + engines: {node: '>= 0.8.0'} + dependencies: + encodeurl: 1.0.2 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 0.17.2_supports-color@6.1.0 + transitivePeerDependencies: + - supports-color /server-destroy/1.0.1: resolution: {integrity: sha1-8Tv5KOQrnD55OD5hzDmYtdFObN0=} @@ -19427,6 +19816,8 @@ packages: express: 4.17.3 request: 2.88.2 xhr: 2.6.0 + transitivePeerDependencies: + - supports-color optional: true /set-blocking/2.0.0: @@ -19556,7 +19947,7 @@ packages: sax: 1.2.4 dev: false - /siwe/1.1.6_ethers@5.6.2: + /siwe/1.1.6: resolution: {integrity: sha512-3WRdEil32Tc2vuNzqJ2/Z/MIvsvy0Nkzc2ov+QujmpHO7tM83dgcb47z0Pu236T4JQkOQCqQkq3AJ/rVIezniA==} peerDependencies: ethers: 5.5.1 @@ -19564,7 +19955,6 @@ packages: '@spruceid/siwe-parser': 1.1.3 '@stablelib/random': 1.0.1 apg-js: 4.1.1 - ethers: 5.6.2 dev: false /slash/1.0.0: @@ -19635,6 +20025,23 @@ packages: source-map: 0.5.7 source-map-resolve: 0.5.3 use: 3.1.1 + transitivePeerDependencies: + - supports-color + + /snapdragon/0.8.2_supports-color@6.1.0: + resolution: {integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==} + engines: {node: '>=0.10.0'} + dependencies: + base: 0.11.2 + debug: 2.6.9_supports-color@6.1.0 + define-property: 0.2.5 + extend-shallow: 2.0.1 + map-cache: 0.2.2 + source-map: 0.5.7 + source-map-resolve: 0.5.3 + use: 3.1.1 + transitivePeerDependencies: + - supports-color /socket.io-adapter/2.3.3: resolution: {integrity: sha512-Qd/iwn3VskrpNO60BeRyCyr8ZWw9CPZyitW4AQwmRZ8zCiyDiL+znRnWX6tDHXnWn1sJrM1+b6Mn6wEDJJ4aYQ==} @@ -19693,16 +20100,17 @@ packages: - utf-8-validate dev: true - /sockjs-client/1.6.0: + /sockjs-client/1.6.0_supports-color@6.1.0: resolution: {integrity: sha512-qVHJlyfdHFht3eBFZdKEXKTlb7I4IV41xnVNo8yUKA1UHcPJwgW2SvTq9LhnjjCywSkSK7c/e4nghU0GOoMCRQ==} engines: {node: '>=12'} dependencies: - debug: 3.2.7 + debug: 3.2.7_supports-color@6.1.0 eventsource: 1.1.0 faye-websocket: 0.11.4 inherits: 2.0.4 url-parse: 1.5.10 - dev: true + transitivePeerDependencies: + - supports-color /sockjs/0.3.24: resolution: {integrity: sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==} @@ -19868,7 +20276,6 @@ packages: wbuf: 1.7.3 transitivePeerDependencies: - supports-color - dev: true /spdy/4.0.2: resolution: {integrity: sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==} @@ -19894,7 +20301,6 @@ packages: spdy-transport: 3.0.0_supports-color@6.1.0 transitivePeerDependencies: - supports-color - dev: true /speed-measure-webpack-plugin/1.5.0_webpack@4.46.0: resolution: {integrity: sha512-Re0wX5CtM6gW7bZA64ONOfEPEhwbiSF/vz6e2GvadjuaPrQcHTQdRGsD8+BE7iUOysXH8tIenkPCQBEcspXsNg==} @@ -19945,7 +20351,6 @@ packages: resolution: {integrity: sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==} dependencies: figgy-pudding: 3.5.2 - dev: true /ssri/8.0.1: resolution: {integrity: sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==} @@ -20009,7 +20414,6 @@ packages: dependencies: inherits: 2.0.4 readable-stream: 2.3.7 - dev: true /stream-browserify/3.0.0: resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} @@ -20023,7 +20427,6 @@ packages: dependencies: end-of-stream: 1.4.4 stream-shift: 1.0.1 - dev: true /stream-exhaust/1.0.2: resolution: {integrity: sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==} @@ -20037,7 +20440,6 @@ packages: readable-stream: 2.3.7 to-arraybuffer: 1.0.1 xtend: 4.0.2 - dev: true /stream-http/3.2.0: resolution: {integrity: sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==} @@ -20050,7 +20452,6 @@ packages: /stream-shift/1.0.1: resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} - dev: true /stream-throttle/0.1.3: resolution: {integrity: sha1-rdV8jXzHOoFjDTHNVdOWHPr7qcM=} @@ -20300,7 +20701,7 @@ packages: tslib: 2.3.1 dev: false - /styled-components/5.3.3_38d38440f69e99d48ebb7ed58e8b89a0: + /styled-components/5.3.3_hdjyiqhwt2m5jdv3p3ky5c4jua: resolution: {integrity: sha512-++4iHwBM7ZN+x6DtPPWkCI4vdtwumQ+inA/DdAsqYd4SVgUKJie5vXyzotA00ttcFdQkCng7zc6grwlfIfw+lw==} engines: {node: '>=10'} peerDependencies: @@ -20323,7 +20724,7 @@ packages: supports-color: 5.5.0 dev: false - /styled-components/5.3.3_593d83ffa91d3905c79d53314235220d: + /styled-components/5.3.3_le6yh75jdu4qlr45kmyuenjcbu: resolution: {integrity: sha512-++4iHwBM7ZN+x6DtPPWkCI4vdtwumQ+inA/DdAsqYd4SVgUKJie5vXyzotA00ttcFdQkCng7zc6grwlfIfw+lw==} engines: {node: '>=10'} peerDependencies: @@ -20346,7 +20747,7 @@ packages: supports-color: 5.5.0 dev: false - /styled-components/5.3.3_react-dom@17.0.2+react@17.0.2: + /styled-components/5.3.3_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-++4iHwBM7ZN+x6DtPPWkCI4vdtwumQ+inA/DdAsqYd4SVgUKJie5vXyzotA00ttcFdQkCng7zc6grwlfIfw+lw==} engines: {node: '>=10'} peerDependencies: @@ -20394,7 +20795,6 @@ packages: engines: {node: '>=6'} dependencies: has-flag: 3.0.0 - dev: true /supports-color/7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} @@ -20451,6 +20851,10 @@ packages: setimmediate: 1.0.5 tar: 4.4.19 xhr-request: 1.1.0 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate optional: true /symbol-observable/1.0.1: @@ -20582,7 +20986,6 @@ packages: webpack: 4.46.0_webpack-cli@4.9.2 webpack-sources: 1.4.3 worker-farm: 1.7.0 - dev: true /terser-webpack-plugin/4.2.3_webpack@4.46.0: resolution: {integrity: sha512-jTgXh40RnvOrLQNgIkwEKnQ8rmHjHK4u+6UBEi+W+FPmvb+uo+chJXntKe7/3lW5mNysgSWD60KyesnhW8D6MQ==} @@ -20600,6 +21003,8 @@ packages: terser: 5.12.0 webpack: 4.46.0_webpack-cli@4.9.2 webpack-sources: 1.4.3 + transitivePeerDependencies: + - bluebird dev: true /terser-webpack-plugin/5.3.1_webpack@5.70.0: @@ -20653,10 +21058,10 @@ packages: engines: {node: '>=6.0.0'} hasBin: true dependencies: + acorn: 8.7.0 commander: 2.20.3 source-map: 0.6.1 source-map-support: 0.5.21 - dev: true /terser/5.12.0: resolution: {integrity: sha512-R3AUhNBGWiFc77HXag+1fXpAxTAFRQTJemlJKjAgD9r8xXTpjNKqIXwHM/o7Rh+O0kUJtS3WQVdBeMKFk5sw9A==} @@ -20771,7 +21176,6 @@ packages: /to-arraybuffer/1.0.1: resolution: {integrity: sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=} - dev: true /to-fast-properties/1.0.3: resolution: {integrity: sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=} @@ -20902,7 +21306,7 @@ packages: dependencies: typescript: 4.6.2 - /ts-loader/8.3.0_typescript@4.6.2+webpack@4.46.0: + /ts-loader/8.3.0_7in6qbnjgkqokibdcer35wqugu: resolution: {integrity: sha512-MgGly4I6cStsJy27ViE32UoqxPTN9Xly4anxxVyaIWR+9BGxboV4EyJBGfR3RePV7Ksjj3rHmPZJeIt+7o4Vag==} engines: {node: '>=10.0.0'} peerDependencies: @@ -20918,7 +21322,7 @@ packages: webpack: 4.46.0_webpack-cli@4.9.2 dev: true - /ts-node/10.7.0_e79e62fe450383fd2d418267dc75e645: + /ts-node/10.7.0_46pgf7sfaob72lkbqjt5y5pgiu: resolution: {integrity: sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==} hasBin: true peerDependencies: @@ -20979,7 +21383,6 @@ packages: /tty-browserify/0.0.0: resolution: {integrity: sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=} - dev: true /tty-browserify/0.0.1: resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} @@ -21112,7 +21515,6 @@ packages: resolution: {integrity: sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==} engines: {node: '>=4.2.0'} hasBin: true - dev: true /typewise-core/1.2.0: resolution: {integrity: sha1-l+uRgFx/VdL5QXSPpQ0xXZke8ZU=} @@ -21253,13 +21655,11 @@ packages: resolution: {integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==} dependencies: unique-slug: 2.0.2 - dev: true /unique-slug/2.0.2: resolution: {integrity: sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==} dependencies: imurmurhash: 0.1.4 - dev: true /unique-stream/2.3.1: resolution: {integrity: sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==} @@ -21341,7 +21741,6 @@ packages: /upath/1.2.0: resolution: {integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==} engines: {node: '>=4'} - dev: true /update-notifier/5.1.0: resolution: {integrity: sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==} @@ -21372,7 +21771,7 @@ packages: resolution: {integrity: sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=} deprecated: Please see https://github.com/lydell/urix#deprecated - /url-loader/4.1.1_file-loader@6.2.0+webpack@4.46.0: + /url-loader/4.1.1_lit45vopotvaqup7lrvlnvtxwy: resolution: {integrity: sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -21389,7 +21788,7 @@ packages: webpack: 4.46.0_webpack-cli@4.9.2 dev: true - /url-loader/4.1.1_file-loader@6.2.0+webpack@5.70.0: + /url-loader/4.1.1_plzek67nbn24rjxjp577ruq77e: resolution: {integrity: sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -21424,7 +21823,6 @@ packages: dependencies: querystringify: 2.2.0 requires-port: 1.0.0 - dev: true /url-set-query/1.0.0: resolution: {integrity: sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk=} @@ -21448,7 +21846,7 @@ packages: dependencies: react: 17.0.2 - /use-isomorphic-layout-effect/1.1.1_00d6772dea80510e818fd171caaa025a: + /use-isomorphic-layout-effect/1.1.1_adlholpkqbiq5amp2fy4vkqcli: resolution: {integrity: sha512-L7Evj8FGcwo/wpbv/qvSfrkHFtOpCzvM5yl2KVyDJoylVuSvzphiiasmjgQPttIGBAy2WKiBNR98q8w7PiNgKQ==} peerDependencies: '@types/react': '*' @@ -21461,7 +21859,7 @@ packages: react: 17.0.2 dev: false - /use-isomorphic-layout-effect/1.1.1_@types+react@17.0.1+react@17.0.2: + /use-isomorphic-layout-effect/1.1.1_wk7fohhuxwcjfgq2kdoh4ny7by: resolution: {integrity: sha512-L7Evj8FGcwo/wpbv/qvSfrkHFtOpCzvM5yl2KVyDJoylVuSvzphiiasmjgQPttIGBAy2WKiBNR98q8w7PiNgKQ==} peerDependencies: '@types/react': '*' @@ -21474,7 +21872,7 @@ packages: react: 17.0.2 dev: true - /use-latest/1.2.0_00d6772dea80510e818fd171caaa025a: + /use-latest/1.2.0_adlholpkqbiq5amp2fy4vkqcli: resolution: {integrity: sha512-d2TEuG6nSLKQLAfW3By8mKr8HurOlTkul0sOpxbClIv4SQ4iOd7BYr7VIzdbktUCnv7dua/60xzd8igMU6jmyw==} peerDependencies: '@types/react': '*' @@ -21485,10 +21883,10 @@ packages: dependencies: '@types/react': 17.0.40 react: 17.0.2 - use-isomorphic-layout-effect: 1.1.1_00d6772dea80510e818fd171caaa025a + use-isomorphic-layout-effect: 1.1.1_adlholpkqbiq5amp2fy4vkqcli dev: false - /use-latest/1.2.0_@types+react@17.0.1+react@17.0.2: + /use-latest/1.2.0_wk7fohhuxwcjfgq2kdoh4ny7by: resolution: {integrity: sha512-d2TEuG6nSLKQLAfW3By8mKr8HurOlTkul0sOpxbClIv4SQ4iOd7BYr7VIzdbktUCnv7dua/60xzd8igMU6jmyw==} peerDependencies: '@types/react': '*' @@ -21499,7 +21897,7 @@ packages: dependencies: '@types/react': 17.0.1 react: 17.0.2 - use-isomorphic-layout-effect: 1.1.1_@types+react@17.0.1+react@17.0.2 + use-isomorphic-layout-effect: 1.1.1_wk7fohhuxwcjfgq2kdoh4ny7by dev: true /use/3.1.1: @@ -21539,13 +21937,11 @@ packages: resolution: {integrity: sha1-evsa/lCAUkZInj23/g7TeTNqwPk=} dependencies: inherits: 2.0.1 - dev: true /util/0.11.1: resolution: {integrity: sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==} dependencies: inherits: 2.0.3 - dev: true /util/0.12.4: resolution: {integrity: sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==} @@ -21771,7 +22167,8 @@ packages: requiresBuild: true dependencies: chokidar: 2.1.8 - dev: true + transitivePeerDependencies: + - supports-color optional: true /watchpack/1.7.5: @@ -21782,7 +22179,8 @@ packages: optionalDependencies: chokidar: 3.5.3 watchpack-chokidar2: 2.0.1 - dev: true + transitivePeerDependencies: + - supports-color /watchpack/2.3.1: resolution: {integrity: sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==} @@ -21813,6 +22211,10 @@ packages: got: 9.6.0 swarm-js: 0.1.40 underscore: 1.9.1 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate optional: true /web3-core-helpers/1.2.11: @@ -21852,6 +22254,8 @@ packages: web3-providers-http: 1.2.11 web3-providers-ipc: 1.2.11 web3-providers-ws: 1.2.11 + transitivePeerDependencies: + - supports-color optional: true /web3-core-subscriptions/1.2.11: @@ -21874,6 +22278,8 @@ packages: web3-core-method: 1.2.11 web3-core-requestmanager: 1.2.11 web3-utils: 1.2.11 + transitivePeerDependencies: + - supports-color optional: true /web3-eth-abi/1.2.11: @@ -21900,6 +22306,8 @@ packages: web3-core-helpers: 1.2.11 web3-core-method: 1.2.11 web3-utils: 1.2.11 + transitivePeerDependencies: + - supports-color optional: true /web3-eth-contract/1.2.11: @@ -21915,6 +22323,8 @@ packages: web3-core-subscriptions: 1.2.11 web3-eth-abi: 1.2.11 web3-utils: 1.2.11 + transitivePeerDependencies: + - supports-color optional: true /web3-eth-ens/1.2.11: @@ -21930,6 +22340,8 @@ packages: web3-eth-abi: 1.2.11 web3-eth-contract: 1.2.11 web3-utils: 1.2.11 + transitivePeerDependencies: + - supports-color optional: true /web3-eth-iban/1.2.11: @@ -21950,6 +22362,8 @@ packages: web3-core-method: 1.2.11 web3-net: 1.2.11 web3-utils: 1.2.11 + transitivePeerDependencies: + - supports-color optional: true /web3-eth/1.2.11: @@ -21969,6 +22383,8 @@ packages: web3-eth-personal: 1.2.11 web3-net: 1.2.11 web3-utils: 1.2.11 + transitivePeerDependencies: + - supports-color optional: true /web3-net/1.2.11: @@ -21978,6 +22394,8 @@ packages: web3-core: 1.2.11 web3-core-method: 1.2.11 web3-utils: 1.2.11 + transitivePeerDependencies: + - supports-color optional: true /web3-provider-engine/14.2.1: @@ -22003,6 +22421,10 @@ packages: ws: 5.2.3 xhr: 2.6.0 xtend: 4.0.2 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate /web3-provider-engine/16.0.1: resolution: {integrity: sha512-/Eglt2aocXMBiDj7Se/lyZnNDaHBaoJlaUfbP5HkLJQC/HlGbR+3/W+dINirlJDhh7b54DzgykqY7ksaU5QgTg==} @@ -22031,8 +22453,10 @@ packages: xtend: 4.0.2 transitivePeerDependencies: - '@babel/core' + - bufferutil - encoding - supports-color + - utf-8-validate dev: false /web3-provider-engine/16.0.1_@babel+core@7.17.5: @@ -22062,8 +22486,10 @@ packages: xtend: 4.0.2 transitivePeerDependencies: - '@babel/core' + - bufferutil - encoding - supports-color + - utf-8-validate dev: false /web3-providers-http/1.2.11: @@ -22091,6 +22517,8 @@ packages: underscore: 1.9.1 web3-core-helpers: 1.2.11 websocket: 1.0.32 + transitivePeerDependencies: + - supports-color optional: true /web3-shh/1.2.11: @@ -22101,6 +22529,8 @@ packages: web3-core-method: 1.2.11 web3-core-subscriptions: 1.2.11 web3-net: 1.2.11 + transitivePeerDependencies: + - supports-color optional: true /web3-utils/1.2.11: @@ -22141,6 +22571,10 @@ packages: web3-net: 1.2.11 web3-shh: 1.2.11 web3-utils: 1.2.11 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate optional: true /web3modal/1.9.5_react-is@18.0.0: @@ -22150,7 +22584,7 @@ packages: prop-types: 15.8.1 react: 16.14.0 react-dom: 16.14.0_react@16.14.0 - styled-components: 5.3.3_38d38440f69e99d48ebb7ed58e8b89a0 + styled-components: 5.3.3_hdjyiqhwt2m5jdv3p3ky5c4jua tslib: 1.14.1 transitivePeerDependencies: - react-is @@ -22191,7 +22625,7 @@ packages: - bufferutil - utf-8-validate - /webpack-cli/4.9.2_27c49171c07fef207546213a9aedd6fd: + /webpack-cli/4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u: resolution: {integrity: sha512-m3/AACnBBzK/kMTcxWHcZFPrw/eQuY4Df1TxvIWfWM2x7mRqBQCqKEd96oCUa9jkapLBaFfRce33eGDb4Pr7YQ==} engines: {node: '>=10.13.0'} hasBin: true @@ -22212,9 +22646,9 @@ packages: optional: true dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 1.1.1_webpack-cli@4.9.2+webpack@4.46.0 + '@webpack-cli/configtest': 1.1.1_wruvbxbxznejtxbdxokfuvupnq '@webpack-cli/info': 1.4.1_webpack-cli@4.9.2 - '@webpack-cli/serve': 1.6.1_5a68400b9ca2652ea4444e5d81612c20 + '@webpack-cli/serve': 1.6.1_ljueac44ujss5jcejzoycyjmea colorette: 2.0.16 commander: 7.2.0 execa: 5.1.1 @@ -22224,11 +22658,10 @@ packages: rechoir: 0.7.1 webpack: 4.46.0_webpack-cli@4.9.2 webpack-bundle-analyzer: 4.5.0 - webpack-dev-server: 3.11.3_webpack-cli@4.9.2+webpack@4.46.0 + webpack-dev-server: 3.11.3_wruvbxbxznejtxbdxokfuvupnq webpack-merge: 5.8.0 - dev: true - /webpack-cli/4.9.2_9c6227b1f4ab411ec71902ed1b15f9d5: + /webpack-cli/4.9.2_trrcpmpuvnar5ryzalwrwfpz2u: resolution: {integrity: sha512-m3/AACnBBzK/kMTcxWHcZFPrw/eQuY4Df1TxvIWfWM2x7mRqBQCqKEd96oCUa9jkapLBaFfRce33eGDb4Pr7YQ==} engines: {node: '>=10.13.0'} hasBin: true @@ -22249,9 +22682,9 @@ packages: optional: true dependencies: '@discoveryjs/json-ext': 0.5.7 - '@webpack-cli/configtest': 1.1.1_webpack-cli@4.9.2+webpack@4.46.0 + '@webpack-cli/configtest': 1.1.1_wruvbxbxznejtxbdxokfuvupnq '@webpack-cli/info': 1.4.1_webpack-cli@4.9.2 - '@webpack-cli/serve': 1.6.1_5a68400b9ca2652ea4444e5d81612c20 + '@webpack-cli/serve': 1.6.1_ljueac44ujss5jcejzoycyjmea colorette: 2.0.16 commander: 7.2.0 execa: 5.1.1 @@ -22260,7 +22693,7 @@ packages: interpret: 2.2.0 rechoir: 0.7.1 webpack: 4.46.0_webpack-cli@4.9.2 - webpack-dev-server: 3.11.3_webpack-cli@4.9.2+webpack@4.46.0 + webpack-dev-server: 3.11.3_wruvbxbxznejtxbdxokfuvupnq webpack-merge: 5.8.0 dev: true @@ -22276,7 +22709,6 @@ packages: range-parser: 1.2.1 webpack: 4.46.0_webpack-cli@4.9.2 webpack-log: 2.0.0 - dev: true /webpack-dev-middleware/5.3.1_webpack@5.70.0: resolution: {integrity: sha512-81EujCKkyles2wphtdrnPg/QqegC/AtqNH//mQkBYSMqwFVCQrxM6ktB2O/SPlZy7LqeEfTbV3cZARGQz6umhg==} @@ -22292,7 +22724,7 @@ packages: webpack: 5.70.0 dev: false - /webpack-dev-server/3.11.3_webpack-cli@4.9.2+webpack@4.46.0: + /webpack-dev-server/3.11.3_wruvbxbxznejtxbdxokfuvupnq: resolution: {integrity: sha512-3x31rjbEQWKMNzacUZRE6wXvUFuGpH7vr0lIEbYpMAG9BOxi0928QU1BBswOAP3kg3H1O4hiS+sq4YyAn6ANnA==} engines: {node: '>= 6.11.5'} hasBin: true @@ -22305,14 +22737,14 @@ packages: dependencies: ansi-html-community: 0.0.8 bonjour: 3.5.0 - chokidar: 2.1.8 - compression: 1.7.4 + chokidar: 2.1.8_supports-color@6.1.0 + compression: 1.7.4_supports-color@6.1.0 connect-history-api-fallback: 1.6.0 debug: 4.3.4_supports-color@6.1.0 del: 4.1.1 - express: 4.17.3 + express: 4.17.3_supports-color@6.1.0 html-entities: 1.4.0 - http-proxy-middleware: 0.19.1_debug@4.3.4 + http-proxy-middleware: 0.19.1_tmpgdztspuwvsxzgjkhoqk7duq import-local: 2.0.0 internal-ip: 4.3.0 ip: 1.1.5 @@ -22321,24 +22753,26 @@ packages: loglevel: 1.8.0 opn: 5.5.0 p-retry: 3.0.1 - portfinder: 1.0.28 + portfinder: 1.0.28_supports-color@6.1.0 schema-utils: 1.0.0 selfsigned: 1.10.14 semver: 6.3.0 - serve-index: 1.9.1 + serve-index: 1.9.1_supports-color@6.1.0 sockjs: 0.3.24 - sockjs-client: 1.6.0 + sockjs-client: 1.6.0_supports-color@6.1.0 spdy: 4.0.2_supports-color@6.1.0 strip-ansi: 3.0.1 supports-color: 6.1.0 url: 0.11.0 webpack: 4.46.0_webpack-cli@4.9.2 - webpack-cli: 4.9.2_9c6227b1f4ab411ec71902ed1b15f9d5 + webpack-cli: 4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u webpack-dev-middleware: 3.7.3_webpack@4.46.0 webpack-log: 2.0.0 ws: 6.2.2 yargs: 13.3.2 - dev: true + transitivePeerDependencies: + - bufferutil + - utf-8-validate /webpack-dev-server/4.7.4_webpack@5.70.0: resolution: {integrity: sha512-nfdsb02Zi2qzkNmgtZjkrMOcXnYZ6FLKcQwpxT7MvmHKc+oTtDsBju8j+NMyAygZ9GW1jMEUpy3itHtqgEhe1A==} @@ -22413,7 +22847,6 @@ packages: dependencies: ansi-colors: 3.2.4 uuid: 3.4.0 - dev: true /webpack-merge/5.8.0: resolution: {integrity: sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==} @@ -22444,6 +22877,8 @@ packages: resolution: {integrity: sha512-kDUmfm3BZrei0y+1NTHJInejzxfhtU8eDj2M7OKb2IWrPFAeO1SOH2KuQ68MSZu9IGEHcxbkKKR1v18FrUSOmA==} dependencies: debug: 3.2.7 + transitivePeerDependencies: + - supports-color dev: true /webpack/4.46.0_webpack-cli@4.9.2: @@ -22481,9 +22916,10 @@ packages: tapable: 1.1.3 terser-webpack-plugin: 1.4.5_webpack@4.46.0 watchpack: 1.7.5 - webpack-cli: 4.9.2_9c6227b1f4ab411ec71902ed1b15f9d5 + webpack-cli: 4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u webpack-sources: 1.4.3 - dev: true + transitivePeerDependencies: + - supports-color /webpack/5.70.0: resolution: {integrity: sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw==} @@ -22598,6 +23034,8 @@ packages: typedarray-to-buffer: 3.1.5 utf-8-validate: 5.0.9 yaeti: 0.0.6 + transitivePeerDependencies: + - supports-color /whatwg-encoding/1.0.5: resolution: {integrity: sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==} @@ -22733,7 +23171,6 @@ packages: resolution: {integrity: sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==} dependencies: errno: 0.1.8 - dev: true /worker-rpc/0.1.1: resolution: {integrity: sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg==} @@ -22798,6 +23235,14 @@ packages: /ws/3.3.3: resolution: {integrity: sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true dependencies: async-limiter: 1.0.1 safe-buffer: 5.1.2 @@ -22806,14 +23251,29 @@ packages: /ws/5.2.3: resolution: {integrity: sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA==} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true dependencies: async-limiter: 1.0.1 /ws/6.2.2: resolution: {integrity: sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true dependencies: async-limiter: 1.0.1 - dev: true /ws/7.4.6: resolution: {integrity: sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==} From 09aa332c8222a0f0156f29640e95f439c5313638 Mon Sep 17 00:00:00 2001 From: Przemyslaw Rzad Date: Mon, 13 Jun 2022 16:04:16 +0200 Subject: [PATCH 41/59] =?UTF-8?q?=F0=9F=92=AB=20Update=20release=20with=20?= =?UTF-8?q?a=20new=20GH=20bot=20account=20(#825)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a4b805559..49a1e0e82 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,8 +32,8 @@ jobs: - name: Set git user run: | - git config user.name truefi-bot - git config user.email truefi-bot@trusttoken.com + git config user.name truefibot + git config user.email truebot.github@trusttoken.com - name: Create Release Pull Request or Publish to npm id: changesets From 2888a3e5db494bad8b5a86ce2e215a48f76bb710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Tue, 14 Jun 2022 15:02:07 +0200 Subject: [PATCH 42/59] =?UTF-8?q?=F0=9F=A5=97=20Fix=20multiple=20deploying?= =?UTF-8?q?=20multicall=20during=20localhost=20connection=20(#821)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: mateusz Co-authored-by: yivlad --- .../fix-multicall-localhost-deployment.md | 5 ++ packages/core/package.json | 3 +- packages/core/src/hooks/useLocalStorage.ts | 6 ++- packages/core/src/providers/DAppProvider.tsx | 33 ++++++------ .../src/providers/LocalMulticallProvider.tsx | 53 ++++++++++++------- pnpm-lock.yaml | 36 ++++++------- 6 files changed, 79 insertions(+), 57 deletions(-) create mode 100644 .changeset/fix-multicall-localhost-deployment.md diff --git a/.changeset/fix-multicall-localhost-deployment.md b/.changeset/fix-multicall-localhost-deployment.md new file mode 100644 index 000000000..55978cf2a --- /dev/null +++ b/.changeset/fix-multicall-localhost-deployment.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +πŸ₯— Fix multiple deploying multicall during localhost connection diff --git a/packages/core/package.json b/packages/core/package.json index 522c3fb34..aa0d81fea 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -18,8 +18,7 @@ "fetch-mock": "^9.11.0", "lodash.merge": "^4.6.2", "lodash.pickby": "^4.6.0", - "nanoid": "3.1.22", - "react-flat-providers": "^2.1.0" + "nanoid": "3.1.22" }, "peerDependencies": { "react": "*", diff --git a/packages/core/src/hooks/useLocalStorage.ts b/packages/core/src/hooks/useLocalStorage.ts index 78e4182b0..3e2489152 100644 --- a/packages/core/src/hooks/useLocalStorage.ts +++ b/packages/core/src/hooks/useLocalStorage.ts @@ -37,7 +37,9 @@ export function useLocalStorage(key: string) { useEffect(() => { setItem(key, value) - }, [value, key]) + }, [value]) - return [value, setValue] as const + // As value updating relies on useEffect, it takes mutliple rerenders to fully update the value. + // The third elemnt in the return array allows to get the immediate value stored in the localStorage. + return [value, setValue, () => getItem(key)] as const } diff --git a/packages/core/src/providers/DAppProvider.tsx b/packages/core/src/providers/DAppProvider.tsx index 4181ce1e3..7fa756928 100644 --- a/packages/core/src/providers/DAppProvider.tsx +++ b/packages/core/src/providers/DAppProvider.tsx @@ -10,7 +10,6 @@ import { LocalMulticallProvider } from './LocalMulticallProvider' import { NetworkProvider, ReadonlyNetworksProvider } from './network' import { BlockNumbersProvider } from './blockNumber/blockNumbers' import { WindowProvider } from './window' -import { FlatProviders } from 'react-flat-providers' export interface DAppProviderProps { children?: ReactNode @@ -61,20 +60,22 @@ function DAppProviderWithConfig({ children }: WithConfigProps) { const multicallAddressesMerged = { ...defaultAddresses, ...multicallAddresses } return ( - - {children} - + + + + + + + + + {children} + + + + + + + + ) } diff --git a/packages/core/src/providers/LocalMulticallProvider.tsx b/packages/core/src/providers/LocalMulticallProvider.tsx index 0081c4249..cb8a75ef7 100644 --- a/packages/core/src/providers/LocalMulticallProvider.tsx +++ b/packages/core/src/providers/LocalMulticallProvider.tsx @@ -1,6 +1,7 @@ import { ReactNode, useEffect, useState } from 'react' +import { utils } from 'ethers' import { getChainById } from '../helpers' -import { useEthers, useBlockNumber, useConfig, useUpdateConfig } from '../hooks' +import { useEthers, useBlockNumber, useConfig, useUpdateConfig, useLocalStorage } from '../hooks' import multicallABI from '../constants/abi/MultiCall.json' import multicall2ABI from '../constants/abi/MultiCall2.json' import { deployContract } from '../helpers/contract' @@ -20,6 +21,8 @@ enum LocalMulticallState { export function LocalMulticallProvider({ children }: LocalMulticallProps) { const updateConfig = useUpdateConfig() const { library, chainId } = useEthers() + const [, setMulticallAddress, getCurrent] = useLocalStorage('local_multicall_address' + chainId) + const { multicallAddresses, multicallVersion } = useConfig() const [localMulticallState, setLocalMulticallState] = useState(LocalMulticallState.Unknown) const [multicallBlockNumber, setMulticallBlockNumber] = useState() @@ -33,28 +36,42 @@ export function LocalMulticallProvider({ children }: LocalMulticallProps) { } else if (multicallAddresses && multicallAddresses[chainId]) { setLocalMulticallState(LocalMulticallState.Deployed) } else if (localMulticallState !== LocalMulticallState.Deploying) { - const signer = library.getSigner() - if (!signer) { - setLocalMulticallState(LocalMulticallState.Error) - return - } + const checkDeployed = async () => { + const multicallAddress = getCurrent() - setLocalMulticallState(LocalMulticallState.Deploying) + if (typeof multicallAddress === 'string' && utils.isAddress(multicallAddress)) { + const multicallCode = await library.getCode(multicallAddress) + if (multicallCode !== '0x') { + updateConfig({ multicallAddresses: { [chainId]: multicallAddress } }) + return + } + } - const deployMulticall = async () => { - try { - const { contractAddress, blockNumber } = await deployContract( - multicallVersion === 1 ? multicallABI : multicall2ABI, - signer - ) - updateConfig({ multicallAddresses: { [chainId]: contractAddress } }) - setMulticallBlockNumber(blockNumber) - setLocalMulticallState(LocalMulticallState.Deployed) - } catch { + const signer = library.getSigner() + if (!signer) { setLocalMulticallState(LocalMulticallState.Error) + return + } + + setLocalMulticallState(LocalMulticallState.Deploying) + + const deployMulticall = async () => { + try { + const { contractAddress, blockNumber } = await deployContract( + multicallVersion === 1 ? multicallABI : multicall2ABI, + signer + ) + updateConfig({ multicallAddresses: { [chainId]: contractAddress } }) + setMulticallAddress(contractAddress) + setMulticallBlockNumber(blockNumber) + setLocalMulticallState(LocalMulticallState.Deployed) + } catch { + setLocalMulticallState(LocalMulticallState.Error) + } } + void deployMulticall() } - void deployMulticall() + void checkDeployed() } }, [library, chainId]) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 74568ba1e..66db8f434 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -99,7 +99,6 @@ importers: nanoid: 3.1.22 prettier: ^2.1.2 react: ^17.0.1 - react-flat-providers: ^2.1.0 solc: ^0.8.12 typechain: ^7.0.0 typescript: ^4.6.2 @@ -110,7 +109,6 @@ importers: lodash.merge: 4.6.2 lodash.pickby: 4.6.0 nanoid: 3.1.22 - react-flat-providers: 2.1.0_react@17.0.2 devDependencies: '@ethereum-waffle/provider': 4.0.0-alpha.0 '@ethersproject/abstract-provider': 5.6.1 @@ -6890,7 +6888,7 @@ packages: webpack-cli: 4.x.x dependencies: webpack: 4.46.0_webpack-cli@4.9.2 - webpack-cli: 4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u + webpack-cli: 4.9.2_trrcpmpuvnar5ryzalwrwfpz2u /@webpack-cli/info/1.4.1_webpack-cli@4.9.2: resolution: {integrity: sha512-PKVGmazEq3oAo46Q63tpMr4HipI3OPfP7LiNOEJg963RMgT0rqheag28NCML0o3GIzA3DmxP1ZIAv9oTX1CUIA==} @@ -6898,7 +6896,7 @@ packages: webpack-cli: 4.x.x dependencies: envinfo: 7.8.1 - webpack-cli: 4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u + webpack-cli: 4.9.2_trrcpmpuvnar5ryzalwrwfpz2u /@webpack-cli/serve/1.6.1_ljueac44ujss5jcejzoycyjmea: resolution: {integrity: sha512-gNGTiTrjEVQ0OcVnzsRSqTxaBSr+dmTfm+qJsCDluky8uhdLWep7Gcr62QsAKHTMxjCS/8nEITsmFAhfIx+QSw==} @@ -6909,7 +6907,7 @@ packages: webpack-dev-server: optional: true dependencies: - webpack-cli: 4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u + webpack-cli: 4.9.2_trrcpmpuvnar5ryzalwrwfpz2u webpack-dev-server: 3.11.3_wruvbxbxznejtxbdxokfuvupnq /@xtuc/ieee754/1.2.0: @@ -8022,7 +8020,7 @@ packages: babel-plugin-syntax-jsx: 6.18.0 lodash: 4.17.21 picomatch: 2.3.1 - styled-components: 5.3.3_le6yh75jdu4qlr45kmyuenjcbu + styled-components: 5.3.3_sfoxds7t5ydpegc3knd667wn6m dev: false /babel-plugin-syntax-async-functions/6.13.0: @@ -8938,7 +8936,7 @@ packages: minipass-pipeline: 1.2.4 mkdirp: 1.0.4 p-map: 4.0.0 - promise-inflight: 1.0.1_bluebird@3.7.2 + promise-inflight: 1.0.1 rimraf: 3.0.2 ssri: 8.0.1 tar: 6.1.11 @@ -18077,6 +18075,15 @@ packages: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} engines: {node: '>=0.4.0'} + /promise-inflight/1.0.1: + resolution: {integrity: sha1-mEcocL8igTL8vdhoEputEsPAKeM=} + peerDependencies: + bluebird: '*' + peerDependenciesMeta: + bluebird: + optional: true + dev: true + /promise-inflight/1.0.1_bluebird@3.7.2: resolution: {integrity: sha1-mEcocL8igTL8vdhoEputEsPAKeM=} peerDependencies: @@ -18555,15 +18562,6 @@ packages: /react-fast-compare/3.2.0: resolution: {integrity: sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==} - /react-flat-providers/2.1.0_react@17.0.2: - resolution: {integrity: sha512-kYbIB5TmNkgf79Nbv2lb5bj3T2spLSZ6BLwLS3mgN61WPsYUeviuKV+FyfLbQDU1rFV1Z1tDvNLaS8cFKucEeQ==} - engines: {node: '>=16'} - peerDependencies: - react: '>= 17.0.0' - dependencies: - react: 17.0.2 - dev: false - /react-helmet-async/1.2.3_sfoxds7t5ydpegc3knd667wn6m: resolution: {integrity: sha512-mCk2silF53Tq/YaYdkl2sB+/tDoPnaxN7dFS/6ZLJb/rhUY2EWGI5Xj2b4jHppScMqY45MbgPSwTxDchKpZ5Kw==} peerDependencies: @@ -22660,6 +22658,7 @@ packages: webpack-bundle-analyzer: 4.5.0 webpack-dev-server: 3.11.3_wruvbxbxznejtxbdxokfuvupnq webpack-merge: 5.8.0 + dev: true /webpack-cli/4.9.2_trrcpmpuvnar5ryzalwrwfpz2u: resolution: {integrity: sha512-m3/AACnBBzK/kMTcxWHcZFPrw/eQuY4Df1TxvIWfWM2x7mRqBQCqKEd96oCUa9jkapLBaFfRce33eGDb4Pr7YQ==} @@ -22695,7 +22694,6 @@ packages: webpack: 4.46.0_webpack-cli@4.9.2 webpack-dev-server: 3.11.3_wruvbxbxznejtxbdxokfuvupnq webpack-merge: 5.8.0 - dev: true /webpack-dev-middleware/3.7.3_webpack@4.46.0: resolution: {integrity: sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==} @@ -22765,7 +22763,7 @@ packages: supports-color: 6.1.0 url: 0.11.0 webpack: 4.46.0_webpack-cli@4.9.2 - webpack-cli: 4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u + webpack-cli: 4.9.2_trrcpmpuvnar5ryzalwrwfpz2u webpack-dev-middleware: 3.7.3_webpack@4.46.0 webpack-log: 2.0.0 ws: 6.2.2 @@ -22916,7 +22914,7 @@ packages: tapable: 1.1.3 terser-webpack-plugin: 1.4.5_webpack@4.46.0 watchpack: 1.7.5 - webpack-cli: 4.9.2_e7cjc4oap7xsa5kgee5jv3ow7u + webpack-cli: 4.9.2_trrcpmpuvnar5ryzalwrwfpz2u webpack-sources: 1.4.3 transitivePeerDependencies: - supports-color From ead593f2943aff83e7348508ac8cc9bc524f5f65 Mon Sep 17 00:00:00 2001 From: truefi-bot <102036168+truefi-bot@users.noreply.github.com> Date: Wed, 15 Jun 2022 14:16:51 +0200 Subject: [PATCH 43/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#818)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: truefibot --- .changeset/fix-multicall-localhost-deployment.md | 5 ----- .changeset/flat-windows-walk.md | 5 ----- .changeset/only-metamask.md | 5 ----- .changeset/thirty-suits-push.md | 5 ----- packages/coingecko/CHANGELOG.md | 10 ++++++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 9 +++++++++ packages/core/package.json | 2 +- packages/testing/CHANGELOG.md | 10 ++++++++++ packages/testing/package.json | 2 +- 10 files changed, 32 insertions(+), 23 deletions(-) delete mode 100644 .changeset/fix-multicall-localhost-deployment.md delete mode 100644 .changeset/flat-windows-walk.md delete mode 100644 .changeset/only-metamask.md delete mode 100644 .changeset/thirty-suits-push.md diff --git a/.changeset/fix-multicall-localhost-deployment.md b/.changeset/fix-multicall-localhost-deployment.md deleted file mode 100644 index 55978cf2a..000000000 --- a/.changeset/fix-multicall-localhost-deployment.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -πŸ₯— Fix multiple deploying multicall during localhost connection diff --git a/.changeset/flat-windows-walk.md b/.changeset/flat-windows-walk.md deleted file mode 100644 index df728bb48..000000000 --- a/.changeset/flat-windows-walk.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -Add error code to transaction status diff --git a/.changeset/only-metamask.md b/.changeset/only-metamask.md deleted file mode 100644 index 556b970a9..000000000 --- a/.changeset/only-metamask.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -🦊 Add metamask filtering logic after activate browser wallet diff --git a/.changeset/thirty-suits-push.md b/.changeset/thirty-suits-push.md deleted file mode 100644 index 9698879e9..000000000 --- a/.changeset/thirty-suits-push.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -Fix race condition between chain id and provider diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index 94e7005cc..e4814de25 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,15 @@ # @usedapp/coingecko +## 1.0.9 + +### Patch Changes + +- Updated dependencies [2888a3e] +- Updated dependencies [c4b8ae0] +- Updated dependencies [fcb6f41] +- Updated dependencies [5877e2d] + - @usedapp/core@1.0.9 + ## 1.0.8 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index 7c1dd292c..b3da7e450 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.8", + "version": "1.0.9", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 47337e41e..8dfad1564 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,14 @@ # @usedapp/core +## 1.0.9 + +### Patch Changes + +- 2888a3e: πŸ₯— Fix multiple deploying multicall during localhost connection +- c4b8ae0: Add error code to transaction status +- fcb6f41: 🦊 Add metamask filtering logic after activate browser wallet +- 5877e2d: Fix race condition between chain id and provider + ## 1.0.8 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index aa0d81fea..85b4f75da 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.8", + "version": "1.0.9", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index f201c69e6..8e7db4fc6 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,15 @@ # @usedapp/testing +## 1.0.9 + +### Patch Changes + +- Updated dependencies [2888a3e] +- Updated dependencies [c4b8ae0] +- Updated dependencies [fcb6f41] +- Updated dependencies [5877e2d] + - @usedapp/core@1.0.9 + ## 1.0.8 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index 6b078fcaf..9f5038e7a 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.8", + "version": "1.0.9", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git", From 0600742703e3edc6408729bdb8d93270ed27a553 Mon Sep 17 00:00:00 2001 From: Przemyslaw Rzad Date: Wed, 15 Jun 2022 14:29:40 +0200 Subject: [PATCH 44/59] =?UTF-8?q?=E2=9B=A9=20Update=20issue=20templates=20?= =?UTF-8?q?(#828)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug_report.md | 26 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..2f3f0e3ce --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,26 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior, or a link to repository if public. +At a minimum, please provide your usedapp Config object. +Include information about chains you are connecting to, browser wallets you are using, and anything else that might be relevant. + +**Software versions** + - `useDapp` version (installed version of `@usedapp/core`) + - Package manager (yarn, npm, or pnpm?) + - Node version (`node --version`) + +**Additional context** + +- Add any other context about the problem here +- Include screenshoots if applicable diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..11eb268df --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "[Feature Request]" +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 55a28a26ed91df98dd0495b0b8303d4d03145deb Mon Sep 17 00:00:00 2001 From: Przemyslaw Rzad Date: Mon, 20 Jun 2022 13:37:01 +0200 Subject: [PATCH 45/59] =?UTF-8?q?=F0=9F=90=BA=20More=20extensive=20check?= =?UTF-8?q?=20for=20provider=20object=20in=20`renderWeb3Hook`=20(#830)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/silent-fans-tap.md | 5 +++++ packages/core/src/testing/renderWeb3Hook.tsx | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 .changeset/silent-fans-tap.md diff --git a/.changeset/silent-fans-tap.md b/.changeset/silent-fans-tap.md new file mode 100644 index 000000000..0eb22f8b1 --- /dev/null +++ b/.changeset/silent-fans-tap.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +🐺 More extensive check for provider object in `renderWeb3Hook` diff --git a/packages/core/src/testing/renderWeb3Hook.tsx b/packages/core/src/testing/renderWeb3Hook.tsx index f87fdeb15..b735f6d49 100644 --- a/packages/core/src/testing/renderWeb3Hook.tsx +++ b/packages/core/src/testing/renderWeb3Hook.tsx @@ -5,6 +5,7 @@ import React from 'react' import { deployMulticall, getWaitUtils, IdentityWrapper, mineBlock } from './utils' import { BlockNumbersProvider } from '../providers/blockNumber/blockNumbers' import { ReadonlyNetworksProvider } from '../providers/network' +import { providers as ethersProviders } from 'ethers' export interface renderWeb3HookOptions { mockProvider?: MockProvider | Record @@ -55,9 +56,17 @@ export const renderWeb3Hook = async ( } const providerObject = options?.mockProvider || new MockProvider() - if (providerObject instanceof MockProvider) { - defaultProvider = providerObject - await addSingleProvider(providerObject) + if ( + providerObject instanceof MockProvider || + /** + * We still expect this to be a MockProvider, + * but this is an override in case a different instance of the provider package is used + * and the TS types are not matching. + */ + ethersProviders.Web3Provider.isProvider(providerObject) + ) { + defaultProvider = providerObject as MockProvider + await addSingleProvider(providerObject as MockProvider) } else { for (const chainIdString in providerObject) { const chainId = Number(chainIdString) From 290941648726dad09813c1836f791d3471d5f0c1 Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:41:41 +0200 Subject: [PATCH 46/59] =?UTF-8?q?=E2=9B=BA=EF=B8=8F=20Add=20tests=20with?= =?UTF-8?q?=20refresh=20field=20for=20useCall=20hook=20(#832)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/chilly-wasps-stare.md | 5 + packages/core/package.json | 7 +- .../core/src/constants/abi/BlockNumber.json | 19 ++++ packages/core/src/constants/abi/index.ts | 3 + packages/core/src/hooks/useCall.test.tsx | 101 ++++++++++++++++++ .../chainState/common/callsReducer.ts | 2 +- .../common/chainStateReducer.test.ts | 8 +- .../chainState/common/chainStateReducer.ts | 21 ++-- .../src/testing/utils/getResultProperty.ts | 11 ++ packages/core/src/testing/utils/index.ts | 1 + pnpm-lock.yaml | 2 + 11 files changed, 163 insertions(+), 17 deletions(-) create mode 100644 .changeset/chilly-wasps-stare.md create mode 100644 packages/core/src/constants/abi/BlockNumber.json create mode 100644 packages/core/src/testing/utils/getResultProperty.ts diff --git a/.changeset/chilly-wasps-stare.md b/.changeset/chilly-wasps-stare.md new file mode 100644 index 000000000..347b1ee1e --- /dev/null +++ b/.changeset/chilly-wasps-stare.md @@ -0,0 +1,5 @@ +--- +'@usedapp/core': patch +--- + +Fix refresh field in QueryOptions diff --git a/packages/core/package.json b/packages/core/package.json index 85b4f75da..51c67f290 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -21,8 +21,8 @@ "nanoid": "3.1.22" }, "peerDependencies": { - "react": "*", - "ethers": "*" + "ethers": "*", + "react": "*" }, "devDependencies": { "@ethereum-waffle/provider": "4.0.0-alpha.0", @@ -53,7 +53,8 @@ "react": "^17.0.1", "solc": "^0.8.12", "typechain": "^7.0.0", - "typescript": "^4.6.2" + "typescript": "^4.6.2", + "wait-for-expect": "^3.0.2" }, "scripts": { "build": "yarn run build:esm && yarn run build:cjs", diff --git a/packages/core/src/constants/abi/BlockNumber.json b/packages/core/src/constants/abi/BlockNumber.json new file mode 100644 index 000000000..120276b18 --- /dev/null +++ b/packages/core/src/constants/abi/BlockNumber.json @@ -0,0 +1,19 @@ +{ + "contractName": "BlockNumber", + "abi": [ + { + "inputs": [], + "name": "getBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5060b58061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806342cbb15c14602d575b600080fd5b60336047565b604051603e9190605c565b60405180910390f35b600043905090565b6056816075565b82525050565b6000602082019050606f6000830184604f565b92915050565b600081905091905056fea26469706673582212204740e85f94e6d1887dda3a56af161b21a85b8ddb19dab72de0279a74db1a727064736f6c63430008070033" +} diff --git a/packages/core/src/constants/abi/index.ts b/packages/core/src/constants/abi/index.ts index a4d3595b0..5ca904d81 100644 --- a/packages/core/src/constants/abi/index.ts +++ b/packages/core/src/constants/abi/index.ts @@ -3,6 +3,7 @@ import MultiCall from './MultiCall.json' import MultiCall2 from './MultiCall2.json' import ERC20 from './ERC20.json' import ERC20Mock from './ERC20Mock.json' +import BlockNumberContract from './BlockNumber.json' const Interface = utils.Interface @@ -21,3 +22,5 @@ export { ERC20, ERC20Interface } const ERC20MockInterface = new Interface(ERC20Mock.abi) export { ERC20Mock, ERC20MockInterface } + +export { BlockNumberContract } diff --git a/packages/core/src/hooks/useCall.test.tsx b/packages/core/src/hooks/useCall.test.tsx index 8548d6e87..b18907cc7 100644 --- a/packages/core/src/hooks/useCall.test.tsx +++ b/packages/core/src/hooks/useCall.test.tsx @@ -8,9 +8,13 @@ import { MOCK_TOKEN_INITIAL_BALANCE, SECOND_TEST_CHAIN_ID, SECOND_MOCK_TOKEN_INITIAL_BALANCE, + getResultPropery, } from '../testing' import { ChainId } from '../constants/chainId' import { BigNumber } from 'ethers' +import { deployContract } from 'ethereum-waffle' +import { BlockNumberContract } from '../constants' +import waitForExpect from 'wait-for-expect' describe('useCall', () => { const mockProvider = new MockProvider() @@ -19,10 +23,14 @@ describe('useCall', () => { const [secondDeployer] = secondMockProvider.getWallets() let token: Contract let secondToken: Contract + let blockNumberContract: Contract + let secondBlockNumberContract: Contract beforeEach(async () => { token = await deployMockToken(deployer) secondToken = await deployMockToken(secondDeployer, SECOND_MOCK_TOKEN_INITIAL_BALANCE) + blockNumberContract = await deployContract(deployer, BlockNumberContract) + secondBlockNumberContract = await deployContract(deployer, BlockNumberContract) }) it('initial test balance to be correct', async () => { @@ -74,4 +82,97 @@ describe('useCall', () => { expect(result.error).to.be.undefined expect(result.current?.value[0]).to.eq(endValue) } + + it('Properly handles two calls', async () => { + const { result, waitForCurrent, mineBlock } = await renderWeb3Hook( + () => { + const balance = useCall({ + contract: token, + method: 'balanceOf', + args: [deployer.address], + }) + const block = useCall({ + contract: blockNumberContract, + method: 'getBlockNumber', + args: [], + }) + + return { balance, block } + }, + { + mockProvider, + } + ) + + const blockNumber = await mockProvider.getBlockNumber() + + await waitForCurrent(({ balance, block }) => !!(balance && block)) + expect(result.error).to.be.undefined + expect(getResultPropery(result, 'balance')).to.eq(MOCK_TOKEN_INITIAL_BALANCE) + expect(getResultPropery(result, 'block')).to.eq(blockNumber) + + await mineBlock() + + await waitForExpect(() => { + expect(getResultPropery(result, 'balance')).to.eq(MOCK_TOKEN_INITIAL_BALANCE) + expect(getResultPropery(result, 'block')).to.eq(blockNumber + 1) + }) + }) + + it('Properly handles refresh per block', async () => { + const { result, waitForCurrent, mineBlock } = await renderWeb3Hook( + () => { + const block1 = useCall({ + contract: blockNumberContract, + method: 'getBlockNumber', + args: [], + }) + const block2 = useCall( + { + // TODO: add similar test but with the same contract (blockNumberContract). It would currently fail + contract: secondBlockNumberContract, + method: 'getBlockNumber', + args: [], + }, + { + refresh: 2, + } + ) + + return { block1, block2 } + }, + { + mockProvider, + } + ) + + const blockNumber = await mockProvider.getBlockNumber() + + await waitForCurrent(({ block1, block2 }) => !!(block1 && block2)) + expect(result.error).to.be.undefined + expect(getResultPropery(result, 'block1')).to.eq(blockNumber) + expect(getResultPropery(result, 'block2')).to.eq(blockNumber) + + await mineBlock() + + await waitForCurrent(({ block1 }) => block1 !== undefined && block1.value[0].toNumber() === blockNumber + 1) + expect(getResultPropery(result, 'block1')).to.eq(blockNumber + 1) + expect(getResultPropery(result, 'block2')).to.eq(blockNumber) + + await mineBlock() + + await waitForExpect(() => { + expect(getResultPropery(result, 'block1')).to.eq(blockNumber + 2) + expect(getResultPropery(result, 'block2')).to.eq(blockNumber + 2) + }) + + for (let i = 0; i < 3; i++) { + await mineBlock() + } + + await waitForExpect(() => { + expect(getResultPropery(result, 'block1')).to.eq(blockNumber + 5) + expect(getResultPropery(result, 'block2')).to.eq(blockNumber + 5) + }) + }) }) diff --git a/packages/core/src/providers/chainState/common/callsReducer.ts b/packages/core/src/providers/chainState/common/callsReducer.ts index af2935f78..24ded14d6 100644 --- a/packages/core/src/providers/chainState/common/callsReducer.ts +++ b/packages/core/src/providers/chainState/common/callsReducer.ts @@ -58,7 +58,7 @@ export function callsReducer(state: RawCall[] = [], action: Action) { } const blockNumber = action.blockNumber if (call.refreshPerBlocks && call.lastUpdatedBlockNumber) { - return call.lastUpdatedBlockNumber + call.refreshPerBlocks === blockNumber + return call.lastUpdatedBlockNumber + call.refreshPerBlocks <= blockNumber ? { ...call, lastUpdatedBlockNumber: blockNumber, diff --git a/packages/core/src/providers/chainState/common/chainStateReducer.test.ts b/packages/core/src/providers/chainState/common/chainStateReducer.test.ts index dd56cc214..e1523e5e9 100644 --- a/packages/core/src/providers/chainState/common/chainStateReducer.test.ts +++ b/packages/core/src/providers/chainState/common/chainStateReducer.test.ts @@ -37,7 +37,7 @@ describe('chainStateReducer', () => { expect(result).to.deep.equal(state) }) - it('overwrites with updates from newer blocks', () => { + it('merges with updates from newer blocks', () => { const state: State = { [Mainnet.chainId]: { blockNumber: 1234, @@ -68,6 +68,12 @@ describe('chainStateReducer', () => { [Mainnet.chainId]: { blockNumber: 1235, state: { + [ADDRESS_A]: { + '0xdead': { + value: '0xbeef', + success: true, + }, + }, [ADDRESS_B]: { '0xabcd': { value: '0x5678', diff --git a/packages/core/src/providers/chainState/common/chainStateReducer.ts b/packages/core/src/providers/chainState/common/chainStateReducer.ts index 5e7701b41..d9efdbd9d 100644 --- a/packages/core/src/providers/chainState/common/chainStateReducer.ts +++ b/packages/core/src/providers/chainState/common/chainStateReducer.ts @@ -40,18 +40,15 @@ export function chainStateReducer(state: State = {}, action: ChainStateAction) { if (!current || action.blockNumber >= current) { if (action.type === 'FETCH_SUCCESS') { let newState = action.state - if (action.blockNumber === current) { - // merge with existing state to prevent requests coming out of order - // from overwriting the data - const oldState = state[action.chainId]?.state ?? {} - for (const [address, entries] of Object.entries(oldState)) { - newState = { - ...newState, - [address]: { - ...entries, - ...newState[address], - }, - } + // merge with existing state + const oldState = state[action.chainId]?.state ?? {} + for (const [address, entries] of Object.entries(oldState)) { + newState = { + ...newState, + [address]: { + ...entries, + ...newState[address], + }, } } return { diff --git a/packages/core/src/testing/utils/getResultProperty.ts b/packages/core/src/testing/utils/getResultProperty.ts new file mode 100644 index 000000000..3eb8ae79e --- /dev/null +++ b/packages/core/src/testing/utils/getResultProperty.ts @@ -0,0 +1,11 @@ +import { RenderResult } from '@testing-library/react-hooks' +import { Contract } from 'ethers' +import { CallResult } from '../../helpers' + +export type HookResult = { + [key: string]: CallResult +} + +export const getResultPropery = (result: RenderResult, property: keyof T) => { + return result.current?.[property]?.value[0] +} diff --git a/packages/core/src/testing/utils/index.ts b/packages/core/src/testing/utils/index.ts index d2d81936b..7537cb2f8 100644 --- a/packages/core/src/testing/utils/index.ts +++ b/packages/core/src/testing/utils/index.ts @@ -7,3 +7,4 @@ export * from './waitUntil' export * from './waitUtils' export * from './deployMockToken' export * from './setupTestingConfig' +export * from './getResultProperty' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 66db8f434..365007c59 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,6 +102,7 @@ importers: solc: ^0.8.12 typechain: ^7.0.0 typescript: ^4.6.2 + wait-for-expect: ^3.0.2 dependencies: '@metamask/detect-provider': 1.2.0 '@uniswap/token-lists': 1.0.0-beta.27 @@ -139,6 +140,7 @@ importers: solc: 0.8.12 typechain: 7.0.1_typescript@4.6.2 typescript: 4.6.2 + wait-for-expect: 3.0.2 packages/docs: specifiers: From d8350546a943da5083ad18d601be69b1db92f68a Mon Sep 17 00:00:00 2001 From: Isk Date: Tue, 21 Jun 2022 10:03:59 +0200 Subject: [PATCH 47/59] =?UTF-8?q?=E2=9B=93=20Add=20arbitrum=20reddit=20tes?= =?UTF-8?q?t=20chain=20(#815)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add reddit arbitrum testing chain * Create add-arbitrum-reddis-testnet.md Co-authored-by: Mateusz JanduΕ‚a <71319308+mj426382@users.noreply.github.com> --- .changeset/add-arbitrum-reddis-testnet.md | 5 +++ packages/core/src/constants/chainId.ts | 3 ++ packages/core/src/hooks/useConfig.test.tsx | 2 +- .../src/model/chain/arbitrumReddit.test.ts | 37 +++++++++++++++++++ .../core/src/model/chain/arbitrumReddit.ts | 21 +++++++++++ packages/core/src/model/chain/index.ts | 1 + 6 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 .changeset/add-arbitrum-reddis-testnet.md create mode 100644 packages/core/src/model/chain/arbitrumReddit.test.ts create mode 100644 packages/core/src/model/chain/arbitrumReddit.ts diff --git a/.changeset/add-arbitrum-reddis-testnet.md b/.changeset/add-arbitrum-reddis-testnet.md new file mode 100644 index 000000000..7f17750a1 --- /dev/null +++ b/.changeset/add-arbitrum-reddis-testnet.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +β›“ Add arbitrum reddit test chain diff --git a/packages/core/src/constants/chainId.ts b/packages/core/src/constants/chainId.ts index 0ef0e22bd..95215c1db 100644 --- a/packages/core/src/constants/chainId.ts +++ b/packages/core/src/constants/chainId.ts @@ -42,6 +42,7 @@ import { Velas, VelasTestnet, ZkSyncTestnet, + ArbitrumRedditTestnet, } from '../model' // rough alphabet order (put network from the same chain together) @@ -88,6 +89,7 @@ export const DEFAULT_SUPPORTED_CHAINS = [ Velas, VelasTestnet, ZkSyncTestnet, + ArbitrumRedditTestnet, ] export enum ChainId { @@ -134,4 +136,5 @@ export enum ChainId { Velas = 106, VelasTestnet = 111, ZkSyncTestnet = 280, + ArbitrumRedditTestnet = 5391184, } diff --git a/packages/core/src/hooks/useConfig.test.tsx b/packages/core/src/hooks/useConfig.test.tsx index 743829065..e368f5e4f 100644 --- a/packages/core/src/hooks/useConfig.test.tsx +++ b/packages/core/src/hooks/useConfig.test.tsx @@ -31,7 +31,7 @@ describe('useConfig', () => { const { result, waitForCurrent } = await renderDAppHook(() => useConfig(), { config: setup.config }) await waitForCurrent((val) => val !== undefined) expect(result.error).to.be.undefined - expect(result.current.networks?.length).to.eq(42) + expect(result.current.networks?.length).to.eq(43) expect(result.current.notifications?.checkInterval).to.eq(500) expect(result.current.notifications?.expirationPeriod).to.eq(5000) }) diff --git a/packages/core/src/model/chain/arbitrumReddit.test.ts b/packages/core/src/model/chain/arbitrumReddit.test.ts new file mode 100644 index 000000000..41fbc8e99 --- /dev/null +++ b/packages/core/src/model/chain/arbitrumReddit.test.ts @@ -0,0 +1,37 @@ +import { expect } from 'chai' +import { TEST_ADDRESS, TEST_TX } from './test-defaults' +import { ArbitrumRedditTestnet } from '../..' + +describe('ArbitrumRedditTestnet Chain', () => { + it('getChainId', () => { + expect(ArbitrumRedditTestnet.chainId).to.equal(5391184) + }) + + it('getChainName', () => { + expect(ArbitrumRedditTestnet.chainName).to.eq('ArbitrumRedditTestnet') + }) + + it('isTestChain', () => { + expect(ArbitrumRedditTestnet.isTestChain).to.be.true + }) + + it('isLocalChain', () => { + expect(ArbitrumRedditTestnet.isLocalChain).to.be.false + }) + + it('rpcUrl', () => { + expect(ArbitrumRedditTestnet.rpcUrl).to.eq('https://testnet.redditspace.com/rpc') + }) + + it('getExplorerAddressLink', () => { + expect(ArbitrumRedditTestnet.getExplorerAddressLink(TEST_ADDRESS)).to.eq( + `https://testnet.redditspace.com/address/${TEST_ADDRESS}` + ) + }) + + it('getExplorerTransactionLink', () => { + expect(ArbitrumRedditTestnet.getExplorerTransactionLink(TEST_TX)).to.eq( + `https://testnet.redditspace.com/tx/${TEST_TX}` + ) + }) +}) diff --git a/packages/core/src/model/chain/arbitrumReddit.ts b/packages/core/src/model/chain/arbitrumReddit.ts new file mode 100644 index 000000000..c839f63c4 --- /dev/null +++ b/packages/core/src/model/chain/arbitrumReddit.ts @@ -0,0 +1,21 @@ +import { Chain } from '../../constants' +import { getAddressLink, getTransactionLink } from '../../helpers/chainExplorerLink' + +const arbitrumRedditscanUrl = 'https://testnet.redditspace.com' + +export const ArbitrumRedditTestnet: Chain = { + chainId: 5391184, + chainName: 'ArbitrumRedditTestnet', + isTestChain: true, + isLocalChain: false, + multicallAddress: '0x722db82dea58c880d03b87885053f206f1b37136', + multicall2Address: '0xd4d664d419a6a845c98cc366ae1c4b24592bd5ce', + rpcUrl: 'https://testnet.redditspace.com/rpc', + blockExplorerUrl: arbitrumRedditscanUrl, + getExplorerAddressLink: getAddressLink(arbitrumRedditscanUrl), + getExplorerTransactionLink: getTransactionLink(arbitrumRedditscanUrl), +} + +export default { + ArbitrumRedditTestnet, +} diff --git a/packages/core/src/model/chain/index.ts b/packages/core/src/model/chain/index.ts index 2b1b192c0..9f6864afc 100644 --- a/packages/core/src/model/chain/index.ts +++ b/packages/core/src/model/chain/index.ts @@ -23,3 +23,4 @@ export * from './optimism' export * from './aurora' export * from './velas' export * from './zksync' +export * from './arbitrumReddit' From 18046782b3d8d44e615f460f14b1c74a88ece787 Mon Sep 17 00:00:00 2001 From: TrueFi Bot <98168415+truefibot@users.noreply.github.com> Date: Tue, 21 Jun 2022 10:54:07 +0200 Subject: [PATCH 48/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#831)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/add-arbitrum-reddis-testnet.md | 5 ----- .changeset/chilly-wasps-stare.md | 5 ----- .changeset/silent-fans-tap.md | 5 ----- packages/coingecko/CHANGELOG.md | 9 +++++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 8 ++++++++ packages/core/package.json | 2 +- packages/testing/CHANGELOG.md | 9 +++++++++ packages/testing/package.json | 2 +- 9 files changed, 29 insertions(+), 18 deletions(-) delete mode 100644 .changeset/add-arbitrum-reddis-testnet.md delete mode 100644 .changeset/chilly-wasps-stare.md delete mode 100644 .changeset/silent-fans-tap.md diff --git a/.changeset/add-arbitrum-reddis-testnet.md b/.changeset/add-arbitrum-reddis-testnet.md deleted file mode 100644 index 7f17750a1..000000000 --- a/.changeset/add-arbitrum-reddis-testnet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -β›“ Add arbitrum reddit test chain diff --git a/.changeset/chilly-wasps-stare.md b/.changeset/chilly-wasps-stare.md deleted file mode 100644 index 347b1ee1e..000000000 --- a/.changeset/chilly-wasps-stare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -Fix refresh field in QueryOptions diff --git a/.changeset/silent-fans-tap.md b/.changeset/silent-fans-tap.md deleted file mode 100644 index 0eb22f8b1..000000000 --- a/.changeset/silent-fans-tap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -🐺 More extensive check for provider object in `renderWeb3Hook` diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index e4814de25..568551b7c 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,14 @@ # @usedapp/coingecko +## 1.0.10 + +### Patch Changes + +- Updated dependencies [d835054] +- Updated dependencies [2909416] +- Updated dependencies [55a28a2] + - @usedapp/core@1.0.10 + ## 1.0.9 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index b3da7e450..aeeaaa216 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.9", + "version": "1.0.10", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 8dfad1564..29bbba455 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,13 @@ # @usedapp/core +## 1.0.10 + +### Patch Changes + +- d835054: β›“ Add arbitrum reddit test chain +- 2909416: Fix refresh field in QueryOptions +- 55a28a2: 🐺 More extensive check for provider object in `renderWeb3Hook` + ## 1.0.9 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 51c67f290..24d400a53 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.9", + "version": "1.0.10", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 8e7db4fc6..aac4673a8 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,14 @@ # @usedapp/testing +## 1.0.10 + +### Patch Changes + +- Updated dependencies [d835054] +- Updated dependencies [2909416] +- Updated dependencies [55a28a2] + - @usedapp/core@1.0.10 + ## 1.0.9 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index 9f5038e7a..10a391856 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.9", + "version": "1.0.10", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git", From 453b48997dcdac8a31ec6934e8891ea33c31ae36 Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Tue, 21 Jun 2022 15:08:54 +0200 Subject: [PATCH 49/59] =?UTF-8?q?=F0=9F=9B=B5=20Track=20non=20static=20cal?= =?UTF-8?q?ls=20for=20each=20chain=20(#823)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/short-phones-teach.md | 5 +++ packages/core/src/hooks/useBlockMeta.ts | 23 +++++++++- packages/core/src/hooks/useCall.test.tsx | 20 ++++++--- packages/core/src/hooks/useChainCall.test.tsx | 8 +++- .../core/src/hooks/useContractCall.test.tsx | 8 +++- packages/core/src/hooks/useGasPrice.test.tsx | 2 +- packages/core/src/hooks/useRawCall.test.ts | 14 +++++-- packages/core/src/hooks/useToken.test.tsx | 6 ++- .../core/src/hooks/useTokenAllowance.test.tsx | 12 ++++-- .../blockNumber/blockNumbers/provider.tsx | 2 +- .../chainState/multiChainStates/provider.tsx | 7 ++++ .../network/network/networksReducer.test.ts | 12 +++--- .../providers/network/network/provider.tsx | 4 +- .../src/providers/network/network/reducer.ts | 2 +- .../network/readonlyNetworks/context.ts | 13 ++++-- .../network/readonlyNetworks/model.ts | 21 ++++++++++ .../network/readonlyNetworks/provider.tsx | 32 ++++++++++++-- .../network/readonlyNetworks/reducer.ts | 16 +++++++ packages/core/src/testing/renderWeb3Hook.tsx | 42 +++++++++---------- 19 files changed, 191 insertions(+), 58 deletions(-) create mode 100644 .changeset/short-phones-teach.md create mode 100644 packages/core/src/providers/network/readonlyNetworks/reducer.ts diff --git a/.changeset/short-phones-teach.md b/.changeset/short-phones-teach.md new file mode 100644 index 000000000..8ded2f221 --- /dev/null +++ b/.changeset/short-phones-teach.md @@ -0,0 +1,5 @@ +--- +'@usedapp/core': patch +--- + +Don't poll readonly chains when unused diff --git a/packages/core/src/hooks/useBlockMeta.ts b/packages/core/src/hooks/useBlockMeta.ts index 6b9cff84c..983e15d71 100644 --- a/packages/core/src/hooks/useBlockMeta.ts +++ b/packages/core/src/hooks/useBlockMeta.ts @@ -4,6 +4,7 @@ import { useMulticallAddress } from './useMulticallAddress' import { QueryParams } from '../constants/type/QueryParams' import { useRawCall } from './useRawCalls' import { useChainId } from './useChainId' +import { useConfig } from './useConfig' const GET_CURRENT_BLOCK_TIMESTAMP_CALL = MultiCallABI.encodeFunctionData('getCurrentBlockTimestamp', []) const GET_CURRENT_BLOCK_DIFFICULTY_CALL = MultiCallABI.encodeFunctionData('getCurrentBlockDifficulty', []) @@ -14,13 +15,31 @@ const GET_CURRENT_BLOCK_DIFFICULTY_CALL = MultiCallABI.encodeFunctionData('getCu */ export function useBlockMeta(queryParams: QueryParams = {}) { const chainId = useChainId({ queryParams }) + const { refresh: configRefresh } = useConfig() const address = useMulticallAddress(queryParams) + const refresh = queryParams.refresh ?? configRefresh + const isStatic = queryParams.isStatic ?? refresh === 'never' + const refreshPerBlocks = typeof refresh === 'number' ? refresh : undefined const timestamp = useRawCall( - address && chainId !== undefined && { address, data: GET_CURRENT_BLOCK_TIMESTAMP_CALL, chainId } + address && + chainId !== undefined && { + address, + data: GET_CURRENT_BLOCK_TIMESTAMP_CALL, + chainId, + isStatic, + refreshPerBlocks, + } ) const difficulty = useRawCall( - address && chainId !== undefined && { address, data: GET_CURRENT_BLOCK_DIFFICULTY_CALL, chainId } + address && + chainId !== undefined && { + address, + data: GET_CURRENT_BLOCK_DIFFICULTY_CALL, + chainId, + isStatic, + refreshPerBlocks, + } ) return { diff --git a/packages/core/src/hooks/useCall.test.tsx b/packages/core/src/hooks/useCall.test.tsx index b18907cc7..a9dc5ae88 100644 --- a/packages/core/src/hooks/useCall.test.tsx +++ b/packages/core/src/hooks/useCall.test.tsx @@ -23,10 +23,12 @@ describe('useCall', () => { const [secondDeployer] = secondMockProvider.getWallets() let token: Contract let secondToken: Contract + let chainId: number let blockNumberContract: Contract let secondBlockNumberContract: Contract beforeEach(async () => { + chainId = (await mockProvider.getNetwork()).chainId token = await deployMockToken(deployer) secondToken = await deployMockToken(secondDeployer, SECOND_MOCK_TOKEN_INITIAL_BALANCE) blockNumberContract = await deployContract(deployer, BlockNumberContract) @@ -42,7 +44,9 @@ describe('useCall', () => { args: [deployer.address], }), { - mockProvider, + readonlyMockProviders: { + [chainId]: mockProvider, + }, } ) await waitForCurrent((val) => val !== undefined) @@ -72,7 +76,7 @@ describe('useCall', () => { { chainId } ), { - mockProvider: { + readonlyMockProviders: { [ChainId.Localhost]: mockProvider, [SECOND_TEST_CHAIN_ID]: secondMockProvider, }, @@ -100,7 +104,9 @@ describe('useCall', () => { return { balance, block } }, { - mockProvider, + readonlyMockProviders: { + [chainId]: mockProvider, + }, } ) @@ -142,7 +148,9 @@ describe('useCall', () => { return { block1, block2 } }, { - mockProvider, + readonlyMockProviders: { + [chainId]: mockProvider, + }, } ) @@ -172,7 +180,9 @@ describe('useCall', () => { await waitForExpect(() => { expect(getResultPropery(result, 'block1')).to.eq(blockNumber + 5) - expect(getResultPropery(result, 'block2')).to.eq(blockNumber + 5) + const block2 = getResultPropery(result, 'block2').toNumber() + // we don't actually know when the update is gonna happen - both possibilities are possible + expect(block2 === blockNumber + 4 || block2 === blockNumber + 5).to.be.true }) }) }) diff --git a/packages/core/src/hooks/useChainCall.test.tsx b/packages/core/src/hooks/useChainCall.test.tsx index 165d1b7b0..fccb2ae02 100644 --- a/packages/core/src/hooks/useChainCall.test.tsx +++ b/packages/core/src/hooks/useChainCall.test.tsx @@ -20,8 +20,10 @@ describe('useChainCall', () => { const [secondDeployer] = secondMockProvider.getWallets() let token: Contract let secondToken: Contract + let chainId: number beforeEach(async () => { + chainId = (await mockProvider.getNetwork()).chainId token = await deployMockToken(deployer) secondToken = await deployMockToken(secondDeployer, SECOND_MOCK_TOKEN_INITIAL_BALANCE) }) @@ -35,7 +37,9 @@ describe('useChainCall', () => { const { result, waitForCurrent } = await renderWeb3Hook( () => useChainCall(encodeCallData(callData, ChainId.Localhost)), { - mockProvider, + readonlyMockProviders: { + [chainId]: mockProvider, + }, } ) await waitForCurrent((val) => val !== undefined) @@ -72,7 +76,7 @@ describe('useChainCall', () => { ) ), { - mockProvider: { + readonlyMockProviders: { [ChainId.Localhost]: mockProvider, [SECOND_TEST_CHAIN_ID]: secondMockProvider, }, diff --git a/packages/core/src/hooks/useContractCall.test.tsx b/packages/core/src/hooks/useContractCall.test.tsx index 84229a493..4916f4bfe 100644 --- a/packages/core/src/hooks/useContractCall.test.tsx +++ b/packages/core/src/hooks/useContractCall.test.tsx @@ -20,8 +20,10 @@ describe('useContractCall', () => { const [secondDeployer] = secondMockProvider.getWallets() let token: Contract let secondToken: Contract + let chainId: number beforeEach(async () => { + chainId = (await mockProvider.getNetwork()).chainId token = await deployMockToken(deployer) secondToken = await deployMockToken(secondDeployer, SECOND_MOCK_TOKEN_INITIAL_BALANCE) }) @@ -36,7 +38,9 @@ describe('useContractCall', () => { const { result, waitForCurrent } = await renderWeb3Hook( () => useContractCall(callData, { chainId: ChainId.Localhost }), { - mockProvider, + readonlyMockProviders: { + [chainId]: mockProvider, + }, } ) await waitForCurrent((val) => val !== undefined) @@ -78,7 +82,7 @@ describe('useContractCall', () => { { chainId } ), { - mockProvider: { + readonlyMockProviders: { [ChainId.Localhost]: mockProvider, [SECOND_TEST_CHAIN_ID]: secondMockProvider, }, diff --git a/packages/core/src/hooks/useGasPrice.test.tsx b/packages/core/src/hooks/useGasPrice.test.tsx index d1e678ab5..f45134c32 100644 --- a/packages/core/src/hooks/useGasPrice.test.tsx +++ b/packages/core/src/hooks/useGasPrice.test.tsx @@ -23,7 +23,7 @@ describe('useGasPrice', () => { const testMultiChainUseGasPrice = async (chainId: number) => { const { result, waitForCurrent } = await renderWeb3Hook(() => useGasPrice({ chainId }), { - mockProvider: { + readonlyMockProviders: { [ChainId.Localhost]: mockProvider, [SECOND_TEST_CHAIN_ID]: secondMockProvider, }, diff --git a/packages/core/src/hooks/useRawCall.test.ts b/packages/core/src/hooks/useRawCall.test.ts index 91dc32ab7..3bfda523f 100644 --- a/packages/core/src/hooks/useRawCall.test.ts +++ b/packages/core/src/hooks/useRawCall.test.ts @@ -21,8 +21,10 @@ describe('useRawCall', () => { const [secondDeployer] = secondMockProvider.getWallets() let token: Contract let secondToken: Contract + let chainId: number beforeEach(async () => { + chainId = (await mockProvider.getNetwork()).chainId token = await deployMockToken(deployer) secondToken = await deployMockToken(secondDeployer, SECOND_MOCK_TOKEN_INITIAL_BALANCE) }) @@ -34,7 +36,9 @@ describe('useRawCall', () => { chainId: mockProvider.network.chainId, } const { result, waitForCurrent } = await renderWeb3Hook(() => useRawCall(call), { - mockProvider, + readonlyMockProviders: { + [chainId]: mockProvider, + }, }) await waitForCurrent((val) => val !== undefined) expect(result.error).to.be.undefined @@ -67,7 +71,9 @@ describe('useRawCall', () => { ] const { result, waitForCurrent } = await renderWeb3Hook(() => useRawCalls(calls), { - mockProvider, + readonlyMockProviders: { + [chainId]: mockProvider, + }, }) await waitForCurrent((val) => val !== undefined && val.every((x) => x?.success)) expect(result.error).to.be.undefined @@ -96,7 +102,7 @@ describe('useRawCall', () => { ) ), { - mockProvider: { + readonlyMockProviders: { [ChainId.Localhost]: mockProvider, [SECOND_TEST_CHAIN_ID]: secondMockProvider, }, @@ -122,7 +128,7 @@ describe('useRawCall', () => { ) ), { - mockProvider: { + readonlyMockProviders: { [ChainId.Localhost]: mockProvider, [SECOND_TEST_CHAIN_ID]: secondMockProvider, }, diff --git a/packages/core/src/hooks/useToken.test.tsx b/packages/core/src/hooks/useToken.test.tsx index d8ec4982b..16a31f200 100644 --- a/packages/core/src/hooks/useToken.test.tsx +++ b/packages/core/src/hooks/useToken.test.tsx @@ -8,14 +8,18 @@ describe('useToken', async () => { const mockProvider = new MockProvider() const [deployer] = mockProvider.getWallets() let token: Contract + let chainId: number beforeEach(async () => { + chainId = (await mockProvider.getNetwork()).chainId token = await deployMockToken(deployer) }) it('returns correct token constants', async () => { const { result, waitForCurrent } = await renderWeb3Hook(() => useToken(token.address), { - mockProvider, + readonlyMockProviders: { + [chainId]: mockProvider, + }, }) await waitForCurrent((val) => val !== undefined) expect(result.error).to.be.undefined diff --git a/packages/core/src/hooks/useTokenAllowance.test.tsx b/packages/core/src/hooks/useTokenAllowance.test.tsx index 84d6665ce..5c43bbb7b 100644 --- a/packages/core/src/hooks/useTokenAllowance.test.tsx +++ b/packages/core/src/hooks/useTokenAllowance.test.tsx @@ -19,8 +19,10 @@ describe('useTokenAllowance', () => { const [secondDeployer, secondSpender] = secondMockProvider.getWallets() let token: Contract let secondToken: Contract + let chainId: number beforeEach(async () => { + chainId = (await mockProvider.getNetwork()).chainId token = await deployMockToken(deployer) secondToken = await deployMockToken(secondDeployer, SECOND_MOCK_TOKEN_INITIAL_BALANCE) }) @@ -29,7 +31,9 @@ describe('useTokenAllowance', () => { const { result, waitForCurrent } = await renderWeb3Hook( () => useTokenAllowance(token.address, deployer.address, spender.address), { - mockProvider, + readonlyMockProviders: { + [chainId]: mockProvider, + }, } ) @@ -45,7 +49,9 @@ describe('useTokenAllowance', () => { const { result, waitForCurrent } = await renderWeb3Hook( () => useTokenAllowance(token.address, deployer.address, spender.address), { - mockProvider, + readonlyMockProviders: { + [chainId]: mockProvider, + }, } ) @@ -84,7 +90,7 @@ describe('useTokenAllowance', () => { const { result, waitForCurrent } = await renderWeb3Hook( () => useTokenAllowance(contract.address, user, spenderUser, { chainId }), { - mockProvider: { + readonlyMockProviders: { [ChainId.Localhost]: mockProvider, [SECOND_TEST_CHAIN_ID]: secondMockProvider, }, diff --git a/packages/core/src/providers/blockNumber/blockNumbers/provider.tsx b/packages/core/src/providers/blockNumber/blockNumbers/provider.tsx index 7d1f2de46..858b8209b 100644 --- a/packages/core/src/providers/blockNumber/blockNumbers/provider.tsx +++ b/packages/core/src/providers/blockNumber/blockNumbers/provider.tsx @@ -23,7 +23,7 @@ export function BlockNumbersProvider({ children }: Props) { return () => { onUnmount.forEach((fn) => fn()) } - }, [networks, isActive]) + }, [networks]) const debouncedState = useDebounce(state, 100) diff --git a/packages/core/src/providers/chainState/multiChainStates/provider.tsx b/packages/core/src/providers/chainState/multiChainStates/provider.tsx index 7360aaf52..de8fde491 100644 --- a/packages/core/src/providers/chainState/multiChainStates/provider.tsx +++ b/packages/core/src/providers/chainState/multiChainStates/provider.tsx @@ -12,6 +12,7 @@ import { getUniqueActiveCalls } from '../../../helpers' import { useDevtoolsReporting } from '../common/useDevtoolsReporting' import { useChainId } from '../../../hooks/useChainId' import { useWindow } from '../../window/context' +import { useUpdateNetworksState } from '../../network/readonlyNetworks/context' interface Props { children: ReactNode @@ -44,6 +45,7 @@ export function MultiChainStateProvider({ children, multicallAddresses }: Props) const [calls, dispatchCalls] = useReducer(callsReducer, []) const [state, dispatchState] = useReducer(chainStateReducer, {}) + const updateNetworks = useUpdateNetworksState() const multicall = (multicallVersion === 1 ? multicall1Factory : multicall2Factory)(fastMulticallEncoding ?? false) @@ -81,6 +83,11 @@ export function MultiChainStateProvider({ children, multicallAddresses }: Props) } const callsOnThisChain = uniqueCalls.filter((call) => call.chainId === chainId) + updateNetworks({ + type: 'UPDATE_NON_STATIC_CALLS_COUNT', + chainId, + count: callsOnThisChain.filter((call) => !call.isStatic).length, + }) performMulticall( provider, diff --git a/packages/core/src/providers/network/network/networksReducer.test.ts b/packages/core/src/providers/network/network/networksReducer.test.ts index 79743eeeb..17d25666f 100644 --- a/packages/core/src/providers/network/network/networksReducer.test.ts +++ b/packages/core/src/providers/network/network/networksReducer.test.ts @@ -1,4 +1,4 @@ -import { networksReducer } from './reducer' +import { networkReducer } from './reducer' import { Wallet } from 'ethers' import { expect } from 'chai' @@ -18,7 +18,7 @@ describe('ActiveNetworkReducer', () => { accounts: [Wallet.createRandom().address], } expect( - networksReducer(initialState, { + networkReducer(initialState, { type: 'UPDATE_NETWORK', network: newNetwork, }) @@ -34,7 +34,7 @@ describe('ActiveNetworkReducer', () => { accounts: [Wallet.createRandom().address], } expect( - networksReducer(initialState, { + networkReducer(initialState, { type: 'UPDATE_NETWORK', network: newNetwork, }) @@ -49,7 +49,7 @@ describe('ActiveNetworkReducer', () => { describe('Errors', () => { it('adds first error', async () => { expect( - networksReducer(initialState, { + networkReducer(initialState, { type: 'ADD_ERROR', error: ('new error' as unknown) as Error, }) @@ -60,13 +60,13 @@ describe('ActiveNetworkReducer', () => { }) it('adds more errors', async () => { - const intermediateState = networksReducer(initialState, { + const intermediateState = networkReducer(initialState, { type: 'ADD_ERROR', error: ('new error' as unknown) as Error, }) const anotherError = new Error('another error') expect( - networksReducer(intermediateState, { + networkReducer(intermediateState, { type: 'ADD_ERROR', error: anotherError, }) diff --git a/packages/core/src/providers/network/network/provider.tsx b/packages/core/src/providers/network/network/provider.tsx index 50989d4a3..ad93bf71c 100644 --- a/packages/core/src/providers/network/network/provider.tsx +++ b/packages/core/src/providers/network/network/provider.tsx @@ -1,6 +1,6 @@ import { ReactNode, useCallback, useEffect, useReducer, useState } from 'react' import { NetworkContext } from './context' -import { defaultNetworkState, networksReducer } from './reducer' +import { defaultNetworkState, networkReducer } from './reducer' import { Network } from './model' import { providers } from 'ethers' import { subscribeToProviderEvents, getInjectedProvider } from '../../../helpers' @@ -35,7 +35,7 @@ async function tryToGetAccount(provider: JsonRpcProvider) { export function NetworkProvider({ children, providerOverride }: NetworkProviderProps) { const { autoConnect, pollingInterval, noMetamaskDeactivate } = useConfig() - const [network, dispatch] = useReducer(networksReducer, defaultNetworkState) + const [network, dispatch] = useReducer(networkReducer, defaultNetworkState) const [onUnsubscribe, setOnUnsubscribe] = useState<() => void>(() => () => undefined) const [shouldConnectMetamask, setShouldConnectMetamask] = useLocalStorage('shouldConnectMetamask') const [isLoading, setLoading] = useState(false) diff --git a/packages/core/src/providers/network/network/reducer.ts b/packages/core/src/providers/network/network/reducer.ts index cb5d66e0f..74088accb 100644 --- a/packages/core/src/providers/network/network/reducer.ts +++ b/packages/core/src/providers/network/network/reducer.ts @@ -7,7 +7,7 @@ export const defaultNetworkState = { errors: [], } -export function networksReducer(prevState: Network, actions: Actions): Network { +export function networkReducer(prevState: Network, actions: Actions): Network { switch (actions.type) { case 'UPDATE_NETWORK': return { diff --git a/packages/core/src/providers/network/readonlyNetworks/context.ts b/packages/core/src/providers/network/readonlyNetworks/context.ts index 4ea4869b2..f6a0a2055 100644 --- a/packages/core/src/providers/network/readonlyNetworks/context.ts +++ b/packages/core/src/providers/network/readonlyNetworks/context.ts @@ -1,8 +1,15 @@ import { createContext, useContext } from 'react' -import { Providers } from './model' +import { ReadonlyNetworksModel } from './model' -export const ReadonlyNetworksContext = createContext({}) +export const ReadonlyNetworksContext = createContext({ + providers: {}, + updateNetworkState: () => undefined, +}) export function useReadonlyNetworks() { - return useContext(ReadonlyNetworksContext) + return useContext(ReadonlyNetworksContext).providers +} + +export function useUpdateNetworksState() { + return useContext(ReadonlyNetworksContext).updateNetworkState } diff --git a/packages/core/src/providers/network/readonlyNetworks/model.ts b/packages/core/src/providers/network/readonlyNetworks/model.ts index ea6e03376..71e3008fb 100644 --- a/packages/core/src/providers/network/readonlyNetworks/model.ts +++ b/packages/core/src/providers/network/readonlyNetworks/model.ts @@ -1,6 +1,27 @@ import { ChainId } from '../../../constants' import type { providers } from 'ethers' +export interface NetworkState { + nonStaticCalls: number +} + export type Providers = { [chainId in ChainId]?: providers.BaseProvider } + +export type NetworkStates = { + [chainId in ChainId]?: NetworkState +} + +export interface ReadonlyNetworksModel { + providers: Providers + updateNetworkState: (payload: Actions) => void +} + +export interface UpdateNonStaticCallsCount { + type: 'UPDATE_NON_STATIC_CALLS_COUNT' + chainId: ChainId + count: number +} + +export type Actions = UpdateNonStaticCallsCount diff --git a/packages/core/src/providers/network/readonlyNetworks/provider.tsx b/packages/core/src/providers/network/readonlyNetworks/provider.tsx index 2283b0740..98ee12395 100644 --- a/packages/core/src/providers/network/readonlyNetworks/provider.tsx +++ b/packages/core/src/providers/network/readonlyNetworks/provider.tsx @@ -1,10 +1,12 @@ -import { ReactNode, useEffect, useState } from 'react' +import { ReactNode, useEffect, useReducer, useState } from 'react' import { providers } from 'ethers' import { useConfig } from '../../../hooks' import { Providers } from './model' import { ReadonlyNetworksContext } from './context' -import { BaseProviderFactory, NodeUrls } from '../../../constants' +import { BaseProviderFactory, ChainId, NodeUrls } from '../../../constants' import { fromEntries } from '../../../helpers/fromEntries' +import { networkStatesReducer } from './reducer' +import { useWindow } from '../../window' const { Provider, StaticJsonRpcProvider } = providers type BaseProvider = providers.BaseProvider @@ -34,14 +36,38 @@ export const getProvidersFromConfig = (readOnlyUrls: NodeUrls) => export function ReadonlyNetworksProvider({ providerOverrides = {}, children }: NetworkProviderProps) { const { readOnlyUrls = {} } = useConfig() + const { isActive } = useWindow() const [providers, setProviders] = useState(() => ({ ...getProvidersFromConfig(readOnlyUrls), ...providerOverrides, })) + const [networkStates, dispatchNetworkState] = useReducer(networkStatesReducer, { + ...fromEntries( + Object.keys({ ...readOnlyUrls, ...providerOverrides }).map((chainId) => [chainId, { nonStaticCalls: 0 }]) + ), + }) useEffect(() => { setProviders({ ...getProvidersFromConfig(readOnlyUrls), ...providerOverrides }) }, Object.entries(readOnlyUrls).flat()) - return {children} + useEffect(() => { + for (const [chainId, { nonStaticCalls }] of Object.entries(networkStates)) { + const provider = providers[(chainId as unknown) as ChainId] + if (provider) { + provider.polling = isActive && nonStaticCalls > 0 + } + } + }, [networkStates, isActive]) + + return ( + + {children} + + ) } diff --git a/packages/core/src/providers/network/readonlyNetworks/reducer.ts b/packages/core/src/providers/network/readonlyNetworks/reducer.ts new file mode 100644 index 000000000..d274b05bc --- /dev/null +++ b/packages/core/src/providers/network/readonlyNetworks/reducer.ts @@ -0,0 +1,16 @@ +import { Actions, NetworkStates } from './model' + +export function networkStatesReducer(prevState: NetworkStates, actions: Actions): NetworkStates { + switch (actions.type) { + case 'UPDATE_NON_STATIC_CALLS_COUNT': { + const newState = { ...prevState } + newState[actions.chainId] = { + ...newState[actions.chainId], + nonStaticCalls: actions.count, + } + return newState + } + default: + return prevState + } +} diff --git a/packages/core/src/testing/renderWeb3Hook.tsx b/packages/core/src/testing/renderWeb3Hook.tsx index b735f6d49..a1dab6b4e 100644 --- a/packages/core/src/testing/renderWeb3Hook.tsx +++ b/packages/core/src/testing/renderWeb3Hook.tsx @@ -5,10 +5,10 @@ import React from 'react' import { deployMulticall, getWaitUtils, IdentityWrapper, mineBlock } from './utils' import { BlockNumbersProvider } from '../providers/blockNumber/blockNumbers' import { ReadonlyNetworksProvider } from '../providers/network' -import { providers as ethersProviders } from 'ethers' export interface renderWeb3HookOptions { - mockProvider?: MockProvider | Record + mockProvider?: MockProvider + readonlyMockProviders?: Record mockProviderOptions?: { pollingInterval?: number } @@ -39,7 +39,6 @@ export const renderWeb3Hook = async ( ) => { const providers: Record = {} const multicallAddresses: Record = {} - let defaultProvider = new MockProvider() const addSingleProvider = async (currentProvider: MockProvider) => { const { chainId } = await currentProvider.getNetwork() @@ -55,23 +54,20 @@ export const renderWeb3Hook = async ( await currentProvider.getBlockNumber() } - const providerObject = options?.mockProvider || new MockProvider() - if ( - providerObject instanceof MockProvider || - /** - * We still expect this to be a MockProvider, - * but this is an override in case a different instance of the provider package is used - * and the TS types are not matching. - */ - ethersProviders.Web3Provider.isProvider(providerObject) - ) { - defaultProvider = providerObject as MockProvider - await addSingleProvider(providerObject as MockProvider) - } else { - for (const chainIdString in providerObject) { - const chainId = Number(chainIdString) - await addSingleProvider(providerObject[chainId]) - } + const defaultProvider = options?.mockProvider || new MockProvider() + await addSingleProvider(defaultProvider) + + const readOnlyProviders = options?.readonlyMockProviders ?? {} + for (const chainIdString in readOnlyProviders) { + const chainId = Number(chainIdString) + await addSingleProvider(readOnlyProviders[chainId]) + } + + if (Object.keys(readOnlyProviders).length === 0) { + const defaultReadOnlyProvider = new MockProvider() + await addSingleProvider(defaultReadOnlyProvider) + const { chainId } = await defaultReadOnlyProvider.getNetwork() + readOnlyProviders[chainId] = defaultReadOnlyProvider } const UserWrapper = options?.renderHook?.wrapper ?? IdentityWrapper @@ -79,7 +75,7 @@ export const renderWeb3Hook = async ( const { result, waitForNextUpdate, rerender, unmount } = renderHook(hook, { wrapper: (wrapperProps) => ( - + @@ -96,7 +92,9 @@ export const renderWeb3Hook = async ( return { result, defaultProvider, - mineBlock: async () => mineBlock(defaultProvider), + mineBlock: async () => { + await Promise.all([defaultProvider, ...Object.values(readOnlyProviders)].map((provider) => mineBlock(provider))) + }, rerender, unmount, // do not return the waitFor* functions from `renderHook` - they are not usable after using waitForNextUpdate(). From 2c9d41c161f715313637c55177bf1d14bdbbb3ab Mon Sep 17 00:00:00 2001 From: TrueFi Bot <98168415+truefibot@users.noreply.github.com> Date: Wed, 22 Jun 2022 10:22:10 +0200 Subject: [PATCH 50/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#834)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/short-phones-teach.md | 5 ----- packages/coingecko/CHANGELOG.md | 7 +++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/testing/CHANGELOG.md | 7 +++++++ packages/testing/package.json | 2 +- 7 files changed, 23 insertions(+), 8 deletions(-) delete mode 100644 .changeset/short-phones-teach.md diff --git a/.changeset/short-phones-teach.md b/.changeset/short-phones-teach.md deleted file mode 100644 index 8ded2f221..000000000 --- a/.changeset/short-phones-teach.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -Don't poll readonly chains when unused diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index 568551b7c..164f8938a 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/coingecko +## 1.0.11 + +### Patch Changes + +- Updated dependencies [453b489] + - @usedapp/core@1.0.11 + ## 1.0.10 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index aeeaaa216..3bc043bce 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.10", + "version": "1.0.11", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 29bbba455..701c0c8a4 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @usedapp/core +## 1.0.11 + +### Patch Changes + +- 453b489: Don't poll readonly chains when unused + ## 1.0.10 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 24d400a53..a51b839d3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.10", + "version": "1.0.11", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index aac4673a8..540e64852 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/testing +## 1.0.11 + +### Patch Changes + +- Updated dependencies [453b489] + - @usedapp/core@1.0.11 + ## 1.0.10 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index 10a391856..a5b4641c1 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.10", + "version": "1.0.11", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git", From feca2d70e329c885189a41a9b4b4028ec0583524 Mon Sep 17 00:00:00 2001 From: Przemyslaw Rzad Date: Wed, 22 Jun 2022 15:42:40 +0200 Subject: [PATCH 51/59] =?UTF-8?q?=F0=9F=8F=B5=20Move=20`@types`=20to=20dev?= =?UTF-8?q?=20dependencies=20(#837)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/testing/package.json | 4 ++-- pnpm-lock.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/testing/package.json b/packages/testing/package.json index a5b4641c1..a4fb61ad6 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -15,6 +15,8 @@ "@testing-library/react-hooks": "^5.0.3", "@types/chai": "^4.2.14", "@types/mocha": "^8.2.0", + "@types/react": "17.0.1", + "@types/react-dom": "17.0.1", "@typescript-eslint/eslint-plugin": "^4.10.0", "@typescript-eslint/parser": "^4.10.0", "chai": "^4.2.0", @@ -29,8 +31,6 @@ "@ethersproject/constants": "5.6.0", "@ethersproject/contracts": "5.6.0", "@ethersproject/providers": "5.6.2", - "@types/react": "17.0.1", - "@types/react-dom": "17.0.1", "@usedapp/core": "workspace:*", "ethereum-waffle": "4.0.0-alpha.0", "ethers": "5.6.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 365007c59..9456c8733 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -507,8 +507,6 @@ importers: '@ethersproject/constants': 5.6.0 '@ethersproject/contracts': 5.6.0 '@ethersproject/providers': 5.6.2 - '@types/react': 17.0.1 - '@types/react-dom': 17.0.1 '@usedapp/core': link:../core ethereum-waffle: 4.0.0-alpha.0_npo4ep7cyc426pha7ww6vnkdsi ethers: 5.6.2 @@ -520,6 +518,8 @@ importers: '@testing-library/react-hooks': 5.1.3_w7o5yyljkiidx2s2nzb26ottzu '@types/chai': 4.3.0 '@types/mocha': 8.2.3 + '@types/react': 17.0.1 + '@types/react-dom': 17.0.1 '@typescript-eslint/eslint-plugin': 4.33.0_svahoejai4s3vdjo7ek27ctz4u '@typescript-eslint/parser': 4.33.0_bpt3vuhlsupxpqo5l4aahunrmm chai: 4.3.6 @@ -6055,7 +6055,7 @@ packages: resolution: {integrity: sha512-yIVyopxQb8IDZ7SOHeTovurFq+fXiPICa+GV3gp0Xedsl+MwQlMLKmvrnEjFbQxjliH5YVAEWFh975eVNmKj7Q==} dependencies: '@types/react': 17.0.40 - dev: false + dev: true /@types/react-dom/17.0.13: resolution: {integrity: sha512-wEP+B8hzvy6ORDv1QBhcQia4j6ea4SFIBttHYpXKPFZRviBvknq0FRh3VrIxeXUmsPkwuXVZrVGG7KUVONmXCQ==} From 5776ed96552f2278400f30dad275dfee76adc5bd Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Wed, 22 Jun 2022 16:09:02 +0200 Subject: [PATCH 52/59] =?UTF-8?q?=F0=9F=8E=BE=20Add=20pollingIntervals=20o?= =?UTF-8?q?ption=20to=20Config=20(#836)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/blue-peas-scream.md | 5 ++++ packages/core/src/constants/type/Config.ts | 11 +++++++- packages/core/src/helpers/eip1193.ts | 4 ++- packages/core/src/helpers/injectedProvider.ts | 5 ++-- .../chainState/multiChainStates/provider.tsx | 2 +- .../providers/network/network/provider.tsx | 13 ++++++--- .../network/readonlyNetworks/provider.tsx | 14 ++++++++-- packages/core/src/testing/renderDAppHook.tsx | 2 +- packages/core/src/testing/renderWeb3Hook.tsx | 27 ++++++++++--------- 9 files changed, 59 insertions(+), 24 deletions(-) create mode 100644 .changeset/blue-peas-scream.md diff --git a/.changeset/blue-peas-scream.md b/.changeset/blue-peas-scream.md new file mode 100644 index 000000000..906551f74 --- /dev/null +++ b/.changeset/blue-peas-scream.md @@ -0,0 +1,5 @@ +--- +'@usedapp/core': patch +--- + +Add option to config to specify different polling intervals for different chains diff --git a/packages/core/src/constants/type/Config.ts b/packages/core/src/constants/type/Config.ts index 0ee874869..3a3b14659 100644 --- a/packages/core/src/constants/type/Config.ts +++ b/packages/core/src/constants/type/Config.ts @@ -11,6 +11,10 @@ export type MulticallAddresses = { [chainId: number]: string } +export type PollingIntervals = { + [chaindId: number]: number +} + /** * useDapp configuration. * @public @@ -51,10 +55,15 @@ export type FullConfig = { */ networks?: Chain[] /** - * Polling interval for a new block. + * Default polling interval for a new block. */ pollingInterval: number + /** + * Polling intervals for new blocks on specific chains. + */ + pollingIntervals?: PollingIntervals + notifications: { checkInterval: number expirationPeriod: number diff --git a/packages/core/src/helpers/eip1193.ts b/packages/core/src/helpers/eip1193.ts index 24a8715bd..f06bee9ad 100644 --- a/packages/core/src/helpers/eip1193.ts +++ b/packages/core/src/helpers/eip1193.ts @@ -4,7 +4,8 @@ import { Network } from '../providers' export function subscribeToProviderEvents( provider: EventEmitter | undefined, onUpdate: (updatedNetwork: Partial) => void, - onDisconnect: (error: Error) => void + onDisconnect: (error: Error) => void, + onChainChanged?: (newChainId: number) => void ) { if (provider?.on) { const onConnectListener = (info: { chainId: string } | undefined): void => { @@ -20,6 +21,7 @@ export function subscribeToProviderEvents( provider.on('disconnect', onDisconnectListener) const onChainChangedListener = (chainId: string): void => { + onChainChanged?.(Number(chainId)) onUpdate({ chainId: Number(chainId) }) } provider.on('chainChanged', onChainChangedListener) diff --git a/packages/core/src/helpers/injectedProvider.ts b/packages/core/src/helpers/injectedProvider.ts index d3defa66c..fed174b43 100644 --- a/packages/core/src/helpers/injectedProvider.ts +++ b/packages/core/src/helpers/injectedProvider.ts @@ -3,7 +3,7 @@ import { providers } from 'ethers' const GET_METAMASK_LINK = 'https://metamask.io/download.html' -export async function getInjectedProvider(pollingInterval: number) { +export async function getInjectedProvider(getPollingInterval: (chaindId: number) => number) { if (!window.ethereum) { window.open(GET_METAMASK_LINK) return undefined @@ -21,6 +21,7 @@ export async function getInjectedProvider(pollingInterval: number) { } const provider = new providers.Web3Provider(injectedProvider, 'any') - provider.pollingInterval = pollingInterval + const chainId = await provider.send('eth_chainId', []) + provider.pollingInterval = getPollingInterval(chainId) return provider } diff --git a/packages/core/src/providers/chainState/multiChainStates/provider.tsx b/packages/core/src/providers/chainState/multiChainStates/provider.tsx index de8fde491..ae66ab9a6 100644 --- a/packages/core/src/providers/chainState/multiChainStates/provider.tsx +++ b/packages/core/src/providers/chainState/multiChainStates/provider.tsx @@ -86,7 +86,7 @@ export function MultiChainStateProvider({ children, multicallAddresses }: Props) updateNetworks({ type: 'UPDATE_NON_STATIC_CALLS_COUNT', chainId, - count: callsOnThisChain.filter((call) => !call.isStatic).length, + count: calls.filter((call) => !call.isStatic && call.chainId === chainId).length, }) performMulticall( diff --git a/packages/core/src/providers/network/network/provider.tsx b/packages/core/src/providers/network/network/provider.tsx index ad93bf71c..7bc49a477 100644 --- a/packages/core/src/providers/network/network/provider.tsx +++ b/packages/core/src/providers/network/network/provider.tsx @@ -33,16 +33,20 @@ async function tryToGetAccount(provider: JsonRpcProvider) { * @internal Intended for internal use - use it on your own risk */ export function NetworkProvider({ children, providerOverride }: NetworkProviderProps) { - const { autoConnect, pollingInterval, noMetamaskDeactivate } = useConfig() + const { autoConnect, pollingInterval, noMetamaskDeactivate, pollingIntervals } = useConfig() const [network, dispatch] = useReducer(networkReducer, defaultNetworkState) const [onUnsubscribe, setOnUnsubscribe] = useState<() => void>(() => () => undefined) const [shouldConnectMetamask, setShouldConnectMetamask] = useLocalStorage('shouldConnectMetamask') const [isLoading, setLoading] = useState(false) + const getPollingInterval = useCallback((chainId: number) => pollingIntervals?.[chainId] ?? pollingInterval, [ + pollingInterval, + pollingIntervals, + ]) const activateBrowserWallet = useCallback(async () => { setLoading(true) - const injectedProvider = await getInjectedProvider(pollingInterval) + const injectedProvider = await getInjectedProvider(getPollingInterval) if (!injectedProvider) { reportError(new Error('No injected provider available')) @@ -129,7 +133,10 @@ export function NetworkProvider({ children, providerOverride }: NetworkProviderP const clearSubscriptions = subscribeToProviderEvents( (wrappedProvider as any).provider, update, - onDisconnect(wrappedProvider) + onDisconnect(wrappedProvider), + (chainId) => { + wrappedProvider.pollingInterval = getPollingInterval(chainId) + } ) setOnUnsubscribe(() => clearSubscriptions) update({ diff --git a/packages/core/src/providers/network/readonlyNetworks/provider.tsx b/packages/core/src/providers/network/readonlyNetworks/provider.tsx index 98ee12395..c4ad90306 100644 --- a/packages/core/src/providers/network/readonlyNetworks/provider.tsx +++ b/packages/core/src/providers/network/readonlyNetworks/provider.tsx @@ -1,4 +1,4 @@ -import { ReactNode, useEffect, useReducer, useState } from 'react' +import { ReactNode, useCallback, useEffect, useReducer, useState } from 'react' import { providers } from 'ethers' import { useConfig } from '../../../hooks' import { Providers } from './model' @@ -35,7 +35,7 @@ export const getProvidersFromConfig = (readOnlyUrls: NodeUrls) => ) export function ReadonlyNetworksProvider({ providerOverrides = {}, children }: NetworkProviderProps) { - const { readOnlyUrls = {} } = useConfig() + const { readOnlyUrls = {}, pollingInterval, pollingIntervals } = useConfig() const { isActive } = useWindow() const [providers, setProviders] = useState(() => ({ ...getProvidersFromConfig(readOnlyUrls), @@ -46,6 +46,10 @@ export function ReadonlyNetworksProvider({ providerOverrides = {}, children }: N Object.keys({ ...readOnlyUrls, ...providerOverrides }).map((chainId) => [chainId, { nonStaticCalls: 0 }]) ), }) + const getPollingInterval = useCallback((chainId: number) => pollingIntervals?.[chainId] ?? pollingInterval, [ + pollingInterval, + pollingIntervals, + ]) useEffect(() => { setProviders({ ...getProvidersFromConfig(readOnlyUrls), ...providerOverrides }) @@ -60,6 +64,12 @@ export function ReadonlyNetworksProvider({ providerOverrides = {}, children }: N } }, [networkStates, isActive]) + useEffect(() => { + for (const [chainId, provider] of Object.entries(providers)) { + provider.pollingInterval = getPollingInterval(Number(chainId)) + } + }, [providers, getPollingInterval]) + return ( ( const { result, waitForNextUpdate, rerender, unmount } = renderHook(hook, { wrapper: (wrapperProps) => ( - + ), diff --git a/packages/core/src/testing/renderWeb3Hook.tsx b/packages/core/src/testing/renderWeb3Hook.tsx index a1dab6b4e..95531ae67 100644 --- a/packages/core/src/testing/renderWeb3Hook.tsx +++ b/packages/core/src/testing/renderWeb3Hook.tsx @@ -1,6 +1,6 @@ import { MockProvider } from '@ethereum-waffle/provider' import { renderHook } from '@testing-library/react-hooks' -import { BlockNumberProvider, NetworkProvider, MultiChainStateProvider } from '../providers' +import { BlockNumberProvider, NetworkProvider, MultiChainStateProvider, ConfigProvider } from '../providers' import React from 'react' import { deployMulticall, getWaitUtils, IdentityWrapper, mineBlock } from './utils' import { BlockNumbersProvider } from '../providers/blockNumber/blockNumbers' @@ -42,7 +42,6 @@ export const renderWeb3Hook = async ( const addSingleProvider = async (currentProvider: MockProvider) => { const { chainId } = await currentProvider.getNetwork() - currentProvider.pollingInterval = options?.mockProviderOptions?.pollingInterval ?? 200 providers[chainId] = currentProvider const mockMulticallAddresses = await deployMulticall(currentProvider, chainId) @@ -74,17 +73,19 @@ export const renderWeb3Hook = async ( const { result, waitForNextUpdate, rerender, unmount } = renderHook(hook, { wrapper: (wrapperProps) => ( - - - - - - - - - - - + + + + + + + + + + + + + ), initialProps: options?.renderHook?.initialProps, }) From b4e652bbeb7816c0003a5801565765c020375cca Mon Sep 17 00:00:00 2001 From: TrueFi Bot <98168415+truefibot@users.noreply.github.com> Date: Wed, 22 Jun 2022 16:31:38 +0200 Subject: [PATCH 53/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#838)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/blue-peas-scream.md | 5 ----- packages/coingecko/CHANGELOG.md | 7 +++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/testing/CHANGELOG.md | 7 +++++++ packages/testing/package.json | 2 +- 7 files changed, 23 insertions(+), 8 deletions(-) delete mode 100644 .changeset/blue-peas-scream.md diff --git a/.changeset/blue-peas-scream.md b/.changeset/blue-peas-scream.md deleted file mode 100644 index 906551f74..000000000 --- a/.changeset/blue-peas-scream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -Add option to config to specify different polling intervals for different chains diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index 164f8938a..606634b9f 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/coingecko +## 1.0.12 + +### Patch Changes + +- Updated dependencies [5776ed9] + - @usedapp/core@1.0.12 + ## 1.0.11 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index 3bc043bce..948163474 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.11", + "version": "1.0.12", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 701c0c8a4..2d243a54c 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @usedapp/core +## 1.0.12 + +### Patch Changes + +- 5776ed9: Add option to config to specify different polling intervals for different chains + ## 1.0.11 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index a51b839d3..b12f25ee5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.11", + "version": "1.0.12", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 540e64852..88acb835c 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/testing +## 1.0.12 + +### Patch Changes + +- Updated dependencies [5776ed9] + - @usedapp/core@1.0.12 + ## 1.0.11 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index a4fb61ad6..4137f39b2 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.11", + "version": "1.0.12", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git", From 57e7582c199eeae0cb1e34d79f85a10fde6ce610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Wed, 22 Jun 2022 16:49:16 +0200 Subject: [PATCH 54/59] =?UTF-8?q?=F0=9F=94=9D=20Update=20Nanoid=20version?= =?UTF-8?q?=20(#839)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update version * Create update-nanoid.md Co-authored-by: mj426382 Co-authored-by: Quan Pham --- .changeset/update-nanoid.md | 5 +++++ packages/core/package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- 3 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 .changeset/update-nanoid.md diff --git a/.changeset/update-nanoid.md b/.changeset/update-nanoid.md new file mode 100644 index 000000000..7c93161cf --- /dev/null +++ b/.changeset/update-nanoid.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +πŸ” Update Nanoid version diff --git a/packages/core/package.json b/packages/core/package.json index b12f25ee5..71b76333c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -18,7 +18,7 @@ "fetch-mock": "^9.11.0", "lodash.merge": "^4.6.2", "lodash.pickby": "^4.6.0", - "nanoid": "3.1.22" + "nanoid": "3.3.4" }, "peerDependencies": { "ethers": "*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9456c8733..ec11d75b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,7 +96,7 @@ importers: lodash.pickby: ^4.6.0 mocha: ^8.2.1 mock-local-storage: ^1.1.17 - nanoid: 3.1.22 + nanoid: 3.3.4 prettier: ^2.1.2 react: ^17.0.1 solc: ^0.8.12 @@ -109,7 +109,7 @@ importers: fetch-mock: 9.11.0 lodash.merge: 4.6.2 lodash.pickby: 4.6.0 - nanoid: 3.1.22 + nanoid: 3.3.4 devDependencies: '@ethereum-waffle/provider': 4.0.0-alpha.0 '@ethersproject/abstract-provider': 5.6.1 @@ -16348,16 +16348,16 @@ packages: hasBin: true dev: true - /nanoid/3.1.22: - resolution: {integrity: sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ==} + /nanoid/3.3.1: + resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - dev: false - /nanoid/3.3.1: - resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} + /nanoid/3.3.4: + resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + dev: false /nanomatch/1.2.13: resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==} From d59640501421c10f9729feaaa3f6ef8e186875e8 Mon Sep 17 00:00:00 2001 From: Tend <65033249+TendTo@users.noreply.github.com> Date: Wed, 22 Jun 2022 17:50:44 +0200 Subject: [PATCH 55/59] =?UTF-8?q?=E2=9E=95=20Add=20stricter=20contract=20t?= =?UTF-8?q?ype=20check=20on=20the=20useLogs=20hook=20(#829)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add stricter contract type check on the useLogs hook Using generics in the TypedFilter interface add some nice type checks to the filter parameter of useLogs, but it doesn't help the user when creating the parameter, unless they go out of their way to instantiate he object with the TypedFilter type specified. This way, the check is provided directly by the function. It can still be bypassed, if one wishes to, by calling it this way: useLogs(...) * Update PR name * Create add-sctriter-check-useLogs.md Co-authored-by: Mateusz JanduΕ‚a <71319308+mj426382@users.noreply.github.com> --- .changeset/add-sctriter-check-useLogs.md | 5 +++++ packages/core/src/hooks/useLogs.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/add-sctriter-check-useLogs.md diff --git a/.changeset/add-sctriter-check-useLogs.md b/.changeset/add-sctriter-check-useLogs.md new file mode 100644 index 000000000..423d7a3df --- /dev/null +++ b/.changeset/add-sctriter-check-useLogs.md @@ -0,0 +1,5 @@ +--- +"@usedapp/core": patch +--- + +βž• Add stricter contract type check on the useLogs hook diff --git a/packages/core/src/hooks/useLogs.ts b/packages/core/src/hooks/useLogs.ts index 91b50a858..f03118388 100644 --- a/packages/core/src/hooks/useLogs.ts +++ b/packages/core/src/hooks/useLogs.ts @@ -26,7 +26,10 @@ export interface TypedFilter< * @returns an array of decoded logs (see {@link LogsResult}) * @public */ -export function useLogs(filter: TypedFilter | Falsy, queryParams: LogQueryParams = {}): LogsResult { +export function useLogs = ContractEventNames>( + filter: TypedFilter | Falsy, + queryParams: LogQueryParams = {} +): LogsResult { const { fromBlock, toBlock, blockHash } = queryParams const rawFilter = useMemo(() => encodeFilterData(filter, fromBlock, toBlock, blockHash), [ From 06cac784b4c0fa4a53676a9dd3f221a0aa047313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Jandu=C5=82a?= <71319308+mj426382@users.noreply.github.com> Date: Fri, 24 Jun 2022 14:22:58 +0200 Subject: [PATCH 56/59] =?UTF-8?q?=E2=9B=93=20Add=20log=20out=20after=20cha?= =?UTF-8?q?nging=20chain=20(#842)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add log out after changing chain * Create siwe-chain-logouter.md Co-authored-by: mj426382 --- .changeset/siwe-chain-logouter.md | 5 +++++ packages/siwe/src/provider.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/siwe-chain-logouter.md diff --git a/.changeset/siwe-chain-logouter.md b/.changeset/siwe-chain-logouter.md new file mode 100644 index 000000000..26bf6b334 --- /dev/null +++ b/.changeset/siwe-chain-logouter.md @@ -0,0 +1,5 @@ +--- +"@usedapp/siwe": patch +--- + +β›“ Add log out after changing chain diff --git a/packages/siwe/src/provider.tsx b/packages/siwe/src/provider.tsx index f53349a81..7ca8ca328 100644 --- a/packages/siwe/src/provider.tsx +++ b/packages/siwe/src/provider.tsx @@ -47,7 +47,7 @@ export const SiweProvider = ({ children, backendUrl, api }: SiweProviderProps) = if (authToken === null) { return } - void getAuth(account, chainId).then((res) => (res.loggedIn ? setLoggedIn(true) : undefined)) + void getAuth(account, chainId).then((res) => (res.loggedIn ? setLoggedIn(true) : setLoggedIn(false))) }, [authToken, getAuth, account, chainId]) const signIn = useCallback( From d07e0df67aff537ba21ead953a4856c851d98455 Mon Sep 17 00:00:00 2001 From: Vladyslav Yatsenko <52505649+yivlad@users.noreply.github.com> Date: Fri, 24 Jun 2022 14:40:22 +0200 Subject: [PATCH 57/59] =?UTF-8?q?=F0=9F=92=82=20ReadonlyNetworksProvider?= =?UTF-8?q?=20fix=20refreshing=20cycle=20(#843)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/tiny-jars-tan.md | 5 +++++ .../network/readonlyNetworks/provider.tsx | 19 +++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 .changeset/tiny-jars-tan.md diff --git a/.changeset/tiny-jars-tan.md b/.changeset/tiny-jars-tan.md new file mode 100644 index 000000000..e6a5f506d --- /dev/null +++ b/.changeset/tiny-jars-tan.md @@ -0,0 +1,5 @@ +--- +'@usedapp/core': patch +--- + +Fix refreshing cycle in ReadonlyNetworksProvider diff --git a/packages/core/src/providers/network/readonlyNetworks/provider.tsx b/packages/core/src/providers/network/readonlyNetworks/provider.tsx index c4ad90306..2a61df03f 100644 --- a/packages/core/src/providers/network/readonlyNetworks/provider.tsx +++ b/packages/core/src/providers/network/readonlyNetworks/provider.tsx @@ -1,4 +1,4 @@ -import { ReactNode, useCallback, useEffect, useReducer, useState } from 'react' +import { ReactNode, useCallback, useEffect, useMemo, useReducer, useState } from 'react' import { providers } from 'ethers' import { useConfig } from '../../../hooks' import { Providers } from './model' @@ -70,14 +70,13 @@ export function ReadonlyNetworksProvider({ providerOverrides = {}, children }: N } }, [providers, getPollingInterval]) - return ( - - {children} - + const networks = useMemo( + () => ({ + providers, + updateNetworkState: dispatchNetworkState, + }), + [providers, dispatchNetworkState] ) + + return {children} } From a7c6620ce8f9d7d82fa30f0caecd40b2f2fc6e7d Mon Sep 17 00:00:00 2001 From: TrueFi Bot <98168415+truefibot@users.noreply.github.com> Date: Fri, 24 Jun 2022 14:41:07 +0200 Subject: [PATCH 58/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#840)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/add-sctriter-check-useLogs.md | 5 ----- .changeset/siwe-chain-logouter.md | 5 ----- .changeset/update-nanoid.md | 5 ----- packages/coingecko/CHANGELOG.md | 8 ++++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 7 +++++++ packages/core/package.json | 2 +- packages/siwe/CHANGELOG.md | 9 +++++++++ packages/siwe/package.json | 2 +- packages/testing/CHANGELOG.md | 8 ++++++++ packages/testing/package.json | 2 +- 11 files changed, 36 insertions(+), 19 deletions(-) delete mode 100644 .changeset/add-sctriter-check-useLogs.md delete mode 100644 .changeset/siwe-chain-logouter.md delete mode 100644 .changeset/update-nanoid.md diff --git a/.changeset/add-sctriter-check-useLogs.md b/.changeset/add-sctriter-check-useLogs.md deleted file mode 100644 index 423d7a3df..000000000 --- a/.changeset/add-sctriter-check-useLogs.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -βž• Add stricter contract type check on the useLogs hook diff --git a/.changeset/siwe-chain-logouter.md b/.changeset/siwe-chain-logouter.md deleted file mode 100644 index 26bf6b334..000000000 --- a/.changeset/siwe-chain-logouter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/siwe": patch ---- - -β›“ Add log out after changing chain diff --git a/.changeset/update-nanoid.md b/.changeset/update-nanoid.md deleted file mode 100644 index 7c93161cf..000000000 --- a/.changeset/update-nanoid.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@usedapp/core": patch ---- - -πŸ” Update Nanoid version diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index 606634b9f..f44dfd385 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,13 @@ # @usedapp/coingecko +## 1.0.13 + +### Patch Changes + +- Updated dependencies [d596405] +- Updated dependencies [57e7582] + - @usedapp/core@1.0.13 + ## 1.0.12 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index 948163474..21ffec7ba 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.12", + "version": "1.0.13", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 2d243a54c..5cb5d3954 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/core +## 1.0.13 + +### Patch Changes + +- d596405: βž• Add stricter contract type check on the useLogs hook +- 57e7582: πŸ” Update Nanoid version + ## 1.0.12 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 71b76333c..a96fa74c0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.12", + "version": "1.0.13", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/siwe/CHANGELOG.md b/packages/siwe/CHANGELOG.md index 3224b86c3..95f6b507b 100644 --- a/packages/siwe/CHANGELOG.md +++ b/packages/siwe/CHANGELOG.md @@ -1,5 +1,14 @@ # @usedapp/siwe +## 0.1.5 + +### Patch Changes + +- 06cac78: β›“ Add log out after changing chain +- Updated dependencies [d596405] +- Updated dependencies [57e7582] + - @usedapp/core@1.0.13 + ## 0.1.4 ### Patch Changes diff --git a/packages/siwe/package.json b/packages/siwe/package.json index a56b93696..1b25c9bed 100644 --- a/packages/siwe/package.json +++ b/packages/siwe/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/siwe", - "version": "0.1.4", + "version": "0.1.5", "repository": "git@github.com:TrueFiEng/useDApp.git", "author": "TrueFiEng", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index 88acb835c..a3043757e 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,13 @@ # @usedapp/testing +## 1.0.13 + +### Patch Changes + +- Updated dependencies [d596405] +- Updated dependencies [57e7582] + - @usedapp/core@1.0.13 + ## 1.0.12 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index 4137f39b2..00a0769c8 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.12", + "version": "1.0.13", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git", From 94507984ae5a3089a013609cb5c937abbf4a2d34 Mon Sep 17 00:00:00 2001 From: TrueFi Bot <98168415+truefibot@users.noreply.github.com> Date: Fri, 24 Jun 2022 15:06:35 +0200 Subject: [PATCH 59/59] =?UTF-8?q?=F0=9F=8E=89=20Release=20new=20version=20?= =?UTF-8?q?(#844)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/tiny-jars-tan.md | 5 ----- packages/coingecko/CHANGELOG.md | 7 +++++++ packages/coingecko/package.json | 2 +- packages/core/CHANGELOG.md | 6 ++++++ packages/core/package.json | 2 +- packages/testing/CHANGELOG.md | 7 +++++++ packages/testing/package.json | 2 +- 7 files changed, 23 insertions(+), 8 deletions(-) delete mode 100644 .changeset/tiny-jars-tan.md diff --git a/.changeset/tiny-jars-tan.md b/.changeset/tiny-jars-tan.md deleted file mode 100644 index e6a5f506d..000000000 --- a/.changeset/tiny-jars-tan.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@usedapp/core': patch ---- - -Fix refreshing cycle in ReadonlyNetworksProvider diff --git a/packages/coingecko/CHANGELOG.md b/packages/coingecko/CHANGELOG.md index f44dfd385..8ef6e2080 100644 --- a/packages/coingecko/CHANGELOG.md +++ b/packages/coingecko/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/coingecko +## 1.0.14 + +### Patch Changes + +- Updated dependencies [d07e0df] + - @usedapp/core@1.0.14 + ## 1.0.13 ### Patch Changes diff --git a/packages/coingecko/package.json b/packages/coingecko/package.json index 21ffec7ba..007ec4c30 100644 --- a/packages/coingecko/package.json +++ b/packages/coingecko/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/coingecko", - "version": "1.0.13", + "version": "1.0.14", "main": "dist/cjs/src/index.js", "module": "dist/esm/src/index.js", "types": "dist/esm/src/index.d.ts", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 5cb5d3954..5adf823db 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @usedapp/core +## 1.0.14 + +### Patch Changes + +- d07e0df: Fix refreshing cycle in ReadonlyNetworksProvider + ## 1.0.13 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index a96fa74c0..0b6084af5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/core", - "version": "1.0.13", + "version": "1.0.14", "repository": "git@github.com:EthWorks/useDApp.git", "author": "Ethworks", "license": "MIT", diff --git a/packages/testing/CHANGELOG.md b/packages/testing/CHANGELOG.md index a3043757e..bcb241eab 100644 --- a/packages/testing/CHANGELOG.md +++ b/packages/testing/CHANGELOG.md @@ -1,5 +1,12 @@ # @usedapp/testing +## 1.0.14 + +### Patch Changes + +- Updated dependencies [d07e0df] + - @usedapp/core@1.0.14 + ## 1.0.13 ### Patch Changes diff --git a/packages/testing/package.json b/packages/testing/package.json index 00a0769c8..947e73318 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@usedapp/testing", - "version": "1.0.13", + "version": "1.0.14", "main": "dist/src/index.js", "types": "dist/src/index.d.ts", "repository": "git@github.com:EthWorks/useDApp.git",