Skip to content

Commit

Permalink
style: apply forge fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
smol-ninja committed Sep 2, 2024
1 parent ba1cda3 commit f1f8ae6
Show file tree
Hide file tree
Showing 27 changed files with 65 additions and 195 deletions.
4 changes: 1 addition & 3 deletions script/DeployCore.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import { BaseScript } from "./Base.s.sol";

/// @notice Deploys all V2 Core contracts.
contract DeployCore is BaseScript {
function run(
address initialAdmin
)
function run(address initialAdmin)
public
virtual
broadcast
Expand Down
4 changes: 1 addition & 3 deletions script/DeployDeterministicCore.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import { BaseScript } from "./Base.s.sol";
/// @notice Deploys all V2 Core contracts at deterministic addresses across chains.
/// @dev Reverts if any contract has already been deployed.
contract DeployDeterministicCore is BaseScript {
function run(
address initialAdmin
)
function run(address initialAdmin)
public
virtual
broadcast
Expand Down
20 changes: 5 additions & 15 deletions src/SablierV2LockupDynamic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ contract SablierV2LockupDynamic is
//////////////////////////////////////////////////////////////////////////*/

/// @inheritdoc ISablierV2LockupDynamic
function getSegments(
uint256 streamId
)
function getSegments(uint256 streamId)
external
view
override
Expand All @@ -90,9 +88,7 @@ contract SablierV2LockupDynamic is
}

/// @inheritdoc ISablierV2LockupDynamic
function getStream(
uint256 streamId
)
function getStream(uint256 streamId)
external
view
override
Expand Down Expand Up @@ -124,9 +120,7 @@ contract SablierV2LockupDynamic is
}

/// @inheritdoc ISablierV2LockupDynamic
function getTimestamps(
uint256 streamId
)
function getTimestamps(uint256 streamId)
external
view
override
Expand All @@ -141,9 +135,7 @@ contract SablierV2LockupDynamic is
//////////////////////////////////////////////////////////////////////////*/

/// @inheritdoc ISablierV2LockupDynamic
function createWithDurations(
LockupDynamic.CreateWithDurations calldata params
)
function createWithDurations(LockupDynamic.CreateWithDurations calldata params)
external
override
noDelegateCall
Expand All @@ -169,9 +161,7 @@ contract SablierV2LockupDynamic is
}

/// @inheritdoc ISablierV2LockupDynamic
function createWithTimestamps(
LockupDynamic.CreateWithTimestamps calldata params
)
function createWithTimestamps(LockupDynamic.CreateWithTimestamps calldata params)
external
override
noDelegateCall
Expand Down
16 changes: 4 additions & 12 deletions src/SablierV2LockupLinear.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ contract SablierV2LockupLinear is
}

/// @inheritdoc ISablierV2LockupLinear
function getStream(
uint256 streamId
)
function getStream(uint256 streamId)
external
view
override
Expand Down Expand Up @@ -107,9 +105,7 @@ contract SablierV2LockupLinear is
}

/// @inheritdoc ISablierV2LockupLinear
function getTimestamps(
uint256 streamId
)
function getTimestamps(uint256 streamId)
external
view
override
Expand All @@ -128,9 +124,7 @@ contract SablierV2LockupLinear is
//////////////////////////////////////////////////////////////////////////*/

/// @inheritdoc ISablierV2LockupLinear
function createWithDurations(
LockupLinear.CreateWithDurations calldata params
)
function createWithDurations(LockupLinear.CreateWithDurations calldata params)
external
override
noDelegateCall
Expand Down Expand Up @@ -166,9 +160,7 @@ contract SablierV2LockupLinear is
}

/// @inheritdoc ISablierV2LockupLinear
function createWithTimestamps(
LockupLinear.CreateWithTimestamps calldata params
)
function createWithTimestamps(LockupLinear.CreateWithTimestamps calldata params)
external
override
noDelegateCall
Expand Down
20 changes: 5 additions & 15 deletions src/SablierV2LockupTranched.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ contract SablierV2LockupTranched is
//////////////////////////////////////////////////////////////////////////*/

/// @inheritdoc ISablierV2LockupTranched
function getStream(
uint256 streamId
)
function getStream(uint256 streamId)
external
view
override
Expand Down Expand Up @@ -106,9 +104,7 @@ contract SablierV2LockupTranched is
}

/// @inheritdoc ISablierV2LockupTranched
function getTimestamps(
uint256 streamId
)
function getTimestamps(uint256 streamId)
external
view
override
Expand All @@ -119,9 +115,7 @@ contract SablierV2LockupTranched is
}

/// @inheritdoc ISablierV2LockupTranched
function getTranches(
uint256 streamId
)
function getTranches(uint256 streamId)
external
view
override
Expand All @@ -136,9 +130,7 @@ contract SablierV2LockupTranched is
//////////////////////////////////////////////////////////////////////////*/

/// @inheritdoc ISablierV2LockupTranched
function createWithDurations(
LockupTranched.CreateWithDurations calldata params
)
function createWithDurations(LockupTranched.CreateWithDurations calldata params)
external
override
noDelegateCall
Expand All @@ -164,9 +156,7 @@ contract SablierV2LockupTranched is
}

/// @inheritdoc ISablierV2LockupTranched
function createWithTimestamps(
LockupTranched.CreateWithTimestamps calldata params
)
function createWithTimestamps(LockupTranched.CreateWithTimestamps calldata params)
external
override
noDelegateCall
Expand Down
24 changes: 6 additions & 18 deletions src/abstracts/SablierV2Lockup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ abstract contract SablierV2Lockup is
}

/// @inheritdoc ISablierV2Lockup
function getDepositedAmount(
uint256 streamId
)
function getDepositedAmount(uint256 streamId)
external
view
override
Expand All @@ -104,9 +102,7 @@ abstract contract SablierV2Lockup is
}

/// @inheritdoc ISablierV2Lockup
function getRefundedAmount(
uint256 streamId
)
function getRefundedAmount(uint256 streamId)
external
view
override
Expand All @@ -127,9 +123,7 @@ abstract contract SablierV2Lockup is
}

/// @inheritdoc ISablierV2Lockup
function getWithdrawnAmount(
uint256 streamId
)
function getWithdrawnAmount(uint256 streamId)
external
view
override
Expand Down Expand Up @@ -179,9 +173,7 @@ abstract contract SablierV2Lockup is
}

/// @inheritdoc ISablierV2Lockup
function refundableAmountOf(
uint256 streamId
)
function refundableAmountOf(uint256 streamId)
external
view
override
Expand All @@ -203,9 +195,7 @@ abstract contract SablierV2Lockup is
}

/// @inheritdoc ISablierV2Lockup
function streamedAmountOf(
uint256 streamId
)
function streamedAmountOf(uint256 streamId)
public
view
override
Expand Down Expand Up @@ -236,9 +226,7 @@ abstract contract SablierV2Lockup is
}

/// @inheritdoc ISablierV2Lockup
function withdrawableAmountOf(
uint256 streamId
)
function withdrawableAmountOf(uint256 streamId)
external
view
override
Expand Down
8 changes: 2 additions & 6 deletions src/interfaces/ISablierV2LockupDynamic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ interface ISablierV2LockupDynamic is ISablierV2Lockup {
///
/// @param params Struct encapsulating the function parameters, which are documented in {DataTypes}.
/// @return streamId The ID of the newly created stream.
function createWithDurations(
LockupDynamic.CreateWithDurations calldata params
)
function createWithDurations(LockupDynamic.CreateWithDurations calldata params)
external
returns (uint256 streamId);

Expand All @@ -109,9 +107,7 @@ interface ISablierV2LockupDynamic is ISablierV2Lockup {
///
/// @param params Struct encapsulating the function parameters, which are documented in {DataTypes}.
/// @return streamId The ID of the newly created stream.
function createWithTimestamps(
LockupDynamic.CreateWithTimestamps calldata params
)
function createWithTimestamps(LockupDynamic.CreateWithTimestamps calldata params)
external
returns (uint256 streamId);
}
8 changes: 2 additions & 6 deletions src/interfaces/ISablierV2LockupLinear.sol
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ interface ISablierV2LockupLinear is ISablierV2Lockup {
///
/// @param params Struct encapsulating the function parameters, which are documented in {DataTypes}.
/// @return streamId The ID of the newly created stream.
function createWithDurations(
LockupLinear.CreateWithDurations calldata params
)
function createWithDurations(LockupLinear.CreateWithDurations calldata params)
external
returns (uint256 streamId);

Expand All @@ -104,9 +102,7 @@ interface ISablierV2LockupLinear is ISablierV2Lockup {
///
/// @param params Struct encapsulating the function parameters, which are documented in {DataTypes}.
/// @return streamId The ID of the newly created stream.
function createWithTimestamps(
LockupLinear.CreateWithTimestamps calldata params
)
function createWithTimestamps(LockupLinear.CreateWithTimestamps calldata params)
external
returns (uint256 streamId);
}
8 changes: 2 additions & 6 deletions src/interfaces/ISablierV2LockupTranched.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ interface ISablierV2LockupTranched is ISablierV2Lockup {
///
/// @param params Struct encapsulating the function parameters, which are documented in {DataTypes}.
/// @return streamId The ID of the newly created stream.
function createWithDurations(
LockupTranched.CreateWithDurations calldata params
)
function createWithDurations(LockupTranched.CreateWithDurations calldata params)
external
returns (uint256 streamId);

Expand All @@ -109,9 +107,7 @@ interface ISablierV2LockupTranched is ISablierV2Lockup {
///
/// @param params Struct encapsulating the function parameters, which are documented in {DataTypes}.
/// @return streamId The ID of the newly created stream.
function createWithTimestamps(
LockupTranched.CreateWithTimestamps calldata params
)
function createWithTimestamps(LockupTranched.CreateWithTimestamps calldata params)
external
returns (uint256 streamId);
}
8 changes: 2 additions & 6 deletions src/libraries/Helpers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ library Helpers {
//////////////////////////////////////////////////////////////////////////*/

/// @dev Calculate the timestamps and return the segments.
function calculateSegmentTimestamps(
LockupDynamic.SegmentWithDuration[] memory segments
)
function calculateSegmentTimestamps(LockupDynamic.SegmentWithDuration[] memory segments)
internal
view
returns (LockupDynamic.Segment[] memory segmentsWithTimestamps)
Expand Down Expand Up @@ -49,9 +47,7 @@ library Helpers {
}

/// @dev Calculate the timestamps and return the tranches.
function calculateTrancheTimestamps(
LockupTranched.TrancheWithDuration[] memory tranches
)
function calculateTrancheTimestamps(LockupTranched.TrancheWithDuration[] memory tranches)
internal
view
returns (LockupTranched.Tranche[] memory tranchesWithTimestamps)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ contract CreateWithDurations_LockupDynamic_Integration_Fuzz_Test is
uint128 totalAmount;
}

function testFuzz_CreateWithDurations(
LockupDynamic.SegmentWithDuration[] memory segments
)
function testFuzz_CreateWithDurations(LockupDynamic.SegmentWithDuration[] memory segments)
external
whenNotDelegateCalled
whenSegmentCountNotTooHigh
Expand Down
16 changes: 4 additions & 12 deletions test/integration/fuzz/lockup-dynamic/createWithTimestamps.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ contract CreateWithTimestamps_LockupDynamic_Integration_Fuzz_Test is
CreateWithTimestamps_Integration_Shared_Test.setUp();
}

function testFuzz_RevertWhen_SegmentCountTooHigh(
uint256 segmentCount
)
function testFuzz_RevertWhen_SegmentCountTooHigh(uint256 segmentCount)
external
whenNotDelegateCalled
whenRecipientNonZeroAddress
Expand Down Expand Up @@ -61,9 +59,7 @@ contract CreateWithTimestamps_LockupDynamic_Integration_Fuzz_Test is
createDefaultStreamWithSegments(segments);
}

function testFuzz_RevertWhen_StartTimeNotLessThanFirstSegmentTimestamp(
uint40 firstTimestamp
)
function testFuzz_RevertWhen_StartTimeNotLessThanFirstSegmentTimestamp(uint40 firstTimestamp)
external
whenNotDelegateCalled
whenRecipientNonZeroAddress
Expand Down Expand Up @@ -91,9 +87,7 @@ contract CreateWithTimestamps_LockupDynamic_Integration_Fuzz_Test is
createDefaultStreamWithSegments(segments);
}

function testFuzz_RevertWhen_DepositAmountNotEqualToSegmentAmountsSum(
uint128 depositDiff
)
function testFuzz_RevertWhen_DepositAmountNotEqualToSegmentAmountsSum(uint128 depositDiff)
external
whenNotDelegateCalled
whenRecipientNonZeroAddress
Expand Down Expand Up @@ -132,9 +126,7 @@ contract CreateWithTimestamps_LockupDynamic_Integration_Fuzz_Test is
lockupDynamic.createWithTimestamps(params);
}

function testFuzz_RevertWhen_BrokerFeeTooHigh(
Broker memory broker
)
function testFuzz_RevertWhen_BrokerFeeTooHigh(Broker memory broker)
external
whenNotDelegateCalled
whenRecipientNonZeroAddress
Expand Down
4 changes: 1 addition & 3 deletions test/integration/fuzz/lockup-dynamic/withdraw.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ contract Withdraw_LockupDynamic_Integration_Fuzz_Test is
uint128 withdrawableAmount;
}

function testFuzz_Withdraw_SegmentFuzing(
Params memory params
)
function testFuzz_Withdraw_SegmentFuzing(Params memory params)
external
whenNotDelegateCalled
givenNotNull
Expand Down
Loading

0 comments on commit f1f8ae6

Please sign in to comment.