@acala-network/chopsticks-executor 0.9.2-6 → 0.9.3-1
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 +104 -104
- package/dist/cjs/index.js +5 -61
- package/dist/esm/chopsticks_executor.js +105 -105
- package/dist/esm/index.js +5 -14
- package/package.json +3 -3
|
@@ -197,28 +197,7 @@ heap.push(undefined, null, true, false);
|
|
|
197
197
|
function getObject(idx) {
|
|
198
198
|
return heap[idx];
|
|
199
199
|
}
|
|
200
|
-
var
|
|
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
|
-
var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", {
|
|
212
|
-
ignoreBOM: true,
|
|
213
|
-
fatal: true
|
|
214
|
-
}) : {
|
|
215
|
-
decode: function() {
|
|
216
|
-
throw Error("TextDecoder not available");
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
if (typeof TextDecoder !== "undefined") {
|
|
220
|
-
cachedTextDecoder.decode();
|
|
221
|
-
}
|
|
200
|
+
var WASM_VECTOR_LEN = 0;
|
|
222
201
|
var cachedUint8Memory0 = null;
|
|
223
202
|
function getUint8Memory0() {
|
|
224
203
|
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
@@ -226,35 +205,6 @@ function getUint8Memory0() {
|
|
|
226
205
|
}
|
|
227
206
|
return cachedUint8Memory0;
|
|
228
207
|
}
|
|
229
|
-
function getStringFromWasm0(ptr, len) {
|
|
230
|
-
ptr = ptr >>> 0;
|
|
231
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
232
|
-
}
|
|
233
|
-
function addHeapObject(obj) {
|
|
234
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
235
|
-
var idx = heap_next;
|
|
236
|
-
heap_next = heap[idx];
|
|
237
|
-
heap[idx] = obj;
|
|
238
|
-
return idx;
|
|
239
|
-
}
|
|
240
|
-
function isLikeNone(x) {
|
|
241
|
-
return x === undefined || x === null;
|
|
242
|
-
}
|
|
243
|
-
var cachedFloat64Memory0 = null;
|
|
244
|
-
function getFloat64Memory0() {
|
|
245
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
246
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
247
|
-
}
|
|
248
|
-
return cachedFloat64Memory0;
|
|
249
|
-
}
|
|
250
|
-
var cachedInt32Memory0 = null;
|
|
251
|
-
function getInt32Memory0() {
|
|
252
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
253
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
254
|
-
}
|
|
255
|
-
return cachedInt32Memory0;
|
|
256
|
-
}
|
|
257
|
-
var WASM_VECTOR_LEN = 0;
|
|
258
208
|
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : {
|
|
259
209
|
encode: function() {
|
|
260
210
|
throw Error("TextEncoder not available");
|
|
@@ -299,6 +249,56 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
299
249
|
WASM_VECTOR_LEN = offset;
|
|
300
250
|
return ptr1;
|
|
301
251
|
}
|
|
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,6 +533,31 @@ function ___wbg_load() {
|
|
|
533
533
|
function __wbg_get_imports() {
|
|
534
534
|
var imports = {};
|
|
535
535
|
imports.wbg = {};
|
|
536
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
537
|
+
var obj = getObject(arg1);
|
|
538
|
+
var ret = typeof obj === "string" ? obj : undefined;
|
|
539
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
540
|
+
var len1 = WASM_VECTOR_LEN;
|
|
541
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
542
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
543
|
+
};
|
|
544
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
545
|
+
takeObject(arg0);
|
|
546
|
+
};
|
|
547
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
548
|
+
var ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
549
|
+
return addHeapObject(ret);
|
|
550
|
+
};
|
|
551
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
552
|
+
var ret = getStringFromWasm0(arg0, arg1);
|
|
553
|
+
return addHeapObject(ret);
|
|
554
|
+
};
|
|
555
|
+
imports.wbg.__wbg_call_53fc3abd42e24ec8 = function() {
|
|
556
|
+
return handleError(function(arg0, arg1, arg2) {
|
|
557
|
+
var ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
558
|
+
return addHeapObject(ret);
|
|
559
|
+
}, arguments);
|
|
560
|
+
};
|
|
536
561
|
imports.wbg.__wbg_isArray_38525be7442aa21e = function(arg0) {
|
|
537
562
|
var ret = Array.isArray(getObject(arg0));
|
|
538
563
|
return ret;
|
|
@@ -559,26 +584,34 @@ function __wbg_get_imports() {
|
|
|
559
584
|
var ret = getObject(arg0).value;
|
|
560
585
|
return addHeapObject(ret);
|
|
561
586
|
};
|
|
562
|
-
imports.wbg.
|
|
563
|
-
|
|
587
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
588
|
+
var obj = getObject(arg1);
|
|
589
|
+
var ret = typeof obj === "number" ? obj : undefined;
|
|
590
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
591
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
564
592
|
};
|
|
565
|
-
imports.wbg.
|
|
566
|
-
var ret =
|
|
593
|
+
imports.wbg.__wbg_isSafeInteger_c38b0a16d0c7cef7 = function(arg0) {
|
|
594
|
+
var ret = Number.isSafeInteger(getObject(arg0));
|
|
595
|
+
return ret;
|
|
596
|
+
};
|
|
597
|
+
imports.wbg.__wbg_new_c728d68b8b34487e = function() {
|
|
598
|
+
var ret = new Object();
|
|
567
599
|
return addHeapObject(ret);
|
|
568
600
|
};
|
|
569
|
-
imports.wbg.
|
|
570
|
-
|
|
601
|
+
imports.wbg.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
|
|
602
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
603
|
+
};
|
|
604
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
605
|
+
var ret = arg0;
|
|
606
|
+
return addHeapObject(ret);
|
|
607
|
+
};
|
|
608
|
+
imports.wbg.__wbg_new_08236689f0afb357 = function() {
|
|
609
|
+
var ret = new Array();
|
|
571
610
|
return addHeapObject(ret);
|
|
572
611
|
};
|
|
573
612
|
imports.wbg.__wbg_set_0ac78a2bc07da03c = function(arg0, arg1, arg2) {
|
|
574
613
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
575
614
|
};
|
|
576
|
-
imports.wbg.__wbg_call_53fc3abd42e24ec8 = function() {
|
|
577
|
-
return handleError(function(arg0, arg1, arg2) {
|
|
578
|
-
var ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
579
|
-
return addHeapObject(ret);
|
|
580
|
-
}, arguments);
|
|
581
|
-
};
|
|
582
615
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
583
616
|
var val = getObject(arg0);
|
|
584
617
|
var ret = typeof val === "object" && val !== null;
|
|
@@ -601,39 +634,6 @@ function __wbg_get_imports() {
|
|
|
601
634
|
var ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
|
|
602
635
|
return ret;
|
|
603
636
|
};
|
|
604
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
605
|
-
var obj = getObject(arg1);
|
|
606
|
-
var ret = typeof obj === "number" ? obj : undefined;
|
|
607
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
608
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
609
|
-
};
|
|
610
|
-
imports.wbg.__wbg_isSafeInteger_c38b0a16d0c7cef7 = function(arg0) {
|
|
611
|
-
var ret = Number.isSafeInteger(getObject(arg0));
|
|
612
|
-
return ret;
|
|
613
|
-
};
|
|
614
|
-
imports.wbg.__wbg_new_c728d68b8b34487e = function() {
|
|
615
|
-
var ret = new Object();
|
|
616
|
-
return addHeapObject(ret);
|
|
617
|
-
};
|
|
618
|
-
imports.wbg.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
|
|
619
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
620
|
-
};
|
|
621
|
-
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
622
|
-
var ret = arg0;
|
|
623
|
-
return addHeapObject(ret);
|
|
624
|
-
};
|
|
625
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
626
|
-
var obj = getObject(arg1);
|
|
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
|
-
};
|
|
633
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
634
|
-
var ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
635
|
-
return addHeapObject(ret);
|
|
636
|
-
};
|
|
637
637
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
638
638
|
var obj = takeObject(arg0).original;
|
|
639
639
|
if (obj.cnt-- == 1) {
|
|
@@ -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_4b146f80f10eb5b3 = 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_41a6fee856c08fc6 = function(arg0) {
|
|
666
666
|
var ret = getObject(arg0).getStateRoot();
|
|
667
667
|
return addHeapObject(ret);
|
|
668
668
|
};
|
|
669
|
-
imports.wbg.
|
|
669
|
+
imports.wbg.__wbg_getNextKey_622b782ea46d6eb0 = 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_612ac42f9df16365 = 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_c8d5505f997edbf7 = function(arg0) {
|
|
678
678
|
var ret = getObject(arg0).offchainTimestamp();
|
|
679
679
|
return addHeapObject(ret);
|
|
680
680
|
};
|
|
681
|
-
imports.wbg.
|
|
681
|
+
imports.wbg.__wbg_offchainRandomSeed_4a396f6653590eae = function(arg0) {
|
|
682
682
|
var ret = getObject(arg0).offchainRandomSeed();
|
|
683
683
|
return addHeapObject(ret);
|
|
684
684
|
};
|
|
685
|
-
imports.wbg.
|
|
685
|
+
imports.wbg.__wbg_offchainSubmitTransaction_00319bc661f5ef24 = function(arg0, arg1) {
|
|
686
686
|
var ret = getObject(arg0).offchainSubmitTransaction(takeObject(arg1));
|
|
687
687
|
return addHeapObject(ret);
|
|
688
688
|
};
|
|
@@ -886,7 +886,7 @@ function __wbg_get_imports() {
|
|
|
886
886
|
imports.wbg.__wbg_warn_4affe1093892a4ef = function(arg0) {
|
|
887
887
|
console.warn(getObject(arg0));
|
|
888
888
|
};
|
|
889
|
-
imports.wbg.
|
|
889
|
+
imports.wbg.__wbindgen_closure_wrapper1336 = function(arg0, arg1, arg2) {
|
|
890
890
|
var ret = makeMutClosure(arg0, arg1, 122, __wbg_adapter_46);
|
|
891
891
|
return addHeapObject(ret);
|
|
892
892
|
};
|