@@ -5,6 +5,15 @@ import {OperatorSet} from "../libraries/OperatorSetLib.sol";
55import {IReleaseManager} from "./IReleaseManager.sol " ;
66import {IAllocationManager} from "./IAllocationManager.sol " ;
77
8+ interface IComputeRegistryTypes {
9+ /// @notice The Terms of Service signature
10+ struct TOSSignature {
11+ address signer;
12+ bytes32 tosHash;
13+ bytes signature;
14+ }
15+ }
16+
817interface IComputeRegistryErrors {
918 /// @dev Thrown when the provided signature does not match the expected Terms of Service signature
1019 error InvalidTOSSignature ();
@@ -22,8 +31,12 @@ interface IComputeRegistryErrors {
2231interface IComputeRegistryEvents {
2332 /// @notice Emitted when an operator set is registered for compute
2433 /// @param operatorSet The operator set that was registered
25- /// @param tosSignature The signature of the Terms of Service
26- event OperatorSetRegistered (OperatorSet indexed operatorSet , bytes tosSignature );
34+ /// @param signer The address that signed the Terms of Service
35+ /// @param tosHash The hash of the Terms of Service
36+ /// @param signature The signature of the Terms of Service
37+ event OperatorSetRegistered (
38+ OperatorSet indexed operatorSet , address indexed signer , bytes32 indexed tosHash , bytes signature
39+ );
2740
2841 /// @notice Emitted when an operator set is deregistered from compute
2942 /// @param operatorSet The operator set that was deregistered
@@ -34,7 +47,7 @@ interface IComputeRegistryEvents {
3447 event TosHashSet (bytes32 tosHash );
3548}
3649
37- interface IComputeRegistry is IComputeRegistryErrors , IComputeRegistryEvents {
50+ interface IComputeRegistry is IComputeRegistryErrors , IComputeRegistryEvents , IComputeRegistryTypes {
3851 /**
3952 *
4053 * WRITE FUNCTIONS
@@ -44,12 +57,12 @@ interface IComputeRegistry is IComputeRegistryErrors, IComputeRegistryEvents {
4457 /**
4558 * @notice Registers an operator set for compute services
4659 * @param operatorSet The operator set to register
47- * @param tosSignature The EIP-712 signature of the Terms of Service
60+ * @param signature The EIP-712 signature of the Terms of Service
4861 * @dev Requires the caller to have permission to call on behalf of the operatorSet.avs
4962 * @dev The operator set must have at least one release available in the ReleaseManager
5063 * @dev The signature must be a valid EIP-712 signature of the Terms of Service with expiry set to MAX_EXPIRY
5164 */
52- function registerForCompute (OperatorSet calldata operatorSet , bytes memory tosSignature ) external ;
65+ function registerForCompute (OperatorSet calldata operatorSet , bytes memory signature ) external ;
5366
5467 /**
5568 * @notice Deregisters an operator set from compute services
@@ -116,13 +129,13 @@ interface IComputeRegistry is IComputeRegistryErrors, IComputeRegistryEvents {
116129 ) external view returns (bool );
117130
118131 /**
119- * @notice Returns the Terms of Service signature for a registered operator set
120- * @param operatorSetKey The key of the operator set to query
132+ * @notice Returns the Terms of Service signature for an operator set
133+ * @param operatorSet The operator set to query
121134 * @return The Terms of Service signature
122135 */
123- function operatorSetTosSignature (
124- bytes32 operatorSetKey
125- ) external view returns (bytes memory );
136+ function getOperatorSetTosSignature (
137+ OperatorSet memory operatorSet
138+ ) external view returns (TOSSignature memory );
126139
127140 /**
128141 * @notice Calculates the EIP-712 digest hash that should be signed
0 commit comments