MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / passArrayJsValueToWasm0

Function passArrayJsValueToWasm0

ppom/src/ppom.js:234–242  ·  view source on GitHub ↗
(array, malloc)

Source from the content-addressed store, hash-verified

232}
233
234function passArrayJsValueToWasm0(array, malloc) {
235 const ptr = malloc(array.length * 4, 4) >>> 0;
236 const mem = getUint32Memory0();
237 for (let i = 0; i < array.length; i++) {
238 mem[ptr / 4 + i] = addHeapObject(array[i]);
239 }
240 WASM_VECTOR_LEN = array.length;
241 return ptr;
242}
243
244function handleError(f, args) {
245 try {

Callers 1

newMethod · 0.85

Calls 2

getUint32Memory0Function · 0.85
addHeapObjectFunction · 0.85

Tested by

no test coverage detected