This document describes how to test the SafeLens apps and CLI.
- Start the dev server:
bun --cwd apps/generator dev-
Navigate to
http://localhost:3000 -
Enter this test URL:
https://app.safe.global/transactions/tx?safe=eth:0x9fC3dc011b461664c835F2527fffb1169b3C213e&id=multisig_0x9fC3dc011b461664c835F2527fffb1169b3C213e_0x8bcba9ed52545bdc89eebc015757cda83c2468d3f225cea01c2a844b8a15cf17
-
Click "Analyze"
-
Verify:
- Evidence package is generated
- Safe address, chain, and hashes display correctly
- Signatures count is shown
- Click "Download JSON" and save the file
- Start the Vite dev server:
bun --cwd apps/desktop dev- Launch Tauri:
bun --cwd apps/desktop tauri dev-
Upload the
evidence.jsonfrom the generator -
Click "Verify Evidence"
-
Verify:
- Success toast appears
- Safe TX hash is displayed
- Transaction details match
- Signatures list appears
Disconnect from the network and repeat step 3. Verification should still succeed.
bun --cwd packages/cli dev -- analyze "https://app.safe.global/transactions/tx?safe=eth:0x9fC3dc011b461664c835F2527fffb1169b3C213e&id=multisig_0x9fC3dc011b461664c835F2527fffb1169b3C213e_0x8bcba9ed52545bdc89eebc015757cda83c2468d3f225cea01c2a844b8a15cf17" --out evidence.json
bun --cwd packages/cli dev -- verify --file evidence.json
bun --cwd packages/cli dev -- settings initExpected:
- Analyze writes a JSON file
- Verify returns "Evidence verified"
- Settings file created at
~/.safelens/settings.json
bun run testThis now runs:
packages/coreunit testspackages/clicommand/output testsapps/generatorutility testsapps/desktopairgap configuration tests
bun run type-checkThis includes packages/core, packages/cli, apps/generator, and apps/desktop.
cargo test --manifest-path apps/desktop/src-tauri/Cargo.toml benchmark_replay_latency_profiles -- --ignored --nocaptureThis prints p50/p95 latency for deterministic local replay profiles and is used to track replay performance regressions.
https://app.safe.global/transactions/tx?safe=eth:0x9fC3dc011b461664c835F2527fffb1169b3C213e&id=multisig_0x9fC3dc011b461664c835F2527fffb1169b3C213e_0x8bcba9ed52545bdc89eebc015757cda83c2468d3f225cea01c2a844b8a15cf17
Expected: parses successfully (chain: Ethereum Mainnet)
https://app.safe.global/transactions/tx?id=multisig_0x123_0x456
Expected: error: "Missing 'safe' parameter"