forked from Layr-Labs/incredible-squaring-avs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IncredibleSquaringServiceManager.sol
43 lines (37 loc) · 1.69 KB
/
IncredibleSquaringServiceManager.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "@eigenlayer/contracts/libraries/BytesLib.sol";
import "./IIncredibleSquaringTaskManager.sol";
import "@eigenlayer-middleware/src/ServiceManagerBase.sol";
/**
* @title Primary entrypoint for procuring services from IncredibleSquaring.
* @author Layr Labs, Inc.
*/
contract IncredibleSquaringServiceManager is ServiceManagerBase {
using BytesLib for bytes;
IIncredibleSquaringTaskManager
public immutable incredibleSquaringTaskManager;
/// @notice when applied to a function, ensures that the function is only callable by the `registryCoordinator`.
modifier onlyIncredibleSquaringTaskManager() {
require(
msg.sender == address(incredibleSquaringTaskManager),
"onlyIncredibleSquaringTaskManager: not from credible squaring task manager"
);
_;
}
constructor(
IBLSRegistryCoordinatorWithIndices _registryCoordinator,
ISlasher _slasher,
IIncredibleSquaringTaskManager _incredibleSquaringTaskManager
) ServiceManagerBase(_registryCoordinator, _slasher) {
incredibleSquaringTaskManager = _incredibleSquaringTaskManager;
}
/// @notice Called in the event of challenge resolution, in order to forward a call to the Slasher, which 'freezes' the `operator`.
/// @dev The Slasher contract is under active development and its interface expected to change.
/// We recommend writing slashing logic without integrating with the Slasher at this point in time.
function freezeOperator(
address operatorAddr
) external override onlyIncredibleSquaringTaskManager {
// slasher.freezeOperator(operatorAddr);
}
}