-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: latest wavs 0.4.0-alpha.2
#119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 30 commits
a0bc63e
9fcc0f3
467ce0d
c6d5a19
92b5094
0ec0bbd
abf60d1
4ddfe6d
e242b21
f603309
252b8b5
223512a
d90e219
096e25f
0c38ad1
3b7e027
0af0a7c
a58b4e2
1a91dc3
9f43f5d
e179373
b3470c2
1e80170
1ae8e90
97dac86
7c36c36
d04a64c
fbbf00d
b4e3a44
562b2c0
bdcc460
f397551
5d012c4
0f7e009
c3640e9
3db54aa
8ee37bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,41 @@ | ||
# == project == | ||
# If you have custom env vars in your project, you can set them here | ||
# You also must update the `host_envs` field in `SERVICE_CONFIG` in `Makefile` | ||
# You also must update the `host_envs` field in `SERVICE_CONFIG` in `Makefile` | ||
WAVS_ENV_YOURKEYHERE="00000000000000000000000000000000" | ||
|
||
# WAVS | ||
WAVS_DATA=~/wavs/data | ||
WAVS_LOG_LEVEL="info" | ||
WAVS_SUBMISSION_MNEMONIC="test test test test test test test test test test test junk" | ||
WAVS_AGGREGATOR_MNEMONIC="test test test test test test test test test test test junk" | ||
WAVS_COSMOS_SUBMISSION_MNEMONIC="cosmos mnemonic here" | ||
|
||
# CLI | ||
WAVS_CLI_DATA=~/wavs/cli | ||
WAVS_CLI_COSMOS_MNEMONIC="cosmos mnemonic here" | ||
WAVS_CLI_ETH_MNEMONIC="test test test test test test test test test test test junk" | ||
WAVS_CLI_LOG_LEVEL="info, wavs_cli=debug" | ||
WAVS_CLI_LOG_LEVEL="info, wavs_cli=info" | ||
|
||
# FUNDED_KEY=0x10df54bba92e291d74bc0b453d8173641f7df5b2db419d0276865079902636b6 | ||
|
||
# Aggregator | ||
WAVS_AGGREGATOR_DATA=~/wavs/aggregator | ||
WAVS_AGGREGATOR_MNEMONIC="test test test test test test test test test test test junk" | ||
WAVS_AGGREGATOR_MNEMONIC="test test test test test test test test test test test junk" | ||
|
||
# TODO: Replace with your RPC URL | ||
RPC_URL=https://holesky.drpc.org | ||
|
||
|
||
|
||
# FIXME: place your project's metadata URI here | ||
METADATA_URI=https://wavs.xyz/metadata.json | ||
|
||
# what should I put here?? | ||
QUICK_MODE=ON | ||
NUM_OPERATORS=3 # Number of operators to set up when QUICK_MODE is OFF | ||
DEPLOY_ENV=LOCAL | ||
FUNDED_KEY= | ||
CHAIN_ID=17000 | ||
ETHERSCAN_API_KEY=foobar | ||
LOCAL_ETHEREUM_RPC_URL=http://localhost:8545 | ||
LST_CONTRACT_ADDRESS=0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034 | ||
LST_STRATEGY_ADDRESS=0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ wit-bindgen-rt = {version = "0.39.0", features = ["bitflags"]} | |
wit-bindgen = "0.39.0" | ||
wstd = "0.5.1" | ||
wasi = "0.14.1" | ||
wavs-wasi-chain = "0.3.0" | ||
wavs-wasi-utils = { git = "https://github.com/Lay3rLabs/wavs-wasi" } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: use crates.io v0.4.0 when it comes out for alpha.2 + |
||
|
||
# Other | ||
serde = { version = "1.0.217", features = ["derive"] } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ SERVICE_CONFIG_FILE?=.docker/service.json | |
CARGO=cargo | ||
# the directory to build, or "" for all | ||
WASI_BUILD_DIR ?= "" | ||
DOCKER_IMAGE?=ghcr.io/lay3rlabs/wavs:0.4.0-alpha1-amd64 | ||
DOCKER_IMAGE?=ghcr.io/lay3rlabs/wavs:reece_priv_key_signing_apr_10 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TOOD: alpha.3 + |
||
WAVS_CMD ?= $(SUDO) docker run --rm --network host $$(test -f .env && echo "--env-file ./.env") -v $$(pwd):/data ${DOCKER_IMAGE} wavs-cli | ||
ANVIL_PRIVATE_KEY?=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | ||
RPC_URL?=http://localhost:8545 | ||
|
@@ -83,30 +83,36 @@ start-all: clean-docker setup-env | |
|
||
## get-service-handler: getting the service handler address from the script deploy | ||
get-service-handler-from-deploy: | ||
@jq -r '.service_handler' "./.docker/script_deploy.json" | ||
@jq -r '.deployedTo' "./.docker/submit.json" | ||
|
||
get-eigen-service-manager-from-deploy: | ||
@jq -r '.eigen_service_managers.local | .[-1]' .docker/deployments.json | ||
|
||
## get-trigger: getting the trigger address from the script deploy | ||
get-trigger-from-deploy: | ||
@jq -r '.trigger' "./.docker/script_deploy.json" | ||
@jq -r '.deployedTo' "./.docker/trigger.json" | ||
|
||
## wavs-cli: running wavs-cli in docker | ||
wavs-cli: | ||
@$(WAVS_CMD) $(filter-out $@,$(MAKECMDGOALS)) | ||
|
||
## upload-component: uploading the WAVS component | COMPONENT_FILENAME | ||
upload-component: | ||
@curl --silent -X POST http://127.0.0.1:8000/upload --data-binary @./compiled/$(COMPONENT_FILENAME) -H "Content-Type: application/wasm" | jq -r .digest | ||
# TODO: move to $(WAVS_CMD) upload-component ./compiled/${COMPONENT_FILENAME} | ||
@wget --post-file=./compiled/${COMPONENT_FILENAME} --header="Content-Type: application/wasm" -O - http://127.0.0.1:8000/upload | jq -r .digest | ||
Comment on lines
+85
to
+86
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fine for now, but upload-component (or using a proper registry with the new workflows coming in -alpha.3 are ideal) |
||
|
||
## deploy-service: deploying the WAVS component service json | SERVICE_CONFIG_FILE | ||
deploy-service: | ||
@$(WAVS_CMD) deploy-service-raw --log-level=info --data /data/.docker --home /data --service `jq -c . < $(SERVICE_CONFIG_FILE)` | ||
@$(WAVS_CMD) deploy-service-raw --service `jq . -cr ${SERVICE_CONFIG_FILE}` --log-level=info --data /data/.docker --home /data | ||
|
||
## show-result: showing the result | SERVICE_TRIGGER_ADDR, SERVICE_SUBMISSION_ADDR, RPC_URL | ||
## get-trigger: get the trigger id | SERVICE_TRIGGER_ADDR, RPC_URL | ||
get-trigger: | ||
@forge script ./script/ShowResult.s.sol ${SERVICE_TRIGGER_ADDR} --sig 'trigger(string)' --rpc-url $(RPC_URL) --broadcast -v 4 | ||
|
||
TRIGGER_ID?=1 | ||
## show-result: showing the result | SERVICE_SUBMISSION_ADDR, TRIGGER_ID, RPC_URL | ||
show-result: | ||
@forge script ./script/ShowResult.s.sol ${SERVICE_TRIGGER_ADDR} ${SERVICE_SUBMISSION_ADDR} --sig 'run(string,string)' --rpc-url $(RPC_URL) --broadcast -v 4 | ||
@forge script ./script/ShowResult.s.sol ${SERVICE_SUBMISSION_ADDR} ${TRIGGER_ID} --sig 'data(string,uint64)' --rpc-url $(RPC_URL) --broadcast -v 4 | ||
|
||
_build_forge: | ||
@forge build | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ repository.workspace = true | |
|
||
[dependencies] | ||
wit-bindgen-rt = {workspace = true} | ||
wavs-wasi-chain = { workspace = true } | ||
wavs-wasi-utils = { workspace = true } | ||
serde = { workspace = true } | ||
serde_json = { workspace = true } | ||
alloy-sol-macro = { workspace = true } | ||
|
@@ -28,4 +28,4 @@ lto = true | |
|
||
[package.metadata.component] | ||
package = "component:eth-price-oracle" | ||
target = "wavs:worker/[email protected].1" | ||
target = "wavs:worker/[email protected].2" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
{ | ||
"__tool": "github.com/reecepbcups/docci", | ||
"paths": [ | ||
"README.md", | ||
"docs/tutorial" | ||
"README.md" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: docs/ update and re-add tutorial back |
||
], | ||
"env_vars": {}, | ||
"pre_cmds": [], | ||
"log_level": "ERROR", | ||
"cleanup_cmds": [ | ||
"killall anvil || true", | ||
"docker compose rm --stop --force --volumes || true", | ||
"docker rm -f wavs wavs-aggregator wavs-deploy-service-manager wavs-deploy-eigenlayer || true" | ||
"docker compose rm --stop --force --volumes || true" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: re-add