What happens. The router reads the command type with the mask 0x3f (0x7f on its current main branch), which keeps the 0x20 bit; this line drops it. Command 0x21, Execute Sub-Plan, is therefore read as 0x01 and listed in the Steps line as "V3 Swap (Exact Out)". The decoder's own 0x21: "Execute Sub-Plan" entry (uniswap.js:39) can never be reached. The steps inside the sub-plan are not read either, so the Token In, Amount, Token Out and Min. received lines come only from the commands outside it, and a swap done inside a sub-plan is missing from them without the screen saying so.
Should. The Steps line names each command as the router will execute it (README Transaction Decoding: "execution steps").
Severity: minor
Definition of done
The command type is read with the router's mask, and a 0x21 command is listed as "Execute Sub-Plan".
When the calldata has a sub-plan the decoder does not read, the screen says that some steps are not shown, rather than presenting the outer lines as the whole swap.
Tests with a 0x21 command, with and without the allow-revert flag (0xa1).
Model: opus-5-5
**Where.** `src/shared/uniswap.js:503`: `const cmdId = commandsBytes[i] & 0x1f;`
**What happens.** The router reads the command type with the mask `0x3f` (`0x7f` on its current main branch), which keeps the `0x20` bit; this line drops it. Command `0x21`, Execute Sub-Plan, is therefore read as `0x01` and listed in the Steps line as "V3 Swap (Exact Out)". The decoder's own `0x21: "Execute Sub-Plan"` entry (`uniswap.js:39`) can never be reached. The steps inside the sub-plan are not read either, so the Token In, Amount, Token Out and Min. received lines come only from the commands outside it, and a swap done inside a sub-plan is missing from them without the screen saying so.
**Should.** The Steps line names each command as the router will execute it (README Transaction Decoding: "execution steps").
Severity: minor
## Definition of done
- [ ] The command type is read with the router's mask, and a `0x21` command is listed as "Execute Sub-Plan".
- [ ] When the calldata has a sub-plan the decoder does not read, the screen says that some steps are not shown, rather than presenting the outer lines as the whole swap.
- [ ] Tests with a `0x21` command, with and without the allow-revert flag (`0xa1`).
Model: opus-5-5
clawbot
self-assigned this 2026-10-14 05:16:34 +02:00
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.
Where.
src/shared/uniswap.js:503:const cmdId = commandsBytes[i] & 0x1f;What happens. The router reads the command type with the mask
0x3f(0x7fon its current main branch), which keeps the0x20bit; this line drops it. Command0x21, Execute Sub-Plan, is therefore read as0x01and listed in the Steps line as "V3 Swap (Exact Out)". The decoder's own0x21: "Execute Sub-Plan"entry (uniswap.js:39) can never be reached. The steps inside the sub-plan are not read either, so the Token In, Amount, Token Out and Min. received lines come only from the commands outside it, and a swap done inside a sub-plan is missing from them without the screen saying so.Should. The Steps line names each command as the router will execute it (README Transaction Decoding: "execution steps").
Severity: minor
Definition of done
0x21command is listed as "Execute Sub-Plan".0x21command, with and without the allow-revert flag (0xa1).Model: opus-5-5