Skip to content

Commit

Permalink
Add overload
Browse files Browse the repository at this point in the history
  • Loading branch information
hieronx committed Sep 23, 2024
1 parent 5cb8f7d commit 2468d58
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CentrifugeRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ contract CentrifugeRouter is Auth, ICentrifugeRouter {
IERC7540Vault(vault).claimCancelRedeemRequest(REQUEST_ID, receiver, controller);
}

/// @inheritdoc ICentrifugeRouter
function distributeInterest(address vault, address controller) external payable protected {
interestDistributor.distribute(vault, controller);
}

/// @inheritdoc ICentrifugeRouter
function distributeInterest(address vault, address controller, uint256 topUpAmount) external payable protected {
_pay(topUpAmount);
Expand Down
6 changes: 6 additions & 0 deletions src/interfaces/ICentrifugeRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ interface ICentrifugeRouter is IRecoverable {
/// @param controller Check IERC7540CancelRedeem.claimCancelRedeemRequest.controller
function claimCancelRedeemRequest(address vault, address receiver, address controller) external payable;

/// @notice TODO
/// @dev This method is to be used when the pending interest is 0, since no redemption request is required then.
/// If pending is non-zero, then the overloaded distributeInterest() method with the `topUpAmount` parameter
/// should be used, to pay for the requestRedeem call to Centrifuge.
function distributeInterest(address vault, address controller) external payable;

/// @notice TODO
function distributeInterest(address vault, address controller, uint256 topUpAmount) external payable;

Expand Down

0 comments on commit 2468d58

Please sign in to comment.