fix: a WRAP_ETH says where its ETH goes (closes #747)
A WRAP_ETH into the router now always reads `Moved to: The router`. That is true whichever step then takes the WETH. Other takes keep `The swap step that spends it`. A later WRAP_ETH of CONTRACT_BALANCE to anyone but the router now gets a `Moved from the sender` line reading `All the ETH the transaction carries`, and `Moved to` names the recipient. It gets none after an UNWRAP_WETH into the router, or while the router holds ETH from a V4 step. README states both rules. Model: opus-5-5
This commit was merged in pull request #750.
This commit is contained in:
@@ -1414,15 +1414,19 @@ when both tokens are known. The lines are:
|
||||
the sender that the `Amount` line does not include. The same three lines show
|
||||
what a `PERMIT2_TRANSFER_FROM` moves and where. A `WRAP_ETH` can pay its WETH
|
||||
to a recipient other than the router. When its amount gets these lines, its
|
||||
`Moved to` line names that recipient, or reads `The sender`. A `WRAP_ETH`
|
||||
after the step that sets `Token In` takes the amount it states from the
|
||||
sender. When it pays anyone but the router, that amount gets these lines. When
|
||||
it pays the router, that amount joins the `Amount` line if `Token In` is ETH,
|
||||
and gets these lines if not. A later `WRAP_ETH` of `CONTRACT_BALANCE` states
|
||||
no amount, so it gets no lines. ETH that the sender pays a V4 step or a
|
||||
`WRAP_ETH` of a stated amount can get these three lines when the router may
|
||||
hold ETH from an earlier step. When the decoder knows the amount, its
|
||||
`Moved from the sender` line reads `Up to` and the amount.
|
||||
`Moved to` line names that recipient, or reads `The sender`. For a `WRAP_ETH`
|
||||
into the router, `Moved to` reads `The router`. A `WRAP_ETH` after the step
|
||||
that sets `Token In` takes the amount it states from the sender. When it pays
|
||||
anyone but the router, that amount gets these lines. When it pays the router,
|
||||
that amount joins the `Amount` line if `Token In` is ETH, and gets these lines
|
||||
if not. A later `WRAP_ETH` of `CONTRACT_BALANCE` to anyone but the router gets
|
||||
these lines. It gets none after an `UNWRAP_WETH` into the router, or while the
|
||||
router holds ETH from a V4 step. When it gets them, its
|
||||
`Moved from the sender` line reads `All the ETH the transaction carries`. ETH
|
||||
that the sender pays a V4 step or a `WRAP_ETH` of a stated amount can get
|
||||
these three lines when the router may hold ETH from an earlier step. When the
|
||||
decoder knows the amount, its `Moved from the sender` line reads `Up to` and
|
||||
the amount.
|
||||
- `Permit2 allowance`, `Allowance token` and `Allowance spender`: each allowance
|
||||
that a `PERMIT2_PERMIT` or `PERMIT2_PERMIT_BATCH` grants, unless the permit's
|
||||
amount already stands as the `Amount` figure.
|
||||
|
||||
Reference in New Issue
Block a user