Skip to content

Commit 9787bab

Browse files
committed
upgraded to v0.4.0-rc.1
1 parent b1f4234 commit 9787bab

48 files changed

Lines changed: 13433 additions & 16784 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.docker/.gitkeep

Whitespace-only changes.

.env.example

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,16 @@
1-
# == PROJECT ==
2-
# If you have custom env vars in your project, you can set them here
3-
# You also must update the `host_envs` field in the service.json file
4-
WAVS_ENV_YOURKEYHERE="00000000000000000000000000000000"
5-
6-
# WAVS
7-
WAVS_DATA=~/wavs/data
8-
WAVS_LOG_LEVEL="info"
9-
WAVS_SUBMISSION_MNEMONIC="test test test test test test test test test test test junk"
10-
WAVS_COSMOS_SUBMISSION_MNEMONIC="cosmos mnemonic here"
1+
DEPLOY_ENV=LOCAL
2+
METADATA_URI=https://raw.githubusercontent.com/Lay3rLabs/wavs-rewards/refs/heads/main/metadata.json
3+
LOCAL_ETHEREUM_RPC_URL=http://localhost:8545
114

12-
# WAVS CLI
13-
WAVS_CLI_DATA=~/wavs/cli
14-
WAVS_CLI_COSMOS_CREDENTIAL="cosmos mnemonic here"
15-
WAVS_CLI_EVM_CREDENTIAL="test test test test test test test test test test test junk"
16-
WAVS_CLI_LOG_LEVEL="info, wavs_cli=info"
5+
CHAIN_ID=17000
6+
TESTNET_RPC_URL=https://1rpc.io/holesky
177

18-
# WAVS Aggregator
19-
WAVS_AGGREGATOR_DATA=~/wavs/aggregator
20-
WAVS_AGGREGATOR_CREDENTIAL="test test test test test test test test test test test junk"
21-
WAVS_AGGREGATOR_HD_INDEX=0
8+
# this key requires funds. used as the admin / deployer of contracts and core contracts.
9+
FUNDED_KEY=
2210

23-
# == Testnet ==
24-
# Replace with your RPC URL
25-
RPC_URL=https://holesky.drpc.org
26-
METADATA_URI=https://raw.githubusercontent.com/Lay3rLabs/wavs-art/refs/heads/main/metadata.json
27-
DEPLOY_ENV=LOCAL
28-
# if testnet, use an actual funded key
29-
FUNDED_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
30-
CHAIN_ID=17000
31-
ETHERSCAN_API_KEY=foobar
32-
LOCAL_ETHEREUM_RPC_URL=http://localhost:8545
3311
LST_CONTRACT_ADDRESS=0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034
3412
LST_STRATEGY_ADDRESS=0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3
3513

36-
# Rewards
37-
## IPFS Upload
38-
WAVS_ENV_PINATA_API_URL=https://uploads.pinata.cloud/v3/files
39-
WAVS_ENV_PINATA_API_KEY=
40-
IPFS_GATEWAY_URL=https://<SUBDOMAIN>.mypinata.cloud/ipfs/
41-
42-
# AI
43-
WAVS_ENV_OLLAMA_API_URL=http://localhost:11434
44-
WAVS_ENV_SD_API_URL=http://localhost:7860/sdapi/v1/txt2img
14+
# https://app.pinata.cloud/developers/api-keys, JWT token
15+
PINATA_API_KEY=
16+
ETHERSCAN_API_KEY=foobar
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
3+
# Define the pattern
4+
# Updated to handle semantic versions with suffixes (like -beta, -alpha, etc.)
5+
GREP_PATTERN='ghcr\.io/lay3rlabs/wavs:(v?[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9]+)?|[a-zA-Z0-9-_./]+)'
6+
7+
export DEBUGGING=${DEBUGGING:-false}
8+
9+
main() {
10+
# declare an empty array
11+
matches_set=()
12+
13+
# iterate over all files not ignored by .gitignore
14+
while read file; do
15+
if [[ $file == lib/* ]]; then
16+
continue
17+
fi
18+
if [[ $file == *$(basename $0) ]]; then
19+
continue
20+
fi
21+
22+
found_docker=$(grep -P -o "$GREP_PATTERN" $file)
23+
if [[ ! -z $found_docker ]]; then
24+
# ensure found_docker is split on new lines to each their own array components (some files may have multiple references)
25+
IFS=$'\n' read -rd '' -a found_docker_array <<< "$found_docker"
26+
for i in "${found_docker_array[@]}"; do
27+
if [[ $DEBUGGING == "true" ]]; then
28+
echo "Found in $file: $i"
29+
fi
30+
31+
# check if the array already contains the item, if it does, skip adding it
32+
if [[ " ${matches_set[@]} " =~ " ${i} " ]]; then
33+
continue
34+
fi
35+
36+
matches_set+=("$i")
37+
done
38+
fi
39+
done < <(git ls-files --cached --others --exclude-standard)
40+
41+
if [[ ${#matches_set[@]} -eq 1 ]]; then
42+
echo "Only found a single image: ${matches_set[0]}, success"
43+
exit 0
44+
else
45+
echo "Found multiple docker images in the codebase:"
46+
for i in "${matches_set[@]}"; do
47+
echo "$i"
48+
done
49+
echo "Please ensure only a single wavs docker image is being referenced in the files"
50+
exit 1
51+
fi
52+
}
53+
54+
# test_data
55+
main

.github/workflows/contracts.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Solidity
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
11+
- name: Install Foundry
12+
uses: foundry-rs/foundry-toolchain@v1
13+
with:
14+
version: stable
15+
16+
- uses: actions/setup-node@v4
17+
name: Install Node.js
18+
with:
19+
node-version: 21
20+
21+
- name: Install deps
22+
run: make setup
23+
24+
- name: Run forge build
25+
run: forge build -vvv
26+
27+
- name: Run forge tests
28+
run: forge test -vvv

.github/workflows/docs-ci.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# TODO: re-enable for 0.4 official
2+
3+
# name: Docs CI
4+
5+
# # based on https://docs.wavs.xyz/ & this repos README.md
6+
7+
# on:
8+
# push:
9+
# branches:
10+
# - main
11+
# pull_request:
12+
# workflow_dispatch:
13+
14+
# # Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed.
15+
# concurrency:
16+
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
# cancel-in-progress: true
18+
19+
# env:
20+
# GO_VERSION: 1.23.7
21+
22+
# jobs:
23+
# run:
24+
# runs-on: ubuntu-latest
25+
# env:
26+
# DEBUGGING: true
27+
28+
# steps:
29+
# - name: Checkout repository
30+
# uses: actions/checkout@v4
31+
32+
# - name: Install Ubuntu packages
33+
# run: sudo apt-get update && sudo apt-get install bash make jq
34+
35+
# - uses: actions/setup-node@v4
36+
# name: Install Node.js
37+
# with:
38+
# node-version: 21
39+
40+
# - name: Set up Go ${{ env.GO_VERSION }}
41+
# uses: actions/setup-go@v4
42+
# with:
43+
# go-version: ${{ env.GO_VERSION }}
44+
45+
# - name: Install Rust
46+
# uses: actions-rs/toolchain@v1
47+
# with:
48+
# profile: minimal
49+
# toolchain: stable
50+
# override: true
51+
52+
# - name: Cache Rust target
53+
# uses: actions/cache@v3
54+
# with:
55+
# path: |
56+
# ~/.rustup/toolchains
57+
# ~/.cargo/bin/
58+
# ~/.cargo/registry/index/
59+
# ~/.cargo/registry/cache/
60+
# ~/.cargo/git/db/
61+
# target/
62+
# key: ${{ runner.os }}-rust-wasm32-${{ hashFiles('**/Cargo.lock') }}
63+
# restore-keys: |
64+
# ${{ runner.os }}-rust-wasm32-
65+
66+
# - uses: cargo-bins/cargo-binstall@main
67+
# name: Install cargo-binstall
68+
69+
# - name: Install Foundry
70+
# uses: foundry-rs/foundry-toolchain@v1
71+
# with:
72+
# version: stable
73+
74+
# - name: Install rust wasm32-wasip2
75+
# run: rustup target add wasm32-wasip2
76+
77+
# - name: Check if wkg exists
78+
# id: check-wkg
79+
# run: |
80+
# if [ ! -f ~/.cargo/bin/wkg ]; then
81+
# echo "wkg_exists=false" >> $GITHUB_OUTPUT
82+
# else
83+
# echo "wkg_exists=true" >> $GITHUB_OUTPUT
84+
# fi
85+
86+
# # limited due to low rate limits
87+
# - name: Install wasi components
88+
# if: steps.check-wkg.outputs.wkg_exists == 'false'
89+
# run: cargo binstall cargo-component warg-cli wkg --locked --no-confirm --force
90+
91+
# - name: Configure wkg registry
92+
# run: wkg config --default-registry wa.dev
93+
94+
# - name: Install docci readme runner
95+
# run: |
96+
# RELEASE=https://github.com/Reecepbcups/docci/releases/download/v0.7.1/docci
97+
# sudo wget --quiet -O /usr/local/bin/docci ${RELEASE}
98+
# sudo chmod a+rx /usr/local/bin/docci
99+
100+
101+
# # installs wasm-tools as well, required for rust & ts
102+
# - name: Run docci (go)
103+
# run: docci components/golang-evm-price-oracle/config.json
104+
105+
# - name: Run docci (rust)
106+
# run: docci components/evm-price-oracle/config.json
107+
108+
# # - name: Run docci (typescript)
109+
# # run: docci components/js-evm-price-oracle/config.json

.github/workflows/rust.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Rust
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
tests-stable:
8+
name: Tests (Stable)
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout sources
12+
uses: actions/checkout@v4
13+
14+
- name: Install toolchain
15+
uses: dtolnay/rust-toolchain@stable
16+
17+
- uses: Swatinem/rust-cache@v2
18+
with:
19+
cache-on-failure: true
20+
21+
- name: cargo test
22+
run: cargo test --workspace --all-features
23+
24+
docs:
25+
name: docs
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: dtolnay/rust-toolchain@stable
30+
with:
31+
components: rust-docs
32+
33+
- uses: Swatinem/rust-cache@v2
34+
35+
- name: doc
36+
run: cargo doc --workspace --all-features --no-deps --document-private-items
37+
env:
38+
RUSTDOCFLAGS: "-D warnings"
39+
40+
fmt:
41+
name: fmt
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: dtolnay/rust-toolchain@stable
46+
with:
47+
components: rustfmt
48+
- name: fmt --check
49+
run: cargo fmt --all --check
50+
51+
# clippy:
52+
# name: clippy
53+
# runs-on: ubuntu-latest
54+
# steps:
55+
# - uses: actions/checkout@v4
56+
# - uses: dtolnay/rust-toolchain@stable
57+
# with:
58+
# components: clippy
59+
# - uses: Swatinem/rust-cache@v2
60+
# - name: clippy
61+
# run: cargo clippy --workspace --tests --all-features
62+
# env:
63+
# RUSTFLAGS: "-D warnings"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check WAVS Image Version
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
# Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed.
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
script:
14+
runs-on: ubuntu-latest
15+
env:
16+
DEBUGGING: true
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Install bash
23+
run: sudo apt-get install bash
24+
25+
- name: Make script executable
26+
run: chmod +x .github/single-wavs-image-verifier.bash
27+
28+
- name: Run script
29+
run: bash .github/single-wavs-image-verifier.bash

.gitignore

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
1-
# from wavs-foundry-template
1+
# general compile
22
/target
33
out/
44
cache/
55
broadcast/
6+
node_modules/
7+
8+
# WAVS
9+
.env
10+
.env-e
611
compiled/*.wasm
712
.docker/*.json
813
.docker/*.log
9-
.env
10-
.env-e
11-
node_modules/
12-
lcov.info
13-
internal/
1414
wavs:worker*.wit
1515
wavs:worker*.wasm
16+
17+
# WAVS infra
1618
.nodes
19+
infra/*
20+
21+
# Tools
22+
**/.claude/settings.local.json
1723

24+
# Frontend
25+
node_modules/
26+
.next/
27+
.env.local
28+
29+
# AI Data
1830
.docker/data_*
19-
.DS_Store
31+
32+
# Misc
33+
.DS_Store

Cargo-component.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ version = 1
66
name = "wavs:worker"
77

88
[[package.version]]
9-
requirement = "^0.4.0-beta.2"
10-
version = "0.4.0-beta.2"
11-
digest = "sha256:f5ef46a7fc78792eb80f0746e21baa4275b3593aafd1cb8be8649439e47f4db7"
9+
requirement = "^0.4.0-beta.4"
10+
version = "0.4.0-beta.4"
11+
digest = "sha256:daee6b7f83a38ebfe7ed168d17e4c97cf6dc2d1b5af3816d3088c19daf7c5d8c"

0 commit comments

Comments
 (0)