@acala-network/chopsticks-executor 0.8.5-1 → 0.8.5-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/chopsticks_executor.js +100 -100
- package/browser/index.js +2 -2
- package/node/chopsticks_executor.js +103 -103
- package/node/chopsticks_executor_bg.wasm +0 -0
- package/package.json +2 -2
|
@@ -4,42 +4,15 @@ const heap = new Array(128).fill(undefined);
|
|
|
4
4
|
|
|
5
5
|
heap.push(undefined, null, true, false);
|
|
6
6
|
|
|
7
|
-
function getObject(idx) { return heap[idx]; }
|
|
8
|
-
|
|
9
7
|
let heap_next = heap.length;
|
|
10
8
|
|
|
11
|
-
function
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
heap_next = idx;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function takeObject(idx) {
|
|
18
|
-
const ret = getObject(idx);
|
|
19
|
-
dropObject(idx);
|
|
20
|
-
return ret;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function isLikeNone(x) {
|
|
24
|
-
return x === undefined || x === null;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
let cachedFloat64Memory0 = null;
|
|
28
|
-
|
|
29
|
-
function getFloat64Memory0() {
|
|
30
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
31
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
32
|
-
}
|
|
33
|
-
return cachedFloat64Memory0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
let cachedInt32Memory0 = null;
|
|
9
|
+
function addHeapObject(obj) {
|
|
10
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
11
|
+
const idx = heap_next;
|
|
12
|
+
heap_next = heap[idx];
|
|
37
13
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
41
|
-
}
|
|
42
|
-
return cachedInt32Memory0;
|
|
14
|
+
heap[idx] = obj;
|
|
15
|
+
return idx;
|
|
43
16
|
}
|
|
44
17
|
|
|
45
18
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
@@ -60,13 +33,18 @@ function getStringFromWasm0(ptr, len) {
|
|
|
60
33
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
61
34
|
}
|
|
62
35
|
|
|
63
|
-
function
|
|
64
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
65
|
-
const idx = heap_next;
|
|
66
|
-
heap_next = heap[idx];
|
|
36
|
+
function getObject(idx) { return heap[idx]; }
|
|
67
37
|
|
|
68
|
-
|
|
69
|
-
|
|
38
|
+
function dropObject(idx) {
|
|
39
|
+
if (idx < 132) return;
|
|
40
|
+
heap[idx] = heap_next;
|
|
41
|
+
heap_next = idx;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function takeObject(idx) {
|
|
45
|
+
const ret = getObject(idx);
|
|
46
|
+
dropObject(idx);
|
|
47
|
+
return ret;
|
|
70
48
|
}
|
|
71
49
|
|
|
72
50
|
let WASM_VECTOR_LEN = 0;
|
|
@@ -124,6 +102,28 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
124
102
|
return ptr;
|
|
125
103
|
}
|
|
126
104
|
|
|
105
|
+
function isLikeNone(x) {
|
|
106
|
+
return x === undefined || x === null;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
let cachedInt32Memory0 = null;
|
|
110
|
+
|
|
111
|
+
function getInt32Memory0() {
|
|
112
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
113
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
114
|
+
}
|
|
115
|
+
return cachedInt32Memory0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
let cachedFloat64Memory0 = null;
|
|
119
|
+
|
|
120
|
+
function getFloat64Memory0() {
|
|
121
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
122
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
123
|
+
}
|
|
124
|
+
return cachedFloat64Memory0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
127
|
let cachedBigInt64Memory0 = null;
|
|
128
128
|
|
|
129
129
|
function getBigInt64Memory0() {
|
|
@@ -324,42 +324,23 @@ async function __wbg_load(module, imports) {
|
|
|
324
324
|
function __wbg_get_imports() {
|
|
325
325
|
const imports = {};
|
|
326
326
|
imports.wbg = {};
|
|
327
|
-
imports.wbg.
|
|
328
|
-
const ret =
|
|
329
|
-
return ret;
|
|
330
|
-
};
|
|
331
|
-
imports.wbg.__wbg_length_fff51ee6522a1a18 = function(arg0) {
|
|
332
|
-
const ret = getObject(arg0).length;
|
|
333
|
-
return ret;
|
|
334
|
-
};
|
|
335
|
-
imports.wbg.__wbg_get_44be0491f933a435 = function(arg0, arg1) {
|
|
336
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
327
|
+
imports.wbg.__wbg_new_b51585de1b234aff = function() {
|
|
328
|
+
const ret = new Object();
|
|
337
329
|
return addHeapObject(ret);
|
|
338
330
|
};
|
|
339
|
-
imports.wbg.
|
|
340
|
-
|
|
341
|
-
return addHeapObject(ret);
|
|
342
|
-
}, arguments) };
|
|
343
|
-
imports.wbg.__wbg_done_5c1f01fb660d73b5 = function(arg0) {
|
|
344
|
-
const ret = getObject(arg0).done;
|
|
345
|
-
return ret;
|
|
331
|
+
imports.wbg.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
|
|
332
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
346
333
|
};
|
|
347
|
-
imports.wbg.
|
|
348
|
-
const ret =
|
|
334
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
335
|
+
const ret = arg0;
|
|
349
336
|
return addHeapObject(ret);
|
|
350
337
|
};
|
|
351
|
-
imports.wbg.
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
355
|
-
const obj = getObject(arg1);
|
|
356
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
357
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
358
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
338
|
+
imports.wbg.__wbg_new_898a68150f225f2e = function() {
|
|
339
|
+
const ret = new Array();
|
|
340
|
+
return addHeapObject(ret);
|
|
359
341
|
};
|
|
360
|
-
imports.wbg.
|
|
361
|
-
|
|
362
|
-
return ret;
|
|
342
|
+
imports.wbg.__wbg_set_502d29070ea18557 = function(arg0, arg1, arg2) {
|
|
343
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
363
344
|
};
|
|
364
345
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
365
346
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -369,6 +350,21 @@ function __wbg_get_imports() {
|
|
|
369
350
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
370
351
|
return addHeapObject(ret);
|
|
371
352
|
}, arguments) };
|
|
353
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
354
|
+
takeObject(arg0);
|
|
355
|
+
};
|
|
356
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
357
|
+
const obj = getObject(arg1);
|
|
358
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
359
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
360
|
+
var len1 = WASM_VECTOR_LEN;
|
|
361
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
362
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
363
|
+
};
|
|
364
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
365
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
366
|
+
return addHeapObject(ret);
|
|
367
|
+
};
|
|
372
368
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
373
369
|
const val = getObject(arg0);
|
|
374
370
|
const ret = typeof(val) === 'object' && val !== null;
|
|
@@ -386,40 +382,44 @@ function __wbg_get_imports() {
|
|
|
386
382
|
const ret = getObject(arg0) in getObject(arg1);
|
|
387
383
|
return ret;
|
|
388
384
|
};
|
|
389
|
-
imports.wbg.
|
|
390
|
-
const
|
|
391
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
385
|
+
imports.wbg.__wbg_isArray_4c24b343cb13cfb1 = function(arg0) {
|
|
386
|
+
const ret = Array.isArray(getObject(arg0));
|
|
392
387
|
return ret;
|
|
393
388
|
};
|
|
394
|
-
imports.wbg.
|
|
395
|
-
const ret =
|
|
389
|
+
imports.wbg.__wbg_length_fff51ee6522a1a18 = function(arg0) {
|
|
390
|
+
const ret = getObject(arg0).length;
|
|
391
|
+
return ret;
|
|
392
|
+
};
|
|
393
|
+
imports.wbg.__wbg_get_44be0491f933a435 = function(arg0, arg1) {
|
|
394
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
396
395
|
return addHeapObject(ret);
|
|
397
396
|
};
|
|
398
|
-
imports.wbg.
|
|
399
|
-
getObject(arg0)
|
|
397
|
+
imports.wbg.__wbg_next_ddb3312ca1c4e32a = function() { return handleError(function (arg0) {
|
|
398
|
+
const ret = getObject(arg0).next();
|
|
399
|
+
return addHeapObject(ret);
|
|
400
|
+
}, arguments) };
|
|
401
|
+
imports.wbg.__wbg_done_5c1f01fb660d73b5 = function(arg0) {
|
|
402
|
+
const ret = getObject(arg0).done;
|
|
403
|
+
return ret;
|
|
400
404
|
};
|
|
401
|
-
imports.wbg.
|
|
402
|
-
const ret =
|
|
405
|
+
imports.wbg.__wbg_value_1695675138684bd5 = function(arg0) {
|
|
406
|
+
const ret = getObject(arg0).value;
|
|
403
407
|
return addHeapObject(ret);
|
|
404
408
|
};
|
|
405
|
-
imports.wbg.
|
|
406
|
-
|
|
409
|
+
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
410
|
+
const v = getObject(arg0);
|
|
411
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
412
|
+
return ret;
|
|
407
413
|
};
|
|
408
|
-
imports.wbg.
|
|
414
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
409
415
|
const obj = getObject(arg1);
|
|
410
|
-
const ret = typeof(obj) === '
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
414
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
415
|
-
};
|
|
416
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
417
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
418
|
-
return addHeapObject(ret);
|
|
416
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
417
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
418
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
419
419
|
};
|
|
420
|
-
imports.wbg.
|
|
421
|
-
const ret = arg0;
|
|
422
|
-
return
|
|
420
|
+
imports.wbg.__wbg_isSafeInteger_bb8e18dd21c97288 = function(arg0) {
|
|
421
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
422
|
+
return ret;
|
|
423
423
|
};
|
|
424
424
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
425
425
|
const obj = takeObject(arg0).original;
|
|
@@ -445,31 +445,31 @@ function __wbg_get_imports() {
|
|
|
445
445
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
446
446
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
447
447
|
};
|
|
448
|
-
imports.wbg.
|
|
448
|
+
imports.wbg.__wbg_getStorage_026e93c4b3224a37 = function(arg0, arg1) {
|
|
449
449
|
const ret = getObject(arg0).getStorage(takeObject(arg1));
|
|
450
450
|
return addHeapObject(ret);
|
|
451
451
|
};
|
|
452
|
-
imports.wbg.
|
|
452
|
+
imports.wbg.__wbg_getStateRoot_132cd340d2c3ee41 = function(arg0) {
|
|
453
453
|
const ret = getObject(arg0).getStateRoot();
|
|
454
454
|
return addHeapObject(ret);
|
|
455
455
|
};
|
|
456
|
-
imports.wbg.
|
|
456
|
+
imports.wbg.__wbg_getNextKey_7958d203facbb2bf = function(arg0, arg1, arg2) {
|
|
457
457
|
const ret = getObject(arg0).getNextKey(takeObject(arg1), takeObject(arg2));
|
|
458
458
|
return addHeapObject(ret);
|
|
459
459
|
};
|
|
460
|
-
imports.wbg.
|
|
460
|
+
imports.wbg.__wbg_offchainGetStorage_7e1115f73f8e3e84 = function(arg0, arg1) {
|
|
461
461
|
const ret = getObject(arg0).offchainGetStorage(takeObject(arg1));
|
|
462
462
|
return addHeapObject(ret);
|
|
463
463
|
};
|
|
464
|
-
imports.wbg.
|
|
464
|
+
imports.wbg.__wbg_offchainTimestamp_1ba1f1c7285a102f = function(arg0) {
|
|
465
465
|
const ret = getObject(arg0).offchainTimestamp();
|
|
466
466
|
return addHeapObject(ret);
|
|
467
467
|
};
|
|
468
|
-
imports.wbg.
|
|
468
|
+
imports.wbg.__wbg_offchainRandomSeed_acda4d36b1761866 = function(arg0) {
|
|
469
469
|
const ret = getObject(arg0).offchainRandomSeed();
|
|
470
470
|
return addHeapObject(ret);
|
|
471
471
|
};
|
|
472
|
-
imports.wbg.
|
|
472
|
+
imports.wbg.__wbg_offchainSubmitTransaction_82b132600d616b9f = function(arg0, arg1) {
|
|
473
473
|
const ret = getObject(arg0).offchainSubmitTransaction(takeObject(arg1));
|
|
474
474
|
return addHeapObject(ret);
|
|
475
475
|
};
|