chore: V4 struct decodes target the deployed shape, and silently stop describing swaps if periphery adds a field #358
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Raised while resolving #353. Judged deliberate rather than defective, so filed as a question to settle rather than a bug.
decodeV4Swap()insrc/shared/uniswap.jsdecodes the currently deployed V4 struct shapes — e.g.ExactInputParamsas(Currency, PathKey[], uint128, uint128).Uniswap/v4-peripherymainhas since added aminHopPriceX36field to those structs.Targeting the deployed shape is almost certainly correct today. The concern is the failure mode if a chain the extension targets ever runs the newer periphery: the tuple decodes fail and fall through to
SETTLE/TAKE, so the approval screen quietly stops describing the swap. It degrades safely — no wrong number — but silently, and the user is left with an approval screen that does not say what the transaction does.Definition of done
make checkgreen.