Skip to content

Commit b1211b4

Browse files
0xClandestineypatil12
authored andcommitted
fix(I-06): remove many unused imports (#513)
**Motivation:** Middleware contains tons of unused imports, which reduces code clarity. **Modifications:** - Used `forge lint src --only-lint unused-import` to remove all unused imports from `src`. **Result:** Improved clarity.
1 parent ed04a94 commit b1211b4

25 files changed

+30
-108
lines changed

script/utils/OperatorSetUpgradeLib.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
pragma solidity ^0.8.0;
33
// Deploy L2AVS proxy
44

5-
import {TransparentUpgradeableProxy} from
6-
"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
75
import {ITransparentUpgradeableProxy} from
86
"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
97
import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";

src/RegistryCoordinator.sol

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
11
// SPDX-License-Identifier: BUSL-1.1
22
pragma solidity ^0.8.27;
33

4-
import {IPauserRegistry} from "eigenlayer-contracts/src/contracts/interfaces/IPauserRegistry.sol";
5-
import {
6-
IAllocationManager,
7-
OperatorSet
8-
} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol";
9-
import {ISignatureUtilsMixin} from
10-
"eigenlayer-contracts/src/contracts/interfaces/ISignatureUtilsMixin.sol";
114
import {ISemVerMixin} from "eigenlayer-contracts/src/contracts/interfaces/ISemVerMixin.sol";
125
import {SemVerMixin} from "eigenlayer-contracts/src/contracts/mixins/SemVerMixin.sol";
13-
import {IBLSApkRegistry, IBLSApkRegistryTypes} from "./interfaces/IBLSApkRegistry.sol";
14-
import {IStakeRegistry} from "./interfaces/IStakeRegistry.sol";
15-
import {IIndexRegistry} from "./interfaces/IIndexRegistry.sol";
16-
import {IServiceManager} from "./interfaces/IServiceManager.sol";
6+
import {IBLSApkRegistryTypes} from "./interfaces/IBLSApkRegistry.sol";
177
import {
188
IRegistryCoordinator, IRegistryCoordinatorTypes
199
} from "./interfaces/IRegistryCoordinator.sol";
20-
import {ISocketRegistry} from "./interfaces/ISocketRegistry.sol";
2110

2211
import {BitmapUtils} from "./libraries/BitmapUtils.sol";
2312
import {SlashingRegistryCoordinator} from "./SlashingRegistryCoordinator.sol";
24-
import {ISlashingRegistryCoordinator} from "./interfaces/ISlashingRegistryCoordinator.sol";
25-
import {OwnableUpgradeable} from "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol";
2613
import {RegistryCoordinatorStorage} from "./RegistryCoordinatorStorage.sol";
2714

2815
/**

src/RegistryCoordinatorStorage.sol

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
// SPDX-License-Identifier: BUSL-1.1
22
pragma solidity ^0.8.27;
33

4-
import {IPauserRegistry} from "eigenlayer-contracts/src/contracts/interfaces/IPauserRegistry.sol";
5-
import {IAllocationManager} from
6-
"eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol";
7-
import {IBLSApkRegistry, IBLSApkRegistryTypes} from "./interfaces/IBLSApkRegistry.sol";
8-
import {IStakeRegistry} from "./interfaces/IStakeRegistry.sol";
9-
import {IIndexRegistry} from "./interfaces/IIndexRegistry.sol";
104
import {IServiceManager} from "./interfaces/IServiceManager.sol";
11-
import {
12-
IRegistryCoordinator, IRegistryCoordinatorTypes
13-
} from "./interfaces/IRegistryCoordinator.sol";
14-
import {ISocketRegistry} from "./interfaces/ISocketRegistry.sol";
5+
import {IRegistryCoordinator} from "./interfaces/IRegistryCoordinator.sol";
156

167
abstract contract RegistryCoordinatorStorage is IRegistryCoordinator {
178
/**

src/ServiceManagerBase.sol

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
// SPDX-License-Identifier: BUSL-1.1
22
pragma solidity ^0.8.27;
33

4-
import {Initializable} from "@openzeppelin-upgrades/contracts/proxy/utils/Initializable.sol";
54
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
65
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
7-
import {
8-
ISignatureUtilsMixin,
9-
ISignatureUtilsMixinTypes
10-
} from "eigenlayer-contracts/src/contracts/interfaces/ISignatureUtilsMixin.sol";
6+
import {ISignatureUtilsMixinTypes} from
7+
"eigenlayer-contracts/src/contracts/interfaces/ISignatureUtilsMixin.sol";
118
import {IAVSDirectory} from "eigenlayer-contracts/src/contracts/interfaces/IAVSDirectory.sol";
12-
import {IStrategy} from "eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol";
139
import {IRewardsCoordinator} from
1410
"eigenlayer-contracts/src/contracts/interfaces/IRewardsCoordinator.sol";
1511
import {
@@ -18,9 +14,6 @@ import {
1814
} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol";
1915
import {IPermissionController} from
2016
"eigenlayer-contracts/src/contracts/interfaces/IPermissionController.sol";
21-
import {IPauserRegistry} from "eigenlayer-contracts/src/contracts/interfaces/IPauserRegistry.sol";
22-
import {Pausable} from "eigenlayer-contracts/src/contracts/permissions/Pausable.sol";
23-
import {OwnableUpgradeable} from "@openzeppelin-upgrades/contracts/access/OwnableUpgradeable.sol";
2417

2518
import {ServiceManagerBaseStorage} from "./ServiceManagerBaseStorage.sol";
2619
import {IServiceManager} from "./interfaces/IServiceManager.sol";

src/SlashingRegistryCoordinator.sol

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ import {IStrategy} from "eigenlayer-contracts/src/contracts/interfaces/IStrategy
88
import {IAVSRegistrar} from "eigenlayer-contracts/src/contracts/interfaces/IAVSRegistrar.sol";
99
import {
1010
IAllocationManager,
11-
OperatorSet,
1211
IAllocationManagerTypes
1312
} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol";
14-
import {ISemVerMixin} from "eigenlayer-contracts/src/contracts/interfaces/ISemVerMixin.sol";
1513
import {AllocationManager} from "eigenlayer-contracts/src/contracts/core/AllocationManager.sol";
1614
import {SemVerMixin} from "eigenlayer-contracts/src/contracts/mixins/SemVerMixin.sol";
1715

src/SlashingRegistryCoordinatorStorage.sol

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@ pragma solidity ^0.8.27;
44
import {IBLSApkRegistry} from "./interfaces/IBLSApkRegistry.sol";
55
import {IStakeRegistry} from "./interfaces/IStakeRegistry.sol";
66
import {IIndexRegistry} from "./interfaces/IIndexRegistry.sol";
7-
import {IServiceManager} from "./interfaces/IServiceManager.sol";
8-
import {IAVSDirectory} from "eigenlayer-contracts/src/contracts/interfaces/IAVSDirectory.sol";
9-
import {
10-
IAllocationManager,
11-
OperatorSet,
12-
IAllocationManagerTypes
13-
} from "eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol";
7+
import {IAllocationManager} from
8+
"eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol";
149
import {ISlashingRegistryCoordinator} from "./interfaces/ISlashingRegistryCoordinator.sol";
1510
import {ISocketRegistry} from "./interfaces/ISocketRegistry.sol";
1611

src/SocketRegistry.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pragma solidity ^0.8.12;
44
import {ISlashingRegistryCoordinator} from "./interfaces/ISlashingRegistryCoordinator.sol";
55
import {ISocketRegistry} from "./interfaces/ISocketRegistry.sol";
66
import {SocketRegistryStorage} from "./SocketRegistryStorage.sol";
7-
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
87

98
/**
109
* @title A `Registry` that keeps track of operator sockets (arbitrary strings).

src/StakeRegistryStorage.sol

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ import {IDelegationManager} from
66
import {IAVSDirectory} from "eigenlayer-contracts/src/contracts/interfaces/IAVSDirectory.sol";
77
import {IAllocationManager} from
88
"eigenlayer-contracts/src/contracts/interfaces/IAllocationManager.sol";
9-
import {
10-
IStrategyManager,
11-
IStrategy
12-
} from "eigenlayer-contracts/src/contracts/interfaces/IStrategyManager.sol";
9+
import {IStrategy} from "eigenlayer-contracts/src/contracts/interfaces/IStrategyManager.sol";
1310

1411
import {ISlashingRegistryCoordinator} from "./interfaces/ISlashingRegistryCoordinator.sol";
1512
import {IStakeRegistry, IStakeRegistryTypes} from "./interfaces/IStakeRegistry.sol";

src/interfaces/IECDSAStakeRegistry.sol

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@ pragma solidity ^0.8.27;
44
import {IERC1271Upgradeable} from
55
"@openzeppelin-upgrades/contracts/interfaces/IERC1271Upgradeable.sol";
66
import {IStrategy} from "eigenlayer-contracts/src/contracts/interfaces/IStrategy.sol";
7-
import {
8-
ISignatureUtilsMixin,
9-
ISignatureUtilsMixinTypes
10-
} from "eigenlayer-contracts/src/contracts/interfaces/ISignatureUtilsMixin.sol";
11-
import {IDelegationManager} from
12-
"eigenlayer-contracts/src/contracts/interfaces/IDelegationManager.sol";
7+
import {ISignatureUtilsMixinTypes} from
8+
"eigenlayer-contracts/src/contracts/interfaces/ISignatureUtilsMixin.sol";
139

1410
// TODO: many of these errors do not have test coverage.
1511

src/interfaces/IRegistryCoordinator.sol

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import {
77
ISlashingRegistryCoordinatorEvents,
88
ISlashingRegistryCoordinatorTypes
99
} from "./ISlashingRegistryCoordinator.sol";
10-
import {
11-
ISignatureUtilsMixin,
12-
ISignatureUtilsMixinTypes
13-
} from "eigenlayer-contracts/src/contracts/interfaces/ISignatureUtilsMixin.sol";
10+
import {ISignatureUtilsMixinTypes} from
11+
"eigenlayer-contracts/src/contracts/interfaces/ISignatureUtilsMixin.sol";
1412
import {IBLSApkRegistry, IBLSApkRegistryTypes} from "./IBLSApkRegistry.sol";
1513
import {IServiceManager} from "./IServiceManager.sol";
1614
import {IStakeRegistry} from "./IStakeRegistry.sol";

0 commit comments

Comments
 (0)