Skip to content

Commit abcafaa

Browse files
committed
chore: remove dead code
Signed-off-by: Tomás Migone <tomas@edgeandnode.com>
1 parent c541c8d commit abcafaa

File tree

4 files changed

+1
-37
lines changed

4 files changed

+1
-37
lines changed

packages/horizon/test/unit/GraphBase.t.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ abstract contract GraphBaseTest is IHorizonStakingTypes, Utils, Constants {
6969
operator: createUser("operator"),
7070
gateway: createUser("gateway"),
7171
verifier: createUser("verifier"),
72-
delegator: createUser("delegator"),
73-
legacySlasher: createUser("legacySlasher")
72+
delegator: createUser("delegator")
7473
});
7574

7675
// Deploy protocol contracts

packages/horizon/test/unit/utils/Users.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ struct Users {
99
address gateway;
1010
address verifier;
1111
address delegator;
12-
address legacySlasher;
1312
}

packages/interfaces/contracts/subgraph-service/internal/ILegacyAllocation.sol

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,4 @@ interface ILegacyAllocation {
2727
* @param allocationId The allocation id
2828
*/
2929
error LegacyAllocationAlreadyExists(address allocationId);
30-
31-
/**
32-
* @notice Thrown when trying to get a non-existent allocation
33-
* @param allocationId The allocation id
34-
*/
35-
error LegacyAllocationDoesNotExist(address allocationId);
3630
}

packages/subgraph-service/contracts/libraries/LegacyAllocation.sol

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,6 @@ import { ILegacyAllocation } from "@graphprotocol/interfaces/contracts/subgraph-
1313
library LegacyAllocation {
1414
using LegacyAllocation for ILegacyAllocation.State;
1515

16-
/**
17-
* @notice Get a legacy allocation
18-
* @param self The legacy allocation list mapping
19-
* @param allocationId The allocation id
20-
* @return The legacy allocation details
21-
*/
22-
function get(
23-
mapping(address => ILegacyAllocation.State) storage self,
24-
address allocationId
25-
) internal view returns (ILegacyAllocation.State memory) {
26-
return _get(self, allocationId);
27-
}
28-
2916
/**
3017
* @notice Revert if a legacy allocation exists
3118
* @dev We check the migrated allocations mapping.
@@ -47,19 +34,4 @@ library LegacyAllocation {
4734
function exists(ILegacyAllocation.State memory self) internal pure returns (bool) {
4835
return self.indexer != address(0);
4936
}
50-
51-
/**
52-
* @notice Get a legacy allocation
53-
* @param self The legacy allocation list mapping
54-
* @param allocationId The allocation id
55-
* @return The legacy allocation details
56-
*/
57-
function _get(
58-
mapping(address => ILegacyAllocation.State) storage self,
59-
address allocationId
60-
) private view returns (ILegacyAllocation.State storage) {
61-
ILegacyAllocation.State storage allocation = self[allocationId];
62-
require(allocation.exists(), ILegacyAllocation.LegacyAllocationDoesNotExist(allocationId));
63-
return allocation;
64-
}
6537
}

0 commit comments

Comments
 (0)