@@ -322,6 +322,13 @@ contract RecurringCollector is EIP712, GraphDirectory, Authorizable, IRecurringC
322
322
return tokensToCollect;
323
323
}
324
324
325
+ /**
326
+ * @notice Requires that the collection window parameters are valid.
327
+ *
328
+ * @param _endsAt The end time of the agreement
329
+ * @param _minSecondsPerCollection The minimum seconds per collection
330
+ * @param _maxSecondsPerCollection The maximum seconds per collection
331
+ */
325
332
function _requireValidCollectionWindowParams (
326
333
uint64 _endsAt ,
327
334
uint32 _minSecondsPerCollection ,
@@ -394,23 +401,29 @@ contract RecurringCollector is EIP712, GraphDirectory, Authorizable, IRecurringC
394
401
}
395
402
396
403
/**
397
- * @notice See {IRecurringCollector.recoverRCASigner}
404
+ * @notice See {recoverRCASigner}
405
+ * @param _signedRCA The signed RCA to recover the signer from
406
+ * @return The address of the signer
398
407
*/
399
408
function _recoverRCASigner (SignedRCA memory _signedRCA ) private view returns (address ) {
400
409
bytes32 messageHash = _hashRCA (_signedRCA.rca);
401
410
return ECDSA.recover (messageHash, _signedRCA.signature);
402
411
}
403
412
404
413
/**
405
- * @notice See {IRecurringCollector.recoverRCAUSigner}
414
+ * @notice See {recoverRCAUSigner}
415
+ * @param _signedRCAU The signed RCAU to recover the signer from
416
+ * @return The address of the signer
406
417
*/
407
418
function _recoverRCAUSigner (SignedRCAU memory _signedRCAU ) private view returns (address ) {
408
419
bytes32 messageHash = _hashRCAU (_signedRCAU.rcau);
409
420
return ECDSA.recover (messageHash, _signedRCAU.signature);
410
421
}
411
422
412
423
/**
413
- * @notice See {IRecurringCollector.hashRCA}
424
+ * @notice See {hashRCA}
425
+ * @param _rca The RCA to hash
426
+ * @return The EIP712 hash of the RCA
414
427
*/
415
428
function _hashRCA (RecurringCollectionAgreement memory _rca ) private view returns (bytes32 ) {
416
429
return
@@ -435,7 +448,9 @@ contract RecurringCollector is EIP712, GraphDirectory, Authorizable, IRecurringC
435
448
}
436
449
437
450
/**
438
- * @notice See {IRecurringCollector.hashRCAU}
451
+ * @notice See {hashRCAU}
452
+ * @param _rcau The RCAU to hash
453
+ * @return The EIP712 hash of the RCAU
439
454
*/
440
455
function _hashRCAU (RecurringCollectionAgreementUpdate memory _rcau ) private view returns (bytes32 ) {
441
456
return
@@ -472,6 +487,9 @@ contract RecurringCollector is EIP712, GraphDirectory, Authorizable, IRecurringC
472
487
/**
473
488
* @notice Requires that the signer for the RCAU is authorized
474
489
* by the payer.
490
+ * @param _signedRCAU The signed RCAU to verify
491
+ * @param _payer The address of the payer
492
+ * @return The address of the authorized signer
475
493
*/
476
494
function _requireAuthorizedRCAUSigner (
477
495
SignedRCAU memory _signedRCAU ,
@@ -493,14 +511,19 @@ contract RecurringCollector is EIP712, GraphDirectory, Authorizable, IRecurringC
493
511
}
494
512
495
513
/**
496
- * @notice See {IRecurringCollector. getAgreement}
514
+ * @notice See {getAgreement}
497
515
* @param _agreementId The ID of the agreement to get
498
516
* @return The agreement data
499
517
*/
500
518
function _getAgreement (bytes16 _agreementId ) private view returns (AgreementData memory ) {
501
519
return agreements[_agreementId];
502
520
}
503
521
522
+ /**
523
+ * @notice Gets the start time for the collection of an agreement.
524
+ * @param _agreement The agreement data
525
+ * @return The start time for the collection of the agreement
526
+ */
504
527
function _agreementCollectionStartAt (AgreementData memory _agreement ) private pure returns (uint256 ) {
505
528
return _agreement.lastCollectionAt > 0 ? _agreement.lastCollectionAt : _agreement.acceptedAt;
506
529
}
0 commit comments