diff --git a/packages/subgraph-service/contracts/libraries/Allocation.sol b/packages/subgraph-service/contracts/libraries/Allocation.sol index a55034f17..320547f92 100644 --- a/packages/subgraph-service/contracts/libraries/Allocation.sol +++ b/packages/subgraph-service/contracts/libraries/Allocation.sol @@ -96,12 +96,10 @@ library Allocation { * @param self The allocation list mapping * @param allocationId The allocation id */ - function presentPOI(mapping(address => State) storage self, address allocationId) internal returns (State memory) { + function presentPOI(mapping(address => State) storage self, address allocationId) internal { State storage allocation = _get(self, allocationId); require(allocation.isOpen(), AllocationClosed(allocationId, allocation.closedAt)); allocation.lastPOIPresentedAt = block.timestamp; - - return allocation; } /** @@ -116,12 +114,10 @@ library Allocation { mapping(address => State) storage self, address allocationId, uint256 accRewardsPerAllocatedToken - ) internal returns (State memory) { + ) internal { State storage allocation = _get(self, allocationId); require(allocation.isOpen(), AllocationClosed(allocationId, allocation.closedAt)); allocation.accRewardsPerAllocatedToken = accRewardsPerAllocatedToken; - - return allocation; } /** @@ -131,15 +127,10 @@ library Allocation { * @param self The allocation list mapping * @param allocationId The allocation id */ - function clearPendingRewards( - mapping(address => State) storage self, - address allocationId - ) internal returns (State memory) { + function clearPendingRewards(mapping(address => State) storage self, address allocationId) internal { State storage allocation = _get(self, allocationId); require(allocation.isOpen(), AllocationClosed(allocationId, allocation.closedAt)); allocation.accRewardsPending = 0; - - return allocation; } /** @@ -149,12 +140,10 @@ library Allocation { * @param self The allocation list mapping * @param allocationId The allocation id */ - function close(mapping(address => State) storage self, address allocationId) internal returns (State memory) { + function close(mapping(address => State) storage self, address allocationId) internal { State storage allocation = _get(self, allocationId); require(allocation.isOpen(), AllocationClosed(allocationId, allocation.closedAt)); allocation.closedAt = block.timestamp; - - return allocation; } /** diff --git a/packages/subgraph-service/contracts/utilities/AllocationManager.sol b/packages/subgraph-service/contracts/utilities/AllocationManager.sol index 2e40f28d3..978335b58 100644 --- a/packages/subgraph-service/contracts/utilities/AllocationManager.sol +++ b/packages/subgraph-service/contracts/utilities/AllocationManager.sol @@ -396,7 +396,7 @@ abstract contract AllocationManager is EIP712Upgradeable, GraphDirectory, Alloca * * @param _allocationId The id of the allocation to be closed */ - function _closeAllocation(address _allocationId) internal returns (Allocation.State memory) { + function _closeAllocation(address _allocationId) internal { Allocation.State memory allocation = allocations.get(_allocationId); // Take rewards snapshot to prevent other allos from counting tokens from this allo @@ -414,7 +414,6 @@ abstract contract AllocationManager is EIP712Upgradeable, GraphDirectory, Alloca allocation.tokens; emit AllocationClosed(allocation.indexer, _allocationId, allocation.subgraphDeploymentId, allocation.tokens); - return allocations[_allocationId]; } /**