Skip to main content
Version: Next

Variable: toHexString

const toHexString: (value) => string = toHex

Defined in: src/utils/num.ts:75

Alias of ToHex

Convert BigNumberish to hex-string

Parameters

value

BigNumberish

value to convert

Returns

string

converted number in hex-string format

Example

toHex(100); // '0x64'
toHex('200'); // '0xc8'
toHex('0x00023AB'); // '0x23ab'