Skip to content

Commit e488708

Browse files
ethenotethansamlaf
andauthored
chore: Remove MockRollup and test usage in favor of EigenDACertVerifierV1 (#1565)
* chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - fmt V1 deploy script && force creation of certverifier/out subdirectory * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - fix lint * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - add V2CertVerifier deploy to inabox env * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - fix fmt * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - log dump verifier cfg for debugging * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - update operator state retriever field reading into v2 verifier forge deploy cfg * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - dbug arithmetic overflow/underflow * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - dbug arithemtic overflow/underflow error #2 * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - use different architecture * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - bring back library logic * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - fix lint * chore(contracts&&inabox): Remove MockRollup and test usage in favor of V1CertVerifier - minor fixes * Update inabox/deploy/deploy.go Co-authored-by: Samuel Laferriere <[email protected]> --------- Co-authored-by: Samuel Laferriere <[email protected]>
1 parent 2f27d46 commit e488708

File tree

18 files changed

+742
-1859
lines changed

18 files changed

+742
-1859
lines changed

contracts/bindings/EigenDACertVerifierV1/binding.go

Lines changed: 592 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/bindings/IndexRegistry/binding.go

Lines changed: 0 additions & 837 deletions
This file was deleted.

contracts/bindings/MockRollup/binding.go

Lines changed: 0 additions & 432 deletions
This file was deleted.

contracts/compile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ contracts="PaymentVault \
3737
BN254 \
3838
EigenDAServiceManager \
3939
IEigenDAServiceManager \
40-
MockRollup \
4140
EjectionManager \
41+
EigenDACertVerifierV1 \
4242
EigenDACertVerifierV2 \
4343
EigenDAThresholdRegistry \
4444
EigenDARelayRegistry \

contracts/script/MockRollupDeployer.s.sol

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity =0.8.12;
3+
4+
import {EigenDACertVerifierV1} from "src/periphery/cert/v1/EigenDACertVerifierV1.sol";
5+
import {RegistryCoordinator} from "lib/eigenlayer-middleware/src/RegistryCoordinator.sol";
6+
import {IRegistryCoordinator} from "lib/eigenlayer-middleware/src/interfaces/IRegistryCoordinator.sol";
7+
import {OperatorStateRetriever} from "lib/eigenlayer-middleware/src/OperatorStateRetriever.sol";
8+
import {EigenDAServiceManager} from "src/core/EigenDAServiceManager.sol";
9+
import {IEigenDAServiceManager} from "src/core/interfaces/IEigenDAServiceManager.sol";
10+
import {EigenDAThresholdRegistry} from "src/core/EigenDAThresholdRegistry.sol";
11+
import {IEigenDAThresholdRegistry} from "src/core/interfaces/IEigenDAThresholdRegistry.sol";
12+
import {IEigenDABatchMetadataStorage} from "src/core/interfaces/IEigenDABatchMetadataStorage.sol";
13+
import "forge-std/Test.sol";
14+
import "forge-std/Script.sol";
15+
import "forge-std/StdJson.sol";
16+
import {EigenDATypesV1 as DATypesV1} from "src/core/libraries/v1/EigenDATypesV1.sol";
17+
18+
//forge script script/deploy/certverifier/CertVerifierDeployerV1.s.sol:CertVerifierDeployerV1 --sig "run(string, string)" <config.json> <output.json> --rpc-url $RPC --private-key $PRIVATE_KEY -vvvv --etherscan-api-key $ETHERSCAN_API_KEY --verify --broadcast
19+
contract CertVerifierDeployerV1 is Script, Test {
20+
address eigenDACertVerifier;
21+
22+
address eigenDAServiceManager;
23+
address eigenDAThresholdRegistry;
24+
25+
function run(string memory inputJSONFile, string memory outputJSONFile) external {
26+
string memory path = string.concat("./script/deploy/certverifier/config/", inputJSONFile);
27+
string memory data = vm.readFile(path);
28+
29+
bytes memory raw = stdJson.parseRaw(data, ".eigenDAServiceManager");
30+
eigenDAServiceManager = abi.decode(raw, (address));
31+
32+
raw = stdJson.parseRaw(data, ".eigenDAThresholdRegistry");
33+
eigenDAThresholdRegistry = abi.decode(raw, (address));
34+
35+
vm.startBroadcast();
36+
37+
eigenDACertVerifier = address(
38+
new EigenDACertVerifierV1(
39+
IEigenDAThresholdRegistry(eigenDAThresholdRegistry), IEigenDABatchMetadataStorage(eigenDAServiceManager)
40+
)
41+
);
42+
43+
vm.stopBroadcast();
44+
45+
console.log("Deployed new EigenDACertVerifierV1 at address: ", eigenDACertVerifier);
46+
47+
string memory outputPath = string.concat("./script/deploy/certverifier/output/", outputJSONFile);
48+
string memory parent_object = "parent object";
49+
string memory finalJson =
50+
vm.serializeAddress(parent_object, "eigenDACertVerifier", address(eigenDACertVerifier));
51+
vm.writeJson(finalJson, outputPath);
52+
}
53+
}

contracts/script/deploy/certverifier/CertVerifierDeployer.s.sol renamed to contracts/script/deploy/certverifier/CertVerifierDeployerV2.s.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import "forge-std/Script.sol";
1818
import "forge-std/StdJson.sol";
1919
import {EigenDATypesV1 as DATypesV1} from "src/core/libraries/v1/EigenDATypesV1.sol";
2020

21-
//forge script script/deploy/certverifier/CertVerifierDeployer.s.sol:CertVerifierDeployer --sig "run(string, string)" <config.json> <output.json> --rpc-url $RPC --private-key $PRIVATE_KEY -vvvv --etherscan-api-key $ETHERSCAN_API_KEY --verify --broadcast
22-
contract CertVerifierDeployer is Script, Test {
21+
//forge script script/deploy/certverifier/CertVerifierDeployerV2.s.sol:CertVerifierDeployerV2 --sig "run(string, string)" <config.json> <output.json> --rpc-url $RPC --private-key $PRIVATE_KEY -vvvv --etherscan-api-key $ETHERSCAN_API_KEY --verify --broadcast
22+
contract CertVerifierDeployerV2 is Script, Test {
2323
address eigenDACertVerifier;
2424

2525
address eigenDAServiceManager;
@@ -71,7 +71,7 @@ contract CertVerifierDeployer is Script, Test {
7171

7272
vm.stopBroadcast();
7373

74-
console.log("Deployed new EigenDACertVerifier at address: ", eigenDACertVerifier);
74+
console.log("Deployed new EigenDACertVerifierV2 at address: ", eigenDACertVerifier);
7575

7676
string memory outputPath = string.concat("./script/deploy/certverifier/output/", outputJSONFile);
7777
string memory parent_object = "parent object";

contracts/script/deploy/certverifier/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## EigenDA Cert Verfier Deployer
22

3-
This script can be used to deploy an EigenDACertVerifier contract with custom security thresholds and quorum numbers. The deployment should only be performed on Ethereum L1 testnet or mainnet environment and is not supported on L2s.
3+
This script can be used to deploy an EigenDACertVerifierV2 contract with custom security thresholds and quorum numbers. The deployment should only be performed on Ethereum L1 testnet or mainnet environment and is not supported on L2s.
44

55
### Config
66

@@ -30,7 +30,7 @@ Two sample configs are provided in the `config/` folder for preprod and testnet
3030
To deploy the contract, run the following command passing in the path to the config file, the output path, and appropriate keys
3131

3232
```bash
33-
forge script script/deploy/certverifier/CertVerifierDeployer.s.sol:CertVerifierDeployer --sig "run(string, string)" <config.json> <output.json> --rpc-url $RPC --private-key $PRIVATE_KEY -vvvv --etherscan-api-key $ETHERSCAN_API_KEY --verify --broadcast
33+
forge script script/deploy/certverifier/CertVerifierDeployerV2.s.sol:CertVerifierDeployerV2 --sig "run(string, string)" <config.json> <output.json> --rpc-url $RPC --private-key $PRIVATE_KEY -vvvv --etherscan-api-key $ETHERSCAN_API_KEY --verify --broadcast
3434
```
3535

3636
The deployment will output the address of the deployed contract to a json file in the `output/` folder named `certverifier_deployment_data.json`

contracts/script/deploy/certverifier/output/h.txt

Whitespace-only changes.

contracts/test/rollupV1/EigenDARollupUtils.sol

Lines changed: 0 additions & 237 deletions
This file was deleted.

0 commit comments

Comments
 (0)