Skip to content

Commit 19a0406

Browse files
committed
cleanup readme v1.0.0
1 parent 587fd13 commit 19a0406

File tree

2 files changed

+26
-36
lines changed

2 files changed

+26
-36
lines changed

README.md

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,15 @@ warg key new
132132
```bash docci-ignore
133133
# if foundry is not installed:
134134
# `curl -L https://foundry.paradigm.xyz | bash && $HOME/.foundry/bin/foundryup`
135-
forge init --template Lay3rLabs/wavs-foundry-template my-wavs --branch 0.4
135+
forge init --template Lay3rLabs/wavs-foundry-template my-wavs --branch main
136136
```
137137
138138
> \[!TIP]
139139
> Run `make help` to see all available commands and environment variable overrides.
140140
141141
### Solidity
142142
143-
Install the required packages to build the Solidity contracts. This project supports both [submodules](./.gitmodules) and [npm packages](./package.json).
143+
Install the required packages to build the Solidity contracts. This project supports [npm packages](./package.json), you can add git submodules if you need.
144144
145145
```bash
146146
# Install packages (npm & submodules)
@@ -177,30 +177,29 @@ WASI_BUILD_DIR=components/evm-price-oracle task build:wasi
177177
How to test the component locally for business logic validation before on-chain deployment. An ID of 1 for the oracle component is Bitcoin.
178178
179179
```bash
180-
# Rust & Typescript components
180+
# Rust components
181181
INPUT_DATA="1" COMPONENT_FILENAME=evm_price_oracle.wasm task wasi:exec
182-
INPUT_DATA="1" COMPONENT_FILENAME=js_evm_price_oracle.wasm task wasi:exec
183182
184-
# Golang
185-
INPUT_DATA="1" COMPONENT_FILENAME=golang_evm_price_oracle.wasm task wasi:exec-fixed
183+
184+
# Golang & JS (re-added in the future since v1 refactor)
185+
# INPUT_DATA="1" COMPONENT_FILENAME=js_evm_price_oracle.wasm task wasi:exec
186+
# INPUT_DATA="1" COMPONENT_FILENAME=golang_evm_price_oracle.wasm task wasi:exec-fixed
186187
```
187188
188189
Expected output:
189190
190191
```shell docci-ignore
191-
input id: 1
192-
resp_data: PriceFeedData {
193-
symbol: "BTC",
194-
timestamp: "2025-04-01T00:00:00.000Z",
195-
price: 82717.27035239758
196-
}
197-
INFO Fuel used: 653415
198-
199-
Result (hex encoded):
200-
7b2273796d626f6c223a22425443222c2274696d657374616d70223a22323032352d30342d30315430303a34...
201-
202-
Result (utf8):
203-
{"symbol":"BTC","timestamp":"2025-04-01T00:00:00.000Z","price":82717.27035239758}
192+
Decoded crypto ID: 1
193+
resp_data: PriceFeedData { symbol: "BTC", timestamp: "2025-10-01T18:12:11", price: 116999.97 }
194+
INFO Fuel used: 702137
195+
196+
Time elapsed (ms): 123
197+
198+
Result (hex encoded): 7b2273796d626f6c2...
199+
200+
Result (utf8): {"symbol":"BTC","timestamp":"2025-10-01T18:12:11","price":116999.97}
201+
202+
Ordering: 0
204203
```
205204
206205
## WAVS
@@ -266,17 +265,10 @@ This script automates the complete WAVS deployment process in a single command:
266265
A fully operational WAVS service that monitors blockchain events, executes WebAssembly components, and submits verified results on-chain.
267266
268267
```bash
269-
# export RPC_URL=`bash ./script/get-rpc.sh`
270-
# export AGGREGATOR_URL=http://127.0.0.1:8001
271-
272-
# task deploy:full
273268
export RPC_URL=$(task get-rpc)
274269
export AGGREGATOR_URL=http://127.0.0.1:8001
275270
276-
# TODO: this is merged with deploy-script now
277-
# bash ./script/deploy-contracts.sh
278-
279-
# deploys contracts & components
271+
# deploys contracts & components (( task deploy:full ))
280272
# If you do not set the PoA operator you will get `ServiceManagerValidateAnyRevert("0x3dda1739")`
281273
bash ./script/deploy-script.sh && task deploy:single-operator-poa-local
282274
```
@@ -287,22 +279,20 @@ bash ./script/deploy-script.sh && task deploy:single-operator-poa-local
287279
Anyone can now call the [trigger contract](./src/contracts/WavsTrigger.sol) which emits the trigger event WAVS is watching for from the previous step. WAVS then calls the service and saves the result on-chain.
288280
289281
```bash
290-
# Rust & Typescript - request BTC from CMC
291-
export INPUT_DATA=`cast abi-encode "addTrigger(string)" "1"`
292-
293-
# Golang uses the raw value
294-
# export INPUT_DATA="1"
295-
296282
# Get the trigger address from previous Deploy forge script
297283
export SERVICE_TRIGGER_ADDR=`jq -r '.evmpriceoracle_trigger.deployedTo' .docker/deployment_summary.json`
298284
# Execute on the trigger contract, WAVS will pick this up and submit the result
299285
# on chain via the operators.
300286
301-
# uses FUNDED_KEY as the executor (local: anvil account)
302-
# source .env
303287
export RPC_URL=`task get-rpc`
304288
export FUNDED_KEY=`task config:funded-key`
305289
290+
# Rust & Typescript - request BTC from CMC
291+
export INPUT_DATA=`cast abi-encode "addTrigger(string)" "1"`
292+
293+
# Golang uses the raw value (TODO: future)
294+
# export INPUT_DATA="1"
295+
306296
forge script ./src/script/Trigger.s.sol ${SERVICE_TRIGGER_ADDR} ${INPUT_DATA} --sig 'run(string,string)' --rpc-url ${RPC_URL} --broadcast --private-key ${FUNDED_KEY}
307297
```
308298

config/components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{
1818
"filename": "aggregator.wasm",
1919
"package_name": "aggregator",
20-
"package_version": "0.3.4",
20+
"package_version": "0.1.0",
2121
"config_values": {
2222
"timer_delay_secs": "${AGGREGATOR_TIMER_DELAYER_SECS}"
2323
},

0 commit comments

Comments
 (0)