Skip to content

Decoding uniswap v3 Router with 2 swaps #32

Answered by Elnaril
Chief-Alchemist asked this question in Q&A
Discussion options

You must be logged in to vote

(Converting issue #31 into a discussion)

When there is a first swap with an unknown amountOut (when the trx is encoded), then a second swap which has to use it as its own amountIn.

Worth to be noted, this SDK supports now 2 convenient methods that deal with this case for you:

  • v2_swap_exact_in_from_balance()
  • v3_swap_exact_in_from_balance()

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Elnaril
Comment options

@Chief-Alchemist
Comment options

Answer selected by Elnaril
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #31 on November 17, 2023 08:33.