Skip to content

Commit de4dcf2

Browse files
committed
update scripts
1 parent bf17f44 commit de4dcf2

File tree

4 files changed

+68
-4
lines changed

4 files changed

+68
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ docs/
1212

1313
# Dotenv file
1414
.env
15+
src/interface/.DS_Store

script/StartNoRestakingValidators.s.sol

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ interface IInstitutionalVault {
99
function startNonRestakingValidators(
1010
bytes[] calldata pubKeys,
1111
bytes[] calldata signatures,
12+
uint256[] calldata amountsInGwei,
1213
bytes32[] calldata depositDataRoots
1314
) external;
1415
}
1516

16-
// forge script script/StartRestakingValidators.s.sol:StartRestakingValidators --rpc-url=$HOLESKY_RPC_URL --account institutional-deployer-testnet -vvvv --sig "run(address,string)" 0x205A6BCF458a40E1a30a000166c793Ec54b0d9D5 example
17+
// forge script script/StartNoRestakingValidators.s.sol:StartNoRestakingValidators --rpc-url=$HOLESKY_RPC_URL --account institutional-deployer-testnet -vvvv --sig "run(address,string)" 0x205A6BCF458a40E1a30a000166c793Ec54b0d9D5 example
1718
// add --broadcast to broadcast the transaction
1819
contract StartNoRestakingValidators is Script {
1920
using stdJson for string;
@@ -42,7 +43,7 @@ contract StartNoRestakingValidators is Script {
4243
vm.startBroadcast();
4344

4445
string memory root = vm.projectRoot();
45-
string memory path = string.concat(root, "/validator_deposit_data/0x01/", depositFileName, ".json");
46+
string memory path = string.concat(root, "/validator_deposit_data/0x02/", depositFileName, ".json");
4647

4748
console.log("Path:", path);
4849

@@ -54,14 +55,16 @@ contract StartNoRestakingValidators is Script {
5455
bytes[] memory pubKeys = new bytes[](depositData.length);
5556
bytes[] memory signatures = new bytes[](depositData.length);
5657
bytes32[] memory depositDataRoots = new bytes32[](depositData.length);
58+
uint256[] memory amountsInGwei = new uint256[](depositData.length);
5759

5860
for (uint256 i = 0; i < depositData.length; i++) {
5961
pubKeys[i] = vm.parseBytes(depositData[i].pubkey);
62+
amountsInGwei[i] = depositData[i].amount;
6063
signatures[i] = vm.parseBytes(depositData[i].signature);
6164
depositDataRoots[i] = vm.parseBytes32(depositData[i].deposit_data_root);
6265
}
6366

64-
IInstitutionalVault(institutionalVaultProxy).startNonRestakingValidators(pubKeys, signatures, depositDataRoots);
67+
IInstitutionalVault(institutionalVaultProxy).startNonRestakingValidators(pubKeys, signatures, amountsInGwei, depositDataRoots);
6568

6669
vm.stopBroadcast();
6770
}

script/StartRestakingValidators.s.sol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ interface IInstitutionalVault {
99
function startRestakingValidators(
1010
bytes[] calldata pubKeys,
1111
bytes[] calldata signatures,
12+
uint256[] calldata amountsInGwei,
1213
bytes32[] calldata depositDataRoots
1314
) external;
1415
}
@@ -55,14 +56,16 @@ contract StartRestakingValidators is Script {
5556
bytes[] memory pubKeys = new bytes[](depositData.length);
5657
bytes[] memory signatures = new bytes[](depositData.length);
5758
bytes32[] memory depositDataRoots = new bytes32[](depositData.length);
59+
uint256[] memory amountsInGwei = new uint256[](depositData.length);
5860

5961
for (uint256 i = 0; i < depositData.length; i++) {
6062
pubKeys[i] = vm.parseBytes(depositData[i].pubkey);
63+
amountsInGwei[i] = depositData[i].amount;
6164
signatures[i] = vm.parseBytes(depositData[i].signature);
6265
depositDataRoots[i] = vm.parseBytes32(depositData[i].deposit_data_root);
6366
}
6467

65-
IInstitutionalVault(institutionalVaultProxy).startRestakingValidators(pubKeys, signatures, depositDataRoots);
68+
IInstitutionalVault(institutionalVaultProxy).startRestakingValidators(pubKeys, signatures, amountsInGwei, depositDataRoots);
6669

6770
vm.stopBroadcast();
6871
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[
2+
{
3+
"pubkey": "a6c3074a9a98a9aaff195ad44ddb529656be73e2a853a2d4d4859098c6f0d596c9884e2486c12ffe45a3c863f9b47994",
4+
"withdrawal_credentials": "020000000000000000000000b1464d5a1cfe827968558d60e952652b47221a76",
5+
"amount": 1920000000000,
6+
"signature": "b7503b27f16773130d375236ecb8caf66c765c159e3b8960aca17cbd57bfcf634089dc1aee975df5db26880fa7da295d0cfd58146100658e9948ce5a1b5a5117e5f52c80296b47e27ead5d2fa652cd4f623c02f57b1d98bb8bbd0b27b9a0a2c8",
7+
"deposit_message_root": "2bb62b9a5c5fd5cda064f74124ad4526ca1a9e0bd898735f8433afb3a12b7b43",
8+
"deposit_data_root": "204f339464d771de946d9e0e10b2ff29f81a424a41f448377701e43a39f54313",
9+
"fork_version": "00000000",
10+
"network_name": "mainnet",
11+
"deposit_cli_version": "1.2.2"
12+
},
13+
{
14+
"pubkey": "9175275af28e056dfce234e0c5939f19d311e93fd98cf67acea6e1156da31461316d075ceb92de82c7171e36516944fa",
15+
"withdrawal_credentials": "020000000000000000000000b1464d5a1cfe827968558d60e952652b47221a76",
16+
"amount": 1920000000000,
17+
"signature": "a676742abf773678d0da13f839c56f1e098e71714c0a9a9d8d66dbd5b5965c108f8a594234d7ad8113712495a25807f20a8dd1b80316d21b845c64ed4b61a5d47e7a876e2d0d1ed023b85af2114a817486466edbe08163871177d6ef2284e08d",
18+
"deposit_message_root": "abb26c067aa79fcdb309f11d7e75b577f051e520d1904f88dd1cab0397843dd1",
19+
"deposit_data_root": "21fa3ceaef69c99344358d04f366f52668a1fd4b5880783872bbfa4b62635d95",
20+
"fork_version": "00000000",
21+
"network_name": "mainnet",
22+
"deposit_cli_version": "1.2.2"
23+
},
24+
{
25+
"pubkey": "835cc466e23564babb02304a53cc8687714c94adfb53799efe5f103518957e5bff6abff76b3bb69b648bfe47666c9ede",
26+
"withdrawal_credentials": "020000000000000000000000b1464d5a1cfe827968558d60e952652b47221a76",
27+
"amount": 1920000000000,
28+
"signature": "a75a776474cdf8fbcc3126da872d741fe748440429febd98e0478f7f7736383c11e3dd7ce291fd37891b257d941a3d910436e38a11436c8a6659f658df0c26d4cdd7d503ea0885df3bc371270d026f859eb3c3b87401544609766dbfd9048940",
29+
"deposit_message_root": "52ceeae38951249a6060e3839d11e43a31b200659e51093a230c2eca13b02547",
30+
"deposit_data_root": "b910d073e3e8077c110782e003d7a2cc7a09e37103b74c47627f12ce915fa18e",
31+
"fork_version": "00000000",
32+
"network_name": "mainnet",
33+
"deposit_cli_version": "1.2.2"
34+
},
35+
{
36+
"pubkey": "ac13769cd564abffd5eb4f19d8698443ac9d1601ab9d3a500499608e0283ce2c79d8755da5f72347503f3658a13bc493",
37+
"withdrawal_credentials": "020000000000000000000000b1464d5a1cfe827968558d60e952652b47221a76",
38+
"amount": 1920000000000,
39+
"signature": "a251c525c7fb3cfebe2c1af052cfd36de203bcab109953f20dde9be7b21cc941ca03200b23cde1ac9a614449b30c368706d9a328e2741d3c89a9f1de68cbac8bf05299706f416d8a0e5e7d910487297cb36313db424f2354d04d64b6c21faa95",
40+
"deposit_message_root": "3c152c7298ddd3ebdaac1d8e778e18f9f8b4b9a000a64a285566c6f802fae57c",
41+
"deposit_data_root": "909a47c0e9115b113cce0a70f1b2376f27a042c0e3c5b27adf022975f1ae06b7",
42+
"fork_version": "00000000",
43+
"network_name": "mainnet",
44+
"deposit_cli_version": "1.2.2"
45+
},
46+
{
47+
"pubkey": "80ab22e30fed38a821ec70e08a395fd624518b2335fab5fa087ff4130e89ae49490b9466b4627dcd6abdaee4588d47bc",
48+
"withdrawal_credentials": "020000000000000000000000b1464d5a1cfe827968558d60e952652b47221a76",
49+
"amount": 1920000000000,
50+
"signature": "94bd81eada85566f8155a5b6809f2290c02ae6a529cfef66dcfb461cf1408f2222b499b4375f180eaa8b09c12dde2d0c18f69e249c3b7a3e3019a3ad0aedb28a45f059327761ee45f71a844c4b4ba6558fdd3d0f4f9288caa524ac404721ea3c",
51+
"deposit_message_root": "0cf494beb6d4200f8c9507e20ec65664083353852b5228e410558b765a196b64",
52+
"deposit_data_root": "6f95a5ed503403a639004e71bb78f7369bcdcf1d9e2f48a78ee3b166bee1f1e4",
53+
"fork_version": "00000000",
54+
"network_name": "mainnet",
55+
"deposit_cli_version": "1.2.2"
56+
}
57+
]

0 commit comments

Comments
 (0)