22pragma solidity ^ 0.8.27 ;
33
44import "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol " ;
5- import "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol " ;
65
76import "../mixins/PermissionControllerMixin.sol " ;
87import "../mixins/SignatureUtilsMixin.sol " ;
@@ -15,13 +14,7 @@ import "./ComputeRegistryStorage.sol";
1514 * @notice This contract handles permissionless (de)registration of AVS operator sets to the EigenCompute Operator.
1615 * It enables AVSs to easily access managed operator infrastructure as part of EigenCloud for quick bootstrapping.
1716 */
18- contract ComputeRegistry is
19- Initializable ,
20- OwnableUpgradeable ,
21- ComputeRegistryStorage ,
22- PermissionControllerMixin ,
23- SignatureUtilsMixin
24- {
17+ contract ComputeRegistry is Initializable , ComputeRegistryStorage , PermissionControllerMixin , SignatureUtilsMixin {
2518 using OperatorSetLib for OperatorSet;
2619
2720 /**
@@ -52,32 +45,23 @@ contract ComputeRegistry is
5245 * @param _releaseManager The ReleaseManager contract address
5346 * @param _allocationManager The AllocationManager contract address
5447 * @param _permissionController The PermissionController contract address
48+ * @param _tosHash The immutable hash of the Terms of Service
5549 * @param _version The semantic version of the contract
5650 */
5751 constructor (
5852 IReleaseManager _releaseManager ,
5953 IAllocationManager _allocationManager ,
6054 IPermissionController _permissionController ,
55+ bytes32 _tosHash ,
6156 string memory _version
6257 )
63- ComputeRegistryStorage (_releaseManager, _allocationManager)
58+ ComputeRegistryStorage (_releaseManager, _allocationManager, _tosHash )
6459 PermissionControllerMixin (_permissionController)
6560 SignatureUtilsMixin (_version)
6661 {
6762 _disableInitializers ();
6863 }
6964
70- /**
71- * @notice Initializes the contract
72- * @param _owner The owner of the contract
73- * @param _tosHash The hash of the Terms of Service that AVS operators must sign
74- */
75- function initialize (address _owner , bytes32 _tosHash ) external initializer {
76- __Ownable_init ();
77- transferOwnership (_owner);
78- _setTosHash (_tosHash);
79- }
80-
8165 /**
8266 *
8367 * EXTERNAL FUNCTIONS
@@ -110,9 +94,9 @@ contract ComputeRegistry is
11094 // Register the operator set
11195 isOperatorSetRegistered[operatorSetKey] = true ;
11296 _operatorSetTosSignature[operatorSetKey] =
113- TOSSignature ({signer: msg .sender , tosHash: tosHash , signature: signature});
97+ TOSSignature ({signer: msg .sender , tosHash: TOS_HASH , signature: signature});
11498
115- emit OperatorSetRegistered (operatorSet, msg .sender , tosHash , signature);
99+ emit OperatorSetRegistered (operatorSet, msg .sender , TOS_HASH , signature);
116100 }
117101
118102 /**
@@ -130,38 +114,9 @@ contract ComputeRegistry is
130114 emit OperatorSetDeregistered (operatorSet);
131115 }
132116
133- /**
134- * @notice Updates the Terms of Service hash
135- * @param _tosHash The new Terms of Service hash
136- * @dev Only callable by the contract owner
137- */
138- function setTosHash (
139- bytes32 _tosHash
140- ) external onlyOwner {
141- _setTosHash (_tosHash);
142- }
143-
144- /**
145- *
146- * INTERNAL FUNCTIONS
147- *
148- */
149-
150- /**
151- * @dev Internal function to set the Terms of Service hash
152- * @param _tosHash The new Terms of Service hash
153- */
154- function _setTosHash (
155- bytes32 _tosHash
156- ) internal {
157- tosHash = _tosHash;
158- emit TosHashSet (_tosHash);
159- }
160-
161117 /**
162118 *
163119 * VIEW FUNCTIONS
164- *
165120 */
166121
167122 /**
@@ -188,7 +143,7 @@ contract ComputeRegistry is
188143 keccak256 (
189144 abi.encode (
190145 TOS_AGREEMENT_TYPEHASH,
191- tosHash ,
146+ TOS_HASH ,
192147 operatorSet.avs,
193148 operatorSet.id,
194149 signer,
0 commit comments