-
Notifications
You must be signed in to change notification settings - Fork 124
/
IncredibleSquaringServiceManager.sol
53 lines (46 loc) · 2.26 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
52
53
// 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 entry point 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 `incredibleSquaringTaskManager`.
modifier onlyIncredibleSquaringTaskManager() {
require(
msg.sender == address(incredibleSquaringTaskManager),
"onlyIncredibleSquaringTaskManager: not from incredible squaring task manager"
);
_;
}
constructor(
IAVSDirectory _avsDirectory,
IRewardsCoordinator _rewardsCoordinator,
IRegistryCoordinator _registryCoordinator,
IStakeRegistry _stakeRegistry,
IIncredibleSquaringTaskManager _incredibleSquaringTaskManager
)
ServiceManagerBase(_avsDirectory, _rewardsCoordinator, _registryCoordinator, _stakeRegistry)
{
incredibleSquaringTaskManager = _incredibleSquaringTaskManager;
}
/// @notice This function initializes the contract's owner and the rewards initiator.
/// @param initialOwner The address to be set as the initial owner of the contract.
/// @param rewardsInitiator The address to be set as the rewards initiator for the contract.
function initialize(address initialOwner, address rewardsInitiator) external initializer {
__ServiceManagerBase_init(initialOwner, rewardsInitiator);
}
/// @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 is 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);
}
}