-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b527bf2
commit 5564687
Showing
5 changed files
with
51 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,30 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.12; | ||
|
||
import {RegistryCoordinator} from "eigenlayer-middleware/src/RegistryCoordinator.sol"; | ||
import {SlashingRegistryCoordinator} from "eigenlayer-middleware/src/SlashingRegistryCoordinator.sol"; | ||
import {OperatorStateRetriever} from "eigenlayer-middleware/src/OperatorStateRetriever.sol"; | ||
|
||
import "../../src/MockAvsServiceManager.sol"; | ||
|
||
import {ConfigsReadWriter} from "./ConfigsReadWriter.sol"; | ||
import "forge-std/StdJson.sol"; | ||
|
||
struct MockAvsContracts { | ||
MockAvsServiceManager mockAvsServiceManager; | ||
RegistryCoordinator registryCoordinator; | ||
SlashingRegistryCoordinator registryCoordinator; | ||
OperatorStateRetriever operatorStateRetriever; | ||
} | ||
|
||
contract MockAvsContractsParser is ConfigsReadWriter { | ||
function _loadMockAvsDeployedContracts() internal view returns (MockAvsContracts memory) { | ||
// Eigenlayer contracts | ||
string memory mockAvsDeployedContracts = readOutput("mockavs_deployment_output"); | ||
MockAvsServiceManager mockAvsServiceManager = | ||
MockAvsServiceManager(stdJson.readAddress(mockAvsDeployedContracts, ".addresses.mockAvsServiceManager")); | ||
require( | ||
address(mockAvsServiceManager) != address(0), "MockAvsContractsParser: mockAvsServiceManager address is 0" | ||
); | ||
RegistryCoordinator registryCoordinator = | ||
RegistryCoordinator(stdJson.readAddress(mockAvsDeployedContracts, ".addresses.registryCoordinator")); | ||
SlashingRegistryCoordinator registryCoordinator = | ||
SlashingRegistryCoordinator(stdJson.readAddress(mockAvsDeployedContracts, ".addresses.registryCoordinator")); | ||
require(address(registryCoordinator) != address(0), "MockAvsContractsParser: registryCoordinator address is 0"); | ||
OperatorStateRetriever operatorStateRetriever = | ||
OperatorStateRetriever(stdJson.readAddress(mockAvsDeployedContracts, ".addresses.operatorStateRetriever")); | ||
require( | ||
address(operatorStateRetriever) != address(0), "MockAvsContractsParser: operatorStateRetriever address is 0" | ||
); | ||
|
||
return MockAvsContracts(mockAvsServiceManager, registryCoordinator, operatorStateRetriever); | ||
return MockAvsContracts(registryCoordinator, operatorStateRetriever); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.