@acala-network/chopsticks-executor 0.9.1-2 → 0.9.1-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.
@@ -4,15 +4,20 @@ 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
+
7
9
  let heap_next = heap.length;
8
10
 
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];
11
+ function dropObject(idx) {
12
+ if (idx < 132) return;
13
+ heap[idx] = heap_next;
14
+ heap_next = idx;
15
+ }
13
16
 
14
- heap[idx] = obj;
15
- return idx;
17
+ function takeObject(idx) {
18
+ const ret = getObject(idx);
19
+ dropObject(idx);
20
+ return ret;
16
21
  }
17
22
 
18
23
  const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
@@ -33,18 +38,13 @@ function getStringFromWasm0(ptr, len) {
33
38
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
34
39
  }
35
40
 
36
- function getObject(idx) { return heap[idx]; }
37
-
38
- function dropObject(idx) {
39
- if (idx < 132) return;
40
- heap[idx] = heap_next;
41
- heap_next = idx;
42
- }
41
+ function addHeapObject(obj) {
42
+ if (heap_next === heap.length) heap.push(heap.length + 1);
43
+ const idx = heap_next;
44
+ heap_next = heap[idx];
43
45
 
44
- function takeObject(idx) {
45
- const ret = getObject(idx);
46
- dropObject(idx);
47
- return ret;
46
+ heap[idx] = obj;
47
+ return idx;
48
48
  }
49
49
 
50
50
  function isLikeNone(x) {
@@ -324,35 +324,6 @@ async function __wbg_load(module, imports) {
324
324
  function __wbg_get_imports() {
325
325
  const imports = {};
326
326
  imports.wbg = {};
327
- imports.wbg.__wbg_new_c728d68b8b34487e = function() {
328
- const ret = new Object();
329
- return addHeapObject(ret);
330
- };
331
- imports.wbg.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
332
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
333
- };
334
- imports.wbg.__wbindgen_number_new = function(arg0) {
335
- const ret = arg0;
336
- return addHeapObject(ret);
337
- };
338
- imports.wbg.__wbg_new_08236689f0afb357 = function() {
339
- const ret = new Array();
340
- return addHeapObject(ret);
341
- };
342
- imports.wbg.__wbg_set_0ac78a2bc07da03c = function(arg0, arg1, arg2) {
343
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
344
- };
345
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
346
- const ret = getStringFromWasm0(arg0, arg1);
347
- return addHeapObject(ret);
348
- };
349
- imports.wbg.__wbg_call_53fc3abd42e24ec8 = function() { return handleError(function (arg0, arg1, arg2) {
350
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
351
- return addHeapObject(ret);
352
- }, arguments) };
353
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
354
- takeObject(arg0);
355
- };
356
327
  imports.wbg.__wbg_isArray_38525be7442aa21e = function(arg0) {
357
328
  const ret = Array.isArray(getObject(arg0));
358
329
  return ret;
@@ -377,6 +348,24 @@ function __wbg_get_imports() {
377
348
  const ret = getObject(arg0).value;
378
349
  return addHeapObject(ret);
379
350
  };
351
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
352
+ takeObject(arg0);
353
+ };
354
+ imports.wbg.__wbg_new_08236689f0afb357 = function() {
355
+ const ret = new Array();
356
+ return addHeapObject(ret);
357
+ };
358
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
359
+ const ret = getStringFromWasm0(arg0, arg1);
360
+ return addHeapObject(ret);
361
+ };
362
+ imports.wbg.__wbg_set_0ac78a2bc07da03c = function(arg0, arg1, arg2) {
363
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
364
+ };
365
+ imports.wbg.__wbg_call_53fc3abd42e24ec8 = function() { return handleError(function (arg0, arg1, arg2) {
366
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
367
+ return addHeapObject(ret);
368
+ }, arguments) };
380
369
  imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
381
370
  const obj = getObject(arg1);
382
371
  const ret = typeof(obj) === 'number' ? obj : undefined;
@@ -387,6 +376,29 @@ function __wbg_get_imports() {
387
376
  const ret = Number.isSafeInteger(getObject(arg0));
388
377
  return ret;
389
378
  };
379
+ imports.wbg.__wbg_new_c728d68b8b34487e = function() {
380
+ const ret = new Object();
381
+ return addHeapObject(ret);
382
+ };
383
+ imports.wbg.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
384
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
385
+ };
386
+ imports.wbg.__wbindgen_number_new = function(arg0) {
387
+ const ret = arg0;
388
+ return addHeapObject(ret);
389
+ };
390
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
391
+ const obj = getObject(arg1);
392
+ const ret = typeof(obj) === 'string' ? obj : undefined;
393
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
394
+ var len1 = WASM_VECTOR_LEN;
395
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
396
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
397
+ };
398
+ imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
399
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
400
+ return addHeapObject(ret);
401
+ };
390
402
  imports.wbg.__wbindgen_is_object = function(arg0) {
391
403
  const val = getObject(arg0);
392
404
  const ret = typeof(val) === 'object' && val !== null;
@@ -409,18 +421,6 @@ function __wbg_get_imports() {
409
421
  const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
410
422
  return ret;
411
423
  };
412
- imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
413
- const obj = getObject(arg1);
414
- const ret = typeof(obj) === 'string' ? obj : undefined;
415
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
416
- var len1 = WASM_VECTOR_LEN;
417
- getInt32Memory0()[arg0 / 4 + 1] = len1;
418
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
419
- };
420
- imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
421
- const ret = new Error(getStringFromWasm0(arg0, arg1));
422
- return addHeapObject(ret);
423
- };
424
424
  imports.wbg.__wbindgen_cb_drop = function(arg0) {
425
425
  const obj = takeObject(arg0).original;
426
426
  if (obj.cnt-- == 1) {
@@ -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.__wbg_getStorage_7b4ae281db189f27 = function(arg0, arg1) {
448
+ imports.wbg.__wbg_getStorage_e93aec15781aae67 = function(arg0, arg1) {
449
449
  const ret = getObject(arg0).getStorage(takeObject(arg1));
450
450
  return addHeapObject(ret);
451
451
  };
452
- imports.wbg.__wbg_getStateRoot_dbd7900c42bd384e = function(arg0) {
452
+ imports.wbg.__wbg_getStateRoot_906065f4887b553b = function(arg0) {
453
453
  const ret = getObject(arg0).getStateRoot();
454
454
  return addHeapObject(ret);
455
455
  };
456
- imports.wbg.__wbg_getNextKey_831bbcbb195193d5 = function(arg0, arg1, arg2) {
456
+ imports.wbg.__wbg_getNextKey_7702ad41d1e6d93d = 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.__wbg_offchainGetStorage_a7f444f323a45f46 = function(arg0, arg1) {
460
+ imports.wbg.__wbg_offchainGetStorage_3a008237e87386b5 = function(arg0, arg1) {
461
461
  const ret = getObject(arg0).offchainGetStorage(takeObject(arg1));
462
462
  return addHeapObject(ret);
463
463
  };
464
- imports.wbg.__wbg_offchainTimestamp_5b912f594f777fc9 = function(arg0) {
464
+ imports.wbg.__wbg_offchainTimestamp_ab157c9521924fa8 = function(arg0) {
465
465
  const ret = getObject(arg0).offchainTimestamp();
466
466
  return addHeapObject(ret);
467
467
  };
468
- imports.wbg.__wbg_offchainRandomSeed_4b4c1b95fe2613ae = function(arg0) {
468
+ imports.wbg.__wbg_offchainRandomSeed_b4a48d46480348aa = function(arg0) {
469
469
  const ret = getObject(arg0).offchainRandomSeed();
470
470
  return addHeapObject(ret);
471
471
  };
472
- imports.wbg.__wbg_offchainSubmitTransaction_714ea7d2d0c9a9f5 = function(arg0, arg1) {
472
+ imports.wbg.__wbg_offchainSubmitTransaction_2e85d9c73a3f6d2e = function(arg0, arg1) {
473
473
  const ret = getObject(arg0).offchainSubmitTransaction(takeObject(arg1));
474
474
  return addHeapObject(ret);
475
475
  };