Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .claude/skills/wavs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ WAVS runs off-chain computation as sandboxed WebAssembly (WASI) components trigg

---

## Deterministic On-Chain Reads

Treat the trigger/event block height as the canonical snapshot for on-chain data that relates to that trigger. When a component performs EVM, Cosmos, or other RPC reads and the client/API supports it, pass the trigger block number or block height explicitly instead of reading `latest` state.

Avoid mixing historical trigger data with unpinned latest-state reads. Pinning reads to the trigger block improves replayability and prevents nondeterministic state/timestamp mismatches, such as an oracle response whose `updatedAt` appears newer than the block timestamp because an RPC backend served cached state from a different snapshot.

---

## MCP Setup

The `wavs:` MCP tools below require `wavs-mcp` to be running and registered with Claude Code.
Expand Down
2 changes: 2 additions & 0 deletions .claude/skills/wavs/flows/component-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ use example_helpers::trigger::{decode_trigger_event, encode_trigger_output};

## Host APIs

For on-chain reads related to a trigger, use the trigger's block height as the canonical snapshot. Pass that block number/height to EVM, Cosmos, or RPC calls when supported, and avoid mixing historical trigger data with unpinned `latest` reads.

```rust
host::config_var("my-key") // → Option<String>; reads service config
host::log(host::LogLevel::Info, "msg"); // levels: Debug, Info, Warn, Error
Expand Down
Loading