datahaven/test/package.json
undercover-cactus 406a0dc59e
test: storagehub e2e (#394)
## Summary

Add Storage Hub basic end to end test. This PR also include some fixes
to allow Storage Hub node and datahaven node to run on the same network
(local chain). Before that one was running on dev and the other one on
the local chain.

## What changed

* Added `storagehub.test.ts` e2e test. In this file we explicitly start
the storagehub node using the launch function already used in the CI
* Added Storage Hub backend the flow so it can be used in the e2e test
* Fix the `--chain local` vs `--chain dev` issue. The storagehub nodes
were started on the dev network and therefore they were never syncing
with the datahaven node
* Fix  the folder permission issue in the CI by fixing the folder name
* Added StorageHub javascript lib

---------

Co-authored-by: Gonza Montiel <gonzamontiel@users.noreply.github.com>
Co-authored-by: Ahmad Kaouk <56095276+ahmadkaouk@users.noreply.github.com>
Co-authored-by: Gonza Montiel <gon.montiel@gmail.com>
2026-03-11 12:39:47 +01:00

93 lines
4.4 KiB
JSON

{
"name": "@datahaven/e2e-test",
"module": "index.ts",
"type": "module",
"private": true,
"scripts": {
"cli": "bun run cli/index.ts",
"fmt": "biome check .",
"fmt:fix": "biome check --write .",
"build:docker:operator": "docker build --no-cache --platform linux/amd64 -t datahavenxyz/datahaven:local -f ../docker/datahaven-dev.Dockerfile ../.",
"generate:wagmi": "wagmi generate",
"generate:snowbridge-cfgs": "bun -e \"import {generateSnowbridgeConfigs} from './scripts/gen-snowbridge-cfgs.ts'; await generateSnowbridgeConfigs()\"",
"generate:contracts": "bun -e \"import {generateContracts} from './scripts/generate-contracts.ts'; await generateContracts()\"",
"generate:types": "(cd ../operator && cargo build --release) && bun x papi add --wasm \"../operator/target/release/wbuild/datahaven-stagenet-runtime/datahaven_stagenet_runtime.wasm\" datahaven",
"generate:types:fast": "(cd ../operator && cargo build --release --features fast-runtime) && bun x papi add --wasm \"../operator/target/release/wbuild/datahaven-stagenet-runtime/datahaven_stagenet_runtime.wasm\" datahaven",
"start:e2e:verified": "bun cli launch --verified --blockscout --deploy-contracts --setup-validators --update-validator-set --fund-validators",
"start:e2e:verified:relayers": "bun cli launch --verified --blockscout --deploy-contracts --setup-validators --update-validator-set --fund-validators --relayer --datahaven",
"start:e2e:local": "LOG_LEVEL=debug bun start:e2e:ci --bd",
"start:e2e:ci": "bun cli launch --datahaven --no-build-datahaven --launch-kurtosis --deploy-contracts --fund-validators --setup-validators --update-validator-set --set-parameters --relayer --clean-network --slot-time 1",
"start:e2e:minrelayer": "bun cli launch --relayer --deploy-contracts --no-setup-validators --no-update-validator-set --no-fund-validators --datahaven",
"stop:docker:datahaven": "docker rm -f $(docker ps -aq --filter name='^datahaven-') 2>/dev/null || true; docker network rm datahaven-net || true",
"stop:docker:relayer": "docker rm -f $(docker ps -aq --filter name='^snowbridge-') 2>/dev/null || true",
"stop:e2e": "bun cli stop --all",
"stop:dh": "bun cli stop --datahaven --no-enclave --no-relayer ",
"stop:sb": "bun cli stop --relayer --no-datahaven --no-enclave",
"stop:eth": "bun cli stop --enclave --no-datahaven --no-relayer",
"stop:engine": "bun cli stop --kurtosisEngine --no-datahaven --no-relayer --no-enclave",
"test:e2e": "bun test ./e2e/suites --timeout 900000",
"compile:contracts": "bun x tsx scripts/compile-contracts.ts compile",
"test:e2e:parallel": "bun scripts/test-parallel.ts",
"moonwall:test": "moonwall test dev_datahaven",
"moonwall:run": "moonwall run dev_datahaven",
"submitter": "bun run tools/validator-set-submitter/main.ts run",
"submitter:dry-run": "bun run tools/validator-set-submitter/main.ts run --dry-run",
"typecheck": "tsc --noEmit",
"tsgo": "tsgo tsc --noEmit --pretty --skipLibCheck",
"postinstall": "papi"
},
"devDependencies": {
"@types/bun": "latest",
"@types/yargs": "^17.0.33",
"@typescript/native-preview": "^7.0.0-dev.20250618.1"
},
"peerDependencies": {
"typescript": "^5.8.3"
},
"dependencies": {
"@biomejs/biome": "^2.0.0",
"@commander-js/extra-typings": "^13.1.0",
"@dotenvx/dotenvx": "^1.44.2",
"@inquirer/prompts": "^7.5.3",
"@moonwall/cli": "^5.15.0",
"@moonwall/util": "^5.15.0",
"@noble/curves": "^1.9.2",
"@noble/hashes": "^1.8.0",
"@polkadot-api/descriptors": "file:.papi/descriptors",
"@storagehub-sdk/core": "^0.4.4",
"@storagehub-sdk/msp-client": "^0.4.4",
"@storagehub/api-augment": "^0.4.0",
"@types/dockerode": "^3.3.41",
"@types/node": "^22.15.32",
"@wagmi/cli": "^2.3.1",
"@wagmi/core": "^2.17.3",
"chalk": "^5.4.1",
"commander": "^13.1.0",
"dockerode": "^4.0.7",
"dotenv": "^16.5.0",
"ethers": "^6.13.4",
"octokit": "^4.1.4",
"ora": "^8.2.0",
"pino": "^9.7.0",
"pino-pretty": "^13.0.0",
"polkadot-api": "^1.15.1",
"prom-client": "^15.1.0",
"solc": "^0.8.30",
"tiny-invariant": "^1.3.3",
"viem": "^2.31.3",
"wagmi": "^2.15.6",
"yaml": "^2.8.0",
"yargs": "^18.0.0",
"zod": "^3.25.67"
},
"trustedDependencies": [
"@biomejs/biome",
"bufferutil",
"cpu-features",
"esbuild",
"keccak",
"protobufjs",
"ssh2",
"utf-8-validate"
]
}