From 8d7bc50983ef9fe5fc1d0a13e490670e0ba30844 Mon Sep 17 00:00:00 2001 From: smol-ninja Date: Mon, 6 Jan 2025 20:34:43 +0530 Subject: [PATCH] docs: polish comments Co-authored-by: Paul Razvan Berg --- src/SablierLockup.sol | 2 ++ src/interfaces/ISablierLockup.sol | 12 ++++++------ src/interfaces/ISablierLockupBase.sol | 12 ++++++------ .../renounce-multiple/renounceMultiple.t.sol | 2 +- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/SablierLockup.sol b/src/SablierLockup.sol index e7248666a..f0743c421 100644 --- a/src/SablierLockup.sol +++ b/src/SablierLockup.sol @@ -141,6 +141,7 @@ contract SablierLockup is ISablierLockup, SablierLockupBase { noDelegateCall returns (uint256 streamId) { + // Use the block timestamp as the start time. uint40 startTime = uint40(block.timestamp); // Generate the canonical segments. @@ -219,6 +220,7 @@ contract SablierLockup is ISablierLockup, SablierLockupBase { noDelegateCall returns (uint256 streamId) { + // Use the block timestamp as the start time. uint40 startTime = uint40(block.timestamp); // Generate the canonical tranches. diff --git a/src/interfaces/ISablierLockup.sol b/src/interfaces/ISablierLockup.sol index e1b581586..263af259b 100644 --- a/src/interfaces/ISablierLockup.sol +++ b/src/interfaces/ISablierLockup.sol @@ -82,7 +82,7 @@ interface ISablierLockup is ISablierLockupBase { /// `block.timestamp` and all specified time durations. The segment timestamps are derived from these /// durations. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. /// - /// @dev Emits a {Transfer}, {CreateLockupDynamicStream}, and {MetadataUpdate} event. + /// @dev Emits a {Transfer}, {CreateLockupDynamicStream} and {MetadataUpdate} event. /// /// Requirements: /// - All requirements in {createWithTimestampsLD} must be met for the calculated parameters. @@ -103,7 +103,7 @@ interface ISablierLockup is ISablierLockupBase { /// the sum of `block.timestamp` and `durations.total`. The stream is funded by `msg.sender` and is wrapped in an /// ERC-721 NFT. /// - /// @dev Emits a {Transfer}, {CreateLockupLinearStream}, and {MetadataUpdate} event. + /// @dev Emits a {Transfer}, {CreateLockupLinearStream} and {MetadataUpdate} event. /// /// Requirements: /// - All requirements in {createWithTimestampsLL} must be met for the calculated parameters. @@ -126,7 +126,7 @@ interface ISablierLockup is ISablierLockupBase { /// `block.timestamp` and all specified time durations. The tranche timestamps are derived from these /// durations. The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. /// - /// @dev Emits a {Transfer}, {CreateLockupTrancheStream}, and {MetadataUpdate} event. + /// @dev Emits a {Transfer}, {CreateLockupTrancheStream} and {MetadataUpdate} event. /// /// Requirements: /// - All requirements in {createWithTimestampsLT} must be met for the calculated parameters. @@ -146,7 +146,7 @@ interface ISablierLockup is ISablierLockupBase { /// @notice Creates a stream with the provided segment timestamps, implying the end time from the last timestamp. /// The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. /// - /// @dev Emits a {Transfer}, {CreateLockupDynamicStream}, and {MetadataUpdate} event. + /// @dev Emits a {Transfer}, {CreateLockupDynamicStream} and {MetadataUpdate} event. /// /// Notes: /// - As long as the segment timestamps are arranged in ascending order, it is not an error for some @@ -180,7 +180,7 @@ interface ISablierLockup is ISablierLockupBase { /// @notice Creates a stream with the provided start time and end time. The stream is funded by `msg.sender` and is /// wrapped in an ERC-721 NFT. /// - /// @dev Emits a {Transfer}, {CreateLockupLinearStream}, and {MetadataUpdate} event. + /// @dev Emits a {Transfer}, {CreateLockupLinearStream} and {MetadataUpdate} event. /// /// Notes: /// - A cliff time of zero means there is no cliff. @@ -218,7 +218,7 @@ interface ISablierLockup is ISablierLockupBase { /// @notice Creates a stream with the provided tranche timestamps, implying the end time from the last timestamp. /// The stream is funded by `msg.sender` and is wrapped in an ERC-721 NFT. /// - /// @dev Emits a {Transfer}, {CreateLockupTrancheStream}, and {MetadataUpdate} event. + /// @dev Emits a {Transfer}, {CreateLockupTrancheStream} and {MetadataUpdate} event. /// /// Notes: /// - As long as the tranche timestamps are arranged in ascending order, it is not an error for some diff --git a/src/interfaces/ISablierLockupBase.sol b/src/interfaces/ISablierLockupBase.sol index ec0b6287e..75cd97ef1 100644 --- a/src/interfaces/ISablierLockupBase.sol +++ b/src/interfaces/ISablierLockupBase.sol @@ -228,7 +228,7 @@ interface ISablierLockupBase is /// @notice Burns the NFT associated with the stream. /// - /// @dev Emits a {Transfer}, and {MetadataUpdate} event. + /// @dev Emits a {Transfer} and {MetadataUpdate} event. /// /// Requirements: /// - Must not be delegate called. @@ -241,7 +241,7 @@ interface ISablierLockupBase is /// @notice Cancels the stream and refunds any remaining tokens to the sender. /// - /// @dev Emits a {Transfer}, {CancelLockupStream}, and {MetadataUpdate} event. + /// @dev Emits a {Transfer}, {CancelLockupStream} and {MetadataUpdate} event. /// /// Notes: /// - If there any tokens left for the recipient to withdraw, the stream is marked as canceled. Otherwise, the @@ -258,7 +258,7 @@ interface ISablierLockupBase is /// @notice Cancels multiple streams and refunds any remaining tokens to the sender. /// - /// @dev Emits multiple {Transfer}, {CancelLockupStream}, and {MetadataUpdate} events. + /// @dev Emits multiple {Transfer}, {CancelLockupStream} and {MetadataUpdate} events. /// /// Notes: /// - Refer to the notes in {cancel}. @@ -321,7 +321,7 @@ interface ISablierLockupBase is /// @notice Withdraws the provided amount of tokens from the stream to the `to` address. /// - /// @dev Emits a {Transfer}, {WithdrawFromLockupStream}, and {MetadataUpdate} event. + /// @dev Emits a {Transfer}, {WithdrawFromLockupStream} and {MetadataUpdate} event. /// /// Notes: /// - If `msg.sender` is not the recipient and the address is on the allowlist, this function will invoke a hook on @@ -341,7 +341,7 @@ interface ISablierLockupBase is /// @notice Withdraws the maximum withdrawable amount from the stream to the provided address `to`. /// - /// @dev Emits a {Transfer}, {WithdrawFromLockupStream}, and {MetadataUpdate} event. + /// @dev Emits a {Transfer}, {WithdrawFromLockupStream} and {MetadataUpdate} event. /// /// Notes: /// - Refer to the notes in {withdraw}. @@ -381,7 +381,7 @@ interface ISablierLockupBase is /// @notice Withdraws tokens from streams to the recipient of each stream. /// - /// @dev Emits multiple {Transfer}, {WithdrawFromLockupStream}, and {MetadataUpdate} events. For each stream that + /// @dev Emits multiple {Transfer}, {WithdrawFromLockupStream} and {MetadataUpdate} events. For each stream that /// reverted the withdrawal, it emits an {InvalidWithdrawalInWithdrawMultiple} event. /// /// Notes: diff --git a/tests/integration/concrete/lockup-base/renounce-multiple/renounceMultiple.t.sol b/tests/integration/concrete/lockup-base/renounce-multiple/renounceMultiple.t.sol index c17844739..299882e2f 100644 --- a/tests/integration/concrete/lockup-base/renounce-multiple/renounceMultiple.t.sol +++ b/tests/integration/concrete/lockup-base/renounce-multiple/renounceMultiple.t.sol @@ -89,7 +89,7 @@ contract RenounceMultiple_Integration_Concrete_Test is Integration_Test { givenNoColdStreams whenCallerAuthorizedForAllStreams { - // It should emit {RenounceLockupStream} events for both the streams. + // It should emit {RenounceLockupStream} events for both streams. vm.expectEmit({ emitter: address(lockup) }); emit ISablierLockupBase.RenounceLockupStream(streamIds[0]); vm.expectEmit({ emitter: address(lockup) });