diff --git a/README.md b/README.md index 31dbf8a11..0a0cc42ca 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,9 @@ Umbra is a monorepo consisting of 3 packages: @umbra/frontend, @umbra/contracts, ```sh # run these commands from workspace root! +cp contracts/.env.example contracts/.env # please edit the .env with your own environment variable values +cp frontend/.env.example frontend/.env # please edit the .env with your own environment variable values +cp umbra-js/.env.example umbra-js/.env # please edit the .env with your own environment variable values yarn install # installs dependencies for each of the 3 packages. Also builds umbra-js. yarn build # builds each of the 3 packages yarn clean # removes build artifacts for each of the 3 packages diff --git a/contracts/.env.example b/contracts/.env.example index 367c6c980..6d5d14744 100644 --- a/contracts/.env.example +++ b/contracts/.env.example @@ -1,2 +1,2 @@ -INFURA_API_KEY=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz +INFURA_ID=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz MNEMONIC=here is where your twelve words mnemonic should be put my friend diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index 8d2e7d3e4..cd89403a6 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -15,7 +15,6 @@ import 'hardhat-typechain'; import 'solidity-coverage'; import 'hardhat-gas-reporter'; - const chainIds = { ganache: 1337, goerli: 5, @@ -27,6 +26,8 @@ const chainIds = { }; // Ensure that we have all the environment variables we need. +// Note: So that the monorepo can be imported to other projects, we make these env variables +// optional so that typechain can still build its types without hard failing on this. let mnemonic = ''; if (!process.env.MNEMONIC) { console.warn('Please set your MNEMONIC in a .env file'); @@ -35,16 +36,16 @@ if (!process.env.MNEMONIC) { } let infuraApiKey = ''; -if (!process.env.INFURA_API_KEY) { - console.warn('Please set your INFURA_API_KEY in a .env file'); +if (!process.env.INFURA_ID) { + console.warn('Please set your INFURA_ID in a .env file'); } else { - infuraApiKey = process.env.INFURA_API_KEY; + infuraApiKey = process.env.INFURA_ID; } const shouldReportGas = process.env.REPORT_GAS === 'true'; function createTestnetConfig(network: keyof typeof chainIds): NetworkUserConfig { - const url: string = 'https://' + network + '.infura.io/v3/' + infuraApiKey; + const url = `https://${network}.infura.io/v3/${infuraApiKey}`; return { accounts: { count: 10, @@ -62,7 +63,7 @@ const config: HardhatUserConfig = { networks: { hardhat: { forking: { - url: 'https://rinkeby' + '.infura.io/v3/' + infuraApiKey, + url: `https://rinkeby.infura.io/v3/${infuraApiKey}`, }, chainId: chainIds.hardhat, accounts: { diff --git a/contracts/test/utils.js b/contracts/test/utils.js index 9730b2f45..73a538a5a 100644 --- a/contracts/test/utils.js +++ b/contracts/test/utils.js @@ -1,4 +1,4 @@ -const { web3 } = require('@openzeppelin/test-environment'); +const { web3 } = require('hardhat'); const ethers = require('ethers'); const { BN } = web3.utils; @@ -11,9 +11,11 @@ const { AddressZero } = ethers.constants; * @return {string} Sum of amounts as string */ const sumTokenAmounts = (amounts) => { + /* eslint-disable */ const sum = amounts.map((amount) => new BN(amount)).reduce((acc, val) => acc.add(val), new BN('0')); return sum.toString(); + /* eslint-enable */ }; /** diff --git a/frontend/.env.template b/frontend/.env.example similarity index 100% rename from frontend/.env.template rename to frontend/.env.example diff --git a/umbra-js/.env.example b/umbra-js/.env.example new file mode 100644 index 000000000..bb04807bd --- /dev/null +++ b/umbra-js/.env.example @@ -0,0 +1 @@ +INFURA_ID=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz diff --git a/umbra-js/.gitignore b/umbra-js/.gitignore index e8866331b..b79be7351 100644 --- a/umbra-js/.gitignore +++ b/umbra-js/.gitignore @@ -1,5 +1,5 @@ build -test-keys.json +cache # autogenerated typechain artifacts -types/contracts \ No newline at end of file +types/contracts diff --git a/umbra-js/.nycrc b/umbra-js/.nycrc new file mode 100644 index 000000000..632139de0 --- /dev/null +++ b/umbra-js/.nycrc @@ -0,0 +1,31 @@ +{ + "cache": false, + "check-coverage": false, + "extension": [ + ".ts" + ], + "include": [ + "**/*.js", + "**/*.ts" + ], + "exclude": [ + "coverage/**", + "node_modules/**", + "**/*.d.ts", + "**/*.test.ts", + "src/index.ts", + "types/contracts/**", + ".eslintrc.js", + ".lintstagedrc.js", + ".prettierrc.js", + "hardhat.config.ts", + ], + "sourceMap": true, + "reporter": [ + "html", + "text", + "text-summary" + ], + "all": true, + "instrument": true +} diff --git a/umbra-js/.prettierignore b/umbra-js/.prettierignore index 7d5b7a94f..198e035e0 100644 --- a/umbra-js/.prettierignore +++ b/umbra-js/.prettierignore @@ -1,2 +1,5 @@ /build /node_modules +/coverage +/cache +/.nyc_output diff --git a/umbra-js/README.md b/umbra-js/README.md index 263270d5e..568bfbc6b 100644 --- a/umbra-js/README.md +++ b/umbra-js/README.md @@ -77,7 +77,6 @@ await tx3.wait(); 1. Create a file in this directory called `.env` that looks like the one below. ```bash INFURA_ID=yourInfuraId - TEST_ADDRESS=0x60A5dcB2fC804874883b797f37CbF1b0582ac2dD ``` 2. Run `yarn` to install packages 3. Run `yarn test` to run all tests. diff --git a/umbra-js/hardhat.config.ts b/umbra-js/hardhat.config.ts new file mode 100644 index 000000000..b84298584 --- /dev/null +++ b/umbra-js/hardhat.config.ts @@ -0,0 +1,91 @@ +import { config as dotenvConfig } from 'dotenv'; +import { resolve } from 'path'; +dotenvConfig({ path: resolve(__dirname, './.env') }); + +import { HardhatUserConfig } from 'hardhat/config'; +import { NetworkUserConfig } from 'hardhat/types'; + +import '@nomiclabs/hardhat-ethers'; +import '@nomiclabs/hardhat-waffle'; + +const chainIds = { + ganache: 1337, + goerli: 5, + hardhat: 1337, + kovan: 42, + mainnet: 1, + rinkeby: 4, + ropsten: 3, +}; + +// Ensure that we have all the environment variables we need. +const mnemonic = 'test test test test test test test test test test test junk'; + +const infuraApiKey = process.env.INFURA_ID; +if (!infuraApiKey) throw new Error('Please set your INFURA_ID in a .env file'); + +function createTestnetConfig(network: keyof typeof chainIds): NetworkUserConfig { + const url = `https://${network}.infura.io/v3/${infuraApiKey as string}`; + return { + accounts: { + count: 10, + initialIndex: 0, + mnemonic, + path: "m/44'/60'/0'/0", + }, + chainId: chainIds[network], + url, + }; +} + +const config: HardhatUserConfig = { + defaultNetwork: 'hardhat', + networks: { + hardhat: { + forking: { + url: `https://rinkeby.infura.io/v3/${infuraApiKey}`, + }, + chainId: chainIds.hardhat, + accounts: { + count: 10, + initialIndex: 0, + mnemonic, + path: "m/44'/60'/1'/0", + }, + }, + goerli: createTestnetConfig('goerli'), + kovan: createTestnetConfig('kovan'), + rinkeby: createTestnetConfig('rinkeby'), + ropsten: createTestnetConfig('ropsten'), + }, + paths: { + cache: './cache', + tests: './test', + }, + solidity: { + compilers: [ + { + version: '0.7.6', + settings: { + // https://hardhat.org/hardhat-network/#solidity-optimizer-support + optimizer: { + enabled: true, + runs: 999999, + }, + }, + }, + { + version: '0.6.12', + settings: { + // https://hardhat.org/hardhat-network/#solidity-optimizer-support + optimizer: { + enabled: true, + runs: 999999, + }, + }, + }, + ], + }, +}; + +export default config; diff --git a/umbra-js/package.json b/umbra-js/package.json index 388e21e63..01b18d8a6 100644 --- a/umbra-js/package.json +++ b/umbra-js/package.json @@ -8,12 +8,13 @@ "build" ], "scripts": { - "test": "yarn build && mocha -r ts-node/register ./test/*.test.ts --exit --timeout 0", + "test": "yarn build && yarn hardhat test", + "coverage": "yarn build && nyc yarn hardhat test", "lint": "eslint --ext .js,.ts ./", "prettier": "prettier --write .", "watch": "tsc --watch", "build": "tsc --build", - "clean": "rimraf build", + "clean": "rimraf build coverage .nyc_output cache", "prepare": "yarn build", "prepublishOnly": "yarn lint && yarn test", "precommit": "lint-staged" @@ -26,7 +27,8 @@ "noble-secp256k1": "^1.1.2" }, "devDependencies": { - "@openzeppelin/test-environment": "^0.1.6", + "@nomiclabs/hardhat-ethers": "^2.0.0", + "@nomiclabs/hardhat-waffle": "^2.0.0", "@types/bn.js": "^5.1.0", "@types/chai": "^4.2.14", "@types/mocha": "^8.0.4", @@ -37,6 +39,7 @@ "eslint-plugin-chai-friendly": "^0.6.0", "eslint-plugin-import": "^2.20.2", "mocha": "^7.1.2", + "nyc": "^15.1.0", "ts-node": "^9.0.0" }, "keywords": [ diff --git a/umbra-js/test-environment.config.js b/umbra-js/test-environment.config.js deleted file mode 100644 index 2e7410b6d..000000000 --- a/umbra-js/test-environment.config.js +++ /dev/null @@ -1,8 +0,0 @@ -require('dotenv').config(); - -module.exports = { - node: { - fork: `https://rinkeby.infura.io/v3/${process.env.INFURA_ID}`, - account_keys_path: './test-keys.json', - }, -}; diff --git a/umbra-js/test/DomainService.test.ts b/umbra-js/test/DomainService.test.ts index 846e604cb..c75a72027 100644 --- a/umbra-js/test/DomainService.test.ts +++ b/umbra-js/test/DomainService.test.ts @@ -1,13 +1,9 @@ import * as chai from 'chai'; -import { ethers } from 'ethers'; -import { provider } from '@openzeppelin/test-environment'; - +import { ethers } from 'hardhat'; import { DomainService } from '../src/classes/DomainService'; -import type { ExternalProvider } from '../src/types'; const { expect } = chai; -const web3Provider = (provider as unknown) as ExternalProvider; -const ethersProvider = new ethers.providers.Web3Provider(web3Provider); +const ethersProvider = ethers.provider; // Truth parameters to test against (on Rinkeby) const params = { diff --git a/umbra-js/test/KeyPair.test.ts b/umbra-js/test/KeyPair.test.ts index 9682fb7bc..a73fabf90 100644 --- a/umbra-js/test/KeyPair.test.ts +++ b/umbra-js/test/KeyPair.test.ts @@ -1,19 +1,16 @@ import * as chai from 'chai'; -import { provider } from '@openzeppelin/test-environment'; +import { ethers } from 'hardhat'; import { Wallet } from 'ethers'; import { BigNumber } from '@ethersproject/bignumber'; import { hexZeroPad } from '@ethersproject/bytes'; -import { Web3Provider } from '@ethersproject/providers'; import { randomBytes } from '@ethersproject/random'; -import type { ExternalProvider } from '../src/types'; import { RandomNumber } from '../src/classes/RandomNumber'; import { KeyPair } from '../src/classes/KeyPair'; import { Umbra } from '../src/classes/Umbra'; import * as utils from '../src/utils/utils'; const { expect } = chai; -const web3Provider = (provider as unknown) as ExternalProvider; -const ethersProvider = new Web3Provider(web3Provider); +const ethersProvider = ethers.provider; const numberOfRuns = 100; // number of runs for tests that execute in a loop const zeroPrefix = '0x00000000000000000000000000000000'; // 16 bytes of zeros diff --git a/umbra-js/test/Umbra.test.ts b/umbra-js/test/Umbra.test.ts index e382236d6..8a13e6045 100644 --- a/umbra-js/test/Umbra.test.ts +++ b/umbra-js/test/Umbra.test.ts @@ -1,24 +1,26 @@ +import { ethers } from 'hardhat'; +import hardhatConfig from '../hardhat.config'; import { Umbra } from '../src/classes/Umbra'; -import { BigNumber, BigNumberish, ethers } from 'ethers'; -import { Web3Provider, JsonRpcSigner, JsonRpcProvider } from '@ethersproject/providers'; +import { BigNumber, BigNumberish } from 'ethers'; +import type { Wallet } from 'ethers'; +import { JsonRpcProvider } from '@ethersproject/providers'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'; +import { HardhatNetworkHDAccountsUserConfig } from 'hardhat/src/types/config'; import * as chai from 'chai'; -import { accounts, provider } from '@openzeppelin/test-environment'; -import type { ChainConfig, ExternalProvider } from '../src/types'; + +import type { ChainConfig } from '../src/types'; import { TestToken as ERC20, Umbra as UmbraContract, TestTokenFactory as ERC20__factory, UmbraFactory as Umbra__factory, } from '@umbra/contracts/typechain'; -import { node } from '../test-environment.config'; const { expect } = chai; const { parseEther } = ethers.utils; -const web3Provider = (provider as unknown) as ExternalProvider; -const ethersProvider = new Web3Provider(web3Provider); -const JSON_RPC_URL = node.fork; -const jsonRpcProvider = new JsonRpcProvider(JSON_RPC_URL); +const ethersProvider = ethers.provider; +const jsonRpcProvider = new JsonRpcProvider(hardhatConfig.networks?.hardhat?.forking?.url); const ETH_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'; const payloadExtension = '0x0123456789abcdef0123456789abcdef'; @@ -44,17 +46,14 @@ const expectRejection = async (promise: Promise, message: string) => { } }; -const signerIndex = 2; +// We don't use the 0 or 1 index just to reduce the chance of conflicting with a signer for another use case +const senderIndex = 2; const receiverIndex = 3; -type TestSigner = { - wallet: ethers.Wallet; - signer: ethers.providers.JsonRpcSigner; -}; - describe('Umbra class', () => { - let sender = {} as TestSigner; - let receiver = {} as TestSigner; + let sender: Wallet; + let receiver: Wallet; + let deployer: SignerWithAddress; let dai: ERC20; let umbra: Umbra; @@ -67,46 +66,40 @@ describe('Umbra class', () => { expect(BigNumber.from(val1).toString()).to.equal(BigNumber.from(val2).toString()); }; - before(() => { - // Load private keys of ganache accounts - const keys = require('../test-keys.json'); + before(async () => { + // Load signers' mnemonic and derivation path from hardhat config + const accounts = hardhatConfig.networks?.hardhat?.accounts as HardhatNetworkHDAccountsUserConfig; + const { mnemonic, path } = accounts; - // Create wallets for all ganache accounts - const wallets = accounts.map((account) => { - const key = keys.private_keys[account.toLowerCase()]; - const wallet = new ethers.Wallet(`0x${key}`).connect(ethersProvider); - expect(wallet.address).to.equal(account); - return wallet; - }); + // Get the wallets of interest. The hardhat signers are generated by appending "/index" to the derivation path, + // so we do the same to instantiate our wallets. Private key can now be accessed by `sender.privateKey` + sender = ethers.Wallet.fromMnemonic(mnemonic as string, `${path as string}/${senderIndex}`); + sender.connect(ethers.provider); + receiver = ethers.Wallet.fromMnemonic(mnemonic as string, `${path as string}/${receiverIndex}`); + receiver.connect(ethers.provider); - // Assign to our variables. Offset by 1 since openzeppelin skips first account by default, but - // looping through the accounts above doesn't - sender['wallet'] = wallets[signerIndex - 1]; - receiver['wallet'] = wallets[receiverIndex - 1]; + // Load other signers + deployer = (await ethers.getSigners())[0]; // used for deploying contracts }); beforeEach(async () => { - // Get signers (can't use wallets since they need providers) - sender.signer = ethersProvider.getSigner(signerIndex); - receiver.signer = ethersProvider.getSigner(receiverIndex); - // Deploy Umbra const toll = parseEther('0.1'); const tollCollector = ethers.constants.AddressZero; // doesn't matter for these tests const tollReceiver = ethers.constants.AddressZero; // doesn't matter for these tests - const umbraFactory = new Umbra__factory(sender.signer); + const umbraFactory = new Umbra__factory(deployer); const umbraContract = (await umbraFactory.deploy(toll, tollCollector, tollReceiver)) as UmbraContract; await umbraContract.deployTransaction.wait(); // Deploy mock tokens - const daiFactory = new ERC20__factory(sender.signer); + const daiFactory = new ERC20__factory(deployer); dai = (await daiFactory.deploy('Dai', 'DAI')) as ERC20; await dai.deployTransaction.wait(); // Get chainConfig based on most recent Rinkeby block number to minimize scanning time const lastBlockNumber = await ethersProvider.getBlockNumber(); chainConfig = { - chainId: 4, // Rinkeby chainID + chainId: (await ethersProvider.getNetwork()).chainId, umbraAddress: umbraContract.address, startBlock: lastBlockNumber, }; @@ -171,14 +164,20 @@ describe('Umbra class', () => { }); describe('Send, scan, and withdraw funds', () => { - const mintAndApproveDai = async (signer: JsonRpcSigner, user: string, amount: BigNumber) => { + beforeEach(() => { + // Seems we somehow lose the provider attached to our sender, so make sure it's there. Without this + // some tests below throw with "Error: missing provider (operation="sendTransaction", code=UNSUPPORTED_OPERATION, version=abstract-signer/5.0.12)" + sender = sender.connect(ethers.provider); + }); + + const mintAndApproveDai = async (signer: Wallet, user: string, amount: BigNumber) => { await dai.connect(signer).mint(user, amount); await dai.connect(signer).approve(umbra.umbraContract.address, ethers.constants.MaxUint256); }; it('reverts if sender does not have enough tokens', async () => { const msg = `Insufficient balance to complete transfer. Has 0 tokens, tried to send ${quantity.toString()} tokens.`; - await expectRejection(umbra.send(sender.signer, dai.address, quantity, receiver.wallet!.address), msg); + await expectRejection(umbra.send(sender, dai.address, quantity, receiver.address), msg); }); it('reverts if sender does not have enough ETH', async () => { @@ -190,28 +189,25 @@ describe('Umbra class', () => { it('Without payload extension: send tokens, scan for them, withdraw them', async () => { // SENDER // Mint Dai to sender, and approve the Umbra contract to spend their DAI - await mintAndApproveDai(sender.signer, sender.wallet.address, quantity); + await mintAndApproveDai(sender, sender.address, quantity); // Send funds with Umbra - const { tx, stealthKeyPair } = await umbra.send(sender.signer, dai.address, quantity, receiver.wallet!.publicKey); + const { tx, stealthKeyPair } = await umbra.send(sender, dai.address, quantity, receiver!.publicKey); await tx.wait(); // RECEIVER // Receiver scans for funds send to them - const { userAnnouncements } = await umbra.scan(receiver.wallet.publicKey, receiver.wallet.privateKey); + const { userAnnouncements } = await umbra.scan(receiver.publicKey, receiver.privateKey); expect(userAnnouncements.length).to.be.greaterThan(0); // Withdraw (test regular withdrawal, so we need to transfer ETH to pay gas) // Destination wallet should have a balance equal to amount sent // First we send ETH to the stealth address - await sender.signer.sendTransaction({ to: stealthKeyPair.address, value: parseEther('1') }); + await sender.sendTransaction({ to: stealthKeyPair.address, value: parseEther('1') }); // Now we withdraw the tokens - const stealthPrivateKey = Umbra.computeStealthPrivateKey( - receiver.wallet.privateKey, - userAnnouncements[0].randomNumber - ); + const stealthPrivateKey = Umbra.computeStealthPrivateKey(receiver.privateKey, userAnnouncements[0].randomNumber); const destinationWallet = ethers.Wallet.createRandom(); verifyEqualValues(await dai.balanceOf(destinationWallet.address), 0); const withdrawTxToken = await umbra.withdraw(stealthPrivateKey, dai.address, destinationWallet.address); @@ -235,21 +231,17 @@ describe('Umbra class', () => { it('With payload extension: send tokens, scan for them, withdraw them', async () => { // SENDER // Mint Dai to sender, and approve the Umbra contract to spend their DAI - await mintAndApproveDai(sender.signer, sender.wallet.address, quantity); + await mintAndApproveDai(sender, sender.address, quantity); // Send funds with Umbra - const { tx, stealthKeyPair } = await umbra.send( - sender.signer, - dai.address, - quantity, - receiver.wallet!.publicKey, - { payloadExtension } - ); + const { tx, stealthKeyPair } = await umbra.send(sender, dai.address, quantity, receiver!.publicKey, { + payloadExtension, + }); await tx.wait(); // RECEIVER // Receiver scans for funds send to them - const { userAnnouncements } = await umbra.scan(receiver.wallet.publicKey, receiver.wallet.privateKey); + const { userAnnouncements } = await umbra.scan(receiver.publicKey, receiver.privateKey); expect(userAnnouncements.length).to.be.greaterThan(0); // Withdraw (test withdraw by signature) @@ -259,24 +251,13 @@ describe('Umbra class', () => { const sponsorFee = '2500'; // Fund relayer - await sender.signer.sendTransaction({ to: relayerWallet.address, value: parseEther('1') }); + await sender.sendTransaction({ to: relayerWallet.address, value: parseEther('1') }); // Get signature - const stealthPrivateKey = Umbra.computeStealthPrivateKey( - receiver.wallet.privateKey, - userAnnouncements[0].randomNumber - ); - - // TODO why are these 3 different? Perhaps bug in OpenZeppelin Test Environment forking -- try Hardhat? - console.log( - 'TODO Why are these 3 different? Bug in OpenZeppelin Test Environment forking? Should switch to Hardhat anyway for consistency with /contracts' - ); - console.log('umbra.chainConfig.chainId: ', umbra.chainConfig.chainId); // returns 4 - console.log('ethersProvider.getNetwork(): ', (await ethersProvider.getNetwork()).chainId); // returns 1337 - + const stealthPrivateKey = Umbra.computeStealthPrivateKey(receiver.privateKey, userAnnouncements[0].randomNumber); const { v, r, s } = await Umbra.signWithdraw( stealthPrivateKey, - 1, // TODO: Replace this with (await ethersProvider.getNetwork()).chainId after hardhat switch + (await ethersProvider.getNetwork()).chainId, umbra.umbraContract.address, destinationWallet.address, dai.address, @@ -305,21 +286,18 @@ describe('Umbra class', () => { it('Without payload extension: send ETH, scan for it, withdraw it', async () => { // SENDER // Send funds with Umbra - const { tx, stealthKeyPair } = await umbra.send(sender.signer, ETH_ADDRESS, quantity, receiver.wallet!.publicKey); + const { tx, stealthKeyPair } = await umbra.send(sender, ETH_ADDRESS, quantity, receiver!.publicKey); await tx.wait(); verifyEqualValues(await getEthBalance(stealthKeyPair.address), quantity); // RECEIVER // Receiver scans for funds send to them - const { userAnnouncements } = await umbra.scan(receiver.wallet.publicKey, receiver.wallet.privateKey); + const { userAnnouncements } = await umbra.scan(receiver.publicKey, receiver.privateKey); expect(userAnnouncements.length).to.be.greaterThan(0); // Withdraw (test regular withdrawal) // Destination wallet should have a balance equal to amount sent minus gas cost - const stealthPrivateKey = Umbra.computeStealthPrivateKey( - receiver.wallet.privateKey, - userAnnouncements[0].randomNumber - ); + const stealthPrivateKey = Umbra.computeStealthPrivateKey(receiver.privateKey, userAnnouncements[0].randomNumber); const destinationWallet = ethers.Wallet.createRandom(); const withdrawTx = await umbra.withdraw(stealthPrivateKey, 'ETH', destinationWallet.address); await withdrawTx.wait(); @@ -331,26 +309,19 @@ describe('Umbra class', () => { it('With payload extension: send ETH, scan for it, withdraw it', async () => { // SENDER // Send funds with Umbra - const { tx, stealthKeyPair } = await umbra.send( - sender.signer, - ETH_ADDRESS, - quantity, - receiver.wallet!.publicKey, - { payloadExtension } - ); + const { tx, stealthKeyPair } = await umbra.send(sender, ETH_ADDRESS, quantity, receiver.publicKey, { + payloadExtension, + }); await tx.wait(); // RECEIVER // Receiver scans for funds send to them - const { userAnnouncements } = await umbra.scan(receiver.wallet.publicKey, receiver.wallet.privateKey); + const { userAnnouncements } = await umbra.scan(receiver.publicKey, receiver.privateKey); expect(userAnnouncements.length).to.be.greaterThan(0); // Withdraw (test regular withdrawal) // Destination wallet should have a balance equal to amount sent minus gas cost - const stealthPrivateKey = Umbra.computeStealthPrivateKey( - receiver.wallet.privateKey, - userAnnouncements[0].randomNumber - ); + const stealthPrivateKey = Umbra.computeStealthPrivateKey(receiver.privateKey, userAnnouncements[0].randomNumber); const destinationWallet = ethers.Wallet.createRandom(); const withdrawTx = await umbra.withdraw(stealthPrivateKey, 'ETH', destinationWallet.address); await withdrawTx.wait(); @@ -386,20 +357,20 @@ describe('Umbra class', () => { it('throws when isEth is passed a bad address', async () => { // These error messages come from ethers await expectRejection( - umbra.send(sender.signer, '123', '1', '1'), // last two args are dummy args since we're testing the second input + umbra.send(sender, '123', '1', '1'), // last two args are dummy args since we're testing the second input 'invalid address (argument="address", value="123", code=INVALID_ARGUMENT, version=address/5.0.10)' ); await expectRejection( // @ts-expect-error - umbra.send(sender.signer, 123, '1', '1'), // last two args are dummy args since we're testing the second input + umbra.send(sender, 123, '1', '1'), // last two args are dummy args since we're testing the second input 'invalid address (argument="address", value=123, code=INVALID_ARGUMENT, version=address/5.0.10)' ); }); it('throws when signWithdraw is passed a bad address', async () => { // Actual values of input parameters don't matter for this test - const privateKey = receiver.wallet.privateKey; - const goodAddress = receiver.wallet.address; + const privateKey = receiver.privateKey; + const goodAddress = receiver.address; const badAddress = '0x123'; const tokenAddress = '0x6B175474E89094C44Da98b954EedeAC495271d0F'; // address does not matter here // These error messages come from ethers diff --git a/umbra-js/test/cns.test.ts b/umbra-js/test/cns.test.ts index 43cb08b4f..23b22afab 100644 --- a/umbra-js/test/cns.test.ts +++ b/umbra-js/test/cns.test.ts @@ -1,13 +1,10 @@ import * as chai from 'chai'; -import { provider } from '@openzeppelin/test-environment'; -import { Web3Provider } from '@ethersproject/providers'; +import { ethers } from 'hardhat'; import { default as Resolution, Eip1993Factories } from '@unstoppabledomains/resolution'; -import { ExternalProvider } from '../src/types'; import * as cns from '../src/utils/cns'; const { expect } = chai; -const web3Provider = (provider as unknown) as ExternalProvider; -const ethersProvider = new Web3Provider(web3Provider); +const ethersProvider = ethers.provider; const resolution = new Resolution({ blockchain: { diff --git a/umbra-js/test/ens.test.ts b/umbra-js/test/ens.test.ts index 906970bc3..b3b818670 100644 --- a/umbra-js/test/ens.test.ts +++ b/umbra-js/test/ens.test.ts @@ -1,12 +1,9 @@ import * as chai from 'chai'; -import { provider } from '@openzeppelin/test-environment'; -import { Web3Provider } from '@ethersproject/providers'; +import { ethers } from 'hardhat'; import * as ens from '../src/utils/ens'; -import { ExternalProvider } from '../src/types'; const { expect } = chai; -const web3Provider = (provider as unknown) as ExternalProvider; -const ethersProvider = new Web3Provider(web3Provider); +const ethersProvider = ethers.provider; // Truth parameters to test against const name = 'msolomon.eth'; diff --git a/umbra-js/test/utils.test.ts b/umbra-js/test/utils.test.ts index ac488d616..2acd5b2cb 100644 --- a/umbra-js/test/utils.test.ts +++ b/umbra-js/test/utils.test.ts @@ -1,13 +1,11 @@ -import { provider } from '@openzeppelin/test-environment'; -import { getDefaultProvider, Web3Provider } from '@ethersproject/providers'; +import { ethers } from 'hardhat'; +import { getDefaultProvider } from '@ethersproject/providers'; import * as chai from 'chai'; import * as utils from '../src/utils/utils'; -import type { ExternalProvider, EthersProvider } from '../src/types'; +import type { EthersProvider } from '../src/types'; const { expect } = chai; - -const web3Provider = (provider as unknown) as ExternalProvider; -const ethersProvider = new Web3Provider(web3Provider); +const ethersProvider = ethers.provider; // Define truth values to test for when not testing ENS or CNS const publicKey = diff --git a/yarn.lock b/yarn.lock index 860233332..3a8216f62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14,6 +14,32 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.12.13.tgz#27e19e0ed3726ccf54067ced4109501765e7e2e8" integrity sha512-U/hshG5R+SIoW7HVWIdmy1cB7s3ki+r3FpyEZiCgpi4tFgPnX/vynY80ZGSASOIrUM6O7VxOgCZgdt7h97bUGg== +"@babel/compat-data@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.12.tgz#a8a5ccac19c200f9dd49624cac6e19d7be1236a1" + integrity sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ== + +"@babel/core@^7.7.5": + version "7.13.14" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.14.tgz#8e46ebbaca460a63497c797e574038ab04ae6d06" + integrity sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.9" + "@babel/helper-compilation-targets" "^7.13.13" + "@babel/helper-module-transforms" "^7.13.14" + "@babel/helpers" "^7.13.10" + "@babel/parser" "^7.13.13" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.13" + "@babel/types" "^7.13.14" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + semver "^6.3.0" + source-map "^0.5.0" + "@babel/core@^7.9.0": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.13.tgz#b73a87a3a3e7d142a66248bf6ad88b9ceb093425" @@ -44,6 +70,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.13.9": + version "7.13.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.9.tgz#3a7aa96f9efb8e2be42d38d80e2ceb4c64d8de39" + integrity sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw== + dependencies: + "@babel/types" "^7.13.0" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz#0f58e86dfc4bb3b1fcd7db806570e177d439b6ab" @@ -69,6 +104,16 @@ browserslist "^4.14.5" semver "^5.5.0" +"@babel/helper-compilation-targets@^7.13.13": + version "7.13.13" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz#2b2972a0926474853f41e4adbc69338f520600e5" + integrity sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ== + dependencies: + "@babel/compat-data" "^7.13.12" + "@babel/helper-validator-option" "^7.12.17" + browserslist "^4.14.5" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.13.tgz#0f1707c2eec1a4604f2a22a6fb209854ef2a399a" @@ -125,6 +170,13 @@ dependencies: "@babel/types" "^7.12.13" +"@babel/helper-member-expression-to-functions@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz#dfe368f26d426a07299d8d6513821768216e6d72" + integrity sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw== + dependencies: + "@babel/types" "^7.13.12" + "@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.8.3": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.13.tgz#ec67e4404f41750463e455cc3203f6a32e93fcb0" @@ -132,6 +184,13 @@ dependencies: "@babel/types" "^7.12.13" +"@babel/helper-module-imports@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz#c6a369a6f3621cb25da014078684da9196b61977" + integrity sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA== + dependencies: + "@babel/types" "^7.13.12" + "@babel/helper-module-transforms@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.13.tgz#01afb052dcad2044289b7b20beb3fa8bd0265bea" @@ -147,6 +206,20 @@ "@babel/types" "^7.12.13" lodash "^4.17.19" +"@babel/helper-module-transforms@^7.13.14": + version "7.13.14" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz#e600652ba48ccb1641775413cb32cfa4e8b495ef" + integrity sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g== + dependencies: + "@babel/helper-module-imports" "^7.13.12" + "@babel/helper-replace-supers" "^7.13.12" + "@babel/helper-simple-access" "^7.13.12" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/helper-validator-identifier" "^7.12.11" + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.13" + "@babel/types" "^7.13.14" + "@babel/helper-optimise-call-expression@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz#5c02d171b4c8615b1e7163f888c1c81c30a2aaea" @@ -178,6 +251,16 @@ "@babel/traverse" "^7.12.13" "@babel/types" "^7.12.13" +"@babel/helper-replace-supers@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz#6442f4c1ad912502481a564a7386de0c77ff3804" + integrity sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.13.12" + "@babel/helper-optimise-call-expression" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.12" + "@babel/helper-simple-access@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.13.tgz#8478bcc5cacf6aa1672b251c1d2dde5ccd61a6c4" @@ -185,6 +268,13 @@ dependencies: "@babel/types" "^7.12.13" +"@babel/helper-simple-access@^7.13.12": + version "7.13.12" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz#dd6c538afb61819d205a012c31792a39c7a5eaf6" + integrity sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA== + dependencies: + "@babel/types" "^7.13.12" + "@babel/helper-skip-transparent-expression-wrappers@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz#462dc63a7e435ade8468385c63d2b84cce4b3cbf" @@ -209,6 +299,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz#d66cb8b7a3e7fe4c6962b32020a131ecf0847f4f" integrity sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw== +"@babel/helper-validator-option@^7.12.17": + version "7.12.17" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831" + integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== + "@babel/helper-wrap-function@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.12.13.tgz#e3ea8cb3ee0a16911f9c1b50d9e99fe8fe30f9ff" @@ -228,6 +323,15 @@ "@babel/traverse" "^7.12.13" "@babel/types" "^7.12.13" +"@babel/helpers@^7.13.10": + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.13.10.tgz#fd8e2ba7488533cdeac45cc158e9ebca5e3c7df8" + integrity sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ== + dependencies: + "@babel/template" "^7.12.13" + "@babel/traverse" "^7.13.0" + "@babel/types" "^7.13.0" + "@babel/highlight@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.12.13.tgz#8ab538393e00370b26271b01fa08f7f27f2e795c" @@ -242,6 +346,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.15.tgz#2b20de7f0b4b332d9b119dd9c33409c538b8aacf" integrity sha512-AQBOU2Z9kWwSZMd6lNjCX0GUgFonL1wAM1db8L8PMk9UDaGsRCArBkU4Sc+UCM3AE4hjbXx+h58Lb3QT4oRmrA== +"@babel/parser@^7.13.13": + version "7.13.13" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.13.tgz#42f03862f4aed50461e543270916b47dd501f0df" + integrity sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw== + "@babel/plugin-proposal-async-generator-functions@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.13.tgz#d1c6d841802ffb88c64a2413e311f7345b9e66b5" @@ -858,6 +967,20 @@ globals "^11.1.0" lodash "^4.17.19" +"@babel/traverse@^7.13.0", "@babel/traverse@^7.13.13": + version "7.13.13" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.13.tgz#39aa9c21aab69f74d948a486dd28a2dbdbf5114d" + integrity sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg== + dependencies: + "@babel/code-frame" "^7.12.13" + "@babel/generator" "^7.13.9" + "@babel/helper-function-name" "^7.12.13" + "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/parser" "^7.13.13" + "@babel/types" "^7.13.13" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.12.1", "@babel/types@^7.12.13", "@babel/types@^7.4.4", "@babel/types@^7.7.0": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.13.tgz#8be1aa8f2c876da11a9cf650c0ecf656913ad611" @@ -867,6 +990,15 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@babel/types@^7.13.0", "@babel/types@^7.13.12", "@babel/types@^7.13.13", "@babel/types@^7.13.14": + version "7.13.14" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.14.tgz#c35a4abb15c7cd45a2746d78ab328e362cbace0d" + integrity sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + "@chaitanyapotti/random-id@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@chaitanyapotti/random-id/-/random-id-1.0.3.tgz#f52f647cfe9f79fc7723ea2b01b0ad3889204002" @@ -1618,6 +1750,22 @@ unique-filename "^1.1.1" which "^1.3.1" +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + "@json-rpc-tools/types@^1.6.1": version "1.6.1" resolved "https://registry.yarnpkg.com/@json-rpc-tools/types/-/types-1.6.1.tgz#b892599c31fb1cd62172b86fb38d0bfcbd52fe30" @@ -2669,7 +2817,7 @@ web3-utils "1.2.6" winston "^3.3.3" -"@openzeppelin/contract-loader@^0.6.1", "@openzeppelin/contract-loader@^0.6.2": +"@openzeppelin/contract-loader@^0.6.2": version "0.6.2" resolved "https://registry.yarnpkg.com/@openzeppelin/contract-loader/-/contract-loader-0.6.2.tgz#f0c08f14d5dfeaeb44952ba777ec9ce1c9ff9759" integrity sha512-/P8v8ZFVwK+Z7rHQH2N3hqzEmTzLFjhMtvNK4FeIak6DEeONZ92vdFaFb10CCCQtp390Rp/Y57Rtfrm50bUdMQ== @@ -2687,25 +2835,6 @@ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.1.tgz#03c891fec7f93be0ae44ed74e57a122a38732ce7" integrity sha512-cUriqMauq1ylzP2TxePNdPqkwI7Le3Annh4K9rrpvKfSBB/bdW+Iu1ihBaTIABTAAJ85LmKL5SSPPL9ry8d1gQ== -"@openzeppelin/test-environment@^0.1.6": - version "0.1.9" - resolved "https://registry.yarnpkg.com/@openzeppelin/test-environment/-/test-environment-0.1.9.tgz#d49ec53a1de946e7c7beb3c672394ccffbeabdf0" - integrity sha512-QJ2TSRGbHMv4lrLChT7ghcoPGB3osXZvLXM3VqD8XhrJsYi/t5QJ8aHNYKa+A8EmCkH/rGZWgvRfhphVTFf0DA== - dependencies: - "@openzeppelin/contract-loader" "^0.6.1" - "@truffle/contract" "^4.0.38" - ansi-colors "^4.1.1" - ethereumjs-wallet "^0.6.3" - exit-hook "^2.2.0" - find-up "^4.1.0" - fs-extra "^9.0.1" - ganache-core "^2.11.2" - lodash.merge "^4.6.2" - p-queue "^6.2.0" - semver "^7.1.3" - try-require "^1.2.1" - web3 "^1.3.0" - "@openzeppelin/test-helpers@^0.5.10": version "0.5.10" resolved "https://registry.yarnpkg.com/@openzeppelin/test-helpers/-/test-helpers-0.5.10.tgz#0a6ab9fd0810085e8114f9f33aed4102e848f27f" @@ -3151,7 +3280,7 @@ crypto-js "^3.1.9-1" debug "^4.1.0" -"@truffle/contract@^4.0.35", "@truffle/contract@^4.0.38": +"@truffle/contract@^4.0.35": version "4.3.6" resolved "https://registry.yarnpkg.com/@truffle/contract/-/contract-4.3.6.tgz#e6a77ea8dd5c4832c41529313b0dfa092de65208" integrity sha512-XcIZ4eG1BrkoW30ZYTEqQGskmB2a2CoFJOLDjo2heP8xx+mKAPI0ceg2Ym4PbBUtqPBL6CiWE2WRh2zpFWPrOw== @@ -4429,6 +4558,13 @@ anymatch@~3.1.1: normalize-path "^3.0.0" picomatch "^2.0.4" +append-transform@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-2.0.0.tgz#99d9d29c7b38391e6f428d28ce136551f0b77e12" + integrity sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg== + dependencies: + default-require-extensions "^3.0.0" + aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" @@ -4468,6 +4604,11 @@ archiver@5.0.2: tar-stream "^2.1.4" zip-stream "^4.0.0" +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= + are-we-there-yet@~1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" @@ -6027,6 +6168,16 @@ cachedown@1.0.0: abstract-leveldown "^2.4.1" lru-cache "^3.2.0" +caching-transform@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-4.0.0.tgz#00d297a4206d71e2163c39eaffa8157ac0651f0f" + integrity sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA== + dependencies: + hasha "^5.0.0" + make-dir "^3.0.0" + package-hash "^4.0.0" + write-file-atomic "^3.0.0" + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -7645,6 +7796,13 @@ default-gateway@^4.2.0: execa "^1.0.0" ip-regex "^2.1.0" +default-require-extensions@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-3.0.0.tgz#e03f93aac9b2b6443fc52e5e4a37b3ad9ad8df96" + integrity sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg== + dependencies: + strip-bom "^4.0.0" + defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -8327,7 +8485,7 @@ es5-ext@^0.10.35, es5-ext@^0.10.50: es6-symbol "~3.1.3" next-tick "~1.0.0" -es6-error@^4.1.1: +es6-error@^4.0.1, es6-error@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== @@ -9474,7 +9632,7 @@ eventemitter3@4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== -eventemitter3@4.0.7, eventemitter3@^4.0.0, eventemitter3@^4.0.4: +eventemitter3@4.0.7, eventemitter3@^4.0.0: version "4.0.7" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== @@ -9527,11 +9685,6 @@ execa@^4.1.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" -exit-hook@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-2.2.0.tgz#f5502f92179018e867f2d8ee4428392da7f3894e" - integrity sha512-YFH+2oGdldRH5GqGpnaiKbBxWHMmuXHmKTMtUC58kWSOrnTf95rKITVSFTTtas14DWvWpih429+ffAvFetPwNA== - exit-on-epipe@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" @@ -9895,7 +10048,7 @@ find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-cache-dir@^3.3.1: +find-cache-dir@^3.2.0, find-cache-dir@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== @@ -10082,6 +10235,14 @@ foreach@^2.0.5: resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= +foreground-child@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-2.0.0.tgz#71b32800c9f15aa8f2f83f4a6bd9bff35d861a53" + integrity sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^3.0.2" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -10181,6 +10342,11 @@ from2@^2.1.0: inherits "^2.0.1" readable-stream "^2.0.0" +fromentries@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" + integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== + fs-constants@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" @@ -10320,7 +10486,7 @@ ganache-cli@^6.11.0: source-map-support "0.5.12" yargs "13.2.4" -ganache-core@^2.10.2, ganache-core@^2.11.2: +ganache-core@^2.10.2: version "2.13.2" resolved "https://registry.yarnpkg.com/ganache-core/-/ganache-core-2.13.2.tgz#27e6fc5417c10e6e76e2e646671869d7665814a3" integrity sha512-tIF5cR+ANQz0+3pHWxHjIwHqFXcVo0Mb+kcsNhglNFALcYo49aQpnS9dqHartqPfMFjiHh/qFoD3mYK0d/qGgw== @@ -10376,7 +10542,7 @@ genfun@^5.0.0: resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== -gensync@^1.0.0-beta.1: +gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== @@ -10410,6 +10576,11 @@ get-own-enumerable-property-symbols@^3.0.0: resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + get-pkg-repo@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d" @@ -11053,6 +11224,14 @@ hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasha@^5.0.0: + version "5.2.2" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.2.2.tgz#a48477989b3b327aea3c04f53096d816d97522a1" + integrity sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ== + dependencies: + is-stream "^2.0.0" + type-fest "^0.8.0" + hdkey@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-1.1.2.tgz#c60f9cf6f90fbf24a8a52ea06893f36a0108cd3e" @@ -11167,6 +11346,11 @@ html-entities@^1.3.1: resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.4.0.tgz#cfbd1b01d2afaf9adca1b10ae7dffab98c71d2dc" integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA== +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + html-minifier-terser@^5.0.1: version "5.1.1" resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#922e96f1f3bb60832c2634b79884096389b1f054" @@ -12147,6 +12331,67 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.0.0-alpha.1: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" + integrity sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg== + +istanbul-lib-hook@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz#8f84c9434888cc6b1d0a9d7092a76d239ebf0cc6" + integrity sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ== + dependencies: + append-transform "^2.0.0" + +istanbul-lib-instrument@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" + integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== + dependencies: + "@babel/core" "^7.7.5" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.0.0" + semver "^6.3.0" + +istanbul-lib-processinfo@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz#e1426514662244b2f25df728e8fd1ba35fe53b9c" + integrity sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw== + dependencies: + archy "^1.0.0" + cross-spawn "^7.0.0" + istanbul-lib-coverage "^3.0.0-alpha.1" + make-dir "^3.0.0" + p-map "^3.0.0" + rimraf "^3.0.0" + uuid "^3.3.3" + +istanbul-lib-report@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" + integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^3.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz#75743ce6d96bb86dc7ee4352cf6366a23f0b1ad9" + integrity sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.2.tgz#d593210e5000683750cb09fc0644e4b6e27fd53b" + integrity sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + isurl@^1.0.0-alpha5: version "1.0.0" resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" @@ -12955,6 +13200,11 @@ lodash.flatten@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= +lodash.flattendeep@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" + integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= + lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" @@ -13201,7 +13451,7 @@ make-dir@^2.0.0, make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.2, make-dir@^3.1.0: +make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== @@ -14114,6 +14364,13 @@ node-loader@1.0.2: loader-utils "^2.0.0" schema-utils "^3.0.0" +node-preload@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301" + integrity sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ== + dependencies: + process-on-spawn "^1.0.0" + node-releases@^1.1.70: version "1.1.70" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.70.tgz#66e0ed0273aa65666d7fe78febe7634875426a08" @@ -14321,6 +14578,39 @@ number-to-bn@1.7.0: bn.js "4.11.6" strip-hex-prefix "1.0.0" +nyc@^15.1.0: + version "15.1.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" + integrity sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A== + dependencies: + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + caching-transform "^4.0.0" + convert-source-map "^1.7.0" + decamelize "^1.2.0" + find-cache-dir "^3.2.0" + find-up "^4.1.0" + foreground-child "^2.0.0" + get-package-type "^0.1.0" + glob "^7.1.6" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-hook "^3.0.0" + istanbul-lib-instrument "^4.0.0" + istanbul-lib-processinfo "^2.0.2" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.0.2" + make-dir "^3.0.0" + node-preload "^0.2.1" + p-map "^3.0.0" + process-on-spawn "^1.0.0" + resolve-from "^5.0.0" + rimraf "^3.0.0" + signal-exit "^3.0.2" + spawn-wrap "^2.0.0" + test-exclude "^6.0.0" + yargs "^15.0.2" + oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" @@ -14723,6 +15013,13 @@ p-map@^2.0.0, p-map@^2.1.0: resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== +p-map@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" + integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== + dependencies: + aggregate-error "^3.0.0" + p-map@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" @@ -14742,14 +15039,6 @@ p-queue@^4.0.0: dependencies: eventemitter3 "^3.1.0" -p-queue@^6.2.0: - version "6.6.2" - resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426" - integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ== - dependencies: - eventemitter3 "^4.0.4" - p-timeout "^3.2.0" - p-reduce@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" @@ -14769,13 +15058,6 @@ p-timeout@^1.1.1: dependencies: p-finally "^1.0.0" -p-timeout@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" - integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== - dependencies: - p-finally "^1.0.0" - p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -14793,6 +15075,16 @@ p-waterfall@^1.0.0: dependencies: p-reduce "^1.0.0" +package-hash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-4.0.0.tgz#3537f654665ec3cc38827387fc904c163c54f506" + integrity sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ== + dependencies: + graceful-fs "^4.1.15" + hasha "^5.0.0" + lodash.flattendeep "^4.4.0" + release-zalgo "^1.0.0" + pako@^1.0.4, pako@~1.0.5: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" @@ -15660,6 +15952,13 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +process-on-spawn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/process-on-spawn/-/process-on-spawn-1.0.0.tgz#95b05a23073d30a17acfdc92a440efd2baefdc93" + integrity sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg== + dependencies: + fromentries "^1.2.0" + process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" @@ -16344,6 +16643,13 @@ relateurl@^0.2.7: resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= +release-zalgo@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" + integrity sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA= + dependencies: + es6-error "^4.0.1" + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -16604,7 +16910,7 @@ rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: dependencies: glob "^7.1.3" -rimraf@^3.0.2: +rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -16929,7 +17235,7 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: +semver@^7.2.1, semver@^7.3.2, semver@^7.3.4: version "7.3.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== @@ -17479,6 +17785,18 @@ spawn-command@^0.0.2-1: resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" integrity sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A= +spawn-wrap@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" + integrity sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg== + dependencies: + foreground-child "^2.0.0" + is-windows "^1.0.2" + make-dir "^3.0.0" + rimraf "^3.0.0" + signal-exit "^3.0.2" + which "^2.0.1" + spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" @@ -17816,7 +18134,7 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-bom@4.0.0: +strip-bom@4.0.0, strip-bom@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== @@ -18247,6 +18565,15 @@ terser@^5.3.2: source-map "~0.7.2" source-map-support "~0.5.19" +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + test-value@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" @@ -18503,11 +18830,6 @@ triple-beam@^1.2.0, triple-beam@^1.3.0: resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-2.2.1.tgz#c5bf04a5bbec3fd118be4084461b3a27c4d796bf" integrity sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q== -try-require@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/try-require/-/try-require-1.2.1.tgz#34489a2cac0c09c1cc10ed91ba011594d4333be2" - integrity sha1-NEiaLKwMCcHMEO2RugEVlNQzO+I= - ts-essentials@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-1.0.4.tgz#ce3b5dade5f5d97cf69889c11bf7d2da8555b15a" @@ -18680,7 +19002,7 @@ type-fest@^0.7.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== -type-fest@^0.8.1: +type-fest@^0.8.0, type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== @@ -20539,7 +20861,7 @@ web3-utils@1.3.4, web3-utils@^1.0.0-beta.31, web3-utils@^1.2.1, web3-utils@^1.2. underscore "1.9.1" utf8 "3.0.0" -web3@*, web3@^1.0.0-beta.34, web3@^1.2.5, web3@^1.3.0: +web3@*, web3@^1.0.0-beta.34, web3@^1.2.5: version "1.3.4" resolved "https://registry.yarnpkg.com/web3/-/web3-1.3.4.tgz#31e014873360aa5840eb17f9f171190c967cffb7" integrity sha512-D6cMb2EtTMLHgdGbkTPGl/Qi7DAfczR+Lp7iFX3bcu/bsD9V8fZW69hA8v5cRPNGzXUwVQebk3bS17WKR4cD2w== @@ -21001,6 +21323,16 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.3.0, write-file-atomic@^2.4.2: imurmurhash "^0.1.4" signal-exit "^3.0.2" +write-file-atomic@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== + dependencies: + imurmurhash "^0.1.4" + is-typedarray "^1.0.0" + signal-exit "^3.0.2" + typedarray-to-buffer "^3.1.5" + write-file-webpack-plugin@4.5.1: version "4.5.1" resolved "https://registry.yarnpkg.com/write-file-webpack-plugin/-/write-file-webpack-plugin-4.5.1.tgz#aeeb68889194da5ec8a864667d46da9e00ee92d5" @@ -21281,7 +21613,7 @@ yargs@13.3.2, yargs@^13.2.4, yargs@^13.3.0, yargs@^13.3.2: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@15.4.1, yargs@^15.1.0: +yargs@15.4.1, yargs@^15.0.2, yargs@^15.1.0: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==