The swap decoder, src/shared/uniswap.js. Command 0x00 (V3_SWAP_EXACT_IN) is decoded by decodeV3SwapExactIn(); command 0x01 (V3_SWAP_EXACT_OUT, (address recipient, uint256 amountOut, uint256 amountInMax, bytes path, bool payerIsUser)) is named in the Steps line but never decoded.
What happens
A swap done with V3_SWAP_EXACT_OUT shows its tokens as unknown ("not named in the calldata") and no amounts, although the calldata names both tokens, the exact amount bought and the most that can be spent.
What should happen
README, Transaction Decoding: the decoder covers Universal Router execute() calls and their swap steps. A V3 exact-out swap is read like the V2 exact-out swap already is: its tokens from the path (which an exact-out V3 path lists output first), and its amounts as the V2 exact-out case shows them.
Severity: minor
Definition of done
V3_SWAP_EXACT_OUT steps set Token In, Token Out and their amounts, with the path read in the order the router reads it.
Tests for a single-hop and a multi-hop exact-out path.
Model: opus-5-5
Seen by the review of https://git.eeqj.de/sneak/AutistMask/pulls/598.
## Where
The swap decoder, `src/shared/uniswap.js`. Command `0x00` (`V3_SWAP_EXACT_IN`) is decoded by `decodeV3SwapExactIn()`; command `0x01` (`V3_SWAP_EXACT_OUT`, `(address recipient, uint256 amountOut, uint256 amountInMax, bytes path, bool payerIsUser)`) is named in the Steps line but never decoded.
## What happens
A swap done with `V3_SWAP_EXACT_OUT` shows its tokens as unknown ("not named in the calldata") and no amounts, although the calldata names both tokens, the exact amount bought and the most that can be spent.
## What should happen
README, Transaction Decoding: the decoder covers Universal Router `execute()` calls and their swap steps. A V3 exact-out swap is read like the V2 exact-out swap already is: its tokens from the path (which an exact-out V3 path lists output first), and its amounts as the V2 exact-out case shows them.
Severity: minor
## Definition of done
- [ ] `V3_SWAP_EXACT_OUT` steps set Token In, Token Out and their amounts, with the path read in the order the router reads it.
- [ ] Tests for a single-hop and a multi-hop exact-out path.
Model: opus-5-5
clawbot
self-assigned this 2026-10-19 08:37:04 +02:00
Plan: one PR to next, in decode() in src/shared/uniswap.js. A decodeV3SwapExactOut() beside decodeV3SwapExactIn() reads (recipient, amountOut, amountInMax, path, payerIsUser), with the path read output first, as the router reads an exact-out V3 path. The step then sets Token In and Token Out and their amounts as a V2_SWAP_EXACT_OUT does (Up to its amountInMax), names its recipient, counts against the router's balance when paid from the router, and joins the total of what the user's steps take (#626), where it is now counted as a take the decoder did not read. Tests for a single-hop and a multi-hop exact-out path, and for one after a V3 exact-in, each failing on next.
Model: opus-5-5
Plan: one PR to `next`, in `decode()` in `src/shared/uniswap.js`. A `decodeV3SwapExactOut()` beside `decodeV3SwapExactIn()` reads `(recipient, amountOut, amountInMax, path, payerIsUser)`, with the path read output first, as the router reads an exact-out V3 path. The step then sets Token In and Token Out and their amounts as a `V2_SWAP_EXACT_OUT` does (`Up to` its `amountInMax`), names its recipient, counts against the router's balance when paid from the router, and joins the total of what the user's steps take (https://git.eeqj.de/sneak/AutistMask/pulls/626), where it is now counted as a take the decoder did not read. Tests for a single-hop and a multi-hop exact-out path, and for one after a V3 exact-in, each failing on `next`.
Model: opus-5-5
Built in #636: a V3_SWAP_EXACT_OUT step is now read the same way as a V2_SWAP_EXACT_OUT, with its path read from the token it buys to the token it spends. The PR discloses one judgement call, about a step paid from the router.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/AutistMask/pulls/636: a `V3_SWAP_EXACT_OUT` step is now read the same way as a `V2_SWAP_EXACT_OUT`, with its path read from the token it buys to the token it spends. The PR discloses one judgement call, about a step paid from the router.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Seen by the review of #598.
Where
The swap decoder,
src/shared/uniswap.js. Command0x00(V3_SWAP_EXACT_IN) is decoded bydecodeV3SwapExactIn(); command0x01(V3_SWAP_EXACT_OUT,(address recipient, uint256 amountOut, uint256 amountInMax, bytes path, bool payerIsUser)) is named in the Steps line but never decoded.What happens
A swap done with
V3_SWAP_EXACT_OUTshows its tokens as unknown ("not named in the calldata") and no amounts, although the calldata names both tokens, the exact amount bought and the most that can be spent.What should happen
README, Transaction Decoding: the decoder covers Universal Router
execute()calls and their swap steps. A V3 exact-out swap is read like the V2 exact-out swap already is: its tokens from the path (which an exact-out V3 path lists output first), and its amounts as the V2 exact-out case shows them.Severity: minor
Definition of done
V3_SWAP_EXACT_OUTsteps set Token In, Token Out and their amounts, with the path read in the order the router reads it.Model: opus-5-5
Plan: one PR to
next, indecode()insrc/shared/uniswap.js. AdecodeV3SwapExactOut()besidedecodeV3SwapExactIn()reads(recipient, amountOut, amountInMax, path, payerIsUser), with the path read output first, as the router reads an exact-out V3 path. The step then sets Token In and Token Out and their amounts as aV2_SWAP_EXACT_OUTdoes (Up toitsamountInMax), names its recipient, counts against the router's balance when paid from the router, and joins the total of what the user's steps take (#626), where it is now counted as a take the decoder did not read. Tests for a single-hop and a multi-hop exact-out path, and for one after a V3 exact-in, each failing onnext.Model: opus-5-5
Built in #636: a
V3_SWAP_EXACT_OUTstep is now read the same way as aV2_SWAP_EXACT_OUT, with its path read from the token it buys to the token it spends. The PR discloses one judgement call, about a step paid from the router.Model: opus-5-5