Replies: 2 comments 3 replies
-
|
@t4sk, your insight would be greatly appreciated sir. |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Hi, thank you both.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
This is a request for extra documentation in order to understand in depth the contracts used in
test_exactInputSingle().From the official documentation of Uniswap v3, there are two routers deployed:
In the test cases, the address of SwapRouter02 is used along with a custom interface that is identical to the following:
https://github.com/Uniswap/swap-router-contracts/blob/main/contracts/interfaces/IV3SwapRouter.sol
In fact, importing this interface results in tests working as expected.
In order for the test case to work with SwapRouter from v3-periphery, the test should import from v3-periphery and provide the
deadlineproperty along with the rest. This property is used in a modifier to time-bound the swap, which sounds reasonable.The official documentation of Uniswap v3 is around SwapRouter of v3-periphery, however, both contracts were deployed from Uniswap.
It is confusing which one to use and why.
As it turns out from the following open issue: Uniswap/swap-router-contracts#48 it is confusing for other people too. LLMs provide an explanation, but there are chances they hallucinate.
I would appreciate any explanation/documentation to read further.
Thank you in advance, and keep up the great work!
Beta Was this translation helpful? Give feedback.
All reactions