Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6af4ca1bd |
No files matched your search
@@ -1364,10 +1364,10 @@ when both tokens are known. The lines are:
|
|||||||
sender. When it pays anyone but the router, that amount gets these lines. When
|
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,
|
it pays the router, that amount joins the `Amount` line if `Token In` is ETH,
|
||||||
and gets these lines if not. A `WRAP_ETH` of `CONTRACT_BALANCE` states no
|
and gets these lines if not. A `WRAP_ETH` of `CONTRACT_BALANCE` states no
|
||||||
amount, so it gets no lines. ETH that the sender pays a V4 step or a
|
amount, so it gets none. ETH that the sender pays a V4 step or such a
|
||||||
`WRAP_ETH` of a stated amount can get these three lines when the router may
|
`WRAP_ETH` can get these three lines when the router may hold ETH from an
|
||||||
hold ETH from an earlier step. When the decoder knows the amount, its
|
earlier step. When the decoder knows the amount, its `Moved from the sender`
|
||||||
`Moved from the sender` line reads `Up to` and the amount.
|
line reads `Up to` and the amount.
|
||||||
- `Permit2 allowance`, `Allowance token` and `Allowance spender`: each allowance
|
- `Permit2 allowance`, `Allowance token` and `Allowance spender`: each allowance
|
||||||
that a `PERMIT2_PERMIT` or `PERMIT2_PERMIT_BATCH` grants, unless the permit's
|
that a `PERMIT2_PERMIT` or `PERMIT2_PERMIT_BATCH` grants, unless the permit's
|
||||||
amount already stands as the `Amount` figure.
|
amount already stands as the `Amount` figure.
|
||||||
|
|||||||
@@ -1382,8 +1382,8 @@ function decode(data, toAddress, chainId, sources, fromAddress) {
|
|||||||
};
|
};
|
||||||
// A step may take from the sender what this decoder did not read: a
|
// A step may take from the sender what this decoder did not read: a
|
||||||
// V4 step whose input or one of whose SETTLEs or SETTLE_ALLs it
|
// V4 step whose input or one of whose SETTLEs or SETTLE_ALLs it
|
||||||
// cannot read; a V2 or V3 swap step, PERMIT2_TRANSFER_FROM or WRAP_ETH
|
// cannot read; a V2 or V3 swap step or PERMIT2_TRANSFER_FROM whose
|
||||||
// whose input it cannot read; a PERMIT2_TRANSFER_FROM_BATCH; an
|
// input it cannot read; a PERMIT2_TRANSFER_FROM_BATCH; an
|
||||||
// EXECUTE_SUB_PLAN; and a step it fails on. It is recorded with a null
|
// EXECUTE_SUB_PLAN; and a step it fails on. It is recorded with a null
|
||||||
// token and amount: one line says so, there is no Amount line, whose
|
// token and amount: one line says so, there is no Amount line, whose
|
||||||
// figure may then be too low, and the amount of a permit after it
|
// figure may then be too low, and the amount of a permit after it
|
||||||
@@ -1952,7 +1952,6 @@ function decode(data, toAddress, chainId, sources, fromAddress) {
|
|||||||
} else {
|
} else {
|
||||||
payeeUnread = true;
|
payeeUnread = true;
|
||||||
stepsUnread.push(i);
|
stepsUnread.push(i);
|
||||||
spentUnread();
|
|
||||||
}
|
}
|
||||||
} else if (command === "V4_SWAP") {
|
} else if (command === "V4_SWAP") {
|
||||||
const v4 = decodeV4Swap(inputs[i]);
|
const v4 = decodeV4Swap(inputs[i]);
|
||||||
|
|||||||
@@ -2861,15 +2861,6 @@ describe("uniswap decoder", () => {
|
|||||||
["Moved from the sender", UNDECODED],
|
["Moved from the sender", UNDECODED],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
kind: "a V3 exact-in of 600 USDT, then a WRAP_ETH whose input this decoder cannot read",
|
|
||||||
commands: [0x00, 0x0b],
|
|
||||||
inputs: [V3_600, "0x1234"],
|
|
||||||
lines: [
|
|
||||||
...USDT_600_GROUP,
|
|
||||||
["Moved from the sender", UNDECODED],
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
kind: "a V3 exact-in of 600 USDT, then a WRAP_ETH of nothing to another address, reads as on next",
|
kind: "a V3 exact-in of 600 USDT, then a WRAP_ETH of nothing to another address, reads as on next",
|
||||||
commands: [0x00, 0x0b],
|
commands: [0x00, 0x0b],
|
||||||
|
|||||||
Reference in new issue
Block a user