@acala-network/chopsticks-testing 0.9.2-2 → 0.9.2-4

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/index.js CHANGED
@@ -65,7 +65,7 @@ function _export_star(from, to) {
65
65
  });
66
66
  return from;
67
67
  }
68
- const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, port, maxMemoryBlockCount, resume })=>{
68
+ const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, port, maxMemoryBlockCount, resume, runtimeLogLevel })=>{
69
69
  // random port if not specified
70
70
  port = port ?? Math.floor(Math.random() * 10000) + 10000;
71
71
  const config = {
@@ -75,6 +75,7 @@ const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, time
75
75
  'mock-signature-host': true,
76
76
  'build-block-mode': _chopsticks.BuildBlockMode.Manual,
77
77
  'max-memory-block-count': maxMemoryBlockCount ?? 100,
78
+ 'runtime-log-level': runtimeLogLevel,
78
79
  db,
79
80
  'wasm-override': wasmOverride,
80
81
  timeout,
@@ -88,17 +89,11 @@ const setupContext = async (option)=>{
88
89
  const setupContextWithConfig = async ({ timeout, ...config })=>{
89
90
  const { chain, listenPort, close } = await (0, _chopsticks.setupWithServer)(config);
90
91
  const url = `ws://localhost:${listenPort}`;
91
- const ws = new _api.WsProvider(url, undefined, undefined, timeout);
92
+ const ws = new _api.WsProvider(url, 3_000, undefined, timeout);
92
93
  const api = await _api.ApiPromise.create({
93
94
  provider: ws,
94
- signedExtensions: {
95
- SetEvmOrigin: {
96
- extrinsic: {},
97
- payload: {}
98
- }
99
- }
95
+ noInitWarn: true
100
96
  });
101
- await api.isReady;
102
97
  return {
103
98
  url,
104
99
  chain,
package/dist/esm/index.js CHANGED
@@ -4,7 +4,7 @@ import { Keyring, createTestKeyring } from '@polkadot/keyring';
4
4
  import { expect } from 'vitest';
5
5
  export * from './check.js';
6
6
  export * from './signFake.js';
7
- export const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, port, maxMemoryBlockCount, resume })=>{
7
+ export const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, port, maxMemoryBlockCount, resume, runtimeLogLevel })=>{
8
8
  // random port if not specified
9
9
  port = port ?? Math.floor(Math.random() * 10000) + 10000;
10
10
  const config = {
@@ -14,6 +14,7 @@ export const createConfig = ({ endpoint, blockNumber, blockHash, wasmOverride, d
14
14
  'mock-signature-host': true,
15
15
  'build-block-mode': BuildBlockMode.Manual,
16
16
  'max-memory-block-count': maxMemoryBlockCount ?? 100,
17
+ 'runtime-log-level': runtimeLogLevel,
17
18
  db,
18
19
  'wasm-override': wasmOverride,
19
20
  timeout,
@@ -27,17 +28,11 @@ export const setupContext = async (option)=>{
27
28
  export const setupContextWithConfig = async ({ timeout, ...config })=>{
28
29
  const { chain, listenPort, close } = await setupWithServer(config);
29
30
  const url = `ws://localhost:${listenPort}`;
30
- const ws = new WsProvider(url, undefined, undefined, timeout);
31
+ const ws = new WsProvider(url, 3_000, undefined, timeout);
31
32
  const api = await ApiPromise.create({
32
33
  provider: ws,
33
- signedExtensions: {
34
- SetEvmOrigin: {
35
- extrinsic: {},
36
- payload: {}
37
- }
38
- }
34
+ noInitWarn: true
39
35
  });
40
- await api.isReady;
41
36
  return {
42
37
  url,
43
38
  chain,
@@ -17,11 +17,12 @@ export type SetupOption = {
17
17
  port?: number;
18
18
  maxMemoryBlockCount?: number;
19
19
  resume?: boolean | HexString | number;
20
+ runtimeLogLevel?: number;
20
21
  };
21
22
  export type SetupConfig = Config & {
22
23
  timeout?: number;
23
24
  };
24
- export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, port, maxMemoryBlockCount, resume, }: SetupOption) => SetupConfig;
25
+ export declare const createConfig: ({ endpoint, blockNumber, blockHash, wasmOverride, db, timeout, port, maxMemoryBlockCount, resume, runtimeLogLevel, }: SetupOption) => SetupConfig;
25
26
  export declare const setupContext: (option: SetupOption) => Promise<{
26
27
  url: string;
27
28
  chain: import("@acala-network/chopsticks").Blockchain;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acala-network/chopsticks-testing",
3
- "version": "0.9.2-2",
3
+ "version": "0.9.2-4",
4
4
  "author": "Acala Developers <hello@acala.network>",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -12,7 +12,7 @@
12
12
  "build:types": "tsc -p tsconfig.json --emitDeclarationOnly --outDir dist/types"
13
13
  },
14
14
  "dependencies": {
15
- "@acala-network/chopsticks": "0.9.2-2"
15
+ "@acala-network/chopsticks": "0.9.2-4"
16
16
  },
17
17
  "peerDependencies": {
18
18
  "vitest": "^0.34.0"