diff --git a/script/DeployCore.s.sol b/script/DeployCore.s.sol index e0a9871bd..df6239c8a 100644 --- a/script/DeployCore.s.sol +++ b/script/DeployCore.s.sol @@ -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 diff --git a/script/DeployDeterministicCore.s.sol b/script/DeployDeterministicCore.s.sol index 5e0e54c6a..b65be9ae7 100644 --- a/script/DeployDeterministicCore.s.sol +++ b/script/DeployDeterministicCore.s.sol @@ -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 diff --git a/src/SablierV2LockupDynamic.sol b/src/SablierV2LockupDynamic.sol index 6886d2566..b06b15c64 100644 --- a/src/SablierV2LockupDynamic.sol +++ b/src/SablierV2LockupDynamic.sol @@ -77,9 +77,7 @@ contract SablierV2LockupDynamic is //////////////////////////////////////////////////////////////////////////*/ /// @inheritdoc ISablierV2LockupDynamic - function getSegments( - uint256 streamId - ) + function getSegments(uint256 streamId) external view override @@ -90,9 +88,7 @@ contract SablierV2LockupDynamic is } /// @inheritdoc ISablierV2LockupDynamic - function getStream( - uint256 streamId - ) + function getStream(uint256 streamId) external view override @@ -124,9 +120,7 @@ contract SablierV2LockupDynamic is } /// @inheritdoc ISablierV2LockupDynamic - function getTimestamps( - uint256 streamId - ) + function getTimestamps(uint256 streamId) external view override @@ -141,9 +135,7 @@ contract SablierV2LockupDynamic is //////////////////////////////////////////////////////////////////////////*/ /// @inheritdoc ISablierV2LockupDynamic - function createWithDurations( - LockupDynamic.CreateWithDurations calldata params - ) + function createWithDurations(LockupDynamic.CreateWithDurations calldata params) external override noDelegateCall @@ -169,9 +161,7 @@ contract SablierV2LockupDynamic is } /// @inheritdoc ISablierV2LockupDynamic - function createWithTimestamps( - LockupDynamic.CreateWithTimestamps calldata params - ) + function createWithTimestamps(LockupDynamic.CreateWithTimestamps calldata params) external override noDelegateCall diff --git a/src/SablierV2LockupLinear.sol b/src/SablierV2LockupLinear.sol index 0ab395aca..d8380cc93 100644 --- a/src/SablierV2LockupLinear.sol +++ b/src/SablierV2LockupLinear.sol @@ -73,9 +73,7 @@ contract SablierV2LockupLinear is } /// @inheritdoc ISablierV2LockupLinear - function getStream( - uint256 streamId - ) + function getStream(uint256 streamId) external view override @@ -107,9 +105,7 @@ contract SablierV2LockupLinear is } /// @inheritdoc ISablierV2LockupLinear - function getTimestamps( - uint256 streamId - ) + function getTimestamps(uint256 streamId) external view override @@ -128,9 +124,7 @@ contract SablierV2LockupLinear is //////////////////////////////////////////////////////////////////////////*/ /// @inheritdoc ISablierV2LockupLinear - function createWithDurations( - LockupLinear.CreateWithDurations calldata params - ) + function createWithDurations(LockupLinear.CreateWithDurations calldata params) external override noDelegateCall @@ -166,9 +160,7 @@ contract SablierV2LockupLinear is } /// @inheritdoc ISablierV2LockupLinear - function createWithTimestamps( - LockupLinear.CreateWithTimestamps calldata params - ) + function createWithTimestamps(LockupLinear.CreateWithTimestamps calldata params) external override noDelegateCall diff --git a/src/SablierV2LockupTranched.sol b/src/SablierV2LockupTranched.sol index d8c5b4aa9..aaf0105a1 100644 --- a/src/SablierV2LockupTranched.sol +++ b/src/SablierV2LockupTranched.sol @@ -72,9 +72,7 @@ contract SablierV2LockupTranched is //////////////////////////////////////////////////////////////////////////*/ /// @inheritdoc ISablierV2LockupTranched - function getStream( - uint256 streamId - ) + function getStream(uint256 streamId) external view override @@ -106,9 +104,7 @@ contract SablierV2LockupTranched is } /// @inheritdoc ISablierV2LockupTranched - function getTimestamps( - uint256 streamId - ) + function getTimestamps(uint256 streamId) external view override @@ -119,9 +115,7 @@ contract SablierV2LockupTranched is } /// @inheritdoc ISablierV2LockupTranched - function getTranches( - uint256 streamId - ) + function getTranches(uint256 streamId) external view override @@ -136,9 +130,7 @@ contract SablierV2LockupTranched is //////////////////////////////////////////////////////////////////////////*/ /// @inheritdoc ISablierV2LockupTranched - function createWithDurations( - LockupTranched.CreateWithDurations calldata params - ) + function createWithDurations(LockupTranched.CreateWithDurations calldata params) external override noDelegateCall @@ -164,9 +156,7 @@ contract SablierV2LockupTranched is } /// @inheritdoc ISablierV2LockupTranched - function createWithTimestamps( - LockupTranched.CreateWithTimestamps calldata params - ) + function createWithTimestamps(LockupTranched.CreateWithTimestamps calldata params) external override noDelegateCall diff --git a/src/abstracts/SablierV2Lockup.sol b/src/abstracts/SablierV2Lockup.sol index 2d6f7194a..95166bd86 100644 --- a/src/abstracts/SablierV2Lockup.sol +++ b/src/abstracts/SablierV2Lockup.sol @@ -80,9 +80,7 @@ abstract contract SablierV2Lockup is } /// @inheritdoc ISablierV2Lockup - function getDepositedAmount( - uint256 streamId - ) + function getDepositedAmount(uint256 streamId) external view override @@ -104,9 +102,7 @@ abstract contract SablierV2Lockup is } /// @inheritdoc ISablierV2Lockup - function getRefundedAmount( - uint256 streamId - ) + function getRefundedAmount(uint256 streamId) external view override @@ -127,9 +123,7 @@ abstract contract SablierV2Lockup is } /// @inheritdoc ISablierV2Lockup - function getWithdrawnAmount( - uint256 streamId - ) + function getWithdrawnAmount(uint256 streamId) external view override @@ -179,9 +173,7 @@ abstract contract SablierV2Lockup is } /// @inheritdoc ISablierV2Lockup - function refundableAmountOf( - uint256 streamId - ) + function refundableAmountOf(uint256 streamId) external view override @@ -203,9 +195,7 @@ abstract contract SablierV2Lockup is } /// @inheritdoc ISablierV2Lockup - function streamedAmountOf( - uint256 streamId - ) + function streamedAmountOf(uint256 streamId) public view override @@ -236,9 +226,7 @@ abstract contract SablierV2Lockup is } /// @inheritdoc ISablierV2Lockup - function withdrawableAmountOf( - uint256 streamId - ) + function withdrawableAmountOf(uint256 streamId) external view override diff --git a/src/interfaces/ISablierV2LockupDynamic.sol b/src/interfaces/ISablierV2LockupDynamic.sol index 644b35814..f01f35a93 100644 --- a/src/interfaces/ISablierV2LockupDynamic.sol +++ b/src/interfaces/ISablierV2LockupDynamic.sol @@ -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); @@ -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); } diff --git a/src/interfaces/ISablierV2LockupLinear.sol b/src/interfaces/ISablierV2LockupLinear.sol index 978d16b34..cb0dbbc17 100644 --- a/src/interfaces/ISablierV2LockupLinear.sol +++ b/src/interfaces/ISablierV2LockupLinear.sol @@ -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); @@ -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); } diff --git a/src/interfaces/ISablierV2LockupTranched.sol b/src/interfaces/ISablierV2LockupTranched.sol index 37c43e2cb..df01fdfd6 100644 --- a/src/interfaces/ISablierV2LockupTranched.sol +++ b/src/interfaces/ISablierV2LockupTranched.sol @@ -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); @@ -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); } diff --git a/src/libraries/Helpers.sol b/src/libraries/Helpers.sol index b5dc9d7e6..d4bd40b48 100644 --- a/src/libraries/Helpers.sol +++ b/src/libraries/Helpers.sol @@ -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) @@ -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) diff --git a/test/integration/fuzz/lockup-dynamic/createWithDurations.t.sol b/test/integration/fuzz/lockup-dynamic/createWithDurations.t.sol index 0f1ea82ab..4bf6242b4 100644 --- a/test/integration/fuzz/lockup-dynamic/createWithDurations.t.sol +++ b/test/integration/fuzz/lockup-dynamic/createWithDurations.t.sol @@ -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 diff --git a/test/integration/fuzz/lockup-dynamic/createWithTimestamps.t.sol b/test/integration/fuzz/lockup-dynamic/createWithTimestamps.t.sol index 469c9a380..6b55b5d07 100644 --- a/test/integration/fuzz/lockup-dynamic/createWithTimestamps.t.sol +++ b/test/integration/fuzz/lockup-dynamic/createWithTimestamps.t.sol @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/test/integration/fuzz/lockup-dynamic/withdraw.t.sol b/test/integration/fuzz/lockup-dynamic/withdraw.t.sol index c0e3f037c..10d3fc893 100644 --- a/test/integration/fuzz/lockup-dynamic/withdraw.t.sol +++ b/test/integration/fuzz/lockup-dynamic/withdraw.t.sol @@ -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 diff --git a/test/integration/fuzz/lockup-linear/createWithDurations.t.sol b/test/integration/fuzz/lockup-linear/createWithDurations.t.sol index 9d7a6ccbe..9fa96dd32 100644 --- a/test/integration/fuzz/lockup-linear/createWithDurations.t.sol +++ b/test/integration/fuzz/lockup-linear/createWithDurations.t.sol @@ -20,9 +20,7 @@ contract CreateWithDurations_LockupLinear_Integration_Fuzz_Test is CreateWithDurations_Integration_Shared_Test.setUp(); } - function testFuzz_RevertWhen_TotalDurationCalculationOverflows( - LockupLinear.Durations memory durations - ) + function testFuzz_RevertWhen_TotalDurationCalculationOverflows(LockupLinear.Durations memory durations) external whenNotDelegateCalled whenCliffDurationCalculationDoesNotOverflow @@ -50,9 +48,7 @@ contract CreateWithDurations_LockupLinear_Integration_Fuzz_Test is createDefaultStreamWithDurations(durations); } - function testFuzz_CreateWithDurations( - LockupLinear.Durations memory durations - ) + function testFuzz_CreateWithDurations(LockupLinear.Durations memory durations) external whenNotDelegateCalled whenCliffDurationCalculationDoesNotOverflow diff --git a/test/integration/fuzz/lockup-linear/createWithTimestamps.t.sol b/test/integration/fuzz/lockup-linear/createWithTimestamps.t.sol index 47f5de399..d59318ec1 100644 --- a/test/integration/fuzz/lockup-linear/createWithTimestamps.t.sol +++ b/test/integration/fuzz/lockup-linear/createWithTimestamps.t.sol @@ -22,9 +22,7 @@ contract CreateWithTimestamps_LockupLinear_Integration_Fuzz_Test is CreateWithTimestamps_Integration_Shared_Test.setUp(); } - function testFuzz_RevertWhen_BrokerFeeTooHigh( - Broker memory broker - ) + function testFuzz_RevertWhen_BrokerFeeTooHigh(Broker memory broker) external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -38,9 +36,7 @@ contract CreateWithTimestamps_LockupLinear_Integration_Fuzz_Test is createDefaultStreamWithBroker(broker); } - function testFuzz_RevertWhen_StartTimeNotLessThanCliffTime( - uint40 startTime - ) + function testFuzz_RevertWhen_StartTimeNotLessThanCliffTime(uint40 startTime) external whenNotDelegateCalled whenRecipientNonZeroAddress diff --git a/test/integration/fuzz/lockup-linear/streamedAmountOf.t.sol b/test/integration/fuzz/lockup-linear/streamedAmountOf.t.sol index a26c7c3fe..16fc0b538 100644 --- a/test/integration/fuzz/lockup-linear/streamedAmountOf.t.sol +++ b/test/integration/fuzz/lockup-linear/streamedAmountOf.t.sol @@ -24,9 +24,7 @@ contract StreamedAmountOf_LockupLinear_Integration_Fuzz_Test is resetPrank({ msgSender: users.sender }); } - function testFuzz_StreamedAmountOf_CliffTimeInTheFuture( - uint40 timeJump - ) + function testFuzz_StreamedAmountOf_CliffTimeInTheFuture(uint40 timeJump) external givenNotNull givenStreamHasNotBeenCanceled diff --git a/test/integration/fuzz/lockup-linear/withdrawableAmountOf.t.sol b/test/integration/fuzz/lockup-linear/withdrawableAmountOf.t.sol index 4363a3007..7bb8d459b 100644 --- a/test/integration/fuzz/lockup-linear/withdrawableAmountOf.t.sol +++ b/test/integration/fuzz/lockup-linear/withdrawableAmountOf.t.sol @@ -21,9 +21,7 @@ contract WithdrawableAmountOf_LockupLinear_Integration_Fuzz_Test is WithdrawableAmountOf_Integration_Shared_Test.setUp(); } - function testFuzz_WithdrawableAmountOf_CliffTimeInTheFuture( - uint40 timeJump - ) + function testFuzz_WithdrawableAmountOf_CliffTimeInTheFuture(uint40 timeJump) external givenNotNull givenStreamHasNotBeenCanceled diff --git a/test/integration/fuzz/lockup-tranched/createWithDurations.t.sol b/test/integration/fuzz/lockup-tranched/createWithDurations.t.sol index b2510f2db..10bb043d1 100644 --- a/test/integration/fuzz/lockup-tranched/createWithDurations.t.sol +++ b/test/integration/fuzz/lockup-tranched/createWithDurations.t.sol @@ -34,9 +34,7 @@ contract CreateWithDurations_LockupTranched_Integration_Fuzz_Test is uint128 totalAmount; } - function testFuzz_CreateWithDurations( - LockupTranched.TrancheWithDuration[] memory tranches - ) + function testFuzz_CreateWithDurations(LockupTranched.TrancheWithDuration[] memory tranches) external whenNotDelegateCalled whenTrancheCountNotTooHigh diff --git a/test/integration/fuzz/lockup-tranched/createWithTimestamps.t.sol b/test/integration/fuzz/lockup-tranched/createWithTimestamps.t.sol index eb562c7b4..31d7a2122 100644 --- a/test/integration/fuzz/lockup-tranched/createWithTimestamps.t.sol +++ b/test/integration/fuzz/lockup-tranched/createWithTimestamps.t.sol @@ -23,9 +23,7 @@ contract CreateWithTimestamps_LockupTranched_Integration_Fuzz_Test is CreateWithTimestamps_Integration_Shared_Test.setUp(); } - function testFuzz_RevertWhen_TrancheCountTooHigh( - uint256 trancheCount - ) + function testFuzz_RevertWhen_TrancheCountTooHigh(uint256 trancheCount) external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -61,9 +59,7 @@ contract CreateWithTimestamps_LockupTranched_Integration_Fuzz_Test is createDefaultStreamWithTranches(tranches); } - function testFuzz_RevertWhen_StartTimeNotLessThanFirstTrancheTimestamp( - uint40 firstTimestamp - ) + function testFuzz_RevertWhen_StartTimeNotLessThanFirstTrancheTimestamp(uint40 firstTimestamp) external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -91,9 +87,7 @@ contract CreateWithTimestamps_LockupTranched_Integration_Fuzz_Test is createDefaultStreamWithTranches(tranches); } - function testFuzz_RevertWhen_DepositAmountNotEqualToTrancheAmountsSum( - uint128 depositDiff - ) + function testFuzz_RevertWhen_DepositAmountNotEqualToTrancheAmountsSum(uint128 depositDiff) external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -132,9 +126,7 @@ contract CreateWithTimestamps_LockupTranched_Integration_Fuzz_Test is lockupTranched.createWithTimestamps(params); } - function testFuzz_RevertWhen_BrokerFeeTooHigh( - Broker memory broker - ) + function testFuzz_RevertWhen_BrokerFeeTooHigh(Broker memory broker) external whenNotDelegateCalled whenRecipientNonZeroAddress diff --git a/test/integration/fuzz/lockup-tranched/withdraw.t.sol b/test/integration/fuzz/lockup-tranched/withdraw.t.sol index 7e015b4c1..7a73f5df6 100644 --- a/test/integration/fuzz/lockup-tranched/withdraw.t.sol +++ b/test/integration/fuzz/lockup-tranched/withdraw.t.sol @@ -40,9 +40,7 @@ contract Withdraw_LockupTranched_Integration_Fuzz_Test is uint128 withdrawableAmount; } - function testFuzz_Withdraw_TrancheFuzzing( - Params memory params - ) + function testFuzz_Withdraw_TrancheFuzzing(Params memory params) external whenNotDelegateCalled givenNotNull diff --git a/test/integration/fuzz/lockup/cancel.t.sol b/test/integration/fuzz/lockup/cancel.t.sol index 1b3b007ae..532e47b6d 100644 --- a/test/integration/fuzz/lockup/cancel.t.sol +++ b/test/integration/fuzz/lockup/cancel.t.sol @@ -11,9 +11,7 @@ abstract contract Cancel_Integration_Fuzz_Test is Integration_Test, Cancel_Integ Cancel_Integration_Shared_Test.setUp(); } - function testFuzz_Cancel_StatusPending( - uint256 timeJump - ) + function testFuzz_Cancel_StatusPending(uint256 timeJump) external whenNotDelegateCalled givenNotNull diff --git a/test/integration/fuzz/lockup/withdraw.t.sol b/test/integration/fuzz/lockup/withdraw.t.sol index 05f0b4fb3..a5b6d5618 100644 --- a/test/integration/fuzz/lockup/withdraw.t.sol +++ b/test/integration/fuzz/lockup/withdraw.t.sol @@ -14,9 +14,7 @@ abstract contract Withdraw_Integration_Fuzz_Test is Integration_Test, Withdraw_I /// @dev Given enough fuzz runs, all of the following scenarios will be fuzzed: /// /// - Multiple caller addresses. - function testFuzz_Withdraw_UnknownCaller( - address caller - ) + function testFuzz_Withdraw_UnknownCaller(address caller) external whenNotDelegateCalled givenNotNull @@ -49,9 +47,7 @@ abstract contract Withdraw_Integration_Fuzz_Test is Integration_Test, Withdraw_I /// @dev Given enough fuzz runs, all of the following scenarios will be fuzzed: /// /// - Multiple values for the withdrawal address. - function testFuzz_Withdraw_CallerApprovedOperator( - address to - ) + function testFuzz_Withdraw_CallerApprovedOperator(address to) external whenNotDelegateCalled givenNotNull diff --git a/test/integration/shared/lockup-dynamic/LockupDynamic.t.sol b/test/integration/shared/lockup-dynamic/LockupDynamic.t.sol index c6ce11b63..941620ada 100644 --- a/test/integration/shared/lockup-dynamic/LockupDynamic.t.sol +++ b/test/integration/shared/lockup-dynamic/LockupDynamic.t.sol @@ -72,9 +72,7 @@ abstract contract LockupDynamic_Integration_Shared_Test is Lockup_Integration_Sh } /// @dev Creates the default stream with the provided durations. - function createDefaultStreamWithDurations( - LockupDynamic.SegmentWithDuration[] memory segments - ) + function createDefaultStreamWithDurations(LockupDynamic.SegmentWithDuration[] memory segments) internal returns (uint256 streamId) { @@ -112,9 +110,7 @@ abstract contract LockupDynamic_Integration_Shared_Test is Lockup_Integration_Sh } /// @dev Creates the default stream with the provided segments. - function createDefaultStreamWithSegments( - LockupDynamic.Segment[] memory segments - ) + function createDefaultStreamWithSegments(LockupDynamic.Segment[] memory segments) internal returns (uint256 streamId) { @@ -138,9 +134,7 @@ abstract contract LockupDynamic_Integration_Shared_Test is Lockup_Integration_Sh } /// @dev Creates the default stream with the provided timestamps. - function createDefaultStreamWithTimestamps( - LockupDynamic.Timestamps memory timestamps - ) + function createDefaultStreamWithTimestamps(LockupDynamic.Timestamps memory timestamps) internal returns (uint256 streamId) { diff --git a/test/integration/shared/lockup-linear/LockupLinear.t.sol b/test/integration/shared/lockup-linear/LockupLinear.t.sol index 867e91680..c7344ac45 100644 --- a/test/integration/shared/lockup-linear/LockupLinear.t.sol +++ b/test/integration/shared/lockup-linear/LockupLinear.t.sol @@ -49,9 +49,7 @@ abstract contract LockupLinear_Integration_Shared_Test is Lockup_Integration_Sha } /// @dev Creates the default stream with the provided durations. - function createDefaultStreamWithDurations( - LockupLinear.Durations memory durations - ) + function createDefaultStreamWithDurations(LockupLinear.Durations memory durations) internal returns (uint256 streamId) { @@ -103,9 +101,7 @@ abstract contract LockupLinear_Integration_Shared_Test is Lockup_Integration_Sha } /// @dev Creates the default stream with the provided timestamps. - function createDefaultStreamWithTimestamps( - LockupLinear.Timestamps memory timestamps - ) + function createDefaultStreamWithTimestamps(LockupLinear.Timestamps memory timestamps) internal returns (uint256 streamId) { diff --git a/test/integration/shared/lockup-tranched/LockupTranched.t.sol b/test/integration/shared/lockup-tranched/LockupTranched.t.sol index 14ff5e920..97a39415f 100644 --- a/test/integration/shared/lockup-tranched/LockupTranched.t.sol +++ b/test/integration/shared/lockup-tranched/LockupTranched.t.sol @@ -72,9 +72,7 @@ abstract contract LockupTranched_Integration_Shared_Test is Lockup_Integration_S } /// @dev Creates the default stream with the provided durations. - function createDefaultStreamWithDurations( - LockupTranched.TrancheWithDuration[] memory tranches - ) + function createDefaultStreamWithDurations(LockupTranched.TrancheWithDuration[] memory tranches) internal returns (uint256 streamId) { @@ -114,9 +112,7 @@ abstract contract LockupTranched_Integration_Shared_Test is Lockup_Integration_S } /// @dev Creates the default stream with the provided timestamps. - function createDefaultStreamWithTimestamps( - LockupTranched.Timestamps memory timestamps - ) + function createDefaultStreamWithTimestamps(LockupTranched.Timestamps memory timestamps) internal returns (uint256 streamId) { @@ -134,9 +130,7 @@ abstract contract LockupTranched_Integration_Shared_Test is Lockup_Integration_S } /// @dev Creates the default stream with the provided tranches. - function createDefaultStreamWithTranches( - LockupTranched.Tranche[] memory tranches - ) + function createDefaultStreamWithTranches(LockupTranched.Tranche[] memory tranches) internal returns (uint256 streamId) { diff --git a/test/utils/Fuzzers.sol b/test/utils/Fuzzers.sol index bb1c2ed59..8496d4299 100644 --- a/test/utils/Fuzzers.sol +++ b/test/utils/Fuzzers.sol @@ -20,9 +20,7 @@ abstract contract Fuzzers is Constants, Utils { //////////////////////////////////////////////////////////////////////////*/ /// @dev Just like {fuzzDynamicStreamAmounts} but with defaults. - function fuzzDynamicStreamAmounts( - LockupDynamic.Segment[] memory segments - ) + function fuzzDynamicStreamAmounts(LockupDynamic.Segment[] memory segments) internal view returns (uint128 totalAmount, Lockup.CreateAmounts memory createAmounts) @@ -32,9 +30,7 @@ abstract contract Fuzzers is Constants, Utils { } /// @dev Just like {fuzzDynamicStreamAmounts} but with defaults. - function fuzzDynamicStreamAmounts( - LockupDynamic.SegmentWithDuration[] memory segments - ) + function fuzzDynamicStreamAmounts(LockupDynamic.SegmentWithDuration[] memory segments) internal view returns (uint128 totalAmount, Lockup.CreateAmounts memory createAmounts) @@ -203,9 +199,7 @@ abstract contract Fuzzers is Constants, Utils { } /// @dev Just like {fuzzTranchedStreamAmounts} but with defaults. - function fuzzTranchedStreamAmounts( - LockupTranched.Tranche[] memory tranches - ) + function fuzzTranchedStreamAmounts(LockupTranched.Tranche[] memory tranches) internal view returns (uint128 totalAmount, Lockup.CreateAmounts memory createAmounts) @@ -215,9 +209,7 @@ abstract contract Fuzzers is Constants, Utils { } /// @dev Just like {fuzzTranchedStreamAmounts} but with defaults. - function fuzzTranchedStreamAmounts( - LockupTranched.TrancheWithDuration[] memory tranches - ) + function fuzzTranchedStreamAmounts(LockupTranched.TrancheWithDuration[] memory tranches) internal view returns (uint128 totalAmount, Lockup.CreateAmounts memory createAmounts) diff --git a/test/utils/Utils.sol b/test/utils/Utils.sol index 85deee4b1..0d7192fb1 100644 --- a/test/utils/Utils.sol +++ b/test/utils/Utils.sol @@ -24,9 +24,7 @@ abstract contract Utils is CommonBase, PRBMathUtils { } /// @dev Turns the segments with durations into canonical segments, which have timestamps. - function getSegmentsWithTimestamps( - LockupDynamic.SegmentWithDuration[] memory segments - ) + function getSegmentsWithTimestamps(LockupDynamic.SegmentWithDuration[] memory segments) internal view returns (LockupDynamic.Segment[] memory segmentsWithTimestamps) @@ -49,9 +47,7 @@ abstract contract Utils is CommonBase, PRBMathUtils { } /// @dev Turns the tranches with durations into canonical tranches, which have timestamps. - function getTranchesWithTimestamps( - LockupTranched.TrancheWithDuration[] memory tranches - ) + function getTranchesWithTimestamps(LockupTranched.TrancheWithDuration[] memory tranches) internal view returns (LockupTranched.Tranche[] memory tranchesWithTimestamps)