@acala-network/chopsticks-executor 0.8.5-1 → 0.8.5-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.
@@ -7,42 +7,15 @@ const heap = new Array(128).fill(undefined);
7
7
 
8
8
  heap.push(undefined, null, true, false);
9
9
 
10
- function getObject(idx) { return heap[idx]; }
11
-
12
10
  let heap_next = heap.length;
13
11
 
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;
12
+ function addHeapObject(obj) {
13
+ if (heap_next === heap.length) heap.push(heap.length + 1);
14
+ const idx = heap_next;
15
+ heap_next = heap[idx];
40
16
 
41
- function getInt32Memory0() {
42
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
43
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
44
- }
45
- return cachedInt32Memory0;
17
+ heap[idx] = obj;
18
+ return idx;
46
19
  }
47
20
 
48
21
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
@@ -63,13 +36,18 @@ function getStringFromWasm0(ptr, len) {
63
36
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
64
37
  }
65
38
 
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];
39
+ function getObject(idx) { return heap[idx]; }
70
40
 
71
- heap[idx] = obj;
72
- return idx;
41
+ function dropObject(idx) {
42
+ if (idx < 132) return;
43
+ heap[idx] = heap_next;
44
+ heap_next = idx;
45
+ }
46
+
47
+ function takeObject(idx) {
48
+ const ret = getObject(idx);
49
+ dropObject(idx);
50
+ return ret;
73
51
  }
74
52
 
75
53
  let WASM_VECTOR_LEN = 0;
@@ -127,6 +105,28 @@ function passStringToWasm0(arg, malloc, realloc) {
127
105
  return ptr;
128
106
  }
129
107
 
108
+ function isLikeNone(x) {
109
+ return x === undefined || x === null;
110
+ }
111
+
112
+ let cachedInt32Memory0 = null;
113
+
114
+ function getInt32Memory0() {
115
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
116
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
117
+ }
118
+ return cachedInt32Memory0;
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,62 +293,57 @@ function __wbg_adapter_106(arg0, arg1, arg2, arg3) {
293
293
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h2cd630d2c4a26d29(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
294
294
  }
295
295
 
296
- module.exports.__wbg_isArray_4c24b343cb13cfb1 = function(arg0) {
297
- const ret = Array.isArray(getObject(arg0));
298
- return ret;
296
+ module.exports.__wbg_new_b51585de1b234aff = function() {
297
+ const ret = new Object();
298
+ return addHeapObject(ret);
299
299
  };
300
300
 
301
- module.exports.__wbg_length_fff51ee6522a1a18 = function(arg0) {
302
- const ret = getObject(arg0).length;
303
- return ret;
301
+ module.exports.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
302
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
304
303
  };
305
304
 
306
- module.exports.__wbg_get_44be0491f933a435 = function(arg0, arg1) {
307
- const ret = getObject(arg0)[arg1 >>> 0];
305
+ module.exports.__wbindgen_number_new = function(arg0) {
306
+ const ret = arg0;
308
307
  return addHeapObject(ret);
309
308
  };
310
309
 
311
- module.exports.__wbg_next_ddb3312ca1c4e32a = function() { return handleError(function (arg0) {
312
- const ret = getObject(arg0).next();
310
+ module.exports.__wbg_new_898a68150f225f2e = function() {
311
+ const ret = new Array();
313
312
  return addHeapObject(ret);
314
- }, arguments) };
313
+ };
315
314
 
316
- module.exports.__wbg_done_5c1f01fb660d73b5 = function(arg0) {
317
- const ret = getObject(arg0).done;
318
- return ret;
315
+ module.exports.__wbg_set_502d29070ea18557 = function(arg0, arg1, arg2) {
316
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
319
317
  };
320
318
 
321
- module.exports.__wbg_value_1695675138684bd5 = function(arg0) {
322
- const ret = getObject(arg0).value;
319
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
320
+ const ret = getStringFromWasm0(arg0, arg1);
323
321
  return addHeapObject(ret);
324
322
  };
325
323
 
324
+ module.exports.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
325
+ const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
326
+ return addHeapObject(ret);
327
+ }, arguments) };
328
+
326
329
  module.exports.__wbindgen_object_drop_ref = function(arg0) {
327
330
  takeObject(arg0);
328
331
  };
329
332
 
330
- module.exports.__wbindgen_number_get = function(arg0, arg1) {
333
+ module.exports.__wbindgen_string_get = function(arg0, arg1) {
331
334
  const obj = getObject(arg1);
332
- const ret = typeof(obj) === 'number' ? obj : undefined;
333
- getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
334
- getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
335
- };
336
-
337
- module.exports.__wbg_isSafeInteger_bb8e18dd21c97288 = function(arg0) {
338
- const ret = Number.isSafeInteger(getObject(arg0));
339
- return ret;
335
+ const ret = typeof(obj) === 'string' ? obj : undefined;
336
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
337
+ var len1 = WASM_VECTOR_LEN;
338
+ getInt32Memory0()[arg0 / 4 + 1] = len1;
339
+ getInt32Memory0()[arg0 / 4 + 0] = ptr1;
340
340
  };
341
341
 
342
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
343
- const ret = getStringFromWasm0(arg0, arg1);
342
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
343
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
344
344
  return addHeapObject(ret);
345
345
  };
346
346
 
347
- module.exports.__wbg_call_01734de55d61e11d = function() { return handleError(function (arg0, arg1, arg2) {
348
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
349
- return addHeapObject(ret);
350
- }, arguments) };
351
-
352
347
  module.exports.__wbindgen_is_object = function(arg0) {
353
348
  const val = getObject(arg0);
354
349
  const ret = typeof(val) === 'object' && val !== null;
@@ -370,47 +365,52 @@ module.exports.__wbindgen_in = function(arg0, arg1) {
370
365
  return ret;
371
366
  };
372
367
 
373
- module.exports.__wbindgen_boolean_get = function(arg0) {
374
- const v = getObject(arg0);
375
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
368
+ module.exports.__wbg_isArray_4c24b343cb13cfb1 = function(arg0) {
369
+ const ret = Array.isArray(getObject(arg0));
376
370
  return ret;
377
371
  };
378
372
 
379
- module.exports.__wbg_new_b51585de1b234aff = function() {
380
- const ret = new Object();
381
- return addHeapObject(ret);
373
+ module.exports.__wbg_length_fff51ee6522a1a18 = function(arg0) {
374
+ const ret = getObject(arg0).length;
375
+ return ret;
382
376
  };
383
377
 
384
- module.exports.__wbg_set_841ac57cff3d672b = function(arg0, arg1, arg2) {
385
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
378
+ module.exports.__wbg_get_44be0491f933a435 = function(arg0, arg1) {
379
+ const ret = getObject(arg0)[arg1 >>> 0];
380
+ return addHeapObject(ret);
386
381
  };
387
382
 
388
- module.exports.__wbg_new_898a68150f225f2e = function() {
389
- const ret = new Array();
383
+ module.exports.__wbg_next_ddb3312ca1c4e32a = function() { return handleError(function (arg0) {
384
+ const ret = getObject(arg0).next();
390
385
  return addHeapObject(ret);
386
+ }, arguments) };
387
+
388
+ module.exports.__wbg_done_5c1f01fb660d73b5 = function(arg0) {
389
+ const ret = getObject(arg0).done;
390
+ return ret;
391
391
  };
392
392
 
393
- module.exports.__wbg_set_502d29070ea18557 = function(arg0, arg1, arg2) {
394
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
393
+ module.exports.__wbg_value_1695675138684bd5 = function(arg0) {
394
+ const ret = getObject(arg0).value;
395
+ return addHeapObject(ret);
395
396
  };
396
397
 
397
- module.exports.__wbindgen_string_get = function(arg0, arg1) {
398
- const obj = getObject(arg1);
399
- const ret = typeof(obj) === 'string' ? obj : undefined;
400
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
401
- var len1 = WASM_VECTOR_LEN;
402
- getInt32Memory0()[arg0 / 4 + 1] = len1;
403
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
398
+ module.exports.__wbindgen_boolean_get = function(arg0) {
399
+ const v = getObject(arg0);
400
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
401
+ return ret;
404
402
  };
405
403
 
406
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
407
- const ret = new Error(getStringFromWasm0(arg0, arg1));
408
- return addHeapObject(ret);
404
+ module.exports.__wbindgen_number_get = function(arg0, arg1) {
405
+ const obj = getObject(arg1);
406
+ const ret = typeof(obj) === 'number' ? obj : undefined;
407
+ getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
408
+ getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
409
409
  };
410
410
 
411
- module.exports.__wbindgen_number_new = function(arg0) {
412
- const ret = arg0;
413
- return addHeapObject(ret);
411
+ module.exports.__wbg_isSafeInteger_bb8e18dd21c97288 = function(arg0) {
412
+ const ret = Number.isSafeInteger(getObject(arg0));
413
+ return ret;
414
414
  };
415
415
 
416
416
  module.exports.__wbindgen_cb_drop = function(arg0) {
@@ -441,37 +441,37 @@ module.exports.__wbg_String_88810dfeb4021902 = function(arg0, arg1) {
441
441
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
442
442
  };
443
443
 
444
- module.exports.__wbg_getStorage_1804707e90d3a080 = function(arg0, arg1) {
444
+ module.exports.__wbg_getStorage_026e93c4b3224a37 = function(arg0, arg1) {
445
445
  const ret = getObject(arg0).getStorage(takeObject(arg1));
446
446
  return addHeapObject(ret);
447
447
  };
448
448
 
449
- module.exports.__wbg_getStateRoot_d4263e7552c991c7 = function(arg0) {
449
+ module.exports.__wbg_getStateRoot_132cd340d2c3ee41 = function(arg0) {
450
450
  const ret = getObject(arg0).getStateRoot();
451
451
  return addHeapObject(ret);
452
452
  };
453
453
 
454
- module.exports.__wbg_getNextKey_7698ce6353ae28ae = function(arg0, arg1, arg2) {
454
+ module.exports.__wbg_getNextKey_7958d203facbb2bf = function(arg0, arg1, arg2) {
455
455
  const ret = getObject(arg0).getNextKey(takeObject(arg1), takeObject(arg2));
456
456
  return addHeapObject(ret);
457
457
  };
458
458
 
459
- module.exports.__wbg_offchainGetStorage_6930e998b68cc96d = function(arg0, arg1) {
459
+ module.exports.__wbg_offchainGetStorage_7e1115f73f8e3e84 = function(arg0, arg1) {
460
460
  const ret = getObject(arg0).offchainGetStorage(takeObject(arg1));
461
461
  return addHeapObject(ret);
462
462
  };
463
463
 
464
- module.exports.__wbg_offchainTimestamp_e9df40bfec2fbbdf = function(arg0) {
464
+ module.exports.__wbg_offchainTimestamp_1ba1f1c7285a102f = function(arg0) {
465
465
  const ret = getObject(arg0).offchainTimestamp();
466
466
  return addHeapObject(ret);
467
467
  };
468
468
 
469
- module.exports.__wbg_offchainRandomSeed_3646106a1508e3b9 = function(arg0) {
469
+ module.exports.__wbg_offchainRandomSeed_acda4d36b1761866 = function(arg0) {
470
470
  const ret = getObject(arg0).offchainRandomSeed();
471
471
  return addHeapObject(ret);
472
472
  };
473
473
 
474
- module.exports.__wbg_offchainSubmitTransaction_59f1e4768753205e = function(arg0, arg1) {
474
+ module.exports.__wbg_offchainSubmitTransaction_82b132600d616b9f = function(arg0, arg1) {
475
475
  const ret = getObject(arg0).offchainSubmitTransaction(takeObject(arg1));
476
476
  return addHeapObject(ret);
477
477
  };
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@acala-network/chopsticks-executor",
3
3
  "description": "Chopsticks executor",
4
- "version": "0.8.5-1",
4
+ "version": "0.8.5-3",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -12,10 +12,10 @@
12
12
  "build": "wasm-pack build --target web --out-dir browser; wasm-pack build --target nodejs --out-dir node; scripts/pack-wasm.cjs"
13
13
  },
14
14
  "dependencies": {
15
+ "@polkadot/util": "^12.5.1",
15
16
  "@polkadot/wasm-util": "^7.2.2"
16
17
  },
17
18
  "devDependencies": {
18
- "@polkadot/util": "^12.4.1",
19
19
  "fflate": "^0.8.0"
20
20
  },
21
21
  "files": [