Skip to content

Commit

Permalink
fix: remove unused return values from the Allocation library. (OZ N-10)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonBoi9001 committed Sep 18, 2024
1 parent 9dfb8b0 commit bd62e95
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions packages/subgraph-service/contracts/libraries/Allocation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand All @@ -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;
}

/**
Expand All @@ -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;
}

/**
Expand All @@ -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;
}

/**
Expand Down

0 comments on commit bd62e95

Please sign in to comment.