@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
|
@@ -164,7 +164,46 @@ heap.push(undefined, null, true, false);
|
|
|
164
164
|
function getObject(idx) {
|
|
165
165
|
return heap[idx];
|
|
166
166
|
}
|
|
167
|
-
var
|
|
167
|
+
var heap_next = heap.length;
|
|
168
|
+
function dropObject(idx) {
|
|
169
|
+
if (idx < 132) return;
|
|
170
|
+
heap[idx] = heap_next;
|
|
171
|
+
heap_next = idx;
|
|
172
|
+
}
|
|
173
|
+
function takeObject(idx) {
|
|
174
|
+
var ret = getObject(idx);
|
|
175
|
+
dropObject(idx);
|
|
176
|
+
return ret;
|
|
177
|
+
}
|
|
178
|
+
function isLikeNone(x) {
|
|
179
|
+
return x === undefined || x === null;
|
|
180
|
+
}
|
|
181
|
+
var cachedFloat64Memory0 = null;
|
|
182
|
+
function getFloat64Memory0() {
|
|
183
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
184
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
185
|
+
}
|
|
186
|
+
return cachedFloat64Memory0;
|
|
187
|
+
}
|
|
188
|
+
var cachedInt32Memory0 = null;
|
|
189
|
+
function getInt32Memory0() {
|
|
190
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
191
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
192
|
+
}
|
|
193
|
+
return cachedInt32Memory0;
|
|
194
|
+
}
|
|
195
|
+
var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", {
|
|
196
|
+
ignoreBOM: true,
|
|
197
|
+
fatal: true
|
|
198
|
+
}) : {
|
|
199
|
+
decode: function() {
|
|
200
|
+
throw Error("TextDecoder not available");
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
if (typeof TextDecoder !== "undefined") {
|
|
204
|
+
cachedTextDecoder.decode();
|
|
205
|
+
}
|
|
206
|
+
;
|
|
168
207
|
var cachedUint8Memory0 = null;
|
|
169
208
|
function getUint8Memory0() {
|
|
170
209
|
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
@@ -172,6 +211,18 @@ function getUint8Memory0() {
|
|
|
172
211
|
}
|
|
173
212
|
return cachedUint8Memory0;
|
|
174
213
|
}
|
|
214
|
+
function getStringFromWasm0(ptr, len) {
|
|
215
|
+
ptr = ptr >>> 0;
|
|
216
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
217
|
+
}
|
|
218
|
+
function addHeapObject(obj) {
|
|
219
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
220
|
+
var idx = heap_next;
|
|
221
|
+
heap_next = heap[idx];
|
|
222
|
+
heap[idx] = obj;
|
|
223
|
+
return idx;
|
|
224
|
+
}
|
|
225
|
+
var WASM_VECTOR_LEN = 0;
|
|
175
226
|
var cachedTextEncoder = typeof TextEncoder !== "undefined" ? new TextEncoder("utf-8") : {
|
|
176
227
|
encode: function() {
|
|
177
228
|
throw Error("TextEncoder not available");
|
|
@@ -216,57 +267,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
216
267
|
WASM_VECTOR_LEN = offset;
|
|
217
268
|
return ptr1;
|
|
218
269
|
}
|
|
219
|
-
function isLikeNone(x) {
|
|
220
|
-
return x === undefined || x === null;
|
|
221
|
-
}
|
|
222
|
-
var cachedInt32Memory0 = null;
|
|
223
|
-
function getInt32Memory0() {
|
|
224
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
225
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
226
|
-
}
|
|
227
|
-
return cachedInt32Memory0;
|
|
228
|
-
}
|
|
229
|
-
var heap_next = heap.length;
|
|
230
|
-
function dropObject(idx) {
|
|
231
|
-
if (idx < 132) return;
|
|
232
|
-
heap[idx] = heap_next;
|
|
233
|
-
heap_next = idx;
|
|
234
|
-
}
|
|
235
|
-
function takeObject(idx) {
|
|
236
|
-
var ret = getObject(idx);
|
|
237
|
-
dropObject(idx);
|
|
238
|
-
return ret;
|
|
239
|
-
}
|
|
240
|
-
var cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", {
|
|
241
|
-
ignoreBOM: true,
|
|
242
|
-
fatal: true
|
|
243
|
-
}) : {
|
|
244
|
-
decode: function() {
|
|
245
|
-
throw Error("TextDecoder not available");
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
if (typeof TextDecoder !== "undefined") {
|
|
249
|
-
cachedTextDecoder.decode();
|
|
250
|
-
}
|
|
251
|
-
;
|
|
252
|
-
function getStringFromWasm0(ptr, len) {
|
|
253
|
-
ptr = ptr >>> 0;
|
|
254
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
255
|
-
}
|
|
256
|
-
function addHeapObject(obj) {
|
|
257
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
258
|
-
var idx = heap_next;
|
|
259
|
-
heap_next = heap[idx];
|
|
260
|
-
heap[idx] = obj;
|
|
261
|
-
return idx;
|
|
262
|
-
}
|
|
263
|
-
var cachedFloat64Memory0 = null;
|
|
264
|
-
function getFloat64Memory0() {
|
|
265
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
266
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
267
|
-
}
|
|
268
|
-
return cachedFloat64Memory0;
|
|
269
|
-
}
|
|
270
270
|
var cachedBigInt64Memory0 = null;
|
|
271
271
|
function getBigInt64Memory0() {
|
|
272
272
|
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
@@ -522,20 +522,44 @@ function ___wbg_load() {
|
|
|
522
522
|
function __wbg_get_imports() {
|
|
523
523
|
var imports = {};
|
|
524
524
|
imports.wbg = {};
|
|
525
|
-
imports.wbg.
|
|
526
|
-
var
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
525
|
+
imports.wbg.__wbg_isArray_38525be7442aa21e = function(arg0) {
|
|
526
|
+
var ret = Array.isArray(getObject(arg0));
|
|
527
|
+
return ret;
|
|
528
|
+
};
|
|
529
|
+
imports.wbg.__wbg_length_cace2e0b3ddc0502 = function(arg0) {
|
|
530
|
+
var ret = getObject(arg0).length;
|
|
531
|
+
return ret;
|
|
532
|
+
};
|
|
533
|
+
imports.wbg.__wbg_get_4a9aa5157afeb382 = function(arg0, arg1) {
|
|
534
|
+
var ret = getObject(arg0)[arg1 >>> 0];
|
|
535
|
+
return addHeapObject(ret);
|
|
536
|
+
};
|
|
537
|
+
imports.wbg.__wbg_next_1989a20442400aaa = function() {
|
|
538
|
+
return handleError(function(arg0) {
|
|
539
|
+
var ret = getObject(arg0).next();
|
|
540
|
+
return addHeapObject(ret);
|
|
541
|
+
}, arguments);
|
|
542
|
+
};
|
|
543
|
+
imports.wbg.__wbg_done_bc26bf4ada718266 = function(arg0) {
|
|
544
|
+
var ret = getObject(arg0).done;
|
|
545
|
+
return ret;
|
|
546
|
+
};
|
|
547
|
+
imports.wbg.__wbg_value_0570714ff7d75f35 = function(arg0) {
|
|
548
|
+
var ret = getObject(arg0).value;
|
|
549
|
+
return addHeapObject(ret);
|
|
532
550
|
};
|
|
533
551
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
534
552
|
takeObject(arg0);
|
|
535
553
|
};
|
|
536
|
-
imports.wbg.
|
|
537
|
-
var
|
|
538
|
-
|
|
554
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
555
|
+
var obj = getObject(arg1);
|
|
556
|
+
var ret = typeof obj === "number" ? obj : undefined;
|
|
557
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
558
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
559
|
+
};
|
|
560
|
+
imports.wbg.__wbg_isSafeInteger_c38b0a16d0c7cef7 = function(arg0) {
|
|
561
|
+
var ret = Number.isSafeInteger(getObject(arg0));
|
|
562
|
+
return ret;
|
|
539
563
|
};
|
|
540
564
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
541
565
|
var ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -565,32 +589,6 @@ function __wbg_get_imports() {
|
|
|
565
589
|
imports.wbg.__wbg_set_0ac78a2bc07da03c = function(arg0, arg1, arg2) {
|
|
566
590
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
567
591
|
};
|
|
568
|
-
imports.wbg.__wbg_isArray_38525be7442aa21e = function(arg0) {
|
|
569
|
-
var ret = Array.isArray(getObject(arg0));
|
|
570
|
-
return ret;
|
|
571
|
-
};
|
|
572
|
-
imports.wbg.__wbg_length_cace2e0b3ddc0502 = function(arg0) {
|
|
573
|
-
var ret = getObject(arg0).length;
|
|
574
|
-
return ret;
|
|
575
|
-
};
|
|
576
|
-
imports.wbg.__wbg_get_4a9aa5157afeb382 = function(arg0, arg1) {
|
|
577
|
-
var ret = getObject(arg0)[arg1 >>> 0];
|
|
578
|
-
return addHeapObject(ret);
|
|
579
|
-
};
|
|
580
|
-
imports.wbg.__wbg_next_1989a20442400aaa = function() {
|
|
581
|
-
return handleError(function(arg0) {
|
|
582
|
-
var ret = getObject(arg0).next();
|
|
583
|
-
return addHeapObject(ret);
|
|
584
|
-
}, arguments);
|
|
585
|
-
};
|
|
586
|
-
imports.wbg.__wbg_done_bc26bf4ada718266 = function(arg0) {
|
|
587
|
-
var ret = getObject(arg0).done;
|
|
588
|
-
return ret;
|
|
589
|
-
};
|
|
590
|
-
imports.wbg.__wbg_value_0570714ff7d75f35 = function(arg0) {
|
|
591
|
-
var ret = getObject(arg0).value;
|
|
592
|
-
return addHeapObject(ret);
|
|
593
|
-
};
|
|
594
592
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
595
593
|
var val = getObject(arg0);
|
|
596
594
|
var ret = typeof val === "object" && val !== null;
|
|
@@ -613,15 +611,17 @@ function __wbg_get_imports() {
|
|
|
613
611
|
var ret = typeof v === "boolean" ? v ? 1 : 0 : 2;
|
|
614
612
|
return ret;
|
|
615
613
|
};
|
|
616
|
-
imports.wbg.
|
|
614
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
617
615
|
var obj = getObject(arg1);
|
|
618
|
-
var ret = typeof obj === "
|
|
619
|
-
|
|
620
|
-
|
|
616
|
+
var ret = typeof obj === "string" ? obj : undefined;
|
|
617
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
618
|
+
var len1 = WASM_VECTOR_LEN;
|
|
619
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
620
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
621
621
|
};
|
|
622
|
-
imports.wbg.
|
|
623
|
-
var ret =
|
|
624
|
-
return ret;
|
|
622
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
623
|
+
var ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
624
|
+
return addHeapObject(ret);
|
|
625
625
|
};
|
|
626
626
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
627
627
|
var obj = takeObject(arg0).original;
|
|
@@ -647,31 +647,31 @@ function __wbg_get_imports() {
|
|
|
647
647
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
648
648
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
649
649
|
};
|
|
650
|
-
imports.wbg.
|
|
650
|
+
imports.wbg.__wbg_getStorage_22c97034e37920e0 = function(arg0, arg1) {
|
|
651
651
|
var ret = getObject(arg0).getStorage(takeObject(arg1));
|
|
652
652
|
return addHeapObject(ret);
|
|
653
653
|
};
|
|
654
|
-
imports.wbg.
|
|
654
|
+
imports.wbg.__wbg_getStateRoot_6e52cc542ea51409 = function(arg0) {
|
|
655
655
|
var ret = getObject(arg0).getStateRoot();
|
|
656
656
|
return addHeapObject(ret);
|
|
657
657
|
};
|
|
658
|
-
imports.wbg.
|
|
658
|
+
imports.wbg.__wbg_getNextKey_8157bf1cdfa76a1e = function(arg0, arg1, arg2) {
|
|
659
659
|
var ret = getObject(arg0).getNextKey(takeObject(arg1), takeObject(arg2));
|
|
660
660
|
return addHeapObject(ret);
|
|
661
661
|
};
|
|
662
|
-
imports.wbg.
|
|
662
|
+
imports.wbg.__wbg_offchainGetStorage_ff86ba48f46174ec = function(arg0, arg1) {
|
|
663
663
|
var ret = getObject(arg0).offchainGetStorage(takeObject(arg1));
|
|
664
664
|
return addHeapObject(ret);
|
|
665
665
|
};
|
|
666
|
-
imports.wbg.
|
|
666
|
+
imports.wbg.__wbg_offchainTimestamp_65394c8096420ee7 = function(arg0) {
|
|
667
667
|
var ret = getObject(arg0).offchainTimestamp();
|
|
668
668
|
return addHeapObject(ret);
|
|
669
669
|
};
|
|
670
|
-
imports.wbg.
|
|
670
|
+
imports.wbg.__wbg_offchainRandomSeed_11f36503d9648b8d = function(arg0) {
|
|
671
671
|
var ret = getObject(arg0).offchainRandomSeed();
|
|
672
672
|
return addHeapObject(ret);
|
|
673
673
|
};
|
|
674
|
-
imports.wbg.
|
|
674
|
+
imports.wbg.__wbg_offchainSubmitTransaction_b0bdbc6e146312fb = function(arg0, arg1) {
|
|
675
675
|
var ret = getObject(arg0).offchainSubmitTransaction(takeObject(arg1));
|
|
676
676
|
return addHeapObject(ret);
|
|
677
677
|
};
|