moonwall 1.0.0-dev.0
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/LICENSE +681 -0
- package/README.md +54 -0
- package/config_schema.json +811 -0
- package/dist/api/constants/accounts.d.ts +36 -0
- package/dist/api/constants/accounts.d.ts.map +1 -0
- package/dist/api/constants/accounts.js +67 -0
- package/dist/api/constants/chain.d.ts +134 -0
- package/dist/api/constants/chain.d.ts.map +1 -0
- package/dist/api/constants/chain.js +149 -0
- package/dist/api/constants/index.d.ts +4 -0
- package/dist/api/constants/index.d.ts.map +1 -0
- package/dist/api/constants/index.js +3 -0
- package/dist/api/constants/smartContract.d.ts +29 -0
- package/dist/api/constants/smartContract.d.ts.map +1 -0
- package/dist/api/constants/smartContract.js +118 -0
- package/dist/api/testing/blocks.d.ts +59 -0
- package/dist/api/testing/blocks.d.ts.map +1 -0
- package/dist/api/testing/blocks.js +147 -0
- package/dist/api/testing/contracts.d.ts +5 -0
- package/dist/api/testing/contracts.d.ts.map +1 -0
- package/dist/api/testing/contracts.js +32 -0
- package/dist/api/testing/ethers.d.ts +3 -0
- package/dist/api/testing/ethers.d.ts.map +1 -0
- package/dist/api/testing/ethers.js +38 -0
- package/dist/api/testing/events.d.ts +12 -0
- package/dist/api/testing/events.d.ts.map +1 -0
- package/dist/api/testing/events.js +23 -0
- package/dist/api/testing/extrinsics.d.ts +5 -0
- package/dist/api/testing/extrinsics.d.ts.map +1 -0
- package/dist/api/testing/extrinsics.js +10 -0
- package/dist/api/testing/index.d.ts +9 -0
- package/dist/api/testing/index.d.ts.map +1 -0
- package/dist/api/testing/index.js +8 -0
- package/dist/api/testing/jumping.d.ts +8 -0
- package/dist/api/testing/jumping.d.ts.map +1 -0
- package/dist/api/testing/jumping.js +78 -0
- package/dist/api/testing/providers.d.ts +18 -0
- package/dist/api/testing/providers.d.ts.map +1 -0
- package/dist/api/testing/providers.js +34 -0
- package/dist/api/testing/viem.d.ts +139 -0
- package/dist/api/testing/viem.d.ts.map +1 -0
- package/dist/api/testing/viem.js +247 -0
- package/dist/api/types/config.d.ts +609 -0
- package/dist/api/types/config.d.ts.map +1 -0
- package/dist/api/types/config.js +1 -0
- package/dist/api/types/context.d.ts +125 -0
- package/dist/api/types/context.d.ts.map +1 -0
- package/dist/api/types/context.js +1 -0
- package/dist/api/types/contracts.d.ts +66 -0
- package/dist/api/types/contracts.d.ts.map +1 -0
- package/dist/api/types/contracts.js +1 -0
- package/dist/api/types/eth.d.ts +3 -0
- package/dist/api/types/eth.d.ts.map +1 -0
- package/dist/api/types/eth.js +1 -0
- package/dist/api/types/foundations.d.ts +11 -0
- package/dist/api/types/foundations.d.ts.map +1 -0
- package/dist/api/types/foundations.js +1 -0
- package/dist/api/types/helpers.d.ts +7 -0
- package/dist/api/types/helpers.d.ts.map +1 -0
- package/dist/api/types/helpers.js +1 -0
- package/dist/api/types/index.d.ts +8 -0
- package/dist/api/types/index.d.ts.map +1 -0
- package/dist/api/types/index.js +7 -0
- package/dist/api/types/runner.d.ts +490 -0
- package/dist/api/types/runner.d.ts.map +1 -0
- package/dist/api/types/runner.js +1 -0
- package/dist/cli/cmds/components/LogViewer.d.ts +17 -0
- package/dist/cli/cmds/components/LogViewer.d.ts.map +1 -0
- package/dist/cli/cmds/components/LogViewer.js +171 -0
- package/dist/cli/cmds/entrypoint.d.ts +6 -0
- package/dist/cli/cmds/entrypoint.d.ts.map +1 -0
- package/dist/cli/cmds/entrypoint.js +192 -0
- package/dist/cli/cmds/interactiveCmds/chopsticksIntCmds.d.ts +2 -0
- package/dist/cli/cmds/interactiveCmds/chopsticksIntCmds.d.ts.map +1 -0
- package/dist/cli/cmds/interactiveCmds/chopsticksIntCmds.js +117 -0
- package/dist/cli/cmds/interactiveCmds/devIntCmds.d.ts +2 -0
- package/dist/cli/cmds/interactiveCmds/devIntCmds.d.ts.map +1 -0
- package/dist/cli/cmds/interactiveCmds/devIntCmds.js +103 -0
- package/dist/cli/cmds/interactiveCmds/index.d.ts +4 -0
- package/dist/cli/cmds/interactiveCmds/index.d.ts.map +1 -0
- package/dist/cli/cmds/interactiveCmds/index.js +3 -0
- package/dist/cli/cmds/interactiveCmds/zombieIntCmds.d.ts +2 -0
- package/dist/cli/cmds/interactiveCmds/zombieIntCmds.d.ts.map +1 -0
- package/dist/cli/cmds/interactiveCmds/zombieIntCmds.js +32 -0
- package/dist/cli/cmds/main.d.ts +2 -0
- package/dist/cli/cmds/main.d.ts.map +1 -0
- package/dist/cli/cmds/main.js +336 -0
- package/dist/cli/cmds/runNetwork.d.ts +3 -0
- package/dist/cli/cmds/runNetwork.d.ts.map +1 -0
- package/dist/cli/cmds/runNetwork.js +292 -0
- package/dist/cli/cmds/runTests.d.ts +12 -0
- package/dist/cli/cmds/runTests.d.ts.map +1 -0
- package/dist/cli/cmds/runTests.js +257 -0
- package/dist/cli/internal/cmdFunctions/downloader.d.ts +4 -0
- package/dist/cli/internal/cmdFunctions/downloader.d.ts.map +1 -0
- package/dist/cli/internal/cmdFunctions/downloader.js +49 -0
- package/dist/cli/internal/cmdFunctions/fetchArtifact.d.ts +10 -0
- package/dist/cli/internal/cmdFunctions/fetchArtifact.d.ts.map +1 -0
- package/dist/cli/internal/cmdFunctions/fetchArtifact.js +145 -0
- package/dist/cli/internal/cmdFunctions/index.d.ts +5 -0
- package/dist/cli/internal/cmdFunctions/index.d.ts.map +1 -0
- package/dist/cli/internal/cmdFunctions/index.js +4 -0
- package/dist/cli/internal/cmdFunctions/initialisation.d.ts +20 -0
- package/dist/cli/internal/cmdFunctions/initialisation.d.ts.map +1 -0
- package/dist/cli/internal/cmdFunctions/initialisation.js +150 -0
- package/dist/cli/internal/cmdFunctions/tempLogs.d.ts +3 -0
- package/dist/cli/internal/cmdFunctions/tempLogs.d.ts.map +1 -0
- package/dist/cli/internal/cmdFunctions/tempLogs.js +37 -0
- package/dist/cli/internal/commandParsers.d.ts +59 -0
- package/dist/cli/internal/commandParsers.d.ts.map +1 -0
- package/dist/cli/internal/commandParsers.js +305 -0
- package/dist/cli/internal/deriveTestIds.d.ts +8 -0
- package/dist/cli/internal/deriveTestIds.d.ts.map +1 -0
- package/dist/cli/internal/deriveTestIds.js +123 -0
- package/dist/cli/internal/effect/index.d.ts +6 -0
- package/dist/cli/internal/effect/index.d.ts.map +1 -0
- package/dist/cli/internal/effect/index.js +5 -0
- package/dist/cli/internal/fileCheckers.d.ts +11 -0
- package/dist/cli/internal/fileCheckers.d.ts.map +1 -0
- package/dist/cli/internal/fileCheckers.js +165 -0
- package/dist/cli/internal/foundations/index.d.ts +4 -0
- package/dist/cli/internal/foundations/index.d.ts.map +1 -0
- package/dist/cli/internal/foundations/index.js +4 -0
- package/dist/cli/internal/index.d.ts +12 -0
- package/dist/cli/internal/index.d.ts.map +1 -0
- package/dist/cli/internal/index.js +11 -0
- package/dist/cli/internal/launcherCommon.d.ts +4 -0
- package/dist/cli/internal/launcherCommon.d.ts.map +1 -0
- package/dist/cli/internal/launcherCommon.js +130 -0
- package/dist/cli/internal/localNode.d.ts +16 -0
- package/dist/cli/internal/localNode.d.ts.map +1 -0
- package/dist/cli/internal/localNode.js +362 -0
- package/dist/cli/internal/logging.d.ts +2 -0
- package/dist/cli/internal/logging.d.ts.map +1 -0
- package/dist/cli/internal/logging.js +26 -0
- package/dist/cli/internal/node.d.ts +33 -0
- package/dist/cli/internal/node.d.ts.map +1 -0
- package/dist/cli/internal/node.js +228 -0
- package/dist/cli/internal/processHelpers.d.ts +17 -0
- package/dist/cli/internal/processHelpers.d.ts.map +1 -0
- package/dist/cli/internal/processHelpers.js +56 -0
- package/dist/cli/internal/providerFactories.d.ts +48 -0
- package/dist/cli/internal/providerFactories.d.ts.map +1 -0
- package/dist/cli/internal/providerFactories.js +442 -0
- package/dist/cli/internal/testIdParser.d.ts +34 -0
- package/dist/cli/internal/testIdParser.d.ts.map +1 -0
- package/dist/cli/internal/testIdParser.js +167 -0
- package/dist/cli/lib/binariesHelpers.d.ts +15 -0
- package/dist/cli/lib/binariesHelpers.d.ts.map +1 -0
- package/dist/cli/lib/binariesHelpers.js +99 -0
- package/dist/cli/lib/configReader.d.ts +8 -0
- package/dist/cli/lib/configReader.d.ts.map +1 -0
- package/dist/cli/lib/configReader.js +115 -0
- package/dist/cli/lib/contractFunctions.d.ts +2 -0
- package/dist/cli/lib/contractFunctions.d.ts.map +1 -0
- package/dist/cli/lib/contractFunctions.js +2 -0
- package/dist/cli/lib/globalContext.d.ts +46 -0
- package/dist/cli/lib/globalContext.d.ts.map +1 -0
- package/dist/cli/lib/globalContext.js +710 -0
- package/dist/cli/lib/governanceProcedures.d.ts +27 -0
- package/dist/cli/lib/governanceProcedures.d.ts.map +1 -0
- package/dist/cli/lib/governanceProcedures.js +458 -0
- package/dist/cli/lib/handlers/index.d.ts +5 -0
- package/dist/cli/lib/handlers/index.d.ts.map +1 -0
- package/dist/cli/lib/handlers/index.js +5 -0
- package/dist/cli/lib/repoDefinitions/index.d.ts +6 -0
- package/dist/cli/lib/repoDefinitions/index.d.ts.map +1 -0
- package/dist/cli/lib/repoDefinitions/index.js +21 -0
- package/dist/cli/lib/repoDefinitions/moonbeam.d.ts +4 -0
- package/dist/cli/lib/repoDefinitions/moonbeam.d.ts.map +1 -0
- package/dist/cli/lib/repoDefinitions/moonbeam.js +30 -0
- package/dist/cli/lib/repoDefinitions/polkadot.d.ts +4 -0
- package/dist/cli/lib/repoDefinitions/polkadot.d.ts.map +1 -0
- package/dist/cli/lib/repoDefinitions/polkadot.js +11 -0
- package/dist/cli/lib/repoDefinitions/tanssi.d.ts +4 -0
- package/dist/cli/lib/repoDefinitions/tanssi.d.ts.map +1 -0
- package/dist/cli/lib/repoDefinitions/tanssi.js +14 -0
- package/dist/cli/lib/rpcFunctions.d.ts +2 -0
- package/dist/cli/lib/rpcFunctions.d.ts.map +1 -0
- package/dist/cli/lib/rpcFunctions.js +26 -0
- package/dist/cli/lib/runnerContext.d.ts +32 -0
- package/dist/cli/lib/runnerContext.d.ts.map +1 -0
- package/dist/cli/lib/runnerContext.js +156 -0
- package/dist/cli/lib/shardManager.d.ts +40 -0
- package/dist/cli/lib/shardManager.d.ts.map +1 -0
- package/dist/cli/lib/shardManager.js +80 -0
- package/dist/cli/lib/upgradeProcedures.d.ts +5 -0
- package/dist/cli/lib/upgradeProcedures.d.ts.map +1 -0
- package/dist/cli/lib/upgradeProcedures.js +221 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +3 -0
- package/dist/contracts/contractInteraction.d.ts +17 -0
- package/dist/contracts/contractInteraction.d.ts.map +1 -0
- package/dist/contracts/contractInteraction.js +170 -0
- package/dist/contracts/index.d.ts +2 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +1 -0
- package/dist/foundations/chopsticks/handler.d.ts +3 -0
- package/dist/foundations/chopsticks/handler.d.ts.map +1 -0
- package/dist/foundations/chopsticks/handler.js +93 -0
- package/dist/foundations/chopsticks/helpers.d.ts +27 -0
- package/dist/foundations/chopsticks/helpers.d.ts.map +1 -0
- package/dist/foundations/chopsticks/helpers.js +133 -0
- package/dist/foundations/dev/handler.d.ts +3 -0
- package/dist/foundations/dev/handler.d.ts.map +1 -0
- package/dist/foundations/dev/handler.js +136 -0
- package/dist/foundations/dev/helpers.d.ts +27 -0
- package/dist/foundations/dev/helpers.d.ts.map +1 -0
- package/dist/foundations/dev/helpers.js +161 -0
- package/dist/foundations/read-only/handler.d.ts +3 -0
- package/dist/foundations/read-only/handler.d.ts.map +1 -0
- package/dist/foundations/read-only/handler.js +32 -0
- package/dist/foundations/zombie/handler.d.ts +3 -0
- package/dist/foundations/zombie/handler.d.ts.map +1 -0
- package/dist/foundations/zombie/handler.js +92 -0
- package/dist/foundations/zombie/helpers.d.ts +16 -0
- package/dist/foundations/zombie/helpers.d.ts.map +1 -0
- package/dist/foundations/zombie/helpers.js +97 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +47 -0
- package/dist/internal/common.d.ts +3 -0
- package/dist/internal/common.d.ts.map +1 -0
- package/dist/internal/common.js +41 -0
- package/dist/internal/index.d.ts +4 -0
- package/dist/internal/index.d.ts.map +1 -0
- package/dist/internal/index.js +3 -0
- package/dist/internal/logger.d.ts +24 -0
- package/dist/internal/logger.d.ts.map +1 -0
- package/dist/internal/logger.js +66 -0
- package/dist/internal/logging.d.ts +7 -0
- package/dist/internal/logging.d.ts.map +1 -0
- package/dist/internal/logging.js +36 -0
- package/dist/moondebug.d.ts +3 -0
- package/dist/moondebug.d.ts.map +1 -0
- package/dist/moondebug.js +2 -0
- package/dist/services/cache/FileLock.d.ts +11 -0
- package/dist/services/cache/FileLock.d.ts.map +1 -0
- package/dist/services/cache/FileLock.js +68 -0
- package/dist/services/cache/StartupCacheService.d.ts +23 -0
- package/dist/services/cache/StartupCacheService.d.ts.map +1 -0
- package/dist/services/cache/StartupCacheService.js +159 -0
- package/dist/services/cache/index.d.ts +3 -0
- package/dist/services/cache/index.d.ts.map +1 -0
- package/dist/services/cache/index.js +2 -0
- package/dist/services/chopsticks/ChopsticksMultiChain.d.ts +158 -0
- package/dist/services/chopsticks/ChopsticksMultiChain.d.ts.map +1 -0
- package/dist/services/chopsticks/ChopsticksMultiChain.js +282 -0
- package/dist/services/chopsticks/ChopsticksService.d.ts +313 -0
- package/dist/services/chopsticks/ChopsticksService.d.ts.map +1 -0
- package/dist/services/chopsticks/ChopsticksService.js +77 -0
- package/dist/services/chopsticks/chopsticksConfigParser.d.ts +40 -0
- package/dist/services/chopsticks/chopsticksConfigParser.d.ts.map +1 -0
- package/dist/services/chopsticks/chopsticksConfigParser.js +201 -0
- package/dist/services/chopsticks/index.d.ts +5 -0
- package/dist/services/chopsticks/index.d.ts.map +1 -0
- package/dist/services/chopsticks/index.js +4 -0
- package/dist/services/chopsticks/launchChopsticksEffect.d.ts +225 -0
- package/dist/services/chopsticks/launchChopsticksEffect.d.ts.map +1 -0
- package/dist/services/chopsticks/launchChopsticksEffect.js +623 -0
- package/dist/services/config/configAccessors.d.ts +41 -0
- package/dist/services/config/configAccessors.d.ts.map +1 -0
- package/dist/services/config/configAccessors.js +149 -0
- package/dist/services/config/index.d.ts +2 -0
- package/dist/services/config/index.d.ts.map +1 -0
- package/dist/services/config/index.js +1 -0
- package/dist/services/errors.d.ts +72 -0
- package/dist/services/errors.d.ts.map +1 -0
- package/dist/services/errors.js +31 -0
- package/dist/services/index.d.ts +7 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +6 -0
- package/dist/services/network/NodeReadinessService.d.ts +35 -0
- package/dist/services/network/NodeReadinessService.d.ts.map +1 -0
- package/dist/services/network/NodeReadinessService.js +120 -0
- package/dist/services/network/PortDiscoveryService.d.ts +22 -0
- package/dist/services/network/PortDiscoveryService.d.ts.map +1 -0
- package/dist/services/network/PortDiscoveryService.js +77 -0
- package/dist/services/network/RpcPortDiscoveryService.d.ts +25 -0
- package/dist/services/network/RpcPortDiscoveryService.d.ts.map +1 -0
- package/dist/services/network/RpcPortDiscoveryService.js +136 -0
- package/dist/services/network/index.d.ts +4 -0
- package/dist/services/network/index.d.ts.map +1 -0
- package/dist/services/network/index.js +3 -0
- package/dist/services/process/ProcessManagerService.d.ts +49 -0
- package/dist/services/process/ProcessManagerService.d.ts.map +1 -0
- package/dist/services/process/ProcessManagerService.js +162 -0
- package/dist/services/process/index.d.ts +3 -0
- package/dist/services/process/index.d.ts.map +1 -0
- package/dist/services/process/index.js +2 -0
- package/dist/services/process/launchNodeEffect.d.ts +40 -0
- package/dist/services/process/launchNodeEffect.d.ts.map +1 -0
- package/dist/services/process/launchNodeEffect.js +86 -0
- package/dist/util/functions/index.d.ts +3 -0
- package/dist/util/functions/index.d.ts.map +1 -0
- package/dist/util/functions/index.js +4 -0
- package/dist/util/index.d.ts +4 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/index.js +2 -0
- package/package.json +157 -0
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import type { ApiPromise } from "@polkadot/api";
|
|
2
|
+
import type { ApiTypes } from "@polkadot/api/types";
|
|
3
|
+
import type { KeyringPair } from "@polkadot/keyring/types";
|
|
4
|
+
import type { Logger, LogFn } from "pino";
|
|
5
|
+
import type { Wallet, TransactionRequest } from "ethers";
|
|
6
|
+
import type { Abi, Account, createPublicClient, createWalletClient, Log, PublicActions, TransactionSerializable, Transport, WalletClient } from "viem";
|
|
7
|
+
import type { Chain } from "viem/chains";
|
|
8
|
+
import type { Web3 } from "web3";
|
|
9
|
+
import type { ForkConfig, FoundationType } from "./config.js";
|
|
10
|
+
import type { BlockCreation, BlockCreationResponse, ChopsticksBlockCreation } from "./context.js";
|
|
11
|
+
import type { ContractDeploymentOptions } from "./contracts.js";
|
|
12
|
+
import type { TransactionType } from "./eth.js";
|
|
13
|
+
import type { CallType } from "./foundations.js";
|
|
14
|
+
import type { DeepPartial, Prettify } from "./helpers.js";
|
|
15
|
+
import type { PolkadotClient } from "polkadot-api";
|
|
16
|
+
/**
|
|
17
|
+
* @name CustomTest
|
|
18
|
+
* @description The custom test type.
|
|
19
|
+
* @property id - A unique identifier for the test.
|
|
20
|
+
* @property title - The title of the test.
|
|
21
|
+
* @property test - A function to execute the test.
|
|
22
|
+
* @property modifier - An optional modifier to control test execution ("only" or "skip").
|
|
23
|
+
* @property minRtVersion - The minimum runtime version required for the test.
|
|
24
|
+
* @property chainType - The chain type required for the test.
|
|
25
|
+
* @property notChainType - The chain type excluded from the test.
|
|
26
|
+
* @property timeout - The test timeout value.
|
|
27
|
+
*/
|
|
28
|
+
export type CustomTest = (params: {
|
|
29
|
+
id: string;
|
|
30
|
+
title: string;
|
|
31
|
+
test: (vitestContext: any) => void;
|
|
32
|
+
modifier?: "only" | "skip";
|
|
33
|
+
minRtVersion?: number;
|
|
34
|
+
chainType?: "moonriver" | "moonbeam" | "moonbase";
|
|
35
|
+
notChainType?: "moonbeam" | "moonriver" | "moonbase";
|
|
36
|
+
timeout?: number;
|
|
37
|
+
}) => void;
|
|
38
|
+
export type FoundationMethod = "dev" | "chopsticks" | "zombie" | "read_only" | "fork";
|
|
39
|
+
export type ChainType = "moonbeam" | "moonriver" | "moonbase";
|
|
40
|
+
export type FoundationContextMap = {
|
|
41
|
+
[K in FoundationMethod]: K extends "dev" ? DevModeContext : K extends "chopsticks" ? ChopsticksContext : K extends "zombie" ? ZombieContext : K extends "read_only" ? ReadOnlyContext : GenericContext;
|
|
42
|
+
};
|
|
43
|
+
export type TestContextMap = {
|
|
44
|
+
[K in FoundationMethod]: ITestContext<FoundationContextMap[K]>;
|
|
45
|
+
};
|
|
46
|
+
export type TestCasesFn<T extends FoundationType> = (params: {
|
|
47
|
+
context: GenericContext & FoundationContextMap[T];
|
|
48
|
+
it: (params: ITestCase) => void;
|
|
49
|
+
log: LogFn;
|
|
50
|
+
logger: Logger;
|
|
51
|
+
}) => void;
|
|
52
|
+
export type TestCaseModifier = "only" | "skip";
|
|
53
|
+
export interface ITestCase {
|
|
54
|
+
id: string;
|
|
55
|
+
title: string;
|
|
56
|
+
test: (vitestContext: any) => void;
|
|
57
|
+
modifier?: TestCaseModifier;
|
|
58
|
+
minRtVersion?: number;
|
|
59
|
+
chainType?: "moonbeam" | "moonriver" | "moonbase";
|
|
60
|
+
notChainType?: "moonbeam" | "moonriver" | "moonbase";
|
|
61
|
+
timeout?: number;
|
|
62
|
+
}
|
|
63
|
+
export type TestSuiteConfig<T extends FoundationType = FoundationType> = {
|
|
64
|
+
id: string;
|
|
65
|
+
title: string;
|
|
66
|
+
foundationMethods: T;
|
|
67
|
+
description?: string;
|
|
68
|
+
testCases: TestCasesFn<T>;
|
|
69
|
+
};
|
|
70
|
+
export type FoundationHandler<T extends FoundationType> = (params: {
|
|
71
|
+
testCases: TestCasesFn<T>;
|
|
72
|
+
context: GenericContext;
|
|
73
|
+
testCase: (params: ITestCase) => void;
|
|
74
|
+
logger: Logger;
|
|
75
|
+
ctx?: any;
|
|
76
|
+
}) => void;
|
|
77
|
+
/**
|
|
78
|
+
* BETA: Represents overrides for launching a test environment.
|
|
79
|
+
* @property forkConfig - Optional configuration for forking a network.
|
|
80
|
+
*/
|
|
81
|
+
export type LaunchOverrides = {
|
|
82
|
+
forkConfig?: ForkConfig;
|
|
83
|
+
};
|
|
84
|
+
export type ITestSuiteType<T extends FoundationMethod> = {
|
|
85
|
+
id: string;
|
|
86
|
+
title: string;
|
|
87
|
+
testCases: (TestContext: TestContextMap[T]) => void;
|
|
88
|
+
foundationMethods: T;
|
|
89
|
+
options?: LaunchOverrides;
|
|
90
|
+
minRtVersion?: number;
|
|
91
|
+
chainType?: ChainType;
|
|
92
|
+
notChainType?: ChainType;
|
|
93
|
+
};
|
|
94
|
+
interface ITestContext<T extends GenericContext> {
|
|
95
|
+
context: T;
|
|
96
|
+
it: CustomTest;
|
|
97
|
+
log: LogFn;
|
|
98
|
+
logger: Logger;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* @name DevTestContext
|
|
102
|
+
* @description The context for tests running in development mode.
|
|
103
|
+
* @property context - The context for the development mode.
|
|
104
|
+
* @property it - The CustomTest function for the test.
|
|
105
|
+
* @property log - The Logger instance for logging.
|
|
106
|
+
*/
|
|
107
|
+
export type DevTestContext = ITestContext<DevModeContext>;
|
|
108
|
+
/**
|
|
109
|
+
* @name ReadOnlyTestContext
|
|
110
|
+
* @description The context for tests running in read-only mode.
|
|
111
|
+
* @property context - The context for the read-only mode.
|
|
112
|
+
* @property it - The CustomTest function for the test.
|
|
113
|
+
* @property log - The Logger instance for logging.
|
|
114
|
+
*/
|
|
115
|
+
export type ReadOnlyTestContext = ITestContext<ReadOnlyContext>;
|
|
116
|
+
/**
|
|
117
|
+
* @name ChopsticksTestContext
|
|
118
|
+
* @description The context for tests running with chopsticks.
|
|
119
|
+
* @property context - The context for the chopsticks mode.
|
|
120
|
+
* @property it - The CustomTest function for the test.
|
|
121
|
+
* @property log - The Logger instance for logging.
|
|
122
|
+
*/
|
|
123
|
+
export type ChopsticksTestContext = ITestContext<ChopsticksContext>;
|
|
124
|
+
export type ZombieTestContext = ITestContext<ZombieContext>;
|
|
125
|
+
/**
|
|
126
|
+
* @name GenericTestContext
|
|
127
|
+
* @description The base test context for other contexts to extend, not to be used directly.
|
|
128
|
+
* @property context - The base context for other contexts to extend, not to be used directly.
|
|
129
|
+
* @property it - The CustomTest function for the test.
|
|
130
|
+
* @property log - The Logger instance for logging.
|
|
131
|
+
*/
|
|
132
|
+
export type GenericTestContext = ITestContext<GenericContext>;
|
|
133
|
+
/**
|
|
134
|
+
* @name UpgradePreferences
|
|
135
|
+
* @description The upgrade preferences object.
|
|
136
|
+
* @property runtimeName - The name of the runtime.
|
|
137
|
+
* @property runtimeTag - The tag of the runtime.
|
|
138
|
+
* @property from - The KeyringPair to be used for the upgrade.
|
|
139
|
+
* @property waitMigration - A flag to indicate whether to wait for migration.
|
|
140
|
+
* @property upgradeMethod - Specifies which upgrade method to use: "Governance", "WhiteListedCaller", "Sudo" (default).
|
|
141
|
+
* @property localPath - The local path for the runtime.
|
|
142
|
+
* @property logger - The debugger instance for logging.
|
|
143
|
+
*/
|
|
144
|
+
export interface UpgradePreferences {
|
|
145
|
+
runtimeName?: "moonbase" | "moonriver" | "moonbeam";
|
|
146
|
+
runtimeTag?: "local" | string;
|
|
147
|
+
from?: KeyringPair;
|
|
148
|
+
waitMigration?: boolean;
|
|
149
|
+
upgradeMethod?: "Governance" | "WhiteListedCaller" | "Sudo";
|
|
150
|
+
localPath?: string;
|
|
151
|
+
logger?: Logger | ((message: string) => void);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* ViemClient - Combined type that contains both Wallet and Public viem client actions
|
|
155
|
+
*/
|
|
156
|
+
export type ViemClient = WalletClient<Transport, Chain, Account> & PublicActions;
|
|
157
|
+
export type ViemClientInterface = Prettify<ReturnType<typeof createWalletClient> & ReturnType<typeof createPublicClient>>;
|
|
158
|
+
/**
|
|
159
|
+
* GenericContext - Interface that encapsulates all the common methods and properties needed for all tests.
|
|
160
|
+
*/
|
|
161
|
+
export interface GenericContext {
|
|
162
|
+
api(type: "polkadotJs", name?: string): ApiPromise;
|
|
163
|
+
api(type: "ethers", name?: string): Wallet;
|
|
164
|
+
api(type: "web3", name?: string): Web3;
|
|
165
|
+
api(type: "viem", name?: string): ViemClient;
|
|
166
|
+
api(type: "papi", name?: string): PolkadotClient;
|
|
167
|
+
viem(name?: string): ViemClient;
|
|
168
|
+
polkadotJs(apiName?: string): ApiPromise;
|
|
169
|
+
ethers(name?: string): Wallet;
|
|
170
|
+
web3(name?: string): Web3;
|
|
171
|
+
papi(name?: string): PolkadotClient;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* ReadOnlyContext - Interface that extends from GenericContext and includes the method for waiting a certain number of blocks.
|
|
175
|
+
*/
|
|
176
|
+
export interface ReadOnlyContext extends GenericContext {
|
|
177
|
+
waitBlock: (blocksToWaitFor?: number, chain?: string, mode?: "height" | "quantity") => Promise<void>;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* ZombieContext - Interface that extends from GenericContext and includes methods for managing runtime upgrades and node operations within a blockchain network.
|
|
181
|
+
*/
|
|
182
|
+
export interface ZombieContext extends GenericContext {
|
|
183
|
+
/**
|
|
184
|
+
* Initiates the runtime upgrade process with the provided upgrade preferences.
|
|
185
|
+
*
|
|
186
|
+
* @param {UpgradePreferences} options The configuration options for the upgrade, including runtime details and migration settings.
|
|
187
|
+
* @returns {Promise<void>} A promise that resolves when the upgrade process has been initiated.
|
|
188
|
+
*/
|
|
189
|
+
upgradeRuntime: (options: UpgradePreferences) => Promise<void>;
|
|
190
|
+
/**
|
|
191
|
+
* ⚠️ WARNING: This doesn't seem to be working yet. ⚠️
|
|
192
|
+
*
|
|
193
|
+
* Checks if the specified node is running.
|
|
194
|
+
*
|
|
195
|
+
* @param {string} nodeName The name of the node to check.
|
|
196
|
+
* @returns {Promise<boolean>} A promise that resolves to a boolean indicating whether the node is up and running.
|
|
197
|
+
*/
|
|
198
|
+
isUp?: (nodeName: string) => Promise<boolean>;
|
|
199
|
+
/**
|
|
200
|
+
* Restarts the node with the given name.
|
|
201
|
+
*
|
|
202
|
+
* @param {string} nodeName The name of the node to restart.
|
|
203
|
+
* @returns {Promise<void>} A promise that resolves when the node restart has been completed.
|
|
204
|
+
*/
|
|
205
|
+
restartNode: (nodeName: string) => Promise<void>;
|
|
206
|
+
/**
|
|
207
|
+
* * ⚠️ WARNING: This doesn't seem to be working yet. ⚠️
|
|
208
|
+
*
|
|
209
|
+
* Pauses the node with the specified name.
|
|
210
|
+
*
|
|
211
|
+
* @param {string} nodeName The name of the node to pause.
|
|
212
|
+
* @returns {Promise<void>} A promise that resolves when the node has been successfully paused.
|
|
213
|
+
*/
|
|
214
|
+
pauseNode?: (nodeName: string) => Promise<void>;
|
|
215
|
+
/**
|
|
216
|
+
* ⚠️ WARNING: This doesn't seem to be working yet. ⚠️
|
|
217
|
+
*
|
|
218
|
+
* Resumes the operation of a paused node with the given name.
|
|
219
|
+
*
|
|
220
|
+
* @param {string} nodeName The name of the node to resume.
|
|
221
|
+
* @returns {Promise<void>} A promise that resolves when the node has resumed operations.
|
|
222
|
+
*/
|
|
223
|
+
resumeNode?: (nodeName: string) => Promise<void>;
|
|
224
|
+
/**
|
|
225
|
+
* Terminates the node with the provided name.
|
|
226
|
+
*
|
|
227
|
+
* @param {string} nodeName The name of the node to terminate.
|
|
228
|
+
* @returns {Promise<void>} A promise that resolves when the node has been successfully terminated.
|
|
229
|
+
*/
|
|
230
|
+
killNode: (nodeName: string) => Promise<void>;
|
|
231
|
+
/**
|
|
232
|
+
* Waits for a specified number of blocks before resolving. This can be based on block height or quantity, depending on the mode.
|
|
233
|
+
*
|
|
234
|
+
* @param {number} [blocksToWaitFor] The number of blocks to wait for before the promise resolves. If not provided, defaults to some predetermined quantity.
|
|
235
|
+
* @param {string} [chain] The name of the blockchain to monitor for block production.
|
|
236
|
+
* @param {"height" | "quantity"} [mode] The mode to determine the block wait criteria - by height or by quantity.
|
|
237
|
+
* @returns {Promise<void>} A promise that resolves after waiting for the specified number of blocks.
|
|
238
|
+
*/
|
|
239
|
+
waitBlock: (blocksToWaitFor?: number, chain?: string, mode?: "height" | "quantity") => Promise<void>;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* ChopsticksContext - Interface that extends from GenericContext and includes methods for creating a block, setting storage, and upgrading runtime.
|
|
243
|
+
*/
|
|
244
|
+
export interface ChopsticksContext extends GenericContext {
|
|
245
|
+
/**
|
|
246
|
+
* Creates a block based on the given options.
|
|
247
|
+
*
|
|
248
|
+
* @param {ChopsticksBlockCreation} [options] Optional parameters for block creation.
|
|
249
|
+
* @returns {Promise<{ result: string }>} A Promise that resolves to an object containing the result string.
|
|
250
|
+
*/
|
|
251
|
+
createBlock: (options?: ChopsticksBlockCreation) => Promise<{
|
|
252
|
+
result: string;
|
|
253
|
+
}>;
|
|
254
|
+
/**
|
|
255
|
+
* Sets the storage based on the provided parameters.
|
|
256
|
+
*
|
|
257
|
+
* @param {Object} params The parameters required for setting storage.
|
|
258
|
+
* @param {string} [params.providerName] Optional name of the provider.
|
|
259
|
+
* @param {string} params.module The name of the module.
|
|
260
|
+
* @param {string} params.method The method to be called.
|
|
261
|
+
* @param {any} params.methodParams The parameters required for the method.
|
|
262
|
+
* @returns {Promise<void>} A Promise that resolves once the storage has been set.
|
|
263
|
+
*/
|
|
264
|
+
setStorage: (params: {
|
|
265
|
+
providerName?: string;
|
|
266
|
+
module: string;
|
|
267
|
+
method: string;
|
|
268
|
+
methodParams: any;
|
|
269
|
+
}) => Promise<void>;
|
|
270
|
+
/**
|
|
271
|
+
* Upgrades the runtime.
|
|
272
|
+
*
|
|
273
|
+
* @returns {Promise<void>} A Promise that resolves once the runtime has been upgraded.
|
|
274
|
+
*/
|
|
275
|
+
upgradeRuntime: (providerName?: string) => Promise<void>;
|
|
276
|
+
/**
|
|
277
|
+
* Getter that returns true if System.Account is AccountId20 (Ethereum Account length is 20 bytes).
|
|
278
|
+
*/
|
|
279
|
+
isEthereumChain: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Getter that returns an object with the default accounts already generated.
|
|
282
|
+
*/
|
|
283
|
+
keyring: {
|
|
284
|
+
alice: KeyringPair;
|
|
285
|
+
bob: KeyringPair;
|
|
286
|
+
charlie: KeyringPair;
|
|
287
|
+
dave: KeyringPair;
|
|
288
|
+
};
|
|
289
|
+
/**
|
|
290
|
+
* Property that returns true if System.Account is AccountId32 (Substrate Account length is 32 bytes).
|
|
291
|
+
*/
|
|
292
|
+
isSubstrateChain: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Default getter for a connected PolkadotJs ApiPromise instance
|
|
295
|
+
*/
|
|
296
|
+
pjsApi: ApiPromise;
|
|
297
|
+
/**
|
|
298
|
+
* Jump a specified number of ParachainStaking Rounds.
|
|
299
|
+
*
|
|
300
|
+
* @param {number} blocksToJump The number of ParachainStaking rounds to jump forward.
|
|
301
|
+
* @returns {Promise<void>} A Promise that resolves after the operation is fully complete.
|
|
302
|
+
*/
|
|
303
|
+
jumpRounds?: (options: {
|
|
304
|
+
rounds: number;
|
|
305
|
+
providerName?: string;
|
|
306
|
+
}) => Promise<void>;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* DevModeContext - Interface that extends from GenericContext and includes a method for creating a block.
|
|
310
|
+
*/
|
|
311
|
+
export interface DevModeContext extends GenericContext {
|
|
312
|
+
/**
|
|
313
|
+
* Default getter for a connected PolkadotJs ApiPromise instance
|
|
314
|
+
*/
|
|
315
|
+
pjsApi: ApiPromise;
|
|
316
|
+
/**
|
|
317
|
+
* Getter that returns true if System.Account is AccountId20 (Ethereum Account length is 20 bytes).
|
|
318
|
+
*/
|
|
319
|
+
isEthereumChain: boolean;
|
|
320
|
+
/**
|
|
321
|
+
* Getter that returns true if chain has ParachainStaking pallet.
|
|
322
|
+
*/
|
|
323
|
+
isParachainStaking: boolean;
|
|
324
|
+
/**
|
|
325
|
+
* Getter that returns an object with the default accounts already generated.
|
|
326
|
+
*/
|
|
327
|
+
keyring: {
|
|
328
|
+
alice: KeyringPair;
|
|
329
|
+
bob: KeyringPair;
|
|
330
|
+
charlie: KeyringPair;
|
|
331
|
+
dave: KeyringPair;
|
|
332
|
+
};
|
|
333
|
+
/**
|
|
334
|
+
* Property that returns true if System.Account is AccountId32 (Substrate Account length is 32 bytes).
|
|
335
|
+
*/
|
|
336
|
+
isSubstrateChain: boolean;
|
|
337
|
+
/**
|
|
338
|
+
* Creates a block with given transactions and options.
|
|
339
|
+
*
|
|
340
|
+
* @template ApiType Type of API to be used.
|
|
341
|
+
* @template Calls Type of calls to be made, could be a single CallType or an array of CallType.
|
|
342
|
+
* @param {Calls} transactions An optional array of transactions.
|
|
343
|
+
* @param {BlockCreation} options Optional parameters for block creation.
|
|
344
|
+
* @returns {Promise<BlockCreationResponse<ApiType, Calls>>} A Promise that resolves to a BlockCreationResponse.
|
|
345
|
+
*/
|
|
346
|
+
createBlock<ApiType extends ApiTypes, Calls extends CallType<ApiType> | CallType<ApiType>[]>(transactions?: Calls, options?: BlockCreation): Promise<BlockCreationResponse<ApiType, Calls>>;
|
|
347
|
+
/**
|
|
348
|
+
* Creates a raw Ethereum transaction based on the given options.
|
|
349
|
+
*
|
|
350
|
+
* @template TOptions Type of option parameters to be used. Use libraryType to specify which web3 library to use
|
|
351
|
+
* (viem or ethers), otherwise will default to viem.
|
|
352
|
+
* @param {TOptions} options Options for creating a transaction.
|
|
353
|
+
* @returns {Promise<`0x${string}`>} A Promise that resolves to a raw transaction string prefixed with '0x'.
|
|
354
|
+
*/
|
|
355
|
+
createTxn?<TOptions extends (DeepPartial<ViemTransactionOptions> & {
|
|
356
|
+
libraryType?: "viem";
|
|
357
|
+
}) | (EthersTransactionOptions & {
|
|
358
|
+
libraryType: "ethers";
|
|
359
|
+
})>(options: TOptions): Promise<`0x${string}`>;
|
|
360
|
+
/**
|
|
361
|
+
* Execute a non-state changing transaction to a precompiled contract address (i.e. read).
|
|
362
|
+
*
|
|
363
|
+
* @param {PrecompileCallOptions} callOptions The options for the contract call.
|
|
364
|
+
* @returns {Promise<unknown>} A Promise that resolves to the return data from the contract call.
|
|
365
|
+
*/
|
|
366
|
+
readPrecompile?(callOptions: PrecompileCallOptions): Promise<unknown>;
|
|
367
|
+
/**
|
|
368
|
+
* Submit a state-changing transaction to a precompiled contract address.
|
|
369
|
+
*
|
|
370
|
+
* @param {PrecompileCallOptions} callOptions The options for the contract call.
|
|
371
|
+
* @returns {Promise<`0x${string}`>} The transaction hash that resolves after the write operation has been completed.
|
|
372
|
+
*/
|
|
373
|
+
writePrecompile?(callOptions: PrecompileCallOptions): Promise<`0x${string}`>;
|
|
374
|
+
/**
|
|
375
|
+
* Execute a non-state changing transaction to a deployed contract address (i.e. read).
|
|
376
|
+
*
|
|
377
|
+
* @param {ContractCallOptions} callOptions The options for the contract call.
|
|
378
|
+
* @returns {Promise<unknown>} A Promise that resolves to the return data from the contract call.
|
|
379
|
+
*/
|
|
380
|
+
readContract?(callOptions: ContractCallOptions): Promise<unknown>;
|
|
381
|
+
/**
|
|
382
|
+
* Submit a state-changing transaction to a deployed contract address.
|
|
383
|
+
*
|
|
384
|
+
* @param {ContractCallOptions} callOptions The options for the contract call.
|
|
385
|
+
* @returns {Promise<`0x${string}`>} The transaction hash that resolves after the write operation has been completed.
|
|
386
|
+
*/
|
|
387
|
+
writeContract?(callOptions: ContractCallOptions): Promise<`0x${string}`>;
|
|
388
|
+
/**
|
|
389
|
+
* Deploy a contract to the local dev network.
|
|
390
|
+
*
|
|
391
|
+
* @param {ContractDeploymentOptions} options The options necessary for the contract deployment.
|
|
392
|
+
* @returns {Promise<{contractAddress: `0x${string}` | null, status: "success" | "reverted", logs: Log<bigint, number>[], hash: `0x${string}`}>} A Promise that resolves to an object containing the contract address, the status of the deployment, logs, and the transaction hash of the deployment.
|
|
393
|
+
*/
|
|
394
|
+
deployContract?(contractName: string, options?: ContractDeploymentOptions): Promise<{
|
|
395
|
+
contractAddress: `0x${string}`;
|
|
396
|
+
logs: Log<bigint, number>[];
|
|
397
|
+
hash: `0x${string}`;
|
|
398
|
+
status: "success" | "reverted";
|
|
399
|
+
abi: Abi;
|
|
400
|
+
bytecode: `0x${string}`;
|
|
401
|
+
methods: any;
|
|
402
|
+
}>;
|
|
403
|
+
/**
|
|
404
|
+
* Jump a specified number of blocks.
|
|
405
|
+
*
|
|
406
|
+
* @param {number} blocksToJump The number of blocks to jump forward.
|
|
407
|
+
* @returns {Promise<void>} A Promise that resolves after the operation is fully complete.
|
|
408
|
+
*/
|
|
409
|
+
jumpBlocks?: (blocksToJump: number) => Promise<void>;
|
|
410
|
+
/**
|
|
411
|
+
* Jump a specified number of ParachainStaking Rounds.
|
|
412
|
+
*
|
|
413
|
+
* @param {number} blocksToJump The number of ParachainStaking rounds to jump forward.
|
|
414
|
+
* @returns {Promise<void>} A Promise that resolves after the operation is fully complete.
|
|
415
|
+
*/
|
|
416
|
+
jumpRounds?: (roundsToJump: number) => Promise<void>;
|
|
417
|
+
}
|
|
418
|
+
export type ViemTransactionOptions = TransactionSerializable & {
|
|
419
|
+
privateKey?: `0x${string}`;
|
|
420
|
+
skipEstimation?: boolean;
|
|
421
|
+
txnType?: TransactionType;
|
|
422
|
+
};
|
|
423
|
+
export type EthersTransactionOptions = TransactionRequest & {
|
|
424
|
+
txnType?: TransactionType;
|
|
425
|
+
privateKey?: `0x${string}`;
|
|
426
|
+
};
|
|
427
|
+
export type PrecompileCallOptions = Omit<ContractCallOptions, "contractName" | "contractAddress"> & {
|
|
428
|
+
/** The name of the Pre-compiled contract you want to interact with.
|
|
429
|
+
* Compiled contracts are a set of contract-like code that is
|
|
430
|
+
* embedded into the Moonbeam runtime.
|
|
431
|
+
*/
|
|
432
|
+
precompileName: string;
|
|
433
|
+
};
|
|
434
|
+
export interface ContractCallOptions {
|
|
435
|
+
/**
|
|
436
|
+
* The name of the compiled contract you want to interact with.
|
|
437
|
+
* Compiled contracts are solidity contracts already compiled by solc
|
|
438
|
+
* into JSON files accessible to this project. Refer to Moonwall help
|
|
439
|
+
* docs for more info.
|
|
440
|
+
*/
|
|
441
|
+
contractName: string;
|
|
442
|
+
/**
|
|
443
|
+
* The address of the deployed contract you want to interact with.
|
|
444
|
+
*/
|
|
445
|
+
contractAddress: `0x${string}`;
|
|
446
|
+
/**
|
|
447
|
+
* The name of the function in the contract that you want to call.
|
|
448
|
+
*/
|
|
449
|
+
functionName: string;
|
|
450
|
+
/**
|
|
451
|
+
* If set to true, only the raw transaction data will be returned,
|
|
452
|
+
* and the transaction will not be sent. This can be useful if you
|
|
453
|
+
* want to sign the transaction yourself or send it at a later time.
|
|
454
|
+
*/
|
|
455
|
+
rawTxOnly?: boolean;
|
|
456
|
+
/**
|
|
457
|
+
* If set to true, the function call will be executed as a "call" and
|
|
458
|
+
* will not create a transaction on the blockchain. This is useful
|
|
459
|
+
* for view functions that don't modify the blockchain's state.
|
|
460
|
+
*/
|
|
461
|
+
call?: boolean;
|
|
462
|
+
/**
|
|
463
|
+
* The private key used for signing the transaction. It should be a
|
|
464
|
+
* hexadecimal string with a "0x" prefix. If not provided, the
|
|
465
|
+
* transaciton will default to ALITH
|
|
466
|
+
*/
|
|
467
|
+
privateKey?: `0x${string}`;
|
|
468
|
+
/**
|
|
469
|
+
* The amount of gas to use for the transaction. This can either be a
|
|
470
|
+
* specific number (as a bigint) or the string "estimate", in which
|
|
471
|
+
* case the library will automatically estimate the gas needed.
|
|
472
|
+
*/
|
|
473
|
+
gas?: bigint | "estimate";
|
|
474
|
+
/**
|
|
475
|
+
* The native balance to send along with the transaction.
|
|
476
|
+
*/
|
|
477
|
+
value?: bigint;
|
|
478
|
+
/**
|
|
479
|
+
* The JavaScript library to use for interacting with the Ethereum network.
|
|
480
|
+
* "viem" or "ethers" are the currently supported options.
|
|
481
|
+
*/
|
|
482
|
+
web3Library?: "viem" | "ethers";
|
|
483
|
+
/**
|
|
484
|
+
* An array of arguments to pass to the function call. The types of these
|
|
485
|
+
* arguments depend on the function you're calling.
|
|
486
|
+
*/
|
|
487
|
+
args?: any[];
|
|
488
|
+
}
|
|
489
|
+
export {};
|
|
490
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/api/types/runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,KAAK,EACV,GAAG,EACH,OAAO,EACP,kBAAkB,EAClB,kBAAkB,EAClB,GAAG,EACH,aAAa,EACb,uBAAuB,EACvB,SAAS,EACT,YAAY,EACb,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,oBAAoB;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,qBAAqB;AAClG,OAAO,KAAK,EAAE,yBAAyB,EAAE,uBAAuB;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAyB;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,qBAAqB;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE;I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;AAED,MAAM,MAAM,sBAAsB,GAAG,uBAAuB,GAAG;IAC7D,UAAU,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GAAG;IAC1D,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,UAAU,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,mBAAmB,EACnB,cAAc,GAAG,iBAAiB,CACnC,GAAG;IACF;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,eAAe,EAAE,KAAK,MAAM,EAAE,CAAC;IAE/B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;;OAIG;IACH,UAAU,CAAC,EAAE,KAAK,MAAM,EAAE,CAAC;IAE3B;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAEhC;;;OAGG;IACH,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Environment } from "../../../api/types/index.js";
|
|
3
|
+
interface LogViewerProps {
|
|
4
|
+
env: Environment;
|
|
5
|
+
logFilePath: string;
|
|
6
|
+
onExit: () => void;
|
|
7
|
+
onNextLog?: () => void;
|
|
8
|
+
onPrevLog?: () => void;
|
|
9
|
+
zombieInfo?: {
|
|
10
|
+
currentNode: string;
|
|
11
|
+
position: number;
|
|
12
|
+
total: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare const LogViewer: React.FC<LogViewerProps>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=LogViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogViewer.d.ts","sourceRoot":"","sources":["../../../../src/cli/cmds/components/LogViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,KAAK,EAAE,WAAW,EAAE,oCAAoC;AAG/D,UAAU,cAAc;IACtB,GAAG,EAAE,WAAW,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE;QACX,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAOD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAwR9C,CAAC"}
|