@acala-network/chopsticks-core 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.
@@ -110,7 +110,7 @@ const newHeader = async (head, unsafeBlockHeight)=>{
110
110
  },
111
111
  ...consensus.rest
112
112
  ];
113
- if (meta.query.randomness) {
113
+ if (meta.query.randomness?.notFirstBlock) {
114
114
  // TODO: shouldn't modify existing head
115
115
  // reset notFirstBlock so randomness will skip validation
116
116
  head.pushStorageLayer().set((0, _index.compactHex)(meta.query.randomness.notFirstBlock()), _storagelayer.StorageValueKind.Deleted);
@@ -349,14 +349,14 @@ const dryRunExtrinsic = async (head, inherents, extrinsic)=>{
349
349
  0xef
350
350
  ]);
351
351
  generic.signature.set(mockSignature);
352
- _logger.defaultLogger.info({
352
+ logger.debug({
353
353
  call: call.toHuman()
354
354
  }, 'dry_run_call');
355
355
  return newBlock.call('BlockBuilder_apply_extrinsic', [
356
356
  generic.toHex()
357
357
  ]);
358
358
  }
359
- _logger.defaultLogger.info({
359
+ logger.debug({
360
360
  call: registry.createType('GenericExtrinsic', (0, _util.hexToU8a)(extrinsic)).toHuman()
361
361
  }, 'dry_run_extrinsic');
362
362
  return newBlock.call('BlockBuilder_apply_extrinsic', [
package/dist/cjs/setup.js CHANGED
@@ -18,7 +18,7 @@ const setup = async (options)=>{
18
18
  let provider;
19
19
  if (options.genesis) {
20
20
  provider = options.genesis;
21
- } else if (/^(https|http):\/\//.test(options.endpoint || '')) {
21
+ } else if (typeof options.endpoint === 'string' && /^(https|http):\/\//.test(options.endpoint || '')) {
22
22
  provider = new _rpcprovider.HttpProvider(options.endpoint);
23
23
  } else {
24
24
  provider = new _rpcprovider.WsProvider(options.endpoint, 3_000);
@@ -86,7 +86,7 @@ export const newHeader = async (head, unsafeBlockHeight)=>{
86
86
  },
87
87
  ...consensus.rest
88
88
  ];
89
- if (meta.query.randomness) {
89
+ if (meta.query.randomness?.notFirstBlock) {
90
90
  // TODO: shouldn't modify existing head
91
91
  // reset notFirstBlock so randomness will skip validation
92
92
  head.pushStorageLayer().set(compactHex(meta.query.randomness.notFirstBlock()), StorageValueKind.Deleted);
@@ -325,14 +325,14 @@ export const dryRunExtrinsic = async (head, inherents, extrinsic)=>{
325
325
  0xef
326
326
  ]);
327
327
  generic.signature.set(mockSignature);
328
- defaultLogger.info({
328
+ logger.debug({
329
329
  call: call.toHuman()
330
330
  }, 'dry_run_call');
331
331
  return newBlock.call('BlockBuilder_apply_extrinsic', [
332
332
  generic.toHex()
333
333
  ]);
334
334
  }
335
- defaultLogger.info({
335
+ logger.debug({
336
336
  call: registry.createType('GenericExtrinsic', hexToU8a(extrinsic)).toHuman()
337
337
  }, 'dry_run_extrinsic');
338
338
  return newBlock.call('BlockBuilder_apply_extrinsic', [
package/dist/esm/setup.js CHANGED
@@ -8,7 +8,7 @@ export const setup = async (options)=>{
8
8
  let provider;
9
9
  if (options.genesis) {
10
10
  provider = options.genesis;
11
- } else if (/^(https|http):\/\//.test(options.endpoint || '')) {
11
+ } else if (typeof options.endpoint === 'string' && /^(https|http):\/\//.test(options.endpoint || '')) {
12
12
  provider = new HttpProvider(options.endpoint);
13
13
  } else {
14
14
  provider = new WsProvider(options.endpoint, 3_000);
@@ -5,7 +5,7 @@ import { BuildBlockMode } from './blockchain/txpool.js';
5
5
  import { Database } from './database.js';
6
6
  import { GenesisProvider } from './genesis-provider.js';
7
7
  export type SetupOptions = {
8
- endpoint?: string;
8
+ endpoint?: string | string[];
9
9
  block?: string | number | null;
10
10
  genesis?: GenesisProvider;
11
11
  buildBlockMode?: BuildBlockMode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acala-network/chopsticks-core",
3
- "version": "0.9.3-2",
3
+ "version": "0.9.3",
4
4
  "author": "Acala Developers <hello@acala.network>",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -13,7 +13,7 @@
13
13
  "docs:prep": "typedoc"
14
14
  },
15
15
  "dependencies": {
16
- "@acala-network/chopsticks-executor": "0.9.3-2",
16
+ "@acala-network/chopsticks-executor": "0.9.3",
17
17
  "@polkadot/rpc-provider": "^10.10.1",
18
18
  "@polkadot/types": "^10.10.1",
19
19
  "@polkadot/types-codec": "^10.10.1",