File tree Expand file tree Collapse file tree 2 files changed +25
-10
lines changed Expand file tree Collapse file tree 2 files changed +25
-10
lines changed Original file line number Diff line number Diff line change @@ -3,18 +3,13 @@ pragma solidity ^0.8.12;
3
3
4
4
import {IRegistryCoordinator} from "./interfaces/IRegistryCoordinator.sol " ;
5
5
import {ISocketRegistry} from "./interfaces/ISocketRegistry.sol " ;
6
+ import {SocketRegistryStorage} from "./SocketRegistryStorage.sol " ;
6
7
7
8
/**
8
9
* @title A `Registry` that keeps track of operator sockets.
9
10
* @author Layr Labs, Inc.
10
11
*/
11
- contract SocketRegistry is ISocketRegistry {
12
- /// @notice The address of the RegistryCoordinator
13
- address public immutable registryCoordinator;
14
-
15
- /// @notice A mapping from operator IDs to their sockets
16
- mapping (bytes32 => string ) public operatorIdToSocket;
17
-
12
+ contract SocketRegistry is ISocketRegistry , SocketRegistryStorage {
18
13
/// @notice A modifier that only allows the RegistryCoordinator to call a function
19
14
modifier onlyRegistryCoordinator () {
20
15
require (
@@ -35,9 +30,7 @@ contract SocketRegistry is ISocketRegistry {
35
30
36
31
constructor (
37
32
IRegistryCoordinator _registryCoordinator
38
- ) {
39
- registryCoordinator = address (_registryCoordinator);
40
- }
33
+ ) SocketRegistryStorage (address (_registryCoordinator)) {}
41
34
42
35
/// @notice sets the socket for an operator only callable by the RegistryCoordinator
43
36
function setOperatorSocket (
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: BUSL-1.1
2
+ pragma solidity ^ 0.8.12 ;
3
+
4
+ /**
5
+ * @title Storage contract for SocketRegistry
6
+ * @author Layr Labs, Inc.
7
+ */
8
+ contract SocketRegistryStorage {
9
+ /// @notice The address of the RegistryCoordinator
10
+ address public immutable registryCoordinator;
11
+
12
+ /// @notice A mapping from operator IDs to their sockets
13
+ mapping (bytes32 => string ) public operatorIdToSocket;
14
+
15
+ constructor (
16
+ address _registryCoordinator
17
+ ) {
18
+ registryCoordinator = _registryCoordinator;
19
+ }
20
+
21
+ uint256 [48 ] private __GAP;
22
+ }
You can’t perform that action at this time.
0 commit comments