diff --git a/src/abstracts/SablierV2ProxyTarget.sol b/src/abstracts/SablierV2ProxyTarget.sol index 7e294b96..b8a2b3d7 100644 --- a/src/abstracts/SablierV2ProxyTarget.sol +++ b/src/abstracts/SablierV2ProxyTarget.sol @@ -168,7 +168,7 @@ abstract contract SablierV2ProxyTarget is } /// @inheritdoc ISablierV2ProxyTarget - function withdrawMultipleToRecipient( + function withdrawMultipleToRecipients( ISablierV2Lockup lockup, uint256[] calldata streamIds, uint128[] calldata amounts diff --git a/src/interfaces/ISablierV2ProxyTarget.sol b/src/interfaces/ISablierV2ProxyTarget.sol index 6385d9b1..abba0b47 100644 --- a/src/interfaces/ISablierV2ProxyTarget.sol +++ b/src/interfaces/ISablierV2ProxyTarget.sol @@ -94,7 +94,7 @@ interface ISablierV2ProxyTarget { /// /// Requirements: /// - Must be delegate called. - function withdrawMultipleToRecipient( + function withdrawMultipleToRecipients( ISablierV2Lockup lockup, uint256[] calldata streamIds, uint128[] calldata amounts diff --git a/test/integration/target/TargetApprove.t.sol b/test/integration/target/TargetApprove.t.sol index 2a8bd975..e79e661a 100644 --- a/test/integration/target/TargetApprove.t.sol +++ b/test/integration/target/TargetApprove.t.sol @@ -19,8 +19,8 @@ import { Withdraw_Integration_Test } from "./withdraw/withdraw.t.sol"; import { WithdrawMax_Integration_Test } from "./withdraw-max/withdrawMax.t.sol"; import { WithdrawMaxAndTransfer_Integration_Test } from "./withdraw-max-and-transfer/withdrawMaxAndTransfer.t.sol"; import { WithdrawMultiple_Integration_Test } from "./withdraw-multiple/withdrawMultiple.t.sol"; -import { WithdrawMultipleToRecipient_Integration_Test } from - "./withdraw-multiple-to-recipient/withdrawMultipleToRecipient.t.sol"; +import { WithdrawMultipleToRecipients_Integration_Test } from + "./withdraw-multiple-to-recipients/withdrawMultipleToRecipients.t.sol"; import { WrapAndCreate_Integration_Test } from "./wrap-and-create/wrapAndCreate.t.sol"; abstract contract TargetApprove_Integration_Test is Integration_Test { @@ -163,17 +163,17 @@ contract WithdrawMultiple_TargetApprove_Integration_Test is } } -contract WithdrawMultipleToRecipient_TargetApprove_Integration_Test is +contract WithdrawMultipleToRecipients_TargetApprove_Integration_Test is TargetApprove_Integration_Test, - WithdrawMultipleToRecipient_Integration_Test + WithdrawMultipleToRecipients_Integration_Test { function setUp() public virtual - override(TargetApprove_Integration_Test, WithdrawMultipleToRecipient_Integration_Test) + override(TargetApprove_Integration_Test, WithdrawMultipleToRecipients_Integration_Test) { TargetApprove_Integration_Test.setUp(); - WithdrawMultipleToRecipient_Integration_Test.setUp(); + WithdrawMultipleToRecipients_Integration_Test.setUp(); } } diff --git a/test/integration/target/TargetPermit2.t.sol b/test/integration/target/TargetPermit2.t.sol index 680ac6cf..1e14cdc7 100644 --- a/test/integration/target/TargetPermit2.t.sol +++ b/test/integration/target/TargetPermit2.t.sol @@ -19,8 +19,8 @@ import { Withdraw_Integration_Test } from "./withdraw/withdraw.t.sol"; import { WithdrawMax_Integration_Test } from "./withdraw-max/withdrawMax.t.sol"; import { WithdrawMaxAndTransfer_Integration_Test } from "./withdraw-max-and-transfer/withdrawMaxAndTransfer.t.sol"; import { WithdrawMultiple_Integration_Test } from "./withdraw-multiple/withdrawMultiple.t.sol"; -import { WithdrawMultipleToRecipient_Integration_Test } from - "./withdraw-multiple-to-recipient/withdrawMultipleToRecipient.t.sol"; +import { WithdrawMultipleToRecipients_Integration_Test } from + "./withdraw-multiple-to-recipients/withdrawMultipleToRecipients.t.sol"; import { WrapAndCreate_Integration_Test } from "./wrap-and-create/wrapAndCreate.t.sol"; abstract contract TargetPermit2_Integration_Test is Integration_Test { @@ -163,17 +163,17 @@ contract WithdrawMultiple_TargetPermit2_Integration_Test is } } -contract WithdrawMultipleToRecipient_TargetPermit2_Integration_Test is +contract WithdrawMultipleToRecipients_TargetPermit2_Integration_Test is TargetPermit2_Integration_Test, - WithdrawMultipleToRecipient_Integration_Test + WithdrawMultipleToRecipients_Integration_Test { function setUp() public virtual - override(TargetPermit2_Integration_Test, WithdrawMultipleToRecipient_Integration_Test) + override(TargetPermit2_Integration_Test, WithdrawMultipleToRecipients_Integration_Test) { TargetPermit2_Integration_Test.setUp(); - WithdrawMultipleToRecipient_Integration_Test.setUp(); + WithdrawMultipleToRecipients_Integration_Test.setUp(); } } diff --git a/test/integration/target/TargetPush.t.sol b/test/integration/target/TargetPush.t.sol index 6d1b0661..463e6f8f 100644 --- a/test/integration/target/TargetPush.t.sol +++ b/test/integration/target/TargetPush.t.sol @@ -19,8 +19,8 @@ import { Withdraw_Integration_Test } from "./withdraw/withdraw.t.sol"; import { WithdrawMax_Integration_Test } from "./withdraw-max/withdrawMax.t.sol"; import { WithdrawMaxAndTransfer_Integration_Test } from "./withdraw-max-and-transfer/withdrawMaxAndTransfer.t.sol"; import { WithdrawMultiple_Integration_Test } from "./withdraw-multiple/withdrawMultiple.t.sol"; -import { WithdrawMultipleToRecipient_Integration_Test } from - "./withdraw-multiple-to-recipient/withdrawMultipleToRecipient.t.sol"; +import { WithdrawMultipleToRecipients_Integration_Test } from + "./withdraw-multiple-to-recipients/withdrawMultipleToRecipients.t.sol"; import { WrapAndCreate_Integration_Test } from "./wrap-and-create/wrapAndCreate.t.sol"; abstract contract TargetPush_Integration_Test is Integration_Test { @@ -153,17 +153,17 @@ contract WithdrawMultiple_TargetPush_Integration_Test is } } -contract WithdrawMultipleToRecipient_TargetPush_Integration_Test is +contract WithdrawMultipleToRecipients_TargetPush_Integration_Test is TargetPush_Integration_Test, - WithdrawMultipleToRecipient_Integration_Test + WithdrawMultipleToRecipients_Integration_Test { function setUp() public virtual - override(TargetPush_Integration_Test, WithdrawMultipleToRecipient_Integration_Test) + override(TargetPush_Integration_Test, WithdrawMultipleToRecipients_Integration_Test) { TargetPush_Integration_Test.setUp(); - WithdrawMultipleToRecipient_Integration_Test.setUp(); + WithdrawMultipleToRecipients_Integration_Test.setUp(); } } diff --git a/test/integration/target/withdraw-multiple-to-recipient/withdrawMultipleToRecipient.t.sol b/test/integration/target/withdraw-multiple-to-recipients/withdrawMultipleToRecipients.t.sol similarity index 76% rename from test/integration/target/withdraw-multiple-to-recipient/withdrawMultipleToRecipient.t.sol rename to test/integration/target/withdraw-multiple-to-recipients/withdrawMultipleToRecipients.t.sol index a166140f..84e19dfb 100644 --- a/test/integration/target/withdraw-multiple-to-recipient/withdrawMultipleToRecipient.t.sol +++ b/test/integration/target/withdraw-multiple-to-recipients/withdrawMultipleToRecipients.t.sol @@ -7,14 +7,14 @@ import { Errors } from "src/libraries/Errors.sol"; import { Target_Integration_Test } from "../Target.t.sol"; -abstract contract WithdrawMultipleToRecipient_Integration_Test is Target_Integration_Test { +abstract contract WithdrawMultipleToRecipients_Integration_Test is Target_Integration_Test { function setUp() public virtual override { } function test_RevertWhen_NotDelegateCalled() external { uint256[] memory streamIds; uint128[] memory amounts; vm.expectRevert(Errors.CallNotDelegateCall.selector); - target.withdrawMultipleToRecipient(lockupLinear, streamIds, amounts); + target.withdrawMultipleToRecipients(lockupLinear, streamIds, amounts); } modifier whenDelegateCalled() { @@ -29,7 +29,7 @@ abstract contract WithdrawMultipleToRecipient_Integration_Test is Target_Integra Errors.SablierV2ProxyTarget_WithdrawArrayCountsNotEqual.selector, streamIds.length, amounts.length ) ); - bytes memory data = abi.encodeCall(target.withdrawMultipleToRecipient, (lockupLinear, streamIds, amounts)); + bytes memory data = abi.encodeCall(target.withdrawMultipleToRecipients, (lockupLinear, streamIds, amounts)); aliceProxy.execute(address(target), data); } @@ -37,10 +37,10 @@ abstract contract WithdrawMultipleToRecipient_Integration_Test is Target_Integra _; } - function test_WithdrawMultipleToRecipient_ArrayCountsZero() external whenDelegateCalled whenArrayCountsAreEqual { + function test_WithdrawMultipleToRecipients_ArrayCountsZero() external whenDelegateCalled whenArrayCountsAreEqual { uint256[] memory streamIds = new uint256[](0); uint128[] memory amounts = new uint128[](0); - bytes memory data = abi.encodeCall(target.withdrawMultipleToRecipient, (lockupLinear, streamIds, amounts)); + bytes memory data = abi.encodeCall(target.withdrawMultipleToRecipients, (lockupLinear, streamIds, amounts)); aliceProxy.execute(address(target), data); } @@ -48,27 +48,27 @@ abstract contract WithdrawMultipleToRecipient_Integration_Test is Target_Integra _; } - function test_WithdrawMultipleToRecipient_LockupDynamic() + function test_WithdrawMultipleToRecipients_LockupDynamic() external whenDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero { uint256[] memory streamIds = batchCreateWithMilestones(); - test_WithdrawMultipleToRecipient(lockupDynamic, streamIds); + test_WithdrawMultipleToRecipients(lockupDynamic, streamIds); } - function test_WithdrawMultipleToRecipient_LockupLinear() + function test_WithdrawMultipleToRecipients_LockupLinear() external whenDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero { uint256[] memory streamIds = batchCreateWithRange(); - test_WithdrawMultipleToRecipient(lockupLinear, streamIds); + test_WithdrawMultipleToRecipients(lockupLinear, streamIds); } - function test_WithdrawMultipleToRecipient(ISablierV2Lockup lockup, uint256[] memory streamIds) internal { + function test_WithdrawMultipleToRecipients(ISablierV2Lockup lockup, uint256[] memory streamIds) internal { // Simulate the passage of time. vm.warp(defaults.CLIFF_TIME()); @@ -83,7 +83,7 @@ abstract contract WithdrawMultipleToRecipient_Integration_Test is Target_Integra amounts[i] = withdrawAmount; } - bytes memory data = abi.encodeCall(target.withdrawMultipleToRecipient, (lockup, streamIds, amounts)); + bytes memory data = abi.encodeCall(target.withdrawMultipleToRecipients, (lockup, streamIds, amounts)); aliceProxy.execute(address(target), data); // Assert that the withdrawn amount has been updated for all streams. diff --git a/test/integration/target/withdraw-multiple-to-recipient/withdrawMultipleToRecipient.tree b/test/integration/target/withdraw-multiple-to-recipients/withdrawMultipleToRecipients.tree similarity index 89% rename from test/integration/target/withdraw-multiple-to-recipient/withdrawMultipleToRecipient.tree rename to test/integration/target/withdraw-multiple-to-recipients/withdrawMultipleToRecipients.tree index 06aa7f54..b906b855 100644 --- a/test/integration/target/withdraw-multiple-to-recipient/withdrawMultipleToRecipient.tree +++ b/test/integration/target/withdraw-multiple-to-recipients/withdrawMultipleToRecipients.tree @@ -1,4 +1,4 @@ -withdrawMultipleToRecipient.t.sol +withdrawMultipleToRecipients.t.sol ├── when not delegate called │ └── it should revert └── when delegate called