diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml deleted file mode 100644 index ce6e1cd18..000000000 --- a/.github/actions/setup/action.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: Setup - -runs: - using: composite - steps: - - uses: actions/setup-node@v2 - with: - node-version: 14 - registry-url: https://registry.npmjs.org - - - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - shell: bash - - - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - uses: actions/cache@v2 - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - run: yarn install --frozen-lockfile - shell: bash diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 99043e5a8..000000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: ./.github/actions/setup - - - run: yarn build diff --git a/.github/workflows/semantic-commit.yaml b/.github/workflows/conventional-commit.yaml similarity index 91% rename from .github/workflows/semantic-commit.yaml rename to .github/workflows/conventional-commit.yaml index c2da36667..972358f04 100644 --- a/.github/workflows/semantic-commit.yaml +++ b/.github/workflows/conventional-commit.yaml @@ -1,4 +1,4 @@ -name: "Semantic commit" +name: Conventional commit on: pull_request_target: diff --git a/.github/workflows/crowdin-download.yaml b/.github/workflows/crowdin-download.yaml index 963f76ed5..1599031ec 100644 --- a/.github/workflows/crowdin-download.yaml +++ b/.github/workflows/crowdin-download.yaml @@ -1,4 +1,4 @@ -name: Crowdin download +name: Crowdin Download on: schedule: @@ -10,11 +10,17 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: ./.github/actions/setup + - uses: actions/setup-node@v3 + with: + node-version: 14 + registry-url: https://registry.npmjs.org + cache: 'yarn' + + - run: yarn install --frozen-lockfile --ignore-scripts - - run: "yarn i18n:extract" + - run: yarn i18n:extract - uses: crowdin/github-action@1.4.8 with: diff --git a/.github/workflows/crowdin-upload.yaml b/.github/workflows/crowdin-upload.yaml index c500ce148..28c338d1e 100644 --- a/.github/workflows/crowdin-upload.yaml +++ b/.github/workflows/crowdin-upload.yaml @@ -1,4 +1,4 @@ -name: Crowdin upload +name: Crowdin Upload on: push: @@ -10,9 +10,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: ./.github/actions/setup + - uses: actions/setup-node@v3 + with: + node-version: 14 + registry-url: https://registry.npmjs.org + cache: 'yarn' + + - run: yarn install --frozen-lockfile --ignore-scripts - run: yarn i18n:extract diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml deleted file mode 100644 index 48ca4fc2e..000000000 --- a/.github/workflows/e2e.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: "Integration test" - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - e2e-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: ./.github/actions/setup - - - run: yarn hardhat & - - - run: yarn test:e2e diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f6b8a8c8c..d6228965e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,9 +16,15 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: ./.github/actions/setup + - uses: actions/setup-node@v3 + with: + node-version: 14 + registry-url: https://registry.npmjs.org + cache: 'yarn' + + - run: yarn install --frozen-lockfile --ignore-scripts - uses: wearerequired/lint-action@v2 with: @@ -26,4 +32,4 @@ jobs: eslint: true eslint_extensions: 'js,jsx,ts,tsx' git_email: lint-action@uniswap.org - commit_message: "chore(lint): fix code style issues with ${linter}" + commit_message: "style(lint): lint action with ${linter}" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index eca7fa7ac..9f6ff7e3a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,19 +7,23 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: ./.github/actions/setup + - uses: actions/setup-node@v3 + with: + node-version: 14 + registry-url: https://registry.npmjs.org + cache: 'yarn' - - run: yarn lint + - run: yarn install --frozen-lockfile - run: yarn test if: success() - - run: yarn hardhat & - if: success() - - run: yarn test:e2e + if: success() + env: + JSON_RPC_PROVIDER: ${{ secrets.JSON_RPC_PROVIDER }} - run: yarn release if: success() diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 74291c065..46363aaca 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: "Unit test" +name: Test on: push: @@ -9,11 +9,21 @@ on: - main jobs: - unit-test: + test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: ./.github/actions/setup + - uses: actions/setup-node@v3 + with: + node-version: 14 + registry-url: https://registry.npmjs.org + cache: 'yarn' + + - run: yarn install --frozen-lockfile - run: yarn test + + - run: yarn test:e2e + env: + JSON_RPC_PROVIDER: ${{ secrets.JSON_RPC_PROVIDER }} diff --git a/.gitignore b/.gitignore index b361a5020..706df9d4d 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ package-lock.json # misc .DS_Store /.netlify +.env npm-debug.log* yarn-debug.log* yarn-error.log* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9479d87f3..c3d4e9343 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,13 +1,21 @@ - # Contributing Thank you for your interest in contributing to the Uniswap widgets! 🦄 # Development -Before developing locally, be sure to install the project's dependencies. +Before developing locally, you'll need install the project's dependencies and create a `.env` file. + +- `yarn install` + +The `.env` file specifies third-party APIs for use in e2e testing and the cosmos viewer: +- `JSON_RPC_PROVIDER` must be specified for e2e tests to work. +- `INFURA_KEY` must be specified to use a network provider in the cosmos viewer. -1. `yarn install` +``` +JSON_RPC_PROVIDER='` +INFURA_KEY='' +``` ## Running widgets locally diff --git a/e2e/connect.test.tsx b/e2e/connect.test.tsx index 79271a853..d6c922e5a 100644 --- a/e2e/connect.test.tsx +++ b/e2e/connect.test.tsx @@ -1,14 +1,15 @@ +/** + * @jest-environment hardhat/dist/jsdom + */ + import '@ethersproject/providers' +import 'jest-environment-hardhat' -import { JsonRpcProvider } from '@ethersproject/providers' import { render, RenderResult, waitFor } from '@testing-library/react' import { tokens } from '@uniswap/default-token-list' import { SwapWidget } from '../src' -const JSON_RPC_ENDPOINT = 'http://127.0.0.1:8545/' -const provider = new JsonRpcProvider('http://127.0.0.1:8545/') - describe('connect', () => { let component: RenderResult let wallet: HTMLElement @@ -27,7 +28,7 @@ describe('connect', () => { describe('with jsonRpcEndpoint', () => { it('prompts for wallet connection in the Wallet', async () => { - component.rerender() + component.rerender() expect(wallet.hidden).toBeTruthy() expect(toolbar.textContent).toBe('Connecting…') @@ -40,7 +41,7 @@ describe('connect', () => { describe('with provider', () => { it('does not prompt for wallet connection', async () => { - component.rerender() + component.rerender() expect(wallet.hidden).toBeTruthy() expect(toolbar.textContent).toBe('Connecting…') diff --git a/hardhat.config.js b/hardhat.config.js deleted file mode 100644 index 77ff596c8..000000000 --- a/hardhat.config.js +++ /dev/null @@ -1,13 +0,0 @@ -const mainnetFork = { - url: 'https://eth-mainnet.alchemyapi.io/v2/lhVWQ3rY2i5_OZtYkU4Lzg_OsDT97Eoz', - blockNumber: 13582625, -} - -module.exports = { - networks: { - hardhat: { - chainId: 1, - forking: mainnetFork, - }, - }, -} diff --git a/hardhat.config.ts b/hardhat.config.ts new file mode 100644 index 000000000..159afc2ed --- /dev/null +++ b/hardhat.config.ts @@ -0,0 +1,22 @@ +import '@nomiclabs/hardhat-ethers' + +import * as dotenv from 'dotenv' + +dotenv.config() + +const mainnetFork = { + url: `${process.env.JSON_RPC_PROVIDER}`, + blockNumber: 14390000, +} + +module.exports = { + networks: { + hardhat: { + chainId: 1, + forking: mainnetFork, + accounts: { + count: 1, + }, + }, + }, +} diff --git a/jest.config.js b/jest.config.js index da54c41e3..eef78a3b7 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,8 +1,8 @@ module.exports = { - setupFiles: ['/test/setup.ts'], testEnvironment: 'jsdom', moduleNameMapper: { '.scss$': '/test/scssStub', '.(png|svg)$': '/test/imageStub', }, + setupFiles: ['/test/setup.ts'], } diff --git a/package.json b/package.json index 41f656666..6220162ec 100644 --- a/package.json +++ b/package.json @@ -38,9 +38,8 @@ "build": "tsc && rollup --config --failAfterWarnings", "release": "semantic-release", "lint": "eslint .", - "hardhat": "hardhat node", - "test": "jest --testPathIgnorePatterns=e2e", - "test:e2e": "jest --testPathPattern=e2e" + "test": "jest src", + "test:e2e": "jest e2e" }, "browserslist": { "production": [ @@ -118,6 +117,7 @@ "@lingui/core": "^3.9.0", "@lingui/macro": "^3.9.0", "@lingui/react": "^3.9.0", + "@nomiclabs/hardhat-ethers": "^2.0.6", "@rollup/plugin-babel": "^5.3.0", "@rollup/plugin-commonjs": "^21.0.1", "@rollup/plugin-json": "^4.1.0", @@ -148,6 +148,7 @@ "@typescript-eslint/eslint-plugin": "^5.21.0", "@typescript-eslint/parser": "^5.21.0", "@uniswap/default-token-list": "^3.2.0", + "jest-environment-hardhat": "^1.1.4", "@uniswap/v2-core": "1.0.0", "@uniswap/v2-periphery": "^1.1.0-beta.0", "@uniswap/v3-core": "1.0.0", @@ -160,6 +161,7 @@ "babel-plugin-macros": "^3.1.0", "babel-plugin-module-resolver": "^4.1.0", "babel-runtime": "^6.26.0", + "dotenv": "^16.0.1", "eslint": "^7.11.0", "eslint-config-prettier": "^6.11.0", "eslint-config-react-app": "^7.0.1", @@ -169,7 +171,7 @@ "eslint-plugin-react-hooks": "^4.5.0", "eslint-plugin-simple-import-sort": "^7.0.0", "eslint-plugin-unused-imports": "^2.0.0", - "hardhat": "^2.9.3", + "hardhat": "^2.9.6", "html-webpack-plugin": "^5.5.0", "inter-ui": "^3.13.1", "jest": "^27.5.1", diff --git a/src/cosmos/useJsonRpcEndpoint.ts b/src/cosmos/useJsonRpcEndpoint.ts index e8df4ec44..39f423df1 100644 --- a/src/cosmos/useJsonRpcEndpoint.ts +++ b/src/cosmos/useJsonRpcEndpoint.ts @@ -1,25 +1,27 @@ import { SupportedChainId } from '@uniswap/widgets' -import useOption from './useOption' +import useOption, { NONE } from './useOption' const INFURA_KEY = process.env.INFURA_KEY -if (typeof INFURA_KEY === 'undefined') { - throw new Error(`INFURA_KEY must be a defined environment variable`) +if (INFURA_KEY === undefined) { + console.warn(`INFURA_KEY must be a defined environment variable to use JsonRpcEndpoints in the cosmos viewer`) } -export const INFURA_NETWORK_URLS: { [key in SupportedChainId]: string } = { - [SupportedChainId.MAINNET]: `https://mainnet.infura.io/v3/${INFURA_KEY}`, - [SupportedChainId.RINKEBY]: `https://rinkeby.infura.io/v3/${INFURA_KEY}`, - [SupportedChainId.ROPSTEN]: `https://ropsten.infura.io/v3/${INFURA_KEY}`, - [SupportedChainId.GOERLI]: `https://goerli.infura.io/v3/${INFURA_KEY}`, - [SupportedChainId.KOVAN]: `https://kovan.infura.io/v3/${INFURA_KEY}`, - [SupportedChainId.OPTIMISM]: `https://optimism-mainnet.infura.io/v3/${INFURA_KEY}`, - [SupportedChainId.OPTIMISTIC_KOVAN]: `https://optimism-kovan.infura.io/v3/${INFURA_KEY}`, - [SupportedChainId.ARBITRUM_ONE]: `https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY}`, - [SupportedChainId.ARBITRUM_RINKEBY]: `https://arbitrum-rinkeby.infura.io/v3/${INFURA_KEY}`, - [SupportedChainId.POLYGON]: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`, - [SupportedChainId.POLYGON_MUMBAI]: `https://polygon-mumbai.infura.io/v3/${INFURA_KEY}`, -} +export const INFURA_NETWORK_URLS: { [key in SupportedChainId]?: string } = INFURA_KEY + ? { + [SupportedChainId.MAINNET]: `https://mainnet.infura.io/v3/${INFURA_KEY}`, + [SupportedChainId.RINKEBY]: `https://rinkeby.infura.io/v3/${INFURA_KEY}`, + [SupportedChainId.ROPSTEN]: `https://ropsten.infura.io/v3/${INFURA_KEY}`, + [SupportedChainId.GOERLI]: `https://goerli.infura.io/v3/${INFURA_KEY}`, + [SupportedChainId.KOVAN]: `https://kovan.infura.io/v3/${INFURA_KEY}`, + [SupportedChainId.OPTIMISM]: `https://optimism-mainnet.infura.io/v3/${INFURA_KEY}`, + [SupportedChainId.OPTIMISTIC_KOVAN]: `https://optimism-kovan.infura.io/v3/${INFURA_KEY}`, + [SupportedChainId.ARBITRUM_ONE]: `https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY}`, + [SupportedChainId.ARBITRUM_RINKEBY]: `https://arbitrum-rinkeby.infura.io/v3/${INFURA_KEY}`, + [SupportedChainId.POLYGON]: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`, + [SupportedChainId.POLYGON_MUMBAI]: `https://polygon-mumbai.infura.io/v3/${INFURA_KEY}`, + } + : {} export default function useJsonRpcEndpoint() { const endpoints = Object.entries(INFURA_NETWORK_URLS).reduce( @@ -29,5 +31,9 @@ export default function useJsonRpcEndpoint() { }), {} ) - return useOption('jsonRpcEndpoint', { options: endpoints, defaultValue: SupportedChainId[SupportedChainId.MAINNET] }) + + return useOption('jsonRpcEndpoint', { + options: endpoints, + defaultValue: INFURA_NETWORK_URLS[SupportedChainId.MAINNET] ? SupportedChainId[SupportedChainId.MAINNET] : NONE, + }) } diff --git a/src/cosmos/useOption.ts b/src/cosmos/useOption.ts index 0d9d2c829..0f39cf65f 100644 --- a/src/cosmos/useOption.ts +++ b/src/cosmos/useOption.ts @@ -1,6 +1,6 @@ import { useSelect } from 'react-cosmos/fixture' -const NONE = 'None' +export const NONE = 'None' export default function useOption( label: string, diff --git a/src/cosmos/useProvider.ts b/src/cosmos/useProvider.ts index d87f98459..26dec782e 100644 --- a/src/cosmos/useProvider.ts +++ b/src/cosmos/useProvider.ts @@ -17,7 +17,7 @@ const [walletConnect] = initializeConnector( ) export default function useProvider() { - const connectorType = useOption('provider', { options: [Wallet.MetaMask, Wallet.WalletConnect] }) + const connectorType = useOption('provider', { options: [Wallet.MetaMask, Wallet.WalletConnect] }) const [connector, setConnector] = useState() useEffect(() => { let stale = false diff --git a/src/hooks/useBlockNumber.tsx b/src/hooks/useBlockNumber.tsx index e9c2dba9f..434d7e248 100644 --- a/src/hooks/useBlockNumber.tsx +++ b/src/hooks/useBlockNumber.tsx @@ -66,7 +66,7 @@ export function BlockNumberProvider({ children }: { children: ReactNode }) { library.on('block', onBlock) return () => { stale = true - library.removeListener('block', onBlock) + library.off('block', onBlock) } } return undefined diff --git a/webpack.override.js b/webpack.override.js index 2d74c3310..82732184b 100644 --- a/webpack.override.js +++ b/webpack.override.js @@ -7,6 +7,8 @@ const rollup = require('rollup') const { config: rollupConfig, assets: assetConfigs } = require('./rollup.config.js') const path = require('path') +require('dotenv').config() + class RollupPlugin extends EventEmitter { static PLUGIN_NAME = 'rollup-watch' @@ -75,9 +77,7 @@ module.exports = (webpackConfig) => { }, plugins: [ new RollupPlugin({ config: rollupConfig, assetConfigs, watch: mode !== 'production' }), - new DefinePlugin({ - 'process.env.INFURA_KEY': JSON.stringify(process.env.INFURA_KEY || '4bf032f2d38a4ed6bb975b80d6340847'), - }), + new DefinePlugin({ 'process.env.INFURA_KEY': JSON.stringify(process.env.INFURA_KEY) }), new HtmlWebpackPlugin(), ], stats: 'errors-warnings', diff --git a/yarn.lock b/yarn.lock index 428c07940..1a504dbe1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -29,7 +29,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab" integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw== -"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.15.5", "@babel/core@^7.16.0", "@babel/core@^7.7.2", "@babel/core@^7.8.0": +"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.15.5", "@babel/core@^7.16.0": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.10.tgz#74ef0fbf56b7dfc3f198fc2d927f4f03e12f4b05" integrity sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA== @@ -50,6 +50,27 @@ json5 "^2.2.1" semver "^6.3.0" +"@babel/core@^7.7.2", "@babel/core@^7.8.0": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.12.tgz#b4eb2d7ebc3449b062381644c93050db545b70ee" + integrity sha512-44ODe6O1IVz9s2oJE3rZ4trNNKTX9O7KpQpfAP4t8QII/zwrVRHL7i2pxhqtcY7tqMLrrKfMlBKnm1QlrRFs5w== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.12" + "@babel/helper-compilation-targets" "^7.17.10" + "@babel/helper-module-transforms" "^7.17.12" + "@babel/helpers" "^7.17.9" + "@babel/parser" "^7.17.12" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.12" + "@babel/types" "^7.17.12" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + "@babel/eslint-parser@^7.16.3": version "7.17.0" resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.17.0.tgz#eabb24ad9f0afa80e5849f8240d0e5facc2d90d6" @@ -68,6 +89,15 @@ "@jridgewell/gen-mapping" "^0.1.0" jsesc "^2.5.1" +"@babel/generator@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.12.tgz#5970e6160e9be0428e02f4aba62d8551ec366cc8" + integrity sha512-V49KtZiiiLjH/CnIW6OjJdrenrGoyh6AmKQ3k2AZFKozC1h846Q4NYlZ5nqAigPDUXfGzC88+LOUuG8yKd2kCw== + dependencies: + "@babel/types" "^7.17.12" + "@jridgewell/gen-mapping" "^0.3.0" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862" @@ -185,6 +215,20 @@ "@babel/traverse" "^7.17.3" "@babel/types" "^7.17.0" +"@babel/helper-module-transforms@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.17.12.tgz#bec00139520cb3feb078ef7a4578562480efb77e" + integrity sha512-t5s2BeSWIghhFRPh9XMn6EIGmvn8Lmw5RVASJzkIx1mSemubQQBNIZiQD7WzaFmaHIrjAec4x8z9Yx8SjJ1/LA== + dependencies: + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-module-imports" "^7.16.7" + "@babel/helper-simple-access" "^7.17.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/helper-validator-identifier" "^7.16.7" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.12" + "@babel/types" "^7.17.12" + "@babel/helper-optimise-call-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz#a34e3560605abbd31a18546bd2aad3e6d9a174f2" @@ -281,6 +325,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.10.tgz#873b16db82a8909e0fbd7f115772f4b739f6ce78" integrity sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ== +"@babel/parser@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.12.tgz#36c2ed06944e3691ba82735fc4cf62d12d491a23" + integrity sha512-FLzHmN9V3AJIrWfOpvRlZCeVg/WLdicSnTMsLur6uDj9TT8ymUlG9XxURdW/XvuygK+2CW0poOJABdA4m/YKxA== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz#4eda6d6c2a0aa79c70fa7b6da67763dfe2141050" @@ -1048,6 +1097,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.12.tgz#011874d2abbca0ccf1adbe38f6f7a4ff1747599c" + integrity sha512-zULPs+TbCvOkIFd4FrG53xrpxvCBwLIgo6tO0tJorY7YV2IWFxUfS/lXDJbGgfyYt9ery/Gxj2niwttNnB0gIw== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.12" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.17.9" + "@babel/helper-hoist-variables" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/parser" "^7.17.12" + "@babel/types" "^7.17.12" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.11.5", "@babel/types@^7.15.6", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.17.10", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.10.tgz#d35d7b4467e439fcf06d195f8100e0fea7fc82c4" @@ -1056,6 +1121,14 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.12.tgz#1210690a516489c0200f355d87619157fbbd69a0" + integrity sha512-rH8i29wcZ6x9xjzI5ILHL/yZkbQnCERdHlogKuIb4PUr7do4iT8DPekrTbBLWTnRQm6U0GYABbTMSzijmEqlAg== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + to-fast-properties "^2.0.0" + "@base2/pretty-print-object@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.0.tgz#860ce718b0b73f4009e153541faff2cb6b85d047" @@ -1974,6 +2047,15 @@ "@jridgewell/set-array" "^1.0.0" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz#cf92a983c83466b8c0ce9124fadeaf09f7c66ea9" + integrity sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/resolve-uri@^3.0.3": version "3.0.6" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.6.tgz#4ac237f4dabc8dd93330386907b97591801f7352" @@ -2149,6 +2231,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@nomiclabs/hardhat-ethers@^2.0.6": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.6.tgz#1c695263d5b46a375dcda48c248c4fba9dfe2fc2" + integrity sha512-q2Cjp20IB48rEn2NPjR1qxsIQBvFVYW9rFRCFq+bC4RUrn1Ljz3g4wM8uSlgIBZYBi2JMXxmOzFqHraczxq4Ng== + "@npmcli/arborist@^5.0.0", "@npmcli/arborist@^5.0.4": version "5.1.1" resolved "https://registry.yarnpkg.com/@npmcli/arborist/-/arborist-5.1.1.tgz#668dbf9ebf48ec0bbf19a5b4b19013e8c51f35b0" @@ -6216,6 +6303,11 @@ dotenv@^14.2.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-14.3.2.tgz#7c30b3a5f777c79a3429cb2db358eef6751e8369" integrity sha512-vwEppIphpFdvaMCaHfCEv9IgwcxMljMw2TnAQBB4VWPvzXQLTb82jwmdOKzlEVUL3gNFT4l4TPKO+Bn+sqcrVQ== +dotenv@^16.0.1: + version "16.0.1" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.1.tgz#8f8f9d94876c35dac989876a5d3a82a267fdce1d" + integrity sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ== + dtrace-provider@~0.8: version "0.8.8" resolved "https://registry.yarnpkg.com/dtrace-provider/-/dtrace-provider-0.8.8.tgz#2996d5490c37e1347be263b423ed7b297fb0d97e" @@ -7442,7 +7534,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@7.2.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7: +glob@7.2.0, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -7465,6 +7557,18 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.1, glob@^7.1.2: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.1.tgz#00308f5c035aa0b2a447cd37ead267ddff1577d3" @@ -7557,10 +7661,10 @@ hardhat-watcher@^2.1.1: dependencies: chokidar "^3.4.3" -hardhat@^2.9.3: - version "2.9.5" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.9.5.tgz#6814a9f3afd5630ffe6bcb05a4367eb259c9222a" - integrity sha512-UIhjLQmccFOH87ODfFnVatI5vpwycsJ+D5+gmgOQNxUWp4c0ZenkeCE4yDEQ0tQm/zc/vz/mpskULz4aSFsPAg== +hardhat@^2.9.6: + version "2.9.6" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.9.6.tgz#9b75d8efccdfc20bdea35ffb0fd4e6a3f3ecf3cf" + integrity sha512-Vnm1iDfhbavNjvLxArt47rt6G3vPIV4Q/+pNgFkh6sfQH8JVf8px5VxiEs5cj4rPxmU+DXGKoalY+pK8fAL4oA== dependencies: "@ethereumjs/block" "^3.6.2" "@ethereumjs/blockchain" "^5.5.2" @@ -7589,7 +7693,7 @@ hardhat@^2.9.3: find-up "^2.1.0" fp-ts "1.19.3" fs-extra "^7.0.1" - glob "^7.1.3" + glob "7.2.0" immutable "^4.0.0-rc.12" io-ts "1.10.4" lodash "^4.17.11" @@ -8554,6 +8658,13 @@ jest-each@^27.5.1: jest-util "^27.5.1" pretty-format "^27.5.1" +jest-environment-hardhat@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/jest-environment-hardhat/-/jest-environment-hardhat-1.1.4.tgz#f05491d8bc9f6850505fcb85ab342681b09637a6" + integrity sha512-vIYmH6rNcjrAsm86iicrn1uOHwbiQPFd1y1fmv2CaDLBwGWswl1smi5p+6/20VOkGvnOAi/CJFZ+QWjRDd7l2g== + dependencies: + setimmediate "^1.0.5" + jest-environment-jsdom@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz#ea9ccd1fc610209655a77898f86b2b559516a546" @@ -9833,7 +9944,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.1.2: +"minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==