identify if a contract is v2 or v3 (uniswap) #3499
Replies: 3 comments 3 replies
-
This isn’t really under the purview of ethers; this would be up to a higher level library offering a Uniswap API. :) |
Beta Was this translation helpful? Give feedback.
-
Thanks for moving the topic to the right category. Interactions with v2 and v3 tokens by a user on a Dapp need a different router_address. I wonder how the dapps manage this case, if in case of error they use the opposite router or there is a mode that escapes me. |
Beta Was this translation helpful? Give feedback.
-
A simple advice but, theoretically, effective. Thank you! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the Feature
it would be interesting to somehow understand if a contract you are about to interact with is a v2 or v3 contract as the router_address is different, if there is no way it would be interesting to implement one.
Code Example
No response
Beta Was this translation helpful? Give feedback.
All reactions