diff --git a/packages/horizon/contracts/data-service/interfaces/IDataService.sol b/packages/horizon/contracts/data-service/interfaces/IDataService.sol index b7e1028f0..3eec64c04 100644 --- a/packages/horizon/contracts/data-service/interfaces/IDataService.sol +++ b/packages/horizon/contracts/data-service/interfaces/IDataService.sol @@ -60,11 +60,6 @@ interface IDataService { */ event ServiceProviderSlashed(address indexed serviceProvider, uint256 tokens); - /** - * @notice Thrown to signal that a feature is not implemented by a data service. - */ - error DataServiceFeatureNotImplemented(); - /** * @notice Registers a service provider with the data service. The service provider can now * start providing the service. diff --git a/packages/subgraph-service/contracts/libraries/LegacyAllocation.sol b/packages/subgraph-service/contracts/libraries/LegacyAllocation.sol index 83bef8037..c60783785 100644 --- a/packages/subgraph-service/contracts/libraries/LegacyAllocation.sol +++ b/packages/subgraph-service/contracts/libraries/LegacyAllocation.sol @@ -39,11 +39,12 @@ library LegacyAllocation { /** * @notice Migrate a legacy allocation * @dev Requirements: - * - The allocation must not exist + * - The allocation must not have been previously migrated * @param self The legacy allocation list mapping * @param indexer The indexer that owns the allocation * @param allocationId The allocation id * @param subgraphDeploymentId The subgraph deployment id the allocation is for + * @custom:error LegacyAllocationAlreadyMigrated if the allocation has already been migrated */ function migrate( mapping(address => State) storage self, @@ -51,7 +52,7 @@ library LegacyAllocation { address allocationId, bytes32 subgraphDeploymentId ) internal { - require(!self[allocationId].exists(), LegacyAllocationExists(allocationId)); + require(!self[allocationId].exists(), LegacyAllocationAlreadyMigrated(allocationId)); State memory allocation = State({ indexer: indexer, subgraphDeploymentId: subgraphDeploymentId }); self[allocationId] = allocation; diff --git a/packages/subgraph-service/contracts/utilities/AllocationManager.sol b/packages/subgraph-service/contracts/utilities/AllocationManager.sol index 4ab5fd418..97c3adf99 100644 --- a/packages/subgraph-service/contracts/utilities/AllocationManager.sol +++ b/packages/subgraph-service/contracts/utilities/AllocationManager.sol @@ -139,13 +139,7 @@ abstract contract AllocationManager is EIP712Upgradeable, GraphDirectory, Alloca error AllocationManagerInvalidZeroAllocationId(); /** - * @notice Thrown when attempting to create an allocation with zero tokens - * @param allocationId The id of the allocation - */ - error AllocationManagerZeroTokensAllocation(address allocationId); - - /** - * @notice Thrown when attempting to collect indexing rewards on a closed allocation + * @notice Thrown when attempting to collect indexing rewards on a closed allocationl * @param allocationId The id of the allocation */ error AllocationManagerAllocationClosed(address allocationId); @@ -178,7 +172,7 @@ abstract contract AllocationManager is EIP712Upgradeable, GraphDirectory, Alloca /** * @notice Imports a legacy allocation id into the subgraph service * This is a governor only action that is required to prevent indexers from re-using allocation ids from the - * legacy staking contract. + * legacy staking contract. It will revert with LegacyAllocationAlreadyMigrated if the allocation has already been migrated. * @param _indexer The address of the indexer * @param _allocationId The id of the allocation * @param _subgraphDeploymentId The id of the subgraph deployment