diff --git a/.storybook/main.js b/.storybook/main.js index 2b4384250c9c..e56cb897fb91 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -59,6 +59,9 @@ module.exports = { config.resolve.alias['@ethereumjs/util'] = require.resolve( '../ui/__mocks__/ethereumjs-util.js', ); + config.resolve.alias['ethereumjs-util'] = require.resolve( + '../ui/__mocks__/ethereumjs-util.js', + ); config.resolve.alias['./useNftCollectionsMetadata'] = require.resolve( '../ui/__mocks__/useNftCollectionsMetadata.js', ); diff --git a/app/scripts/controllers/bridge/constants.ts b/app/scripts/controllers/bridge/constants.ts index 65e2840cfb73..7d970ea2e028 100644 --- a/app/scripts/controllers/bridge/constants.ts +++ b/app/scripts/controllers/bridge/constants.ts @@ -1,4 +1,4 @@ -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import { Hex } from '@metamask/utils'; import { BRIDGE_DEFAULT_SLIPPAGE, diff --git a/app/scripts/controllers/metametrics-controller.ts b/app/scripts/controllers/metametrics-controller.ts index 9668a9f25b09..4febe844c364 100644 --- a/app/scripts/controllers/metametrics-controller.ts +++ b/app/scripts/controllers/metametrics-controller.ts @@ -8,11 +8,12 @@ import { size, sum, } from 'lodash'; -import { bufferToHex, keccak } from 'ethereumjs-util'; +import { keccak256 } from 'ethereum-cryptography/keccak'; import { v4 as uuidv4 } from 'uuid'; import { NameControllerState, NameType } from '@metamask/name-controller'; import { AccountsControllerState } from '@metamask/accounts-controller'; import { + add0x, getErrorMessage, Hex, isErrorWithMessage, @@ -523,13 +524,15 @@ export default class MetaMetricsController extends BaseController< } generateMetaMetricsId(): string { - return bufferToHex( - keccak( - Buffer.from( - String(Date.now()) + - String(Math.round(Math.random() * Number.MAX_SAFE_INTEGER)), + return add0x( + Buffer.from( + keccak256( + Buffer.from( + String(Date.now()) + + String(Math.round(Math.random() * Number.MAX_SAFE_INTEGER)), + ), ), - ), + ).toString('hex'), ); } diff --git a/app/scripts/lib/createRPCMethodTrackingMiddleware.js b/app/scripts/lib/createRPCMethodTrackingMiddleware.js index 5ca2374db05b..f48acb68c7a5 100644 --- a/app/scripts/lib/createRPCMethodTrackingMiddleware.js +++ b/app/scripts/lib/createRPCMethodTrackingMiddleware.js @@ -1,6 +1,6 @@ import { ApprovalType, detectSIWE } from '@metamask/controller-utils'; import { errorCodes } from '@metamask/rpc-errors'; -import { isValidAddress } from 'ethereumjs-util'; +import { isValidAddress } from '@ethereumjs/util'; import { MESSAGE_TYPE, ORIGIN_METAMASK } from '../../../shared/constants/app'; import { MetaMetricsEventCategory, diff --git a/app/scripts/lib/transaction/decode/four-byte.ts b/app/scripts/lib/transaction/decode/four-byte.ts index 5861172fb60d..67d8c3bee5b5 100644 --- a/app/scripts/lib/transaction/decode/four-byte.ts +++ b/app/scripts/lib/transaction/decode/four-byte.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { addHexPrefix } from 'ethereumjs-util'; +import { addHexPrefix } from '@ethereumjs/util'; import { Interface, ParamType } from '@ethersproject/abi'; import { Hex, createProjectLogger } from '@metamask/utils'; import { diff --git a/app/scripts/lib/transaction/decode/proxy.ts b/app/scripts/lib/transaction/decode/proxy.ts index 19d5887acd13..035923ec6a5c 100644 --- a/app/scripts/lib/transaction/decode/proxy.ts +++ b/app/scripts/lib/transaction/decode/proxy.ts @@ -1,7 +1,7 @@ import { query } from '@metamask/controller-utils'; import EthQuery from '@metamask/eth-query'; import { Hex } from '@metamask/utils'; -import { addHexPrefix, stripHexPrefix } from 'ethereumjs-util'; +import { addHexPrefix, stripHexPrefix } from '@ethereumjs/util'; const IMPLEMENTATION_STORAGE_SLOTS = [ // org.zeppelinos.proxy.implementation diff --git a/app/scripts/lib/transaction/decode/uniswap.ts b/app/scripts/lib/transaction/decode/uniswap.ts index c38e204180fd..ee5f61c9a448 100644 --- a/app/scripts/lib/transaction/decode/uniswap.ts +++ b/app/scripts/lib/transaction/decode/uniswap.ts @@ -1,6 +1,6 @@ import { Interface, TransactionDescription } from '@ethersproject/abi'; import { Hex } from '@metamask/utils'; -import { addHexPrefix, stripHexPrefix } from 'ethereumjs-util'; +import { addHexPrefix, stripHexPrefix } from '@ethereumjs/util'; import { CHAIN_IDS } from '../../../../../shared/constants/network'; import { UNISWAP_ROUTER_COMMANDS } from './uniswap-commands'; diff --git a/app/scripts/lib/transaction/metrics.ts b/app/scripts/lib/transaction/metrics.ts index ee09d60259cd..26482a57de11 100644 --- a/app/scripts/lib/transaction/metrics.ts +++ b/app/scripts/lib/transaction/metrics.ts @@ -1,7 +1,7 @@ import EthQuery, { Provider } from '@metamask/eth-query'; import { FetchGasFeeEstimateOptions } from '@metamask/gas-fee-controller'; import { BigNumber } from 'bignumber.js'; -import { isHexString } from 'ethereumjs-util'; +import { isHexString } from '@ethereumjs/util'; import { SmartTransaction } from '@metamask/smart-transactions-controller/dist/types'; import { diff --git a/app/scripts/lib/transaction/util.ts b/app/scripts/lib/transaction/util.ts index a3d0b929aff8..d3c54c299ca2 100644 --- a/app/scripts/lib/transaction/util.ts +++ b/app/scripts/lib/transaction/util.ts @@ -11,7 +11,7 @@ import { UserOperationController, } from '@metamask/user-operation-controller'; import type { Hex } from '@metamask/utils'; -import { addHexPrefix } from 'ethereumjs-util'; +import { addHexPrefix } from '@ethereumjs/util'; import { PPOMController } from '@metamask/ppom-validator'; import { diff --git a/app/scripts/migrations/105.test.ts b/app/scripts/migrations/105.test.ts index b7d5ac0303e6..56bd791bcc26 100644 --- a/app/scripts/migrations/105.test.ts +++ b/app/scripts/migrations/105.test.ts @@ -1,6 +1,7 @@ import { v4 as uuid } from 'uuid'; -import { sha256FromString } from 'ethereumjs-util'; +import { sha256 } from '@noble/hashes/sha256'; import { InternalAccount } from '@metamask/keyring-internal-api'; +import { hexToBytes } from '@noble/hashes/utils'; import { ETH_EOA_METHODS } from '../../../shared/constants/eth-methods'; import { migrate } from './105'; @@ -18,7 +19,7 @@ global.sentry = { function addressToUUID(address: string): string { return uuid({ - random: sha256FromString(address).slice(0, 16), + random: sha256(hexToBytes(address)).slice(0, 16), }); } diff --git a/app/scripts/migrations/105.ts b/app/scripts/migrations/105.ts index 5febcb0479f2..a34429274f0e 100644 --- a/app/scripts/migrations/105.ts +++ b/app/scripts/migrations/105.ts @@ -1,6 +1,7 @@ import { EthAccountType } from '@metamask/keyring-api'; import { InternalAccount } from '@metamask/keyring-internal-api'; -import { sha256FromString } from 'ethereumjs-util'; +import { sha256 } from '@noble/hashes/sha256'; +import { hexToBytes } from '@noble/hashes/utils'; import { v4 as uuid } from 'uuid'; import { cloneDeep } from 'lodash'; import { ETH_EOA_METHODS } from '../../../shared/constants/eth-methods'; @@ -88,7 +89,7 @@ function createInternalAccountsForAccountsController( Object.values(identities).forEach((identity) => { const expectedId = uuid({ - random: sha256FromString(identity.address).slice(0, 16), + random: sha256(hexToBytes(identity.address)).slice(0, 16), }); accounts[expectedId] = { diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index e55d57f5ec0f..be7ecd9552b1 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -40,7 +40,7 @@ }, "@ethereumjs/tx>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -54,7 +54,7 @@ }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -62,7 +62,7 @@ }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -87,9 +87,9 @@ "packages": { "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true } }, @@ -98,7 +98,7 @@ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": true, "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true, "@metamask/smart-transactions-controller>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true + "ethereum-cryptography": true } }, "eth-lattice-keyring>@ethereumjs/tx": { @@ -106,7 +106,7 @@ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/providers": true, "browserify>buffer": true, "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": true, @@ -118,24 +118,24 @@ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/providers": true, "browserify>buffer": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true } }, - "@ethereumjs/tx>@ethereumjs/util": { + "@ethereumjs/util": { "globals": { "console.warn": true }, "packages": { "@ethereumjs/tx>@ethereumjs/rlp": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack>events": true, "browserify>insert-module-globals>is-buffer": true, - "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true + "@ethereumjs/util>micro-ftch": true } }, "@metamask/smart-transactions-controller>@ethereumjs/util": { @@ -145,7 +145,7 @@ }, "packages": { "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack>events": true } }, @@ -608,7 +608,7 @@ "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring": { "packages": { "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@keystonehq/bc-ur-registry-eth": true, "browserify>buffer": true, "@metamask/eth-trezor-keyring>hdkey": true, @@ -618,7 +618,7 @@ }, "@keystonehq/bc-ur-registry-eth": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@keystonehq/bc-ur-registry-eth>@keystonehq/bc-ur-registry": true, "browserify>buffer": true, "@metamask/eth-trezor-keyring>hdkey": true, @@ -631,7 +631,7 @@ }, "packages": { "@ngraveio/bc-ur": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "buffer": true, "browserify>buffer": true, "@swc/helpers>tslib": true @@ -829,13 +829,13 @@ }, "@metamask/accounts-controller": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/base-controller": true, "@metamask/eth-snap-keyring": true, "@metamask/keyring-api": true, "@metamask/keyring-controller": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "uuid": true } }, @@ -874,7 +874,7 @@ "setTimeout": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "ethers>@ethersproject/address": true, "@ethersproject/bignumber": true, "@ethersproject/contracts": true, @@ -958,7 +958,7 @@ "setTimeout": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/ethjs>@metamask/ethjs-unit": true, "@metamask/utils": true, "@metamask/controller-utils>@spruceid/siwe-parser": true, @@ -1007,12 +1007,12 @@ "TextEncoder": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-sig-util": true, "@metamask/scure-bip39": true, "@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true + "ethereum-cryptography": true } }, "@metamask/eth-json-rpc-filters": { @@ -1074,7 +1074,7 @@ "packages": { "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true, "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth": true, "@metamask/eth-sig-util": true, "browserify>buffer": true, @@ -1090,66 +1090,66 @@ }, "@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/abi-utils": true, "@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/eth-json-rpc-middleware>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/keyring-controller>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/keyring-controller>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/keyring-controller>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/signature-controller>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/signature-controller>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/keyring-controller>@metamask/eth-simple-keyring": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-sig-util": true, "@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "crypto-browserify>randombytes": true } }, @@ -1190,7 +1190,7 @@ }, "packages": { "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": true, "@trezor/connect-web": true, "browserify>buffer": true, @@ -1328,7 +1328,7 @@ "packages": { "@metamask/scure-bip39": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/curves": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true } @@ -1343,7 +1343,7 @@ }, "@metamask/keyring-controller": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/base-controller": true, "@metamask/browser-passworder": true, "@metamask/keyring-controller>@metamask/eth-hd-keyring": true, @@ -1521,7 +1521,7 @@ "@metamask/base-controller": true, "@metamask/controller-utils": true, "@noble/hashes": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack-cli>fastest-levenshtein": true, "punycode": true } @@ -1752,7 +1752,7 @@ "packages": { "@metamask/utils>@metamask/superstruct": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/curves": true, "@noble/hashes": true } }, @@ -1823,7 +1823,7 @@ "packages": { "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/abi": true, "@ethersproject/contracts": true, "@ethersproject/providers": true, @@ -2290,12 +2290,12 @@ "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": { + "ethereum-cryptography>@noble/curves": { "globals": { "TextEncoder": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true + "ethereum-cryptography>@noble/curves>@noble/hashes": true } }, "@noble/hashes": { @@ -2310,19 +2310,19 @@ "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": { + "ethereum-cryptography>@noble/curves>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": { + "ethereum-cryptography>@scure/bip32>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": { + "ethereum-cryptography>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true @@ -2403,10 +2403,10 @@ "TextEncoder": true } }, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": { + "ethereum-cryptography>@scure/bip32": { "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true, + "ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@scure/bip32>@noble/hashes": true, "@metamask/utils>@scure/base": true } }, @@ -3086,11 +3086,11 @@ "browserify>browser-resolve": true } }, - "ethereumjs-util>ethereum-cryptography>browserify-aes": { + "crypto-browserify>browserify-cipher>browserify-aes": { "packages": { - "ethereumjs-util>ethereum-cryptography>browserify-aes>buffer-xor": true, + "crypto-browserify>browserify-cipher>browserify-aes>buffer-xor": true, "browserify>buffer": true, - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true, "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true @@ -3098,7 +3098,7 @@ }, "crypto-browserify>browserify-cipher": { "packages": { - "ethereumjs-util>ethereum-cryptography>browserify-aes": true, + "crypto-browserify>browserify-cipher>browserify-aes": true, "crypto-browserify>browserify-cipher>browserify-des": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true } @@ -3106,7 +3106,7 @@ "crypto-browserify>browserify-cipher>browserify-des": { "packages": { "browserify>buffer": true, - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "crypto-browserify>browserify-cipher>browserify-des>des.js": true, "pumpify>inherits": true } @@ -3123,7 +3123,7 @@ "bn.js": true, "crypto-browserify>public-encrypt>browserify-rsa": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>create-hmac": true, "@metamask/ppom-validator>elliptic": true, "pumpify>inherits": true, @@ -3141,15 +3141,15 @@ "browserify>util": true } }, - "ethereumjs-util>ethereum-cryptography>bs58check>bs58": { + "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": { "packages": { "@ensdomains/content-hash>multihashes>multibase>base-x": true } }, - "ethereumjs-util>ethereum-cryptography>bs58check": { + "eth-lattice-keyring>gridplus-sdk>bs58check": { "packages": { - "ethereumjs-util>ethereum-cryptography>bs58check>bs58": true, - "ethereumjs-util>create-hash": true, + "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": true, + "crypto-browserify>create-hash": true, "koa>content-disposition>safe-buffer": true } }, @@ -3167,7 +3167,7 @@ "browserify>buffer": true } }, - "ethereumjs-util>ethereum-cryptography>browserify-aes>buffer-xor": { + "crypto-browserify>browserify-cipher>browserify-aes>buffer-xor": { "packages": { "browserify>buffer": true } @@ -3239,7 +3239,7 @@ "@ensdomains/content-hash>cids>uint8arrays": true } }, - "ethereumjs-util>create-hash>cipher-base": { + "crypto-browserify>create-hash>cipher-base": { "packages": { "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true, @@ -3338,21 +3338,21 @@ "@metamask/ppom-validator>elliptic": true } }, - "ethereumjs-util>create-hash": { + "crypto-browserify>create-hash": { "packages": { - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "pumpify>inherits": true, - "ethereumjs-util>create-hash>md5.js": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>create-hash>md5.js": true, + "crypto-browserify>pbkdf2>ripemd160": true, "addons-linter>sha.js": true } }, "crypto-browserify>create-hmac": { "packages": { - "ethereumjs-util>create-hash>cipher-base": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash>cipher-base": true, + "crypto-browserify>create-hash": true, "pumpify>inherits": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "addons-linter>sha.js": true } @@ -3368,7 +3368,7 @@ "crypto-browserify>browserify-cipher": true, "crypto-browserify>browserify-sign": true, "crypto-browserify>create-ecdh": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>create-hmac": true, "crypto-browserify>diffie-hellman": true, "crypto-browserify>pbkdf2": true, @@ -3584,7 +3584,7 @@ }, "packages": { "eth-lattice-keyring>@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "bn.js": true, "browserify>buffer": true, "crypto-browserify": true, @@ -3599,15 +3599,15 @@ "@metamask/ethjs-query": true } }, - "@ethereumjs/tx>ethereum-cryptography": { + "ethereum-cryptography": { "globals": { "TextDecoder": true, "crypto": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true + "ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/hashes": true, + "ethereum-cryptography>@scure/bip32": true } }, "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": { @@ -3628,10 +3628,10 @@ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true } }, - "ethereumjs-util>ethereum-cryptography": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>ethereum-cryptography": { "packages": { "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, + "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography>keccak": true, "crypto-browserify>randombytes": true, "ganache>secp256k1": true } @@ -3639,34 +3639,22 @@ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": { "packages": { "browserify>assert": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "crypto-browserify>create-hmac": true, "ethers>@ethersproject/sha2>hash.js": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, "crypto-browserify>randombytes": true, "koa>content-disposition>safe-buffer": true, "ganache>secp256k1": true } }, - "ethereumjs-util": { - "packages": { - "browserify>assert": true, - "bn.js": true, - "browserify>buffer": true, - "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, - "browserify>insert-module-globals>is-buffer": true, - "ethereumjs-util>rlp": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": { "packages": { "browserify>assert": true, "bn.js": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, - "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, + "crypto-browserify>create-hash": true, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": true } @@ -3674,7 +3662,7 @@ "@metamask/keyring-controller>ethereumjs-wallet": { "packages": { "eth-lattice-keyring>gridplus-sdk>aes-js": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "crypto-browserify": true, "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, @@ -3762,7 +3750,7 @@ }, "crypto-browserify>browserify-cipher>evp_bytestokey": { "packages": { - "ethereumjs-util>create-hash>md5.js": true, + "crypto-browserify>create-hash>md5.js": true, "koa>content-disposition>safe-buffer": true } }, @@ -3872,7 +3860,7 @@ "eth-lattice-keyring>gridplus-sdk>bitwise": true, "bn.js": true, "eth-lattice-keyring>gridplus-sdk>borc": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "eth-lattice-keyring>gridplus-sdk>elliptic": true, @@ -3895,7 +3883,7 @@ "string.prototype.matchall>has-symbols": true } }, - "ethereumjs-util>create-hash>md5.js>hash-base": { + "crypto-browserify>pbkdf2>ripemd160>hash-base": { "packages": { "pumpify>inherits": true, "readable-stream": true, @@ -3916,9 +3904,9 @@ "@metamask/eth-trezor-keyring>hdkey": { "packages": { "browserify>assert": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "crypto-browserify": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "ganache>secp256k1": true } @@ -4166,7 +4154,7 @@ "react-router-dom>tiny-warning": true } }, - "ethereumjs-util>ethereum-cryptography>keccak": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography>keccak": { "packages": { "browserify>buffer": true, "readable-stream": true @@ -4261,9 +4249,9 @@ "define": true } }, - "ethereumjs-util>create-hash>md5.js": { + "crypto-browserify>create-hash>md5.js": { "packages": { - "ethereumjs-util>create-hash>md5.js>hash-base": true, + "crypto-browserify>pbkdf2>ripemd160>hash-base": true, "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true } @@ -4294,7 +4282,7 @@ "react-markdown>unist-util-visit": true } }, - "@ethereumjs/tx>@ethereumjs/util>micro-ftch": { + "@ethereumjs/util>micro-ftch": { "globals": { "Headers": true, "TextDecoder": true, @@ -4478,7 +4466,7 @@ "crypto-browserify>public-encrypt>parse-asn1": { "packages": { "crypto-browserify>public-encrypt>parse-asn1>asn1.js": true, - "ethereumjs-util>ethereum-cryptography>browserify-aes": true, + "crypto-browserify>browserify-cipher>browserify-aes": true, "browserify>buffer": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true, "crypto-browserify>pbkdf2": true @@ -4508,9 +4496,9 @@ "setTimeout": true }, "packages": { - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "process": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "addons-linter>sha.js": true } @@ -4598,7 +4586,7 @@ "bn.js": true, "crypto-browserify>public-encrypt>browserify-rsa": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>public-encrypt>parse-asn1": true, "crypto-browserify>randombytes": true } @@ -5097,10 +5085,10 @@ "browserify>buffer": true } }, - "ethereumjs-util>create-hash>ripemd160": { + "crypto-browserify>pbkdf2>ripemd160": { "packages": { "browserify>buffer": true, - "ethereumjs-util>create-hash>md5.js>hash-base": true, + "crypto-browserify>pbkdf2>ripemd160>hash-base": true, "pumpify>inherits": true } }, @@ -5115,12 +5103,6 @@ "TextEncoder": true } }, - "ethereumjs-util>rlp": { - "packages": { - "bn.js": true, - "browserify>buffer": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": { "packages": { "bn.js": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index e55d57f5ec0f..be7ecd9552b1 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -40,7 +40,7 @@ }, "@ethereumjs/tx>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -54,7 +54,7 @@ }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -62,7 +62,7 @@ }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -87,9 +87,9 @@ "packages": { "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true } }, @@ -98,7 +98,7 @@ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": true, "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true, "@metamask/smart-transactions-controller>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true + "ethereum-cryptography": true } }, "eth-lattice-keyring>@ethereumjs/tx": { @@ -106,7 +106,7 @@ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/providers": true, "browserify>buffer": true, "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": true, @@ -118,24 +118,24 @@ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/providers": true, "browserify>buffer": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true } }, - "@ethereumjs/tx>@ethereumjs/util": { + "@ethereumjs/util": { "globals": { "console.warn": true }, "packages": { "@ethereumjs/tx>@ethereumjs/rlp": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack>events": true, "browserify>insert-module-globals>is-buffer": true, - "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true + "@ethereumjs/util>micro-ftch": true } }, "@metamask/smart-transactions-controller>@ethereumjs/util": { @@ -145,7 +145,7 @@ }, "packages": { "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack>events": true } }, @@ -608,7 +608,7 @@ "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring": { "packages": { "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@keystonehq/bc-ur-registry-eth": true, "browserify>buffer": true, "@metamask/eth-trezor-keyring>hdkey": true, @@ -618,7 +618,7 @@ }, "@keystonehq/bc-ur-registry-eth": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@keystonehq/bc-ur-registry-eth>@keystonehq/bc-ur-registry": true, "browserify>buffer": true, "@metamask/eth-trezor-keyring>hdkey": true, @@ -631,7 +631,7 @@ }, "packages": { "@ngraveio/bc-ur": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "buffer": true, "browserify>buffer": true, "@swc/helpers>tslib": true @@ -829,13 +829,13 @@ }, "@metamask/accounts-controller": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/base-controller": true, "@metamask/eth-snap-keyring": true, "@metamask/keyring-api": true, "@metamask/keyring-controller": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "uuid": true } }, @@ -874,7 +874,7 @@ "setTimeout": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "ethers>@ethersproject/address": true, "@ethersproject/bignumber": true, "@ethersproject/contracts": true, @@ -958,7 +958,7 @@ "setTimeout": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/ethjs>@metamask/ethjs-unit": true, "@metamask/utils": true, "@metamask/controller-utils>@spruceid/siwe-parser": true, @@ -1007,12 +1007,12 @@ "TextEncoder": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-sig-util": true, "@metamask/scure-bip39": true, "@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true + "ethereum-cryptography": true } }, "@metamask/eth-json-rpc-filters": { @@ -1074,7 +1074,7 @@ "packages": { "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true, "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth": true, "@metamask/eth-sig-util": true, "browserify>buffer": true, @@ -1090,66 +1090,66 @@ }, "@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/abi-utils": true, "@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/eth-json-rpc-middleware>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/keyring-controller>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/keyring-controller>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/keyring-controller>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/signature-controller>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/signature-controller>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/keyring-controller>@metamask/eth-simple-keyring": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-sig-util": true, "@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "crypto-browserify>randombytes": true } }, @@ -1190,7 +1190,7 @@ }, "packages": { "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": true, "@trezor/connect-web": true, "browserify>buffer": true, @@ -1328,7 +1328,7 @@ "packages": { "@metamask/scure-bip39": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/curves": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true } @@ -1343,7 +1343,7 @@ }, "@metamask/keyring-controller": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/base-controller": true, "@metamask/browser-passworder": true, "@metamask/keyring-controller>@metamask/eth-hd-keyring": true, @@ -1521,7 +1521,7 @@ "@metamask/base-controller": true, "@metamask/controller-utils": true, "@noble/hashes": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack-cli>fastest-levenshtein": true, "punycode": true } @@ -1752,7 +1752,7 @@ "packages": { "@metamask/utils>@metamask/superstruct": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/curves": true, "@noble/hashes": true } }, @@ -1823,7 +1823,7 @@ "packages": { "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/abi": true, "@ethersproject/contracts": true, "@ethersproject/providers": true, @@ -2290,12 +2290,12 @@ "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": { + "ethereum-cryptography>@noble/curves": { "globals": { "TextEncoder": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true + "ethereum-cryptography>@noble/curves>@noble/hashes": true } }, "@noble/hashes": { @@ -2310,19 +2310,19 @@ "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": { + "ethereum-cryptography>@noble/curves>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": { + "ethereum-cryptography>@scure/bip32>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": { + "ethereum-cryptography>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true @@ -2403,10 +2403,10 @@ "TextEncoder": true } }, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": { + "ethereum-cryptography>@scure/bip32": { "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true, + "ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@scure/bip32>@noble/hashes": true, "@metamask/utils>@scure/base": true } }, @@ -3086,11 +3086,11 @@ "browserify>browser-resolve": true } }, - "ethereumjs-util>ethereum-cryptography>browserify-aes": { + "crypto-browserify>browserify-cipher>browserify-aes": { "packages": { - "ethereumjs-util>ethereum-cryptography>browserify-aes>buffer-xor": true, + "crypto-browserify>browserify-cipher>browserify-aes>buffer-xor": true, "browserify>buffer": true, - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true, "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true @@ -3098,7 +3098,7 @@ }, "crypto-browserify>browserify-cipher": { "packages": { - "ethereumjs-util>ethereum-cryptography>browserify-aes": true, + "crypto-browserify>browserify-cipher>browserify-aes": true, "crypto-browserify>browserify-cipher>browserify-des": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true } @@ -3106,7 +3106,7 @@ "crypto-browserify>browserify-cipher>browserify-des": { "packages": { "browserify>buffer": true, - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "crypto-browserify>browserify-cipher>browserify-des>des.js": true, "pumpify>inherits": true } @@ -3123,7 +3123,7 @@ "bn.js": true, "crypto-browserify>public-encrypt>browserify-rsa": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>create-hmac": true, "@metamask/ppom-validator>elliptic": true, "pumpify>inherits": true, @@ -3141,15 +3141,15 @@ "browserify>util": true } }, - "ethereumjs-util>ethereum-cryptography>bs58check>bs58": { + "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": { "packages": { "@ensdomains/content-hash>multihashes>multibase>base-x": true } }, - "ethereumjs-util>ethereum-cryptography>bs58check": { + "eth-lattice-keyring>gridplus-sdk>bs58check": { "packages": { - "ethereumjs-util>ethereum-cryptography>bs58check>bs58": true, - "ethereumjs-util>create-hash": true, + "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": true, + "crypto-browserify>create-hash": true, "koa>content-disposition>safe-buffer": true } }, @@ -3167,7 +3167,7 @@ "browserify>buffer": true } }, - "ethereumjs-util>ethereum-cryptography>browserify-aes>buffer-xor": { + "crypto-browserify>browserify-cipher>browserify-aes>buffer-xor": { "packages": { "browserify>buffer": true } @@ -3239,7 +3239,7 @@ "@ensdomains/content-hash>cids>uint8arrays": true } }, - "ethereumjs-util>create-hash>cipher-base": { + "crypto-browserify>create-hash>cipher-base": { "packages": { "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true, @@ -3338,21 +3338,21 @@ "@metamask/ppom-validator>elliptic": true } }, - "ethereumjs-util>create-hash": { + "crypto-browserify>create-hash": { "packages": { - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "pumpify>inherits": true, - "ethereumjs-util>create-hash>md5.js": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>create-hash>md5.js": true, + "crypto-browserify>pbkdf2>ripemd160": true, "addons-linter>sha.js": true } }, "crypto-browserify>create-hmac": { "packages": { - "ethereumjs-util>create-hash>cipher-base": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash>cipher-base": true, + "crypto-browserify>create-hash": true, "pumpify>inherits": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "addons-linter>sha.js": true } @@ -3368,7 +3368,7 @@ "crypto-browserify>browserify-cipher": true, "crypto-browserify>browserify-sign": true, "crypto-browserify>create-ecdh": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>create-hmac": true, "crypto-browserify>diffie-hellman": true, "crypto-browserify>pbkdf2": true, @@ -3584,7 +3584,7 @@ }, "packages": { "eth-lattice-keyring>@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "bn.js": true, "browserify>buffer": true, "crypto-browserify": true, @@ -3599,15 +3599,15 @@ "@metamask/ethjs-query": true } }, - "@ethereumjs/tx>ethereum-cryptography": { + "ethereum-cryptography": { "globals": { "TextDecoder": true, "crypto": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true + "ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/hashes": true, + "ethereum-cryptography>@scure/bip32": true } }, "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": { @@ -3628,10 +3628,10 @@ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true } }, - "ethereumjs-util>ethereum-cryptography": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>ethereum-cryptography": { "packages": { "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, + "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography>keccak": true, "crypto-browserify>randombytes": true, "ganache>secp256k1": true } @@ -3639,34 +3639,22 @@ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": { "packages": { "browserify>assert": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "crypto-browserify>create-hmac": true, "ethers>@ethersproject/sha2>hash.js": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, "crypto-browserify>randombytes": true, "koa>content-disposition>safe-buffer": true, "ganache>secp256k1": true } }, - "ethereumjs-util": { - "packages": { - "browserify>assert": true, - "bn.js": true, - "browserify>buffer": true, - "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, - "browserify>insert-module-globals>is-buffer": true, - "ethereumjs-util>rlp": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": { "packages": { "browserify>assert": true, "bn.js": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, - "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, + "crypto-browserify>create-hash": true, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": true } @@ -3674,7 +3662,7 @@ "@metamask/keyring-controller>ethereumjs-wallet": { "packages": { "eth-lattice-keyring>gridplus-sdk>aes-js": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "crypto-browserify": true, "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, @@ -3762,7 +3750,7 @@ }, "crypto-browserify>browserify-cipher>evp_bytestokey": { "packages": { - "ethereumjs-util>create-hash>md5.js": true, + "crypto-browserify>create-hash>md5.js": true, "koa>content-disposition>safe-buffer": true } }, @@ -3872,7 +3860,7 @@ "eth-lattice-keyring>gridplus-sdk>bitwise": true, "bn.js": true, "eth-lattice-keyring>gridplus-sdk>borc": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "eth-lattice-keyring>gridplus-sdk>elliptic": true, @@ -3895,7 +3883,7 @@ "string.prototype.matchall>has-symbols": true } }, - "ethereumjs-util>create-hash>md5.js>hash-base": { + "crypto-browserify>pbkdf2>ripemd160>hash-base": { "packages": { "pumpify>inherits": true, "readable-stream": true, @@ -3916,9 +3904,9 @@ "@metamask/eth-trezor-keyring>hdkey": { "packages": { "browserify>assert": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "crypto-browserify": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "ganache>secp256k1": true } @@ -4166,7 +4154,7 @@ "react-router-dom>tiny-warning": true } }, - "ethereumjs-util>ethereum-cryptography>keccak": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography>keccak": { "packages": { "browserify>buffer": true, "readable-stream": true @@ -4261,9 +4249,9 @@ "define": true } }, - "ethereumjs-util>create-hash>md5.js": { + "crypto-browserify>create-hash>md5.js": { "packages": { - "ethereumjs-util>create-hash>md5.js>hash-base": true, + "crypto-browserify>pbkdf2>ripemd160>hash-base": true, "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true } @@ -4294,7 +4282,7 @@ "react-markdown>unist-util-visit": true } }, - "@ethereumjs/tx>@ethereumjs/util>micro-ftch": { + "@ethereumjs/util>micro-ftch": { "globals": { "Headers": true, "TextDecoder": true, @@ -4478,7 +4466,7 @@ "crypto-browserify>public-encrypt>parse-asn1": { "packages": { "crypto-browserify>public-encrypt>parse-asn1>asn1.js": true, - "ethereumjs-util>ethereum-cryptography>browserify-aes": true, + "crypto-browserify>browserify-cipher>browserify-aes": true, "browserify>buffer": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true, "crypto-browserify>pbkdf2": true @@ -4508,9 +4496,9 @@ "setTimeout": true }, "packages": { - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "process": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "addons-linter>sha.js": true } @@ -4598,7 +4586,7 @@ "bn.js": true, "crypto-browserify>public-encrypt>browserify-rsa": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>public-encrypt>parse-asn1": true, "crypto-browserify>randombytes": true } @@ -5097,10 +5085,10 @@ "browserify>buffer": true } }, - "ethereumjs-util>create-hash>ripemd160": { + "crypto-browserify>pbkdf2>ripemd160": { "packages": { "browserify>buffer": true, - "ethereumjs-util>create-hash>md5.js>hash-base": true, + "crypto-browserify>pbkdf2>ripemd160>hash-base": true, "pumpify>inherits": true } }, @@ -5115,12 +5103,6 @@ "TextEncoder": true } }, - "ethereumjs-util>rlp": { - "packages": { - "bn.js": true, - "browserify>buffer": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": { "packages": { "bn.js": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index e55d57f5ec0f..be7ecd9552b1 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -40,7 +40,7 @@ }, "@ethereumjs/tx>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -54,7 +54,7 @@ }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -62,7 +62,7 @@ }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -87,9 +87,9 @@ "packages": { "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true } }, @@ -98,7 +98,7 @@ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": true, "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true, "@metamask/smart-transactions-controller>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true + "ethereum-cryptography": true } }, "eth-lattice-keyring>@ethereumjs/tx": { @@ -106,7 +106,7 @@ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/providers": true, "browserify>buffer": true, "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": true, @@ -118,24 +118,24 @@ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/providers": true, "browserify>buffer": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true } }, - "@ethereumjs/tx>@ethereumjs/util": { + "@ethereumjs/util": { "globals": { "console.warn": true }, "packages": { "@ethereumjs/tx>@ethereumjs/rlp": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack>events": true, "browserify>insert-module-globals>is-buffer": true, - "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true + "@ethereumjs/util>micro-ftch": true } }, "@metamask/smart-transactions-controller>@ethereumjs/util": { @@ -145,7 +145,7 @@ }, "packages": { "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack>events": true } }, @@ -608,7 +608,7 @@ "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring": { "packages": { "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@keystonehq/bc-ur-registry-eth": true, "browserify>buffer": true, "@metamask/eth-trezor-keyring>hdkey": true, @@ -618,7 +618,7 @@ }, "@keystonehq/bc-ur-registry-eth": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@keystonehq/bc-ur-registry-eth>@keystonehq/bc-ur-registry": true, "browserify>buffer": true, "@metamask/eth-trezor-keyring>hdkey": true, @@ -631,7 +631,7 @@ }, "packages": { "@ngraveio/bc-ur": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "buffer": true, "browserify>buffer": true, "@swc/helpers>tslib": true @@ -829,13 +829,13 @@ }, "@metamask/accounts-controller": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/base-controller": true, "@metamask/eth-snap-keyring": true, "@metamask/keyring-api": true, "@metamask/keyring-controller": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "uuid": true } }, @@ -874,7 +874,7 @@ "setTimeout": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "ethers>@ethersproject/address": true, "@ethersproject/bignumber": true, "@ethersproject/contracts": true, @@ -958,7 +958,7 @@ "setTimeout": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/ethjs>@metamask/ethjs-unit": true, "@metamask/utils": true, "@metamask/controller-utils>@spruceid/siwe-parser": true, @@ -1007,12 +1007,12 @@ "TextEncoder": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-sig-util": true, "@metamask/scure-bip39": true, "@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true + "ethereum-cryptography": true } }, "@metamask/eth-json-rpc-filters": { @@ -1074,7 +1074,7 @@ "packages": { "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true, "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth": true, "@metamask/eth-sig-util": true, "browserify>buffer": true, @@ -1090,66 +1090,66 @@ }, "@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/abi-utils": true, "@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/eth-json-rpc-middleware>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/keyring-controller>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/keyring-controller>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/keyring-controller>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/signature-controller>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/signature-controller>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/keyring-controller>@metamask/eth-simple-keyring": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-sig-util": true, "@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "crypto-browserify>randombytes": true } }, @@ -1190,7 +1190,7 @@ }, "packages": { "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": true, "@trezor/connect-web": true, "browserify>buffer": true, @@ -1328,7 +1328,7 @@ "packages": { "@metamask/scure-bip39": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/curves": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true } @@ -1343,7 +1343,7 @@ }, "@metamask/keyring-controller": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/base-controller": true, "@metamask/browser-passworder": true, "@metamask/keyring-controller>@metamask/eth-hd-keyring": true, @@ -1521,7 +1521,7 @@ "@metamask/base-controller": true, "@metamask/controller-utils": true, "@noble/hashes": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack-cli>fastest-levenshtein": true, "punycode": true } @@ -1752,7 +1752,7 @@ "packages": { "@metamask/utils>@metamask/superstruct": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/curves": true, "@noble/hashes": true } }, @@ -1823,7 +1823,7 @@ "packages": { "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/abi": true, "@ethersproject/contracts": true, "@ethersproject/providers": true, @@ -2290,12 +2290,12 @@ "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": { + "ethereum-cryptography>@noble/curves": { "globals": { "TextEncoder": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true + "ethereum-cryptography>@noble/curves>@noble/hashes": true } }, "@noble/hashes": { @@ -2310,19 +2310,19 @@ "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": { + "ethereum-cryptography>@noble/curves>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": { + "ethereum-cryptography>@scure/bip32>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": { + "ethereum-cryptography>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true @@ -2403,10 +2403,10 @@ "TextEncoder": true } }, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": { + "ethereum-cryptography>@scure/bip32": { "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true, + "ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@scure/bip32>@noble/hashes": true, "@metamask/utils>@scure/base": true } }, @@ -3086,11 +3086,11 @@ "browserify>browser-resolve": true } }, - "ethereumjs-util>ethereum-cryptography>browserify-aes": { + "crypto-browserify>browserify-cipher>browserify-aes": { "packages": { - "ethereumjs-util>ethereum-cryptography>browserify-aes>buffer-xor": true, + "crypto-browserify>browserify-cipher>browserify-aes>buffer-xor": true, "browserify>buffer": true, - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true, "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true @@ -3098,7 +3098,7 @@ }, "crypto-browserify>browserify-cipher": { "packages": { - "ethereumjs-util>ethereum-cryptography>browserify-aes": true, + "crypto-browserify>browserify-cipher>browserify-aes": true, "crypto-browserify>browserify-cipher>browserify-des": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true } @@ -3106,7 +3106,7 @@ "crypto-browserify>browserify-cipher>browserify-des": { "packages": { "browserify>buffer": true, - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "crypto-browserify>browserify-cipher>browserify-des>des.js": true, "pumpify>inherits": true } @@ -3123,7 +3123,7 @@ "bn.js": true, "crypto-browserify>public-encrypt>browserify-rsa": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>create-hmac": true, "@metamask/ppom-validator>elliptic": true, "pumpify>inherits": true, @@ -3141,15 +3141,15 @@ "browserify>util": true } }, - "ethereumjs-util>ethereum-cryptography>bs58check>bs58": { + "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": { "packages": { "@ensdomains/content-hash>multihashes>multibase>base-x": true } }, - "ethereumjs-util>ethereum-cryptography>bs58check": { + "eth-lattice-keyring>gridplus-sdk>bs58check": { "packages": { - "ethereumjs-util>ethereum-cryptography>bs58check>bs58": true, - "ethereumjs-util>create-hash": true, + "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": true, + "crypto-browserify>create-hash": true, "koa>content-disposition>safe-buffer": true } }, @@ -3167,7 +3167,7 @@ "browserify>buffer": true } }, - "ethereumjs-util>ethereum-cryptography>browserify-aes>buffer-xor": { + "crypto-browserify>browserify-cipher>browserify-aes>buffer-xor": { "packages": { "browserify>buffer": true } @@ -3239,7 +3239,7 @@ "@ensdomains/content-hash>cids>uint8arrays": true } }, - "ethereumjs-util>create-hash>cipher-base": { + "crypto-browserify>create-hash>cipher-base": { "packages": { "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true, @@ -3338,21 +3338,21 @@ "@metamask/ppom-validator>elliptic": true } }, - "ethereumjs-util>create-hash": { + "crypto-browserify>create-hash": { "packages": { - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "pumpify>inherits": true, - "ethereumjs-util>create-hash>md5.js": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>create-hash>md5.js": true, + "crypto-browserify>pbkdf2>ripemd160": true, "addons-linter>sha.js": true } }, "crypto-browserify>create-hmac": { "packages": { - "ethereumjs-util>create-hash>cipher-base": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash>cipher-base": true, + "crypto-browserify>create-hash": true, "pumpify>inherits": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "addons-linter>sha.js": true } @@ -3368,7 +3368,7 @@ "crypto-browserify>browserify-cipher": true, "crypto-browserify>browserify-sign": true, "crypto-browserify>create-ecdh": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>create-hmac": true, "crypto-browserify>diffie-hellman": true, "crypto-browserify>pbkdf2": true, @@ -3584,7 +3584,7 @@ }, "packages": { "eth-lattice-keyring>@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "bn.js": true, "browserify>buffer": true, "crypto-browserify": true, @@ -3599,15 +3599,15 @@ "@metamask/ethjs-query": true } }, - "@ethereumjs/tx>ethereum-cryptography": { + "ethereum-cryptography": { "globals": { "TextDecoder": true, "crypto": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true + "ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/hashes": true, + "ethereum-cryptography>@scure/bip32": true } }, "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": { @@ -3628,10 +3628,10 @@ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true } }, - "ethereumjs-util>ethereum-cryptography": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>ethereum-cryptography": { "packages": { "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, + "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography>keccak": true, "crypto-browserify>randombytes": true, "ganache>secp256k1": true } @@ -3639,34 +3639,22 @@ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": { "packages": { "browserify>assert": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "crypto-browserify>create-hmac": true, "ethers>@ethersproject/sha2>hash.js": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, "crypto-browserify>randombytes": true, "koa>content-disposition>safe-buffer": true, "ganache>secp256k1": true } }, - "ethereumjs-util": { - "packages": { - "browserify>assert": true, - "bn.js": true, - "browserify>buffer": true, - "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, - "browserify>insert-module-globals>is-buffer": true, - "ethereumjs-util>rlp": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": { "packages": { "browserify>assert": true, "bn.js": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, - "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, + "crypto-browserify>create-hash": true, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": true } @@ -3674,7 +3662,7 @@ "@metamask/keyring-controller>ethereumjs-wallet": { "packages": { "eth-lattice-keyring>gridplus-sdk>aes-js": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "crypto-browserify": true, "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, @@ -3762,7 +3750,7 @@ }, "crypto-browserify>browserify-cipher>evp_bytestokey": { "packages": { - "ethereumjs-util>create-hash>md5.js": true, + "crypto-browserify>create-hash>md5.js": true, "koa>content-disposition>safe-buffer": true } }, @@ -3872,7 +3860,7 @@ "eth-lattice-keyring>gridplus-sdk>bitwise": true, "bn.js": true, "eth-lattice-keyring>gridplus-sdk>borc": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "eth-lattice-keyring>gridplus-sdk>elliptic": true, @@ -3895,7 +3883,7 @@ "string.prototype.matchall>has-symbols": true } }, - "ethereumjs-util>create-hash>md5.js>hash-base": { + "crypto-browserify>pbkdf2>ripemd160>hash-base": { "packages": { "pumpify>inherits": true, "readable-stream": true, @@ -3916,9 +3904,9 @@ "@metamask/eth-trezor-keyring>hdkey": { "packages": { "browserify>assert": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "crypto-browserify": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "ganache>secp256k1": true } @@ -4166,7 +4154,7 @@ "react-router-dom>tiny-warning": true } }, - "ethereumjs-util>ethereum-cryptography>keccak": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography>keccak": { "packages": { "browserify>buffer": true, "readable-stream": true @@ -4261,9 +4249,9 @@ "define": true } }, - "ethereumjs-util>create-hash>md5.js": { + "crypto-browserify>create-hash>md5.js": { "packages": { - "ethereumjs-util>create-hash>md5.js>hash-base": true, + "crypto-browserify>pbkdf2>ripemd160>hash-base": true, "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true } @@ -4294,7 +4282,7 @@ "react-markdown>unist-util-visit": true } }, - "@ethereumjs/tx>@ethereumjs/util>micro-ftch": { + "@ethereumjs/util>micro-ftch": { "globals": { "Headers": true, "TextDecoder": true, @@ -4478,7 +4466,7 @@ "crypto-browserify>public-encrypt>parse-asn1": { "packages": { "crypto-browserify>public-encrypt>parse-asn1>asn1.js": true, - "ethereumjs-util>ethereum-cryptography>browserify-aes": true, + "crypto-browserify>browserify-cipher>browserify-aes": true, "browserify>buffer": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true, "crypto-browserify>pbkdf2": true @@ -4508,9 +4496,9 @@ "setTimeout": true }, "packages": { - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "process": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "addons-linter>sha.js": true } @@ -4598,7 +4586,7 @@ "bn.js": true, "crypto-browserify>public-encrypt>browserify-rsa": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>public-encrypt>parse-asn1": true, "crypto-browserify>randombytes": true } @@ -5097,10 +5085,10 @@ "browserify>buffer": true } }, - "ethereumjs-util>create-hash>ripemd160": { + "crypto-browserify>pbkdf2>ripemd160": { "packages": { "browserify>buffer": true, - "ethereumjs-util>create-hash>md5.js>hash-base": true, + "crypto-browserify>pbkdf2>ripemd160>hash-base": true, "pumpify>inherits": true } }, @@ -5115,12 +5103,6 @@ "TextEncoder": true } }, - "ethereumjs-util>rlp": { - "packages": { - "bn.js": true, - "browserify>buffer": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": { "packages": { "bn.js": true, diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index 5658498ad3a7..b3e589f20285 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -40,7 +40,7 @@ }, "@ethereumjs/tx>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -54,7 +54,7 @@ }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -62,7 +62,7 @@ }, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/common": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "webpack>events": true @@ -87,9 +87,9 @@ "packages": { "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true } }, @@ -98,7 +98,7 @@ "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/common": true, "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true, "@metamask/smart-transactions-controller>@ethereumjs/util": true, - "@ethereumjs/tx>ethereum-cryptography": true + "ethereum-cryptography": true } }, "eth-lattice-keyring>@ethereumjs/tx": { @@ -106,7 +106,7 @@ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/providers": true, "browserify>buffer": true, "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": true, @@ -118,24 +118,24 @@ "eth-lattice-keyring>@ethereumjs/tx>@chainsafe/ssz": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/providers": true, "browserify>buffer": true, "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true } }, - "@ethereumjs/tx>@ethereumjs/util": { + "@ethereumjs/util": { "globals": { "console.warn": true }, "packages": { "@ethereumjs/tx>@ethereumjs/rlp": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack>events": true, "browserify>insert-module-globals>is-buffer": true, - "@ethereumjs/tx>@ethereumjs/util>micro-ftch": true + "@ethereumjs/util>micro-ftch": true } }, "@metamask/smart-transactions-controller>@ethereumjs/util": { @@ -145,7 +145,7 @@ }, "packages": { "@metamask/smart-transactions-controller>@ethereumjs/tx>@ethereumjs/rlp": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack>events": true } }, @@ -608,7 +608,7 @@ "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring": { "packages": { "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@keystonehq/bc-ur-registry-eth": true, "browserify>buffer": true, "@metamask/eth-trezor-keyring>hdkey": true, @@ -618,7 +618,7 @@ }, "@keystonehq/bc-ur-registry-eth": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@keystonehq/bc-ur-registry-eth>@keystonehq/bc-ur-registry": true, "browserify>buffer": true, "@metamask/eth-trezor-keyring>hdkey": true, @@ -631,7 +631,7 @@ }, "packages": { "@ngraveio/bc-ur": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "buffer": true, "browserify>buffer": true, "@swc/helpers>tslib": true @@ -805,7 +805,7 @@ }, "@metamask-institutional/custody-controller": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask-institutional/custody-keyring": true, "@metamask/obs-store": true } @@ -817,7 +817,7 @@ "console.warn": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask-institutional/custody-keyring>@metamask-institutional/configuration-client": true, "@metamask-institutional/sdk": true, "@metamask-institutional/types": true, @@ -871,7 +871,7 @@ "setInterval": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask-institutional/sdk": true, "@metamask-institutional/transaction-update>@metamask-institutional/websocket-client": true, "@metamask/obs-store": true, @@ -921,13 +921,13 @@ }, "@metamask/accounts-controller": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/base-controller": true, "@metamask/eth-snap-keyring": true, "@metamask/keyring-api": true, "@metamask/keyring-controller": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "uuid": true } }, @@ -966,7 +966,7 @@ "setTimeout": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "ethers>@ethersproject/address": true, "@ethersproject/bignumber": true, "@ethersproject/contracts": true, @@ -1050,7 +1050,7 @@ "setTimeout": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/ethjs>@metamask/ethjs-unit": true, "@metamask/utils": true, "@metamask/controller-utils>@spruceid/siwe-parser": true, @@ -1099,12 +1099,12 @@ "TextEncoder": true }, "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-sig-util": true, "@metamask/scure-bip39": true, "@metamask/keyring-controller>@metamask/eth-hd-keyring>@metamask/utils": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true + "ethereum-cryptography": true } }, "@metamask/eth-json-rpc-filters": { @@ -1166,7 +1166,7 @@ "packages": { "@metamask/eth-ledger-bridge-keyring>@ethereumjs/rlp": true, "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth": true, "@metamask/eth-sig-util": true, "browserify>buffer": true, @@ -1182,66 +1182,66 @@ }, "@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/abi-utils": true, "@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-json-rpc-middleware>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/eth-json-rpc-middleware>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/eth-snap-keyring>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/eth-snap-keyring>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/keyring-controller>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/keyring-controller>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/keyring-controller>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/signature-controller>@metamask/eth-sig-util": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/signature-controller>@metamask/eth-sig-util>@metamask/abi-utils": true, "@metamask/signature-controller>@metamask/eth-sig-util>@metamask/utils": true, "@metamask/utils>@scure/base": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "@metamask/eth-sig-util>tweetnacl": true } }, "@metamask/keyring-controller>@metamask/eth-simple-keyring": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-sig-util": true, "@metamask/keyring-controller>@metamask/eth-simple-keyring>@metamask/utils": true, "browserify>buffer": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "crypto-browserify>randombytes": true } }, @@ -1282,7 +1282,7 @@ }, "packages": { "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/eth-trezor-keyring>@trezor/connect-plugin-ethereum": true, "@trezor/connect-web": true, "browserify>buffer": true, @@ -1420,7 +1420,7 @@ "packages": { "@metamask/scure-bip39": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/curves": true, "@noble/hashes": true, "@metamask/utils>@scure/base": true } @@ -1435,7 +1435,7 @@ }, "@metamask/keyring-controller": { "packages": { - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@metamask/base-controller": true, "@metamask/browser-passworder": true, "@metamask/keyring-controller>@metamask/eth-hd-keyring": true, @@ -1613,7 +1613,7 @@ "@metamask/base-controller": true, "@metamask/controller-utils": true, "@noble/hashes": true, - "@ethereumjs/tx>ethereum-cryptography": true, + "ethereum-cryptography": true, "webpack-cli>fastest-levenshtein": true, "punycode": true } @@ -1844,7 +1844,7 @@ "packages": { "@metamask/utils>@metamask/superstruct": true, "@metamask/utils": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/curves": true, "@noble/hashes": true } }, @@ -1915,7 +1915,7 @@ "packages": { "@ethereumjs/tx>@ethereumjs/common": true, "@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "@ethersproject/abi": true, "@ethersproject/contracts": true, "@ethersproject/providers": true, @@ -2382,12 +2382,12 @@ "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": { + "ethereum-cryptography>@noble/curves": { "globals": { "TextEncoder": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": true + "ethereum-cryptography>@noble/curves>@noble/hashes": true } }, "@noble/hashes": { @@ -2402,19 +2402,19 @@ "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/curves>@noble/hashes": { + "ethereum-cryptography>@noble/curves>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": { + "ethereum-cryptography>@scure/bip32>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true } }, - "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": { + "ethereum-cryptography>@noble/hashes": { "globals": { "TextEncoder": true, "crypto": true @@ -2495,10 +2495,10 @@ "TextEncoder": true } }, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": { + "ethereum-cryptography>@scure/bip32": { "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32>@noble/hashes": true, + "ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@scure/bip32>@noble/hashes": true, "@metamask/utils>@scure/base": true } }, @@ -3178,11 +3178,11 @@ "browserify>browser-resolve": true } }, - "ethereumjs-util>ethereum-cryptography>browserify-aes": { + "crypto-browserify>browserify-cipher>browserify-aes": { "packages": { - "ethereumjs-util>ethereum-cryptography>browserify-aes>buffer-xor": true, + "crypto-browserify>browserify-cipher>browserify-aes>buffer-xor": true, "browserify>buffer": true, - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true, "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true @@ -3190,7 +3190,7 @@ }, "crypto-browserify>browserify-cipher": { "packages": { - "ethereumjs-util>ethereum-cryptography>browserify-aes": true, + "crypto-browserify>browserify-cipher>browserify-aes": true, "crypto-browserify>browserify-cipher>browserify-des": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true } @@ -3198,7 +3198,7 @@ "crypto-browserify>browserify-cipher>browserify-des": { "packages": { "browserify>buffer": true, - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "crypto-browserify>browserify-cipher>browserify-des>des.js": true, "pumpify>inherits": true } @@ -3215,7 +3215,7 @@ "bn.js": true, "crypto-browserify>public-encrypt>browserify-rsa": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>create-hmac": true, "@metamask/ppom-validator>elliptic": true, "pumpify>inherits": true, @@ -3233,15 +3233,15 @@ "browserify>util": true } }, - "ethereumjs-util>ethereum-cryptography>bs58check>bs58": { + "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": { "packages": { "@ensdomains/content-hash>multihashes>multibase>base-x": true } }, - "ethereumjs-util>ethereum-cryptography>bs58check": { + "eth-lattice-keyring>gridplus-sdk>bs58check": { "packages": { - "ethereumjs-util>ethereum-cryptography>bs58check>bs58": true, - "ethereumjs-util>create-hash": true, + "eth-lattice-keyring>gridplus-sdk>bs58check>bs58": true, + "crypto-browserify>create-hash": true, "koa>content-disposition>safe-buffer": true } }, @@ -3259,7 +3259,7 @@ "browserify>buffer": true } }, - "ethereumjs-util>ethereum-cryptography>browserify-aes>buffer-xor": { + "crypto-browserify>browserify-cipher>browserify-aes>buffer-xor": { "packages": { "browserify>buffer": true } @@ -3331,7 +3331,7 @@ "@ensdomains/content-hash>cids>uint8arrays": true } }, - "ethereumjs-util>create-hash>cipher-base": { + "crypto-browserify>create-hash>cipher-base": { "packages": { "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true, @@ -3430,21 +3430,21 @@ "@metamask/ppom-validator>elliptic": true } }, - "ethereumjs-util>create-hash": { + "crypto-browserify>create-hash": { "packages": { - "ethereumjs-util>create-hash>cipher-base": true, + "crypto-browserify>create-hash>cipher-base": true, "pumpify>inherits": true, - "ethereumjs-util>create-hash>md5.js": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>create-hash>md5.js": true, + "crypto-browserify>pbkdf2>ripemd160": true, "addons-linter>sha.js": true } }, "crypto-browserify>create-hmac": { "packages": { - "ethereumjs-util>create-hash>cipher-base": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash>cipher-base": true, + "crypto-browserify>create-hash": true, "pumpify>inherits": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "addons-linter>sha.js": true } @@ -3460,7 +3460,7 @@ "crypto-browserify>browserify-cipher": true, "crypto-browserify>browserify-sign": true, "crypto-browserify>create-ecdh": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>create-hmac": true, "crypto-browserify>diffie-hellman": true, "crypto-browserify>pbkdf2": true, @@ -3676,7 +3676,7 @@ }, "packages": { "eth-lattice-keyring>@ethereumjs/tx": true, - "@ethereumjs/tx>@ethereumjs/util": true, + "@ethereumjs/util": true, "bn.js": true, "browserify>buffer": true, "crypto-browserify": true, @@ -3691,15 +3691,15 @@ "@metamask/ethjs-query": true } }, - "@ethereumjs/tx>ethereum-cryptography": { + "ethereum-cryptography": { "globals": { "TextDecoder": true, "crypto": true }, "packages": { - "@ethereumjs/tx>ethereum-cryptography>@noble/curves": true, - "@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true, - "@ethereumjs/tx>ethereum-cryptography>@scure/bip32": true + "ethereum-cryptography>@noble/curves": true, + "ethereum-cryptography>@noble/hashes": true, + "ethereum-cryptography>@scure/bip32": true } }, "eth-lattice-keyring>@ethereumjs/tx>ethereum-cryptography": { @@ -3720,10 +3720,10 @@ "eth-lattice-keyring>gridplus-sdk>@ethereumjs/tx>ethereum-cryptography>@noble/hashes": true } }, - "ethereumjs-util>ethereum-cryptography": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>ethereum-cryptography": { "packages": { "browserify>buffer": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, + "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography>keccak": true, "crypto-browserify>randombytes": true, "ganache>secp256k1": true } @@ -3731,34 +3731,22 @@ "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": { "packages": { "browserify>assert": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "crypto-browserify>create-hmac": true, "ethers>@ethersproject/sha2>hash.js": true, - "ethereumjs-util>ethereum-cryptography>keccak": true, "crypto-browserify>randombytes": true, "koa>content-disposition>safe-buffer": true, "ganache>secp256k1": true } }, - "ethereumjs-util": { - "packages": { - "browserify>assert": true, - "bn.js": true, - "browserify>buffer": true, - "ethereumjs-util>create-hash": true, - "ethereumjs-util>ethereum-cryptography": true, - "browserify>insert-module-globals>is-buffer": true, - "ethereumjs-util>rlp": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util": { "packages": { "browserify>assert": true, "bn.js": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, - "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, + "crypto-browserify>create-hash": true, + "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>ethereum-cryptography": true, "browserify>insert-module-globals>is-buffer": true, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": true } @@ -3766,7 +3754,7 @@ "@metamask/keyring-controller>ethereumjs-wallet": { "packages": { "eth-lattice-keyring>gridplus-sdk>aes-js": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "crypto-browserify": true, "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography": true, @@ -3854,7 +3842,7 @@ }, "crypto-browserify>browserify-cipher>evp_bytestokey": { "packages": { - "ethereumjs-util>create-hash>md5.js": true, + "crypto-browserify>create-hash>md5.js": true, "koa>content-disposition>safe-buffer": true } }, @@ -3964,7 +3952,7 @@ "eth-lattice-keyring>gridplus-sdk>bitwise": true, "bn.js": true, "eth-lattice-keyring>gridplus-sdk>borc": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "browserify>buffer": true, "@ethereumjs/tx>@ethereumjs/common>crc-32": true, "eth-lattice-keyring>gridplus-sdk>elliptic": true, @@ -3987,7 +3975,7 @@ "string.prototype.matchall>has-symbols": true } }, - "ethereumjs-util>create-hash>md5.js>hash-base": { + "crypto-browserify>pbkdf2>ripemd160>hash-base": { "packages": { "pumpify>inherits": true, "readable-stream": true, @@ -4008,9 +3996,9 @@ "@metamask/eth-trezor-keyring>hdkey": { "packages": { "browserify>assert": true, - "ethereumjs-util>ethereum-cryptography>bs58check": true, + "eth-lattice-keyring>gridplus-sdk>bs58check": true, "crypto-browserify": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "ganache>secp256k1": true } @@ -4258,7 +4246,7 @@ "react-router-dom>tiny-warning": true } }, - "ethereumjs-util>ethereum-cryptography>keccak": { + "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography>keccak": { "packages": { "browserify>buffer": true, "readable-stream": true @@ -4353,9 +4341,9 @@ "define": true } }, - "ethereumjs-util>create-hash>md5.js": { + "crypto-browserify>create-hash>md5.js": { "packages": { - "ethereumjs-util>create-hash>md5.js>hash-base": true, + "crypto-browserify>pbkdf2>ripemd160>hash-base": true, "pumpify>inherits": true, "koa>content-disposition>safe-buffer": true } @@ -4386,7 +4374,7 @@ "react-markdown>unist-util-visit": true } }, - "@ethereumjs/tx>@ethereumjs/util>micro-ftch": { + "@ethereumjs/util>micro-ftch": { "globals": { "Headers": true, "TextDecoder": true, @@ -4570,7 +4558,7 @@ "crypto-browserify>public-encrypt>parse-asn1": { "packages": { "crypto-browserify>public-encrypt>parse-asn1>asn1.js": true, - "ethereumjs-util>ethereum-cryptography>browserify-aes": true, + "crypto-browserify>browserify-cipher>browserify-aes": true, "browserify>buffer": true, "crypto-browserify>browserify-cipher>evp_bytestokey": true, "crypto-browserify>pbkdf2": true @@ -4600,9 +4588,9 @@ "setTimeout": true }, "packages": { - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "process": true, - "ethereumjs-util>create-hash>ripemd160": true, + "crypto-browserify>pbkdf2>ripemd160": true, "koa>content-disposition>safe-buffer": true, "addons-linter>sha.js": true } @@ -4690,7 +4678,7 @@ "bn.js": true, "crypto-browserify>public-encrypt>browserify-rsa": true, "browserify>buffer": true, - "ethereumjs-util>create-hash": true, + "crypto-browserify>create-hash": true, "crypto-browserify>public-encrypt>parse-asn1": true, "crypto-browserify>randombytes": true } @@ -5189,10 +5177,10 @@ "browserify>buffer": true } }, - "ethereumjs-util>create-hash>ripemd160": { + "crypto-browserify>pbkdf2>ripemd160": { "packages": { "browserify>buffer": true, - "ethereumjs-util>create-hash>md5.js>hash-base": true, + "crypto-browserify>pbkdf2>ripemd160>hash-base": true, "pumpify>inherits": true } }, @@ -5207,12 +5195,6 @@ "TextEncoder": true } }, - "ethereumjs-util>rlp": { - "packages": { - "bn.js": true, - "browserify>buffer": true - } - }, "@metamask/keyring-controller>ethereumjs-wallet>ethereumjs-util>rlp": { "packages": { "bn.js": true, diff --git a/package.json b/package.json index 8bcb1985e69a..dc42ff075c3d 100644 --- a/package.json +++ b/package.json @@ -175,14 +175,7 @@ "eslint@npm:^8.7.0": "patch:eslint@npm%3A8.57.0#~/.yarn/patches/eslint-npm-8.57.0-4286e12a3a.patch", "eth-query@^2.1.2": "patch:eth-query@npm%3A2.1.2#./.yarn/patches/eth-query-npm-2.1.2-7c6adc825f.patch", "eth-query@^2.1.0": "patch:eth-query@npm%3A2.1.2#./.yarn/patches/eth-query-npm-2.1.2-7c6adc825f.patch", - "ethereumjs-util@^7.0.10": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch", - "ethereumjs-util@^7.1.5": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch", - "ethereumjs-util@^7.1.4": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch", - "ethereumjs-util@^7.0.9": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch", - "ethereumjs-util@^7.1.0": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch", - "ethereumjs-util@^7.0.2": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch", - "ethereumjs-util@^7.0.8": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch", - "ethereumjs-util@^7.0.7": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch", + "ethereumjs-util@^7.1.2": "patch:ethereumjs-util@npm%3A7.1.5#./.yarn/patches/ethereumjs-util-npm-7.1.5-5bb4d00000.patch", "fast-json-patch@^2.2.1": "patch:fast-json-patch@npm%3A2.2.1#./.yarn/patches/fast-json-patch-npm-2.2.1-63b021bb37.patch", "fast-json-patch@^2.0.6": "patch:fast-json-patch@npm%3A2.2.1#./.yarn/patches/fast-json-patch-npm-2.2.1-63b021bb37.patch", "gulp-sourcemaps@^3.0.0": "patch:gulp-sourcemaps@npm%3A3.0.0#./.yarn/patches/gulp-sourcemaps-npm-3.0.0-1ae0fbef6d.patch", @@ -256,6 +249,7 @@ "@blockaid/ppom_release": "^1.5.3", "@ensdomains/content-hash": "^2.5.7", "@ethereumjs/tx": "^4.1.1", + "@ethereumjs/util": "^8.1.0", "@ethersproject/abi": "^5.6.4", "@ethersproject/bignumber": "^5.7.0", "@ethersproject/bytes": "^5.7.0", @@ -383,7 +377,7 @@ "eth-ens-namehash": "^2.0.8", "eth-lattice-keyring": "^0.12.4", "eth-method-registry": "^4.0.0", - "ethereumjs-util": "^7.0.10", + "ethereum-cryptography": "^2.2.1", "extension-port-stream": "^3.0.0", "fast-json-patch": "^3.1.1", "fuse.js": "^3.2.0", @@ -703,7 +697,7 @@ "eth-json-rpc-filters>eth-json-rpc-middleware>ethereumjs-util>keccak": false, "eth-json-rpc-filters>eth-json-rpc-middleware>ethereumjs-util>secp256k1": false, "eth-lattice-keyring>gridplus-sdk": false, - "ethereumjs-util>ethereum-cryptography>keccak": false, + "@ethereumjs/util>ethereum-cryptography>keccak": false, "ganache>@trufflesuite/bigint-buffer": false, "ganache>@trufflesuite/uws-js-unofficial>bufferutil": false, "ganache>@trufflesuite/uws-js-unofficial>utf-8-validate": false, @@ -712,7 +706,6 @@ "ganache>leveldown": false, "ganache>secp256k1": false, "ganache>utf-8-validate": false, - "ethereumjs-util>ethereum-cryptography>secp256k1": false, "gulp-watch>chokidar>fsevents": false, "gulp>glob-watcher>chokidar>fsevents": false, "webpack>watchpack>watchpack-chokidar2>chokidar>fsevents": false, @@ -759,6 +752,7 @@ "core-js-pure": true, "resolve-url-loader>es6-iterator>d>es5-ext": false, "resolve-url-loader>es6-iterator>d>es5-ext>esniff>es5-ext": false, + "@metamask/keyring-controller>ethereumjs-wallet>ethereum-cryptography>keccak": false, "level>classic-level": false, "jest-preview": false, "@metamask/solana-wallet-snap>@solana/web3.js>bigint-buffer": false, diff --git a/shared/constants/gas.ts b/shared/constants/gas.ts index 010ff6ffe66f..2246e71d8e5b 100644 --- a/shared/constants/gas.ts +++ b/shared/constants/gas.ts @@ -1,4 +1,4 @@ -import { addHexPrefix } from 'ethereumjs-util'; +import { addHexPrefix } from '@ethereumjs/util'; const ONE_HUNDRED_THOUSAND = 100000; const MIN_GAS_LIMIT_DEC = '21000'; diff --git a/shared/modules/Numeric.ts b/shared/modules/Numeric.ts index d7a87a0050d4..2750cec6d389 100644 --- a/shared/modules/Numeric.ts +++ b/shared/modules/Numeric.ts @@ -1,7 +1,7 @@ import { BigNumber } from 'bignumber.js'; import BN from 'bn.js'; import { isHexString, isNullOrUndefined } from '@metamask/utils'; -import { addHexPrefix } from 'ethereumjs-util'; +import { addHexPrefix } from '@ethereumjs/util'; import { EtherDenomination } from '../constants/common'; import { stripHexPrefix } from './hexstring-utils'; @@ -11,7 +11,7 @@ export type NumericValue = string | number | BN | BigNumber; export type NumericBase = 10 | 16; /** - * All variations of isHexString from our own utilities and ethereumjs-utils + * All variations of isHexString from our own utilities and @ethereumjs/utils * return false for a '-' prefixed hex string. This utility method strips the * possible '-' from the string before testing its validity so that negative * hex values can be properly handled. diff --git a/shared/modules/bridge-utils/balance.test.ts b/shared/modules/bridge-utils/balance.test.ts index 15cf1f246c8b..451154fe5e70 100644 --- a/shared/modules/bridge-utils/balance.test.ts +++ b/shared/modules/bridge-utils/balance.test.ts @@ -1,5 +1,5 @@ import { BigNumber } from 'ethers'; -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import { createTestProviderTools } from '../../../test/stub/provider'; import { CHAIN_IDS } from '../../constants/network'; import { Numeric } from '../Numeric'; diff --git a/shared/modules/bridge-utils/balance.ts b/shared/modules/bridge-utils/balance.ts index 2ba5834d8df9..bab3199ebff8 100644 --- a/shared/modules/bridge-utils/balance.ts +++ b/shared/modules/bridge-utils/balance.ts @@ -1,6 +1,6 @@ import { Web3Provider } from '@ethersproject/providers'; import { Hex } from '@metamask/utils'; -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import { getAddress } from 'ethers/lib/utils'; import { HttpProvider } from '../../../types/global'; import { fetchTokenBalance } from '../../lib/token-util'; diff --git a/shared/modules/bridge-utils/bridge.util.test.ts b/shared/modules/bridge-utils/bridge.util.test.ts index 555de4fc2516..77a5f04e8367 100644 --- a/shared/modules/bridge-utils/bridge.util.test.ts +++ b/shared/modules/bridge-utils/bridge.util.test.ts @@ -1,4 +1,4 @@ -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import fetchWithCache from '../../lib/fetch-with-cache'; import { CHAIN_IDS } from '../../constants/network'; import mockBridgeQuotesErc20Erc20 from '../../../test/data/bridge/mock-quotes-erc20-erc20.json'; diff --git a/shared/modules/buffer-utils.js b/shared/modules/buffer-utils.js index 0bac94b17d20..c8f4939dfe8e 100644 --- a/shared/modules/buffer-utils.js +++ b/shared/modules/buffer-utils.js @@ -1,12 +1,12 @@ -import { toBuffer as ethUtilToBuffer, isHexString } from 'ethereumjs-util'; +import { toBuffer as ethUtilToBuffer, isHexString } from '@ethereumjs/util'; /** - * Returns a buffer from the provided input, via ethereumjs-util.toBuffer but + * Returns a buffer from the provided input, via @ethereumjs/util.toBuffer but * additionally handling non hex strings. This is a failsafe as in most cases * we should be primarily dealing with hex prefixed strings with this utility * but we do not want to break the extension for users. * - * @param {import('ethereumjs-util').ToBufferInputTypes | string} input + * @param {import('@ethereumjs/util').ToBufferInputTypes | string} input * @returns {Buffer} */ export function toBuffer(input) { diff --git a/shared/modules/conversion.utils.ts b/shared/modules/conversion.utils.ts index ad83e9e8c634..59f1eab21858 100644 --- a/shared/modules/conversion.utils.ts +++ b/shared/modules/conversion.utils.ts @@ -1,7 +1,7 @@ import { Hex } from '@metamask/utils'; import { BigNumber } from 'bignumber.js'; import BN from 'bn.js'; -import { addHexPrefix } from 'ethereumjs-util'; +import { addHexPrefix } from '@ethereumjs/util'; import { EtherDenomination } from '../constants/common'; import { Numeric, NumericValue } from './Numeric'; diff --git a/shared/modules/gas.utils.test.js b/shared/modules/gas.utils.test.js index 240183a70df8..dba902d5fbc4 100644 --- a/shared/modules/gas.utils.test.js +++ b/shared/modules/gas.utils.test.js @@ -1,4 +1,4 @@ -const { addHexPrefix } = require('ethereumjs-util'); +const { addHexPrefix } = require('@ethereumjs/util'); const { getMaximumGasTotalInHexWei, getMinimumGasTotalInHexWei, diff --git a/shared/modules/hexstring-utils.test.js b/shared/modules/hexstring-utils.test.js index 5fe876428bcc..2dc3ea59fe64 100644 --- a/shared/modules/hexstring-utils.test.js +++ b/shared/modules/hexstring-utils.test.js @@ -1,4 +1,4 @@ -import { toChecksumAddress } from 'ethereumjs-util'; +import { toChecksumAddress } from '@ethereumjs/util'; import { isPossibleAddress, isValidHexAddress } from './hexstring-utils'; describe('hexstring utils', function () { diff --git a/shared/modules/hexstring-utils.ts b/shared/modules/hexstring-utils.ts index 84b052716738..45fab73760bb 100644 --- a/shared/modules/hexstring-utils.ts +++ b/shared/modules/hexstring-utils.ts @@ -6,7 +6,7 @@ import { toChecksumAddress, zeroAddress, isHexPrefixed, -} from 'ethereumjs-util'; +} from '@ethereumjs/util'; export const BURN_ADDRESS = zeroAddress(); @@ -26,7 +26,7 @@ export function isEmptyHexString(value: string): boolean { /** * Validates that the input is a hex address. This utility method is a thin - * wrapper around ethereumjs-util.isValidAddress, with the exception that it + * wrapper around @ethereumjs/util.isValidAddress, with the exception that it * does not throw an error when provided values that are not hex strings. In * addition, and by default, this method will return true for hex strings that * meet the length requirement of a hex address, but are not prefixed with `0x` @@ -80,13 +80,13 @@ export function toChecksumHexAddress(address: string) { if (!address) { // our internal checksumAddress function that this method replaces would // return an empty string for nullish input. If any direct usages of - // ethereumjs-util.toChecksumAddress were called with nullish input it + // @ethereumjs/util.toChecksumAddress were called with nullish input it // would have resulted in an error on version 5.1. return ''; } const hexPrefixed = addHexPrefix(address); if (!isHexString(hexPrefixed)) { - // Version 5.1 of ethereumjs-utils would have returned '0xY' for input 'y' + // Version 5.1 of @ethereumjs/utils would have returned '0xY' for input 'y' // but we shouldn't waste effort trying to change case on a clearly invalid // string. Instead just return the hex prefixed original string which most // closely mimics the original behavior. diff --git a/shared/modules/transaction.utils.ts b/shared/modules/transaction.utils.ts index 910fe9b6d4be..38f4a5475830 100644 --- a/shared/modules/transaction.utils.ts +++ b/shared/modules/transaction.utils.ts @@ -1,4 +1,4 @@ -import { isHexString } from 'ethereumjs-util'; +import { isHexString } from '@ethereumjs/util'; import { Interface } from '@ethersproject/abi'; import { abiERC721, diff --git a/test/e2e/json-rpc/eth_call.spec.ts b/test/e2e/json-rpc/eth_call.spec.ts index fedc08ea645b..611eb01d5223 100644 --- a/test/e2e/json-rpc/eth_call.spec.ts +++ b/test/e2e/json-rpc/eth_call.spec.ts @@ -1,5 +1,5 @@ import { strict as assert } from 'assert'; -import { keccak } from 'ethereumjs-util'; +import { keccak256 } from 'ethereum-cryptography/keccak'; import { defaultGanacheOptions, withFixtures } from '../helpers'; import { Driver } from '../webdriver/driver'; import FixtureBuilder from '../fixture-builder'; @@ -35,8 +35,8 @@ describe('eth_call', function () { // eth_call await driver.openNewPage(`http://127.0.0.1:8080`); - const balanceOf = `0x${keccak( - Buffer.from('balanceOf(address)'), + const balanceOf = `0x${Buffer.from( + keccak256(Buffer.from('balanceOf(address)')), ).toString('hex')}`; const walletAddress = '0x5cfe73b6021e818b776b421b1c4db2474086a7e1'; const request = JSON.stringify({ diff --git a/test/e2e/tests/tokens/token-list.spec.ts b/test/e2e/tests/tokens/token-list.spec.ts index f7b032c92a4c..26d98d921c28 100644 --- a/test/e2e/tests/tokens/token-list.spec.ts +++ b/test/e2e/tests/tokens/token-list.spec.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'assert'; import { Mockttp } from 'mockttp'; import { Context } from 'mocha'; -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import { CHAIN_IDS } from '../../../../shared/constants/network'; import { toChecksumHexAddress } from '../../../../shared/modules/hexstring-utils'; import FixtureBuilder from '../../fixture-builder'; diff --git a/test/stub/keyring-bridge.js b/test/stub/keyring-bridge.js index 3d4b4824ed82..f898638b3f60 100644 --- a/test/stub/keyring-bridge.js +++ b/test/stub/keyring-bridge.js @@ -1,6 +1,6 @@ import { Transaction } from '@ethereumjs/tx'; import { signTypedData, SignTypedDataVersion } from '@metamask/eth-sig-util'; -import { bufferToHex } from 'ethereumjs-util'; +import { bufferToHex } from '@ethereumjs/util'; import { addHexPrefix, Common } from './keyring-utils'; // BIP32 Public Key: xpub6ELgkkwgfoky9h9fFu4Auvx6oHvJ6XfwiS1NE616fe9Uf4H3JHtLGjCePVkb6RFcyDCqVvjXhNXbDNDqs6Kjoxw7pTAeP1GSEiLHmA5wYa9 diff --git a/ui/__mocks__/ethereumjs-util.js b/ui/__mocks__/ethereumjs-util.js index d7af4a81162c..a85fbe2f4dda 100644 --- a/ui/__mocks__/ethereumjs-util.js +++ b/ui/__mocks__/ethereumjs-util.js @@ -1,6 +1,33 @@ -// eslint-disable-next-line import/no-extraneous-dependencies, node/no-extraneous-require -const util = require('ethereumjs-util'); +// Vendored from @ethereumjs/util@8.1.0 / ethereumjs-util@7.1.5 + +/** + * Converts a `Buffer` into a `0x`-prefixed hex `String`. + * + * @param buf - `Buffer` object to convert + */ +const bufferToHex = function (buf) { + // buf = toBuffer(buf); + return `0x${buf.toString('hex')}`; +}; + +/** + * Returns a buffer filled with 0s. + * + * @param bytes - the number of bytes the buffer should be + */ +const zeros = function (bytes) { + return Buffer.allocUnsafe(bytes).fill(0); +}; + +/** + * Returns the zero address. + */ +const zeroAddress = function () { + const addressLength = 20; + const addr = zeros(addressLength); + return bufferToHex(addr); +}; module.exports = { - ...util, + zeroAddress, }; diff --git a/ui/components/app/currency-input/hooks/useTokenExchangeRate.tsx b/ui/components/app/currency-input/hooks/useTokenExchangeRate.tsx index d9db9b284f72..dfbfb9e145d9 100644 --- a/ui/components/app/currency-input/hooks/useTokenExchangeRate.tsx +++ b/ui/components/app/currency-input/hooks/useTokenExchangeRate.tsx @@ -1,5 +1,5 @@ import { useMemo, useState } from 'react'; -import { toChecksumAddress } from 'ethereumjs-util'; +import { toChecksumAddress } from '@ethereumjs/util'; import { shallowEqual, useSelector } from 'react-redux'; import { getCurrentChainId } from '../../../../../shared/modules/selectors/networks'; import { getTokenExchangeRates } from '../../../../selectors'; diff --git a/ui/components/app/name/name-details/name-details.tsx b/ui/components/app/name/name-details/name-details.tsx index 1bb2b1f1e478..a9276ccc4f34 100644 --- a/ui/components/app/name/name-details/name-details.tsx +++ b/ui/components/app/name/name-details/name-details.tsx @@ -15,7 +15,7 @@ import { } from '@metamask/name-controller'; import { useDispatch, useSelector } from 'react-redux'; import { isEqual } from 'lodash'; -import { toChecksumAddress } from 'ethereumjs-util'; +import { toChecksumAddress } from '@ethereumjs/util'; import { Box, Button, diff --git a/ui/components/app/name/name.tsx b/ui/components/app/name/name.tsx index 1b5305c2b61f..6f48cbf704f4 100644 --- a/ui/components/app/name/name.tsx +++ b/ui/components/app/name/name.tsx @@ -7,7 +7,7 @@ import React, { } from 'react'; import { NameType } from '@metamask/name-controller'; import classnames from 'classnames'; -import { toChecksumAddress } from 'ethereumjs-util'; +import { toChecksumAddress } from '@ethereumjs/util'; import { Box, Icon, IconName, IconSize, Text } from '../../component-library'; import { shortenAddress, shortenString } from '../../../helpers/utils/util'; import { MetaMetricsContext } from '../../../contexts/metametrics'; diff --git a/ui/components/app/wallet-overview/aggregated-percentage-overview-cross-chains.tsx b/ui/components/app/wallet-overview/aggregated-percentage-overview-cross-chains.tsx index 5a321c35cf0f..779bfab5a6be 100644 --- a/ui/components/app/wallet-overview/aggregated-percentage-overview-cross-chains.tsx +++ b/ui/components/app/wallet-overview/aggregated-percentage-overview-cross-chains.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { toChecksumAddress } from 'ethereumjs-util'; +import { toChecksumAddress } from '@ethereumjs/util'; import { getNativeTokenAddress } from '@metamask/assets-controllers'; import { Hex } from '@metamask/utils'; import { diff --git a/ui/components/app/wallet-overview/aggregated-percentage-overview.tsx b/ui/components/app/wallet-overview/aggregated-percentage-overview.tsx index ad837ccd322c..02399c61bf29 100644 --- a/ui/components/app/wallet-overview/aggregated-percentage-overview.tsx +++ b/ui/components/app/wallet-overview/aggregated-percentage-overview.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; import { useSelector } from 'react-redux'; -import { toChecksumAddress } from 'ethereumjs-util'; +import { toChecksumAddress } from '@ethereumjs/util'; import { getNativeTokenAddress } from '@metamask/assets-controllers'; import { getCurrentCurrency } from '../../../ducks/metamask/metamask'; import { diff --git a/ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal.tsx b/ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal.tsx index d3daf33afc84..9e6b78957ec3 100644 --- a/ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal.tsx +++ b/ui/components/multichain/asset-picker-amount/asset-picker-modal/asset-picker-modal.tsx @@ -2,13 +2,13 @@ import React, { useState, useCallback, useMemo } from 'react'; import { useSelector } from 'react-redux'; import { isEqual, uniqBy } from 'lodash'; +import { zeroAddress } from '@ethereumjs/util'; import { Token, TokenListMap, TokenListToken, } from '@metamask/assets-controllers'; import { Hex } from '@metamask/utils'; -import { zeroAddress } from 'ethereumjs-util'; import { Modal, ModalContent, diff --git a/ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.test.tsx b/ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.test.tsx index 53ff99bd5d06..3194a88acc78 100644 --- a/ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.test.tsx +++ b/ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; import '@testing-library/jest-dom'; -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import { MarketDataDetails } from '@metamask/assets-controllers'; import { getIntlLocale } from '../../../../../ducks/locale/locale'; import { diff --git a/ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.tsx b/ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.tsx index c0c3e83addb7..92a0d6cacc86 100644 --- a/ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.tsx +++ b/ui/components/multichain/token-list-item/price/percentage-and-amount-change/percentage-and-amount-change.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from 'react'; import { useSelector } from 'react-redux'; import { BigNumber } from 'bignumber.js'; -import { isHexString } from 'ethereumjs-util'; +import { isHexString } from '@ethereumjs/util'; import { getNativeTokenAddress } from '@metamask/assets-controllers'; import { Text, Box } from '../../../../component-library'; import { diff --git a/ui/components/ui/qr-code-view/qr-code-view.tsx b/ui/components/ui/qr-code-view/qr-code-view.tsx index 8c70fba7fe67..501fb200e451 100644 --- a/ui/components/ui/qr-code-view/qr-code-view.tsx +++ b/ui/components/ui/qr-code-view/qr-code-view.tsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types'; import React, { useContext } from 'react'; import qrCode from 'qrcode-generator'; import { connect } from 'react-redux'; -import { isHexPrefixed } from 'ethereumjs-util'; +import { isHexPrefixed } from '@ethereumjs/util'; // TODO: Remove restricted import // eslint-disable-next-line import/no-restricted-paths import { normalizeSafeAddress } from '../../../../app/scripts/lib/multichain/address'; diff --git a/ui/ducks/bridge/bridge.test.ts b/ui/ducks/bridge/bridge.test.ts index 30e2f0fe880a..9a0cd4082419 100644 --- a/ui/ducks/bridge/bridge.test.ts +++ b/ui/ducks/bridge/bridge.test.ts @@ -1,6 +1,6 @@ import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import { createBridgeMockStore } from '../../../test/jest/mock-store'; import { CHAIN_IDS } from '../../../shared/constants/network'; import { setBackgroundConnection } from '../../store/background-connection'; diff --git a/ui/ducks/bridge/selectors.test.ts b/ui/ducks/bridge/selectors.test.ts index f44b5d8dacea..cfe137a86eeb 100644 --- a/ui/ducks/bridge/selectors.test.ts +++ b/ui/ducks/bridge/selectors.test.ts @@ -1,5 +1,5 @@ +import { zeroAddress } from '@ethereumjs/util'; import { BigNumber } from 'bignumber.js'; -import { zeroAddress } from 'ethereumjs-util'; import { createBridgeMockStore } from '../../../test/jest/mock-store'; import { BUILT_IN_NETWORKS, diff --git a/ui/ducks/metamask/metamask.js b/ui/ducks/metamask/metamask.js index c9c57057f2f9..e204ff12d20c 100644 --- a/ui/ducks/metamask/metamask.js +++ b/ui/ducks/metamask/metamask.js @@ -1,4 +1,4 @@ -import { addHexPrefix, isHexString } from 'ethereumjs-util'; +import { addHexPrefix, isHexString } from '@ethereumjs/util'; import { createSelector } from 'reselect'; import { mergeGasFeeEstimates } from '@metamask/transaction-controller'; import { AlertTypes } from '../../../shared/constants/alerts'; diff --git a/ui/ducks/send/helpers.js b/ui/ducks/send/helpers.js index 5fcee6f7c88b..5e7d16c3ccf7 100644 --- a/ui/ducks/send/helpers.js +++ b/ui/ducks/send/helpers.js @@ -1,4 +1,4 @@ -import { addHexPrefix, toChecksumAddress } from 'ethereumjs-util'; +import { addHexPrefix, toChecksumAddress } from '@ethereumjs/util'; import abi from 'human-standard-token-abi'; import BigNumber from 'bignumber.js'; import { TransactionEnvelopeType } from '@metamask/transaction-controller'; diff --git a/ui/ducks/send/send.js b/ui/ducks/send/send.js index 36ccf9d260da..4c76d1ca3a3e 100644 --- a/ui/ducks/send/send.js +++ b/ui/ducks/send/send.js @@ -4,7 +4,7 @@ import { createSlice, } from '@reduxjs/toolkit'; import BigNumber from 'bignumber.js'; -import { addHexPrefix, zeroAddress } from 'ethereumjs-util'; +import { addHexPrefix, zeroAddress } from '@ethereumjs/util'; import { cloneDeep, debounce } from 'lodash'; import { v4 as uuidv4 } from 'uuid'; import { providerErrors } from '@metamask/rpc-errors'; diff --git a/ui/helpers/utils/util.test.js b/ui/helpers/utils/util.test.js index bdf5c9dd9b98..90d0eb37cc7a 100644 --- a/ui/helpers/utils/util.test.js +++ b/ui/helpers/utils/util.test.js @@ -1,6 +1,6 @@ import Bowser from 'bowser'; import BN from 'bn.js'; -import { toChecksumAddress } from 'ethereumjs-util'; +import { toChecksumAddress } from '@ethereumjs/util'; import { CHAIN_IDS } from '../../../shared/constants/network'; import { addHexPrefixToObjectValues } from '../../../shared/lib/swaps-utils'; import { toPrecisionWithoutTrailingZeros } from '../../../shared/lib/transactions-controller-utils'; diff --git a/ui/hooks/bridge/useLatestBalance.test.ts b/ui/hooks/bridge/useLatestBalance.test.ts index f255a3a10b9b..80e5e981c1bf 100644 --- a/ui/hooks/bridge/useLatestBalance.test.ts +++ b/ui/hooks/bridge/useLatestBalance.test.ts @@ -1,7 +1,3 @@ -import { BigNumber } from 'bignumber.js'; -import { zeroAddress } from 'ethereumjs-util'; -import { renderHookWithProvider } from '../../../test/lib/render-helpers'; -import { CHAIN_IDS } from '../../../shared/constants/network'; import { createBridgeMockStore } from '../../../test/jest/mock-store'; import { createTestProviderTools } from '../../../test/stub/provider'; import * as tokenutil from '../../../shared/lib/token-util'; diff --git a/ui/hooks/bridge/useTokensWithFiltering.ts b/ui/hooks/bridge/useTokensWithFiltering.ts index 61a92b7b9190..d37a6c4906fc 100644 --- a/ui/hooks/bridge/useTokensWithFiltering.ts +++ b/ui/hooks/bridge/useTokensWithFiltering.ts @@ -4,7 +4,7 @@ import { isEqual } from 'lodash'; import { ChainId } from '@metamask/controller-utils'; import { Hex } from '@metamask/utils'; import { useParams } from 'react-router-dom'; -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import { getAllDetectedTokensForSelectedAddress, getSelectedInternalAccountWithBalance, diff --git a/ui/hooks/useAccountTotalCrossChainFiatBalance.ts b/ui/hooks/useAccountTotalCrossChainFiatBalance.ts index aa82f7823f44..81907032cfdf 100644 --- a/ui/hooks/useAccountTotalCrossChainFiatBalance.ts +++ b/ui/hooks/useAccountTotalCrossChainFiatBalance.ts @@ -1,5 +1,5 @@ import { shallowEqual, useSelector } from 'react-redux'; -import { toChecksumAddress } from 'ethereumjs-util'; +import { toChecksumAddress } from '@ethereumjs/util'; import { getCurrentCurrency, getCurrencyRates, diff --git a/ui/hooks/useAccountTotalFiatBalance.js b/ui/hooks/useAccountTotalFiatBalance.js index 08c2f9eeb5f2..8ba10260c484 100644 --- a/ui/hooks/useAccountTotalFiatBalance.js +++ b/ui/hooks/useAccountTotalFiatBalance.js @@ -1,5 +1,5 @@ import { shallowEqual, useSelector } from 'react-redux'; -import { toChecksumAddress } from 'ethereumjs-util'; +import { toChecksumAddress } from '@ethereumjs/util'; import { getCurrentChainId } from '../../shared/modules/selectors/networks'; import { getAllTokens, diff --git a/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts b/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts index e34c4e9400c6..47dc11f89127 100644 --- a/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts +++ b/ui/pages/bridge/hooks/useSubmitBridgeTransaction.ts @@ -1,5 +1,5 @@ import { useDispatch, useSelector } from 'react-redux'; -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import { useHistory } from 'react-router-dom'; import { TransactionMeta } from '@metamask/transaction-controller'; import { createProjectLogger, Hex } from '@metamask/utils'; diff --git a/ui/pages/bridge/prepare/prepare-bridge-page.test.tsx b/ui/pages/bridge/prepare/prepare-bridge-page.test.tsx index de8fdfc25b36..c45d96f4850b 100644 --- a/ui/pages/bridge/prepare/prepare-bridge-page.test.tsx +++ b/ui/pages/bridge/prepare/prepare-bridge-page.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { act } from '@testing-library/react'; import * as reactRouterUtils from 'react-router-dom-v5-compat'; -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import { fireEvent, renderWithProvider } from '../../../../test/jest'; import configureStore from '../../../store/store'; import { createBridgeMockStore } from '../../../../test/jest/mock-store'; diff --git a/ui/pages/bridge/utils/quote.test.ts b/ui/pages/bridge/utils/quote.test.ts index b932e9bf2c33..9f921db1858c 100644 --- a/ui/pages/bridge/utils/quote.test.ts +++ b/ui/pages/bridge/utils/quote.test.ts @@ -1,5 +1,5 @@ import { BigNumber } from 'bignumber.js'; -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import { calcAdjustedReturn, calcSentAmount, diff --git a/ui/pages/bridge/utils/quote.ts b/ui/pages/bridge/utils/quote.ts index ee78e055698d..152116494b60 100644 --- a/ui/pages/bridge/utils/quote.ts +++ b/ui/pages/bridge/utils/quote.ts @@ -1,4 +1,4 @@ -import { zeroAddress } from 'ethereumjs-util'; +import { zeroAddress } from '@ethereumjs/util'; import { BigNumber } from 'bignumber.js'; import { calcTokenAmount } from '../../../../shared/lib/transactions-controller-utils'; import type { diff --git a/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx b/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx index 2cf6426f1975..50937b2f306a 100644 --- a/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx +++ b/ui/pages/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx @@ -1,5 +1,5 @@ +import { isValidAddress } from '@ethereumjs/util'; import { TransactionMeta } from '@metamask/transaction-controller'; -import { isValidAddress } from 'ethereumjs-util'; import React, { useMemo } from 'react'; import { useSelector } from 'react-redux'; import { diff --git a/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign.tsx b/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign.tsx index d21ed2b1fca9..c871a854781d 100644 --- a/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign.tsx +++ b/ui/pages/confirmations/components/confirm/info/typed-sign/typed-sign.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { isValidAddress } from 'ethereumjs-util'; +import { isValidAddress } from '@ethereumjs/util'; import { ConfirmInfoAlertRow } from '../../../../../../components/app/confirm/info/row/alert-row/alert-row'; import { parseTypedDataMessage } from '../../../../../../../shared/modules/transaction.utils'; diff --git a/ui/pages/confirmations/components/custom-spending-cap/custom-spending-cap.js b/ui/pages/confirmations/components/custom-spending-cap/custom-spending-cap.js index 37002babd7e3..82311a77864d 100644 --- a/ui/pages/confirmations/components/custom-spending-cap/custom-spending-cap.js +++ b/ui/pages/confirmations/components/custom-spending-cap/custom-spending-cap.js @@ -2,7 +2,7 @@ import React, { useState, useContext, useEffect, useRef } from 'react'; import { useDispatch } from 'react-redux'; import PropTypes from 'prop-types'; import BigNumber from 'bignumber.js'; -import { addHexPrefix } from 'ethereumjs-util'; +import { addHexPrefix } from '@ethereumjs/util'; import { I18nContext } from '../../../../contexts/i18n'; import { AlignItems, diff --git a/ui/pages/confirmations/components/transaction-alerts/transaction-alerts.stories.js b/ui/pages/confirmations/components/transaction-alerts/transaction-alerts.stories.js index 99a60a94e25d..7c66511a13ec 100644 --- a/ui/pages/confirmations/components/transaction-alerts/transaction-alerts.stories.js +++ b/ui/pages/confirmations/components/transaction-alerts/transaction-alerts.stories.js @@ -1,6 +1,6 @@ import React from 'react'; import { Provider } from 'react-redux'; -import { keccak } from 'ethereumjs-util'; +import { keccak256 } from 'ethereum-cryptography/keccak'; import { cloneDeep } from 'lodash'; import { GasFeeContextProvider } from '../../../../contexts/gasFee'; import configureStore from '../../../../store/store'; @@ -44,7 +44,9 @@ const customTransaction = ({ }; // just simulate hash if not provided if (!props?.hash) { - tx.hash = `0x${keccak(Buffer.from(JSON.stringify(tx))).toString('hex')}`; + tx.hash = `0x${Buffer.from( + keccak256(Buffer.from(JSON.stringify(tx))), + ).toString('hex')}`; } return tx; }; diff --git a/ui/selectors/institutional/selectors.test.ts b/ui/selectors/institutional/selectors.test.ts index 4c398b6fab0b..947a27af0d93 100644 --- a/ui/selectors/institutional/selectors.test.ts +++ b/ui/selectors/institutional/selectors.test.ts @@ -1,4 +1,4 @@ -import { toChecksumAddress } from 'ethereumjs-util'; +import { toChecksumAddress } from '@ethereumjs/util'; import { EthAccountType } from '@metamask/keyring-api'; import { Hex } from '@metamask/utils'; import { toHex } from '@metamask/controller-utils'; diff --git a/ui/selectors/institutional/selectors.ts b/ui/selectors/institutional/selectors.ts index 6ef1c0bf14ca..0cc587419579 100644 --- a/ui/selectors/institutional/selectors.ts +++ b/ui/selectors/institutional/selectors.ts @@ -1,4 +1,4 @@ -import { toChecksumAddress } from 'ethereumjs-util'; +import { toChecksumAddress } from '@ethereumjs/util'; import { getAccountType } from '../selectors'; import { getSelectedInternalAccount } from '../accounts'; import { diff --git a/yarn.lock b/yarn.lock index f45eb5cf233e..559688c20ad0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18882,7 +18882,7 @@ __metadata: languageName: node linkType: hard -"ethereumjs-util@npm:7.1.5, ethereumjs-util@npm:^7.1.2": +"ethereumjs-util@npm:7.1.5": version: 7.1.5 resolution: "ethereumjs-util@npm:7.1.5" dependencies: @@ -26570,6 +26570,7 @@ __metadata: "@blockaid/ppom_release": "npm:^1.5.3" "@ensdomains/content-hash": "npm:^2.5.7" "@ethereumjs/tx": "npm:^4.1.1" + "@ethereumjs/util": "npm:^8.1.0" "@ethersproject/abi": "npm:^5.6.4" "@ethersproject/bignumber": "npm:^5.7.0" "@ethersproject/bytes": "npm:^5.7.0" @@ -26827,7 +26828,7 @@ __metadata: eth-ens-namehash: "npm:^2.0.8" eth-lattice-keyring: "npm:^0.12.4" eth-method-registry: "npm:^4.0.0" - ethereumjs-util: "npm:^7.0.10" + ethereum-cryptography: "npm:^2.2.1" ethers: "npm:5.7.0" extension-port-stream: "npm:^3.0.0" fake-indexeddb: "npm:^4.0.1"