Skip to content

Commit c558283

Browse files
committed
feat: storage gap on socket registry
1 parent ce65f85 commit c558283

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

src/SocketRegistry.sol

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,13 @@ pragma solidity ^0.8.12;
33

44
import {IRegistryCoordinator} from "./interfaces/IRegistryCoordinator.sol";
55
import {ISocketRegistry} from "./interfaces/ISocketRegistry.sol";
6+
import {SocketRegistryStorage} from "./SocketRegistryStorage.sol";
67

78
/**
89
* @title A `Registry` that keeps track of operator sockets.
910
* @author Layr Labs, Inc.
1011
*/
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 {
1813
/// @notice A modifier that only allows the RegistryCoordinator to call a function
1914
modifier onlyRegistryCoordinator() {
2015
require(
@@ -35,9 +30,7 @@ contract SocketRegistry is ISocketRegistry {
3530

3631
constructor(
3732
IRegistryCoordinator _registryCoordinator
38-
) {
39-
registryCoordinator = address(_registryCoordinator);
40-
}
33+
) SocketRegistryStorage(address(_registryCoordinator)) {}
4134

4235
/// @notice sets the socket for an operator only callable by the RegistryCoordinator
4336
function setOperatorSocket(

src/SocketRegistryStorage.sol

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
}

0 commit comments

Comments
 (0)