@acala-network/chopsticks-utils 1.0.5 → 1.0.6

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.
@@ -37,6 +37,8 @@ export type SetupOption = {
37
37
  allowUnresolvedImports?: boolean;
38
38
  /** Process queued XCM messages */
39
39
  processQueuedMessages?: boolean;
40
+ /** Whether to save newly created blocks to the database */
41
+ saveBlock?: boolean;
40
42
  };
41
43
  /**
42
44
  * Extended configuration type that includes timeout
@@ -50,7 +52,7 @@ export type SetupConfig = Config & {
50
52
  * @param options - Setup options for the network
51
53
  * @returns Configuration object compatible with chopsticks
52
54
  */
53
- export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, }: SetupOption) => SetupConfig;
55
+ export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig;
54
56
  /**
55
57
  * Sets up a blockchain network context using provided options
56
58
  * @param option - Setup options for the network
package/dist/cjs/index.js CHANGED
@@ -57,7 +57,7 @@ function _export_star(from, to) {
57
57
  const logger = _chopsticks.defaultLogger.child({
58
58
  name: 'utils'
59
59
  });
60
- const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages })=>{
60
+ const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{
61
61
  // random port if not specified
62
62
  port = port ?? Math.floor(Math.random() * 10000) + 10000;
63
63
  const config = {
@@ -74,7 +74,8 @@ const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, time
74
74
  timeout,
75
75
  resume: resume ?? false,
76
76
  'allow-unresolved-imports': allowUnresolvedImports,
77
- 'process-queued-messages': processQueuedMessages
77
+ 'process-queued-messages': processQueuedMessages,
78
+ 'save-block': saveBlock
78
79
  };
79
80
  return config;
80
81
  };
@@ -37,6 +37,8 @@ export type SetupOption = {
37
37
  allowUnresolvedImports?: boolean;
38
38
  /** Process queued XCM messages */
39
39
  processQueuedMessages?: boolean;
40
+ /** Whether to save newly created blocks to the database */
41
+ saveBlock?: boolean;
40
42
  };
41
43
  /**
42
44
  * Extended configuration type that includes timeout
@@ -50,7 +52,7 @@ export type SetupConfig = Config & {
50
52
  * @param options - Setup options for the network
51
53
  * @returns Configuration object compatible with chopsticks
52
54
  */
53
- export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, }: SetupOption) => SetupConfig;
55
+ export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock, }: SetupOption) => SetupConfig;
54
56
  /**
55
57
  * Sets up a blockchain network context using provided options
56
58
  * @param option - Setup options for the network
package/dist/esm/index.js CHANGED
@@ -12,7 +12,7 @@ export * from './signFake.js';
12
12
  * Creates a configuration object from setup options
13
13
  * @param options - Setup options for the network
14
14
  * @returns Configuration object compatible with chopsticks
15
- */ export const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages })=>{
15
+ */ export const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, host, port, maxMemoryBlockCount, resume, runtimeLogLevel, allowUnresolvedImports, processQueuedMessages, saveBlock })=>{
16
16
  // random port if not specified
17
17
  port = port ?? Math.floor(Math.random() * 10000) + 10000;
18
18
  const config = {
@@ -29,7 +29,8 @@ export * from './signFake.js';
29
29
  timeout,
30
30
  resume: resume ?? false,
31
31
  'allow-unresolved-imports': allowUnresolvedImports,
32
- 'process-queued-messages': processQueuedMessages
32
+ 'process-queued-messages': processQueuedMessages,
33
+ 'save-block': saveBlock
33
34
  };
34
35
  return config;
35
36
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acala-network/chopsticks-utils",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "author": "Acala Developers <hello@acala.network>",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -13,8 +13,8 @@
13
13
  "depcheck": "npx depcheck"
14
14
  },
15
15
  "dependencies": {
16
- "@acala-network/chopsticks": "1.0.5",
17
- "@acala-network/chopsticks-core": "1.0.5",
16
+ "@acala-network/chopsticks": "1.0.6",
17
+ "@acala-network/chopsticks-core": "1.0.6",
18
18
  "@polkadot-labs/hdkd": "^0.0.11",
19
19
  "@polkadot-labs/hdkd-helpers": "^0.0.11",
20
20
  "@polkadot/api": "^15.7.1",