mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
## Summary This PR remove the middlewares contracts from eigen layer. Instead we are planning to use the eigne layer contract directly. It also removes the tests related to the middleware slasher code and the mock contract used in it. ## Motivation When slashing an operator in the Dathaven we are going through the substrate slashing pallet already implemented. It already allow to configure a slashing window and/or to cancel a slashing. In the future it will also be compatible with a government pallet. This part of code is therefore redundant. For the same reason we remove the tests because we are not using the slashing middleware contracts. ## What changed * Remove the slasher middleware files * Remove the tests related to the middleware slasher file
36 lines
1.2 KiB
Solidity
36 lines
1.2 KiB
Solidity
// SPDX-License-Identifier: UNLICENSED
|
|
pragma solidity ^0.8.27;
|
|
|
|
// Testing imports
|
|
import {Script} from "forge-std/Script.sol";
|
|
|
|
// DataHaven imports
|
|
import {DataHavenServiceManager} from "../../src/DataHavenServiceManager.sol";
|
|
import {RewardsRegistry} from "../../src/middleware/RewardsRegistry.sol";
|
|
|
|
/**
|
|
* @title DHScriptStorage
|
|
* @notice This contract is a utility for scripts that need to interact with DataHaven contracts.
|
|
*/
|
|
contract DHScriptStorage is Script {
|
|
// DataHaven Contract declarations
|
|
DataHavenServiceManager public serviceManager;
|
|
RewardsRegistry public rewardsRegistry;
|
|
|
|
/**
|
|
* @notice Loads the DataHaven contracts from the deployment file.
|
|
*/
|
|
function _loadDHContracts(
|
|
string memory network
|
|
) internal {
|
|
// Load the deployment file
|
|
string memory deploymentFile =
|
|
vm.readFile(string.concat("./deployments/", network, ".json"));
|
|
|
|
// Store the contract addresses
|
|
serviceManager =
|
|
DataHavenServiceManager(vm.parseJsonAddress(deploymentFile, ".ServiceManager"));
|
|
rewardsRegistry =
|
|
RewardsRegistry(payable(vm.parseJsonAddress(deploymentFile, ".RewardsRegistry")));
|
|
}
|
|
}
|