Summary
Add a test case to validate the EthTransferFailed revert scenario in the native ETH payout flow of WindmillExchange.
Background
In PR #6 (#6), the native ETH flow tests cover success and input-validation reverts, but do not exercise the ETH send failure path when the recipient rejects ETH. This leaves a critical failure branch in _safeTransferTokenOrETH unvalidated.
This was deferred from PR #6 as part of review comment: #6 (comment)
Acceptance Criteria
- Create a
RejectETHReceiver helper contract that reverts on ETH receipt.
- Add
test_nativeETH_revertOnFailedEthTransfer test:
- Alice creates a WETH buy order funded with native ETH.
RejectETHReceiver creates a sell-for-WETH order.
- Calling
matchOrders should revert with EthTransferFailed.selector.
- Verify that the failure path in
_safeTransferTokenOrETH is explicitly covered.
References
Summary
Add a test case to validate the
EthTransferFailedrevert scenario in the native ETH payout flow ofWindmillExchange.Background
In PR #6 (#6), the native ETH flow tests cover success and input-validation reverts, but do not exercise the ETH send failure path when the recipient rejects ETH. This leaves a critical failure branch in
_safeTransferTokenOrETHunvalidated.This was deferred from PR #6 as part of review comment: #6 (comment)
Acceptance Criteria
RejectETHReceiverhelper contract that reverts on ETH receipt.test_nativeETH_revertOnFailedEthTransfertest:RejectETHReceivercreates a sell-for-WETH order.matchOrdersshould revert withEthTransferFailed.selector._safeTransferTokenOrETHis explicitly covered.References