diff --git a/.forge-snapshots/Base-DutchOrder-BaseExecuteSingleWithFee.snap b/.forge-snapshots/Base-DutchOrder-BaseExecuteSingleWithFee.snap index e77e2b32..c2a1127e 100644 --- a/.forge-snapshots/Base-DutchOrder-BaseExecuteSingleWithFee.snap +++ b/.forge-snapshots/Base-DutchOrder-BaseExecuteSingleWithFee.snap @@ -1 +1 @@ -181978 \ No newline at end of file +150708 \ No newline at end of file diff --git a/.forge-snapshots/Base-DutchOrder-ExecuteBatch.snap b/.forge-snapshots/Base-DutchOrder-ExecuteBatch.snap index 333372f2..87a4ee97 100644 --- a/.forge-snapshots/Base-DutchOrder-ExecuteBatch.snap +++ b/.forge-snapshots/Base-DutchOrder-ExecuteBatch.snap @@ -1 +1 @@ -196879 \ No newline at end of file +196805 \ No newline at end of file diff --git a/.forge-snapshots/Base-DutchOrder-ExecuteBatchMultipleOutputs.snap b/.forge-snapshots/Base-DutchOrder-ExecuteBatchMultipleOutputs.snap index 8e513b1a..f00e6409 100644 --- a/.forge-snapshots/Base-DutchOrder-ExecuteBatchMultipleOutputs.snap +++ b/.forge-snapshots/Base-DutchOrder-ExecuteBatchMultipleOutputs.snap @@ -1 +1 @@ -206650 \ No newline at end of file +206576 \ No newline at end of file diff --git a/.forge-snapshots/Base-DutchOrder-ExecuteBatchMultipleOutputsDifferentTokens.snap b/.forge-snapshots/Base-DutchOrder-ExecuteBatchMultipleOutputsDifferentTokens.snap index 7db95251..7f4264d9 100644 --- a/.forge-snapshots/Base-DutchOrder-ExecuteBatchMultipleOutputsDifferentTokens.snap +++ b/.forge-snapshots/Base-DutchOrder-ExecuteBatchMultipleOutputsDifferentTokens.snap @@ -1 +1 @@ -260307 \ No newline at end of file +260233 \ No newline at end of file diff --git a/.forge-snapshots/Base-DutchOrder-ExecuteBatchNativeOutput.snap b/.forge-snapshots/Base-DutchOrder-ExecuteBatchNativeOutput.snap index 91b52e86..2c3f9268 100644 --- a/.forge-snapshots/Base-DutchOrder-ExecuteBatchNativeOutput.snap +++ b/.forge-snapshots/Base-DutchOrder-ExecuteBatchNativeOutput.snap @@ -1 +1 @@ -190411 \ No newline at end of file +190337 \ No newline at end of file diff --git a/.forge-snapshots/Base-DutchOrder-ExecuteSingle.snap b/.forge-snapshots/Base-DutchOrder-ExecuteSingle.snap index 787d6f15..1420356d 100644 --- a/.forge-snapshots/Base-DutchOrder-ExecuteSingle.snap +++ b/.forge-snapshots/Base-DutchOrder-ExecuteSingle.snap @@ -1 +1 @@ -148194 \ No newline at end of file +148157 \ No newline at end of file diff --git a/.forge-snapshots/Base-DutchOrder-ExecuteSingleNativeOutput.snap b/.forge-snapshots/Base-DutchOrder-ExecuteSingleNativeOutput.snap index 22f39b41..908d54aa 100644 --- a/.forge-snapshots/Base-DutchOrder-ExecuteSingleNativeOutput.snap +++ b/.forge-snapshots/Base-DutchOrder-ExecuteSingleNativeOutput.snap @@ -1 +1 @@ -133756 \ No newline at end of file +133719 \ No newline at end of file diff --git a/.forge-snapshots/Base-DutchOrder-ExecuteSingleValidation.snap b/.forge-snapshots/Base-DutchOrder-ExecuteSingleValidation.snap index eb1b1759..9f58030a 100644 --- a/.forge-snapshots/Base-DutchOrder-ExecuteSingleValidation.snap +++ b/.forge-snapshots/Base-DutchOrder-ExecuteSingleValidation.snap @@ -1 +1 @@ -137605 \ No newline at end of file +157468 \ No newline at end of file diff --git a/.forge-snapshots/Base-ExclusiveDutchOrder-BaseExecuteSingleWithFee.snap b/.forge-snapshots/Base-ExclusiveDutchOrder-BaseExecuteSingleWithFee.snap index 2bbe0288..2d46d762 100644 --- a/.forge-snapshots/Base-ExclusiveDutchOrder-BaseExecuteSingleWithFee.snap +++ b/.forge-snapshots/Base-ExclusiveDutchOrder-BaseExecuteSingleWithFee.snap @@ -1 +1 @@ -150633 \ No newline at end of file +182105 \ No newline at end of file diff --git a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatch.snap b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatch.snap index f6f06f29..73f70405 100644 --- a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatch.snap +++ b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatch.snap @@ -1 +1 @@ -197283 \ No newline at end of file +197121 \ No newline at end of file diff --git a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchMultipleOutputs.snap b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchMultipleOutputs.snap index 9817be4d..2ce51f08 100644 --- a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchMultipleOutputs.snap +++ b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchMultipleOutputs.snap @@ -1 +1 @@ -207049 \ No newline at end of file +206887 \ No newline at end of file diff --git a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchMultipleOutputsDifferentTokens.snap b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchMultipleOutputsDifferentTokens.snap index cecddc06..f5e0c4fc 100644 --- a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchMultipleOutputsDifferentTokens.snap +++ b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchMultipleOutputsDifferentTokens.snap @@ -1 +1 @@ -260720 \ No newline at end of file +260558 \ No newline at end of file diff --git a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchNativeOutput.snap b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchNativeOutput.snap index 8a0b978d..7bd37b55 100644 --- a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchNativeOutput.snap +++ b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteBatchNativeOutput.snap @@ -1 +1 @@ -190809 \ No newline at end of file +190647 \ No newline at end of file diff --git a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingle.snap b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingle.snap index 2f1f2ead..1d88faba 100644 --- a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingle.snap +++ b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingle.snap @@ -1 +1 @@ -148401 \ No newline at end of file +148320 \ No newline at end of file diff --git a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingleNativeOutput.snap b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingleNativeOutput.snap index 6abebf0f..468df7ed 100644 --- a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingleNativeOutput.snap +++ b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingleNativeOutput.snap @@ -1 +1 @@ -95568 \ No newline at end of file +133887 \ No newline at end of file diff --git a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingleValidation.snap b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingleValidation.snap index 433adecc..e5109219 100644 --- a/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingleValidation.snap +++ b/.forge-snapshots/Base-ExclusiveDutchOrder-ExecuteSingleValidation.snap @@ -1 +1 @@ -157716 \ No newline at end of file +157635 \ No newline at end of file diff --git a/.forge-snapshots/Base-LimitOrderReactor-BaseExecuteSingleWithFee.snap b/.forge-snapshots/Base-LimitOrderReactor-BaseExecuteSingleWithFee.snap index 98a9bac8..96a0f070 100644 --- a/.forge-snapshots/Base-LimitOrderReactor-BaseExecuteSingleWithFee.snap +++ b/.forge-snapshots/Base-LimitOrderReactor-BaseExecuteSingleWithFee.snap @@ -1 +1 @@ -178116 \ No newline at end of file +146845 \ No newline at end of file diff --git a/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatch.snap b/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatch.snap index c470e6ed..8e5d7515 100644 --- a/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatch.snap +++ b/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatch.snap @@ -1 +1 @@ -189056 \ No newline at end of file +188982 \ No newline at end of file diff --git a/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchMultipleOutputs.snap b/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchMultipleOutputs.snap index f49195f0..d44004ad 100644 --- a/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchMultipleOutputs.snap +++ b/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchMultipleOutputs.snap @@ -1 +1 @@ -197889 \ No newline at end of file +197815 \ No newline at end of file diff --git a/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchMultipleOutputsDifferentTokens.snap b/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchMultipleOutputsDifferentTokens.snap index 757ce6f7..183b3a1a 100644 --- a/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchMultipleOutputsDifferentTokens.snap +++ b/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchMultipleOutputsDifferentTokens.snap @@ -1 +1 @@ -250617 \ No newline at end of file +250543 \ No newline at end of file diff --git a/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchNativeOutput.snap b/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchNativeOutput.snap index 1c63aa3d..33131549 100644 --- a/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchNativeOutput.snap +++ b/.forge-snapshots/Base-LimitOrderReactor-ExecuteBatchNativeOutput.snap @@ -1 +1 @@ -182582 \ No newline at end of file +182508 \ No newline at end of file diff --git a/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingle.snap b/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingle.snap index f2fd2a74..35653cd7 100644 --- a/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingle.snap +++ b/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingle.snap @@ -1 +1 @@ -144333 \ No newline at end of file +144296 \ No newline at end of file diff --git a/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingleNativeOutput.snap b/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingleNativeOutput.snap index ee193039..334356d0 100644 --- a/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingleNativeOutput.snap +++ b/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingleNativeOutput.snap @@ -1 +1 @@ -129895 \ No newline at end of file +129858 \ No newline at end of file diff --git a/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingleValidation.snap b/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingleValidation.snap index 705a288b..4ac482d7 100644 --- a/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingleValidation.snap +++ b/.forge-snapshots/Base-LimitOrderReactor-ExecuteSingleValidation.snap @@ -1 +1 @@ -133743 \ No newline at end of file +153606 \ No newline at end of file diff --git a/.forge-snapshots/DirectFillerFillMacroSingleOrder.snap b/.forge-snapshots/DirectFillerFillMacroSingleOrder.snap index 788e6ee9..5eeaf9c2 100644 --- a/.forge-snapshots/DirectFillerFillMacroSingleOrder.snap +++ b/.forge-snapshots/DirectFillerFillMacroSingleOrder.snap @@ -1 +1 @@ -136213 \ No newline at end of file +136176 \ No newline at end of file diff --git a/.forge-snapshots/DirectFillerFillMacroSingleOrderWithFee.snap b/.forge-snapshots/DirectFillerFillMacroSingleOrderWithFee.snap index a3be623b..9eb7f355 100644 --- a/.forge-snapshots/DirectFillerFillMacroSingleOrderWithFee.snap +++ b/.forge-snapshots/DirectFillerFillMacroSingleOrderWithFee.snap @@ -1 +1 @@ -175064 \ No newline at end of file +175027 \ No newline at end of file diff --git a/.forge-snapshots/DirectFillerFillMacroTestEth1Output.snap b/.forge-snapshots/DirectFillerFillMacroTestEth1Output.snap index 8a598ac3..1ff50a44 100644 --- a/.forge-snapshots/DirectFillerFillMacroTestEth1Output.snap +++ b/.forge-snapshots/DirectFillerFillMacroTestEth1Output.snap @@ -1 +1 @@ -147390 \ No newline at end of file +147353 \ No newline at end of file diff --git a/.forge-snapshots/DirectFillerFillMacroTestEth2Outputs.snap b/.forge-snapshots/DirectFillerFillMacroTestEth2Outputs.snap index 459c4aec..56255546 100644 --- a/.forge-snapshots/DirectFillerFillMacroTestEth2Outputs.snap +++ b/.forge-snapshots/DirectFillerFillMacroTestEth2Outputs.snap @@ -1 +1 @@ -170604 \ No newline at end of file +170530 \ No newline at end of file diff --git a/.forge-snapshots/DirectFillerFillMacroThreeOrdersWithFees.snap b/.forge-snapshots/DirectFillerFillMacroThreeOrdersWithFees.snap index f70c13b3..050a2261 100644 --- a/.forge-snapshots/DirectFillerFillMacroThreeOrdersWithFees.snap +++ b/.forge-snapshots/DirectFillerFillMacroThreeOrdersWithFees.snap @@ -1 +1 @@ -435187 \ No newline at end of file +435076 \ No newline at end of file diff --git a/.forge-snapshots/DirectFillerFillMacroTwoOrders.snap b/.forge-snapshots/DirectFillerFillMacroTwoOrders.snap index e757a1e3..5a171d68 100644 --- a/.forge-snapshots/DirectFillerFillMacroTwoOrders.snap +++ b/.forge-snapshots/DirectFillerFillMacroTwoOrders.snap @@ -1 +1 @@ -255972 \ No newline at end of file +255898 \ No newline at end of file diff --git a/.forge-snapshots/EthOutputTest3OrdersWithEthAndERC20Outputs.snap b/.forge-snapshots/EthOutputTest3OrdersWithEthAndERC20Outputs.snap index e763cd96..9d2c42ea 100644 --- a/.forge-snapshots/EthOutputTest3OrdersWithEthAndERC20Outputs.snap +++ b/.forge-snapshots/EthOutputTest3OrdersWithEthAndERC20Outputs.snap @@ -1 +1 @@ -363478 \ No newline at end of file +363367 \ No newline at end of file diff --git a/.forge-snapshots/EthOutputTestEthOutput.snap b/.forge-snapshots/EthOutputTestEthOutput.snap index 3ccb41fb..c11456a9 100644 --- a/.forge-snapshots/EthOutputTestEthOutput.snap +++ b/.forge-snapshots/EthOutputTestEthOutput.snap @@ -1 +1 @@ -156223 \ No newline at end of file +156186 \ No newline at end of file diff --git a/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceAndProtocolFee.snap b/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceAndProtocolFee.snap index e88d7024..a2f649d8 100644 --- a/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceAndProtocolFee.snap +++ b/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceAndProtocolFee.snap @@ -1 +1 @@ -176915 \ No newline at end of file +176834 \ No newline at end of file diff --git a/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceAndProtocolFeeEthOutput.snap b/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceAndProtocolFeeEthOutput.snap index cb97d05b..ab80a483 100644 --- a/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceAndProtocolFeeEthOutput.snap +++ b/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceAndProtocolFeeEthOutput.snap @@ -1 +1 @@ -162907 \ No newline at end of file +162826 \ No newline at end of file diff --git a/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceFee.snap b/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceFee.snap index a07a3f15..9370ecee 100644 --- a/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceFee.snap +++ b/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceFee.snap @@ -1 +1 @@ -166046 \ No newline at end of file +165965 \ No newline at end of file diff --git a/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceFeeEthOutput.snap b/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceFeeEthOutput.snap index 775567bf..9539ea54 100644 --- a/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceFeeEthOutput.snap +++ b/.forge-snapshots/ProtocolFeesGasComparisonTest-InterfaceFeeEthOutput.snap @@ -1 +1 @@ -146873 \ No newline at end of file +146792 \ No newline at end of file diff --git a/.forge-snapshots/ProtocolFeesGasComparisonTest-NoFees.snap b/.forge-snapshots/ProtocolFeesGasComparisonTest-NoFees.snap index b769768a..b36a4e71 100644 --- a/.forge-snapshots/ProtocolFeesGasComparisonTest-NoFees.snap +++ b/.forge-snapshots/ProtocolFeesGasComparisonTest-NoFees.snap @@ -1 +1 @@ -149267 \ No newline at end of file +149186 \ No newline at end of file diff --git a/.forge-snapshots/ProtocolFeesGasComparisonTest-NoFeesEthOutput.snap b/.forge-snapshots/ProtocolFeesGasComparisonTest-NoFeesEthOutput.snap index 8e555832..14361f0a 100644 --- a/.forge-snapshots/ProtocolFeesGasComparisonTest-NoFeesEthOutput.snap +++ b/.forge-snapshots/ProtocolFeesGasComparisonTest-NoFeesEthOutput.snap @@ -1 +1 @@ -124929 \ No newline at end of file +124848 \ No newline at end of file diff --git a/.forge-snapshots/SwapRouter02ExecutorExecute.snap b/.forge-snapshots/SwapRouter02ExecutorExecute.snap index 33bb7d57..23b71322 100644 --- a/.forge-snapshots/SwapRouter02ExecutorExecute.snap +++ b/.forge-snapshots/SwapRouter02ExecutorExecute.snap @@ -1 +1 @@ -262973 \ No newline at end of file +262936 \ No newline at end of file diff --git a/.forge-snapshots/SwapRouter02ExecutorExecuteAlreadyApproved.snap b/.forge-snapshots/SwapRouter02ExecutorExecuteAlreadyApproved.snap index f78360f3..e95bf5bc 100644 --- a/.forge-snapshots/SwapRouter02ExecutorExecuteAlreadyApproved.snap +++ b/.forge-snapshots/SwapRouter02ExecutorExecuteAlreadyApproved.snap @@ -1 +1 @@ -118092 \ No newline at end of file +118055 \ No newline at end of file diff --git a/.forge-snapshots/testExclusiveFillerSucceeds.snap b/.forge-snapshots/testExclusiveFillerSucceeds.snap index 9a90a3d8..937d8226 100644 --- a/.forge-snapshots/testExclusiveFillerSucceeds.snap +++ b/.forge-snapshots/testExclusiveFillerSucceeds.snap @@ -1 +1 @@ -174066 \ No newline at end of file +174029 \ No newline at end of file diff --git a/src/lib/ResolvedOrderLib.sol b/src/lib/ResolvedOrderLib.sol index 3ff86ce7..a27a17cf 100644 --- a/src/lib/ResolvedOrderLib.sol +++ b/src/lib/ResolvedOrderLib.sol @@ -8,9 +8,6 @@ library ResolvedOrderLib { /// @notice thrown when the order targets a different reactor error InvalidReactor(); - /// @notice thrown if the order has expired - error DeadlinePassed(); - /// @notice Validates a resolved order, reverting if invalid /// @param filler The filler of the order function validate(ResolvedOrder memory resolvedOrder, address filler) internal view { @@ -18,10 +15,6 @@ library ResolvedOrderLib { revert InvalidReactor(); } - if (block.timestamp > resolvedOrder.info.deadline) { - revert DeadlinePassed(); - } - if (address(resolvedOrder.info.additionalValidationContract) != address(0)) { resolvedOrder.info.additionalValidationContract.validate(filler, resolvedOrder); } diff --git a/src/reactors/ExclusiveDutchOrderReactor.sol b/src/reactors/ExclusiveDutchOrderReactor.sol index e70631a8..f21bf53b 100644 --- a/src/reactors/ExclusiveDutchOrderReactor.sol +++ b/src/reactors/ExclusiveDutchOrderReactor.sol @@ -20,9 +20,6 @@ contract ExclusiveDutchOrderReactor is BaseReactor { /// @notice thrown when an order's deadline is before its end time error DeadlineBeforeEndTime(); - /// @notice thrown when an order's end time is before its start time - error OrderEndTimeBeforeStartTime(); - /// @notice thrown when an order's inputs and outputs both decay error InputAndOutputDecay(); @@ -71,10 +68,6 @@ contract ExclusiveDutchOrderReactor is BaseReactor { revert DeadlineBeforeEndTime(); } - if (order.decayEndTime < order.decayStartTime) { - revert OrderEndTimeBeforeStartTime(); - } - if (order.input.startAmount != order.input.endAmount) { unchecked { for (uint256 i = 0; i < order.outputs.length; i++) { diff --git a/test/lib/OrderQuoter.t.sol b/test/lib/OrderQuoter.t.sol index 1deb1b17..3d82079d 100644 --- a/test/lib/OrderQuoter.t.sol +++ b/test/lib/OrderQuoter.t.sol @@ -26,6 +26,8 @@ contract OrderQuoterTest is Test, PermitSignature, ReactorEvents, DeployPermit2 uint256 constant ONE = 10 ** 18; address constant PROTOCOL_FEE_OWNER = address(1); + error SignatureExpired(uint256 deadline); + OrderQuoter quoter; MockERC20 tokenIn; MockERC20 tokenOut; @@ -128,15 +130,14 @@ contract OrderQuoterTest is Test, PermitSignature, ReactorEvents, DeployPermit2 uint256 timestamp = block.timestamp; vm.warp(timestamp + 100); tokenIn.forceApprove(swapper, address(permit2), ONE); + uint256 deadline = block.timestamp - 1; LimitOrder memory order = LimitOrder({ - info: OrderInfoBuilder.init(address(limitOrderReactor)).withSwapper(address(swapper)).withDeadline( - block.timestamp - 1 - ), + info: OrderInfoBuilder.init(address(limitOrderReactor)).withSwapper(address(swapper)).withDeadline(deadline), input: InputToken(tokenIn, ONE, ONE), outputs: OutputsBuilder.single(address(tokenOut), ONE, address(swapper)) }); bytes memory sig = signOrder(swapperPrivateKey, address(permit2), order); - vm.expectRevert(ResolvedOrderLib.DeadlinePassed.selector); + vm.expectRevert(abi.encodeWithSelector(SignatureExpired.selector, deadline)); quoter.quote(abi.encode(order), sig); } diff --git a/test/lib/ResolvedOrderLib.t.sol b/test/lib/ResolvedOrderLib.t.sol index a9f051c5..2594a581 100644 --- a/test/lib/ResolvedOrderLib.t.sol +++ b/test/lib/ResolvedOrderLib.t.sol @@ -26,15 +26,6 @@ contract ResolvedOrderLibTest is Test { resolvedOrderLib.validate(mockResolvedOrder, address(0)); } - function testDeadlinePassed() public { - uint256 timestamp = block.timestamp; - vm.warp(timestamp + 100); - mockResolvedOrder.info = OrderInfoBuilder.init(address(resolvedOrderLib)).withDeadline(block.timestamp - 1); - - vm.expectRevert(ResolvedOrderLib.DeadlinePassed.selector); - resolvedOrderLib.validate(mockResolvedOrder, address(0)); - } - function testValid() public { mockResolvedOrder.info = OrderInfoBuilder.init(address(resolvedOrderLib)); resolvedOrderLib.validate(mockResolvedOrder, address(0));