Guys, is there a way to tell if an TX is a DEX transaction purely based on the information contained within the TxData? I would need to check whether a Tx is an interaction with one of the 5 biggest DEX'es

Oct 5, 2022, 3:02 PM
Ah yeah, so if the deployer of that contract was the Uniswap deployer for example
I am trying to create a tool, will also create website for it, where you can check for any Tx whether it was a Dex Swap yes or no
Only for the largest DEX'es
As right now it is a lot of trouble if you have to check tons and tons of transactions
Oct 5, 2022, 3:37 PM
and where do you need the deployer address?
Oct 5, 2022, 3:37 PM
Well there is a difference between ERC-20 transactions and normal transactions
Oct 5, 2022, 3:39 PM
so? I still don't get where deployer is needed
if you know the dex router addresses...
Oct 5, 2022, 3:40 PM
What would you suggest, the dex router addresses are enough?
Oct 5, 2022, 3:41 PM
let's suppose you have the deployer address
how do you proceed?
Oct 5, 2022, 3:43 PM
It just depends on the data, I need something stable but I guess the router address is even easier
Since you can do IF checks on the FROM and TO to see if something was a DEX transaction
Nor can those addresses be spoofed
Oct 5, 2022, 3:44 PM
then you need the pair
or check the interaction with the router
Oct 5, 2022, 3:45 PM
Well the data I have returns a nested struct with those additional transactions in them
Oct 5, 2022, 3:46 PM
yes that 0x7a25...
Oct 5, 2022, 3:46 PM
Let me get that data one sec, so you can see what I mean
https://pastebin.com/wPz0z5aa
This is not a nice example because it only has a SELL transaction
But the logic holds
Oct 5, 2022, 3:51 PM
sorry which is the question?
Oct 5, 2022, 3:51 PM
So now I will take all the router addresses manually and put them in a hashmap and returns a boolean
Oct 5, 2022, 3:51 PM
you can see the router here
Oct 5, 2022, 3:52 PM
Well, I guess you already answered it
Router address is enough
Thanks
Oct 5, 2022, 3:52 PM
😁😁
Oct 5, 2022, 3:52 PM

© 2024 Draquery.com All rights reserved.