Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f30b77e1d4 |
@@ -3500,16 +3500,16 @@ Currently supported:
|
|||||||
later permit or batch may raise what Permit2 lets the router take, and so may
|
later permit or batch may raise what Permit2 lets the router take, and so may
|
||||||
a step the decoder does not read in full: a command the decoder does not read
|
a step the decoder does not read in full: a command the decoder does not read
|
||||||
(listed at the end of this section), a step whose input it cannot read, in
|
(listed at the end of this section), a step whose input it cannot read, in
|
||||||
whole or in part, and a step it fails on. A permit on the zero address never
|
whole or in part, and a step it fails on. Every other `PERMIT2_PERMIT`, before
|
||||||
stands as the `Amount` figure, because Permit2 has no allowance of ETH. Every
|
the step that sets the input side or after it, leaves `Token In` and the
|
||||||
other `PERMIT2_PERMIT`, before the step that sets the input side or after it,
|
`Amount` line as they read with no permit, unless it lets a spender other than
|
||||||
leaves `Token In` and the `Amount` line as they read with no permit, unless it
|
the router take `Token In` (see below): a permit of 5,000 DAI to another
|
||||||
lets a spender other than the router take `Token In` (see below): a permit of
|
address and then a V3 exact-in of 600 USDT read `Swap USDT → USDC` with
|
||||||
5,000 DAI to another address and then a V3 exact-in of 600 USDT read
|
`Amount 600.0000 USDT`, and so do that exact-in and then a permit of 5,000 DAI
|
||||||
`Swap USDT → USDC` with `Amount 600.0000 USDT`, and so do that exact-in and
|
to the router. A permit on the zero address never stands as the `Amount`
|
||||||
then a permit of 5,000 DAI to the router. When a permit's amount stands and
|
figure, because Permit2 has no allowance of ETH. When a permit's amount stands
|
||||||
the step that sets the input side spends a token other than the permit's, or
|
and the step that sets the input side spends a token other than the permit's,
|
||||||
one the decoder does not know, that step's amount gets lines of its own,
|
or one the decoder does not know, that step's amount gets lines of its own,
|
||||||
unless it states no amount and the user pays it none of its input token. Each
|
unless it states no amount and the user pays it none of its input token. Each
|
||||||
take the total does not count gives three lines after the `Amount` line (after
|
take the total does not count gives three lines after the `Amount` line (after
|
||||||
`Token In` when there is none): one of a token other than `Token In`; one of
|
`Token In` when there is none): one of a token other than `Token In`; one of
|
||||||
|
|||||||
@@ -2031,15 +2031,15 @@ function decode(data, toAddress, chainId, sources, fromAddress) {
|
|||||||
// before it takes under whatever allowance the router already had, so
|
// before it takes under whatever allowance the router already had, so
|
||||||
// it may take more. A later permit or batch, or a later step this
|
// it may take more. A later permit or batch, or a later step this
|
||||||
// decoder did not read, may raise what Permit2 lets the router take.
|
// decoder did not read, may raise what Permit2 lets the router take.
|
||||||
// A permit on the zero address never stands as the Amount figure,
|
|
||||||
// because Permit2 has no allowance of ETH.
|
|
||||||
// Every other PERMIT2_PERMIT leaves Token In and the Amount line as
|
// Every other PERMIT2_PERMIT leaves Token In and the Amount line as
|
||||||
// they read with no permit, and gets lines of its own below. A step
|
// they read with no permit, and gets lines of its own below. A permit
|
||||||
// that may take from the sender what this decoder did not read leaves
|
// on the zero address never stands as the Amount figure, because
|
||||||
// no figure, permit or not (see spentUnread()), and so do a permit
|
// Permit2 has no allowance of ETH. A step that may take from the
|
||||||
// or batch whose input it cannot read (see permitUnread()) and an
|
// sender what this decoder did not read leaves no figure, permit or
|
||||||
// allowance of Token In to another spender (see toAnotherSpender). An
|
// not (see spentUnread()), and so do a permit or batch whose input it
|
||||||
// EXECUTE_SUB_PLAN step leaves both sides unknown (below).
|
// cannot read (see permitUnread()) and an allowance of Token In to
|
||||||
|
// another spender (see toAnotherSpender). An EXECUTE_SUB_PLAN step
|
||||||
|
// leaves both sides unknown (below).
|
||||||
const stepCommands = Array.from(
|
const stepCommands = Array.from(
|
||||||
commandsBytes,
|
commandsBytes,
|
||||||
(b) => commands[b & commandTypeMask],
|
(b) => commands[b & commandTypeMask],
|
||||||
|
|||||||
Reference in New Issue
Block a user