@@ -18,66 +18,47 @@ Create a new project using this template:
1818
1919``` bash
2020# If you don't have forge: `curl -L https://foundry.paradigm.xyz | bash`
21-
2221forge init --template Lay3rLabs/wavs-foundry-template my-wavs
2322```
2423
25- ## Testing
26-
27- Given the repository contains both Solidity and Rust code, there's 2 different
28- workflows.
29-
30- ### Setting up the Environment
31-
32- Initialize the submodule dependencies:
24+ ### Solidity
3325
3426``` bash
27+ # Initialize the submodule dependencies
3528forge install
36- ```
37-
38- Build the contracts:
3929
40- ``` bash
30+ # Build the contracts
4131forge build
42- ```
43-
44- Run the tests:
4532
46- ``` bash
33+ # Run the solidity tests. alias: `make test`
4734forge test
4835```
4936
50- ## Rust
37+ > You can also use ` make build ` to build the contracts, bindings, and components.
5138
52- Rust bindings to the contracts can be generated via ` forge bind ` , which requires
53- first building your contracts:
39+ ## Rust
5440
5541``` bash
42+ # Generate new bindings from your contract(s)
5643make bindings
57- ```
58-
59- Then, you can run the tests:
6044
61- ``` bash
62- cargo test
45+ # Run rust tests
46+ make test
6347```
6448
6549## WAVS
6650
67- Build the latest solidity:
51+ ### Install the WAVS CLI
6852
6953``` bash
70- make build
71- ```
72-
73- Install the WAVS CLI:
74-
75- ``` bash
76- # MacOS: if you get permission errors: eval `ssh-agent -s`; ssh-add
54+ # MacOS: if you get permission errors: eval `ssh-agent -s` && ssh-add
7755(cd lib/WAVS; cargo install --path ./packages/cli)
7856```
7957
58+ ### Start Anvil, WAVS, and Deploy Eigenlayer
59+
8060``` bash
61+ # copy over the .env file
8162cp .env.example .env
8263
8364# [!] Get your key from: https://openweathermap.org/
@@ -90,7 +71,7 @@ cp .env.example .env
9071make start-all
9172```
9273
93- Upload your WAVS Service contract
74+ ### Upload your WAVS Service Manager
9475
9576``` bash
9677# Deploy (override: FOUNDRY_ANVIL_PRIVATE_KEY)
@@ -102,19 +83,19 @@ export SERVICE_MANAGER_ADDRESS=`jq -r '.transactions[] | select(.contractName ==
10283echo " Service Manager Address: $SERVICE_MANAGER_ADDRESS "
10384```
10485
105- Build WAVS WASI component(s)
86+ ### Build WASI components
87+
88+ > Install ` cargo binstall cargo-component ` if you have not already. -- https://github.com/bytecodealliance/cargo-component#installation
10689
10790``` bash
108- # build all wasi components/*
109- # https://github.com/bytecodealliance/cargo-component#installation / cargo binstall cargo-component
11091make wasi-build
11192
112- # Verify execution works as expected without deploying
11393# TODO: currently broken upstream
94+ # Verify execution works as expected without deploying
11495# wavs-cli exec --component $(pwd)/compiled/eth_trigger_weather.wasm --input Nashville,TN
11596```
11697
117- Deploy service and verify with adding a task
98+ ## Deploy Service and Verify
11899
119100``` bash
120101# add read-write access
0 commit comments