From 742ec2003338f8a78d8102142241dc9a8dd045a3 Mon Sep 17 00:00:00 2001 From: smol-ninja Date: Fri, 12 Jan 2024 17:33:09 +0530 Subject: [PATCH] refactor: withdraw related notes --- src/interfaces/ISablierV2Lockup.sol | 5 +++-- src/interfaces/hooks/ISablierV2Recipient.sol | 2 +- src/interfaces/hooks/ISablierV2Sender.sol | 2 +- test/integration/fuzz/lockup/withdraw.t.sol | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/interfaces/ISablierV2Lockup.sol b/src/interfaces/ISablierV2Lockup.sol index ee797a524..c722d4e45 100644 --- a/src/interfaces/ISablierV2Lockup.sol +++ b/src/interfaces/ISablierV2Lockup.sol @@ -242,8 +242,8 @@ interface ISablierV2Lockup is /// @dev Emits a {Transfer}, {WithdrawFromLockupStream}, and {MetadataUpdate} event. /// /// Notes: - /// - This function attempts to invoke a hook on the stream's recipient, provided that the recipient is a contract - /// and `msg.sender` is not the recipient. + /// - This function attempts to call a hook on the recipient of the stream, unless `msg.sender` is the recipient. + /// - This function attempts to call a hook on the sender of the stream, unless `msg.sender` is the sender. /// /// Requirements: /// - Must not be delegate called. @@ -295,6 +295,7 @@ interface ISablierV2Lockup is /// /// Notes: /// - This function attempts to call a hook on the recipient of each stream, unless `msg.sender` is the recipient. + /// - This function attempts to call a hook on the sender of each stream, unless `msg.sender` is the sender. /// /// Requirements: /// - Must not be delegate called. diff --git a/src/interfaces/hooks/ISablierV2Recipient.sol b/src/interfaces/hooks/ISablierV2Recipient.sol index d6e029af6..24bcb3649 100644 --- a/src/interfaces/hooks/ISablierV2Recipient.sol +++ b/src/interfaces/hooks/ISablierV2Recipient.sol @@ -33,7 +33,7 @@ interface ISablierV2Recipient { /// @param streamId The id of the renounced stream. function onLockupStreamRenounced(uint256 streamId) external; - /// @notice Responds to withdrawals triggered by either the stream's sender or an approved third party. + /// @notice Responds to withdrawals triggered by anyone unless `caller` is the recipient address. /// /// @dev Notes: /// - This function may revert, but the Sablier contract will ignore the revert. diff --git a/src/interfaces/hooks/ISablierV2Sender.sol b/src/interfaces/hooks/ISablierV2Sender.sol index 632e13065..5b172fb9e 100644 --- a/src/interfaces/hooks/ISablierV2Sender.sol +++ b/src/interfaces/hooks/ISablierV2Sender.sol @@ -6,7 +6,7 @@ pragma solidity >=0.8.22; /// @dev Implementation of this interface is optional. If a sender contract doesn't implement this /// interface or implements it partially, function execution will not revert. interface ISablierV2Sender { - /// @notice Responds to withdrawals triggered by either the stream's recipient or an approved third party. + /// @notice Responds to withdrawals triggered by anyone unless `caller` is the sender address. /// /// @dev Notes: /// - This function may revert, but the Sablier contract will ignore the revert. diff --git a/test/integration/fuzz/lockup/withdraw.t.sol b/test/integration/fuzz/lockup/withdraw.t.sol index 4cae7165e..9339ed7c3 100644 --- a/test/integration/fuzz/lockup/withdraw.t.sol +++ b/test/integration/fuzz/lockup/withdraw.t.sol @@ -155,7 +155,6 @@ abstract contract Withdraw_Integration_Fuzz_Test is Integration_Test, Withdraw_I /// - Multiple withdraw amounts function testFuzz_Withdraw( uint256 timeJump, - address caller, address to, uint128 withdrawAmount )