fix: a V4 swap action not in the deployed shape is shown as not decoded (closes #358)
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user