-
Notifications
You must be signed in to change notification settings - Fork 0
/
IncredibleSquaringServiceManager.sol
51 lines (45 loc) · 1.88 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
44
45
46
47
48
49
50
51
// 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(
IAVSDirectory _avsDirectory,
IRegistryCoordinator _registryCoordinator,
IStakeRegistry _stakeRegistry,
IIncredibleSquaringTaskManager _incredibleSquaringTaskManager
)
ServiceManagerBase(
_avsDirectory,
IPaymentCoordinator(address(0)), // inc-sq doesn't need to deal with payments
_registryCoordinator,
_stakeRegistry
)
{
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 onlyIncredibleSquaringTaskManager {
// slasher.freezeOperator(operatorAddr);
}
}