Skip to content

Commit

Permalink
refine by PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alex0207s committed Jan 13, 2025
1 parent 67be7cc commit 56723b9
Show file tree
Hide file tree
Showing 28 changed files with 165 additions and 161 deletions.
4 changes: 2 additions & 2 deletions snapshots/AdminManagement.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"testApproveTokens: approveTokens()": "136967",
"testRescueTokens: rescueTokens()": "86851"
"approveTokens(): testApproveTokens": "136967",
"rescueTokens(): testRescueTokens": "86851"
}
12 changes: 6 additions & 6 deletions snapshots/AllowanceTarget.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"testSpendFromUserTo: spendFromUserTo()": "63533",
"testSpendFromUserToAfterUnpause: pause()": "27667",
"testSpendFromUserToAfterUnpause: spendFromUserTo()": "63533",
"testSpendFromUserToAfterUnpause: unpause()": "27645",
"testSpendFromUserToWithDeflationaryToken: spendFromUserTo()": "91576",
"testSpendFromUserToWithNoReturnValueToken: spendFromUserTo()": "68943"
"pause(): testSpendFromUserToAfterUnpause": "27667",
"spendFromUserTo(): testSpendFromUserTo": "63533",
"spendFromUserTo(): testSpendFromUserToAfterUnpause": "63533",
"spendFromUserTo(): testSpendFromUserToWithDeflationaryToken": "91576",
"spendFromUserTo(): testSpendFromUserToWithNoReturnValueToken": "68943",
"unpause(): testSpendFromUserToAfterUnpause": "27645"
}
18 changes: 9 additions & 9 deletions snapshots/Asset.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"testDoNothingIfTransferToSelf: transferTo()": "22431",
"testDoNothingIfTransferWithZeroAmount: transferTo()": "22419",
"testGetBalance(ETH_ADDRESS): getBalance()": "764",
"testGetBalance(ZERO_ADDRESS): getBalance()": "781",
"testGetBalance: getBalance()": "6107",
"testIsETH(ETH_ADDRESS): isETH()": "441",
"testIsETH2(ZERO_ADDRESS): isETH()": "458",
"testTransferETH: transferTo()": "57012",
"testTransferToken: transferTo()": "51501"
"getBalance(): testGetBalance": "6107",
"getBalance(): testGetBalance(ETH_ADDRESS)": "764",
"getBalance(): testGetBalance(ZERO_ADDRESS)": "781",
"isETH(): testIsETH(ETH_ADDRESS)": "441",
"isETH(): testIsETH2(ZERO_ADDRESS)": "458",
"transferTo(): testDoNothingIfTransferToSelf": "22431",
"transferTo(): testDoNothingIfTransferWithZeroAmount": "22419",
"transferTo(): testTransferETH": "57012",
"transferTo(): testTransferToken": "51501"
}
8 changes: 4 additions & 4 deletions snapshots/CoordinatedTaker.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"testApproveTokens: approveTokens()": "54307",
"testFillWithETH: submitLimitOrderFill()": "192971",
"testFillWithPermission: submitLimitOrderFill()": "256473",
"testSetCoordinator: setCoordinator()": "30043"
"approveTokens(): testApproveTokens": "54307",
"setCoordinator(): testSetCoordinator": "30043",
"submitLimitOrderFill(): testFillWithETH": "192971",
"submitLimitOrderFill(): testFillWithPermission": "256473"
}
6 changes: 3 additions & 3 deletions snapshots/EIP712.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"testDomainSeparatorOnChain: EIP712_DOMAIN_SEPARATOR()": "276",
"testDomainSeparatorOnDifferentChain: EIP712_DOMAIN_SEPARATOR()": "626",
"testGetEIP712Hash: getEIP712Hash()": "828"
"EIP712_DOMAIN_SEPARATOR(): testDomainSeparatorOnChain": "276",
"EIP712_DOMAIN_SEPARATOR(): testDomainSeparatorOnDifferentChain": "626",
"getEIP712Hash(): testGetEIP712Hash": "828"
}
14 changes: 7 additions & 7 deletions snapshots/GenericSwap.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"testGenericSwapRelayed: executeSwapWithSig()": "283756",
"testGenericSwapWithUniswap: executeSwap()": "251909",
"testLeaveOneWeiWithMultipleUsers(the first deposit): executeSwap()": "251909",
"testLeaveOneWeiWithMultipleUsers(the second deposit): executeSwap()": "208263",
"testSwapWithETHInput: executeSwap()": "100382",
"testSwapWithETHOutput: executeSwap()": "130241",
"testSwapWithLessOutputButWithinTolerance: executeSwap()": "160688"
"executeSwap(): testGenericSwapWithUniswap": "251909",
"executeSwap(): testLeaveOneWeiWithMultipleUsers(the first deposit)": "251909",
"executeSwap(): testLeaveOneWeiWithMultipleUsers(the second deposit)": "208263",
"executeSwap(): testSwapWithETHInput": "100382",
"executeSwap(): testSwapWithETHOutput": "130241",
"executeSwap(): testSwapWithLessOutputButWithinTolerance": "160688",
"executeSwapWithSig(): testGenericSwapRelayed": "283756"
}
36 changes: 18 additions & 18 deletions snapshots/LimitOrderSwap.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"testCancelOrder: cancelOrder()": "52753",
"testFillLimitOrderWithETH: fillLimitOrder()": "158029",
"testFillWithBetterTakingAmount: fillLimitOrder()": "215471",
"testFillWithBetterTakingAmountButGetAdjusted: fillLimitOrder()": "215705",
"testFillWithETHRefund: fillLimitOrder()": "165308",
"testFillWithFOK: fillLimitOrderFullOrKill()": "215449",
"testFillWithLargerVolumeAndSettleAsManyAsPossible: fillLimitOrder()": "215693",
"testFillWithoutMakerSigForVerifiedOrder(without makerSig): fillLimitOrder()": "120983",
"testFillWithoutMakerSigForVerifiedOrder: fillLimitOrder()": "215471",
"testFullyFillLimitOrder: fillLimitOrder()": "215471",
"testFullyFillLimitOrderUsingAMM: fillLimitOrder()": "235046",
"testGroupFillRingTrade: fillLimitOrderGroup()": "291749",
"testGroupFillWithPartialWETHUnwrap: fillLimitOrderGroup()": "277818",
"testGroupFillWithProfit: fillLimitOrderGroup()": "225225",
"testGroupFillWithTakerPrefundETH: fillLimitOrderGroup()": "198117",
"testGroupFillWithWETHUnwrap: fillLimitOrderGroup()": "198117",
"testPartialFillLargeOrderWithSmallOrders: fillLimitOrderGroup()": "265910",
"testPartiallyFillLimitOrder: fillLimitOrder()": "215471"
"cancelOrder(): testCancelOrder": "52753",
"fillLimitOrder(): testFillLimitOrderWithETH": "158029",
"fillLimitOrder(): testFillWithBetterTakingAmount": "215471",
"fillLimitOrder(): testFillWithBetterTakingAmountButGetAdjusted": "215705",
"fillLimitOrder(): testFillWithETHRefund": "165308",
"fillLimitOrder(): testFillWithLargerVolumeAndSettleAsManyAsPossible": "215693",
"fillLimitOrder(): testFillWithoutMakerSigForVerifiedOrder": "215471",
"fillLimitOrder(): testFillWithoutMakerSigForVerifiedOrder(without makerSig)": "120983",
"fillLimitOrder(): testFullyFillLimitOrder": "215471",
"fillLimitOrder(): testFullyFillLimitOrderUsingAMM": "235046",
"fillLimitOrder(): testPartiallyFillLimitOrder": "215471",
"fillLimitOrderFullOrKill(): testFillWithFOK": "215449",
"fillLimitOrderGroup(): testGroupFillRingTrade": "291749",
"fillLimitOrderGroup(): testGroupFillWithPartialWETHUnwrap": "277818",
"fillLimitOrderGroup(): testGroupFillWithTakerPrefundETH": "198117",
"fillLimitOrderGroup(): testGroupFillWithWETHUnwrap": "198117",
"fillLimitOrderGroup(): testPartialFillLargeOrderWithSmallOrders": "265910",
"testGroupFillWithProfit: fillLimitOrderGroup()": "225225"
}
6 changes: 3 additions & 3 deletions snapshots/Ownable.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"testAcceptOwnership: acceptOwnership()": "28390",
"testNominateNewOwner: nominateNewOwner()": "47132",
"testRenounceOwnership: renounceOwnership()": "25351"
"acceptOwnership(): testAcceptOwnership": "28390",
"nominateNewOwner(): testNominateNewOwner": "47132",
"renounceOwnership(): testRenounceOwnership": "25351"
}
26 changes: 13 additions & 13 deletions snapshots/RFQ.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"testCancelRFQOffer: cancelRFQOffer()": "49848",
"testFillRFQ: fillRFQ()": "219666",
"testFillRFQByTakerSig: fillRFQWithSig()": "228592",
"testFillRFQTakerGetRawETH: fillRFQ()": "238797",
"testFillRFQWithRawETH: fillRFQ()": "159563",
"testFillRFQWithRawETHAndReceiveWETH: fillRFQ()": "174630",
"testFillRFQWithTakerApproveAllowanceTarget: fillRFQ()": "187631",
"testFillRFQWithWETH: fillRFQ()": "222131",
"testFillRFQWithWETHAndReceiveWETH: fillRFQ()": "208373",
"testFillRFQWithZeroFee: fillRFQ()": "192740",
"testFillWithContract: fillRFQ()": "223381",
"testPartialFill: fillRFQ()": "219826",
"testSetFeeCollector: setFeeCollector()": "30099"
"cancelRFQOffer(): testCancelRFQOffer": "49848",
"fillRFQ(): testFillRFQ": "219666",
"fillRFQ(): testFillRFQTakerGetRawETH": "238797",
"fillRFQ(): testFillRFQWithRawETH": "159563",
"fillRFQ(): testFillRFQWithRawETHAndReceiveWETH": "174630",
"fillRFQ(): testFillRFQWithTakerApproveAllowanceTarget": "187631",
"fillRFQ(): testFillRFQWithWETH": "222131",
"fillRFQ(): testFillRFQWithWETHAndReceiveWETH": "208373",
"fillRFQ(): testFillRFQWithZeroFee": "192740",
"fillRFQ(): testFillWithContract": "223381",
"fillRFQ(): testPartialFill": "219826",
"fillRFQWithSig(): testFillRFQByTakerSig": "228592",
"setFeeCollector(): testSetFeeCollector": "30099"
}
18 changes: 9 additions & 9 deletions snapshots/SmartOrderStrategy.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"testMultipleAMMs: executeStrategy()": "610173",
"testUniswapV2WithWETHUnwrap: executeStrategy()": "142340",
"testUniswapV3WithAmountReplace: executeStrategy()": "161811",
"testUniswapV3WithMaxAmountReplace: executeStrategy()": "161607",
"testUniswapV3WithoutAmountReplace: executeStrategy()": "155017",
"testV6LOIntegration: executeStrategy()": "180661",
"testV6RFQIntegration: executeStrategy()": "183394",
"testV6RFQIntegrationWhenMakerTokenIsETH: executeStrategy()": "149739",
"testV6RFQIntegrationWhenTakerTokenIsETH: executeStrategy()": "204956"
"executeStrategy(): testMultipleAMMs": "610173",
"executeStrategy(): testUniswapV2WithWETHUnwrap": "142340",
"executeStrategy(): testUniswapV3WithAmountReplace": "161811",
"executeStrategy(): testUniswapV3WithMaxAmountReplace": "161607",
"executeStrategy(): testUniswapV3WithoutAmountReplace": "155017",
"executeStrategy(): testV6LOIntegration": "180661",
"executeStrategy(): testV6RFQIntegration": "183394",
"executeStrategy(): testV6RFQIntegrationWhenMakerTokenIsETH": "149739",
"executeStrategy(): testV6RFQIntegrationWhenTakerTokenIsETH": "204956"
}
10 changes: 5 additions & 5 deletions snapshots/TokenCollector.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"testCollectByAllowanceTarget: collect()": "66338",
"testCollectByPermit2AllowanceTransfer: collect()": "102281",
"testCollectByPermit2SignatureTransfer: collect()": "94388",
"testCollectByTokenApproval: collect()": "58597",
"testCollectByTokenPermit: collect()": "93729"
"collect(): testCollectByAllowanceTarget": "66338",
"collect(): testCollectByPermit2AllowanceTransfer": "102281",
"collect(): testCollectByPermit2SignatureTransfer": "94388",
"collect(): testCollectByTokenApproval": "58597",
"collect(): testCollectByTokenPermit": "93729"
}
12 changes: 6 additions & 6 deletions test/AllowanceTarget.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ contract AllowanceTargetTest is BalanceUtil {
vm.startPrank(authorized);
allowanceTarget.spendFromUserTo(user, address(mockERC20), recipient, amount);
vm.stopPrank();
vm.snapshotGasLastCall("AllowanceTarget", "testSpendFromUserTo: spendFromUserTo()");
vm.snapshotGasLastCall("AllowanceTarget", "spendFromUserTo(): testSpendFromUserTo");

fromBalance.assertChange(-int256(amount));
toBalance.assertChange(int256(amount));
Expand All @@ -119,15 +119,15 @@ contract AllowanceTargetTest is BalanceUtil {

vm.startPrank(allowanceTargetOwner);
allowanceTarget.pause();
vm.snapshotGasLastCall("AllowanceTarget", "testSpendFromUserToAfterUnpause: pause()");
vm.snapshotGasLastCall("AllowanceTarget", "pause(): testSpendFromUserToAfterUnpause");
allowanceTarget.unpause();
vm.snapshotGasLastCall("AllowanceTarget", "testSpendFromUserToAfterUnpause: unpause()");
vm.snapshotGasLastCall("AllowanceTarget", "unpause(): testSpendFromUserToAfterUnpause");
vm.stopPrank();

vm.startPrank(authorized);
allowanceTarget.spendFromUserTo(user, address(mockERC20), recipient, amount);
vm.stopPrank();
vm.snapshotGasLastCall("AllowanceTarget", "testSpendFromUserToAfterUnpause: spendFromUserTo()");
vm.snapshotGasLastCall("AllowanceTarget", "spendFromUserTo(): testSpendFromUserToAfterUnpause");

fromBalance.assertChange(-int256(amount));
toBalance.assertChange(int256(amount));
Expand All @@ -141,7 +141,7 @@ contract AllowanceTargetTest is BalanceUtil {
vm.startPrank(authorized);
allowanceTarget.spendFromUserTo(user, address(noReturnERC20), recipient, amount);
vm.stopPrank();
vm.snapshotGasLastCall("AllowanceTarget", "testSpendFromUserToWithNoReturnValueToken: spendFromUserTo()");
vm.snapshotGasLastCall("AllowanceTarget", "spendFromUserTo(): testSpendFromUserToWithNoReturnValueToken");

fromBalance.assertChange(-int256(amount));
toBalance.assertChange(int256(amount));
Expand All @@ -155,7 +155,7 @@ contract AllowanceTargetTest is BalanceUtil {
vm.startPrank(authorized);
allowanceTarget.spendFromUserTo(user, address(deflationaryERC20), recipient, 100);
vm.stopPrank();
vm.snapshotGasLastCall("AllowanceTarget", "testSpendFromUserToWithDeflationaryToken: spendFromUserTo()");
vm.snapshotGasLastCall("AllowanceTarget", "spendFromUserTo(): testSpendFromUserToWithDeflationaryToken");

uint256 expectedReceive = 99; // MockDeflationaryERC20 will burn 1% during each transfer
fromBalance.assertChange(-int256(amount));
Expand Down
4 changes: 2 additions & 2 deletions test/abstracts/AdminManagement.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ contract AdminManagementTest is BalanceUtil {
vm.startPrank(owner);
contractWithAdmin.approveTokens(tokens, spenders);
vm.stopPrank();
vm.snapshotGasLastCall("AdminManagement", "testApproveTokens: approveTokens()");
vm.snapshotGasLastCall("AdminManagement", "approveTokens(): testApproveTokens");

for (uint256 i; i < tokens.length; ++i) {
for (uint256 j; j < spenders.length; ++j) {
Expand Down Expand Up @@ -68,7 +68,7 @@ contract AdminManagementTest is BalanceUtil {
vm.startPrank(owner);
contractWithAdmin.rescueTokens(tokens, rescueTarget);
vm.stopPrank();
vm.snapshotGasLastCall("AdminManagement", "testRescueTokens: rescueTokens()");
vm.snapshotGasLastCall("AdminManagement", "rescueTokens(): testRescueTokens");

assertEq(IERC20(tokens[0]).balanceOf(address(contractWithAdmin)), 0);
assertEq(IERC20(tokens[0]).balanceOf(rescueTarget), amount1);
Expand Down
6 changes: 3 additions & 3 deletions test/abstracts/EIP712.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contract EIP712Test is Test {
bytes32 expectedEIP712Hash = keccak256(abi.encodePacked(eip712Harness.EIP191_HEADER(), domainSeparator, structHash));

assertEq(eip712Harness.exposedGetEIP712Hash(structHash), expectedEIP712Hash);
vm.snapshotGasLastCall("EIP712", "testGetEIP712Hash: getEIP712Hash()");
vm.snapshotGasLastCall("EIP712", "getEIP712Hash(): testGetEIP712Hash");
}

function testDomainSeparatorOnDifferentChain() public {
Expand All @@ -39,12 +39,12 @@ contract EIP712Test is Test {

bytes32 newDomainSeparator = eip712Harness.calculateDomainSeparator();
assertEq(eip712Harness.EIP712_DOMAIN_SEPARATOR(), newDomainSeparator, "Domain separator should match the expected value on a different chain");
vm.snapshotGasLastCall("EIP712", "testDomainSeparatorOnDifferentChain: EIP712_DOMAIN_SEPARATOR()");
vm.snapshotGasLastCall("EIP712", "EIP712_DOMAIN_SEPARATOR(): testDomainSeparatorOnDifferentChain");
}

function testDomainSeparatorOnChain() public {
eip712Harness.EIP712_DOMAIN_SEPARATOR();
vm.snapshotGasLastCall("EIP712", "testDomainSeparatorOnChain: EIP712_DOMAIN_SEPARATOR()");
vm.snapshotGasLastCall("EIP712", "EIP712_DOMAIN_SEPARATOR(): testDomainSeparatorOnChain");
}
}

Expand Down
6 changes: 3 additions & 3 deletions test/abstracts/Ownable.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ contract OwnableTest is Test {
vm.startPrank(newOwner);
ownable.acceptOwnership();
vm.stopPrank();
vm.snapshotGasLastCall("Ownable", "testAcceptOwnership: acceptOwnership()");
vm.snapshotGasLastCall("Ownable", "acceptOwnership(): testAcceptOwnership");

assertEq(ownable.owner(), newOwner);
assertEq(ownable.nominatedOwner(), address(0));
Expand All @@ -89,7 +89,7 @@ contract OwnableTest is Test {
vm.startPrank(owner);
ownable.renounceOwnership();
vm.stopPrank();
vm.snapshotGasLastCall("Ownable", "testRenounceOwnership: renounceOwnership()");
vm.snapshotGasLastCall("Ownable", "renounceOwnership(): testRenounceOwnership");

assertEq(ownable.owner(), address(0));
}
Expand All @@ -101,7 +101,7 @@ contract OwnableTest is Test {
vm.startPrank(owner);
ownable.nominateNewOwner(newOwner);
vm.stopPrank();
vm.snapshotGasLastCall("Ownable", "testNominateNewOwner: nominateNewOwner()");
vm.snapshotGasLastCall("Ownable", "nominateNewOwner(): testNominateNewOwner");

assertEq(ownable.nominatedOwner(), newOwner);
}
Expand Down
14 changes: 7 additions & 7 deletions test/forkMainnet/GenericSwap.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ contract GenericSwapTest is Test, Tokens, BalanceUtil, Permit2Helper, SigHelper
vm.startPrank(taker);
genericSwap.executeSwap(defaultGSData, defaultTakerPermit);
vm.stopPrank();
vm.snapshotGasLastCall("GenericSwap", "testGenericSwapWithUniswap: executeSwap()");
vm.snapshotGasLastCall("GenericSwap", "executeSwap(): testGenericSwapWithUniswap");

takerTakerToken.assertChange(-int256(defaultGSData.takerTokenAmount));
// the makerTokenAmount in the defaultGSData is the exact quote from strategy
Expand Down Expand Up @@ -182,7 +182,7 @@ contract GenericSwapTest is Test, Tokens, BalanceUtil, Permit2Helper, SigHelper
vm.startPrank(taker);
genericSwap.executeSwap(gsData, defaultTakerPermit);
vm.stopPrank();
vm.snapshotGasLastCall("GenericSwap", "testSwapWithLessOutputButWithinTolerance: executeSwap()");
vm.snapshotGasLastCall("GenericSwap", "executeSwap(): testSwapWithLessOutputButWithinTolerance");

takerTakerToken.assertChange(-int256(gsData.takerTokenAmount));
takerMakerToken.assertChange(int256(realChangedInGS));
Expand Down Expand Up @@ -219,7 +219,7 @@ contract GenericSwapTest is Test, Tokens, BalanceUtil, Permit2Helper, SigHelper
vm.startPrank(taker);
genericSwap.executeSwap{ value: gsData.takerTokenAmount }(gsData, defaultTakerPermit);
vm.stopPrank();
vm.snapshotGasLastCall("GenericSwap", "testSwapWithETHInput: executeSwap()");
vm.snapshotGasLastCall("GenericSwap", "executeSwap(): testSwapWithETHInput");

takerTakerToken.assertChange(-int256(gsData.takerTokenAmount));
takerMakerToken.assertChange(int256(realChangedInGS));
Expand Down Expand Up @@ -257,7 +257,7 @@ contract GenericSwapTest is Test, Tokens, BalanceUtil, Permit2Helper, SigHelper
vm.startPrank(taker);
genericSwap.executeSwap(gsData, defaultTakerPermit);
vm.stopPrank();
vm.snapshotGasLastCall("GenericSwap", "testSwapWithETHOutput: executeSwap()");
vm.snapshotGasLastCall("GenericSwap", "executeSwap(): testSwapWithETHOutput");

takerTakerToken.assertChange(-int256(gsData.takerTokenAmount));
takerMakerToken.assertChange(int256(realChangedInGS));
Expand Down Expand Up @@ -338,7 +338,7 @@ contract GenericSwapTest is Test, Tokens, BalanceUtil, Permit2Helper, SigHelper

bytes memory takerSig = signGenericSwap(takerPrivateKey, defaultGSData, address(genericSwap));
genericSwap.executeSwapWithSig(defaultGSData, defaultTakerPermit, taker, takerSig);
vm.snapshotGasLastCall("GenericSwap", "testGenericSwapRelayed: executeSwapWithSig()");
vm.snapshotGasLastCall("GenericSwap", "executeSwapWithSig(): testGenericSwapRelayed");

takerTakerToken.assertChange(-int256(defaultGSData.takerTokenAmount));
// the makerTokenAmount in the defaultGSData is the exact quote from strategy
Expand Down Expand Up @@ -389,7 +389,7 @@ contract GenericSwapTest is Test, Tokens, BalanceUtil, Permit2Helper, SigHelper
vm.startPrank(taker);
genericSwap.executeSwap(defaultGSData, defaultTakerPermit);
vm.stopPrank();
vm.snapshotGasLastCall("GenericSwap", "testLeaveOneWeiWithMultipleUsers(the first deposit): executeSwap()");
vm.snapshotGasLastCall("GenericSwap", "executeSwap(): testLeaveOneWeiWithMultipleUsers(the first deposit)");

// the second user: Alice
// his makerTokenAmount is recalculate by `quoteExactInput() function base on the current state`
Expand Down Expand Up @@ -424,7 +424,7 @@ contract GenericSwapTest is Test, Tokens, BalanceUtil, Permit2Helper, SigHelper
vm.startPrank(alice);
genericSwap.executeSwap(aliceGSData, alicePermit);
vm.stopPrank();
vm.snapshotGasLastCall("GenericSwap", "testLeaveOneWeiWithMultipleUsers(the second deposit): executeSwap()");
vm.snapshotGasLastCall("GenericSwap", "executeSwap(): testLeaveOneWeiWithMultipleUsers(the second deposit)");

takerTakerToken.assertChange(-int256(defaultGSData.takerTokenAmount));
takerMakerToken.assertChange(int256(defaultGSData.makerTokenAmount));
Expand Down
Loading

0 comments on commit 56723b9

Please sign in to comment.