MCPcopy Create free account
hub / github.com/NomicFoundation/hardhat / bytesToNumber

Function bytesToNumber

packages/hardhat-utils/src/number.ts:25–27  ·  view source on GitHub ↗
(bytes: Uint8Array)

Source from the content-addressed store, hash-verified

23 * @returns The converted number.
24 */
25export function bytesToNumber(bytes: Uint8Array): number {
26 return hexStringToNumber(bytesToHexString(bytes));
27}
28
29/**
30 * Converts a non-negative safe integer or bigint to a Uint8Array.

Callers 5

#getSignedTransactionMethod · 0.90
#maybeConsoleLogMethod · 0.90
#decodeMethod · 0.90
createTxFunction · 0.85
number.tsFile · 0.85

Calls 2

hexStringToNumberFunction · 0.85
bytesToHexStringFunction · 0.85

Tested by

no test coverage detected