MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / looseArrayify

Function looseArrayify

lib.esm/wallet/utils.js:5–10  ·  view source on GitHub ↗
(hexString)

Source from the content-addressed store, hash-verified

3 */
4import { getBytesCopy, assertArgument, toUtf8Bytes } from "../utils/index.js";
5export function looseArrayify(hexString) {
6 if (typeof (hexString) === "string" && !hexString.startsWith("0x")) {
7 hexString = "0x" + hexString;
8 }
9 return getBytesCopy(hexString);
10}
11export function zpad(value, length) {
12 value = String(value);
13 while (value.length < length) {

Callers 3

decryptCrowdsaleJsonFunction · 0.90
decryptCrowdsaleJsonFunction · 0.90
spelunkFunction · 0.70

Calls 1

getBytesCopyFunction · 0.90

Tested by

no test coverage detected