You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**TESTNET** You can move the aggregator it to its own machine for testnet deployments, it's easiest to run this on the deployer machine first. If moved, ensure you set the env variables correctly (copy pasted from the previous steps on the other machine).
292
+
**TESTNET** You can move the aggregator it to its own machine for testnet deployments, it's easiest to run this on the deployer machine first. If moved, ensure you set the env variables correctly (copied and pasted from the previous steps on the other machine).
Copy file name to clipboardExpand all lines: docs/handbook/components/blockchain-interactions.mdx
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ import { Callout } from 'fumadocs-ui/components/callout';
7
7
import{DocsPage}from'fumadocs-ui/page';
8
8
docsignore-->
9
9
10
-
Components can interact with blockchains and smart contracts by using crates like [`wavs-wasi-utils`](https://docs.rs/wavs-wasi-utils/latest/wavs_wasi_utils/). This page provides an overview of the dependencies and configuration needed to interact with Ethereum and other EVM-compatible chains. For more information on other helpful crates, see the [Utilities and crates](./utilities) page.
10
+
Components can interact with blockchains and smart contracts by using crates like [`wavs-wasi-utils`](https://docs.rs/wavs-wasi-utils/latest/wavs_wasi_utils/). This page provides an overview of the dependencies and configuration needed to interact with Ethereum and other EVM-compatible chains.
For another approach using the `alloy-contract` crate, visit the example in the [Utilities and crates](./utilities#alloy-contract-crate) page.
201
+
You can also use the `alloy-contract` crate to interact with smart contracts. See the [alloy-contract docs](https://crates.io/crates/alloy-contract) page for more information.
202
202
203
203
See the [wavs-wasi-utils documentation](https://docs.rs/wavs-wasi-utils/latest/wavs_wasi_utils/) and the [Alloy documentation](https://docs.rs/alloy/latest/alloy/) for more detailed information.
204
204
@@ -211,6 +211,7 @@ The Alloy ecosystem provides a comprehensive set of crates for Ethereum developm
Copy file name to clipboardExpand all lines: docs/handbook/components/component.mdx
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ mod solidity { // Define the Solidity types for the incoming trigger event using
70
70
71
71
The component decodes the incoming event trigger data using the `decode_event_log_data!` macro from the [`wavs-wasi-utils` crate](https://docs.rs/wavs-wasi-utils/latest/wavs_wasi_utils/macro.decode_event_log_data.html).
72
72
73
-
The `sol!` macro from `alloy-sol-macro` is usedto define Solidity types in Rust. This macro reads a Solidity interface file and generates corresponding Rust types and encoding/decoding functions. For more information, visit the [Utilities and crates page](./utilities#sol-macro).
73
+
The `sol!` macro from `alloy-sol-macro` is usedto define Solidity types in Rust. This macro reads a Solidity interface file and generates corresponding Rust types and encoding/decoding functions. For more information, visit the [Blockchain interactions page](./blockchain-interactions#sol-macro).
74
74
75
75
### Component logic
76
76
@@ -190,3 +190,14 @@ A component is defined in the [workflow](../workflows) object of the [service.js
190
190
```
191
191
192
192
For more information on component configuration variables and keys, visit the [variables](./variables) page.
193
+
194
+
## Registry
195
+
196
+
WAVS uses a registry to store the WASM components. A service like [wa.dev](https://wa.dev) is recommended for proper distribution in production. A similar registry environment is emulated locally in docker compose for rapid development without an API key:
197
+
198
+
- Build your component
199
+
- Compile the component
200
+
- Upload the component to the registry
201
+
- Set the registry in your service using the wavs-cli command in the `build_service.sh` script:
Copy file name to clipboardExpand all lines: docs/handbook/components/variables.mdx
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,11 +7,9 @@ import { Callout } from 'fumadocs-ui/components/callout';
7
7
import{DocsPage}from'fumadocs-ui/page';
8
8
docsignore-->
9
9
10
-
## Environment variables
11
-
12
10
Components can be configured with two types of variables:
13
11
14
-
###Public variables
12
+
## Public variables
15
13
16
14
These variables can be used for non-sensitive information that can be viewed publicly. These variables are set in the `config` field of a service manifest. All config values are stored as strings, even for numbers.
17
15
@@ -34,7 +32,7 @@ To add public variables:
34
32
letvalue=host::config_var("api_endpoint");
35
33
```
36
34
37
-
###Environment keys
35
+
## Environment keys
38
36
39
37
Environment keys are private and can be used for sensitive data like API keys. These variables are set by operators in their environment and are not viewable by anyone. These variables must be prefixed with `WAVS_ENV_`. Each operator must set these variables in their environment before deploying the service. WAVS validates that all environment variables are set before allowing the service to run.
40
38
@@ -56,7 +54,13 @@ Variables can also be set in your `~/.bashrc`, `~/.zshrc`, or `~/.profile` files
56
54
WAVS_ENV_MY_API_KEY=your_secret_key_here
57
55
```
58
56
59
-
3. Add the environment key to the `env_keys` array in the service manifest:
57
+
3. Access the environment key from a component:
58
+
59
+
```rust
60
+
letapi_key=std::env::var("WAVS_ENV_MY_API_KEY")?;
61
+
```
62
+
63
+
4. Before deploying a service, add the environment key to the `env_keys` array in the service manifest:
Copy file name to clipboardExpand all lines: docs/handbook/overview.mdx
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,15 +33,14 @@ This handbook provides an overview of the different parts that make up a WAVS AV
33
33
-[Submission and Aggregator](./submission) - Discover how results are submitted to the blockchain through the aggregator service and submission contracts.
34
34
35
35
## Components
36
-
-[Component Overview](./components/component) - Learn about the structure and lifecycle of WAVS components, including how to handle triggers and process data.
36
+
-[Component overview](./components/component) - Learn about the structure and lifecycle of WAVS components, including how to handle triggers and process data.
37
37
-[Variables](./components/variables) - Understand how to configure components with public and private variables.
38
-
-[Utilities and Crates](./components/utilities) - Explore the available utilities and crates for building WAVS components.
39
-
-[Blockchain Interactions](./components/blockchain-interactions) - Discover how to interact with blockchains and smart contracts from your components.
40
-
-[Network Requests](./components/network-requests) - Learn how to make HTTP requests to external APIs from your components.
38
+
-[Blockchain interactions](./components/blockchain-interactions) - Discover how to interact with blockchains and smart contracts from your components.
39
+
-[Network requests](./components/network-requests) - Learn how to make HTTP requests to external APIs from your components.
41
40
42
41
43
42
## Development
44
43
-[Template](./template) - Get started with the WAVS template, including its structure, configuration files, and how to customize it for your service.
45
-
-[Makefile Commands](./commands) - Reference for the available makefile commands to build, deploy, and manage your service.
44
+
-[Makefile commands](./commands) - Reference for the available makefile commands to build, deploy, and manage your service.
46
45
47
46
Each section provides detailed information and examples to help you understand and build your WAVS service. Start with the Service section to understand the basic concepts, then explore the other sections based on your needs.
Copy file name to clipboardExpand all lines: docs/handbook/service.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ docsignore-->
9
9
10
10
A service is a collection of smart contracts, operators, and offchain components that make up a WAVS AVS. The different parts of a service are defined in a service manifest or `service.json` file. This file can be stored on IPFS or an HTTP/HTTPS server, and its URL is set on the service manager contract during deployment, allowing the system to fetch the service definition when needed.
11
11
12
-
The service manifest defines the configuration and different parts of a WAVS service, including information about the service, workflows, components, submission, service manager contract, and more.
12
+
The service manifest defines the configuration and different parts of a WAVS service, including information about the service, [workflows](/handbook/workflows), [components](/handbook/components/component), [submission](/handbook/submission), [service manager contract](#service-manager), and more.
13
13
14
14
## Generate Manifest
15
15
16
-
Easily create this JSON file using the `wavs-cli service` command. The template provides a script to generate a 1 component service with ease, [build_service.sh](https://github.com/Lay3rLabs/wavs-foundry-template/blob/main/script/build_service.sh).
16
+
You can create the service.json file using the `wavs-cli service` command. The template provides a script to generate a single-component service with ease, [build_service.sh](https://github.com/Lay3rLabs/wavs-foundry-template/blob/main/script/build_service.sh).
Copy file name to clipboardExpand all lines: docs/handbook/submission.mdx
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,8 +89,7 @@ contract SimpleSubmit is ITypes, IWavsServiceHandler {
89
89
90
90
## Aggregator
91
91
92
-
{/* todo: link to design page. */}
93
-
The aggregator is used to collect and validate responses from multiple operators before submitting them to the blockchain. It acts as an intermediary that receives signed responses from operators, validates each operator's signature, aggregates signatures when enough operators have responded, and submits the aggregated data to the submission contract. The aggregator supports exact match aggregation, meaning that consensus is reached if a threshold amount of submitted responses from operators are identical.
92
+
The aggregator is used to collect and validate responses from multiple operators before submitting them to the blockchain. It acts as an intermediary that receives signed responses from operators, validates each operator's signature, aggregates signatures when enough operators have responded, and submits the aggregated data to the submission contract. The aggregator supports exact match aggregation, meaning that consensus is reached if a threshold amount of submitted responses from operators are identical. Visit the [design considerations page](/design) for more information on aggregation and service design.
94
93
95
94
WAVS currently uses ECDSA signatures for aggregation, but will also support BLS signatures in the future.
Copy file name to clipboardExpand all lines: docs/handbook/triggers.mdx
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ A trigger prompts a WAVS service to run. Operators listen for the trigger event
14
14
15
15
### Trigger lifecycle
16
16
17
-
1. A service is deployed with a service.json manifest which contains information on the service and workflow logic (components, triggers, submission logic).
17
+
1. A service is deployed with a service.json manifest which contains information on the service and [workflow](/handbook/workflows) logic (components, triggers, [submission](/handbook/submission) logic).
18
18
19
19
2. Operators maintain lookup maps to track and verify triggers. For EVM and Cosmos events, they map chain names, contract addresses, and event identifiers to trigger IDs. Block interval triggers are tracked by chain name with countdown timers, while cron triggers are managed in a priority queue ordered by execution time.
20
20
@@ -62,7 +62,7 @@ pub enum TriggerData {
62
62
63
63
## Trigger configuration
64
64
65
-
Triggers define when and how the component should be executed. Each workflow needs a trigger to be set. They are set in the `trigger` field of the `service.json` file.
65
+
Triggers define when and how the component should be executed. Each workflow needs a trigger to be set. They are set in the `trigger` field of the [`service.json` file](/handbook/service).
66
66
67
67
### EVM event trigger
68
68
@@ -73,7 +73,7 @@ This trigger listens for specific events emitted by contracts on EVM-compatible
73
73
"trigger": {
74
74
"evm_contract_event": {
75
75
"address": "0x00000000219ab540356cbb839cbe05303d7705fa", // Contract address to monitor
76
-
"chain_name": "ethereum-mainnet", // Chain to monitor
0 commit comments