diff --git a/snapshots/DirectFillerFillMacroTest.json b/snapshots/DirectFillerFillMacroTest.json index c7b556b2..84b8ea7f 100644 --- a/snapshots/DirectFillerFillMacroTest.json +++ b/snapshots/DirectFillerFillMacroTest.json @@ -1,6 +1,6 @@ { - "DirectFillerFillMacroSingleOrder": "135973", - "DirectFillerFillMacroSingleOrderWithFee": "174570", - "DirectFillerFillMacroThreeOrdersWithFees": "433904", - "DirectFillerFillMacroTwoOrders": "255553" + "DirectFillerFillMacroSingleOrder": "135820", + "DirectFillerFillMacroSingleOrderWithFee": "174331", + "DirectFillerFillMacroThreeOrdersWithFees": "433336", + "DirectFillerFillMacroTwoOrders": "255333" } \ No newline at end of file diff --git a/snapshots/DutchOrderReactorTest.json b/snapshots/DutchOrderReactorTest.json index 420ce66b..1d7beed3 100644 --- a/snapshots/DutchOrderReactorTest.json +++ b/snapshots/DutchOrderReactorTest.json @@ -1,11 +1,11 @@ { - "BaseExecuteSingleWithFee": "176379", - "ExecuteBatch": "188624", - "ExecuteBatchMultipleOutputs": "197968", - "ExecuteBatchMultipleOutputsDifferentTokens": "251215", - "ExecuteBatchNativeOutput": "184650", - "ExecuteSingle": "142762", - "ExecuteSingleNativeOutput": "130824", - "ExecuteSingleValidation": "152072", - "RevertInvalidNonce": "22192" + "BaseExecuteSingleWithFee": "176167", + "ExecuteBatch": "188355", + "ExecuteBatchMultipleOutputs": "197673", + "ExecuteBatchMultipleOutputsDifferentTokens": "250894", + "ExecuteBatchNativeOutput": "184399", + "ExecuteSingle": "142617", + "ExecuteSingleNativeOutput": "130688", + "ExecuteSingleValidation": "151906", + "RevertInvalidNonce": "22119" } \ No newline at end of file diff --git a/snapshots/EthOutputDirectFillerTest.json b/snapshots/EthOutputDirectFillerTest.json index 18050267..596eb9b4 100644 --- a/snapshots/EthOutputDirectFillerTest.json +++ b/snapshots/EthOutputDirectFillerTest.json @@ -1,4 +1,4 @@ { - "DirectFillerFillMacroTestEth1Output": "147146", - "DirectFillerFillMacroTestEth2Outputs": "170234" + "DirectFillerFillMacroTestEth1Output": "147001", + "DirectFillerFillMacroTestEth2Outputs": "170048" } \ No newline at end of file diff --git a/snapshots/EthOutputMockFillContractTest.json b/snapshots/EthOutputMockFillContractTest.json index 900a3df2..9b7c93b0 100644 --- a/snapshots/EthOutputMockFillContractTest.json +++ b/snapshots/EthOutputMockFillContractTest.json @@ -1,4 +1,4 @@ { - "EthOutputTest3OrdersWithEthAndERC20Outputs": "362445", - "EthOutputTestEthOutput": "156342" + "EthOutputTest3OrdersWithEthAndERC20Outputs": "362022", + "EthOutputTestEthOutput": "156137" } \ No newline at end of file diff --git a/snapshots/ExclusiveDutchOrderReactorTest.json b/snapshots/ExclusiveDutchOrderReactorTest.json index c290b013..60ba4ff4 100644 --- a/snapshots/ExclusiveDutchOrderReactorTest.json +++ b/snapshots/ExclusiveDutchOrderReactorTest.json @@ -1,11 +1,11 @@ { - "BaseExecuteSingleWithFee": "176480", - "ExecuteBatch": "188814", - "ExecuteBatchMultipleOutputs": "198158", - "ExecuteBatchMultipleOutputsDifferentTokens": "251405", - "ExecuteBatchNativeOutput": "184840", - "ExecuteSingle": "142871", - "ExecuteSingleNativeOutput": "130933", - "ExecuteSingleValidation": "152181", - "RevertInvalidNonce": "22290" + "BaseExecuteSingleWithFee": "176269", + "ExecuteBatch": "188547", + "ExecuteBatchMultipleOutputs": "197865", + "ExecuteBatchMultipleOutputsDifferentTokens": "251086", + "ExecuteBatchNativeOutput": "184591", + "ExecuteSingle": "142727", + "ExecuteSingleNativeOutput": "130798", + "ExecuteSingleValidation": "152016", + "RevertInvalidNonce": "22218" } \ No newline at end of file diff --git a/snapshots/ExclusiveFillerValidationTest.json b/snapshots/ExclusiveFillerValidationTest.json index 0f0da95b..136961ae 100644 --- a/snapshots/ExclusiveFillerValidationTest.json +++ b/snapshots/ExclusiveFillerValidationTest.json @@ -1,3 +1,3 @@ { - "testExclusiveFillerSucceeds": "171199" + "testExclusiveFillerSucceeds": "170979" } \ No newline at end of file diff --git a/snapshots/LimitOrderReactorTest.json b/snapshots/LimitOrderReactorTest.json index 7c6e4670..79db49c4 100644 --- a/snapshots/LimitOrderReactorTest.json +++ b/snapshots/LimitOrderReactorTest.json @@ -1,11 +1,11 @@ { - "BaseExecuteSingleWithFee": "172831", - "ExecuteBatch": "181452", - "ExecuteBatchMultipleOutputs": "189990", - "ExecuteBatchMultipleOutputsDifferentTokens": "242428", - "ExecuteBatchNativeOutput": "177478", - "ExecuteSingle": "139215", - "ExecuteSingleNativeOutput": "127277", - "ExecuteSingleValidation": "148525", - "RevertInvalidNonce": "18656" + "BaseExecuteSingleWithFee": "172635", + "ExecuteBatch": "181215", + "ExecuteBatchMultipleOutputs": "189732", + "ExecuteBatchMultipleOutputsDifferentTokens": "242149", + "ExecuteBatchNativeOutput": "177259", + "ExecuteSingle": "139086", + "ExecuteSingleNativeOutput": "127157", + "ExecuteSingleValidation": "148375", + "RevertInvalidNonce": "18599" } \ No newline at end of file diff --git a/snapshots/NonlinearDutchDecayLibTest.json b/snapshots/NonlinearDutchDecayLibTest.json index 199b0769..1c328bd8 100644 --- a/snapshots/NonlinearDutchDecayLibTest.json +++ b/snapshots/NonlinearDutchDecayLibTest.json @@ -1,12 +1,12 @@ { - "V3-DutchDecay": "16413", - "V3-DutchDecayFullyDecayed": "7908", - "V3-DutchDecayFullyDecayedNegative": "7619", - "V3-DutchDecayNegative": "15389", - "V3-DutchDecayNoDecayYet": "5720", - "V3-DutchDecayNoDecayYetNegative": "5694", - "V3-ExtendedMultiPointDutchDecay": "106707", - "V3-LocateCurvePositionMulti": "17727", - "V3-LocateCurvePositionSingle": "4227", - "V3-MultiPointDutchDecay": "33868" + "V3-DutchDecay": "16243", + "V3-DutchDecayFullyDecayed": "7838", + "V3-DutchDecayFullyDecayedNegative": "7555", + "V3-DutchDecayNegative": "15239", + "V3-DutchDecayNoDecayYet": "5692", + "V3-DutchDecayNoDecayYetNegative": "5664", + "V3-ExtendedMultiPointDutchDecay": "105758", + "V3-LocateCurvePositionMulti": "17610", + "V3-LocateCurvePositionSingle": "4191", + "V3-MultiPointDutchDecay": "33549" } \ No newline at end of file diff --git a/snapshots/PriorityOrderReactorTest.json b/snapshots/PriorityOrderReactorTest.json index 281e495c..2359a50c 100644 --- a/snapshots/PriorityOrderReactorTest.json +++ b/snapshots/PriorityOrderReactorTest.json @@ -1,15 +1,15 @@ { - "BaseExecuteSingleWithFee": "178696", - "ExecuteBatch": "193279", - "ExecuteBatchMultipleOutputs": "202497", - "ExecuteBatchMultipleOutputsDifferentTokens": "255617", - "ExecuteBatchNativeOutput": "189305", - "ExecuteSingle": "145087", - "ExecuteSingleNativeOutput": "133149", - "ExecuteSingleValidation": "154397", - "InputPriorityFee": "147392", - "OutputPriorityFee": "147396", - "OutputPriorityFeeAndBaselinePriorityFee": "147396", - "OverrideAuctionTargetBlock": "124529", - "RevertInvalidNonce": "8853" + "BaseExecuteSingleWithFee": "178476", + "ExecuteBatch": "192994", + "ExecuteBatchMultipleOutputs": "202189", + "ExecuteBatchMultipleOutputsDifferentTokens": "255286", + "ExecuteBatchNativeOutput": "189038", + "ExecuteSingle": "144934", + "ExecuteSingleNativeOutput": "133005", + "ExecuteSingleValidation": "154223", + "InputPriorityFee": "147237", + "OutputPriorityFee": "147243", + "OutputPriorityFeeAndBaselinePriorityFee": "147243", + "OverrideAuctionTargetBlock": "124368", + "RevertInvalidNonce": "8831" } \ No newline at end of file diff --git a/snapshots/ProtocolFeesGasComparisonTest.json b/snapshots/ProtocolFeesGasComparisonTest.json index 0c3cbe70..769c1ef0 100644 --- a/snapshots/ProtocolFeesGasComparisonTest.json +++ b/snapshots/ProtocolFeesGasComparisonTest.json @@ -1,8 +1,8 @@ { - "ProtocolFeesGasComparisonTest-InterfaceAndProtocolFee": "173684", - "ProtocolFeesGasComparisonTest-InterfaceAndProtocolFeeEthOutput": "162176", - "ProtocolFeesGasComparisonTest-InterfaceFee": "162961", - "ProtocolFeesGasComparisonTest-InterfaceFeeEthOutput": "146288", - "ProtocolFeesGasComparisonTest-NoFees": "146369", - "ProtocolFeesGasComparisonTest-NoFeesEthOutput": "124531" + "ProtocolFeesGasComparisonTest-InterfaceAndProtocolFee": "173378", + "ProtocolFeesGasComparisonTest-InterfaceAndProtocolFeeEthOutput": "161897", + "ProtocolFeesGasComparisonTest-InterfaceFee": "162696", + "ProtocolFeesGasComparisonTest-InterfaceFeeEthOutput": "146041", + "ProtocolFeesGasComparisonTest-NoFees": "146136", + "ProtocolFeesGasComparisonTest-NoFeesEthOutput": "124307" } \ No newline at end of file diff --git a/snapshots/SwapRouter02ExecutorTest.json b/snapshots/SwapRouter02ExecutorTest.json index eca4b8e9..3b8ce6c8 100644 --- a/snapshots/SwapRouter02ExecutorTest.json +++ b/snapshots/SwapRouter02ExecutorTest.json @@ -1,4 +1,4 @@ { - "SwapRouter02ExecutorExecute": "260669", - "SwapRouter02ExecutorExecuteAlreadyApproved": "118280" + "SwapRouter02ExecutorExecute": "260367", + "SwapRouter02ExecutorExecuteAlreadyApproved": "117992" } \ No newline at end of file diff --git a/snapshots/V2DutchOrderTest.json b/snapshots/V2DutchOrderTest.json index 269195bd..71c39d28 100644 --- a/snapshots/V2DutchOrderTest.json +++ b/snapshots/V2DutchOrderTest.json @@ -1,14 +1,14 @@ { - "BaseExecuteSingleWithFee": "182480", - "ExclusiveFiller": "152632", - "ExecuteBatch": "200865", - "ExecuteBatchMultipleOutputs": "210701", - "ExecuteBatchMultipleOutputsDifferentTokens": "264440", - "ExecuteBatchNativeOutput": "196891", - "ExecuteSingle": "148863", - "ExecuteSingleNativeOutput": "136925", - "ExecuteSingleValidation": "158173", - "InputOverride": "152710", - "OutputOverride": "152659", - "RevertInvalidNonce": "28213" + "BaseExecuteSingleWithFee": "182252", + "ExclusiveFiller": "152472", + "ExecuteBatch": "200564", + "ExecuteBatchMultipleOutputs": "210371", + "ExecuteBatchMultipleOutputsDifferentTokens": "264081", + "ExecuteBatchNativeOutput": "196608", + "ExecuteSingle": "148702", + "ExecuteSingleNativeOutput": "136773", + "ExecuteSingleValidation": "157991", + "InputOverride": "152550", + "OutputOverride": "152499", + "RevertInvalidNonce": "28124" } \ No newline at end of file diff --git a/snapshots/V3DutchOrderTest.json b/snapshots/V3DutchOrderTest.json index 2acf9882..62b25749 100644 --- a/snapshots/V3DutchOrderTest.json +++ b/snapshots/V3DutchOrderTest.json @@ -1,14 +1,14 @@ { - "BaseExecuteSingleWithFee": "192645", - "ExecuteBatch": "221374", - "ExecuteBatchMultipleOutputs": "234559", - "ExecuteBatchMultipleOutputsDifferentTokens": "291665", - "ExecuteBatchNativeOutput": "217400", - "ExecuteSingle": "159027", - "ExecuteSingleNativeOutput": "147089", - "ExecuteSingleValidation": "168337", - "RevertInvalidNonce": "38303", - "V3-ExclusiveFiller": "162895", - "V3-InputOverride": "162976", - "V3-OutputOverride": "162919" + "BaseExecuteSingleWithFee": "192359", + "ExecuteBatch": "220957", + "ExecuteBatchMultipleOutputs": "234094", + "ExecuteBatchMultipleOutputsDifferentTokens": "291152", + "ExecuteBatchNativeOutput": "217001", + "ExecuteSingle": "158808", + "ExecuteSingleNativeOutput": "146879", + "ExecuteSingleValidation": "168097", + "RevertInvalidNonce": "38156", + "V3-ExclusiveFiller": "162677", + "V3-InputOverride": "162758", + "V3-OutputOverride": "162701" } \ No newline at end of file diff --git a/test/lib/DutchDecayLib.t.sol b/test/lib/DutchDecayLib.t.sol index 0123c9ef..8b930046 100644 --- a/test/lib/DutchDecayLib.t.sol +++ b/test/lib/DutchDecayLib.t.sol @@ -96,6 +96,7 @@ contract DutchDecayLibTest is Test { assertGe(decayed, uint256(endAmount)); } + /// forge-config: default.allow_internal_expect_revert = true function testDutchDecayInvalidTimes( uint256 startAmount, uint256 endAmount, @@ -108,14 +109,19 @@ contract DutchDecayLibTest is Test { DutchDecayLib.decay(startAmount, endAmount, decayStartTime, decayEndTime); } - function testDutchDecayOverflow() public { + /// forge-config: default.allow_internal_expect_revert = true + function testDutchDownwardDecayOverflow() public { vm.expectRevert(); DutchDecayLib.linearDecay(0, 100, 99, type(int256).max, -1); + } + /// forge-config: default.allow_internal_expect_revert = true + function testDutchUpwardDecayOverflow() public { vm.expectRevert(); DutchDecayLib.linearDecay(0, 100, 99, -1, type(int256).max); } + /// forge-config: default.allow_internal_expect_revert = true function testDutchDecayDivByZero() public { vm.expectRevert(); DutchDecayLib.linearDecay(100, 100, 99, 1, -1); diff --git a/test/lib/MathExt.t.sol b/test/lib/MathExt.t.sol index b23d48de..586c0ee0 100644 --- a/test/lib/MathExt.t.sol +++ b/test/lib/MathExt.t.sol @@ -31,11 +31,13 @@ contract MathExtTest is Test { assertEq(b.sub(int256(a)), b - a); } + /// forge-config: default.allow_internal_expect_revert = true function testSubIntFromUintNegativeUint() public { vm.expectRevert(); uint256(1).sub(int256(2)); } + /// forge-config: default.allow_internal_expect_revert = true function testSubIntFromUintOverflow() public { vm.expectRevert(); UINT256_MAX.sub(-1); @@ -92,11 +94,13 @@ contract MathExtTest is Test { assertEq(c, int256(a) - int256(b)); } + /// forge-config: default.allow_internal_expect_revert = true function testSubUintFromUintUnderflow() public { vm.expectRevert(); uint256(0).sub(type(uint256).max); } + /// forge-config: default.allow_internal_expect_revert = true function testSubUintFromUintOverflow() public { vm.expectRevert(); UINT256_MAX.sub(uint256(1)); diff --git a/test/lib/NonLinearDutchDecayLib.t.sol b/test/lib/NonLinearDutchDecayLib.t.sol index 7a0925a4..07951b65 100644 --- a/test/lib/NonLinearDutchDecayLib.t.sol +++ b/test/lib/NonLinearDutchDecayLib.t.sol @@ -541,6 +541,7 @@ contract NonlinearDutchDecayLibTest is Test, BlockNumberish { assertEq(decayOutput(curve, startAmount, decayStartBlock, 0 ether), 0); } + /// forge-config: default.allow_internal_expect_revert = true function testDutchOverflowDecay() public { uint256 decayStartBlock = 100; uint256 startAmount = 1 ether; @@ -551,6 +552,7 @@ contract NonlinearDutchDecayLibTest is Test, BlockNumberish { decayOutput(curve, startAmount, decayStartBlock, 1 ether); } + /// forge-config: default.allow_internal_expect_revert = true function testDutchMismatchedDecay() public { uint256 decayStartBlock = 100; uint256 startAmount = 1 ether; diff --git a/test/lib/PriorityFeeLib.t.sol b/test/lib/PriorityFeeLib.t.sol index a79c4d17..bcf43d6e 100644 --- a/test/lib/PriorityFeeLib.t.sol +++ b/test/lib/PriorityFeeLib.t.sol @@ -95,6 +95,7 @@ contract PriorityFeeLibTest is Test { } /// @notice if the amount to scale is large enough to cause a phantom overflow in mulDivUp, we expect a revert + /// forge-config: default.allow_internal_expect_revert = true function testScaleRevertsOnLargeOutput() public { uint256 priorityFee = 0; vm.txGasPrice(priorityFee); @@ -124,6 +125,7 @@ contract PriorityFeeLibTest is Test { assertEq(scaledOutput.amount, output.amount); } + /// forge-config: default.allow_internal_expect_revert = true function testScaleOutputPriorityFee_fuzz(uint256 priorityFee, uint256 mpsPerPriorityFeeWei) public { // the amount of MPS to scale the output by uint256 scalingFactor = MPS; diff --git a/test/lib/Uint16Array.t.sol b/test/lib/Uint16Array.t.sol index e87ae21f..f9b93d4c 100644 --- a/test/lib/Uint16Array.t.sol +++ b/test/lib/Uint16Array.t.sol @@ -24,11 +24,13 @@ contract Uint16ArrayTest is Test { } } + /// forge-config: default.allow_internal_expect_revert = true function testToUint16ArrayRevert() public { vm.expectRevert(InvalidArrLength.selector); toUint16Array(ArrayBuilder.fillUint16(17, 1)); } + /// forge-config: default.allow_internal_expect_revert = true function testGetElementRevert() public { Uint16Array packedArr = toUint16Array(ArrayBuilder.fillUint16(5, 1)); vm.expectRevert(IndexOutOfBounds.selector);