Skip to content

Commit

Permalink
deps: ethereumjs-util@^7.0.10->@ethereumjs/util@^8.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Oct 13, 2023
1 parent 855a752 commit ea7d4fc
Show file tree
Hide file tree
Showing 38 changed files with 57 additions and 62 deletions.
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@
"@lavamoat/preinstall-always-fail": false,
"@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": true,
"babel-runtime>core-js": false,
"eth-sig-util>ethereumjs-abi>ethereumjs-util>keccakjs>sha3": true,
"eth-sig-util>ethereumjs-util>keccak": true,
"eth-sig-util>ethereumjs-util>secp256k1": true,
"ethereumjs-util>ethereum-cryptography>keccak": true,
"ethereumjs-util>ethereum-cryptography>secp256k1": true,
"simple-git-hooks": false
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@metamask/base-controller": "^3.2.3",
"@metamask/eth-snap-keyring": "^1.0.0",
"@metamask/keyring-api": "^1.0.0",
"@metamask/snaps-utils": "^3.0.0",
"@metamask/utils": "^8.1.0",
"deepmerge": "^4.2.2",
"ethereumjs-util": "^7.0.10",
"immer": "^9.0.6",
"uuid": "^8.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts-controller/src/AccountsController.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { sha256FromString } from '@ethereumjs/util';
import type { RestrictedControllerMessenger } from '@metamask/base-controller';
import { BaseControllerV2 } from '@metamask/base-controller';
import { SnapKeyring } from '@metamask/eth-snap-keyring';
Expand All @@ -16,7 +17,6 @@ import type {
} from '@metamask/snaps-controllers';
import type { Snap, ValidatedSnapId } from '@metamask/snaps-utils';
import type { Keyring, Json } from '@metamask/utils';
import { sha256FromString } from 'ethereumjs-util';
import type { Patch } from 'immer';
import { v4 as uuid } from 'uuid';

Expand Down
2 changes: 1 addition & 1 deletion packages/assets-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@ethersproject/address": "^5.7.0",
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/contracts": "^5.7.0",
Expand All @@ -47,7 +48,6 @@
"@metamask/utils": "^8.1.0",
"@types/uuid": "^8.3.0",
"async-mutex": "^0.2.6",
"ethereumjs-util": "^7.0.10",
"immer": "^9.0.6",
"multiformats": "^9.5.2",
"single-call-balance-checker-abi": "^1.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Contract } from '@ethersproject/contracts';
import { Web3Provider } from '@ethersproject/providers';
import type { BN } from '@ethereumjs/util';

Check failure on line 3 in packages/assets-controllers/src/AssetsContractController.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Lint (20.x)

`@ethereumjs/util` import should occur before import of `@ethersproject/contracts`
import type { BaseConfig, BaseState } from '@metamask/base-controller';
import { BaseController } from '@metamask/base-controller';
import { IPFS_DEFAULT_GATEWAY_URL } from '@metamask/controller-utils';
Expand All @@ -10,7 +11,6 @@ import type {
} from '@metamask/network-controller';
import type { PreferencesState } from '@metamask/preferences-controller';
import type { Hex } from '@metamask/utils';
import type { BN } from 'ethereumjs-util';
import abiSingleCallBalancesContract from 'single-call-balance-checker-abi';

import { SupportedTokenDetectionNetworks } from './assetsUtil';
Expand Down
2 changes: 1 addition & 1 deletion packages/assets-controllers/src/NftController.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Network } from '@ethersproject/providers';
import { BN } from '@ethereumjs/util';

Check failure on line 2 in packages/assets-controllers/src/NftController.test.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Lint (20.x)

`@ethereumjs/util` import should occur before import of `@ethersproject/providers`
import type {
AddApprovalRequest,
ApprovalStateChange,
Expand All @@ -24,7 +25,6 @@ import type {
} from '@metamask/network-controller';
import { defaultState as defaultNetworkState } from '@metamask/network-controller';
import { PreferencesController } from '@metamask/preferences-controller';
import { BN } from 'ethereumjs-util';
import HttpProvider from 'ethjs-provider-http';
import nock from 'nock';
import * as sinon from 'sinon';
Expand Down
2 changes: 1 addition & 1 deletion packages/assets-controllers/src/NftController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { isAddress } from '@ethersproject/address';
import { BN, stripHexPrefix } from '@ethereumjs/util';

Check failure on line 2 in packages/assets-controllers/src/NftController.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Lint (20.x)

`@ethereumjs/util` import should occur before import of `@ethersproject/address`
import type { AddApprovalRequest } from '@metamask/approval-controller';
import type {
BaseConfig,
Expand Down Expand Up @@ -27,7 +28,6 @@ import type { PreferencesState } from '@metamask/preferences-controller';
import { rpcErrors } from '@metamask/rpc-errors';
import type { Hex } from '@metamask/utils';
import { Mutex } from 'async-mutex';
import { BN, stripHexPrefix } from 'ethereumjs-util';
import { EventEmitter } from 'events';
import { v4 as random } from 'uuid';

Expand Down
4 changes: 2 additions & 2 deletions packages/assets-controllers/src/Standards/ERC20Standard.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Contract } from '@ethersproject/contracts';
import type { Web3Provider } from '@ethersproject/providers';
import { toUtf8 } from '@ethereumjs/util';

Check failure on line 3 in packages/assets-controllers/src/Standards/ERC20Standard.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Lint (20.x)

`@ethereumjs/util` import should occur before import of `@ethersproject/contracts`
import type { BN } from '@ethereumjs/util';

Check failure on line 4 in packages/assets-controllers/src/Standards/ERC20Standard.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Lint (20.x)

`@ethereumjs/util` import should occur before import of `@ethersproject/contracts`
import { decodeSingle } from '@metamask/abi-utils';
import { ERC20 } from '@metamask/controller-utils';
import { abiERC20 } from '@metamask/metamask-eth-abis';
import { assertIsStrictHexString } from '@metamask/utils';
import { toUtf8 } from 'ethereumjs-util';
import type { BN } from 'ethereumjs-util';

import { ethersBigNumberToBN } from '../assetsUtil';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Contract } from '@ethersproject/contracts';
import type { Web3Provider } from '@ethersproject/providers';
import type { BN } from '@ethereumjs/util';

Check failure on line 3 in packages/assets-controllers/src/Standards/NftStandards/ERC1155/ERC1155Standard.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Lint (20.x)

`@ethereumjs/util` import should occur before import of `@ethersproject/contracts`
import {
ERC1155,
ERC1155_INTERFACE_ID,
Expand All @@ -8,7 +9,6 @@ import {
timeoutFetch,
} from '@metamask/controller-utils';
import { abiERC1155 } from '@metamask/metamask-eth-abis';
import type { BN } from 'ethereumjs-util';

import { getFormattedIpfsUrl, ethersBigNumberToBN } from '../../../assetsUtil';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { BN } from '@ethereumjs/util';
import { ControllerMessenger } from '@metamask/base-controller';
import { toHex } from '@metamask/controller-utils';
import type { NetworkControllerMessenger } from '@metamask/network-controller';
import { NetworkController } from '@metamask/network-controller';
import { PreferencesController } from '@metamask/preferences-controller';
import { BN } from 'ethereumjs-util';
import * as sinon from 'sinon';

import { AssetsContractController } from './AssetsContractController';
Expand Down
2 changes: 1 addition & 1 deletion packages/assets-controllers/src/TokenBalancesController.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { BN } from '@ethereumjs/util';
import type { BaseConfig, BaseState } from '@metamask/base-controller';
import { BaseController } from '@metamask/base-controller';
import { safelyExecute } from '@metamask/controller-utils';
import type { PreferencesState } from '@metamask/preferences-controller';
import { BN } from 'ethereumjs-util';

import type { AssetsContractController } from './AssetsContractController';
import type { Token } from './TokenRatesController';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { BN } from '@ethereumjs/util';
import { ControllerMessenger } from '@metamask/base-controller';
import {
ChainId,
Expand All @@ -13,7 +14,6 @@ import type {
ProviderConfig,
} from '@metamask/network-controller';
import { PreferencesController } from '@metamask/preferences-controller';
import { BN } from 'ethereumjs-util';
import nock from 'nock';
import * as sinon from 'sinon';

Expand Down
2 changes: 1 addition & 1 deletion packages/assets-controllers/src/assetsUtil.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { BigNumber } from '@ethersproject/bignumber';
import { BN, stripHexPrefix } from '@ethereumjs/util';

Check failure on line 2 in packages/assets-controllers/src/assetsUtil.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Lint (20.x)

`@ethereumjs/util` import should occur before import of `@ethersproject/bignumber`
import {
convertHexToDecimal,
isValidHexAddress,
GANACHE_CHAIN_ID,
} from '@metamask/controller-utils';
import { rpcErrors } from '@metamask/rpc-errors';
import type { Hex } from '@metamask/utils';
import { BN, stripHexPrefix } from 'ethereumjs-util';
import { CID } from 'multiformats/cid';

import type { Nft, NftMetadata } from './NftController';
Expand Down
2 changes: 1 addition & 1 deletion packages/controller-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@metamask/eth-query": "^3.0.1",
"@metamask/utils": "^8.1.0",
"@spruceid/siwe-parser": "1.1.3",
"eth-ens-namehash": "^2.0.8",
"ethereumjs-util": "^7.0.10",
"ethjs-unit": "^0.1.6",
"fast-deep-equal": "^3.1.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/controller-utils/src/siwe.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isHexPrefixed } from '@ethereumjs/util';
import { ParsedMessage } from '@spruceid/siwe-parser';
import { isHexPrefixed } from 'ethereumjs-util';

import { projectLogger, createModuleLogger } from './logger';

Expand Down
2 changes: 1 addition & 1 deletion packages/controller-utils/src/util.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BN } from 'ethereumjs-util';
import { BN } from '@ethereumjs/util';
import nock from 'nock';

import { MAX_SAFE_CHAIN_ID } from './constants';
Expand Down
10 changes: 5 additions & 5 deletions packages/controller-utils/src/util.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type EthQuery from '@metamask/eth-query';
import type { Hex, Json } from '@metamask/utils';
import { isStrictHexString } from '@metamask/utils';
import ensNamehash from 'eth-ens-namehash';
import {
addHexPrefix,
isValidAddress,
isHexString,
BN,

Check failure on line 5 in packages/controller-utils/src/util.ts

View workflow job for this annotation

GitHub Actions / Lint, build, and test / Build (20.x)

Module '"@ethereumjs/util"' has no exported member 'BN'.
toChecksumAddress,
stripHexPrefix,
} from 'ethereumjs-util';
} from '@ethereumjs/util';
import type EthQuery from '@metamask/eth-query';
import type { Hex, Json } from '@metamask/utils';
import { isStrictHexString } from '@metamask/utils';
import ensNamehash from 'eth-ens-namehash';
import { fromWei, toWei } from 'ethjs-unit';
import deepEqual from 'fast-deep-equal';

Expand Down
2 changes: 1 addition & 1 deletion packages/gas-fee-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@metamask/base-controller": "^3.2.3",
"@metamask/controller-utils": "^5.0.2",
"@metamask/eth-query": "^3.0.1",
"@metamask/network-controller": "^15.0.0",
"@metamask/polling-controller": "^0.2.0",
"@metamask/utils": "^8.1.0",
"@types/uuid": "^8.3.0",
"ethereumjs-util": "^7.0.10",
"ethjs-unit": "^0.1.6",
"immer": "^9.0.6",
"uuid": "^8.3.2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BN } from '@ethereumjs/util';
import { query, fromHex, toHex } from '@metamask/controller-utils';
import { BN } from 'ethereumjs-util';
import { when } from 'jest-when';

import fetchBlockFeeHistory from './fetchBlockFeeHistory';
Expand Down
2 changes: 1 addition & 1 deletion packages/gas-fee-controller/src/fetchBlockFeeHistory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BN } from '@ethereumjs/util';
import { query, fromHex, toHex } from '@metamask/controller-utils';
import { BN } from 'ethereumjs-util';

type EthQuery = any;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BN } from 'ethereumjs-util';
import { BN } from '@ethereumjs/util';
import { when } from 'jest-when';

import fetchBlockFeeHistory from './fetchBlockFeeHistory';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BN } from 'ethereumjs-util';
import { BN } from '@ethereumjs/util';

import calculateGasFeeEstimatesForPriorityLevels from './calculateGasFeeEstimatesForPriorityLevels';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BN } from '@ethereumjs/util';
import { GWEI } from '@metamask/controller-utils';
import { BN } from 'ethereumjs-util';
import { fromWei } from 'ethjs-unit';

import type { FeeHistoryBlock } from '../fetchBlockFeeHistory';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BN } from 'ethereumjs-util';
import type { BN } from '@ethereumjs/util';

/**
* Finds the median among a list of numbers. Note that this is different from the implementation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { BN } from 'ethereumjs-util';
import type { BN } from '@ethereumjs/util';

export type EthBlock = {
number: BN;
Expand Down
2 changes: 1 addition & 1 deletion packages/gas-fee-controller/src/gas-util.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { BN } from '@ethereumjs/util';
import {
query,
handleFetch,
gweiDecToWEIBN,
weiHexToGweiDec,
} from '@metamask/controller-utils';
import type EthQuery from '@metamask/eth-query';
import { BN } from 'ethereumjs-util';

import type {
GasFeeEstimates,
Expand Down
2 changes: 1 addition & 1 deletion packages/keyring-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@keystonehq/metamask-airgapped-keyring": "^0.13.1",
"@metamask/base-controller": "^3.2.3",
"@metamask/eth-keyring-controller": "^13.0.1",
"@metamask/message-manager": "^7.3.5",
"@metamask/preferences-controller": "^4.4.3",
"@metamask/utils": "^8.1.0",
"async-mutex": "^0.2.6",
"ethereumjs-util": "^7.0.10",
"ethereumjs-wallet": "^1.0.1",
"immer": "^9.0.6"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/keyring-controller/src/KeyringController.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Chain, Common, Hardfork } from '@ethereumjs/common';
import { TransactionFactory } from '@ethereumjs/tx';
import { bufferToHex } from '@ethereumjs/util';
import { CryptoHDKey, ETHSignature } from '@keystonehq/bc-ur-registry-eth';
import { MetaMaskKeyring as QRKeyring } from '@keystonehq/metamask-airgapped-keyring';
import { ControllerMessenger } from '@metamask/base-controller';
Expand All @@ -18,7 +19,6 @@ import {
type Keyring,
type Json,
} from '@metamask/utils';
import { bufferToHex } from 'ethereumjs-util';
import * as sinon from 'sinon';
import * as uuid from 'uuid';

Expand Down
16 changes: 8 additions & 8 deletions packages/keyring-controller/src/KeyringController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import type { TxData, TypedTransaction } from '@ethereumjs/tx';
import {
addHexPrefix,
bufferToHex,
isValidPrivate,
toBuffer,
stripHexPrefix,
getBinarySize,
} from '@ethereumjs/util';
import type {
MetaMaskKeyring as QRKeyring,
IKeyringState as IQRKeyringState,
Expand All @@ -14,14 +22,6 @@ import type { PreferencesController } from '@metamask/preferences-controller';
import type { Eip1024EncryptedData, Hex, Keyring, Json } from '@metamask/utils';
import { assertIsStrictHexString, hasProperty } from '@metamask/utils';
import { Mutex } from 'async-mutex';
import {
addHexPrefix,
bufferToHex,
isValidPrivate,
toBuffer,
stripHexPrefix,
getBinarySize,
} from 'ethereumjs-util';
import Wallet, { thirdparty as importers } from 'ethereumjs-wallet';
import type { Patch } from 'immer';

Expand Down
2 changes: 1 addition & 1 deletion packages/message-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@metamask/base-controller": "^3.2.3",
"@metamask/controller-utils": "^5.0.2",
"@metamask/eth-sig-util": "^7.0.0",
"@metamask/utils": "^8.1.0",
"@types/uuid": "^8.3.0",
"ethereumjs-util": "^7.0.10",
"jsonschema": "^1.2.4",
"uuid": "^8.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/message-manager/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { addHexPrefix, bufferToHex, stripHexPrefix } from '@ethereumjs/util';
import { isValidHexAddress } from '@metamask/controller-utils';
import {
TYPED_MESSAGE_SCHEMA,
typedSignatureHash,
} from '@metamask/eth-sig-util';
import type { Hex } from '@metamask/utils';
import { addHexPrefix, bufferToHex, stripHexPrefix } from 'ethereumjs-util';
import { validate } from 'jsonschema';

import type { DecryptMessageParams } from './DecryptMessageManager';
Expand Down
2 changes: 1 addition & 1 deletion packages/signature-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@ethereumjs/util": "^8.1.0",
"@metamask/approval-controller": "^4.0.1",
"@metamask/base-controller": "^3.2.3",
"@metamask/controller-utils": "^5.0.2",
"@metamask/logging-controller": "^1.0.4",
"@metamask/message-manager": "^7.3.5",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/utils": "^8.1.0",
"ethereumjs-util": "^7.0.10",
"immer": "^9.0.6",
"lodash": "^4.17.21"
},
Expand Down
Loading

0 comments on commit ea7d4fc

Please sign in to comment.