From b71fe1c7a62f1dc23a37b12f26cb2a590ac1b95e Mon Sep 17 00:00:00 2001 From: timbrinded <79199034+timbrinded@users.noreply.github.com> Date: Mon, 6 Nov 2023 17:51:54 +0000 Subject: [PATCH] zombienet two-way IPC communication --- packages/cli/package.json | 8 +- packages/cli/src/lib/globalContext.ts | 63 ++++- packages/types/package.json | 4 +- packages/util/package.json | 2 +- pnpm-lock.yaml | 378 +++++++------------------- test/package.json | 6 +- test/suites/zombie/test_basic.ts | 64 ++++- 7 files changed, 215 insertions(+), 310 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 99172fae..0938d0b3 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -73,8 +73,8 @@ "@polkadot/types-codec": "^10.10.1", "@polkadot/util": "^12.5.1", "@polkadot/util-crypto": "^12.5.1", - "@zombienet/orchestrator": "^0.0.59", - "@zombienet/utils": "^0.0.23", + "@zombienet/orchestrator": "^0.0.62", + "@zombienet/utils": "^0.0.24", "bottleneck": "^2.19.5", "chalk": "^5.3.0", "clear": "^0.1.0", @@ -82,7 +82,7 @@ "colors": "^1.4.0", "debug": "^4.3.4", "dotenv": "^16.3.1", - "ethers": "^6.8.0", + "ethers": "^6.8.1", "execa": "^8.0.1", "inquirer": "^9.2.11", "inquirer-press-to-continue": "^1.2.0", @@ -101,7 +101,7 @@ "devDependencies": { "@types/cli-progress": "^3.11.4", "@types/debug": "^4.1.10", - "@types/node": "^20.8.9", + "@types/node": "^20.8.10", "@types/yargs": "^17.0.29", "prettier": "^2.8.8", "tsup": "^7.2.0", diff --git a/packages/cli/src/lib/globalContext.ts b/packages/cli/src/lib/globalContext.ts index 9e220955..8e101120 100644 --- a/packages/cli/src/lib/globalContext.ts +++ b/packages/cli/src/lib/globalContext.ts @@ -12,6 +12,7 @@ import zombie, { Network } from "@zombienet/orchestrator"; import { execaCommand, execaCommandSync } from "execa"; import Debug from "debug"; import fs from "fs"; +import net from "net"; import readline from "readline"; import { setTimeout as timer } from "timers/promises"; import { parseChopsticksRunCmd, parseRunCmd, parseZombieCmd } from "../internal/commandParsers"; @@ -38,6 +39,7 @@ export class MoonwallContext { foundation: FoundationType; zombieNetwork?: Network; rtUpgradePath?: string; + ipcServer?: net.Server; constructor(config: MoonwallConfig) { const env = config.environments.find(({ name }) => name == process.env.MOON_TEST_ENV)!; @@ -187,6 +189,47 @@ export class MoonwallContext { } }; + const socketPath = `${network.tmpDir}/node-ipc.sock`; + + const server = net.createServer((client) => { + client.on("end", () => { + console.log("📨 IPC client disconnected"); + }); + + client.on("data", async (data) => { + try { + const message = JSON.parse(data.toString()); + + if (message.cmd === "restart") { + console.log(`Restarting ${message.node}, please wait...`); + await network.client.restartNode(message.node, 0); + console.log(`✅ Node: "${message.node}" restarted`); + + // change the process map to use the new PID + await this.disconnect(); + await this.connectEnvironment(true); + + if (client.writable) { + client.write( + JSON.stringify({ status: "success", message: `${message.node} restarted` }) + ); + } else { + console.log("Client disconnected, cannot send response."); + } + } + } catch (e) { + console.log("📨 Message from client:", data.toString()); + } + }); + }); + + server.listen(socketPath, () => { + console.log("📨 IPC Server listening on", socketPath); + }); + + this.ipcServer = server; + process.env.MOON_IPC_SOCKET = socketPath; + process.once("exit", onProcessExit); process.once("SIGINT", onProcessExit); @@ -225,7 +268,7 @@ export class MoonwallContext { return MoonwallContext.getContext(); } - public async connectEnvironment(): Promise { + public async connectEnvironment(silent: boolean = false): Promise { const config = await importAsyncConfig(); const env = config.environments.find(({ name }) => name == process.env.MOON_TEST_ENV)!; @@ -253,7 +296,7 @@ export class MoonwallContext { if (this.foundation == "zombie") { let readStreams: any[]; if (!isOptionSet("disableLogEavesdropping")) { - console.log(`đŸĻģ Eavesdropping on node logs at ${process.env.MOON_ZOMBIE_DIR}`); + !silent && console.log(`đŸĻģ Eavesdropping on node logs at ${process.env.MOON_ZOMBIE_DIR}`); const zombieNodeLogs = process.env .MOON_ZOMBIE_NODES!.split("|") .map((nodeName) => `${process.env.MOON_ZOMBIE_DIR}/${nodeName}.log`); @@ -283,7 +326,7 @@ export class MoonwallContext { ) .map(async (provider) => { return await new Promise(async (resolve) => { - console.log(`⏲ī¸ Waiting for chain ${provider.name} to produce blocks...`); + !silent && console.log(`⏲ī¸ Waiting for chain ${provider.name} to produce blocks...`); while ( ( await (provider.api as ApiPromise).rpc.chain.getBlock() @@ -291,7 +334,7 @@ export class MoonwallContext { ) { await timer(500); } - console.log(`✅ Chain ${provider.name} producing blocks, continuing`); + !silent && console.log(`✅ Chain ${provider.name} producing blocks, continuing`); resolve(""); }); }); @@ -337,16 +380,6 @@ export class MoonwallContext { return MoonwallContext.instance; } - private killAllChildProcesses() { - this.nodes.forEach((child) => { - try { - child.kill(); - } catch (err) { - console.error("Failed to kill child process", err); - } - }); - } - public static async destroy() { const ctx = this.instance; @@ -372,6 +405,8 @@ export class MoonwallContext { if (ctx.zombieNetwork) { console.log("đŸĒ“ Killing zombie nodes"); await ctx.zombieNetwork.stop(); + ctx.ipcServer?.close(); + ctx.ipcServer?.removeAllListeners(); } } } diff --git a/packages/types/package.json b/packages/types/package.json index 36f8df6f..8e023eab 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -65,10 +65,10 @@ "@polkadot/util": "^12.5.1", "@polkadot/util-crypto": "^12.5.1", "@types/node": "^20.8.9", - "@zombienet/utils": "^0.0.22", + "@zombienet/utils": "^0.0.24", "bottleneck": "^2.19.5", "debug": "^4.3.4", - "ethers": "^6.8.0", + "ethers": "^6.8.1", "viem": "^1.18.0", "web3": "4.2.1" }, diff --git a/packages/util/package.json b/packages/util/package.json index 9070f008..3533855d 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -75,7 +75,7 @@ "colors": "^1.4.0", "debug": "^4.3.4", "dotenv": "^16.3.1", - "ethers": "^6.8.0", + "ethers": "^6.8.1", "inquirer": "^9.2.11", "inquirer-press-to-continue": "^1.2.0", "node-fetch": "^3.3.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eb9748d4..0c857e44 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -91,11 +91,11 @@ importers: specifier: ^12.5.1 version: 12.5.1(@polkadot/util@12.5.1) '@zombienet/orchestrator': - specifier: ^0.0.59 - version: 0.0.59(@polkadot/util@12.5.1)(@types/node@20.8.9) + specifier: ^0.0.62 + version: 0.0.62(@polkadot/util@12.5.1)(@types/node@20.8.10) '@zombienet/utils': - specifier: ^0.0.23 - version: 0.0.23(@types/node@20.8.9)(typescript@5.2.2) + specifier: ^0.0.24 + version: 0.0.24(@types/node@20.8.10)(typescript@5.2.2) bottleneck: specifier: ^2.19.5 version: 2.19.5 @@ -118,8 +118,8 @@ importers: specifier: ^16.3.1 version: 16.3.1 ethers: - specifier: ^6.8.0 - version: 6.8.0 + specifier: ^6.8.1 + version: 6.8.1 execa: specifier: ^8.0.1 version: 8.0.1 @@ -143,10 +143,10 @@ importers: version: 7.5.4 viem: specifier: ^1.18.0 - version: 1.18.0(typescript@5.2.2) + version: 1.18.6(typescript@5.2.2) vitest: specifier: 1.0.0-beta.3 - version: 1.0.0-beta.3(@types/node@20.8.9) + version: 1.0.0-beta.3(@types/node@20.8.10)(@vitest/ui@1.0.0-beta.1) web3: specifier: 4.2.1 version: 4.2.1(typescript@5.2.2) @@ -158,7 +158,7 @@ importers: version: 8.14.2 yaml: specifier: ^2.3.3 - version: 2.3.3 + version: 2.3.4 yargs: specifier: ^17.7.2 version: 17.7.2 @@ -170,8 +170,8 @@ importers: specifier: ^4.1.10 version: 4.1.10 '@types/node': - specifier: ^20.8.9 - version: 20.8.9 + specifier: ^20.8.10 + version: 20.8.10 '@types/yargs': specifier: ^17.0.29 version: 17.0.29 @@ -212,8 +212,8 @@ importers: specifier: ^20.8.9 version: 20.8.9 '@zombienet/utils': - specifier: ^0.0.22 - version: 0.0.22(@types/node@20.8.9)(typescript@5.2.2) + specifier: ^0.0.24 + version: 0.0.24(@types/node@20.8.9)(typescript@5.2.2) bottleneck: specifier: ^2.19.5 version: 2.19.5 @@ -221,8 +221,8 @@ importers: specifier: ^4.3.4 version: 4.3.4(supports-color@8.1.1) ethers: - specifier: ^6.8.0 - version: 6.8.0 + specifier: ^6.8.1 + version: 6.8.1 viem: specifier: ^1.18.0 version: 1.18.0(typescript@5.2.2) @@ -297,8 +297,8 @@ importers: specifier: ^16.3.1 version: 16.3.1 ethers: - specifier: ^6.8.0 - version: 6.8.0 + specifier: ^6.8.1 + version: 6.8.1 inquirer: specifier: ^9.2.11 version: 9.2.11 @@ -356,10 +356,10 @@ importers: devDependencies: '@acala-network/chopsticks': specifier: ^0.9.0 - version: 0.9.0(@polkadot/util@12.5.1) + version: 0.9.0(@polkadot/util@12.5.1)(debug@4.3.4) '@moonbeam-network/api-augment': - specifier: ^0.2400.0 - version: 0.2400.0 + specifier: ^0.2500.0 + version: 0.2500.0 '@moonwall/cli': specifier: workspace:* version: link:../packages/cli @@ -388,8 +388,8 @@ importers: specifier: 1.0.0-beta.1 version: 1.0.0-beta.1(vitest@1.0.0-beta.3) bun-types: - specifier: ^1.0.7 - version: 1.0.7 + specifier: ^1.0.9 + version: 1.0.9 chai: specifier: ^4.3.10 version: 4.3.10 @@ -397,8 +397,8 @@ importers: specifier: ^5.3.0 version: 5.3.0 ethers: - specifier: ^6.8.0 - version: 6.8.0 + specifier: ^6.8.1 + version: 6.8.1 pnpm: specifier: 8.6.2 version: 8.6.2 @@ -416,7 +416,7 @@ importers: version: 5.2.2 viem: specifier: ^1.18.1 - version: 1.18.1(typescript@5.2.2) + version: 1.18.6(typescript@5.2.2) vitest: specifier: 1.0.0-beta.3 version: 1.0.0-beta.3(@types/node@20.8.10)(@vitest/ui@1.0.0-beta.1) @@ -489,48 +489,6 @@ packages: '@polkadot/util': 12.5.1 '@polkadot/wasm-util': 7.2.2(@polkadot/util@12.5.1) - /@acala-network/chopsticks@0.9.0(@polkadot/util@12.5.1): - resolution: {integrity: sha512-jhbIjfgiM1A2RJssstgGUvNf3geOT/Ztm5Rz5m1qnmub/sCciQhHTg8rUtl2kNGdsW14WFm/HORIaz0lT/CyJA==} - hasBin: true - dependencies: - '@acala-network/chopsticks-core': 0.9.0(@polkadot/util@12.5.1) - '@acala-network/chopsticks-db': 0.9.0(@polkadot/util@12.5.1) - '@pnpm/npm-conf': 2.2.2 - axios: 1.5.1 - dotenv: 16.3.1 - global-agent: 3.0.0 - js-yaml: 4.1.0 - jsondiffpatch: 0.5.0 - lodash: 4.17.21 - ws: 8.14.2 - yargs: 17.7.2 - zod: 3.22.4 - transitivePeerDependencies: - - '@google-cloud/spanner' - - '@polkadot/util' - - '@sap/hana-client' - - better-sqlite3 - - bluebird - - bufferutil - - debug - - encoding - - hdb-pool - - ioredis - - mongodb - - mssql - - mysql2 - - oracledb - - pg - - pg-native - - pg-query-stream - - redis - - sql.js - - supports-color - - ts-node - - typeorm-aurora-data-api-driver - - utf-8-validate - dev: true - /@acala-network/chopsticks@0.9.0(@polkadot/util@12.5.1)(debug@4.3.4): resolution: {integrity: sha512-jhbIjfgiM1A2RJssstgGUvNf3geOT/Ztm5Rz5m1qnmub/sCciQhHTg8rUtl2kNGdsW14WFm/HORIaz0lT/CyJA==} hasBin: true @@ -571,7 +529,6 @@ packages: - ts-node - typeorm-aurora-data-api-driver - utf-8-validate - dev: false /@adraffy/ens-normalize@1.10.0: resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} @@ -1327,11 +1284,11 @@ packages: /@moonbeam-network/api-augment@0.2400.0: resolution: {integrity: sha512-Kec+G3ohgRJyt09bsxfWFB2m24cja6aU81o3NICoOOftD1Jrn6EnKRPLilELYFTRZwYYRQT5TcUELRx1JzLicA==} engines: {node: '>=14.0.0'} + dev: false /@moonbeam-network/api-augment@0.2500.0: resolution: {integrity: sha512-HOHQE9FCw9Pft+t5bWKe+c5+mKJ/5ZD1UztJlGBMxg4NRLCdZiKxdbPBiv2OTpRsBRq5v6PD2LaTFayRjXZYNQ==} engines: {node: '>=14.0.0'} - dev: false /@noble/curves@1.1.0: resolution: {integrity: sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==} @@ -1365,12 +1322,10 @@ packages: dependencies: '@nodelib/fs.stat': 2.0.5 run-parallel: 1.2.0 - dev: true /@nodelib/fs.stat@2.0.5: resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} engines: {node: '>= 8'} - dev: true /@nodelib/fs.walk@1.2.8: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} @@ -1378,7 +1333,6 @@ packages: dependencies: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 - dev: true /@npmcli/fs@1.1.1: resolution: {integrity: sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==} @@ -1441,7 +1395,6 @@ packages: /@polka/url@1.0.0-next.23: resolution: {integrity: sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==} - dev: true /@polkadot/api-augment@10.10.1: resolution: {integrity: sha512-J0r1DT1M5y75iO1iwcpUBokKD3q6b22kWlPfiHEDNFydVw5vm7OTRBk9Njjl8rOnlSzcW/Ya8qWfV/wkrqHxUQ==} @@ -1499,7 +1452,7 @@ packages: '@polkadot/api-augment': 10.10.1 '@polkadot/api-base': 10.10.1 '@polkadot/api-derive': 10.10.1 - '@polkadot/keyring': 12.5.1(@polkadot/util@12.5.1) + '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/rpc-augment': 10.10.1 '@polkadot/rpc-core': 10.10.1 '@polkadot/rpc-provider': 10.10.1 @@ -1528,17 +1481,6 @@ packages: '@polkadot/util': 12.5.1 '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) tslib: 2.6.2 - dev: false - - /@polkadot/keyring@12.5.1(@polkadot/util@12.5.1): - resolution: {integrity: sha512-u6b+Q7wI6WY/vwmJS9uUHy/5hKZ226nTlVNmxjkj9GvrRsQvUSwS94163yHPJwiZJiIv5xK5m0rwCMyoYu+wjA==} - engines: {node: '>=16'} - peerDependencies: - '@polkadot/util': 12.5.1 - dependencies: - '@polkadot/util': 12.5.1 - '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) - tslib: 2.6.2 /@polkadot/networks@12.5.1: resolution: {integrity: sha512-PP6UUdzz6iHHZH4q96cUEhTcydHj16+61sqeaYEJSF6Q9iY+5WVWQ26+rdjmre/EBdrMQkSS/CKy73mO5z/JkQ==} @@ -1581,7 +1523,7 @@ packages: resolution: {integrity: sha512-VMDWoJgx6/mPHAOT66Sq+Jf2lJABfV/ZUIXtT2k8HjOndbm6oKrFqGEOSSLvB2q4olDee3FkFFxkyW1s6k4JaQ==} engines: {node: '>=16'} dependencies: - '@polkadot/keyring': 12.5.1(@polkadot/util@12.5.1) + '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/types': 10.10.1 '@polkadot/types-support': 10.10.1 '@polkadot/util': 12.5.1 @@ -1647,7 +1589,7 @@ packages: resolution: {integrity: sha512-Ben62P1tjYEhKag34GBGcLX6NqcFR1VD5nNbWaxgr+t36Jl/tlHs6P9DlbFqQP7Tt9FmGrAYY0m3oTkhjG1NzA==} engines: {node: '>=16'} dependencies: - '@polkadot/keyring': 12.5.1(@polkadot/util@12.5.1) + '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/types-augment': 10.10.1 '@polkadot/types-codec': 10.10.1 '@polkadot/types-create': 10.10.1 @@ -1936,7 +1878,7 @@ packages: /@types/cli-progress@3.11.4: resolution: {integrity: sha512-yufTxeeNCZuEIxx2uebK8lpSAsJM4lvzakm/VxzYhDtqhXCzwH9jpn7nPCxzrROuEbLATqhFq4MIPoG0tlrsvw==} dependencies: - '@types/node': 20.8.9 + '@types/node': 20.8.10 dev: true /@types/debug@4.1.10: @@ -1996,6 +1938,7 @@ packages: resolution: {integrity: sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==} dependencies: undici-types: 5.26.5 + dev: false /@types/normalize-package-data@2.4.2: resolution: {integrity: sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==} @@ -2012,7 +1955,7 @@ packages: /@types/ws@8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 20.8.9 + '@types/node': 20.8.10 /@types/yargs-parser@21.0.1: resolution: {integrity: sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ==} @@ -2194,7 +2137,6 @@ packages: picocolors: 1.0.0 sirv: 2.0.3 vitest: 1.0.0-beta.3(@types/node@20.8.10)(@vitest/ui@1.0.0-beta.1) - dev: true /@vitest/utils@1.0.0-beta.1: resolution: {integrity: sha512-jfcqEzZamUA2Th76NVOHyRMAUIAuxMG9q+BstUbxzPQ9IkbCjz5GkhagPfy4r6zTFiElhX7mmPVj/nvB/Ea/bQ==} @@ -2202,7 +2144,6 @@ packages: diff-sequences: 29.6.3 loupe: 2.3.6 pretty-format: 29.7.0 - dev: true /@vitest/utils@1.0.0-beta.3: resolution: {integrity: sha512-8j7Xg3A13kt78DqWJC3ludyMsBbKQn/LcX9wcULxZFMGQqmSkUFN8ij6JWFQs67w39T+clLWzPrV+NRxe+Mc9g==} @@ -2373,14 +2314,14 @@ packages: - vue dev: true - /@zombienet/orchestrator@0.0.59(@polkadot/util@12.5.1)(@types/node@20.8.9): - resolution: {integrity: sha512-8QfhKTDwlOK/mP6UJWQVYch/UZF2A1FQ6EH1hq1oGkw6kC8sOX6GqaI6IPooEQFK5bDff1Cfrxl1Kvf1ku3wjQ==} + /@zombienet/orchestrator@0.0.62(@polkadot/util@12.5.1)(@types/node@20.8.10): + resolution: {integrity: sha512-nUX9/UrEv4k2kW7zOPBKIK6opaQ/7/QWQ4ZRfWooihM0k2cZ+HVeJ1AVXeDKnnbvaxfHG2/jrhIx5btuRYvbyQ==} engines: {node: '>=18'} dependencies: '@polkadot/api': 10.10.1 '@polkadot/keyring': 12.5.1(@polkadot/util-crypto@12.5.1)(@polkadot/util@12.5.1) '@polkadot/util-crypto': 12.5.1(@polkadot/util@12.5.1) - '@zombienet/utils': 0.0.23(@types/node@20.8.9)(typescript@5.2.2) + '@zombienet/utils': 0.0.24(@types/node@20.8.10)(typescript@5.2.2) JSONStream: 1.3.5 chai: 4.3.10 debug: 4.3.4(supports-color@8.1.1) @@ -2395,7 +2336,7 @@ packages: peer-id: 0.16.0 tmp-promise: 3.0.3 typescript: 5.2.2 - yaml: 2.3.3 + yaml: 2.3.4 transitivePeerDependencies: - '@polkadot/util' - '@swc/core' @@ -2408,8 +2349,8 @@ packages: - utf-8-validate dev: false - /@zombienet/utils@0.0.22(@types/node@20.8.9)(typescript@5.2.2): - resolution: {integrity: sha512-jr2RAP0jYxzHPFSIWJP3W0ctili7XpwH/cs3BGFUmCU/Nj3dqkZpMqEBoxMECGUNQ4MS3jdgDoqR86UcsALXWw==} + /@zombienet/utils@0.0.24(@types/node@20.8.10)(typescript@5.2.2): + resolution: {integrity: sha512-CUHn4u04ryfRqCQQsZHSpMIpMxzdMvSZR86Gp3Hwexf7wZTkHNZ5hsJnQO+J/yl28ny0GcjLJSU1hZ2kMV+hqw==} engines: {node: '>=18'} dependencies: cli-table3: 0.6.3 @@ -2417,7 +2358,7 @@ packages: mocha: 10.2.0 nunjucks: 3.2.4 toml: 3.0.0 - ts-node: 10.9.1(@types/node@20.8.9)(typescript@5.2.2) + ts-node: 10.9.1(@types/node@20.8.10)(typescript@5.2.2) transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -2427,8 +2368,8 @@ packages: - typescript dev: false - /@zombienet/utils@0.0.23(@types/node@20.8.9)(typescript@5.2.2): - resolution: {integrity: sha512-7cWy9izglJC2yaglVhP1Ro0uTKaB0Oiq71jTeLu4vfs/xqZOz24/s+Giqv7cGXfetUJ1Ip7Q6I03rHEnjvx6Nw==} + /@zombienet/utils@0.0.24(@types/node@20.8.9)(typescript@5.2.2): + resolution: {integrity: sha512-CUHn4u04ryfRqCQQsZHSpMIpMxzdMvSZR86Gp3Hwexf7wZTkHNZ5hsJnQO+J/yl28ny0GcjLJSU1hZ2kMV+hqw==} engines: {node: '>=18'} dependencies: cli-table3: 0.6.3 @@ -2520,7 +2461,7 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -2750,16 +2691,6 @@ packages: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} - /axios@1.5.1: - resolution: {integrity: sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==} - dependencies: - follow-redirects: 1.15.3 - form-data: 4.0.0 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - dev: true - /axios@1.5.1(debug@4.3.4): resolution: {integrity: sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==} dependencies: @@ -2768,7 +2699,6 @@ packages: proxy-from-env: 1.1.0 transitivePeerDependencies: - debug - dev: false /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -2868,8 +2798,8 @@ packages: semver: 7.5.4 dev: true - /bun-types@1.0.7: - resolution: {integrity: sha512-zlIp+SCutbbugs6xDy+3WC3KO3zKySpF/bRfiTk/VJUdKt+WHAzlCtLplS7XglRYDFzhRhlzXMW/R5BHkw+u2Q==} + /bun-types@1.0.9: + resolution: {integrity: sha512-9zWU5b/D41v4h5YgQxMW7aUvwYqMhU7WRjhPMN73XE6MNl5mvZ5vgAEWV8Lisdd4JgDSdWk2t9oY6kYqeDhQSA==} dev: true /bundle-require@4.0.2(esbuild@0.18.20): @@ -3279,17 +3209,6 @@ packages: ms: 2.1.3 dev: true - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -3958,8 +3877,8 @@ packages: '@scure/bip32': 1.3.1 '@scure/bip39': 1.2.1 - /ethers@6.8.0: - resolution: {integrity: sha512-zrFbmQRlraM+cU5mE4CZTLBurZTs2gdp2ld0nG/f3ecBK+x6lZ69KSxBqZ4NjclxwfTxl5LeNufcBbMsTdY53Q==} + /ethers@6.8.1: + resolution: {integrity: sha512-iEKm6zox5h1lDn6scuRWdIdFJUCGg3+/aQWu0F4K0GVyEZiktFkqrJbRjTn1FlYEPz7RKA707D6g5Kdk6j7Ljg==} engines: {node: '>=14.0.0'} dependencies: '@adraffy/ens-normalize': 1.10.0 @@ -4041,7 +3960,6 @@ packages: glob-parent: 5.1.2 merge2: 1.4.1 micromatch: 4.0.5 - dev: true /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} @@ -4062,7 +3980,6 @@ packages: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: reusify: 1.0.4 - dev: true /fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} @@ -4073,7 +3990,6 @@ packages: /fflate@0.8.1: resolution: {integrity: sha512-/exOvEuc+/iaUm105QIiOt4LpBdMTWsXxqR0HDF35vx3fmaKzw7354gTilCh5rkzEt8WYyG//ku3h3nRmd7CHQ==} - dev: true /figures@5.0.0: resolution: {integrity: sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==} @@ -4134,7 +4050,6 @@ packages: /flatted@3.2.9: resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} - dev: true /focus-trap@7.5.3: resolution: {integrity: sha512-7UsT/eSJcTPF0aZp73u7hBRTABz26knRRTJfoTGFCQD5mUImLIIOwWWCrtoQdmWa7dykBi6H+Cp5i3S/kvsMeA==} @@ -4142,16 +4057,6 @@ packages: tabbable: 6.2.0 dev: true - /follow-redirects@1.15.3: - resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - dev: true - /follow-redirects@1.15.3(debug@4.3.4): resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} engines: {node: '>=4.0'} @@ -4162,7 +4067,6 @@ packages: optional: true dependencies: debug: 4.3.4(supports-color@8.1.1) - dev: false /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} @@ -4501,7 +4405,7 @@ packages: dependencies: '@tootallnate/once': 1.1.2 agent-base: 6.0.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color optional: true @@ -4522,7 +4426,7 @@ packages: engines: {node: '>= 6'} dependencies: agent-base: 6.0.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -5245,7 +5149,6 @@ packages: /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - dev: true /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} @@ -5253,7 +5156,6 @@ packages: dependencies: braces: 3.0.2 picomatch: 2.3.1 - dev: true /mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} @@ -5440,7 +5342,6 @@ packages: /mrmime@1.0.1: resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} engines: {node: '>=10'} - dev: true /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -5536,7 +5437,7 @@ packages: resolution: {integrity: sha512-DDpmn5oLEdCTclEqweOT4U7bEpuoifBMFUXem9sA4turDAZ5tlbrEoWqCorwXey8CaAw44mst5JOQeVNiwtkhw==} engines: {node: '>= 10.13'} dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) json-stringify-safe: 5.0.1 lodash: 4.17.21 propagate: 2.0.1 @@ -6026,7 +5927,7 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - yaml: 2.3.3 + yaml: 2.3.4 dev: true /postcss@8.4.31: @@ -6119,7 +6020,7 @@ packages: '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 '@types/long': 4.0.2 - '@types/node': 20.8.9 + '@types/node': 20.8.10 long: 4.0.0 dev: false @@ -6150,7 +6051,6 @@ packages: /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - dev: true /quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} @@ -6313,7 +6213,6 @@ packages: /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - dev: true /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} @@ -6357,7 +6256,6 @@ packages: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 - dev: true /rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} @@ -6514,7 +6412,6 @@ packages: '@polka/url': 1.0.0-next.23 mrmime: 1.0.1 totalist: 3.0.1 - dev: true /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} @@ -6556,7 +6453,7 @@ packages: requiresBuild: true dependencies: agent-base: 6.0.2 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) socks: 2.7.1 transitivePeerDependencies: - supports-color @@ -6578,7 +6475,7 @@ packages: dependencies: command-exists: 1.2.9 commander: 8.3.0 - follow-redirects: 1.15.3 + follow-redirects: 1.15.3(debug@4.3.4) js-sha3: 0.8.0 memorystream: 0.3.1 semver: 5.7.2 @@ -6921,7 +6818,6 @@ packages: /totalist@3.0.1: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} - dev: true /tough-cookie@4.1.3: resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} @@ -7003,6 +6899,37 @@ packages: yn: 3.1.1 dev: true + /ts-node@10.9.1(@types/node@20.8.10)(typescript@5.2.2): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.8.10 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.2.2 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /ts-node@10.9.1(@types/node@20.8.9)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -7247,7 +7174,7 @@ packages: chalk: 4.1.2 cli-highlight: 2.1.11 date-fns: 2.30.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) dotenv: 16.3.1 glob: 8.1.0 mkdirp: 2.1.6 @@ -7426,8 +7353,8 @@ packages: - zod dev: false - /viem@1.18.1(typescript@5.2.2): - resolution: {integrity: sha512-dkZG1jI8iL7G0+KZ8ZKHCXbzZxzu8Iib7OLCxkdaqdrlNrWTEMIZSp/2AHpbjpPeAg3VFD1CUayKPTJv2ZMXCg==} + /viem@1.18.6(typescript@5.2.2): + resolution: {integrity: sha512-oKkrxF2aqxjJ4pmm0ko7j+ZFRekP6VGIknSroV+6+dF+T31bscltPZwJ0fOJDxCOVhoVtxrKFRTkkasEVDblUA==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -7447,7 +7374,6 @@ packages: - bufferutil - utf-8-validate - zod - dev: true /vite-node@1.0.0-beta.3(@types/node@20.8.10): resolution: {integrity: sha512-qpdoB+N9LV2Lr3W6k8vZwm/lN3hdmz+c0Tixh2ktnX/ywF0OkQf7wIWLeiFLvW4Fa/iw4qhye7xiBBMP1o6/sA==} @@ -7455,7 +7381,7 @@ packages: hasBin: true dependencies: cac: 6.7.14 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) mlly: 1.4.2 pathe: 1.1.1 picocolors: 1.0.0 @@ -7469,7 +7395,6 @@ packages: - sugarss - supports-color - terser - dev: true /vite-node@1.0.0-beta.3(@types/node@20.8.7): resolution: {integrity: sha512-qpdoB+N9LV2Lr3W6k8vZwm/lN3hdmz+c0Tixh2ktnX/ywF0OkQf7wIWLeiFLvW4Fa/iw4qhye7xiBBMP1o6/sA==} @@ -7493,28 +7418,6 @@ packages: - terser dev: false - /vite-node@1.0.0-beta.3(@types/node@20.8.9): - resolution: {integrity: sha512-qpdoB+N9LV2Lr3W6k8vZwm/lN3hdmz+c0Tixh2ktnX/ywF0OkQf7wIWLeiFLvW4Fa/iw4qhye7xiBBMP1o6/sA==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - dependencies: - cac: 6.7.14 - debug: 4.3.4(supports-color@8.1.1) - mlly: 1.4.2 - pathe: 1.1.1 - picocolors: 1.0.0 - vite: 4.4.11(@types/node@20.8.9) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - dev: false - /vite@4.4.11(@types/node@20.8.10): resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} engines: {node: ^14.18.0 || >=16.0.0} @@ -7549,7 +7452,6 @@ packages: rollup: 3.29.4 optionalDependencies: fsevents: 2.3.3 - dev: true /vite@4.4.11(@types/node@20.8.7): resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} @@ -7585,43 +7487,6 @@ packages: rollup: 3.29.4 optionalDependencies: fsevents: 2.3.3 - dev: false - - /vite@4.4.11(@types/node@20.8.9): - resolution: {integrity: sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': 20.8.9 - esbuild: 0.18.20 - postcss: 8.4.31 - rollup: 3.29.4 - optionalDependencies: - fsevents: 2.3.3 - dev: false /vitepress@1.0.0-rc.10(@algolia/client-search@4.20.0)(search-insights@2.8.3): resolution: {integrity: sha512-+MsahIWqq5WUEmj6MR4obcKYbT7im07jZPCQPdNJExkeOSbOAJ4xypSLx88x7rvtzWHhHc5aXbOhCRvGEGjFrw==} @@ -7636,7 +7501,7 @@ packages: mark.js: 8.11.1 minisearch: 6.1.0 shiki: 0.14.5 - vite: 4.4.11(@types/node@20.8.10) + vite: 4.4.11(@types/node@20.8.7) vue: 3.3.4 transitivePeerDependencies: - '@algolia/client-search' @@ -7701,7 +7566,7 @@ packages: acorn-walk: 8.2.0 cac: 6.7.14 chai: 4.3.10 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) local-pkg: 0.4.3 magic-string: 0.30.5 pathe: 1.1.1 @@ -7721,7 +7586,6 @@ packages: - sugarss - supports-color - terser - dev: true /vitest@1.0.0-beta.3(@types/node@20.8.7): resolution: {integrity: sha512-Ytj70kgJq1MxWpS8U33nRwF7Mngzr0NxD6J1J8WZGZrYhGRktW3t0AwbjLyFg1URiW3ds6FSp/T3C8JEnP49cA==} @@ -7780,63 +7644,6 @@ packages: - terser dev: false - /vitest@1.0.0-beta.3(@types/node@20.8.9): - resolution: {integrity: sha512-Ytj70kgJq1MxWpS8U33nRwF7Mngzr0NxD6J1J8WZGZrYhGRktW3t0AwbjLyFg1URiW3ds6FSp/T3C8JEnP49cA==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': '*' - '@vitest/ui': '*' - happy-dom: '*' - jsdom: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@types/node': - optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - dependencies: - '@types/node': 20.8.9 - '@vitest/expect': 1.0.0-beta.3 - '@vitest/runner': 1.0.0-beta.3 - '@vitest/snapshot': 1.0.0-beta.3 - '@vitest/spy': 1.0.0-beta.3 - '@vitest/utils': 1.0.0-beta.3 - acorn: 8.10.0 - acorn-walk: 8.2.0 - cac: 6.7.14 - chai: 4.3.10 - debug: 4.3.4(supports-color@8.1.1) - local-pkg: 0.4.3 - magic-string: 0.30.5 - pathe: 1.1.1 - picocolors: 1.0.0 - std-env: 3.4.3 - strip-literal: 1.3.0 - tinybench: 2.5.1 - tinypool: 0.8.1 - vite: 4.4.11(@types/node@20.8.9) - vite-node: 1.0.0-beta.3(@types/node@20.8.9) - why-is-node-running: 2.2.2 - transitivePeerDependencies: - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - dev: false - /vscode-oniguruma@1.7.0: resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} dev: true @@ -8335,6 +8142,11 @@ packages: /yaml@2.3.3: resolution: {integrity: sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==} engines: {node: '>= 14'} + dev: false + + /yaml@2.3.4: + resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} + engines: {node: '>= 14'} /yargs-parser@18.1.3: resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} diff --git a/test/package.json b/test/package.json index 62c0b517..7e147be0 100644 --- a/test/package.json +++ b/test/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@acala-network/chopsticks": "^0.9.0", - "@moonbeam-network/api-augment": "^0.2400.0", + "@moonbeam-network/api-augment": "^0.2500.0", "@moonwall/cli": "workspace:*", "@moonwall/types": "workspace:*", "@moonwall/util": "workspace:*", @@ -24,10 +24,10 @@ "@polkadot/util": "^12.5.1", "@types/node": "^20.8.10", "@vitest/ui": "1.0.0-beta.1", - "bun-types": "^1.0.7", + "bun-types": "^1.0.9", "chai": "^4.3.10", "chalk": "^5.3.0", - "ethers": "^6.8.0", + "ethers": "^6.8.1", "pnpm": "8.6.2", "prettier": "^2.8.8", "solc": "^0.8.22", diff --git a/test/suites/zombie/test_basic.ts b/test/suites/zombie/test_basic.ts index 7d366037..ff8b196c 100644 --- a/test/suites/zombie/test_basic.ts +++ b/test/suites/zombie/test_basic.ts @@ -1,7 +1,10 @@ import "@moonbeam-network/api-augment"; +import "@polkadot/api-augment"; import { beforeAll, describeSuite, expect } from "@moonwall/cli"; +import net from "net"; import { ALITH_ADDRESS, GLMR, baltathar } from "@moonwall/util"; import { ApiPromise } from "@polkadot/api"; +import { setTimeout } from "timers/promises"; describeSuite({ id: "Z1", @@ -10,16 +13,39 @@ describeSuite({ testCases: function ({ it, context, log }) { let paraApi: ApiPromise; let relayApi: ApiPromise; + let client: net.Socket; + let resume = false; - beforeAll(() => { + beforeAll(async () => { paraApi = context.polkadotJs("parachain"); relayApi = context.polkadotJs("relaychain"); - }); + + // TODO: Turn this into runner function + // TODO: Raise zombienet PR to remove logging + client = net.createConnection({ path: process.env.MOON_IPC_SOCKET }, () => { + client.write("Connected to server!"); + }); + + client.on("data", (data) => { + const message = JSON.parse(data.toString()); + log(message); + if (message.status === "success") { + resume = true; + } + }); + + for (;;) { + if (!client.connecting) { + break; + } + await setTimeout(100); + } + }, 10000); it({ id: "T01", title: "Check relaychain api correctly connected", - test: function () { + test: async function () { const rt = relayApi.consts.system.version.specVersion.toNumber(); expect(rt).to.be.greaterThan(0); @@ -32,6 +58,11 @@ describeSuite({ id: "T02", title: "Check parachain api correctly connected", test: async function () { + const socketPath = process.env.MOON_IPC_SOCKET; + const client = net.createConnection({ path: socketPath }, () => { + client.write("Hello from client again"); + }); + const network = paraApi.consts.system.version.specName.toString(); expect(network).to.contain("moonbase"); @@ -74,6 +105,7 @@ describeSuite({ const balAfter = (await paraApi.query.system.account(ALITH_ADDRESS)).data.free; expect(balBefore.lt(balAfter)).to.be.true; + client.write("test case 4 after"); }, }); @@ -89,5 +121,31 @@ describeSuite({ log((await paraApi.rpc.chain.getBlock()).block.header.number.toNumber()); }, }); + + it({ + id: "T06", + title: "Restart a node from test", + timeout: 600000, + test: async function () { + const message = { + message: "Restarting node 1", + cmd: "restart", + node: "alith", + }; + + await new Promise((resolve) => { + client.write(JSON.stringify(message), () => resolve("Sent!")); + }); + + for (;;) { + if (resume) { + break; + } + await setTimeout(100); + } + + await context.waitBlock(2, "parachain", "quantity"); + }, + }); }, });