Skip to content

Commit 3d91a06

Browse files
authored
Merge pull request #6 from Lay3rLabs/reece/sepolia
feat: sepolia integration (middleware 0.5)
1 parent 8e289f4 commit 3d91a06

9 files changed

Lines changed: 79 additions & 67 deletions

File tree

.env.example

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@ DEPLOY_ENV=LOCAL
22
METADATA_URI=https://raw.githubusercontent.com/Lay3rLabs/wavs-foundry-template/refs/heads/main/metadata.json
33
LOCAL_ETHEREUM_RPC_URL=http://localhost:8545
44

5-
CHAIN_ID=17000
6-
TESTNET_RPC_URL=https://1rpc.io/holesky
5+
CHAIN_ID=11155111
6+
TESTNET_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com/
77

88
# this key requires funds. used as the admin / deployer of contracts and core contracts.
99
FUNDED_KEY=
1010

1111
WAVS_ENV_SOME_SECRET=some_secret_value
1212

13-
LST_CONTRACT_ADDRESS=0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034
14-
LST_STRATEGY_ADDRESS=0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3
13+
# Holesky
14+
# LST_CONTRACT_ADDRESS=0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034
15+
# LST_STRATEGY_ADDRESS=0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3
16+
# Sepolia
17+
LST_CONTRACT_ADDRESS=0x00c71b0fCadE911B2feeE9912DE4Fe19eB04ca56
18+
LST_STRATEGY_ADDRESS=0x8b29d91e67b013e855EaFe0ad704aC4Ab086a574
1519

1620
# https://app.pinata.cloud/developers/api-keys, JWT token
1721
WAVS_ENV_PINATA_API_URL=

EAS_CONFIGURATION.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This guide explains how Ethereum Attestation Service (EAS) addresses are automat
66

77
The EAS compute component requires three configuration parameters:
88
- **`eas_address`**: The main EAS contract address
9-
- **`indexer_address`**: The EAS indexer contract address
9+
- **`indexer_address`**: The EAS indexer contract address
1010
- **`chain_name`**: The blockchain network name (must match `wavs.toml` configuration)
1111

1212
These parameters are **automatically configured** during deployment from the contract deployment summary.
@@ -71,7 +71,7 @@ use crate::bindings::host::config_var;
7171

7272
// In QueryConfig::from_wavs_config()
7373
let eas_address = config_var("eas_address")?;
74-
let indexer_address = config_var("indexer_address")?;
74+
let indexer_address = config_var("indexer_address")?;
7575
let chain_name = config_var("chain_name")?;
7676
```
7777

@@ -85,10 +85,10 @@ chain_id = "31337"
8585
ws_endpoint = "ws://localhost:8545"
8686
http_endpoint = "http://localhost:8545"
8787

88-
[default.chains.evm.holesky]
89-
chain_id = "17000"
90-
ws_endpoint = "wss://holesky.drpc.org"
91-
http_endpoint = "https://holesky.drpc.org"
88+
[default.chains.evm.sepolia]
89+
chain_id = "11155111"
90+
ws_endpoint = "wss://ethereum-sepolia-rpc.publicnode.com"
91+
http_endpoint = "https://ethereum-sepolia-rpc.publicnode.com"
9292
```
9393

9494
## Manual Override (Development Only)
@@ -107,7 +107,7 @@ export CONFIG_VALUES="eas_address=0x...,indexer_address=0x...,chain_name=local"
107107

108108
**Problem**: Components use zero addresses despite deployment.
109109

110-
**Check**:
110+
**Check**:
111111
1. Verify addresses exist in deployment summary:
112112
```bash
113113
cat .docker/deployment_summary.json | jq '.eas_contracts'
@@ -140,7 +140,7 @@ cat .docker/deployment_summary.json | jq '.eas_contracts | keys'
140140
| Environment | Chain Name | Configuration Source |
141141
|-------------|------------|----------------------|
142142
| Local | `local` | deployment_summary.json |
143-
| Testnet | `holesky` | deployment_summary.json |
143+
| Testnet | `sepolia` | deployment_summary.json |
144144
| Custom | Set manually | Manual CONFIG_VALUES |
145145

146146
## Development Workflow
@@ -158,4 +158,4 @@ export INPUT_DATA="0x742d35cc6644c31532e12fd982fd6b8e14000000"
158158
make wasi-exec
159159
```
160160

161-
The EAS configuration is handled automatically during deployment - no manual configuration needed for normal use cases.
161+
The EAS configuration is handled automatically during deployment - no manual configuration needed for normal use cases.

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ INPUT_DATA?=``
99
COMPONENT_FILENAME?=wavs_eas_attest.wasm
1010
CREDENTIAL?=""
1111
DOCKER_IMAGE?=ghcr.io/lay3rlabs/wavs:35c96a4
12-
MIDDLEWARE_DOCKER_IMAGE?=ghcr.io/lay3rlabs/wavs-middleware:0.4.1
12+
MIDDLEWARE_DOCKER_IMAGE?=ghcr.io/lay3rlabs/wavs-middleware:0.5.0-beta.10
1313
IPFS_ENDPOINT?=http://127.0.0.1:5001
1414
RPC_URL?=http://127.0.0.1:8545
1515
SERVICE_FILE?=.docker/service.json
@@ -162,7 +162,9 @@ PAST_BLOCKS?=500
162162
wavs-middleware:
163163
@docker run --rm --network host --env-file ${ENV_FILE} \
164164
$(if ${WAVS_SERVICE_MANAGER_ADDRESS},-e WAVS_SERVICE_MANAGER_ADDRESS=${WAVS_SERVICE_MANAGER_ADDRESS}) \
165-
$(if ${PAST_BLOCKS},-e PAST_BLOCKS=${PAST_BLOCKS}) \
165+
$(if ${OPERATOR_KEY},-e OPERATOR_KEY=${OPERATOR_KEY}) \
166+
$(if ${WAVS_SIGNING_KEY},-e WAVS_SIGNING_KEY=${WAVS_SIGNING_KEY}) \
167+
$(if ${WAVS_DELEGATE_AMOUNT},-e WAVS_DELEGATE_AMOUNT=${WAVS_DELEGATE_AMOUNT}) \
166168
-v ./.nodes:/root/.nodes ${MIDDLEWARE_DOCKER_IMAGE} ${COMMAND}
167169

168170
## update-submodules: update the git submodules

frontend/components/VouchingModal.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function VouchingModal({ trigger, onSuccess, isOpen: externalIsOpen, onCl
5151
}
5252
};
5353
const [selectedSchema, setSelectedSchema] = useState<string>("");
54-
54+
5555
const { address, isConnected, chain } = useAccount();
5656
const { connect } = useConnect();
5757
const { switchChain } = useSwitchChain();
@@ -90,7 +90,7 @@ export function VouchingModal({ trigger, onSuccess, isOpen: externalIsOpen, onCl
9090
method: "wallet_addEthereumChain",
9191
params: [
9292
{
93-
chainId: "0x4268", // 17000 in hex
93+
chainId: "0xAA36A7", // 11155111 in hex
9494
chainName: "Local Anvil",
9595
nativeCurrency: {
9696
name: "Ether",
@@ -110,12 +110,12 @@ export function VouchingModal({ trigger, onSuccess, isOpen: externalIsOpen, onCl
110110

111111
const handleSwitchToLocal = async () => {
112112
try {
113-
switchChain({ chainId: 17000 });
113+
switchChain({ chainId: 11155111 });
114114
} catch (err) {
115115
console.error("Failed to switch network:", err);
116116
try {
117117
await addLocalNetwork();
118-
switchChain({ chainId: 17000 });
118+
switchChain({ chainId: 11155111 });
119119
} catch (addErr) {
120120
console.error("Failed to add and switch network:", addErr);
121121
}
@@ -136,7 +136,7 @@ export function VouchingModal({ trigger, onSuccess, isOpen: externalIsOpen, onCl
136136

137137
const getSchemaPlaceholder = (schemaInfo: typeof selectedSchemaInfo) => {
138138
if (!schemaInfo) return "Select a schema first...";
139-
139+
140140
switch (schemaInfo.uid) {
141141
case schemas.vouchingSchema:
142142
return "Enter vouch weight (e.g., 1, 5, 100)";
@@ -151,7 +151,7 @@ export function VouchingModal({ trigger, onSuccess, isOpen: externalIsOpen, onCl
151151

152152
const getSchemaHelperText = (schemaInfo: typeof selectedSchemaInfo) => {
153153
if (!schemaInfo) return null;
154-
154+
155155
switch (schemaInfo.uid) {
156156
case schemas.vouchingSchema:
157157
return "Enter a numeric weight value representing the strength of your vouch";
@@ -165,7 +165,7 @@ export function VouchingModal({ trigger, onSuccess, isOpen: externalIsOpen, onCl
165165
};
166166

167167
const defaultTrigger = (
168-
<Button
168+
<Button
169169
className="mobile-terminal-btn px-6 py-2"
170170
onClick={() => setIsOpen(true)}
171171
>
@@ -182,9 +182,9 @@ export function VouchingModal({ trigger, onSuccess, isOpen: externalIsOpen, onCl
182182
) : (
183183
defaultTrigger
184184
)}
185-
186-
<Modal
187-
isOpen={isOpen}
185+
186+
<Modal
187+
isOpen={isOpen}
188188
onClose={() => setIsOpen(false)}
189189
title="ATTESTATION CREATION PROTOCOL"
190190
className="max-w-2xl max-h-[90vh] overflow-y-auto"
@@ -363,15 +363,15 @@ export function VouchingModal({ trigger, onSuccess, isOpen: externalIsOpen, onCl
363363
<div>
364364
✓ Attestation created! Tx: {hash.slice(0, 10)}...{hash.slice(-8)}
365365
</div>
366-
{chain?.id === 17000 && (
366+
{chain?.id === 11155111 && (
367367
<div className="opacity-75">
368368
Local network transaction confirmed
369369
</div>
370370
)}
371371
</div>
372372
)}
373373

374-
{isLoading && chain?.id === 17000 && (
374+
{isLoading && chain?.id === 11155111 && (
375375
<div className="terminal-dim text-xs">
376376
🔄 Processing on local Anvil network... Nonce conflicts auto-handled
377377
</div>
@@ -385,4 +385,4 @@ export function VouchingModal({ trigger, onSuccess, isOpen: externalIsOpen, onCl
385385
</Modal>
386386
</>
387387
);
388-
}
388+
}

frontend/hooks/useAttestation.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ export function useAttestation() {
100100
throw new Error("Please connect your wallet");
101101
}
102102

103-
if (chainId !== 17000) {
104-
throw new Error("Please switch to the local network (chain ID 17000)");
103+
if (chainId !== 11155111) {
104+
throw new Error("Please switch to the local network (chain ID 11155111)");
105105
}
106106

107107
// Declare variables in higher scope for retry logic
@@ -258,7 +258,7 @@ export function useAttestation() {
258258

259259
if (encodedData !== undefined && gasEstimate !== undefined) {
260260
const gasPrice = await publicClient!.getGasPrice();
261-
261+
262262
// Recreate the attestation request for retry
263263
const retryAttestationRequest = {
264264
schema: attestationData.schema as `0x${string}`,
@@ -308,7 +308,7 @@ export function useAttestation() {
308308
});
309309

310310
const gasPrice = await publicClient!.getGasPrice();
311-
311+
312312
// Recreate the attestation request for final retry
313313
const finalRetryAttestationRequest = {
314314
schema: attestationData.schema as `0x${string}`,

frontend/lib/wagmi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { injected, metaMask } from "wagmi/connectors";
44

55
// Local chain configuration matching the deployment
66
const localChain = {
7-
id: 17000,
7+
id: 11155111,
88
name: "Local Anvil",
99
nativeCurrency: {
1010
decimals: 18,

script/deploy-script.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ fi
6060

6161
# Testnet: set values (default: local if not set)
6262
if [ "$(sh ./script/get-deploy-status.sh)" = "TESTNET" ]; then
63-
export TRIGGER_CHAIN=holesky
64-
export SUBMIT_CHAIN=holesky
63+
export TRIGGER_CHAIN=sepolia
64+
export SUBMIT_CHAIN=sepolia
6565
fi
6666

6767
# Configure EAS addresses from deployment summary
@@ -72,7 +72,7 @@ VOUCHING_SCHEMA_ID=$(jq -r '.eas_schemas.vouching_schema' .docker/deployment_sum
7272

7373
# Determine chain name based on deployment environment
7474
if [ "$(sh ./script/get-deploy-status.sh)" = "TESTNET" ]; then
75-
CHAIN_NAME="holesky"
75+
CHAIN_NAME="sepolia"
7676
else
7777
CHAIN_NAME="local"
7878
fi
@@ -202,7 +202,13 @@ if [ "$(sh ./script/get-deploy-status.sh)" = "TESTNET" ]; then
202202
fi
203203

204204
export WAVS_SERVICE_MANAGER_ADDRESS=$(jq -r .addresses.WavsServiceManager ./.nodes/avs_deploy.json)
205-
COMMAND="register ${OPERATOR_PRIVATE_KEY} ${AVS_SIGNING_ADDRESS} 0.001ether" make wavs-middleware
205+
206+
source infra/wavs-1/.env
207+
export OPERATOR_KEY=`cast wallet private-key --mnemonic "$WAVS_SUBMISSION_MNEMONIC" --mnemonic-index 0`
208+
export WAVS_SIGNING_KEY=`cast wallet address --mnemonic-path "$WAVS_SUBMISSION_MNEMONIC" --mnemonic-index 1`
209+
export WAVS_DELEGATE_AMOUNT=`cast --to-unit 0.001ether`
210+
OPERATOR_KEY=${OPERATOR_KEY} WAVS_SIGNING_KEY=${WAVS_SIGNING_KEY} WAVS_DELEGATE_AMOUNT=${WAVS_DELEGATE_AMOUNT} make wavs-middleware COMMAND="register"
211+
# COMMAND="register ${OPERATOR_PRIVATE_KEY} ${AVS_SIGNING_ADDRESS} "
206212

207213
# Verify registration
208214
COMMAND="list_operators" PAST_BLOCKS=500 make wavs-middleware

script/start_all.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ set -e
55
if [ -f .env ] && grep -q '^TESTNET_RPC_URL=' .env; then
66
TESTNET_RPC_URL=$(grep -E '^TESTNET_RPC_URL=' .env | cut -d '=' -f2- | tr -d '"')
77
else
8-
rpc_url="https://holesky.drpc.org"
8+
rpc_url="https://ethereum-sepolia-rpc.publicnode.com"
99
echo "No TESTNET_RPC_URL found in .env, using default ${rpc_url}"
1010
TESTNET_RPC_URL=${rpc_url}
1111
fi
1212

1313
PORT=8545
14-
MIDDLEWARE_IMAGE=ghcr.io/lay3rlabs/wavs-middleware:0.4.0
14+
MIDDLEWARE_IMAGE=ghcr.io/lay3rlabs/wavs-middleware:0.5.0-beta.10
1515
FORK_RPC_URL=${FORK_RPC_URL:-"${TESTNET_RPC_URL}"}
1616
DEPLOY_ENV=$(sh ./script/get-deploy-status.sh)
1717

wavs.toml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ chain_id = "1"
3737
ws_endpoint = "wss://eth.drpc.org"
3838
http_endpoint = "https://eth.drpc.org"
3939

40-
[default.chains.evm.base]
41-
chain_id = "8453"
42-
ws_endpoint = "wss://base.drpc.org"
43-
http_endpoint = "https://base.drpc.org"
40+
# [default.chains.evm.base]
41+
# chain_id = "8453"
42+
# ws_endpoint = "wss://base.drpc.org"
43+
# http_endpoint = "https://base.drpc.org"
4444

45-
[default.chains.evm.optimism]
46-
chain_id = "10"
47-
ws_endpoint = "wss://optimism.drpc.org"
48-
http_endpoint = "https://optimism.drpc.org"
45+
# [default.chains.evm.optimism]
46+
# chain_id = "10"
47+
# ws_endpoint = "wss://optimism.drpc.org"
48+
# http_endpoint = "https://optimism.drpc.org"
4949

50-
[default.chains.evm.arbitrum]
51-
chain_id = "42161"
52-
ws_endpoint = "wss://arbitrum.drpc.org"
53-
http_endpoint = "https://arbitrum.drpc.org"
50+
# [default.chains.evm.arbitrum]
51+
# chain_id = "42161"
52+
# ws_endpoint = "wss://arbitrum.drpc.org"
53+
# http_endpoint = "https://arbitrum.drpc.org"
5454

5555
# Local / Testnet
5656
[default.chains.evm.local]
@@ -70,26 +70,26 @@ chain_id = "11155111"
7070
ws_endpoint = "wss://ethereum-sepolia-rpc.publicnode.com"
7171
http_endpoint = "https://ethereum-sepolia-rpc.publicnode.com"
7272

73-
[default.chains.evm.holesky]
74-
chain_id = "17000"
75-
ws_endpoint = "wss://ethereum-holesky-rpc.publicnode.com"
76-
http_endpoint = "https://ethereum-holesky-rpc.publicnode.com"
73+
# [default.chains.evm.holesky]
74+
# chain_id = "17000"
75+
# ws_endpoint = "wss://ethereum-holesky-rpc.publicnode.com"
76+
# http_endpoint = "https://ethereum-holesky-rpc.publicnode.com"
7777

78-
[default.chains.evm.holesky-fork]
79-
chain_id = "17000"
80-
ws_endpoint = "ws://localhost:8545"
81-
http_endpoint = "http://localhost:8545"
82-
poll_interval_ms = 7000
78+
# [default.chains.evm.holesky-fork]
79+
# chain_id = "17000"
80+
# ws_endpoint = "ws://localhost:8545"
81+
# http_endpoint = "http://localhost:8545"
82+
# poll_interval_ms = 7000
8383

8484
# == Cosmos chains ==
8585

86-
[default.chains.cosmos.neutron]
87-
chain_id = "pion-1"
88-
bech32_prefix = "neutron"
89-
rpc_endpoint = "https://rpc-falcron.pion-1.ntrn.tech"
90-
grpc_endpoint = "http://grpc-falcron.pion-1.ntrn.tech:80"
91-
gas_price = 0.0053
92-
gas_denom = "untrn"
86+
# [default.chains.cosmos.neutron]
87+
# chain_id = "pion-1"
88+
# bech32_prefix = "neutron"
89+
# rpc_endpoint = "https://rpc-falcron.pion-1.ntrn.tech"
90+
# grpc_endpoint = "http://grpc-falcron.pion-1.ntrn.tech:80"
91+
# gas_price = 0.0053
92+
# gas_denom = "untrn"
9393

9494
# ----------------------------
9595
# WAVS specific settings

0 commit comments

Comments
 (0)