diff --git a/script/DeployCore.s.sol b/script/DeployCore.s.sol index df6239c8a..e0a9871bd 100644 --- a/script/DeployCore.s.sol +++ b/script/DeployCore.s.sol @@ -10,7 +10,9 @@ 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 b65be9ae7..5e0e54c6a 100644 --- a/script/DeployDeterministicCore.s.sol +++ b/script/DeployDeterministicCore.s.sol @@ -11,7 +11,9 @@ 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 b06b15c64..6886d2566 100644 --- a/src/SablierV2LockupDynamic.sol +++ b/src/SablierV2LockupDynamic.sol @@ -77,7 +77,9 @@ contract SablierV2LockupDynamic is //////////////////////////////////////////////////////////////////////////*/ /// @inheritdoc ISablierV2LockupDynamic - function getSegments(uint256 streamId) + function getSegments( + uint256 streamId + ) external view override @@ -88,7 +90,9 @@ contract SablierV2LockupDynamic is } /// @inheritdoc ISablierV2LockupDynamic - function getStream(uint256 streamId) + function getStream( + uint256 streamId + ) external view override @@ -120,7 +124,9 @@ contract SablierV2LockupDynamic is } /// @inheritdoc ISablierV2LockupDynamic - function getTimestamps(uint256 streamId) + function getTimestamps( + uint256 streamId + ) external view override @@ -135,7 +141,9 @@ contract SablierV2LockupDynamic is //////////////////////////////////////////////////////////////////////////*/ /// @inheritdoc ISablierV2LockupDynamic - function createWithDurations(LockupDynamic.CreateWithDurations calldata params) + function createWithDurations( + LockupDynamic.CreateWithDurations calldata params + ) external override noDelegateCall @@ -161,7 +169,9 @@ 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 d8380cc93..0ab395aca 100644 --- a/src/SablierV2LockupLinear.sol +++ b/src/SablierV2LockupLinear.sol @@ -73,7 +73,9 @@ contract SablierV2LockupLinear is } /// @inheritdoc ISablierV2LockupLinear - function getStream(uint256 streamId) + function getStream( + uint256 streamId + ) external view override @@ -105,7 +107,9 @@ contract SablierV2LockupLinear is } /// @inheritdoc ISablierV2LockupLinear - function getTimestamps(uint256 streamId) + function getTimestamps( + uint256 streamId + ) external view override @@ -124,7 +128,9 @@ contract SablierV2LockupLinear is //////////////////////////////////////////////////////////////////////////*/ /// @inheritdoc ISablierV2LockupLinear - function createWithDurations(LockupLinear.CreateWithDurations calldata params) + function createWithDurations( + LockupLinear.CreateWithDurations calldata params + ) external override noDelegateCall @@ -160,7 +166,9 @@ 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 aaf0105a1..d8c5b4aa9 100644 --- a/src/SablierV2LockupTranched.sol +++ b/src/SablierV2LockupTranched.sol @@ -72,7 +72,9 @@ contract SablierV2LockupTranched is //////////////////////////////////////////////////////////////////////////*/ /// @inheritdoc ISablierV2LockupTranched - function getStream(uint256 streamId) + function getStream( + uint256 streamId + ) external view override @@ -104,7 +106,9 @@ contract SablierV2LockupTranched is } /// @inheritdoc ISablierV2LockupTranched - function getTimestamps(uint256 streamId) + function getTimestamps( + uint256 streamId + ) external view override @@ -115,7 +119,9 @@ contract SablierV2LockupTranched is } /// @inheritdoc ISablierV2LockupTranched - function getTranches(uint256 streamId) + function getTranches( + uint256 streamId + ) external view override @@ -130,7 +136,9 @@ contract SablierV2LockupTranched is //////////////////////////////////////////////////////////////////////////*/ /// @inheritdoc ISablierV2LockupTranched - function createWithDurations(LockupTranched.CreateWithDurations calldata params) + function createWithDurations( + LockupTranched.CreateWithDurations calldata params + ) external override noDelegateCall @@ -156,7 +164,9 @@ 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 95166bd86..2d6f7194a 100644 --- a/src/abstracts/SablierV2Lockup.sol +++ b/src/abstracts/SablierV2Lockup.sol @@ -80,7 +80,9 @@ abstract contract SablierV2Lockup is } /// @inheritdoc ISablierV2Lockup - function getDepositedAmount(uint256 streamId) + function getDepositedAmount( + uint256 streamId + ) external view override @@ -102,7 +104,9 @@ abstract contract SablierV2Lockup is } /// @inheritdoc ISablierV2Lockup - function getRefundedAmount(uint256 streamId) + function getRefundedAmount( + uint256 streamId + ) external view override @@ -123,7 +127,9 @@ abstract contract SablierV2Lockup is } /// @inheritdoc ISablierV2Lockup - function getWithdrawnAmount(uint256 streamId) + function getWithdrawnAmount( + uint256 streamId + ) external view override @@ -173,7 +179,9 @@ abstract contract SablierV2Lockup is } /// @inheritdoc ISablierV2Lockup - function refundableAmountOf(uint256 streamId) + function refundableAmountOf( + uint256 streamId + ) external view override @@ -195,7 +203,9 @@ abstract contract SablierV2Lockup is } /// @inheritdoc ISablierV2Lockup - function streamedAmountOf(uint256 streamId) + function streamedAmountOf( + uint256 streamId + ) public view override @@ -226,7 +236,9 @@ 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 f01f35a93..644b35814 100644 --- a/src/interfaces/ISablierV2LockupDynamic.sol +++ b/src/interfaces/ISablierV2LockupDynamic.sol @@ -80,7 +80,9 @@ 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); @@ -107,7 +109,9 @@ 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 cb0dbbc17..978d16b34 100644 --- a/src/interfaces/ISablierV2LockupLinear.sol +++ b/src/interfaces/ISablierV2LockupLinear.sol @@ -76,7 +76,9 @@ 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); @@ -102,7 +104,9 @@ 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 df01fdfd6..37c43e2cb 100644 --- a/src/interfaces/ISablierV2LockupTranched.sol +++ b/src/interfaces/ISablierV2LockupTranched.sol @@ -80,7 +80,9 @@ 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); @@ -107,7 +109,9 @@ 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 d4bd40b48..b5dc9d7e6 100644 --- a/src/libraries/Helpers.sol +++ b/src/libraries/Helpers.sol @@ -14,7 +14,9 @@ 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) @@ -47,7 +49,9 @@ 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 4bf6242b4..0f1ea82ab 100644 --- a/test/integration/fuzz/lockup-dynamic/createWithDurations.t.sol +++ b/test/integration/fuzz/lockup-dynamic/createWithDurations.t.sol @@ -34,7 +34,9 @@ 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 6b55b5d07..469c9a380 100644 --- a/test/integration/fuzz/lockup-dynamic/createWithTimestamps.t.sol +++ b/test/integration/fuzz/lockup-dynamic/createWithTimestamps.t.sol @@ -23,7 +23,9 @@ 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 @@ -59,7 +61,9 @@ contract CreateWithTimestamps_LockupDynamic_Integration_Fuzz_Test is createDefaultStreamWithSegments(segments); } - function testFuzz_RevertWhen_StartTimeNotLessThanFirstSegmentTimestamp(uint40 firstTimestamp) + function testFuzz_RevertWhen_StartTimeNotLessThanFirstSegmentTimestamp( + uint40 firstTimestamp + ) external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -87,7 +91,9 @@ contract CreateWithTimestamps_LockupDynamic_Integration_Fuzz_Test is createDefaultStreamWithSegments(segments); } - function testFuzz_RevertWhen_DepositAmountNotEqualToSegmentAmountsSum(uint128 depositDiff) + function testFuzz_RevertWhen_DepositAmountNotEqualToSegmentAmountsSum( + uint128 depositDiff + ) external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -126,7 +132,9 @@ 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 10d3fc893..c0e3f037c 100644 --- a/test/integration/fuzz/lockup-dynamic/withdraw.t.sol +++ b/test/integration/fuzz/lockup-dynamic/withdraw.t.sol @@ -40,7 +40,9 @@ 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 9fa96dd32..9d7a6ccbe 100644 --- a/test/integration/fuzz/lockup-linear/createWithDurations.t.sol +++ b/test/integration/fuzz/lockup-linear/createWithDurations.t.sol @@ -20,7 +20,9 @@ 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 @@ -48,7 +50,9 @@ 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 d59318ec1..47f5de399 100644 --- a/test/integration/fuzz/lockup-linear/createWithTimestamps.t.sol +++ b/test/integration/fuzz/lockup-linear/createWithTimestamps.t.sol @@ -22,7 +22,9 @@ 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 @@ -36,7 +38,9 @@ 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 16fc0b538..a26c7c3fe 100644 --- a/test/integration/fuzz/lockup-linear/streamedAmountOf.t.sol +++ b/test/integration/fuzz/lockup-linear/streamedAmountOf.t.sol @@ -24,7 +24,9 @@ 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 7bb8d459b..4363a3007 100644 --- a/test/integration/fuzz/lockup-linear/withdrawableAmountOf.t.sol +++ b/test/integration/fuzz/lockup-linear/withdrawableAmountOf.t.sol @@ -21,7 +21,9 @@ 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 10bb043d1..b2510f2db 100644 --- a/test/integration/fuzz/lockup-tranched/createWithDurations.t.sol +++ b/test/integration/fuzz/lockup-tranched/createWithDurations.t.sol @@ -34,7 +34,9 @@ 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 31d7a2122..eb562c7b4 100644 --- a/test/integration/fuzz/lockup-tranched/createWithTimestamps.t.sol +++ b/test/integration/fuzz/lockup-tranched/createWithTimestamps.t.sol @@ -23,7 +23,9 @@ 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 @@ -59,7 +61,9 @@ contract CreateWithTimestamps_LockupTranched_Integration_Fuzz_Test is createDefaultStreamWithTranches(tranches); } - function testFuzz_RevertWhen_StartTimeNotLessThanFirstTrancheTimestamp(uint40 firstTimestamp) + function testFuzz_RevertWhen_StartTimeNotLessThanFirstTrancheTimestamp( + uint40 firstTimestamp + ) external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -87,7 +91,9 @@ contract CreateWithTimestamps_LockupTranched_Integration_Fuzz_Test is createDefaultStreamWithTranches(tranches); } - function testFuzz_RevertWhen_DepositAmountNotEqualToTrancheAmountsSum(uint128 depositDiff) + function testFuzz_RevertWhen_DepositAmountNotEqualToTrancheAmountsSum( + uint128 depositDiff + ) external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -126,7 +132,9 @@ 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 7a73f5df6..7e015b4c1 100644 --- a/test/integration/fuzz/lockup-tranched/withdraw.t.sol +++ b/test/integration/fuzz/lockup-tranched/withdraw.t.sol @@ -40,7 +40,9 @@ 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 532e47b6d..1b3b007ae 100644 --- a/test/integration/fuzz/lockup/cancel.t.sol +++ b/test/integration/fuzz/lockup/cancel.t.sol @@ -11,7 +11,9 @@ 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 a5b6d5618..05f0b4fb3 100644 --- a/test/integration/fuzz/lockup/withdraw.t.sol +++ b/test/integration/fuzz/lockup/withdraw.t.sol @@ -14,7 +14,9 @@ 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 @@ -47,7 +49,9 @@ 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 941620ada..c6ce11b63 100644 --- a/test/integration/shared/lockup-dynamic/LockupDynamic.t.sol +++ b/test/integration/shared/lockup-dynamic/LockupDynamic.t.sol @@ -72,7 +72,9 @@ 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) { @@ -110,7 +112,9 @@ 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) { @@ -134,7 +138,9 @@ 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 c7344ac45..867e91680 100644 --- a/test/integration/shared/lockup-linear/LockupLinear.t.sol +++ b/test/integration/shared/lockup-linear/LockupLinear.t.sol @@ -49,7 +49,9 @@ 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) { @@ -101,7 +103,9 @@ 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 97a39415f..14ff5e920 100644 --- a/test/integration/shared/lockup-tranched/LockupTranched.t.sol +++ b/test/integration/shared/lockup-tranched/LockupTranched.t.sol @@ -72,7 +72,9 @@ 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) { @@ -112,7 +114,9 @@ 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) { @@ -130,7 +134,9 @@ 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 8496d4299..bb1c2ed59 100644 --- a/test/utils/Fuzzers.sol +++ b/test/utils/Fuzzers.sol @@ -20,7 +20,9 @@ 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) @@ -30,7 +32,9 @@ 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) @@ -199,7 +203,9 @@ 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) @@ -209,7 +215,9 @@ 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 0d7192fb1..85deee4b1 100644 --- a/test/utils/Utils.sol +++ b/test/utils/Utils.sol @@ -24,7 +24,9 @@ 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) @@ -47,7 +49,9 @@ 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)