Skip to content

Commit

Permalink
docs: polish comments
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Razvan Berg <prberg@proton.me>
  • Loading branch information
smol-ninja and PaulRBerg committed Jan 6, 2025
1 parent aea97f2 commit 04f92c2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions src/SablierLockup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions src/interfaces/ISablierLockup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -179,7 +179,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.
Expand Down Expand Up @@ -216,7 +216,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
Expand Down
12 changes: 6 additions & 6 deletions src/interfaces/ISablierLockupBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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}.
Expand Down Expand Up @@ -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:
/// - This function attempts to call a hook on the recipient of the stream, unless `msg.sender` is the recipient.
Expand All @@ -340,7 +340,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}.
Expand Down Expand Up @@ -380,7 +380,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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) });
Expand Down

0 comments on commit 04f92c2

Please sign in to comment.