@acala-network/chopsticks-executor 0.9.3-2 → 0.9.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/dist/cjs/chopsticks_executor.js +101 -101
- package/dist/cjs/index.js +2 -2
- package/dist/esm/chopsticks_executor.js +102 -102
- package/dist/esm/index.js +2 -2
- package/package.json +1 -1
|
@@ -197,7 +197,45 @@ heap.push(undefined, null, true, false);
|
|
|
197
197
|
function getObject(idx) {
|
|
198
198
|
return heap[idx];
|
|
199
199
|
}
|
|
200
|
-
var
|
|
200
|
+
var heap_next = heap.length;
|
|
201
|
+
function dropObject(idx) {
|
|
202
|
+
if (idx < 132) return;
|
|
203
|
+
heap[idx] = heap_next;
|
|
204
|
+
heap_next = idx;
|
|
205
|
+
}
|
|
206
|
+
function takeObject(idx) {
|
|
207
|
+
var ret = getObject(idx);
|
|
208
|
+
dropObject(idx);
|
|
209
|
+
return ret;
|
|
210
|
+
}
|
|
211
|
+
function isLikeNone(x) {
|
|
212
|
+
return x === undefined || x === null;
|
|
213
|
+
}
|
|
214
|
+
var cachedFloat64Memory0 = null;
|
|
215
|
+
function getFloat64Memory0() {
|
|
216
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
217
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
218
|
+
}
|
|
219
|
+
return cachedFloat64Memory0;
|
|
220
|
+
}
|
|
221
|
+
var cachedInt32Memory0 = null;
|
|
222
|
+
function getInt32Memory0() {
|
|
223
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
224
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
225
|
+
}
|
|
226
|
+
return cachedInt32Memory0;
|
|
227
|
+
}
|
|
228
|
+
var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", {
|
|
229
|
+
ignoreBOM: true,
|
|
230
|
+
fatal: true
|
|
231
|
+
}) : {
|
|
232
|
+
decode: function() {
|
|
233
|
+
throw Error("TextDecoder not available");
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
if (typeof TextDecoder !== "undefined") {
|
|
237
|
+
cachedTextDecoder.decode();
|
|
238
|
+
}
|
|
201
239
|
var cachedUint8Memory0 = null;
|
|
202
240
|
function getUint8Memory0() {
|
|
203
241
|
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
@@ -205,6 +243,18 @@ function getUint8Memory0() {
|
|
|
205
243
|
}
|
|
206
244
|
return cachedUint8Memory0;
|
|
207
245
|
}
|
|
246
|
+
function getStringFromWasm0(ptr, len) {
|
|
247
|
+
ptr = ptr >>> 0;
|
|
248
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
249
|
+
}
|
|
250
|
+
function addHeapObject(obj) {
|
|
251
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
252
|
+
var idx = heap_next;
|
|
253
|
+
heap_next = heap[idx];
|
|
254
|
+
heap[idx] = obj;
|
|
255
|
+
return idx;
|
|
256
|
+
}
|
|
257
|
+
var WASM_VECTOR_LEN = 0;
|
|
208
258
|
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : {
|
|
209
259
|
encode: function() {
|
|
210
260
|
throw Error("TextEncoder not available");
|
|
@@ -249,56 +299,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
249
299
|
WASM_VECTOR_LEN = offset;
|
|
250
300
|
return ptr1;
|
|
251
301
|
}
|
|
252
|
-
function isLikeNone(x) {
|
|
253
|
-
return x === undefined || x === null;
|
|
254
|
-
}
|
|
255
|
-
var cachedInt32Memory0 = null;
|
|
256
|
-
function getInt32Memory0() {
|
|
257
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
258
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
259
|
-
}
|
|
260
|
-
return cachedInt32Memory0;
|
|
261
|
-
}
|
|
262
|
-
var heap_next = heap.length;
|
|
263
|
-
function dropObject(idx) {
|
|
264
|
-
if (idx < 132) return;
|
|
265
|
-
heap[idx] = heap_next;
|
|
266
|
-
heap_next = idx;
|
|
267
|
-
}
|
|
268
|
-
function takeObject(idx) {
|
|
269
|
-
var ret = getObject(idx);
|
|
270
|
-
dropObject(idx);
|
|
271
|
-
return ret;
|
|
272
|
-
}
|
|
273
|
-
var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", {
|
|
274
|
-
ignoreBOM: true,
|
|
275
|
-
fatal: true
|
|
276
|
-
}) : {
|
|
277
|
-
decode: function() {
|
|
278
|
-
throw Error("TextDecoder not available");
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
if (typeof TextDecoder !== "undefined") {
|
|
282
|
-
cachedTextDecoder.decode();
|
|
283
|
-
}
|
|
284
|
-
function getStringFromWasm0(ptr, len) {
|
|
285
|
-
ptr = ptr >>> 0;
|
|
286
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
287
|
-
}
|
|
288
|
-
function addHeapObject(obj) {
|
|
289
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
290
|
-
var idx = heap_next;
|
|
291
|
-
heap_next = heap[idx];
|
|
292
|
-
heap[idx] = obj;
|
|
293
|
-
return idx;
|
|
294
|
-
}
|
|
295
|
-
var cachedFloat64Memory0 = null;
|
|
296
|
-
function getFloat64Memory0() {
|
|
297
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
298
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
299
|
-
}
|
|
300
|
-
return cachedFloat64Memory0;
|
|
301
|
-
}
|
|
302
302
|
var cachedBigInt64Memory0 = null;
|
|
303
303
|
function getBigInt64Memory0() {
|
|
304
304
|
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
@@ -533,20 +533,44 @@ function ___wbg_load() {
|
|
|
533
533
|
function __wbg_get_imports() {
|
|
534
534
|
var imports = {};
|
|
535
535
|
imports.wbg = {};
|
|
536
|
-
imports.wbg.
|
|
537
|
-
var
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
536
|
+
imports.wbg.__wbg_isArray_38525be7442aa21e = function(arg0) {
|
|
537
|
+
var ret = Array.isArray(getObject(arg0));
|
|
538
|
+
return ret;
|
|
539
|
+
};
|
|
540
|
+
imports.wbg.__wbg_length_cace2e0b3ddc0502 = function(arg0) {
|
|
541
|
+
var ret = getObject(arg0).length;
|
|
542
|
+
return ret;
|
|
543
|
+
};
|
|
544
|
+
imports.wbg.__wbg_get_4a9aa5157afeb382 = function(arg0, arg1) {
|
|
545
|
+
var ret = getObject(arg0)[arg1 >>> 0];
|
|
546
|
+
return addHeapObject(ret);
|
|
547
|
+
};
|
|
548
|
+
imports.wbg.__wbg_next_1989a20442400aaa = function() {
|
|
549
|
+
return handleError(function(arg0) {
|
|
550
|
+
var ret = getObject(arg0).next();
|
|
551
|
+
return addHeapObject(ret);
|
|
552
|
+
}, arguments);
|
|
553
|
+
};
|
|
554
|
+
imports.wbg.__wbg_done_bc26bf4ada718266 = function(arg0) {
|
|
555
|
+
var ret = getObject(arg0).done;
|
|
556
|
+
return ret;
|
|
557
|
+
};
|
|
558
|
+
imports.wbg.__wbg_value_0570714ff7d75f35 = function(arg0) {
|
|
559
|
+
var ret = getObject(arg0).value;
|
|
560
|
+
return addHeapObject(ret);
|
|
543
561
|
};
|
|
544
562
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
545
563
|
takeObject(arg0);
|
|
546
564
|
};
|
|
547
|
-
imports.wbg.
|
|
548
|
-
var
|
|
549
|
-
|
|
565
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
566
|
+
var obj = getObject(arg1);
|
|
567
|
+
var ret = typeof obj === "number" ? obj : undefined;
|
|
568
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
569
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
570
|
+
};
|
|
571
|
+
imports.wbg.__wbg_isSafeInteger_c38b0a16d0c7cef7 = function(arg0) {
|
|
572
|
+
var ret = Number.isSafeInteger(getObject(arg0));
|
|
573
|
+
return ret;
|
|
550
574
|
};
|
|
551
575
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
552
576
|
var ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -576,32 +600,6 @@ function __wbg_get_imports() {
|
|
|
576
600
|
imports.wbg.__wbg_set_0ac78a2bc07da03c = function(arg0, arg1, arg2) {
|
|
577
601
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
578
602
|
};
|
|
579
|
-
imports.wbg.__wbg_isArray_38525be7442aa21e = function(arg0) {
|
|
580
|
-
var ret = Array.isArray(getObject(arg0));
|
|
581
|
-
return ret;
|
|
582
|
-
};
|
|
583
|
-
imports.wbg.__wbg_length_cace2e0b3ddc0502 = function(arg0) {
|
|
584
|
-
var ret = getObject(arg0).length;
|
|
585
|
-
return ret;
|
|
586
|
-
};
|
|
587
|
-
imports.wbg.__wbg_get_4a9aa5157afeb382 = function(arg0, arg1) {
|
|
588
|
-
var ret = getObject(arg0)[arg1 >>> 0];
|
|
589
|
-
return addHeapObject(ret);
|
|
590
|
-
};
|
|
591
|
-
imports.wbg.__wbg_next_1989a20442400aaa = function() {
|
|
592
|
-
return handleError(function(arg0) {
|
|
593
|
-
var ret = getObject(arg0).next();
|
|
594
|
-
return addHeapObject(ret);
|
|
595
|
-
}, arguments);
|
|
596
|
-
};
|
|
597
|
-
imports.wbg.__wbg_done_bc26bf4ada718266 = function(arg0) {
|
|
598
|
-
var ret = getObject(arg0).done;
|
|
599
|
-
return ret;
|
|
600
|
-
};
|
|
601
|
-
imports.wbg.__wbg_value_0570714ff7d75f35 = function(arg0) {
|
|
602
|
-
var ret = getObject(arg0).value;
|
|
603
|
-
return addHeapObject(ret);
|
|
604
|
-
};
|
|
605
603
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
606
604
|
var val = getObject(arg0);
|
|
607
605
|
var ret = typeof val === "object" && val !== null;
|
|
@@ -624,15 +622,17 @@ function __wbg_get_imports() {
|
|
|
624
622
|
var ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
|
|
625
623
|
return ret;
|
|
626
624
|
};
|
|
627
|
-
imports.wbg.
|
|
625
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
628
626
|
var obj = getObject(arg1);
|
|
629
|
-
var ret = typeof obj === "
|
|
630
|
-
|
|
631
|
-
|
|
627
|
+
var ret = typeof obj === "string" ? obj : undefined;
|
|
628
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
629
|
+
var len1 = WASM_VECTOR_LEN;
|
|
630
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
631
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
632
632
|
};
|
|
633
|
-
imports.wbg.
|
|
634
|
-
var ret =
|
|
635
|
-
return ret;
|
|
633
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
634
|
+
var ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
635
|
+
return addHeapObject(ret);
|
|
636
636
|
};
|
|
637
637
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
638
638
|
var obj = takeObject(arg0).original;
|
|
@@ -658,31 +658,31 @@ function __wbg_get_imports() {
|
|
|
658
658
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
659
659
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
660
660
|
};
|
|
661
|
-
imports.wbg.
|
|
661
|
+
imports.wbg.__wbg_getStorage_22c97034e37920e0 = function(arg0, arg1) {
|
|
662
662
|
var ret = getObject(arg0).getStorage(takeObject(arg1));
|
|
663
663
|
return addHeapObject(ret);
|
|
664
664
|
};
|
|
665
|
-
imports.wbg.
|
|
665
|
+
imports.wbg.__wbg_getStateRoot_6e52cc542ea51409 = function(arg0) {
|
|
666
666
|
var ret = getObject(arg0).getStateRoot();
|
|
667
667
|
return addHeapObject(ret);
|
|
668
668
|
};
|
|
669
|
-
imports.wbg.
|
|
669
|
+
imports.wbg.__wbg_getNextKey_8157bf1cdfa76a1e = function(arg0, arg1, arg2) {
|
|
670
670
|
var ret = getObject(arg0).getNextKey(takeObject(arg1), takeObject(arg2));
|
|
671
671
|
return addHeapObject(ret);
|
|
672
672
|
};
|
|
673
|
-
imports.wbg.
|
|
673
|
+
imports.wbg.__wbg_offchainGetStorage_ff86ba48f46174ec = function(arg0, arg1) {
|
|
674
674
|
var ret = getObject(arg0).offchainGetStorage(takeObject(arg1));
|
|
675
675
|
return addHeapObject(ret);
|
|
676
676
|
};
|
|
677
|
-
imports.wbg.
|
|
677
|
+
imports.wbg.__wbg_offchainTimestamp_65394c8096420ee7 = function(arg0) {
|
|
678
678
|
var ret = getObject(arg0).offchainTimestamp();
|
|
679
679
|
return addHeapObject(ret);
|
|
680
680
|
};
|
|
681
|
-
imports.wbg.
|
|
681
|
+
imports.wbg.__wbg_offchainRandomSeed_11f36503d9648b8d = function(arg0) {
|
|
682
682
|
var ret = getObject(arg0).offchainRandomSeed();
|
|
683
683
|
return addHeapObject(ret);
|
|
684
684
|
};
|
|
685
|
-
imports.wbg.
|
|
685
|
+
imports.wbg.__wbg_offchainSubmitTransaction_b0bdbc6e146312fb = function(arg0, arg1) {
|
|
686
686
|
var ret = getObject(arg0).offchainSubmitTransaction(takeObject(arg1));
|
|
687
687
|
return addHeapObject(ret);
|
|
688
688
|
};
|