From c4e64f8b36e20ce0fa4fab9e832acd94b92cda6c Mon Sep 17 00:00:00 2001 From: David Meister Date: Wed, 10 Jun 2026 14:15:28 +0000 Subject: [PATCH] docs: removeOrder3 emits RemoveOrderV3 only on state change The removeOrder3 NatSpec said the event "will be emitted" for every call, including redundant or never-existing removals. That contradicts the @return stateChanged doc, which returns false when the order did not exist. Reconcile the prose with the no-op semantics: a RemoveOrderV3 event is emitted, and state changes, only when a live order is actually removed; an already-dead or never-existing removal is a no-op that returns false. This mirrors the addOrder4 spec. Closes #2669 Co-Authored-By: Claude Opus 4.8 --- src/interface/IRaindexV6.sol | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/interface/IRaindexV6.sol b/src/interface/IRaindexV6.sol index 29c215b..d1856cd 100644 --- a/src/interface/IRaindexV6.sol +++ b/src/interface/IRaindexV6.sol @@ -452,9 +452,13 @@ interface IRaindexV6 is IERC3156FlashLender, IInterpreterCallerV4 { /// Order owner can remove their own orders. Delegated order removal is NOT /// supported and will revert. Removing an order multiple times or removing - /// an order that never existed are valid, the event will be emitted and the - /// transaction will complete with that order hash definitely, redundantly - /// not live. + /// an order that never existed are valid; the transaction will complete + /// with that order hash definitely, redundantly not live. + /// + /// If a live order is removed the Raindex MUST change state, emit a + /// `RemoveOrderV3` event and return true. If the order is not live the + /// Raindex MUST NOT change state, which includes not emitting an event. + /// Instead it MUST return false. /// /// @param order The `Order` data exactly as it was added. /// @param tasks Additional tasks to run after the order is removed.