Expert guidance for working with WAVS (WASI AVS) projects - Ethereum Attestation Service integration with WebAssembly components
This skill provides expert guidance for working with WAVS (WASI AVS) projects that integrate Ethereum Attestation Service (EAS) with off-chain WebAssembly computation capabilities.
Helps developers work with WAVS architecture including:
WAVS projects consist of:
The system operates as an AVS where on-chain events trigger off-chain WASI components, which process data and submit results back on-chain through aggregator services.
1. **Build everything**: Use `make build` to build both Solidity contracts and WASI components
2. **Build only contracts**: Use `forge build` for Solidity contracts
3. **Build all WASI components**: Use `make wasi-build` (outputs to `compiled/` directory)
4. **Build specific component**: Use `WASI_BUILD_DIR=components/component-name make wasi-build`
1. **Run Solidity tests**: Use `forge test` (add `-vvv` for verbose output)
2. **Run unit tests**: Use `npm run test:unit` for unit test contracts
3. **Generate coverage**: Use `npm run coverage`
4. **Test component locally**: Use `make wasi-exec COMPONENT_FILENAME=component.wasm INPUT_DATA="test-string"`
1. **Copy environment template**: Copy `.env.example` to `.env` before starting
2. **Configure deployment environment**: Set `DEPLOY_ENV` to LOCAL or TESTNET
3. **Set deployment key**: Configure `FUNDED_KEY` with private key for deployments
4. **Add component variables**: Use `WAVS_ENV_*` prefix for variables accessible to WASI components
5. **Start local services**: Use `make start-all-local` to start anvil, IPFS, WARG, Jaeger, and prometheus
6. **Install dependencies**: Use `make setup` for initial npm and forge setup
7. **Deploy complete pipeline**: Use `bash ./script/deploy-script.sh`
1. **Check linting**: Use `npm run lint:check` for Solidity
2. **Fix linting**: Use `npm run lint:fix` to auto-fix issues
3. **Format Solidity**: Use `forge fmt`
4. **Format Rust**: Use `cargo fmt`
5. **Validate component**: Use `make validate-component COMPONENT=component-name` to check compliance with best practices
Follow these steps exactly:
1. **Research existing patterns**: Examine components in `/components/` directory (e.g., `eas-attest`, `eas-compute`, `merkler`)
2. **Create component structure**:
```bash
mkdir -p components/name/src
```
3. **Copy template files**:
```bash
cp components/evm-price-oracle/src/bindings.rs components/name/src/
cp components/evm-price-oracle/config.json components/name/
cp components/evm-price-oracle/Makefile components/name/
```
4. **Implement component logic**:
- Create `src/lib.rs` with main component logic
- Create `src/trigger.rs` with proper ABI decoding
- Ensure all API response structures derive `Clone`
- Use `#[serde(default)]` and `Option<T>` for external API fields
- Clone data before use: `let data_clone = data.clone();`
- Use `ok_or_else()` for Option types, `map_err()` for Result types
5. **Create Cargo.toml**:
- Use `{ workspace = true }` for all dependencies
- Keep consistent with other components
6. **Register in workspace**:
- Add component to workspace members in root `Cargo.toml`
7. **Validate before building**:
```bash
make validate-component COMPONENT=name
```
- Fix ALL validation errors before proceeding
8. **Build the component**:
```bash
WASI_BUILD_DIR=components/name make wasi-build
```
9. **Test execution**:
```bash
make wasi-exec COMPONENT_FILENAME=name.wasm INPUT_DATA="test-string"
```
The typical WAVS project includes these components:
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/wavs-project-development-assistant/raw