MCPcopy Index your code
hub / github.com/subquery/subql / wrappedNumToU8a

Function wrappedNumToU8a

packages/utils/src/types/u8aUtils.ts:13–18  ·  view source on GitHub ↗
(num: number)

Source from the content-addressed store, hash-verified

11 */
12
13export function wrappedNumToU8a(num: number): Uint8Array {
14 if (num >= 0) {
15 return numberToU8a(num);
16 }
17 return u8aConcat(new Uint8Array([0]), numberToU8a(Math.abs(num)));
18}

Callers 2

Int.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected