I am pretty new to web3 world and my question could seem stupid, but donโt judge me
I am using moralis streams api and want to track certain addresses. I am getting notified, but I have problems with distinguishing transfers from swaps. Can someone guide me or give me some idea on how to do that?
you could look in the logs from that transaction, a swap has more logs usually
Thats true, in the logs I can see something like this
"logs": [
{
"logIndex": "1323",
"transactionHash": "0xd8b3...8a01b89fd312780bb84c",
"address": "0x3c499...03d5c3359",
"data": "0x0000000000000000...0000000000000186a0",
"topic0": "0xddf252ad1b...523b3ef",
"topic1": "0x00000000....30a090f0",
"topic2": "0x000000000...7ff58f74c02b",
"topic3": null,
"triggered_by": [
"0x24ef24...0"
]
}
],
But how can I determine what tokens being swapped?
here you can see from what address to what address the tokens are transferred
here is the token address