diff --git a/main/accounts/Account/index.ts b/main/accounts/Account/index.ts index 51db3204a..40d248571 100644 --- a/main/accounts/Account/index.ts +++ b/main/accounts/Account/index.ts @@ -1,5 +1,5 @@ import log from 'electron-log' -import { isValidAddress, addHexPrefix } from 'ethereumjs-util' +import { isValidAddress, addHexPrefix } from '@ethereumjs/util' import { AccessRequest, AccountRequest, Accounts, RequestMode, TransactionRequest } from '..' import nebulaApi from '../../nebula' diff --git a/main/accounts/index.ts b/main/accounts/index.ts index 8e6d7ccd6..aa8900f3d 100644 --- a/main/accounts/index.ts +++ b/main/accounts/index.ts @@ -1,7 +1,7 @@ import EventEmitter from 'events' import log from 'electron-log' import { Notification } from 'electron' -import { addHexPrefix, intToHex} from 'ethereumjs-util' +import { addHexPrefix, intToHex } from '@ethereumjs/util' import { v5 as uuidv5 } from 'uuid' import provider from '../provider' diff --git a/main/chains/config/index.ts b/main/chains/config/index.ts index e784a12f4..e7fd73b5b 100644 --- a/main/chains/config/index.ts +++ b/main/chains/config/index.ts @@ -1,12 +1,11 @@ -import { BN } from 'ethereumjs-util' -import Common from '@ethereumjs/common' +import { Common } from '@ethereumjs/common' function chainConfig (chain: number, hardfork: string) { - const chainId = new BN(chain) + const chainId = BigInt(chain) return Common.isSupportedChainId(chainId) - ? new Common({ chain: chainId.toNumber(), hardfork }) - : Common.custom({ chainId: chainId.toNumber() }, { baseChain: 'mainnet', hardfork }) + ? new Common({ chain: chainId, hardfork }) + : Common.custom({ chainId }, { baseChain: 'mainnet', hardfork }) } export default chainConfig diff --git a/main/chains/index.d.ts b/main/chains/index.d.ts index 96ec26f1a..1097720f5 100644 --- a/main/chains/index.d.ts +++ b/main/chains/index.d.ts @@ -1,4 +1,4 @@ -import Common from '@ethereumjs/common' +import { Common } from '@ethereumjs/common' import { chainsType } from '@ethereumjs/common/dist/types' import { EventEmitter } from 'stream' diff --git a/main/chains/index.js b/main/chains/index.js index 2b6adefdd..f97ee86cb 100644 --- a/main/chains/index.js +++ b/main/chains/index.js @@ -1,7 +1,7 @@ // status = Network Mismatch, Not Connected, Connected, Standby, Syncing const EventEmitter = require('events') -const { addHexPrefix } = require('ethereumjs-util') +const { addHexPrefix } = require('@ethereumjs/util') const { Hardfork } = require('@ethereumjs/common') const provider = require('eth-provider') const log = require('electron-log') diff --git a/main/contracts/erc20.ts b/main/contracts/erc20.ts index d1b0a53e1..366d287df 100644 --- a/main/contracts/erc20.ts +++ b/main/contracts/erc20.ts @@ -1,7 +1,7 @@ import { TransactionDescription } from '@ethersproject/abi' import { Contract } from '@ethersproject/contracts' import { Web3Provider } from '@ethersproject/providers' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import log from 'electron-log' import erc20Abi from '../externalData/balances/erc-20-abi' import provider from '../provider' diff --git a/main/crypt/typedDataUtils.js b/main/crypt/typedDataUtils.js index da32f8f9b..7adbab4b7 100644 --- a/main/crypt/typedDataUtils.js +++ b/main/crypt/typedDataUtils.js @@ -1,6 +1,6 @@ // Translated to JavaScript from https://github.com/dicether/eip712/blob/master/src/eip712.ts const abi = require('ethereumjs-abi') -const ethUtil = require('ethereumjs-util') +const ethUtil = require('@ethereumjs/util') const PRIMITIVE_TYPES = [ /^bytes[0-9]|[0-2][0-9]|3[0-2]$/, diff --git a/main/externalData/balances/scan.ts b/main/externalData/balances/scan.ts index b48bd1b31..86d56621d 100644 --- a/main/externalData/balances/scan.ts +++ b/main/externalData/balances/scan.ts @@ -1,7 +1,7 @@ import BigNumber from 'bignumber.js' import { BigNumber as EthersBigNumber } from '@ethersproject/bignumber' import { Interface } from '@ethersproject/abi' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import log from 'electron-log' import multicall, { Call, supportsChain as multicallSupportsChain } from '../../multicall' diff --git a/main/multicall/index.ts b/main/multicall/index.ts index a9c11f3f6..2f3fe6df0 100644 --- a/main/multicall/index.ts +++ b/main/multicall/index.ts @@ -1,5 +1,5 @@ import { Interface } from '@ethersproject/abi' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import log from 'electron-log' import type { BytesLike } from '@ethersproject/bytes' diff --git a/main/provider/helpers.ts b/main/provider/helpers.ts index 4f70872e3..02b5cd225 100644 --- a/main/provider/helpers.ts +++ b/main/provider/helpers.ts @@ -8,7 +8,7 @@ import { pubToAddress, ecrecover, hashPersonalMessage, -} from 'ethereumjs-util' +} from '@ethereumjs/util' import log from 'electron-log' import BN from 'bignumber.js' import { v5 as uuidv5 } from 'uuid' @@ -69,6 +69,11 @@ export function feeTotalOverMax (rawTx: TransactionData, maxTotalFee: number) { return totalFee > maxTotalFee } +function parseValue(value = '') { + const parsedHex = parseInt(value, 16) + return (!!parsedHex && addHexPrefix(unpadHexString(value)) || '0x0') +} + export function getRawTx (newTx: RPC.SendTransaction.TxParams, accountId: string | undefined): TransactionData { const { gas, gasLimit, gasPrice, data, value, type, to, ...rawTx } = newTx const getNonce = () => { @@ -84,13 +89,12 @@ export function getRawTx (newTx: RPC.SendTransaction.TxParams, accountId: string } return addHexPrefix(nonceBN.toString(16)) } - const parsedValue = !value || parseInt(value, 16) === 0 ? '0x0' : addHexPrefix(unpadHexString(value) || '0') const tx: TransactionData = { ...rawTx, from: rawTx.from || accountId, type: '0x0', - value: parsedValue, + value: parseValue(value), data: addHexPrefix(padToEven(stripHexPrefix(data || '0x'))), gasLimit: gasLimit || gas, chainId: rawTx.chainId, @@ -131,7 +135,7 @@ export function getSignedAddress (signed: string, message: string, cb: Callback< const r = toBuffer(signature.slice(0, 32)) const s = toBuffer(signature.slice(32, 64)) const hash = hashPersonalMessage(toBuffer(message)) - const verifiedAddress = '0x' + pubToAddress(ecrecover(hash, v, r, s)).toString('hex') + const verifiedAddress = '0x' + pubToAddress(ecrecover(hash, BigInt(v), r, s)).toString('hex') cb(null, verifiedAddress) } diff --git a/main/provider/index.ts b/main/provider/index.ts index d729cb1b5..944bdf6b1 100644 --- a/main/provider/index.ts +++ b/main/provider/index.ts @@ -10,7 +10,7 @@ import { isHexString, isHexPrefixed, fromUtf8, -} from 'ethereumjs-util' +} from '@ethereumjs/util' import store from '../store' import packageFile from '../../package.json' diff --git a/main/reveal/index.ts b/main/reveal/index.ts index 471d16f4f..078fd4b05 100644 --- a/main/reveal/index.ts +++ b/main/reveal/index.ts @@ -2,7 +2,7 @@ import log from 'electron-log' import EthereumProvider from 'ethereum-provider' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import BigNumber from 'bignumber.js' import proxyConnection from '../provider/proxy' diff --git a/main/signers/Signer/derive.ts b/main/signers/Signer/derive.ts index 760403aa1..7a5d0e2d3 100644 --- a/main/signers/Signer/derive.ts +++ b/main/signers/Signer/derive.ts @@ -1,6 +1,6 @@ import HDKey from 'hdkey' -import { publicToAddress, toChecksumAddress } from 'ethereumjs-util' +import { publicToAddress, toChecksumAddress } from '@ethereumjs/util' export enum Derivation { live = 'live', legacy = 'legacy', standard = 'standard', testnet = 'testnet' diff --git a/main/signers/Signer/index.ts b/main/signers/Signer/index.ts index 8ebfa5b07..40afc556a 100644 --- a/main/signers/Signer/index.ts +++ b/main/signers/Signer/index.ts @@ -1,6 +1,6 @@ import log from 'electron-log' import EventEmitter from 'stream' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import { deriveHDAccounts } from './derive' import crypt from '../../crypt' diff --git a/main/signers/hot/HotSigner/worker.js b/main/signers/hot/HotSigner/worker.js index e5b2371ff..e44eada90 100644 --- a/main/signers/hot/HotSigner/worker.js +++ b/main/signers/hot/HotSigner/worker.js @@ -1,24 +1,22 @@ const crypto = require('crypto') const { signTypedData } = require('@metamask/eth-sig-util') const { TransactionFactory } = require('@ethereumjs/tx') -const Common = require('@ethereumjs/common').default - +const { Common } = require('@ethereumjs/common') const { - BN, hashPersonalMessage, toBuffer, ecsign, addHexPrefix, pubToAddress, ecrecover -} = require('ethereumjs-util') +} = require('@ethereumjs/util') function chainConfig (chain, hardfork) { - const chainId = new BN(chain) + const chainId = BigInt(chain) return Common.isSupportedChainId(chainId) - ? new Common({ chain: chainId.toNumber(), hardfork }) - : Common.custom({ chainId: chainId.toNumber() }, { baseChain: 'mainnet', hardfork }) + ? new Common({ chain: chainId, hardfork }) + : Common.custom({ chainId: chainId }, { baseChain: 'mainnet', hardfork }) } class HotSignerWorker { @@ -51,7 +49,7 @@ class HotSignerWorker { const signed = ecsign(hash, key) // Return serialized signed message - const hex = Buffer.concat([Buffer.from(signed.r), Buffer.from(signed.s), Buffer.from([signed.v])]).toString('hex') + const hex = Buffer.concat([signed.r, signed.s, Buffer.from([Number(signed.v)])]).toString('hex') pseudoCallback(null, addHexPrefix(hex)) } @@ -72,7 +70,7 @@ class HotSignerWorker { return pseudoCallback('could not determine chain id for transaction') } - const chainId = parseInt(rawTx.chainId) + const chainId = parseInt(rawTx.chainId, 16) const hardfork = parseInt(rawTx.type) === 2 ? 'london' : 'berlin' const common = chainConfig(chainId, hardfork) @@ -94,7 +92,7 @@ class HotSignerWorker { if (signature.length !== 65) return pseudoCallback(new Error('Frame verifyAddress signature has incorrect length')) // Verify address let v = signature[64] - v = v === 0 || v === 1 ? v + 27 : v + v = BigInt(v === 0 || v === 1 ? v + 27 : v) const r = toBuffer(signature.slice(0, 32)) const s = toBuffer(signature.slice(32, 64)) const hash = hashPersonalMessage(toBuffer(message)) diff --git a/main/signers/hot/index.js b/main/signers/hot/index.js index 1349f778a..5d7141e69 100644 --- a/main/signers/hot/index.js +++ b/main/signers/hot/index.js @@ -10,7 +10,7 @@ const crypt = require('../../crypt') const SeedSigner = require('./SeedSigner') const RingSigner = require('./RingSigner') -const { stripHexPrefix } = require('ethereumjs-util') +const { stripHexPrefix } = require('@ethereumjs/util') const USER_DATA = app ? app.getPath('userData') : path.resolve(path.dirname(require.main.filename), '../.userData'); const SIGNERS_PATH = path.resolve(USER_DATA, 'signers') diff --git a/main/signers/lattice/Lattice/index.ts b/main/signers/lattice/Lattice/index.ts index 38661e7c2..f7179f4d5 100644 --- a/main/signers/lattice/Lattice/index.ts +++ b/main/signers/lattice/Lattice/index.ts @@ -1,16 +1,17 @@ -import { Client, Utils, Constants } from 'gridplus-sdk' -import { encode } from 'rlp' -import { padToEven, addHexPrefix } from 'ethereumjs-util' -import { hexToInt } from '../../../../resources/utils' import log from 'electron-log' +import { encode } from 'rlp' +import { Client, Utils, Constants } from 'gridplus-sdk' +import { padToEven, addHexPrefix } from '@ethereumjs/util' import { TypedTransaction } from '@ethereumjs/tx' import { SignTypedDataVersion } from '@metamask/eth-sig-util' import Signer from '../../Signer' import { sign, signerCompatibility, londonToLegacy } from '../../../transaction' -import { TransactionData } from '../../../../resources/domain/transaction' import { Derivation, getDerivationPath } from '../../Signer/derive' +import { hexToInt } from '../../../../resources/utils' + import type { TypedData, TypedMessage } from '../../../accounts/types' +import type { TransactionData } from '../../../../resources/domain/transaction' const ADDRESS_LIMIT = 10 const HARDENED_OFFSET = 0x80000000 diff --git a/main/signers/ledger/Ledger/eth.ts b/main/signers/ledger/Ledger/eth.ts index 555848b26..1030b7802 100644 --- a/main/signers/ledger/Ledger/eth.ts +++ b/main/signers/ledger/Ledger/eth.ts @@ -1,18 +1,19 @@ -import { rlp, addHexPrefix, stripHexPrefix, padToEven } from 'ethereumjs-util' -import { SignTypedDataVersion, TypedDataUtils } from '@metamask/eth-sig-util' import log from 'electron-log' - +import { encode } from 'rlp' +import { addHexPrefix, stripHexPrefix, padToEven } from '@ethereumjs/util' +import { SignTypedDataVersion, TypedDataUtils } from '@metamask/eth-sig-util' import Transport from '@ledgerhq/hw-transport' import Eth from '@ledgerhq/hw-app-eth' import { Derivation, getDerivationPath, deriveHDAccounts } from '../../Signer/derive' -import { TransactionData } from '../../../../resources/domain/transaction' import { sign } from '../../../transaction' import { DeviceError } from '.' + import type { TypedData } from '../../../accounts/types' +import type { TransactionData } from '../../../../resources/domain/transaction' export default class LedgerEthereumApp { - private eth: Eth; + private eth: Eth constructor (transport: Transport) { this.eth = new Eth(transport) @@ -73,7 +74,7 @@ export default class LedgerEthereumApp { // legacy transactions aren't RLP encoded before they're returned const message = tx.getMessageToSign(false) const legacyMessage = message[0] !== tx.type - const rawTxHex = legacyMessage ? rlp.encode(message).toString('hex') : message.toString('hex') + const rawTxHex = legacyMessage ? Buffer.from(encode(message)).toString('hex') : message.toString('hex') return this.eth.signTransaction(path, rawTxHex, null) }) diff --git a/main/signers/trezor/Trezor/index.ts b/main/signers/trezor/Trezor/index.ts index 263758de6..4da3b2b93 100644 --- a/main/signers/trezor/Trezor/index.ts +++ b/main/signers/trezor/Trezor/index.ts @@ -1,6 +1,6 @@ import log from 'electron-log' import { hexToInt } from '../../../../resources/utils' -import { padToEven, stripHexPrefix, addHexPrefix } from 'ethereumjs-util' +import { padToEven, stripHexPrefix, addHexPrefix } from '@ethereumjs/util' import { SignTypedDataVersion, TypedDataUtils } from '@metamask/eth-sig-util' import type { Device as TrezorDevice } from 'trezor-connect' import { TypedTransaction } from '@ethereumjs/tx' diff --git a/main/transaction/gasCalculator.ts b/main/transaction/gasCalculator.ts index d2e32e134..fa7149bd6 100644 --- a/main/transaction/gasCalculator.ts +++ b/main/transaction/gasCalculator.ts @@ -1,4 +1,4 @@ -import { intToHex } from 'ethereumjs-util' +import { intToHex } from '@ethereumjs/util' interface FeeHistoryResponse { baseFeePerGas: string[] diff --git a/main/transaction/index.ts b/main/transaction/index.ts index a6bbe1648..b0a9ca721 100644 --- a/main/transaction/index.ts +++ b/main/transaction/index.ts @@ -1,10 +1,15 @@ -import { BN, addHexPrefix, stripHexPrefix, bnToHex, intToHex } from 'ethereumjs-util' +import BigNumber from 'bignumber.js' +import { addHexPrefix, intToHex } from '@ethereumjs/util' import { TransactionFactory, TypedTransaction } from '@ethereumjs/tx' -import Common from '@ethereumjs/common' +import { Common } from '@ethereumjs/common' -import chainConfig from '../chains/config' import { AppVersion, SignerSummary } from '../signers/Signer' -import { GasFeesSource, TransactionData, typeSupportsBaseFee } from '../../resources/domain/transaction' +import { + GasFeesSource, + TransactionData, + typeSupportsBaseFee, +} from '../../resources/domain/transaction' +import chainConfig from '../chains/config' const londonHardforkSigners: SignerCompatibilityByVersion = { seed: () => true, @@ -44,11 +49,10 @@ export interface SignerCompatibility { compatible: boolean } -function toBN (hexStr: string) { - return new BN(stripHexPrefix(hexStr), 'hex') -} - -function signerCompatibility (txData: TransactionData, signer: SignerSummary): SignerCompatibility { +function signerCompatibility( + txData: TransactionData, + signer: SignerSummary +): SignerCompatibility { if (typeSupportsBaseFee(txData.type)) { const compatible = (signer.type in londonHardforkSigners) && londonHardforkSigners[signer.type](signer.appVersion, signer.model) return { signer: signer.type, tx: 'london', compatible } @@ -87,7 +91,8 @@ function maxFee (rawTx: TransactionData) { } function calculateMaxFeePerGas(maxBaseFee: string, maxPriorityFee: string) { - return bnToHex(toBN(maxPriorityFee).add(toBN(maxBaseFee))) + const maxFeePerGas = BigNumber(maxPriorityFee).plus(maxBaseFee).toString(16) + return addHexPrefix(maxFeePerGas) } function populate (rawTx: TransactionData, chainConfig: Common, gas: GasData): TransactionData { @@ -100,10 +105,10 @@ function populate (rawTx: TransactionData, chainConfig: Common, gas: GasData): T const useFrameGasPrice = !rawTx.gasPrice || isNaN(parseInt(rawTx.gasPrice, 16)) if (useFrameGasPrice) { // no valid dapp-supplied value for gasPrice so we use the Frame-supplied value - const gasPrice = toBN(gas.price.levels.fast as string) - txData.gasPrice = bnToHex(gasPrice) + const gasPrice = BigNumber(gas.price.levels.fast as string).toString(16) + txData.gasPrice = addHexPrefix(gasPrice) txData.gasFeesSource = GasFeesSource.Frame - } + } return txData } @@ -130,8 +135,10 @@ function populate (rawTx: TransactionData, chainConfig: Common, gas: GasData): T txData.maxFeePerGas = useFrameMaxFeePerGas ? calculateMaxFeePerGas(gas.price.fees.maxBaseFeePerGas, maxPriorityFee) : txData.maxFeePerGas // if no valid dapp-supplied value for maxPriorityFeePerGas we use the Frame-supplied value - txData.maxPriorityFeePerGas = useFrameMaxPriorityFeePerGas ? bnToHex(toBN(maxPriorityFee)) : txData.maxPriorityFeePerGas - + txData.maxPriorityFeePerGas = useFrameMaxPriorityFeePerGas + ? addHexPrefix(BigNumber(maxPriorityFee).toString(16)) + : txData.maxPriorityFeePerGas + return txData } @@ -144,7 +151,7 @@ function hexifySignature ({ v, r, s }: Signature) { } async function sign (rawTx: TransactionData, signingFn: (tx: TypedTransaction) => Promise) { - const common = chainConfig(parseInt(rawTx.chainId), parseInt(rawTx.type) === 2 ? 'london' : 'berlin') + const common = chainConfig(parseInt(rawTx.chainId, 16), parseInt(rawTx.type, 16) === 2 ? 'london' : 'berlin') const tx = TransactionFactory.fromTxData(rawTx, { common }) @@ -153,8 +160,8 @@ async function sign (rawTx: TransactionData, signingFn: (tx: TypedTransaction) = return TransactionFactory.fromTxData( { - ...rawTx, - ...signature + ...rawTx, + ...signature }, { common } ) diff --git a/package-lock.json b/package-lock.json index 3334eadde..d3373c683 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,8 +11,9 @@ "license": "GPL-3.0", "dependencies": { "@aragon/wrapper": "5.5.3", - "@ethereumjs/common": "2.6.5", - "@ethereumjs/tx": "3.5.1", + "@ethereumjs/common": "3.0.1", + "@ethereumjs/tx": "4.0.1", + "@ethereumjs/util": "8.0.2", "@ethersproject/contracts": "5.7.0", "@ethersproject/providers": "5.7.2", "@framelabs/pylon-client": "0.0.9", @@ -35,7 +36,6 @@ "electron-updater": "5.3.0", "eth-ens-namehash": "2.0.8", "eth-provider": "0.13.6", - "ethereumjs-util": "7.1.5", "ethers": "5.7.2", "extract-zip": "2.0.1", "fs-extra": "10.1.0", @@ -206,9 +206,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.1.tgz", - "integrity": "sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.5.tgz", + "integrity": "sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==", "engines": { "node": ">=6.9.0" } @@ -251,11 +251,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.20.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.4.tgz", - "integrity": "sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz", + "integrity": "sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA==", "dependencies": { - "@babel/types": "^7.20.2", + "@babel/types": "^7.20.5", "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, @@ -327,9 +327,9 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.2.tgz", - "integrity": "sha512-k22GoYRAHPYr9I+Gvy2ZQlAe5mGy8BqWst2wRt8cwIufWTxrsVshhIBvYNqC80N0GSFWTsqRVexOtfzlgOEDvA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.5.tgz", + "integrity": "sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", @@ -348,13 +348,13 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.19.0.tgz", - "integrity": "sha512-htnV+mHX32DF81amCDrwIDr8nrp1PTm+3wfBN9/v8QJOLEioOCOG7qNyq0nHeFiWbT3Eb7gsPwEmV64UCQ1jzw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz", + "integrity": "sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", - "regexpu-core": "^5.1.0" + "regexpu-core": "^5.2.1" }, "engines": { "node": ">=6.9.0" @@ -584,28 +584,28 @@ } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz", - "integrity": "sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz", + "integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==", "dev": true, "dependencies": { "@babel/helper-function-name": "^7.19.0", "@babel/template": "^7.18.10", - "@babel/traverse": "^7.19.0", - "@babel/types": "^7.19.0" + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.1.tgz", - "integrity": "sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.6.tgz", + "integrity": "sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w==", "dependencies": { "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.1", - "@babel/types": "^7.20.0" + "@babel/traverse": "^7.20.5", + "@babel/types": "^7.20.5" }, "engines": { "node": ">=6.9.0" @@ -648,9 +648,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.3.tgz", - "integrity": "sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz", + "integrity": "sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1006,14 +1006,14 @@ } }, "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", - "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.20.5.tgz", + "integrity": "sha512-Vq7b9dUA12ByzB4EjQTPo25sFhY+08pQDBSZRtUAkj7lb7jahaHR5igera16QZ+3my1nYR4dKsNdYj5IjPHilQ==", "dev": true, "dependencies": { "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.20.5", + "@babel/helper-plugin-utils": "^7.20.2", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { @@ -1454,9 +1454,9 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.2.tgz", - "integrity": "sha512-y5V15+04ry69OV2wULmwhEA6jwSWXO1TwAtIwiPXcvHcoOQUqpyMVd2bDsQJMW8AurjulIyUV8kDqtjSwHy1uQ==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.5.tgz", + "integrity": "sha512-WvpEIW9Cbj9ApF3yJCjIEEf1EiNJLtXagOrL5LNWEZOo3jv8pmPoYTSNJQvqej8OavVlgOoOPw6/htGZro6IkA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.20.2" @@ -1698,13 +1698,13 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.19.1.tgz", - "integrity": "sha512-oWk9l9WItWBQYS4FgXD4Uyy5kq898lvkXpXQxoJEY1RnvPk4R/Dvu2ebXU9q8lP+rlMwUQTFf2Ok6d78ODa0kw==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz", + "integrity": "sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.19.0", - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-create-regexp-features-plugin": "^7.20.5", + "@babel/helper-plugin-utils": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -1745,9 +1745,9 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.3.tgz", - "integrity": "sha512-oZg/Fpx0YDrj13KsLyO8I/CX3Zdw7z0O9qOd95SqcoIzuqy/WTGWvePeHAnZCN54SfdyjHcb1S30gc8zlzlHcA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.5.tgz", + "integrity": "sha512-h7plkOmcndIUWXZFLgpbrh2+fXAi47zcUX7IrOQuZdLD0I0KvjJ6cvo3BEcAOsDOcZhVKGJqv07mkSqK0y2isQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.20.2" @@ -1840,13 +1840,13 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", - "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz", + "integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "regenerator-transform": "^0.15.0" + "@babel/helper-plugin-utils": "^7.20.2", + "regenerator-transform": "^0.15.1" }, "engines": { "node": ">=6.9.0" @@ -2192,11 +2192,11 @@ } }, "node_modules/@babel/runtime": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.1.tgz", - "integrity": "sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz", + "integrity": "sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA==", "dependencies": { - "regenerator-runtime": "^0.13.10" + "regenerator-runtime": "^0.13.11" }, "engines": { "node": ">=6.9.0" @@ -2216,18 +2216,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.1.tgz", - "integrity": "sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz", + "integrity": "sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ==", "dependencies": { "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.1", + "@babel/generator": "^7.20.5", "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-function-name": "^7.19.0", "@babel/helper-hoist-variables": "^7.18.6", "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.1", - "@babel/types": "^7.20.0", + "@babel/parser": "^7.20.5", + "@babel/types": "^7.20.5", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -2236,9 +2236,9 @@ } }, "node_modules/@babel/types": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.2.tgz", - "integrity": "sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz", + "integrity": "sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==", "dependencies": { "@babel/helper-string-parser": "^7.19.4", "@babel/helper-validator-identifier": "^7.19.1", @@ -2639,12 +2639,12 @@ } }, "node_modules/@ethereumjs/common": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz", - "integrity": "sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.0.1.tgz", + "integrity": "sha512-AHsJB7ydfb7TFCT7ORGY0tRiKkAylWZd/Qt6Lmc3Oycs66bMeE1JuYHbc0U6qsAZKZMFsUmL/UJDT/w7Z0cytw==", "dependencies": { - "crc-32": "^1.2.0", - "ethereumjs-util": "^7.1.5" + "@ethereumjs/util": "^8.0.0", + "crc-32": "^1.2.0" } }, "node_modules/@ethereumjs/rlp": { @@ -2659,12 +2659,18 @@ } }, "node_modules/@ethereumjs/tx": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.5.1.tgz", - "integrity": "sha512-xzDrTiu4sqZXUcaBxJ4n4W5FrppwxLxZB4ZDGVLtxSQR4lVuOnFR6RcUHdg1mpUhAPVrmnzLJpxaeXnPxIyhWA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.0.1.tgz", + "integrity": "sha512-JFq66cjjwnWOdKuDNNq0Hr1j04A546ymUo/8xnPa7wAm3s+RyGVt8VbaNF71/GJqN4tuY62gxvTfZ+B62foyPw==", "dependencies": { - "@ethereumjs/common": "^2.6.3", - "ethereumjs-util": "^7.1.4" + "@ethereumjs/common": "^3.0.1", + "@ethereumjs/rlp": "^4.0.0", + "@ethereumjs/util": "^8.0.0", + "ethereum-cryptography": "^1.1.2", + "ethers": "^5.7.1" + }, + "engines": { + "node": ">=14" } }, "node_modules/@ethereumjs/util": { @@ -7653,9 +7659,9 @@ } }, "node_modules/@sinonjs/commons": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.5.tgz", - "integrity": "sha512-rTpCA0wG1wUxglBSFdMMY0oTrKYvgf4fNgv/sXbfCVAdf+FnPBdKJR/7XbpTCwbCrvCbdPYnlWaUUYz4V2fPDA==", + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", + "integrity": "sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" @@ -7976,18 +7982,53 @@ "ethereumjs-wallet": "^1.0.1" } }, - "node_modules/@truffle/hdwallet-provider/node_modules/@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "node_modules/@truffle/hdwallet-provider/node_modules/@ethereumjs/common": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz", + "integrity": "sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==", "dependencies": { - "@types/node": "*" + "crc-32": "^1.2.0", + "ethereumjs-util": "^7.1.5" } }, - "node_modules/@truffle/hdwallet-provider/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "node_modules/@truffle/hdwallet-provider/node_modules/@ethereumjs/common/node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@truffle/hdwallet-provider/node_modules/@ethereumjs/tx": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.5.2.tgz", + "integrity": "sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw==", + "dependencies": { + "@ethereumjs/common": "^2.6.4", + "ethereumjs-util": "^7.1.5" + } + }, + "node_modules/@truffle/hdwallet-provider/node_modules/@ethereumjs/tx/node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } }, "node_modules/@truffle/hdwallet-provider/node_modules/ethereum-cryptography": { "version": "0.1.3", @@ -8025,6 +8066,19 @@ "rlp": "^2.2.3" } }, + "node_modules/@truffle/hdwallet-provider/node_modules/ethereumjs-util/node_modules/@types/bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@truffle/hdwallet-provider/node_modules/ethereumjs-util/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/@truffle/hdwallet-provider/node_modules/rlp": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", @@ -8036,11 +8090,6 @@ "rlp": "bin/rlp" } }, - "node_modules/@truffle/hdwallet-provider/node_modules/rlp/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" - }, "node_modules/@trufflesuite/eth-json-rpc-filters": { "version": "4.1.2-1", "resolved": "https://registry.npmjs.org/@trufflesuite/eth-json-rpc-filters/-/eth-json-rpc-filters-4.1.2-1.tgz", @@ -8256,6 +8305,54 @@ "xtend": "^4.0.1" } }, + "node_modules/@trufflesuite/web3-provider-engine/node_modules/@ethereumjs/common": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-2.6.5.tgz", + "integrity": "sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==", + "dependencies": { + "crc-32": "^1.2.0", + "ethereumjs-util": "^7.1.5" + } + }, + "node_modules/@trufflesuite/web3-provider-engine/node_modules/@ethereumjs/common/node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@trufflesuite/web3-provider-engine/node_modules/@ethereumjs/tx": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-3.5.2.tgz", + "integrity": "sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw==", + "dependencies": { + "@ethereumjs/common": "^2.6.4", + "ethereumjs-util": "^7.1.5" + } + }, + "node_modules/@trufflesuite/web3-provider-engine/node_modules/@ethereumjs/tx/node_modules/ethereumjs-util": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", + "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.1.2", + "create-hash": "^1.1.2", + "ethereum-cryptography": "^0.1.3", + "rlp": "^2.2.4" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@trufflesuite/web3-provider-engine/node_modules/async": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", @@ -8264,11 +8361,6 @@ "lodash": "^4.17.14" } }, - "node_modules/@trufflesuite/web3-provider-engine/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" - }, "node_modules/@trufflesuite/web3-provider-engine/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -8305,6 +8397,11 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/@trufflesuite/web3-provider-engine/node_modules/ethereumjs-util/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/@trufflesuite/web3-provider-engine/node_modules/rlp": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", @@ -8316,11 +8413,6 @@ "rlp": "bin/rlp" } }, - "node_modules/@trufflesuite/web3-provider-engine/node_modules/rlp/node_modules/bn.js": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", - "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" - }, "node_modules/@trufflesuite/web3-provider-engine/node_modules/ws": { "version": "5.2.3", "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.3.tgz", @@ -8383,9 +8475,9 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.2.tgz", - "integrity": "sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==", + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.18.3.tgz", + "integrity": "sha512-1kbcJ40lLB7MHsj39U4Sh1uTd2E7rLEa79kmDpI6cy+XiXsteB3POdQomoq4FxszMrO3ZYchkhYJw7A2862b3w==", "dev": true, "dependencies": { "@babel/types": "^7.3.0" @@ -8757,9 +8849,9 @@ } }, "node_modules/@types/yargs": { - "version": "17.0.14", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.14.tgz", - "integrity": "sha512-9Pj7abXoW1RSTcZaL2Hk6G2XyLMlp5ECdVC/Zf2p/KBjC3srijLGgRAXOBjtFrJoIrvxdTKyKDA14bEcbxBaWw==", + "version": "17.0.15", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.15.tgz", + "integrity": "sha512-ZHc4W2dnEQPfhn06TBEdWaiUHEZAocYaiVMfwOipY5jcJt/251wVrKCBWBetGZWO5CF8tdb7L3DmdxVlZ2BOIg==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -10874,9 +10966,9 @@ } }, "node_modules/cacache/node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz", + "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -13902,6 +13994,11 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/ethereumjs-account/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/ethereumjs-account/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -13938,11 +14035,6 @@ "safe-buffer": "^5.1.1" } }, - "node_modules/ethereumjs-account/node_modules/ethereumjs-util/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" - }, "node_modules/ethereumjs-account/node_modules/rlp": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", @@ -13954,6 +14046,11 @@ "rlp": "bin/rlp" } }, + "node_modules/ethereumjs-account/node_modules/rlp/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, "node_modules/ethereumjs-block": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", @@ -14158,6 +14255,11 @@ "rlp": "bin/rlp" } }, + "node_modules/ethereumjs-util/node_modules/rlp/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, "node_modules/ethereumjs-vm": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", @@ -14892,9 +14994,9 @@ } }, "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz", + "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -16450,9 +16552,9 @@ ] }, "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz", + "integrity": "sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==", "engines": { "node": ">= 4" } @@ -20197,9 +20299,9 @@ } }, "node_modules/lightningcss": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.16.1.tgz", - "integrity": "sha512-zU8OTaps3VAodmI2MopfqqOQQ4A9L/2Eo7xoTH/4fNkecy6ftfiGwbbRMTQqtIqJjRg3f927e+lnyBBPhucY1Q==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.17.0.tgz", + "integrity": "sha512-flO6jocjeV0MUDkYCtg1+jwLqAlqrV/t3n7rUrJ6/tcntm5zfBXsewwOj7PSSv9iTNqFKJX8zIkx/M1W2AG3kw==", "dev": true, "dependencies": { "detect-libc": "^1.0.3" @@ -20212,20 +20314,20 @@ "url": "https://opencollective.com/parcel" }, "optionalDependencies": { - "lightningcss-darwin-arm64": "1.16.1", - "lightningcss-darwin-x64": "1.16.1", - "lightningcss-linux-arm-gnueabihf": "1.16.1", - "lightningcss-linux-arm64-gnu": "1.16.1", - "lightningcss-linux-arm64-musl": "1.16.1", - "lightningcss-linux-x64-gnu": "1.16.1", - "lightningcss-linux-x64-musl": "1.16.1", - "lightningcss-win32-x64-msvc": "1.16.1" + "lightningcss-darwin-arm64": "1.17.0", + "lightningcss-darwin-x64": "1.17.0", + "lightningcss-linux-arm-gnueabihf": "1.17.0", + "lightningcss-linux-arm64-gnu": "1.17.0", + "lightningcss-linux-arm64-musl": "1.17.0", + "lightningcss-linux-x64-gnu": "1.17.0", + "lightningcss-linux-x64-musl": "1.17.0", + "lightningcss-win32-x64-msvc": "1.17.0" } }, "node_modules/lightningcss-darwin-arm64": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.16.1.tgz", - "integrity": "sha512-/J898YSAiGVqdybHdIF3Ao0Hbh2vyVVj5YNm3NznVzTSvkOi3qQCAtO97sfmNz+bSRHXga7ZPLm+89PpOM5gAg==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.17.0.tgz", + "integrity": "sha512-k8/9PaFUZ7ISS5XGDo3RLRUoj1Yf0yNvjYsU4n8TqjE7kCZY0eJaYb6PFvFba1RQ2i3EX5SFiW9nxrEctU+o1A==", "cpu": [ "arm64" ], @@ -20243,9 +20345,9 @@ } }, "node_modules/lightningcss-darwin-x64": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.16.1.tgz", - "integrity": "sha512-vyKCNPRNRqke+5i078V+N0GLfMVLEaNcqIcv28hA/vUNRGk/90EDkDB9EndGay0MoPIrC2y0qE3Y74b/OyedqQ==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.17.0.tgz", + "integrity": "sha512-tkY6IsflCzU63/QlM5L+ygIRMnnJdx2l7ay7dphEhMw1I2Rf3vQli8N/Lj3MSxFe5srJwxv2leDM9VzVhKFm3Q==", "cpu": [ "x64" ], @@ -20263,9 +20365,9 @@ } }, "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.16.1.tgz", - "integrity": "sha512-0AJC52l40VbrzkMJz6qRvlqVVGykkR2MgRS4bLjVC2ab0H0I/n4p6uPZXGvNIt5gw1PedeND/hq+BghNdgfuPQ==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.17.0.tgz", + "integrity": "sha512-bvACFOvKv3Ls8d5OPG0sCCKV44/cr2UMDceWc4qXHQ3cKoeyduuqitYF9Ez6U7OmyI5B2MEXB8ttyRdr1oL/pg==", "cpu": [ "arm" ], @@ -20283,9 +20385,9 @@ } }, "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.16.1.tgz", - "integrity": "sha512-NqxYXsRvI3/Fb9AQLXKrYsU0Q61LqKz5It+Es9gidsfcw1lamny4lmlUgO3quisivkaLCxEkogaizcU6QeZeWQ==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.17.0.tgz", + "integrity": "sha512-tLX4TtLg5h8RQjZuB8qXJ9bi2i16e70E+hKXCAV84KgjcAkjcBq1f9xuo5NNg7/+gyLvzdpUEOtmMd5FK5dMqQ==", "cpu": [ "arm64" ], @@ -20303,9 +20405,9 @@ } }, "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.16.1.tgz", - "integrity": "sha512-VUPQ4dmB9yDQxpJF8/imtwNcbIPzlL6ArLHSUInOGxipDk1lOAklhUjbKUvlL3HVlDwD3WHCxggAY01WpFcjiA==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.17.0.tgz", + "integrity": "sha512-HtXlBG7mKDBGqqxKzyFb4m7BeJhO2jc+KGwcNz/3BJcQLGDbUyInVHC2kwIDtlVQi5Ugn7Hg+Q/kSOyYdnuQ3A==", "cpu": [ "arm64" ], @@ -20323,9 +20425,9 @@ } }, "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.16.1.tgz", - "integrity": "sha512-A40Jjnbellnvh4YF+kt047GLnUU59iLN2LFRCyWQG+QqQZeXOCzXfTQ6EJB4yvHB1mQvWOVdAzVrtEmRw3Vh8g==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.17.0.tgz", + "integrity": "sha512-xANXvOqArvnYjEGKZkjmeAvX1nchcdMZ3mYU7XbEzs9mPWbP4fyJ2AWmClslX3PyW2i1lRXsN9lFP515shsBEw==", "cpu": [ "x64" ], @@ -20343,9 +20445,9 @@ } }, "node_modules/lightningcss-linux-x64-musl": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.16.1.tgz", - "integrity": "sha512-VZf76GxW+8mk238tpw0u9R66gBi/m0YB0TvD54oeGiOqvTZ/mabkBkbsuXTSWcKYj8DSrLW+A42qu+6PLRsIgA==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.17.0.tgz", + "integrity": "sha512-F4mZ9uPMD35wegJvyVOvfSuX+Xuu6N0kqNsw5o0cX0SVLEbYXh5xhXXgr/V1aS4VPGqqMR+HoSJV5FJ/g3DvEA==", "cpu": [ "x64" ], @@ -20363,9 +20465,9 @@ } }, "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.16.1.tgz", - "integrity": "sha512-Djy+UzlTtJMayVJU3eFuUW5Gdo+zVTNPJhlYw25tNC9HAoMCkIdSDDrGsWEdEyibEV7xwB8ySTmLuxilfhBtgg==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.17.0.tgz", + "integrity": "sha512-PbG+MTGVmIM0oEPUEBECnnYH4E+wlABWf98n0O7BJhoX4jcakbqn6v1LdIT6ogE/5T4i9HAlnr7k/J9M5u4qww==", "cpu": [ "x64" ], @@ -20931,6 +21033,11 @@ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==" }, + "node_modules/merkle-patricia-tree/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/merkle-patricia-tree/node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -20967,11 +21074,6 @@ "safe-buffer": "^5.1.1" } }, - "node_modules/merkle-patricia-tree/node_modules/ethereumjs-util/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" - }, "node_modules/merkle-patricia-tree/node_modules/rlp": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", @@ -20983,6 +21085,11 @@ "rlp": "bin/rlp" } }, + "node_modules/merkle-patricia-tree/node_modules/rlp/node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -21408,9 +21515,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/msgpackr": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.8.0.tgz", - "integrity": "sha512-1Cos3r86XACdjLVY4CN8r72Cgs5lUzxSON6yb81sNZP9vC9nnBrEbu1/ldBhuR9BKejtoYV5C9UhmYUvZFJSNQ==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.8.1.tgz", + "integrity": "sha512-05fT4J8ZqjYlR4QcRDIhLCYKUOHXk7C/xa62GzMKj74l3up9k2QZ3LgFc6qWdsPHl91QA2WLWqWc8b8t7GLNNw==", "dev": true, "optionalDependencies": { "msgpackr-extract": "^2.2.0" @@ -21442,6 +21549,7 @@ "version": "10.0.1", "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-10.0.1.tgz", "integrity": "sha512-G5upNcGzEGuTHkzxezPrrD6CaIHR9uo+7MwqhNVcXTs33IInon4y7nMiGxl2CY5hG7chvYQUQhz5V52/Qe3cbg==", + "deprecated": "This module is deprecated, please upgrade to @multiformats/multiaddr", "dependencies": { "dns-over-http-resolver": "^1.2.3", "err-code": "^3.0.1", @@ -21455,6 +21563,7 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/multiaddr-to-uri/-/multiaddr-to-uri-8.0.0.tgz", "integrity": "sha512-dq4p/vsOOUdVEd1J1gl+R2GFrXJQH8yjLtz4hodqdVbieg39LvBOdMQRdQnfbg5LSM/q1BYNVf5CBbwZFFqBgA==", + "deprecated": "This module is deprecated, please upgrade to @multiformats/multiaddr-to-uri", "dependencies": { "multiaddr": "^10.0.0" } @@ -28327,11 +28436,6 @@ "ethereumjs-util": "^7.1.2" } }, - "node_modules/web3-eth-accounts/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" - }, "node_modules/web3-eth-accounts/node_modules/eth-lib": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.8.tgz", @@ -28342,6 +28446,11 @@ "xhr-request-promise": "^0.1.2" } }, + "node_modules/web3-eth-accounts/node_modules/eth-lib/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, "node_modules/web3-eth-contract": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.8.1.tgz", diff --git a/package.json b/package.json index 30b890cf5..2c28e42b8 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,9 @@ "license": "GPL-3.0", "dependencies": { "@aragon/wrapper": "5.5.3", - "@ethereumjs/common": "2.6.5", - "@ethereumjs/tx": "3.5.1", + "@ethereumjs/common": "3.0.1", + "@ethereumjs/tx": "4.0.1", + "@ethereumjs/util": "8.0.2", "@ethersproject/contracts": "5.7.0", "@ethersproject/providers": "5.7.2", "@framelabs/pylon-client": "0.0.9", @@ -82,7 +83,6 @@ "electron-updater": "5.3.0", "eth-ens-namehash": "2.0.8", "eth-provider": "0.13.6", - "ethereumjs-util": "7.1.5", "ethers": "5.7.2", "extract-zip": "2.0.1", "fs-extra": "10.1.0", diff --git a/resources/colors/index.ts b/resources/colors/index.ts index b451c5286..a0dfbd6ad 100644 --- a/resources/colors/index.ts +++ b/resources/colors/index.ts @@ -1,4 +1,4 @@ -import { padToEven } from 'ethereumjs-util' +import { padToEven } from '@ethereumjs/util' const light: ColorwayPalette = { accent1: { r: 0, g: 170, b: 120 }, diff --git a/resources/utils/index.ts b/resources/utils/index.ts index 40b308a47..2f9eb37a1 100644 --- a/resources/utils/index.ts +++ b/resources/utils/index.ts @@ -1,5 +1,5 @@ import { randomInt } from 'crypto' -import { addHexPrefix, intToHex, stripHexPrefix } from 'ethereumjs-util' +import { addHexPrefix, intToHex, stripHexPrefix } from '@ethereumjs/util' import { getAddress as getChecksumAddress } from '@ethersproject/address'; const weiToGwei = (wei: number) => wei / 1e9 diff --git a/test/app/App/Account/Account/Requests/TransactionRequest/AdjustFee/index.test.js b/test/app/App/Account/Account/Requests/TransactionRequest/AdjustFee/index.test.js index 412b31cba..941139faa 100644 --- a/test/app/App/Account/Account/Requests/TransactionRequest/AdjustFee/index.test.js +++ b/test/app/App/Account/Account/Requests/TransactionRequest/AdjustFee/index.test.js @@ -1,6 +1,6 @@ import React from 'react' import Restore from 'react-restore' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import BigNumber from 'bignumber.js' import store from '../../../../../../../../main/store' diff --git a/test/app/App/Account/Account/Requests/TransactionRequest/TxFeeNew/index.test.js b/test/app/App/Account/Account/Requests/TransactionRequest/TxFeeNew/index.test.js index 6af3909fa..23a4b6680 100644 --- a/test/app/App/Account/Account/Requests/TransactionRequest/TxFeeNew/index.test.js +++ b/test/app/App/Account/Account/Requests/TransactionRequest/TxFeeNew/index.test.js @@ -1,6 +1,6 @@ import React from 'react' import Restore from 'react-restore' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import store from '../../../../../../../../main/store' import { setupComponent } from '../../../../../../../componentSetup' diff --git a/test/app/App/Panel/Main/Account/Requests/TransactionRequest/TxApproval/approvals/TokenSpend/index.test.js b/test/app/App/Panel/Main/Account/Requests/TransactionRequest/TxApproval/approvals/TokenSpend/index.test.js index 24d743417..a231577db 100644 --- a/test/app/App/Panel/Main/Account/Requests/TransactionRequest/TxApproval/approvals/TokenSpend/index.test.js +++ b/test/app/App/Panel/Main/Account/Requests/TransactionRequest/TxApproval/approvals/TokenSpend/index.test.js @@ -1,6 +1,6 @@ import React from 'react' import { fireEvent, render } from '@testing-library/react' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import Restore from 'react-restore' import store from '../../../../../../../../../../../main/store' diff --git a/test/main/accounts/index.test.js b/test/main/accounts/index.test.js index fca48093e..a51e26d10 100644 --- a/test/main/accounts/index.test.js +++ b/test/main/accounts/index.test.js @@ -1,5 +1,5 @@ import log from 'electron-log' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import BigNumber from 'bignumber.js' import store from '../../../main/store' diff --git a/test/main/chains/config/index.test.js b/test/main/chains/config/index.test.js index 271c588ef..e23818b1c 100644 --- a/test/main/chains/config/index.test.js +++ b/test/main/chains/config/index.test.js @@ -4,7 +4,7 @@ describe('polygon', () => { it('sets the chain id', () => { const config = chainConfig(137) - expect(config.chainIdBN().toNumber()).toBe(137) + expect(config.chainId()).toBe(BigInt(137)) }) it('sets EIP-1559 to be disabled by default', () => { diff --git a/test/main/chains/index.test.js b/test/main/chains/index.test.js index cc597c466..de7f276ba 100644 --- a/test/main/chains/index.test.js +++ b/test/main/chains/index.test.js @@ -1,5 +1,5 @@ import EventEmitter from 'events' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import log from 'electron-log' import store from '../../../main/store' diff --git a/test/main/externalData/balances/scan.test.js b/test/main/externalData/balances/scan.test.js index 90a543109..da05a6b0a 100644 --- a/test/main/externalData/balances/scan.test.js +++ b/test/main/externalData/balances/scan.test.js @@ -3,7 +3,7 @@ import multicall, { supportsChain } from '../../../../main/multicall' import log from 'electron-log' import { ethers } from 'ethers' -import { addHexPrefix, padToEven } from 'ethereumjs-util' +import { addHexPrefix, padToEven } from '@ethereumjs/util' import ethProvider from 'eth-provider' import BigNumber from 'bignumber.js' diff --git a/test/main/provider/helpers.test.js b/test/main/provider/helpers.test.js index cc092e131..e20e529de 100644 --- a/test/main/provider/helpers.test.js +++ b/test/main/provider/helpers.test.js @@ -1,5 +1,5 @@ import log from 'electron-log' -import { fromUtf8 } from 'ethereumjs-util' +import { fromUtf8 } from '@ethereumjs/util' import { getRawTx, getSignedAddress, processTxForGasFees } from '../../../main/provider/helpers' import store from '../../../main/store' import { GasFeesSource } from '../../../resources/domain/transaction' diff --git a/test/main/provider/index.test.js b/test/main/provider/index.test.js index a99a83e95..d3effbb53 100644 --- a/test/main/provider/index.test.js +++ b/test/main/provider/index.test.js @@ -9,7 +9,7 @@ import { Type as SignerType } from '../../../resources/domain/signer' import { validate as validateUUID } from 'uuid' import { utils } from 'ethers' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import log from 'electron-log' import { SignTypedDataVersion } from '@metamask/eth-sig-util' diff --git a/test/main/signers/hot/HotSigner/worker.test.js b/test/main/signers/hot/HotSigner/worker.test.js index a10ad2077..200c637bb 100644 --- a/test/main/signers/hot/HotSigner/worker.test.js +++ b/test/main/signers/hot/HotSigner/worker.test.js @@ -32,14 +32,14 @@ describe('#signTransaction', () => { const chains = [ { name: 'mainnet', chainId: 1, expectedSignature: '0xf8698084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f480008025a0c8ca5f76f568578bebbdfc257be09d8e8a4512d0ffd45e991da86be8141d97e0a037179047d9810e211657d9dd60d4bac66ed576fd65ef65a55f007314587036ec' }, - { name: 'rinkeby', chainId: 4, expectedSignature: '0xf8698084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f48000802ca0c711e0a0f6881bb8a4b8fff57f2ddd7539a1f72acd59706b2e2765c16dc05155a0698f6af80657857a0e8ba47632995fbec987bc427abf88d1c1c65c80dd67c8b9' }, { name: 'goerli', chainId: 5, expectedSignature: '0xf8698084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f48000802da074c3b69fa979e92253c7f66d323f91f7f11eb16dd2b4838a274b584ddb708895a03e76e91351b2be3fd4a065195a0c71a4359d0fe4230f5f3ae457b2cb5a30bf03' }, - { name: 'optimism', chainId: 10, expectedSignature: '0xf8698084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f480008024a0ac95e29896e43248e2e91cbedb4fb367c3a4bf3100ac55ebf914ed8582f4e189a0240abc49b1178721a08cba8c95aea43f2a6daf2da34f7c9641fc1de253edada8' }, - { name: 'optimistic kovan', chainId: 69, expectedSignature: '0xf8698084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f48000807ea08e096de4291afc19b88e46fa0bfb4e9d5a1073fb9e9534f7c0cb89ff81641a1ba05b357d98228466f265b4e782b80d78baba244af2fb335b77754a82fff471a0a4' }, - { name: 'xdai', chainId: 100, expectedSignature: '0xf86a8084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f480008081a3a0de2c8b5a1ecccdb10fe7e524ff751cd15c8f93284c7cbb7de2a13a0e481bac83a01260a408c58b7d783be08fe6d073b5390581225ec48e8b9fafe97ce096870c89' }, - { name: 'polygon', chainId: 137, expectedSignature: '0xf86a8084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f480008081d5a0d62d318003814f6ba963495353111d6923207ba972b539c49d89ad06a9062f2da00ff0ec849d44a6768262fafb040e343e2d2472c4eee8c833eacb2321038c7737' }, - { name: 'arbitrum', chainId: 42161, expectedSignature: '0xf8698084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f480008024a0ac95e29896e43248e2e91cbedb4fb367c3a4bf3100ac55ebf914ed8582f4e189a0240abc49b1178721a08cba8c95aea43f2a6daf2da34f7c9641fc1de253edada8' }, - { name: 'polygon-mumbai', chainId: 80001, expectedSignature: '0xf86b8084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f4800080826c95a0202d3b445db101e46ed9f91c6849117efa00a98fb52da4612d2790de1e1f6749a01a050bcb2819efe1bfd1276aa1fcc7ee66cd700a52f261cabb376f4e75d660be' } + { name: 'optimism', chainId: 10, expectedSignature: '0xf8698084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f480008037a06340cc640986ddbc095d65bdd5217e4f25168e0fb7d097e4f6ce1c739e4adb96a0645e1173cf2fdc318c4af839dd52a3dc408b0c60b0246e96a0b0f5bf7edbe614' }, + { name: 'optimistic kovan', chainId: 69, expectedSignature: '0xf86a8084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f480008081aea0a0df2fd26c2f8a5e9531d6cbe7c8246d2f82a1524e17c545076e7637e0dcf338a028629bc1ae46c5e27eeb2cb41b9a87618e2224778138be8cb4e5c17d1c8d3494' }, + { name: 'xdai', chainId: 100, expectedSignature: '0xf86a8084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f480008081eba021839bde3d4c41b1fb83c5c97e7d9cb4f4d4fc86fc338faa44a3a223db4213a5a0157a154afec7aa17cd94f9c7a6a1545f701a99f0e1edb4997504eb9fd3ad8813' }, + { name: 'polygon', chainId: 137, expectedSignature: '0xf86b8084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f4800080820135a09235ef8a65bff6d8e117bd13653fafcb2225763f4a11aa29886464530e009cfaa03fcd6b8ac39c1b3f375efcd3e4558b5c44cf167f2de800a63a008a86ed3dba25' }, + { name: 'arbitrum', chainId: 42161, expectedSignature: '0xf86c8084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f480008083014985a07f874b1f31b10c8ec507f74a3803f6d6a52e93790e9e502bcf74b2cc07bb169aa013ff12c35ed91966d8e3f042971c0fab1d236f5888af7315007baa0eab0938c9' }, + { name: 'polygon-mumbai', chainId: 80001, expectedSignature: '0xf86c8084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f480008083027126a00f42c66986e1d7ca6e77891e3cf0cd8fe360ed0a92732523bf29756f18e37255a07688e781db1d625a2c4234c5a61c3a9093643a326060caf5b58ad05fdf1f4233' }, + { name: 'sepolia', chainId: 11155111, expectedSignature: '0xf86d8084b2d05e0082520894be188d6641e8b680743a4815dfa0f6208038960f86b5e620f48000808401546d72a0cf0656010c7e68ba6ad17a528f1e0280ec7b96ae93a2edbee399e771a2d46c85a07d77731cb4218a55bccc690d49238a82bc3051884356eb57bc2e582b57d5a46a' } ] chains.forEach(chain => { diff --git a/test/main/signers/lattice/Lattice/index.test.js b/test/main/signers/lattice/Lattice/index.test.js index 3d9cbcdb3..64b6eedb5 100644 --- a/test/main/signers/lattice/Lattice/index.test.js +++ b/test/main/signers/lattice/Lattice/index.test.js @@ -549,14 +549,19 @@ describe('#signTransaction', () => { expect(opts.data.signerPath[4]).toBe(4) expect(parseInt(opts.data.chainId)).toBe(137) - return expectedSignature + return { + sig: { + ...expectedSignature.sig, + v: Buffer.from('1b', 'hex') + } + } } catch (e) { done(e) } }) lattice.signTransaction(4, txToSign, (err, res) => { try { expect(err).toBe(null) - expect(res).toBe('0xcf80808080808080833ea8cd8396f7a0') + expect(res).toBe('0xcf8080808080801b833ea8cd8396f7a0') done() } catch (e) { done(e) } }) diff --git a/test/main/store/actions/index.test.js b/test/main/store/actions/index.test.js index 7d1298796..4278b2fbe 100644 --- a/test/main/store/actions/index.test.js +++ b/test/main/store/actions/index.test.js @@ -1,6 +1,6 @@ import BigNumber from 'bignumber.js' import log from 'electron-log' -import { addHexPrefix } from 'ethereumjs-util' +import { addHexPrefix } from '@ethereumjs/util' import { addNetwork as addNetworkAction, diff --git a/test/main/transaction/index.test.js b/test/main/transaction/index.test.js index b0ce648c3..454b5834c 100644 --- a/test/main/transaction/index.test.js +++ b/test/main/transaction/index.test.js @@ -1,5 +1,5 @@ -import { addHexPrefix, stripHexPrefix } from 'ethereumjs-util' -import Common from '@ethereumjs/common' +import { addHexPrefix, stripHexPrefix } from '@ethereumjs/util' +import { Common } from '@ethereumjs/common' import { maxFee, londonToLegacy, signerCompatibility, populate, sign } from '../../../main/transaction' import { GasFeesSource } from '../../../resources/domain/transaction' @@ -415,6 +415,7 @@ describe('#populate', () => { describe('#sign', () => { const baseTx = { + chainId: '0x1', nonce: '0x33', gasLimit: '0x61a8', value: '0x6f05b59d3b20000', @@ -435,13 +436,17 @@ describe('#sign', () => { gasPrice: '0x737be7600' } - const { type, ...expectedFields } = rawTx - const signedTx = await sign(rawTx, jest.fn().mockResolvedValueOnce(signature)) + const sig = { + ...signature, v: addHexPrefix((27).toString(16)) + } - expect(signedTx.toJSON()).toMatchObject({ + const { type, chainId, ...expectedFields } = rawTx + const signedTx = await sign(rawTx, jest.fn().mockResolvedValueOnce(sig)) + + expect(signedTx.toJSON()).toStrictEqual({ ...expectedFields, ...signature, - v: '0x0' // additional zeroes are stripped + v: '0x1b' }) }) @@ -465,14 +470,14 @@ describe('#sign', () => { it('adds hex prefixes to the signature', async () => { const signedTx = await sign(baseTx, jest.fn().mockResolvedValueOnce({ - v: stripHexPrefix(signature.v), + v: stripHexPrefix('0x1b'), r: stripHexPrefix(signature.r), s: stripHexPrefix(signature.s) })) expect(signedTx.toJSON()).toMatchObject({ ...signature, - v: '0x0' // additional zeroes are stripped + v: '0x1b' }) }) }) diff --git a/test/util.js b/test/util.js index 0b2ad4f1b..b9d512124 100644 --- a/test/util.js +++ b/test/util.js @@ -1,4 +1,4 @@ -const { addHexPrefix } = require('ethereumjs-util') +const { addHexPrefix } = require('@ethereumjs/util') export const weiToHex = wei => addHexPrefix(wei.toString(16)) export const gweiToHex = gwei => weiToHex(gwei * 1e9)