Skip to content

Commit d1cd17b

Browse files
HACK: make lib external
1 parent d5f6b67 commit d1cd17b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ library Allocation {
7676
uint256 tokens,
7777
uint256 accRewardsPerAllocatedToken,
7878
uint256 createdAtEpoch
79-
) internal returns (State memory) {
79+
) external returns (State memory) {
8080
require(!self[allocationId].exists(), AllocationAlreadyExists(allocationId));
8181

8282
State memory allocation = State({
@@ -104,7 +104,7 @@ library Allocation {
104104
* @param self The allocation list mapping
105105
* @param allocationId The allocation id
106106
*/
107-
function presentPOI(mapping(address => State) storage self, address allocationId) internal {
107+
function presentPOI(mapping(address => State) storage self, address allocationId) external {
108108
State storage allocation = _get(self, allocationId);
109109
require(allocation.isOpen(), AllocationClosed(allocationId, allocation.closedAt));
110110
allocation.lastPOIPresentedAt = block.timestamp;
@@ -135,7 +135,7 @@ library Allocation {
135135
* @param self The allocation list mapping
136136
* @param allocationId The allocation id
137137
*/
138-
function clearPendingRewards(mapping(address => State) storage self, address allocationId) internal {
138+
function clearPendingRewards(mapping(address => State) storage self, address allocationId) external {
139139
State storage allocation = _get(self, allocationId);
140140
require(allocation.isOpen(), AllocationClosed(allocationId, allocation.closedAt));
141141
allocation.accRewardsPending = 0;
@@ -148,7 +148,7 @@ library Allocation {
148148
* @param self The allocation list mapping
149149
* @param allocationId The allocation id
150150
*/
151-
function close(mapping(address => State) storage self, address allocationId) internal {
151+
function close(mapping(address => State) storage self, address allocationId) external {
152152
State storage allocation = _get(self, allocationId);
153153
require(allocation.isOpen(), AllocationClosed(allocationId, allocation.closedAt));
154154
allocation.closedAt = block.timestamp;

0 commit comments

Comments
 (0)