For context on this codebase, read the docs/ directory and the justfile.
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
WAVS (WebAssembly-based Actively Validated Services) is a platform for running Actively Validated Services (AVS). It executes AVS logic as sandboxed WebAssembly (WASI) components, bridges blockchain events (EVM and Cosmos) with off-chain computation, and coordinates multi-operator consensus.
All build automation is in justfile. Run just to see all targets.
just lint # Check formatting and clippy (non-mutating)
just lint-fix # Auto-fix formatting and clippy issues
cargo build # Debug build
cargo build --releasejust wasi-build-native [COMPONENT] # Build WASI components natively
just wasi-build-docker [COMPONENT] # Build in Docker (cross-platform)
just generate-checksums # Regenerate checksums.txtjust solidity-build # Forge build for Solidity contracts
just cosmwasm-build # Docker-based CosmWasm buildjust app-dev # Full Tauri dev with hot reload
just app-dev-frontend # Vite frontend dev server only
just app-build-release # Release build
just app-build-frontend # Vite build onlyE2E integration tests run on-chain with a live WAVS node:
just test-wavs-e2e
# or directly:
cargo test -p layer-testsTo run a subset of tests, edit packages/layer-tests/layer-tests.toml to isolate specific cases.
just start-dev # WAVS + Jaeger + Prometheus (full dev stack)
just start-wavs-dev # WAVS only with dev config
just start-anvil # Local EVM testnet on :8545
just start-jaeger # Tracing UI at http://localhost:16686
just start-prometheus # Metrics UI at http://localhost:9090Development tools for sending triggers and deploying services:
just dev-tool deploy-service --sleep-ms 10
just dev-tool send-triggers --count 1000The main WAVS node is a Tokio-based async server centered around a dispatcher (packages/wavs/src/dispatcher.rs) that orchestrates four subsystems via Crossbeam channels:
-
Trigger Manager (
subsystems/trigger/) — Monitors EVM and Cosmos blockchain events; routes events to registered services via cron, timer, or on-chain triggers. Uses libp2p for P2P trigger distribution. -
Engine (
subsystems/engine/) — Executes WASM components in isolated Wasmtime WASI runtimes. Each AVS service runs as a sandboxed component with restricted system access. -
Aggregator (
subsystems/aggregator/) — Collects execution results from multiple operators and handles consensus before submission. -
Submission (
subsystems/submission/) — Routes verified results to on-chain contracts (EVM or Cosmos), managing signing and transaction submission.
An HTTP API server (Axum) on top handles service registration, health checks, and administration.
packages/types/— Shared types, WIT interfaces, contract ABIs, and generated TypeScript bindingspackages/cli/— CLI for deploying services, executing components, and EigenLayer integrationpackages/engine/— Wasmtime wrapper and WASI component lifecycle managementpackages/aggregator/— Standalone aggregation servicepackages/layer-tests/— E2E test suite; config inlayer-tests.tomlpackages/dev-tool/— Dev utilities for local testing
Tauri 2 desktop app with a React 19 + Vite 7 frontend. The Tauri backend in app/src-tauri/ bridges to the WAVS node. State management uses Zustand; blockchain interaction uses Viem.
examples/components/— WASI component source code (echo, kv-store, aggregator, cosmos-query, etc.)examples/contracts/— Example Solidity and CosmWasm contractsexamples/build/components/— Compiled WASM output;checksums.txttracks SHA256 hashes
just download-wit # WIT interface definitions (wavs-wasi)
just download-solidity # Solidity middleware contracts
just download-cosmwasm # CosmWasm middleware contractsCopy .env.example to .env. Key variables:
RUST_LOG="info,wavs=debug"
WAVS_SIGNING_MNEMONIC="..."
WAVS_AGGREGATOR_EVM_CREDENTIAL="..."
WAVS_AGGREGATOR_COSMOS_CREDENTIAL="..."
Detailed docs live in docs/:
ARCHITECTURE.md— Subsystem design detailsLOCAL_DEV.md— Development workflow and telemetryAPI.md— HTTP API referenceASYNC_NOTES.md— Async design patterns used throughoutP2P.md— libp2p/Hyperswarm networkingWIT_AUTHORING_NOTES.md— Writing WIT component interfaces