Skip to content

Commit 9317ef5

Browse files
authored
Merge branch 'testnet' into fix/add-hoodi-support-l2-example
2 parents 49f8610 + ebb110c commit 9317ef5

File tree

6 files changed

+22
-19
lines changed

6 files changed

+22
-19
lines changed

examples/verify/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
RPC_URL=<rpc_url>
22
PRIVATE_KEY=<private_key>
3-
ALIGNED_DEPLOYMENT_OUTPUT=../../contracts/script/output/holesky/alignedlayer_deployment_output.json # Path to the deployment output file from the aligned layer, relative to verify directory
3+
ALIGNED_DEPLOYMENT_OUTPUT=../../contracts/script/output/hoodi/alignedlayer_deployment_output.json # Path to the deployment output file from the aligned layer, relative to verify directory

examples/verify/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ First create a `.env` file in the root directory of the project with the followi
2020
| Variable | Value |
2121
|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
2222
| `PRIVATE_KEY` | Your ethereum private key |
23-
| `RPC_URL` | Your ethereum RPC url. You can use public node: https://ethereum-holesky-rpc.publicnode.com |
24-
| `ALIGNED_DEPLOYMENT_OUTPUT` | Path to aligned layer deployment output. This is needed to get service manager address. You can get it from https://github.com/yetanotherco/aligned_layer/blob/main/contracts/script/output/holesky/alignedlayer_deployment_output.json |
23+
| `RPC_URL` | Your ethereum RPC url. You can use public node: https://ethereum-hoodi-rpc.publicnode.com |
24+
| `ALIGNED_DEPLOYMENT_OUTPUT` | Path to aligned layer deployment output. This is needed to get service manager address. You can get it from https://github.com/yetanotherco/aligned_layer/blob/main/contracts/script/output/hoodi/alignedlayer_deployment_output.json |
2525

2626
Then, you can deploy the contract by running the following command:
2727

@@ -49,7 +49,7 @@ Replace `[SENDER_ADDRESS]` with the address of the `BatcherPaymentService` contr
4949
This will output the encoded call. You can then use this encoded call to check your submitted proof with the associated data is verified in Ethereum by running the following command:
5050

5151
```bash
52-
curl -X POST http://localhost:8545 \
52+
curl -X POST <RPC_URL> \
5353
-H "Content-Type: application/json" \
5454
-d '{
5555
"jsonrpc": "2.0",
@@ -62,16 +62,16 @@ curl -X POST http://localhost:8545 \
6262
}'
6363
```
6464

65-
Replace `<CONTRACT_ADDRESS>` with the address of the contract you deployed earlier (or `0x58F280BeBE9B34c9939C3C39e0890C81f163B623` for Aligned ServiceManager in Holesky), `<CALLDATA>` with the encoded call,
66-
and `<RPC_URL>` with the RPC URL of the blockchain you are using.
65+
Replace `<CONTRACT_ADDRESS>` with the address of the contract you deployed earlier (or `0x87CD431F160e88EC34fA48EC6F6cF7F2C0E8248c` for Aligned ServiceManager in Hoodi), `<CALLDATA>` with the encoded call,
66+
and `<RPC_URL>` with the RPC URL of the blockchain you are using (`https://ethereum-hoodi-rpc.publicnode.com` for Hoodi).
6767

6868
The output data should be something like this:
6969

7070
```json
7171
{
7272
"jsonrpc":"2.0",
7373
"result":"0x0000000000000000000000000000000000000000000000000000000000000001",
74-
"id":q
74+
"id":1
7575
}
7676
```
7777

@@ -96,9 +96,9 @@ Replace `[CONTRACT_ADDRESS]`, `[PATH_TO_ALIGNED_VERIFICATION_DATA]` and `[SENDER
9696
#### Example Command
9797

9898
```bash
99-
python3 verify.py --contract-address 0x58F280BeBE9B34c9939C3C39e0890C81f163B623 --aligned-verification-data ../../aligned_verification_data/b8c17406_4.json --sender-address 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
99+
python3 verify.py --contract-address 0x87CD431F160e88EC34fA48EC6F6cF7F2C0E8248c --aligned-verification-data ../../aligned_verification_data/b8c17406_4.json --sender-address 0x041af25Fce2413570aaa0029D36DeA1eFdeff083
100100
```
101101

102-
In this case, `--contract-address` is the address of the `AlignedLayerServiceManager` and `--sender-address` is the address of the `BatcherPaymentService` in Holesky Testnet.
102+
In this case, `--contract-address` is the address of the `AlignedLayerServiceManager` and `--sender-address` is the address of the `BatcherPaymentService` in Hoodi Testnet.
103103

104104
You need to replace the `--aligned-verification-data` with the path to the JSON file containing the verification data. This is the output when submitting a proof.

examples/verify/verify.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
def main():
77
parser = ArgumentParser()
8-
parser.add_argument('--rpc-url', default='https://ethereum-holesky-rpc.publicnode.com',
9-
help='RPC URL (default: https://ethereum-holesky-rpc.publicnode.com)')
8+
parser.add_argument('--rpc-url', default='https://ethereum-hoodi-rpc.publicnode.com',
9+
help='RPC URL (default: https://ethereum-hoodi-rpc.publicnode.com)')
1010
parser.add_argument('--aligned-verification-data', help='Path to JSON file with the verification data',
1111
required=True)
1212
parser.add_argument('--contract-address', help='Verifier Contract address', required=True)

examples/zkquiz/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ deploy_verifier:
66
deploy_verifier_devnet:
77
. ./contracts/.devnet.env && . ./contracts/deploy.sh
88

9-
CONTRACT_ADDRESS=0x1adFb00CC74Ff26bB05419953006c66B1abFCD45
9+
CONTRACT_ADDRESS=0xAD607c7DA33BDD310307E57830bf426b16f32AD1
1010
STAGE_CONTRACT_ADDRESS=0xc4da6fcfa317eaf166b09ef276c0bdf43648a65f
11-
RPC_URL=https://ethereum-holesky-rpc.publicnode.com
11+
RPC_URL=https://ethereum-hoodi-rpc.publicnode.com
1212

1313
answer_quiz:
1414
@cd quiz/script && cargo run -r -- \
1515
--keystore-path $(KEYSTORE_PATH) \
1616
--rpc-url $(RPC_URL) \
17-
--network holesky \
17+
--network hoodi \
1818
--verifier-contract-address $(CONTRACT_ADDRESS)
1919

2020
answer_quiz_stage:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
RPC_URL=<rpc_url>
22
PRIVATE_KEY=<private_key>
3-
ALIGNED_SERVICE_MANAGER_ADDRESS=<aligned_service_manager_addr># 0x58F280BeBE9B34c9939C3C39e0890C81f163B623 for Holesky
4-
BATCHER_PAYMENT_SERVICE_ADDRESS=<batcher_payment_service_addr># 0x815aeCA64a974297942D2Bbf034ABEe22a38A003
3+
ALIGNED_SERVICE_MANAGER_ADDRESS=<aligned_service_manager_addr># 0x87CD431F160e88EC34fA48EC6F6cF7F2C0E8248c for Hoodi
4+
BATCHER_PAYMENT_SERVICE_ADDRESS=<batcher_payment_service_addr># 0x041af25Fce2413570aaa0029D36DeA1eFdeff083
55
ETHERSCAN_API_KEY=<etherscan_api_key>

examples/zkquiz/quiz/script/src/main.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct Args {
2424
#[arg(
2525
short,
2626
long,
27-
default_value = "https://ethereum-holesky-rpc.publicnode.com"
27+
default_value = "https://ethereum-hoodi-rpc.publicnode.com"
2828
)]
2929
rpc_url: String,
3030
#[clap(flatten)]
@@ -38,6 +38,7 @@ enum NetworkNameArg {
3838
Devnet,
3939
Holesky,
4040
HoleskyStage,
41+
Hoodi,
4142
Mainnet,
4243
}
4344

@@ -49,9 +50,10 @@ impl FromStr for NetworkNameArg {
4950
"devnet" => Ok(NetworkNameArg::Devnet),
5051
"holesky" => Ok(NetworkNameArg::Holesky),
5152
"holesky-stage" => Ok(NetworkNameArg::HoleskyStage),
53+
"hoodi" => Ok(NetworkNameArg::Hoodi),
5254
"mainnet" => Ok(NetworkNameArg::Mainnet),
5355
_ => Err(
54-
"Unknown network. Possible values: devnet, holesky, holesky-stage, mainnet"
56+
"Unknown network. Possible values: devnet, holesky, holesky-stage, mainnet, hoodi"
5557
.to_string(),
5658
),
5759
}
@@ -64,7 +66,7 @@ struct NetworkArg {
6466
name = "The working network's name",
6567
long = "network",
6668
default_value = "devnet",
67-
help = "[possible values: devnet, holesky, holesky-stage, mainnet]"
69+
help = "[possible values: devnet, holesky, holesky-stage, mainnet, hoodi]",
6870
)]
6971
network: Option<NetworkNameArg>,
7072
#[arg(
@@ -115,6 +117,7 @@ impl From<NetworkArg> for Network {
115117
Some(NetworkNameArg::Devnet) => Network::Devnet,
116118
Some(NetworkNameArg::Holesky) => Network::Holesky,
117119
Some(NetworkNameArg::HoleskyStage) => Network::HoleskyStage,
120+
Some(NetworkNameArg::Hoodi) => Network::Hoodi,
118121
Some(NetworkNameArg::Mainnet) => Network::Mainnet,
119122
}
120123
}

0 commit comments

Comments
 (0)