From dd09245ff647581efe1de5b71158b77c8c4cdb6a Mon Sep 17 00:00:00 2001 From: amerkadicE <97883527+amerkadicE@users.noreply.github.com> Date: Tue, 24 Jan 2023 15:10:36 +0100 Subject: [PATCH] Fix/use etherjs specific imports (#15461) * replace ethers with submodules Co-authored-by: Alex --- app/scripts/controllers/ens/ens.js | 4 +- app/scripts/controllers/preferences.js | 2 - app/scripts/controllers/swaps.js | 13 +- app/scripts/controllers/swaps.test.js | 20 +- app/scripts/lib/account-tracker.js | 10 +- lavamoat/browserify/beta/policy.json | 744 ++++++++++++----------- lavamoat/browserify/flask/policy.json | 744 ++++++++++++----------- lavamoat/browserify/main/policy.json | 744 ++++++++++++----------- lavamoat/build-system/policy.json | 2 + package.json | 4 +- shared/modules/transaction.utils.js | 8 +- test/e2e/seeder/ganache-seeder.js | 11 +- ui/components/app/srp-input/srp-input.js | 4 +- ui/ducks/domains.js | 15 +- ui/ducks/send/helpers.test.js | 6 +- ui/ducks/send/send.test.js | 4 +- ui/pages/send/send.test.js | 15 +- yarn.lock | 9 +- 18 files changed, 1177 insertions(+), 1182 deletions(-) diff --git a/app/scripts/controllers/ens/ens.js b/app/scripts/controllers/ens/ens.js index 2242a2b8c..4f8de4a12 100644 --- a/app/scripts/controllers/ens/ens.js +++ b/app/scripts/controllers/ens/ens.js @@ -1,4 +1,4 @@ -import { ethers } from 'ethers'; +import { Web3Provider } from '@ethersproject/providers'; import ensNetworkMap from 'ethereum-ens-network-map'; import { NETWORK_ID_TO_ETHERS_NETWORK_NAME_MAP } from '../../../../shared/constants/network'; @@ -10,7 +10,7 @@ export default class Ens { constructor({ network, provider } = {}) { const networkName = NETWORK_ID_TO_ETHERS_NETWORK_NAME_MAP[network]; const ensAddress = ensNetworkMap[network]; - const ethProvider = new ethers.providers.Web3Provider(provider, { + const ethProvider = new Web3Provider(provider, { chainId: parseInt(network, 10), name: networkName, ensAddress, diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index 7f6eef824..f2775bb79 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -1,6 +1,5 @@ import { ObservableStore } from '@metamask/obs-store'; import { normalize as normalizeAddress } from 'eth-sig-util'; -import { ethers } from 'ethers'; import { IPFS_DEFAULT_GATEWAY_URL } from '../../../shared/constants/network'; import { isPrefixedFormattedHexString } from '../../../shared/modules/network.utils'; import { LedgerTransportTypes } from '../../../shared/constants/hardware-wallets'; @@ -72,7 +71,6 @@ export default class PreferencesController { }; this.network = opts.network; - this.ethersProvider = new ethers.providers.Web3Provider(opts.provider); this.store = new ObservableStore(initState); this.store.setMaxListeners(12); this.openPopup = opts.openPopup; diff --git a/app/scripts/controllers/swaps.js b/app/scripts/controllers/swaps.js index a048839ca..78e6b03ee 100644 --- a/app/scripts/controllers/swaps.js +++ b/app/scripts/controllers/swaps.js @@ -1,4 +1,5 @@ -import { ethers } from 'ethers'; +import { Web3Provider } from '@ethersproject/providers'; +import { Contract } from '@ethersproject/contracts'; import log from 'loglevel'; import BigNumber from 'bignumber.js'; import { ObservableStore } from '@metamask/obs-store'; @@ -134,12 +135,12 @@ export default class SwapsController { this.indexOfNewestCallInFlight = 0; - this.ethersProvider = new ethers.providers.Web3Provider(provider); + this.ethersProvider = new Web3Provider(provider); this._currentNetwork = networkController.store.getState().network; networkController.on(NETWORK_EVENTS.NETWORK_DID_CHANGE, (network) => { if (network !== 'loading' && network !== this._currentNetwork) { this._currentNetwork = network; - this.ethersProvider = new ethers.providers.Web3Provider(provider); + this.ethersProvider = new Web3Provider(provider); } }); } @@ -891,11 +892,7 @@ export default class SwapsController { } async _getERC20Allowance(contractAddress, walletAddress, chainId) { - const contract = new ethers.Contract( - contractAddress, - abi, - this.ethersProvider, - ); + const contract = new Contract(contractAddress, abi, this.ethersProvider); return await contract.allowance( walletAddress, SWAPS_CHAINID_CONTRACT_ADDRESS_MAP[chainId], diff --git a/app/scripts/controllers/swaps.test.js b/app/scripts/controllers/swaps.test.js index 0768b9791..7b953ba34 100644 --- a/app/scripts/controllers/swaps.test.js +++ b/app/scripts/controllers/swaps.test.js @@ -1,9 +1,9 @@ import { strict as assert } from 'assert'; import sinon from 'sinon'; -import { ethers } from 'ethers'; +import { BigNumber } from '@ethersproject/bignumber'; import { mapValues } from 'lodash'; -import BigNumber from 'bignumber.js'; +import BigNumberjs from 'bignumber.js'; import { CHAIN_IDS, NETWORK_IDS } from '../../../shared/constants/network'; import { ETH_SWAPS_TOKEN_OBJECT } from '../../../shared/constants/swaps'; import { createTestProviderTools } from '../../../test/stub/provider'; @@ -373,7 +373,7 @@ describe('SwapsController', function () { assert.strictEqual(gasEstimate, bufferedGasLimit); assert.strictEqual( gasEstimateWithRefund, - `0x${new BigNumber(maxGas, 10) + `0x${new BigNumberjs(maxGas, 10) .minus(estimatedRefund, 10) .toString(16)}`, ); @@ -667,7 +667,7 @@ describe('SwapsController', function () { // Make it so approval is not required sandbox .stub(swapsController, '_getERC20Allowance') - .resolves(ethers.BigNumber.from(1)); + .resolves(BigNumber.from(1)); const [newQuotes] = await swapsController.fetchAndSetQuotes( MOCK_FETCH_PARAMS, @@ -711,7 +711,7 @@ describe('SwapsController', function () { // Make it so approval is not required const allowanceStub = sandbox .stub(swapsController, '_getERC20Allowance') - .resolves(ethers.BigNumber.from(1)); + .resolves(BigNumber.from(1)); await swapsController.fetchAndSetQuotes( MOCK_FETCH_PARAMS, @@ -734,7 +734,7 @@ describe('SwapsController', function () { // Ensure approval is required sandbox .stub(swapsController, '_getERC20Allowance') - .resolves(ethers.BigNumber.from(0)); + .resolves(BigNumber.from(0)); const timedoutGasReturnResult = { gasLimit: 1000000 }; const timedoutGasReturnStub = sandbox @@ -759,7 +759,7 @@ describe('SwapsController', function () { // Make it so approval is not required sandbox .stub(swapsController, '_getERC20Allowance') - .resolves(ethers.BigNumber.from(1)); + .resolves(BigNumber.from(1)); const [newQuotes, topAggId] = await swapsController.fetchAndSetQuotes( MOCK_FETCH_PARAMS, @@ -777,7 +777,7 @@ describe('SwapsController', function () { const bestQuote = { ...getMockQuotes()[TEST_AGG_ID_1], aggregator: bestAggId, - destinationAmount: ethers.BigNumber.from( + destinationAmount: BigNumber.from( getMockQuotes()[TEST_AGG_ID_1].destinationAmount, ) .add((100e18).toString()) @@ -789,7 +789,7 @@ describe('SwapsController', function () { // Make it so approval is not required sandbox .stub(swapsController, '_getERC20Allowance') - .resolves(ethers.BigNumber.from(1)); + .resolves(BigNumber.from(1)); const [newQuotes, topAggId] = await swapsController.fetchAndSetQuotes( MOCK_FETCH_PARAMS, @@ -806,7 +806,7 @@ describe('SwapsController', function () { // Make it so approval is not required sandbox .stub(swapsController, '_getERC20Allowance') - .resolves(ethers.BigNumber.from(1)); + .resolves(BigNumber.from(1)); swapsController.getTokenRatesState = () => ({ contractExchangeRates: {}, diff --git a/app/scripts/lib/account-tracker.js b/app/scripts/lib/account-tracker.js index 6757dcf4a..eed68abae 100644 --- a/app/scripts/lib/account-tracker.js +++ b/app/scripts/lib/account-tracker.js @@ -12,7 +12,8 @@ import EthQuery from 'eth-query'; import { ObservableStore } from '@metamask/obs-store'; import log from 'loglevel'; import pify from 'pify'; -import { ethers } from 'ethers'; +import { Web3Provider } from '@ethersproject/providers'; +import { Contract } from '@ethersproject/contracts'; import SINGLE_CALL_BALANCES_ABI from 'single-call-balance-checker-abi'; import { CHAIN_IDS, @@ -82,8 +83,6 @@ export default class AccountTracker { this.preferencesController = opts.preferencesController; this.onboardingController = opts.onboardingController; - this.ethersProvider = new ethers.providers.Web3Provider(this._provider); - this.onboardingController.store.subscribe( previousValueComparator(async (prevState, currState) => { const { completedOnboarding: prevCompletedOnboarding } = prevState; @@ -109,6 +108,7 @@ export default class AccountTracker { } }, this.onboardingController.store.getState()), ); + this.ethersProvider = new Web3Provider(this._provider); } start() { @@ -391,9 +391,9 @@ export default class AccountTracker { newAccounts[address] = { address, balance: null }; } }); - this.ethersProvider = new ethers.providers.Web3Provider(this._provider); + this.ethersProvider = new Web3Provider(this._provider); - const ethContract = await new ethers.Contract( + const ethContract = await new Contract( deployedContractAddress, SINGLE_CALL_BALANCES_ABI, this.ethersProvider, diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 2208d70df..8d5454123 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -138,11 +138,89 @@ "ethereumjs-util": true } }, + "@ethersproject/abi": { + "globals": { + "console.log": true + }, + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true + } + }, + "@ethersproject/abi>@ethersproject/address": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/bignumber": true, + "@ethersproject/providers>@ethersproject/rlp": true + } + }, + "@ethersproject/abi>@ethersproject/bytes": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/abi>@ethersproject/constants": { + "packages": { + "@ethersproject/bignumber": true + } + }, + "@ethersproject/abi>@ethersproject/hash": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/providers>@ethersproject/base64": true + } + }, + "@ethersproject/abi>@ethersproject/keccak256": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256>js-sha3": true + } + }, + "@ethersproject/abi>@ethersproject/keccak256>js-sha3": { + "globals": { + "define": true + }, + "packages": { + "browserify>process": true + } + }, + "@ethersproject/abi>@ethersproject/logger": { + "globals": { + "console": true + } + }, + "@ethersproject/abi>@ethersproject/properties": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/abi>@ethersproject/strings": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/logger": true + } + }, "@ethersproject/bignumber": { "packages": { - "@ethersproject/bignumber>bn.js": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/bignumber>bn.js": true } }, "@ethersproject/bignumber>bn.js": { @@ -158,15 +236,85 @@ "setTimeout": true }, "packages": { + "@ethersproject/abi": true, + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, "@ethersproject/bignumber": true, - "ethers>@ethersproject/abi": true, - "ethers>@ethersproject/abstract-provider": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/transactions": true + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/abstract-provider": true + } + }, + "@ethersproject/hdnode": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/hdnode>@ethersproject/basex": true, + "@ethersproject/hdnode>@ethersproject/pbkdf2": true, + "@ethersproject/hdnode>@ethersproject/sha2": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/hdnode>@ethersproject/wordlists": true + } + }, + "@ethersproject/hdnode>@ethersproject/abstract-signer": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true + } + }, + "@ethersproject/hdnode>@ethersproject/basex": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/properties": true + } + }, + "@ethersproject/hdnode>@ethersproject/pbkdf2": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/hdnode>@ethersproject/sha2": true + } + }, + "@ethersproject/hdnode>@ethersproject/sha2": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true + } + }, + "@ethersproject/hdnode>@ethersproject/signing-key": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "ganache>secp256k1>elliptic": true + } + }, + "@ethersproject/hdnode>@ethersproject/transactions": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/bignumber": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/providers>@ethersproject/rlp": true + } + }, + "@ethersproject/hdnode>@ethersproject/wordlists": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true } }, "@ethersproject/providers": { @@ -180,24 +328,72 @@ "setTimeout": true }, "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, "@ethersproject/bignumber": true, - "@ethersproject/providers>bech32": true, - "ethers>@ethersproject/abstract-provider": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/basex": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/networks": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/web": true + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/basex": true, + "@ethersproject/hdnode>@ethersproject/sha2": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/abstract-provider": true, + "@ethersproject/providers>@ethersproject/base64": true, + "@ethersproject/providers>@ethersproject/networks": true, + "@ethersproject/providers>@ethersproject/random": true, + "@ethersproject/providers>@ethersproject/web": true, + "@ethersproject/providers>bech32": true + } + }, + "@ethersproject/providers>@ethersproject/abstract-provider": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/bignumber": true + } + }, + "@ethersproject/providers>@ethersproject/base64": { + "globals": { + "atob": true, + "btoa": true + }, + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true + } + }, + "@ethersproject/providers>@ethersproject/networks": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/providers>@ethersproject/random": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/providers>@ethersproject/rlp": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/providers>@ethersproject/web": { + "globals": { + "clearTimeout": true, + "fetch": true, + "setTimeout": true + }, + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/providers>@ethersproject/base64": true } }, "@formatjs/intl-relativetimeformat": { @@ -507,6 +703,7 @@ "setTimeout": true }, "packages": { + "@ethersproject/abi": true, "@ethersproject/contracts": true, "@ethersproject/providers": true, "@metamask/assets-controllers>abort-controller": true, @@ -520,7 +717,6 @@ "eth-query": true, "eth-rpc-errors": true, "ethereumjs-util": true, - "ethers>@ethersproject/abi": true, "single-call-balance-checker-abi": true, "uuid": true } @@ -643,7 +839,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>ethjs-util": { @@ -759,7 +955,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethjs-util": { @@ -785,7 +981,7 @@ "eth-trezor-keyring>hdkey>secp256k1>bip66": true, "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "@metamask/eth-token-tracker": { @@ -1090,13 +1286,13 @@ "setInterval": true }, "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, "@ethersproject/bignumber": true, "@ethersproject/providers": true, "@metamask/base-controller": true, "@metamask/controller-utils": true, "@metamask/controller-utils>isomorphic-fetch": true, "@metamask/smart-transactions-controller>bignumber.js": true, - "ethers>@ethersproject/bytes": true, "fast-json-patch": true, "lodash": true } @@ -1618,6 +1814,7 @@ }, "@truffle/decoder>@truffle/encoder": { "packages": { + "@ethersproject/abi>@ethersproject/address": true, "@ethersproject/bignumber": true, "@truffle/codec": true, "@truffle/codec>@truffle/abi-utils": true, @@ -1626,7 +1823,6 @@ "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs": true, "@truffle/decoder>@truffle/encoder>big.js": true, "@truffle/decoder>@truffle/encoder>bignumber.js": true, - "ethers>@ethersproject/address": true, "lodash": true, "nock>debug": true } @@ -1643,11 +1839,11 @@ "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>@ensdomains/ens": true, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>@ensdomains/resolver": true, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>content-hash": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers": true, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>js-sha3": true, "browserify>buffer": true, "eth-ens-namehash": true, - "ethereumjs-wallet>bs58check>bs58": true, - "ethers": true + "ethereumjs-wallet>bs58check>bs58": true } }, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>@ensdomains/address-encoder": { @@ -1709,6 +1905,91 @@ "ethereumjs-wallet>bs58check>bs58>base-x": true } }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers": { + "packages": { + "@ethersproject/abi": true, + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/contracts": true, + "@ethersproject/hdnode": true, + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/basex": true, + "@ethersproject/hdnode>@ethersproject/sha2": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/hdnode>@ethersproject/wordlists": true, + "@ethersproject/providers": true, + "@ethersproject/providers>@ethersproject/base64": true, + "@ethersproject/providers>@ethersproject/random": true, + "@ethersproject/providers>@ethersproject/rlp": true, + "@ethersproject/providers>@ethersproject/web": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/solidity": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/units": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/wallet": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/hdnode": true, + "@ethersproject/hdnode>@ethersproject/pbkdf2": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/random": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets>aes-js": true, + "ethereumjs-util>ethereum-cryptography>scrypt-js": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets>aes-js": { + "globals": { + "define": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/solidity": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/hdnode>@ethersproject/sha2": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/units": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/bignumber": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/wallet": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/hdnode": true, + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/abstract-provider": true, + "@ethersproject/providers>@ethersproject/random": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets": true + } + }, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>js-sha3": { "globals": { "define": true @@ -1891,7 +2172,7 @@ }, "browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": { "packages": { - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, "pumpify>inherits": true } }, @@ -1910,7 +2191,7 @@ "browserify>crypto-browserify>public-encrypt>parse-asn1": true, "browserify>stream-browserify": true, "ethereumjs-util>create-hash": true, - "ethers>@ethersproject/signing-key>elliptic": true, + "ganache>secp256k1>elliptic": true, "pumpify>inherits": true } }, @@ -1918,7 +2199,7 @@ "packages": { "bn.js": true, "browserify>buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "browserify>crypto-browserify>create-hmac": { @@ -1942,7 +2223,7 @@ "browserify>crypto-browserify>diffie-hellman>miller-rabin": { "packages": { "bn.js": true, - "ethers>@ethersproject/signing-key>elliptic>brorand": true + "ganache>secp256k1>elliptic>brorand": true } }, "browserify>crypto-browserify>pbkdf2": { @@ -1992,7 +2273,7 @@ "bn.js": true, "browserify>buffer": true, "browserify>vm-browserify": true, - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, "pumpify>inherits": true } }, @@ -2428,6 +2709,7 @@ }, "packages": { "@ethereumjs/common>crc-32": true, + "@ethersproject/abi": true, "bn.js": true, "browserify>buffer": true, "browserify>process": true, @@ -2441,11 +2723,10 @@ "eth-lattice-keyring>gridplus-sdk>js-sha3": true, "eth-lattice-keyring>gridplus-sdk>rlp": true, "eth-lattice-keyring>gridplus-sdk>secp256k1": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-wallet>aes-js": true, "ethereumjs-wallet>bs58check": true, - "ethers>@ethersproject/abi": true, - "ethers>@ethersproject/sha2>hash.js": true, - "ethers>@ethersproject/signing-key>elliptic": true, + "ganache>secp256k1>elliptic": true, "lodash": true } }, @@ -2558,7 +2839,7 @@ }, "eth-lattice-keyring>gridplus-sdk>secp256k1": { "packages": { - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "eth-lattice-keyring>rlp": { @@ -2602,7 +2883,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "eth-sig-util>ethereumjs-util>ethjs-util": { @@ -2667,7 +2948,7 @@ "eth-trezor-keyring>hdkey>secp256k1>bip66": true, "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "eth-trezor-keyring>hdkey>secp256k1>bip66": { @@ -2728,7 +3009,7 @@ "ethereumjs-util>create-hash": true, "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "ethereumjs-abi>ethereumjs-util>ethjs-util": { @@ -2829,6 +3110,12 @@ "browserify>buffer": true } }, + "ethereumjs-util>ethereum-cryptography>hash.js": { + "packages": { + "ganache>secp256k1>elliptic>minimalistic-assert": true, + "pumpify>inherits": true + } + }, "ethereumjs-util>ethereum-cryptography>keccak": { "packages": { "browserify>buffer": true, @@ -2846,9 +3133,18 @@ "pumpify>inherits": true } }, + "ethereumjs-util>ethereum-cryptography>scrypt-js": { + "globals": { + "define": true, + "setTimeout": true + }, + "packages": { + "browserify>timers-browserify": true + } + }, "ethereumjs-util>ethereum-cryptography>secp256k1": { "packages": { - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "ethereumjs-util>rlp": { @@ -2909,7 +3205,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>ethereumjs-util>ethjs-util": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "ethereumjs-wallet>ethereumjs-util>ethjs-util": { @@ -2946,330 +3242,9 @@ "msCrypto": true } }, - "ethers": { - "packages": { - "@ethersproject/bignumber": true, - "@ethersproject/contracts": true, - "@ethersproject/providers": true, - "ethers>@ethersproject/abi": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/basex": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/rlp": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/solidity": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/units": true, - "ethers>@ethersproject/wallet": true, - "ethers>@ethersproject/web": true, - "ethers>@ethersproject/wordlists": true - } - }, - "ethers>@ethersproject/abi": { - "globals": { - "console.log": true - }, - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/abstract-provider": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true - } - }, - "ethers>@ethersproject/abstract-signer": { - "packages": { - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true - } - }, - "ethers>@ethersproject/address": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/rlp": true - } - }, - "ethers>@ethersproject/base64": { - "globals": { - "atob": true, - "btoa": true - }, - "packages": { - "ethers>@ethersproject/bytes": true - } - }, - "ethers>@ethersproject/basex": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/properties": true - } - }, - "ethers>@ethersproject/bytes": { - "packages": { - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/constants": { - "packages": { - "@ethersproject/bignumber": true - } - }, - "ethers>@ethersproject/hash": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/hdnode": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/basex": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/pbkdf2": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/wordlists": true - } - }, - "ethers>@ethersproject/json-wallets": { - "packages": { - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets>aes-js": true, - "ethers>@ethersproject/json-wallets>scrypt-js": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/pbkdf2": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true - } - }, - "ethers>@ethersproject/json-wallets>aes-js": { - "globals": { - "define": true - } - }, - "ethers>@ethersproject/json-wallets>scrypt-js": { - "globals": { - "define": true, - "setTimeout": true - }, - "packages": { - "browserify>timers-browserify": true - } - }, - "ethers>@ethersproject/keccak256": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256>js-sha3": true - } - }, - "ethers>@ethersproject/keccak256>js-sha3": { - "globals": { - "define": true - }, - "packages": { - "browserify>process": true - } - }, - "ethers>@ethersproject/logger": { - "globals": { - "console": true - } - }, - "ethers>@ethersproject/networks": { - "packages": { - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/pbkdf2": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/sha2": true - } - }, - "ethers>@ethersproject/properties": { - "packages": { - "ethers>@ethersproject/logger": true - } - }, "ethers>@ethersproject/random": { "globals": { "crypto.getRandomValues": true - }, - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/rlp": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/sha2": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/sha2>hash.js": true - } - }, - "ethers>@ethersproject/sha2>hash.js": { - "packages": { - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, - "pumpify>inherits": true - } - }, - "ethers>@ethersproject/signing-key": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/signing-key>elliptic": true - } - }, - "ethers>@ethersproject/signing-key>elliptic": { - "packages": { - "bn.js": true, - "ethers>@ethersproject/sha2>hash.js": true, - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, - "ethers>@ethersproject/signing-key>elliptic>brorand": true, - "ethers>@ethersproject/signing-key>elliptic>hmac-drbg": true, - "ethers>@ethersproject/signing-key>elliptic>minimalistic-crypto-utils": true, - "pumpify>inherits": true - } - }, - "ethers>@ethersproject/signing-key>elliptic>brorand": { - "globals": { - "crypto": true, - "msCrypto": true - }, - "packages": { - "browserify>browser-resolve": true - } - }, - "ethers>@ethersproject/signing-key>elliptic>hmac-drbg": { - "packages": { - "ethers>@ethersproject/sha2>hash.js": true, - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, - "ethers>@ethersproject/signing-key>elliptic>minimalistic-crypto-utils": true - } - }, - "ethers>@ethersproject/solidity": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/strings": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/transactions": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/rlp": true, - "ethers>@ethersproject/signing-key": true - } - }, - "ethers>@ethersproject/units": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/wallet": { - "packages": { - "ethers>@ethersproject/abstract-provider": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/transactions": true - } - }, - "ethers>@ethersproject/web": { - "globals": { - "clearTimeout": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/wordlists": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true } }, "ethjs": { @@ -3422,6 +3397,33 @@ "define": true } }, + "ganache>secp256k1>elliptic": { + "packages": { + "bn.js": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true, + "ganache>secp256k1>elliptic>brorand": true, + "ganache>secp256k1>elliptic>hmac-drbg": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-crypto-utils": true, + "pumpify>inherits": true + } + }, + "ganache>secp256k1>elliptic>brorand": { + "globals": { + "crypto": true, + "msCrypto": true + }, + "packages": { + "browserify>browser-resolve": true + } + }, + "ganache>secp256k1>elliptic>hmac-drbg": { + "packages": { + "ethereumjs-util>ethereum-cryptography>hash.js": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-crypto-utils": true + } + }, "globalthis>define-properties": { "packages": { "globalthis>define-properties>has-property-descriptors": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 6a0915e95..75f907c9a 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -138,11 +138,89 @@ "ethereumjs-util": true } }, + "@ethersproject/abi": { + "globals": { + "console.log": true + }, + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true + } + }, + "@ethersproject/abi>@ethersproject/address": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/bignumber": true, + "@ethersproject/providers>@ethersproject/rlp": true + } + }, + "@ethersproject/abi>@ethersproject/bytes": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/abi>@ethersproject/constants": { + "packages": { + "@ethersproject/bignumber": true + } + }, + "@ethersproject/abi>@ethersproject/hash": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/providers>@ethersproject/base64": true + } + }, + "@ethersproject/abi>@ethersproject/keccak256": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256>js-sha3": true + } + }, + "@ethersproject/abi>@ethersproject/keccak256>js-sha3": { + "globals": { + "define": true + }, + "packages": { + "browserify>process": true + } + }, + "@ethersproject/abi>@ethersproject/logger": { + "globals": { + "console": true + } + }, + "@ethersproject/abi>@ethersproject/properties": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/abi>@ethersproject/strings": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/logger": true + } + }, "@ethersproject/bignumber": { "packages": { - "@ethersproject/bignumber>bn.js": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/bignumber>bn.js": true } }, "@ethersproject/bignumber>bn.js": { @@ -158,15 +236,85 @@ "setTimeout": true }, "packages": { + "@ethersproject/abi": true, + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, "@ethersproject/bignumber": true, - "ethers>@ethersproject/abi": true, - "ethers>@ethersproject/abstract-provider": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/transactions": true + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/abstract-provider": true + } + }, + "@ethersproject/hdnode": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/hdnode>@ethersproject/basex": true, + "@ethersproject/hdnode>@ethersproject/pbkdf2": true, + "@ethersproject/hdnode>@ethersproject/sha2": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/hdnode>@ethersproject/wordlists": true + } + }, + "@ethersproject/hdnode>@ethersproject/abstract-signer": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true + } + }, + "@ethersproject/hdnode>@ethersproject/basex": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/properties": true + } + }, + "@ethersproject/hdnode>@ethersproject/pbkdf2": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/hdnode>@ethersproject/sha2": true + } + }, + "@ethersproject/hdnode>@ethersproject/sha2": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true + } + }, + "@ethersproject/hdnode>@ethersproject/signing-key": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "ganache>secp256k1>elliptic": true + } + }, + "@ethersproject/hdnode>@ethersproject/transactions": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/bignumber": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/providers>@ethersproject/rlp": true + } + }, + "@ethersproject/hdnode>@ethersproject/wordlists": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true } }, "@ethersproject/providers": { @@ -180,24 +328,72 @@ "setTimeout": true }, "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, "@ethersproject/bignumber": true, - "@ethersproject/providers>bech32": true, - "ethers>@ethersproject/abstract-provider": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/basex": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/networks": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/web": true + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/basex": true, + "@ethersproject/hdnode>@ethersproject/sha2": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/abstract-provider": true, + "@ethersproject/providers>@ethersproject/base64": true, + "@ethersproject/providers>@ethersproject/networks": true, + "@ethersproject/providers>@ethersproject/random": true, + "@ethersproject/providers>@ethersproject/web": true, + "@ethersproject/providers>bech32": true + } + }, + "@ethersproject/providers>@ethersproject/abstract-provider": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/bignumber": true + } + }, + "@ethersproject/providers>@ethersproject/base64": { + "globals": { + "atob": true, + "btoa": true + }, + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true + } + }, + "@ethersproject/providers>@ethersproject/networks": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/providers>@ethersproject/random": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/providers>@ethersproject/rlp": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/providers>@ethersproject/web": { + "globals": { + "clearTimeout": true, + "fetch": true, + "setTimeout": true + }, + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/providers>@ethersproject/base64": true } }, "@formatjs/intl-relativetimeformat": { @@ -507,6 +703,7 @@ "setTimeout": true }, "packages": { + "@ethersproject/abi": true, "@ethersproject/contracts": true, "@ethersproject/providers": true, "@metamask/assets-controllers>abort-controller": true, @@ -520,7 +717,6 @@ "eth-query": true, "eth-rpc-errors": true, "ethereumjs-util": true, - "ethers>@ethersproject/abi": true, "single-call-balance-checker-abi": true, "uuid": true } @@ -643,7 +839,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>ethjs-util": { @@ -759,7 +955,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethjs-util": { @@ -785,7 +981,7 @@ "eth-trezor-keyring>hdkey>secp256k1>bip66": true, "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "@metamask/eth-token-tracker": { @@ -1182,13 +1378,13 @@ "setInterval": true }, "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, "@ethersproject/bignumber": true, "@ethersproject/providers": true, "@metamask/base-controller": true, "@metamask/controller-utils": true, "@metamask/controller-utils>isomorphic-fetch": true, "@metamask/smart-transactions-controller>bignumber.js": true, - "ethers>@ethersproject/bytes": true, "fast-json-patch": true, "lodash": true } @@ -1942,6 +2138,7 @@ }, "@truffle/decoder>@truffle/encoder": { "packages": { + "@ethersproject/abi>@ethersproject/address": true, "@ethersproject/bignumber": true, "@truffle/codec": true, "@truffle/codec>@truffle/abi-utils": true, @@ -1950,7 +2147,6 @@ "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs": true, "@truffle/decoder>@truffle/encoder>big.js": true, "@truffle/decoder>@truffle/encoder>bignumber.js": true, - "ethers>@ethersproject/address": true, "lodash": true, "nock>debug": true } @@ -1967,11 +2163,11 @@ "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>@ensdomains/ens": true, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>@ensdomains/resolver": true, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>content-hash": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers": true, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>js-sha3": true, "browserify>buffer": true, "eth-ens-namehash": true, - "ethereumjs-wallet>bs58check>bs58": true, - "ethers": true + "ethereumjs-wallet>bs58check>bs58": true } }, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>@ensdomains/address-encoder": { @@ -2033,6 +2229,91 @@ "ethereumjs-wallet>bs58check>bs58>base-x": true } }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers": { + "packages": { + "@ethersproject/abi": true, + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/contracts": true, + "@ethersproject/hdnode": true, + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/basex": true, + "@ethersproject/hdnode>@ethersproject/sha2": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/hdnode>@ethersproject/wordlists": true, + "@ethersproject/providers": true, + "@ethersproject/providers>@ethersproject/base64": true, + "@ethersproject/providers>@ethersproject/random": true, + "@ethersproject/providers>@ethersproject/rlp": true, + "@ethersproject/providers>@ethersproject/web": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/solidity": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/units": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/wallet": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/hdnode": true, + "@ethersproject/hdnode>@ethersproject/pbkdf2": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/random": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets>aes-js": true, + "ethereumjs-util>ethereum-cryptography>scrypt-js": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets>aes-js": { + "globals": { + "define": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/solidity": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/hdnode>@ethersproject/sha2": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/units": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/bignumber": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/wallet": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/hdnode": true, + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/abstract-provider": true, + "@ethersproject/providers>@ethersproject/random": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets": true + } + }, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>js-sha3": { "globals": { "define": true @@ -2215,7 +2496,7 @@ }, "browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": { "packages": { - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, "pumpify>inherits": true } }, @@ -2234,7 +2515,7 @@ "browserify>crypto-browserify>public-encrypt>parse-asn1": true, "browserify>stream-browserify": true, "ethereumjs-util>create-hash": true, - "ethers>@ethersproject/signing-key>elliptic": true, + "ganache>secp256k1>elliptic": true, "pumpify>inherits": true } }, @@ -2242,7 +2523,7 @@ "packages": { "bn.js": true, "browserify>buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "browserify>crypto-browserify>create-hmac": { @@ -2266,7 +2547,7 @@ "browserify>crypto-browserify>diffie-hellman>miller-rabin": { "packages": { "bn.js": true, - "ethers>@ethersproject/signing-key>elliptic>brorand": true + "ganache>secp256k1>elliptic>brorand": true } }, "browserify>crypto-browserify>pbkdf2": { @@ -2316,7 +2597,7 @@ "bn.js": true, "browserify>buffer": true, "browserify>vm-browserify": true, - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, "pumpify>inherits": true } }, @@ -2752,6 +3033,7 @@ }, "packages": { "@ethereumjs/common>crc-32": true, + "@ethersproject/abi": true, "bn.js": true, "browserify>buffer": true, "browserify>process": true, @@ -2765,11 +3047,10 @@ "eth-lattice-keyring>gridplus-sdk>js-sha3": true, "eth-lattice-keyring>gridplus-sdk>rlp": true, "eth-lattice-keyring>gridplus-sdk>secp256k1": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-wallet>aes-js": true, "ethereumjs-wallet>bs58check": true, - "ethers>@ethersproject/abi": true, - "ethers>@ethersproject/sha2>hash.js": true, - "ethers>@ethersproject/signing-key>elliptic": true, + "ganache>secp256k1>elliptic": true, "lodash": true } }, @@ -2882,7 +3163,7 @@ }, "eth-lattice-keyring>gridplus-sdk>secp256k1": { "packages": { - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "eth-lattice-keyring>rlp": { @@ -2926,7 +3207,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "eth-sig-util>ethereumjs-util>ethjs-util": { @@ -2991,7 +3272,7 @@ "eth-trezor-keyring>hdkey>secp256k1>bip66": true, "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "eth-trezor-keyring>hdkey>secp256k1>bip66": { @@ -3052,7 +3333,7 @@ "ethereumjs-util>create-hash": true, "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "ethereumjs-abi>ethereumjs-util>ethjs-util": { @@ -3153,6 +3434,12 @@ "browserify>buffer": true } }, + "ethereumjs-util>ethereum-cryptography>hash.js": { + "packages": { + "ganache>secp256k1>elliptic>minimalistic-assert": true, + "pumpify>inherits": true + } + }, "ethereumjs-util>ethereum-cryptography>keccak": { "packages": { "browserify>buffer": true, @@ -3170,9 +3457,18 @@ "pumpify>inherits": true } }, + "ethereumjs-util>ethereum-cryptography>scrypt-js": { + "globals": { + "define": true, + "setTimeout": true + }, + "packages": { + "browserify>timers-browserify": true + } + }, "ethereumjs-util>ethereum-cryptography>secp256k1": { "packages": { - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "ethereumjs-util>rlp": { @@ -3233,7 +3529,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>ethereumjs-util>ethjs-util": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "ethereumjs-wallet>ethereumjs-util>ethjs-util": { @@ -3270,330 +3566,9 @@ "msCrypto": true } }, - "ethers": { - "packages": { - "@ethersproject/bignumber": true, - "@ethersproject/contracts": true, - "@ethersproject/providers": true, - "ethers>@ethersproject/abi": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/basex": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/rlp": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/solidity": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/units": true, - "ethers>@ethersproject/wallet": true, - "ethers>@ethersproject/web": true, - "ethers>@ethersproject/wordlists": true - } - }, - "ethers>@ethersproject/abi": { - "globals": { - "console.log": true - }, - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/abstract-provider": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true - } - }, - "ethers>@ethersproject/abstract-signer": { - "packages": { - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true - } - }, - "ethers>@ethersproject/address": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/rlp": true - } - }, - "ethers>@ethersproject/base64": { - "globals": { - "atob": true, - "btoa": true - }, - "packages": { - "ethers>@ethersproject/bytes": true - } - }, - "ethers>@ethersproject/basex": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/properties": true - } - }, - "ethers>@ethersproject/bytes": { - "packages": { - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/constants": { - "packages": { - "@ethersproject/bignumber": true - } - }, - "ethers>@ethersproject/hash": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/hdnode": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/basex": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/pbkdf2": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/wordlists": true - } - }, - "ethers>@ethersproject/json-wallets": { - "packages": { - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets>aes-js": true, - "ethers>@ethersproject/json-wallets>scrypt-js": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/pbkdf2": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true - } - }, - "ethers>@ethersproject/json-wallets>aes-js": { - "globals": { - "define": true - } - }, - "ethers>@ethersproject/json-wallets>scrypt-js": { - "globals": { - "define": true, - "setTimeout": true - }, - "packages": { - "browserify>timers-browserify": true - } - }, - "ethers>@ethersproject/keccak256": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256>js-sha3": true - } - }, - "ethers>@ethersproject/keccak256>js-sha3": { - "globals": { - "define": true - }, - "packages": { - "browserify>process": true - } - }, - "ethers>@ethersproject/logger": { - "globals": { - "console": true - } - }, - "ethers>@ethersproject/networks": { - "packages": { - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/pbkdf2": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/sha2": true - } - }, - "ethers>@ethersproject/properties": { - "packages": { - "ethers>@ethersproject/logger": true - } - }, "ethers>@ethersproject/random": { "globals": { "crypto.getRandomValues": true - }, - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/rlp": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/sha2": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/sha2>hash.js": true - } - }, - "ethers>@ethersproject/sha2>hash.js": { - "packages": { - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, - "pumpify>inherits": true - } - }, - "ethers>@ethersproject/signing-key": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/signing-key>elliptic": true - } - }, - "ethers>@ethersproject/signing-key>elliptic": { - "packages": { - "bn.js": true, - "ethers>@ethersproject/sha2>hash.js": true, - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, - "ethers>@ethersproject/signing-key>elliptic>brorand": true, - "ethers>@ethersproject/signing-key>elliptic>hmac-drbg": true, - "ethers>@ethersproject/signing-key>elliptic>minimalistic-crypto-utils": true, - "pumpify>inherits": true - } - }, - "ethers>@ethersproject/signing-key>elliptic>brorand": { - "globals": { - "crypto": true, - "msCrypto": true - }, - "packages": { - "browserify>browser-resolve": true - } - }, - "ethers>@ethersproject/signing-key>elliptic>hmac-drbg": { - "packages": { - "ethers>@ethersproject/sha2>hash.js": true, - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, - "ethers>@ethersproject/signing-key>elliptic>minimalistic-crypto-utils": true - } - }, - "ethers>@ethersproject/solidity": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/strings": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/transactions": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/rlp": true, - "ethers>@ethersproject/signing-key": true - } - }, - "ethers>@ethersproject/units": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/wallet": { - "packages": { - "ethers>@ethersproject/abstract-provider": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/transactions": true - } - }, - "ethers>@ethersproject/web": { - "globals": { - "clearTimeout": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/wordlists": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true } }, "ethjs": { @@ -3746,6 +3721,33 @@ "define": true } }, + "ganache>secp256k1>elliptic": { + "packages": { + "bn.js": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true, + "ganache>secp256k1>elliptic>brorand": true, + "ganache>secp256k1>elliptic>hmac-drbg": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-crypto-utils": true, + "pumpify>inherits": true + } + }, + "ganache>secp256k1>elliptic>brorand": { + "globals": { + "crypto": true, + "msCrypto": true + }, + "packages": { + "browserify>browser-resolve": true + } + }, + "ganache>secp256k1>elliptic>hmac-drbg": { + "packages": { + "ethereumjs-util>ethereum-cryptography>hash.js": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-crypto-utils": true + } + }, "globalthis>define-properties": { "packages": { "globalthis>define-properties>has-property-descriptors": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 2208d70df..8d5454123 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -138,11 +138,89 @@ "ethereumjs-util": true } }, + "@ethersproject/abi": { + "globals": { + "console.log": true + }, + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true + } + }, + "@ethersproject/abi>@ethersproject/address": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/bignumber": true, + "@ethersproject/providers>@ethersproject/rlp": true + } + }, + "@ethersproject/abi>@ethersproject/bytes": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/abi>@ethersproject/constants": { + "packages": { + "@ethersproject/bignumber": true + } + }, + "@ethersproject/abi>@ethersproject/hash": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/providers>@ethersproject/base64": true + } + }, + "@ethersproject/abi>@ethersproject/keccak256": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256>js-sha3": true + } + }, + "@ethersproject/abi>@ethersproject/keccak256>js-sha3": { + "globals": { + "define": true + }, + "packages": { + "browserify>process": true + } + }, + "@ethersproject/abi>@ethersproject/logger": { + "globals": { + "console": true + } + }, + "@ethersproject/abi>@ethersproject/properties": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/abi>@ethersproject/strings": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/logger": true + } + }, "@ethersproject/bignumber": { "packages": { - "@ethersproject/bignumber>bn.js": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/bignumber>bn.js": true } }, "@ethersproject/bignumber>bn.js": { @@ -158,15 +236,85 @@ "setTimeout": true }, "packages": { + "@ethersproject/abi": true, + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, "@ethersproject/bignumber": true, - "ethers>@ethersproject/abi": true, - "ethers>@ethersproject/abstract-provider": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/transactions": true + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/abstract-provider": true + } + }, + "@ethersproject/hdnode": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/hdnode>@ethersproject/basex": true, + "@ethersproject/hdnode>@ethersproject/pbkdf2": true, + "@ethersproject/hdnode>@ethersproject/sha2": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/hdnode>@ethersproject/wordlists": true + } + }, + "@ethersproject/hdnode>@ethersproject/abstract-signer": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true + } + }, + "@ethersproject/hdnode>@ethersproject/basex": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/properties": true + } + }, + "@ethersproject/hdnode>@ethersproject/pbkdf2": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/hdnode>@ethersproject/sha2": true + } + }, + "@ethersproject/hdnode>@ethersproject/sha2": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true + } + }, + "@ethersproject/hdnode>@ethersproject/signing-key": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "ganache>secp256k1>elliptic": true + } + }, + "@ethersproject/hdnode>@ethersproject/transactions": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/bignumber": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/providers>@ethersproject/rlp": true + } + }, + "@ethersproject/hdnode>@ethersproject/wordlists": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true } }, "@ethersproject/providers": { @@ -180,24 +328,72 @@ "setTimeout": true }, "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, "@ethersproject/bignumber": true, - "@ethersproject/providers>bech32": true, - "ethers>@ethersproject/abstract-provider": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/basex": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/networks": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/web": true + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/basex": true, + "@ethersproject/hdnode>@ethersproject/sha2": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/abstract-provider": true, + "@ethersproject/providers>@ethersproject/base64": true, + "@ethersproject/providers>@ethersproject/networks": true, + "@ethersproject/providers>@ethersproject/random": true, + "@ethersproject/providers>@ethersproject/web": true, + "@ethersproject/providers>bech32": true + } + }, + "@ethersproject/providers>@ethersproject/abstract-provider": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/bignumber": true + } + }, + "@ethersproject/providers>@ethersproject/base64": { + "globals": { + "atob": true, + "btoa": true + }, + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true + } + }, + "@ethersproject/providers>@ethersproject/networks": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/providers>@ethersproject/random": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/providers>@ethersproject/rlp": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true + } + }, + "@ethersproject/providers>@ethersproject/web": { + "globals": { + "clearTimeout": true, + "fetch": true, + "setTimeout": true + }, + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/providers>@ethersproject/base64": true } }, "@formatjs/intl-relativetimeformat": { @@ -507,6 +703,7 @@ "setTimeout": true }, "packages": { + "@ethersproject/abi": true, "@ethersproject/contracts": true, "@ethersproject/providers": true, "@metamask/assets-controllers>abort-controller": true, @@ -520,7 +717,6 @@ "eth-query": true, "eth-rpc-errors": true, "ethereumjs-util": true, - "ethers>@ethersproject/abi": true, "single-call-balance-checker-abi": true, "uuid": true } @@ -643,7 +839,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>eth-sig-util>ethereumjs-util>ethjs-util": { @@ -759,7 +955,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "@metamask/eth-ledger-bridge-keyring>eth-sig-util>ethereumjs-util>ethjs-util": { @@ -785,7 +981,7 @@ "eth-trezor-keyring>hdkey>secp256k1>bip66": true, "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "@metamask/eth-token-tracker": { @@ -1090,13 +1286,13 @@ "setInterval": true }, "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, "@ethersproject/bignumber": true, "@ethersproject/providers": true, "@metamask/base-controller": true, "@metamask/controller-utils": true, "@metamask/controller-utils>isomorphic-fetch": true, "@metamask/smart-transactions-controller>bignumber.js": true, - "ethers>@ethersproject/bytes": true, "fast-json-patch": true, "lodash": true } @@ -1618,6 +1814,7 @@ }, "@truffle/decoder>@truffle/encoder": { "packages": { + "@ethersproject/abi>@ethersproject/address": true, "@ethersproject/bignumber": true, "@truffle/codec": true, "@truffle/codec>@truffle/abi-utils": true, @@ -1626,7 +1823,6 @@ "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs": true, "@truffle/decoder>@truffle/encoder>big.js": true, "@truffle/decoder>@truffle/encoder>bignumber.js": true, - "ethers>@ethersproject/address": true, "lodash": true, "nock>debug": true } @@ -1643,11 +1839,11 @@ "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>@ensdomains/ens": true, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>@ensdomains/resolver": true, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>content-hash": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers": true, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>js-sha3": true, "browserify>buffer": true, "eth-ens-namehash": true, - "ethereumjs-wallet>bs58check>bs58": true, - "ethers": true + "ethereumjs-wallet>bs58check>bs58": true } }, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>@ensdomains/address-encoder": { @@ -1709,6 +1905,91 @@ "ethereumjs-wallet>bs58check>bs58>base-x": true } }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers": { + "packages": { + "@ethersproject/abi": true, + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/constants": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/contracts": true, + "@ethersproject/hdnode": true, + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/basex": true, + "@ethersproject/hdnode>@ethersproject/sha2": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/hdnode>@ethersproject/wordlists": true, + "@ethersproject/providers": true, + "@ethersproject/providers>@ethersproject/base64": true, + "@ethersproject/providers>@ethersproject/random": true, + "@ethersproject/providers>@ethersproject/rlp": true, + "@ethersproject/providers>@ethersproject/web": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/solidity": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/units": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/wallet": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/hdnode": true, + "@ethersproject/hdnode>@ethersproject/pbkdf2": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/random": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets>aes-js": true, + "ethereumjs-util>ethereum-cryptography>scrypt-js": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets>aes-js": { + "globals": { + "define": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/solidity": { + "packages": { + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/strings": true, + "@ethersproject/bignumber": true, + "@ethersproject/hdnode>@ethersproject/sha2": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/units": { + "packages": { + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/bignumber": true + } + }, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/wallet": { + "packages": { + "@ethersproject/abi>@ethersproject/address": true, + "@ethersproject/abi>@ethersproject/bytes": true, + "@ethersproject/abi>@ethersproject/hash": true, + "@ethersproject/abi>@ethersproject/keccak256": true, + "@ethersproject/abi>@ethersproject/logger": true, + "@ethersproject/abi>@ethersproject/properties": true, + "@ethersproject/hdnode": true, + "@ethersproject/hdnode>@ethersproject/abstract-signer": true, + "@ethersproject/hdnode>@ethersproject/signing-key": true, + "@ethersproject/hdnode>@ethersproject/transactions": true, + "@ethersproject/providers>@ethersproject/abstract-provider": true, + "@ethersproject/providers>@ethersproject/random": true, + "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>ethers>@ethersproject/json-wallets": true + } + }, "@truffle/decoder>@truffle/encoder>@ensdomains/ensjs>js-sha3": { "globals": { "define": true @@ -1891,7 +2172,7 @@ }, "browserify>crypto-browserify>browserify-cipher>browserify-des>des.js": { "packages": { - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, "pumpify>inherits": true } }, @@ -1910,7 +2191,7 @@ "browserify>crypto-browserify>public-encrypt>parse-asn1": true, "browserify>stream-browserify": true, "ethereumjs-util>create-hash": true, - "ethers>@ethersproject/signing-key>elliptic": true, + "ganache>secp256k1>elliptic": true, "pumpify>inherits": true } }, @@ -1918,7 +2199,7 @@ "packages": { "bn.js": true, "browserify>buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "browserify>crypto-browserify>create-hmac": { @@ -1942,7 +2223,7 @@ "browserify>crypto-browserify>diffie-hellman>miller-rabin": { "packages": { "bn.js": true, - "ethers>@ethersproject/signing-key>elliptic>brorand": true + "ganache>secp256k1>elliptic>brorand": true } }, "browserify>crypto-browserify>pbkdf2": { @@ -1992,7 +2273,7 @@ "bn.js": true, "browserify>buffer": true, "browserify>vm-browserify": true, - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, "pumpify>inherits": true } }, @@ -2428,6 +2709,7 @@ }, "packages": { "@ethereumjs/common>crc-32": true, + "@ethersproject/abi": true, "bn.js": true, "browserify>buffer": true, "browserify>process": true, @@ -2441,11 +2723,10 @@ "eth-lattice-keyring>gridplus-sdk>js-sha3": true, "eth-lattice-keyring>gridplus-sdk>rlp": true, "eth-lattice-keyring>gridplus-sdk>secp256k1": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true, "ethereumjs-wallet>aes-js": true, "ethereumjs-wallet>bs58check": true, - "ethers>@ethersproject/abi": true, - "ethers>@ethersproject/sha2>hash.js": true, - "ethers>@ethersproject/signing-key>elliptic": true, + "ganache>secp256k1>elliptic": true, "lodash": true } }, @@ -2558,7 +2839,7 @@ }, "eth-lattice-keyring>gridplus-sdk>secp256k1": { "packages": { - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "eth-lattice-keyring>rlp": { @@ -2602,7 +2883,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "eth-sig-util>ethereumjs-util>ethjs-util": { @@ -2667,7 +2948,7 @@ "eth-trezor-keyring>hdkey>secp256k1>bip66": true, "ethereumjs-util>create-hash": true, "ethereumjs-wallet>safe-buffer": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "eth-trezor-keyring>hdkey>secp256k1>bip66": { @@ -2728,7 +3009,7 @@ "ethereumjs-util>create-hash": true, "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "ethereumjs-abi>ethereumjs-util>ethjs-util": { @@ -2829,6 +3110,12 @@ "browserify>buffer": true } }, + "ethereumjs-util>ethereum-cryptography>hash.js": { + "packages": { + "ganache>secp256k1>elliptic>minimalistic-assert": true, + "pumpify>inherits": true + } + }, "ethereumjs-util>ethereum-cryptography>keccak": { "packages": { "browserify>buffer": true, @@ -2846,9 +3133,18 @@ "pumpify>inherits": true } }, + "ethereumjs-util>ethereum-cryptography>scrypt-js": { + "globals": { + "define": true, + "setTimeout": true + }, + "packages": { + "browserify>timers-browserify": true + } + }, "ethereumjs-util>ethereum-cryptography>secp256k1": { "packages": { - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "ethereumjs-util>rlp": { @@ -2909,7 +3205,7 @@ "ethereumjs-util>ethereum-cryptography": true, "ethereumjs-util>rlp": true, "ethereumjs-wallet>ethereumjs-util>ethjs-util": true, - "ethers>@ethersproject/signing-key>elliptic": true + "ganache>secp256k1>elliptic": true } }, "ethereumjs-wallet>ethereumjs-util>ethjs-util": { @@ -2946,330 +3242,9 @@ "msCrypto": true } }, - "ethers": { - "packages": { - "@ethersproject/bignumber": true, - "@ethersproject/contracts": true, - "@ethersproject/providers": true, - "ethers>@ethersproject/abi": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/basex": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/rlp": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/solidity": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/units": true, - "ethers>@ethersproject/wallet": true, - "ethers>@ethersproject/web": true, - "ethers>@ethersproject/wordlists": true - } - }, - "ethers>@ethersproject/abi": { - "globals": { - "console.log": true - }, - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/abstract-provider": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true - } - }, - "ethers>@ethersproject/abstract-signer": { - "packages": { - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true - } - }, - "ethers>@ethersproject/address": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/rlp": true - } - }, - "ethers>@ethersproject/base64": { - "globals": { - "atob": true, - "btoa": true - }, - "packages": { - "ethers>@ethersproject/bytes": true - } - }, - "ethers>@ethersproject/basex": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/properties": true - } - }, - "ethers>@ethersproject/bytes": { - "packages": { - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/constants": { - "packages": { - "@ethersproject/bignumber": true - } - }, - "ethers>@ethersproject/hash": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/hdnode": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/basex": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/pbkdf2": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/wordlists": true - } - }, - "ethers>@ethersproject/json-wallets": { - "packages": { - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets>aes-js": true, - "ethers>@ethersproject/json-wallets>scrypt-js": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/pbkdf2": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true - } - }, - "ethers>@ethersproject/json-wallets>aes-js": { - "globals": { - "define": true - } - }, - "ethers>@ethersproject/json-wallets>scrypt-js": { - "globals": { - "define": true, - "setTimeout": true - }, - "packages": { - "browserify>timers-browserify": true - } - }, - "ethers>@ethersproject/keccak256": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256>js-sha3": true - } - }, - "ethers>@ethersproject/keccak256>js-sha3": { - "globals": { - "define": true - }, - "packages": { - "browserify>process": true - } - }, - "ethers>@ethersproject/logger": { - "globals": { - "console": true - } - }, - "ethers>@ethersproject/networks": { - "packages": { - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/pbkdf2": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/sha2": true - } - }, - "ethers>@ethersproject/properties": { - "packages": { - "ethers>@ethersproject/logger": true - } - }, "ethers>@ethersproject/random": { "globals": { "crypto.getRandomValues": true - }, - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/rlp": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/sha2": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/sha2>hash.js": true - } - }, - "ethers>@ethersproject/sha2>hash.js": { - "packages": { - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, - "pumpify>inherits": true - } - }, - "ethers>@ethersproject/signing-key": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/signing-key>elliptic": true - } - }, - "ethers>@ethersproject/signing-key>elliptic": { - "packages": { - "bn.js": true, - "ethers>@ethersproject/sha2>hash.js": true, - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, - "ethers>@ethersproject/signing-key>elliptic>brorand": true, - "ethers>@ethersproject/signing-key>elliptic>hmac-drbg": true, - "ethers>@ethersproject/signing-key>elliptic>minimalistic-crypto-utils": true, - "pumpify>inherits": true - } - }, - "ethers>@ethersproject/signing-key>elliptic>brorand": { - "globals": { - "crypto": true, - "msCrypto": true - }, - "packages": { - "browserify>browser-resolve": true - } - }, - "ethers>@ethersproject/signing-key>elliptic>hmac-drbg": { - "packages": { - "ethers>@ethersproject/sha2>hash.js": true, - "ethers>@ethersproject/sha2>hash.js>minimalistic-assert": true, - "ethers>@ethersproject/signing-key>elliptic>minimalistic-crypto-utils": true - } - }, - "ethers>@ethersproject/solidity": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/strings": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/transactions": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/rlp": true, - "ethers>@ethersproject/signing-key": true - } - }, - "ethers>@ethersproject/units": { - "packages": { - "@ethersproject/bignumber": true, - "ethers>@ethersproject/logger": true - } - }, - "ethers>@ethersproject/wallet": { - "packages": { - "ethers>@ethersproject/abstract-provider": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/transactions": true - } - }, - "ethers>@ethersproject/web": { - "globals": { - "clearTimeout": true, - "fetch": true, - "setTimeout": true - }, - "packages": { - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true - } - }, - "ethers>@ethersproject/wordlists": { - "packages": { - "ethers>@ethersproject/bytes": true, - "ethers>@ethersproject/hash": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "ethers>@ethersproject/strings": true } }, "ethjs": { @@ -3422,6 +3397,33 @@ "define": true } }, + "ganache>secp256k1>elliptic": { + "packages": { + "bn.js": true, + "ethereumjs-util>ethereum-cryptography>hash.js": true, + "ganache>secp256k1>elliptic>brorand": true, + "ganache>secp256k1>elliptic>hmac-drbg": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-crypto-utils": true, + "pumpify>inherits": true + } + }, + "ganache>secp256k1>elliptic>brorand": { + "globals": { + "crypto": true, + "msCrypto": true + }, + "packages": { + "browserify>browser-resolve": true + } + }, + "ganache>secp256k1>elliptic>hmac-drbg": { + "packages": { + "ethereumjs-util>ethereum-cryptography>hash.js": true, + "ganache>secp256k1>elliptic>minimalistic-assert": true, + "ganache>secp256k1>elliptic>minimalistic-crypto-utils": true + } + }, "globalthis>define-properties": { "packages": { "globalthis>define-properties>has-property-descriptors": true, diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index dc50f82f7..888c48556 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -1910,6 +1910,7 @@ }, "packages": { "chokidar>braces": true, + "chokidar>fsevents": true, "chokidar>glob-parent": true, "chokidar>is-binary-path": true, "chokidar>normalize-path": true, @@ -5219,6 +5220,7 @@ "gulp-watch>path-is-absolute": true, "gulp>glob-watcher>anymatch": true, "gulp>glob-watcher>chokidar>braces": true, + "gulp>glob-watcher>chokidar>fsevents": true, "gulp>glob-watcher>chokidar>glob-parent": true, "gulp>glob-watcher>chokidar>is-binary-path": true, "gulp>glob-watcher>chokidar>readdirp": true, diff --git a/package.json b/package.json index 4daa48764..77eecfe7d 100644 --- a/package.json +++ b/package.json @@ -204,7 +204,10 @@ "@ensdomains/content-hash": "^2.5.6", "@ethereumjs/common": "^2.3.1", "@ethereumjs/tx": "^3.2.1", + "@ethersproject/abi": "^5.6.4", + "@ethersproject/bignumber": "^5.6.2", "@ethersproject/contracts": "^5.7.0", + "@ethersproject/hdnode": "^5.6.2", "@ethersproject/providers": "^5.7.2", "@formatjs/intl-relativetimeformat": "^5.2.6", "@fortawesome/fontawesome-free": "^5.13.0", @@ -283,7 +286,6 @@ "ethereumjs-abi": "^0.6.4", "ethereumjs-util": "^7.0.10", "ethereumjs-wallet": "^0.6.4", - "ethers": "^5.6.4", "ethjs": "^0.4.0", "ethjs-contract": "^0.2.3", "ethjs-query": "^0.3.4", diff --git a/shared/modules/transaction.utils.js b/shared/modules/transaction.utils.js index 9e95fb9a0..44337a6d8 100644 --- a/shared/modules/transaction.utils.js +++ b/shared/modules/transaction.utils.js @@ -1,5 +1,5 @@ import { isHexString } from 'ethereumjs-util'; -import { ethers } from 'ethers'; +import { Interface } from '@ethersproject/abi'; import { abiERC721, abiERC20, abiERC1155 } from '@metamask/metamask-eth-abis'; import log from 'loglevel'; import { @@ -35,9 +35,9 @@ import { isEqualCaseInsensitive } from './string-utils'; * representation of the function. */ -const erc20Interface = new ethers.utils.Interface(abiERC20); -const erc721Interface = new ethers.utils.Interface(abiERC721); -const erc1155Interface = new ethers.utils.Interface(abiERC1155); +const erc20Interface = new Interface(abiERC20); +const erc721Interface = new Interface(abiERC721); +const erc1155Interface = new Interface(abiERC1155); export function transactionMatchesNetwork(transaction, chainId, networkId) { if (typeof transaction.chainId !== 'undefined') { diff --git a/test/e2e/seeder/ganache-seeder.js b/test/e2e/seeder/ganache-seeder.js index 0eaa7ae32..8f963640f 100644 --- a/test/e2e/seeder/ganache-seeder.js +++ b/test/e2e/seeder/ganache-seeder.js @@ -1,4 +1,6 @@ -const { ethers } = require('ethers'); +const { Web3Provider } = require('@ethersproject/providers'); +const { ContractFactory } = require('@ethersproject/contracts'); + const { SMART_CONTRACTS, contractConfiguration } = require('./smart-contracts'); const GanacheContractAddressRegistry = require('./ganache-contract-address-registry'); @@ -18,13 +20,10 @@ class GanacheSeeder { */ async deploySmartContract(contractName) { - const ethersProvider = new ethers.providers.Web3Provider( - this.ganacheProvider, - 'any', - ); + const ethersProvider = new Web3Provider(this.ganacheProvider, 'any'); const signer = ethersProvider.getSigner(); const fromAddress = await signer.getAddress(); - const contractFactory = new ethers.ContractFactory( + const contractFactory = new ContractFactory( contractConfiguration[contractName].abi, contractConfiguration[contractName].bytecode, signer, diff --git a/ui/components/app/srp-input/srp-input.js b/ui/components/app/srp-input/srp-input.js index 7cde8bb45..5468dbf79 100644 --- a/ui/components/app/srp-input/srp-input.js +++ b/ui/components/app/srp-input/srp-input.js @@ -1,4 +1,4 @@ -import { ethers } from 'ethers'; +import { isValidMnemonic } from '@ethersproject/hdnode'; import React, { useCallback, useState } from 'react'; import PropTypes from 'prop-types'; import { useI18nContext } from '../../../hooks/useI18nContext'; @@ -15,8 +15,6 @@ import { } from '../../../helpers/constants/design-system'; import { parseSecretRecoveryPhrase } from './parse-secret-recovery-phrase'; -const { isValidMnemonic } = ethers.utils; - const defaultNumberOfWords = 12; const hasUpperCase = (draftSrp) => { diff --git a/ui/ducks/domains.js b/ui/ducks/domains.js index c04988ebd..b17ff2a91 100644 --- a/ui/ducks/domains.js +++ b/ui/ducks/domains.js @@ -3,7 +3,7 @@ import log from 'loglevel'; import networkMap from 'ethereum-ens-network-map'; import { isConfusing } from 'unicode-confusables'; import { isHexString } from 'ethereumjs-util'; -import { ethers } from 'ethers'; +import { Web3Provider } from '@ethersproject/providers'; import { getCurrentChainId } from '../selectors'; import { @@ -148,14 +148,11 @@ export function initializeDomainSlice() { const ensAddress = networkMap[network]; const networkIsSupported = Boolean(ensAddress); if (networkIsSupported) { - web3Provider = new ethers.providers.Web3Provider( - global.ethereumProvider, - { - chainId: parseInt(network, 10), - name: networkName, - ensAddress, - }, - ); + web3Provider = new Web3Provider(global.ethereumProvider, { + chainId: parseInt(network, 10), + name: networkName, + ensAddress, + }); dispatch(enableDomainLookup(network)); } else { web3Provider = null; diff --git a/ui/ducks/send/helpers.test.js b/ui/ducks/send/helpers.test.js index 69de6bed9..d74f3def2 100644 --- a/ui/ducks/send/helpers.test.js +++ b/ui/ducks/send/helpers.test.js @@ -1,4 +1,4 @@ -import { ethers } from 'ethers'; +import { BigNumber } from '@ethersproject/bignumber'; import { GAS_LIMITS } from '../../../shared/constants/gas'; import { AssetType, @@ -69,7 +69,7 @@ describe('Send Slice Helpers', () => { details: { address: '0xToken', standard: TokenStandard.ERC721, - tokenId: ethers.BigNumber.from(15000).toString(), + tokenId: BigNumber.from(15000).toString(), }, }, recipient: { @@ -82,7 +82,7 @@ describe('Send Slice Helpers', () => { data: generateERC721TransferData({ toAddress: BURN_ADDRESS, fromAddress: '0x00', - tokenId: ethers.BigNumber.from(15000).toString(), + tokenId: BigNumber.from(15000).toString(), }), to: '0xToken', type: '0x0', diff --git a/ui/ducks/send/send.test.js b/ui/ducks/send/send.test.js index 9877d3218..17fc0ac47 100644 --- a/ui/ducks/send/send.test.js +++ b/ui/ducks/send/send.test.js @@ -1,7 +1,7 @@ import sinon from 'sinon'; import createMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import { ethers } from 'ethers'; +import { BigNumber } from '@ethersproject/bignumber'; import { CONTRACT_ADDRESS_ERROR, INSUFFICIENT_FUNDS_ERROR, @@ -2536,7 +2536,7 @@ describe('Send Slice', () => { data: generateERC721TransferData({ toAddress: BURN_ADDRESS, fromAddress: '0xAddress', - tokenId: ethers.BigNumber.from(15000).toString(), + tokenId: BigNumber.from(15000).toString(), }), from: '0xAddress', to: '0xCollectibleAddress', diff --git a/ui/pages/send/send.test.js b/ui/pages/send/send.test.js index ddd2596d8..017dc786b 100644 --- a/ui/pages/send/send.test.js +++ b/ui/pages/send/send.test.js @@ -47,18 +47,13 @@ setBackgroundConnection({ promisifiedBackground: jest.fn(), }); -jest.mock('ethers', () => { - const originalModule = jest.requireActual('ethers'); +jest.mock('@ethersproject/providers', () => { + const originalModule = jest.requireActual('@ethersproject/providers'); return { ...originalModule, - ethers: { - ...originalModule.ethers, - providers: { - Web3Provider: jest.fn().mockImplementation(() => { - return {}; - }), - }, - }, + Web3Provider: jest.fn().mockImplementation(() => { + return {}; + }), }; }); const baseStore = { diff --git a/yarn.lock b/yarn.lock index 037d6cc35..e893ddad7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2038,7 +2038,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.7.0": +"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.6.4, @ethersproject/abi@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/abi@npm:5.7.0" dependencies: @@ -2179,7 +2179,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/hdnode@npm:5.7.0, @ethersproject/hdnode@npm:^5.7.0": +"@ethersproject/hdnode@npm:5.7.0, @ethersproject/hdnode@npm:^5.6.2, @ethersproject/hdnode@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/hdnode@npm:5.7.0" dependencies: @@ -15873,7 +15873,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.0.13, ethers@npm:^5.6.4": +"ethers@npm:^5.0.13": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -24085,8 +24085,10 @@ __metadata: "@ensdomains/content-hash": ^2.5.6 "@ethereumjs/common": ^2.3.1 "@ethereumjs/tx": ^3.2.1 + "@ethersproject/abi": ^5.6.4 "@ethersproject/bignumber": ^5.7.0 "@ethersproject/contracts": ^5.7.0 + "@ethersproject/hdnode": ^5.6.2 "@ethersproject/providers": ^5.7.2 "@formatjs/intl-relativetimeformat": ^5.2.6 "@fortawesome/fontawesome-free": ^5.13.0 @@ -24250,7 +24252,6 @@ __metadata: ethereumjs-abi: ^0.6.4 ethereumjs-util: ^7.0.10 ethereumjs-wallet: ^0.6.4 - ethers: ^5.6.4 ethjs: ^0.4.0 ethjs-contract: ^0.2.3 ethjs-query: ^0.3.4