@acala-network/chopsticks-executor 0.7.1 → 0.7.2
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/chopsticks_executor.js +121 -121
- package/chopsticks_executor_bg.wasm +0 -0
- package/package.json +1 -1
package/chopsticks_executor.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let imports = {};
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
|
-
const {
|
|
4
|
+
const { TextEncoder, TextDecoder } = require(`util`);
|
|
5
5
|
|
|
6
6
|
const heap = new Array(128).fill(undefined);
|
|
7
7
|
|
|
@@ -9,45 +9,7 @@ heap.push(undefined, null, true, false);
|
|
|
9
9
|
|
|
10
10
|
function getObject(idx) { return heap[idx]; }
|
|
11
11
|
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
function dropObject(idx) {
|
|
15
|
-
if (idx < 132) return;
|
|
16
|
-
heap[idx] = heap_next;
|
|
17
|
-
heap_next = idx;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function takeObject(idx) {
|
|
21
|
-
const ret = getObject(idx);
|
|
22
|
-
dropObject(idx);
|
|
23
|
-
return ret;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function isLikeNone(x) {
|
|
27
|
-
return x === undefined || x === null;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
let cachedFloat64Memory0 = null;
|
|
31
|
-
|
|
32
|
-
function getFloat64Memory0() {
|
|
33
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
34
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
35
|
-
}
|
|
36
|
-
return cachedFloat64Memory0;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
let cachedInt32Memory0 = null;
|
|
40
|
-
|
|
41
|
-
function getInt32Memory0() {
|
|
42
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
43
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
44
|
-
}
|
|
45
|
-
return cachedInt32Memory0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
49
|
-
|
|
50
|
-
cachedTextDecoder.decode();
|
|
12
|
+
let WASM_VECTOR_LEN = 0;
|
|
51
13
|
|
|
52
14
|
let cachedUint8Memory0 = null;
|
|
53
15
|
|
|
@@ -58,22 +20,6 @@ function getUint8Memory0() {
|
|
|
58
20
|
return cachedUint8Memory0;
|
|
59
21
|
}
|
|
60
22
|
|
|
61
|
-
function getStringFromWasm0(ptr, len) {
|
|
62
|
-
ptr = ptr >>> 0;
|
|
63
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function addHeapObject(obj) {
|
|
67
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
68
|
-
const idx = heap_next;
|
|
69
|
-
heap_next = heap[idx];
|
|
70
|
-
|
|
71
|
-
heap[idx] = obj;
|
|
72
|
-
return idx;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
let WASM_VECTOR_LEN = 0;
|
|
76
|
-
|
|
77
23
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
78
24
|
|
|
79
25
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -127,6 +73,60 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
127
73
|
return ptr;
|
|
128
74
|
}
|
|
129
75
|
|
|
76
|
+
function isLikeNone(x) {
|
|
77
|
+
return x === undefined || x === null;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
let cachedInt32Memory0 = null;
|
|
81
|
+
|
|
82
|
+
function getInt32Memory0() {
|
|
83
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
84
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
85
|
+
}
|
|
86
|
+
return cachedInt32Memory0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
let heap_next = heap.length;
|
|
90
|
+
|
|
91
|
+
function dropObject(idx) {
|
|
92
|
+
if (idx < 132) return;
|
|
93
|
+
heap[idx] = heap_next;
|
|
94
|
+
heap_next = idx;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function takeObject(idx) {
|
|
98
|
+
const ret = getObject(idx);
|
|
99
|
+
dropObject(idx);
|
|
100
|
+
return ret;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
104
|
+
|
|
105
|
+
cachedTextDecoder.decode();
|
|
106
|
+
|
|
107
|
+
function getStringFromWasm0(ptr, len) {
|
|
108
|
+
ptr = ptr >>> 0;
|
|
109
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function addHeapObject(obj) {
|
|
113
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
114
|
+
const idx = heap_next;
|
|
115
|
+
heap_next = heap[idx];
|
|
116
|
+
|
|
117
|
+
heap[idx] = obj;
|
|
118
|
+
return idx;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
let cachedFloat64Memory0 = null;
|
|
122
|
+
|
|
123
|
+
function getFloat64Memory0() {
|
|
124
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
125
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
126
|
+
}
|
|
127
|
+
return cachedFloat64Memory0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
130
|
let cachedBigInt64Memory0 = null;
|
|
131
131
|
|
|
132
132
|
function getBigInt64Memory0() {
|
|
@@ -293,43 +293,34 @@ function __wbg_adapter_106(arg0, arg1, arg2, arg3) {
|
|
|
293
293
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h14b58699f4ec867c(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
module.exports.
|
|
297
|
-
const
|
|
298
|
-
const ret = typeof(
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
const ret = getObject(arg0)[getObject(arg1)];
|
|
304
|
-
return addHeapObject(ret);
|
|
305
|
-
};
|
|
306
|
-
|
|
307
|
-
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
308
|
-
const ret = getObject(arg0) === undefined;
|
|
309
|
-
return ret;
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
313
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
314
|
-
return ret;
|
|
296
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
297
|
+
const obj = getObject(arg1);
|
|
298
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
299
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
300
|
+
var len1 = WASM_VECTOR_LEN;
|
|
301
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
302
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
315
303
|
};
|
|
316
304
|
|
|
317
305
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
318
306
|
takeObject(arg0);
|
|
319
307
|
};
|
|
320
308
|
|
|
321
|
-
module.exports.
|
|
322
|
-
const
|
|
323
|
-
|
|
324
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
325
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
309
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
310
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
311
|
+
return addHeapObject(ret);
|
|
326
312
|
};
|
|
327
313
|
|
|
328
|
-
module.exports.
|
|
329
|
-
const ret =
|
|
330
|
-
return ret;
|
|
314
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
315
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
316
|
+
return addHeapObject(ret);
|
|
331
317
|
};
|
|
332
318
|
|
|
319
|
+
module.exports.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
|
|
320
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
321
|
+
return addHeapObject(ret);
|
|
322
|
+
}, arguments) };
|
|
323
|
+
|
|
333
324
|
module.exports.__wbg_isArray_4c24b343cb13cfb1 = function(arg0) {
|
|
334
325
|
const ret = Array.isArray(getObject(arg0));
|
|
335
326
|
return ret;
|
|
@@ -360,56 +351,65 @@ module.exports.__wbg_value_1695675138684bd5 = function(arg0) {
|
|
|
360
351
|
return addHeapObject(ret);
|
|
361
352
|
};
|
|
362
353
|
|
|
363
|
-
module.exports.
|
|
364
|
-
const
|
|
365
|
-
|
|
354
|
+
module.exports.__wbg_new_898a68150f225f2e = function() {
|
|
355
|
+
const ret = new Array();
|
|
356
|
+
return addHeapObject(ret);
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
module.exports.__wbg_set_502d29070ea18557 = function(arg0, arg1, arg2) {
|
|
360
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
module.exports.__wbindgen_is_object = function(arg0) {
|
|
364
|
+
const val = getObject(arg0);
|
|
365
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
366
366
|
return ret;
|
|
367
367
|
};
|
|
368
368
|
|
|
369
|
-
module.exports.
|
|
370
|
-
const ret =
|
|
369
|
+
module.exports.__wbg_getwithrefkey_5e6d9547403deab8 = function(arg0, arg1) {
|
|
370
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
371
371
|
return addHeapObject(ret);
|
|
372
372
|
};
|
|
373
373
|
|
|
374
|
-
module.exports.
|
|
375
|
-
getObject(arg0)
|
|
374
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
375
|
+
const ret = getObject(arg0) === undefined;
|
|
376
|
+
return ret;
|
|
376
377
|
};
|
|
377
378
|
|
|
378
|
-
module.exports.
|
|
379
|
-
const ret =
|
|
380
|
-
return
|
|
379
|
+
module.exports.__wbindgen_in = function(arg0, arg1) {
|
|
380
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
381
|
+
return ret;
|
|
381
382
|
};
|
|
382
383
|
|
|
383
|
-
module.exports.
|
|
384
|
-
const
|
|
385
|
-
|
|
384
|
+
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
385
|
+
const obj = getObject(arg1);
|
|
386
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
387
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
388
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
386
389
|
};
|
|
387
390
|
|
|
388
|
-
module.exports.
|
|
389
|
-
|
|
391
|
+
module.exports.__wbg_isSafeInteger_bb8e18dd21c97288 = function(arg0) {
|
|
392
|
+
const ret = Number.isSafeInteger(getObject(arg0));
|
|
393
|
+
return ret;
|
|
390
394
|
};
|
|
391
395
|
|
|
392
|
-
module.exports.
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
|
|
396
|
+
module.exports.__wbindgen_boolean_get = function(arg0) {
|
|
397
|
+
const v = getObject(arg0);
|
|
398
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
399
|
+
return ret;
|
|
400
|
+
};
|
|
396
401
|
|
|
397
|
-
module.exports.
|
|
398
|
-
const ret =
|
|
402
|
+
module.exports.__wbg_new_b51585de1b234aff = function() {
|
|
403
|
+
const ret = new Object();
|
|
399
404
|
return addHeapObject(ret);
|
|
400
405
|
};
|
|
401
406
|
|
|
402
|
-
module.exports.
|
|
403
|
-
|
|
404
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
405
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
406
|
-
var len1 = WASM_VECTOR_LEN;
|
|
407
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
408
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
407
|
+
module.exports.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
|
|
408
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
409
409
|
};
|
|
410
410
|
|
|
411
|
-
module.exports.
|
|
412
|
-
const ret =
|
|
411
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
412
|
+
const ret = arg0;
|
|
413
413
|
return addHeapObject(ret);
|
|
414
414
|
};
|
|
415
415
|
|
|
@@ -428,37 +428,37 @@ module.exports.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
|
428
428
|
return ret;
|
|
429
429
|
};
|
|
430
430
|
|
|
431
|
-
module.exports.
|
|
431
|
+
module.exports.__wbg_offchainSubmitTransaction_208a38d431f09b2d = function(arg0, arg1) {
|
|
432
432
|
const ret = getObject(arg0).offchainSubmitTransaction(takeObject(arg1));
|
|
433
433
|
return addHeapObject(ret);
|
|
434
434
|
};
|
|
435
435
|
|
|
436
|
-
module.exports.
|
|
436
|
+
module.exports.__wbg_offchainRandomSeed_a8d71b7ed7289154 = function(arg0) {
|
|
437
437
|
const ret = getObject(arg0).offchainRandomSeed();
|
|
438
438
|
return addHeapObject(ret);
|
|
439
439
|
};
|
|
440
440
|
|
|
441
|
-
module.exports.
|
|
441
|
+
module.exports.__wbg_offchainTimestamp_224a9ed18712d356 = function(arg0) {
|
|
442
442
|
const ret = getObject(arg0).offchainTimestamp();
|
|
443
443
|
return addHeapObject(ret);
|
|
444
444
|
};
|
|
445
445
|
|
|
446
|
-
module.exports.
|
|
446
|
+
module.exports.__wbg_offchainGetStorage_60e9c2134203c72d = function(arg0, arg1) {
|
|
447
447
|
const ret = getObject(arg0).offchainGetStorage(takeObject(arg1));
|
|
448
448
|
return addHeapObject(ret);
|
|
449
449
|
};
|
|
450
450
|
|
|
451
|
-
module.exports.
|
|
451
|
+
module.exports.__wbg_getNextKey_10fb10d9aaf76f47 = function(arg0, arg1, arg2) {
|
|
452
452
|
const ret = getObject(arg0).getNextKey(takeObject(arg1), takeObject(arg2));
|
|
453
453
|
return addHeapObject(ret);
|
|
454
454
|
};
|
|
455
455
|
|
|
456
|
-
module.exports.
|
|
456
|
+
module.exports.__wbg_getStateRoot_57e08f8962f50174 = function(arg0) {
|
|
457
457
|
const ret = getObject(arg0).getStateRoot();
|
|
458
458
|
return addHeapObject(ret);
|
|
459
459
|
};
|
|
460
460
|
|
|
461
|
-
module.exports.
|
|
461
|
+
module.exports.__wbg_getStorage_fadab477c3508c50 = function(arg0, arg1) {
|
|
462
462
|
const ret = getObject(arg0).getStorage(takeObject(arg1));
|
|
463
463
|
return addHeapObject(ret);
|
|
464
464
|
};
|
|
@@ -665,7 +665,7 @@ module.exports.__wbg_warn_58110c4a199df084 = function(arg0) {
|
|
|
665
665
|
console.warn(getObject(arg0));
|
|
666
666
|
};
|
|
667
667
|
|
|
668
|
-
module.exports.
|
|
668
|
+
module.exports.__wbindgen_closure_wrapper1329 = function(arg0, arg1, arg2) {
|
|
669
669
|
const ret = makeMutClosure(arg0, arg1, 128, __wbg_adapter_46);
|
|
670
670
|
return addHeapObject(ret);
|
|
671
671
|
};
|
|
Binary file
|