Repository navigation
Report Houdini DEX transactions through autobot - #515
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
peachbits
left a comment
There was a problem hiding this comment.
Dropping the app's own dex/confirmTx once autobot takes the report settles the task's open question, since QA on the task (case C4) found Houdini answers a second confirm for the same order with 404. Both report paths catch and log through log.warn, so approve() cannot throw after broadcast and the bridgeless result cache isn't needed here. Only quotes with a dexOrderId report.
I also ran this diff on current master. #512 and #522 left confirmDexTx and the approve wrapper alone, and the houdini tests pass (55) with tsc clean. On rebase the CHANGELOG line moves to the current ## Unreleased. If #523 lands first, its DEX test scripts drop nativeAddress and its scriptedFetch gains an info-server branch, so the autobot lines here move with them.
The asks on EdgeApp/edge-autobot-server#7 change what a 200 from autobot guarantees. Nothing here waits on them: until that route exists the PUT gets a 404 and this falls back to the direct confirm.
|
All four threads are addressed in cf56fff, with 55 houdini tests passing and |
A DEX order starts on Houdini's side only once dex/confirmTx names its transaction. The app made that call itself after broadcast, and closing the app in that window left the order unstarted with the funds already sent. The approval now hands the order id and tx hash to autobot, which retries the confirmation until Houdini accepts or refuses it. When autobot cannot take the report, the app confirms directly as before.
cf56fff to
8ded2b0
Compare
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
EdgeApp/edge-autobot-server#7 (the
/api/houdiniendpoint) must be deployed with the Houdini credentials, and the Edge build config must pass its address as the new optionalautobotUrlinit option. WithoutautobotUrlthe plugin confirms directly, as it does on master. This PR can therefore ship first.Description
Asana task
A Houdini DEX order starts only once
dex/confirmTxnames its transaction. The plugin made that call itself after broadcast. Closing the app in that window left the order unstarted with the funds already sent.After broadcast, when
autobotUrlis set, the approval PUTs{ orderId, txHash }to autobot's/api/houdini, and autobot retries the confirmation until Houdini accepts or refuses it. When autobot answers with anything but a 2xx, the call throws, or it takes longer than 10 seconds, the plugin callsdex/confirmTxdirectly. Neither path throws after broadcast.Testing:
autobotUrlis configured, retry and no-retry of the direct call, and that the send completes when no confirmation lands.autobotUrloptional, against a local autobot talking to the real Houdini API: an ETH to MON DEX swap (Mayan route) reached the success scene and the app was killed right after broadcast. Autobot confirmed the order on its first attempt and Houdini shows it finished.Found while testing, not changed here:
makeDexSwapOrderrejects Debridge DEX orders. The deBridge contract adds a fixed 0.001 ETH fee to the transaction value, which trips thevalue > nativeAmountcheck. The error is not caught per route. The next DEX route (Mayan) is never tried, and the user sees "No enabled exchanges support ETH to MON".Test evidence
92ec64dReport Houdini DEX transactions through autobot
2026-10-25
1. houdini dex quote
2. houdini dex swap success