fix: a V4 swap action not in the deployed shape is shown as not decoded (closes #358)
check / check (push) Successful in 5m50s
e2e / e2e-chrome (push) Successful in 5m6s
e2e / e2e-firefox (push) Successful in 2m33s

The four V4 swap actions are read only as the parameter structs deployed
on mainnet and Sepolia. ethers decoded the newer v4-periphery structs,
which add minHopPriceX36, as the deployed ones without an error, and the
newer multi-hop exact-in struct showed the offset of its hop-price array
as the swap amount. A decode now counts only when encoding it again gives
back the same bytes. When a swap action fails that, the Steps line lists
its step as "V4 Swap (could not be decoded)", so the screen no longer
looks complete without it. The README records the pinned shape.

Model: opus-5-5
This commit is contained in:
2026-10-14 02:21:26 +00:00
parent 8e52528f8b
commit 6e00d52f89
3 changed files with 184 additions and 12 deletions
+5 -1
View File
@@ -2678,7 +2678,11 @@ Currently supported:
or recipient, and amount.
- **Uniswap Universal Router**: `execute()` calls — shows swap direction (e.g.
"Swap USDT → ETH"), token addresses, amounts, execution steps, and deadline.
Decodes Permit2, V2/V3/V4 swaps, wrap/unwrap, and balance checks.
Decodes Permit2, V2/V3/V4 swaps, wrap/unwrap, and balance checks. A V4 swap
action is read only in the parameter shape deployed on mainnet and Sepolia,
not in the newer one on `v4-periphery` `main`, which adds a `minHopPriceX36`
field. An action in any other shape is not read, and its step is listed as
`V4 Swap (could not be decoded)`.
### Non-Goals Forever