@@ -24,6 +24,19 @@ library AllocationManagerLib {
24
24
using PPMMath for uint256 ;
25
25
using TokenUtils for IGraphToken;
26
26
27
+ /**
28
+ * @notice Parameters for the allocation creation
29
+ * @param currentEpoch The current epoch at the time of allocation creation
30
+ * @param graphStaking The Horizon staking contract to handle token locking
31
+ * @param graphRewardsManager The rewards manager to handle rewards distribution
32
+ * @param _encodeAllocationProof The EIP712 encoded allocation proof
33
+ * @param _indexer The address of the indexer creating the allocation
34
+ * @param _allocationId The id of the allocation to be created
35
+ * @param _subgraphDeploymentId The id of the subgraph deployment for which the allocation is created
36
+ * @param _tokens The amount of tokens to allocate
37
+ * @param _allocationProof The EIP712 proof, an EIP712 signed message of (indexer,allocationId)
38
+ * @param _delegationRatio The delegation ratio to consider when locking tokens
39
+ */
27
40
struct AllocateParams {
28
41
uint256 currentEpoch;
29
42
IHorizonStaking graphStaking;
@@ -37,6 +50,19 @@ library AllocationManagerLib {
37
50
uint32 _delegationRatio;
38
51
}
39
52
53
+ /**
54
+ * @notice Parameters for the POI presentation
55
+ * @param maxPOIStaleness The maximum staleness of the POI in epochs
56
+ * @param graphEpochManager The epoch manager to get the current epoch
57
+ * @param graphStaking The Horizon staking contract to handle token locking
58
+ * @param graphRewardsManager The rewards manager to handle rewards distribution
59
+ * @param graphToken The Graph token contract to handle token transfers
60
+ * @param _allocationId The id of the allocation for which the POI is presented
61
+ * @param _poi The proof of indexing (POI) to be presented
62
+ * @param _poiMetadata The metadata associated with the POI
63
+ * @param _delegationRatio The delegation ratio to consider when locking tokens
64
+ * @param _paymentsDestination The address to which the indexing rewards should be sent
65
+ */
40
66
struct PresentParams {
41
67
uint256 maxPOIStaleness;
42
68
IEpochManager graphEpochManager;
@@ -272,6 +298,11 @@ library AllocationManagerLib {
272
298
*
273
299
* Emits a {AllocationResized} event.
274
300
*
301
+ * @param _allocations The mapping of allocation ids to allocation states
302
+ * @param allocationProvisionTracker The mapping of indexers to their locked tokens
303
+ * @param _subgraphAllocatedTokens The mapping of subgraph deployment ids to their allocated tokens
304
+ * @param graphStaking The Horizon staking contract to handle token locking
305
+ * @param graphRewardsManager The rewards manager to handle rewards distribution
275
306
* @param _allocationId The id of the allocation to be resized
276
307
* @param _tokens The new amount of tokens to allocate
277
308
* @param _delegationRatio The delegation ratio to consider when locking tokens
@@ -335,6 +366,8 @@ library AllocationManagerLib {
335
366
336
367
/**
337
368
* @notice Checks if an allocation is over-allocated
369
+ * @param allocationProvisionTracker The mapping of indexers to their locked tokens
370
+ * @param graphStaking The Horizon staking contract to check delegation ratios
338
371
* @param _indexer The address of the indexer
339
372
* @param _delegationRatio The delegation ratio to consider when locking tokens
340
373
* @return True if the allocation is over-allocated, false otherwise
0 commit comments