vechain / thor

A general purpose blockchain highly compatible with Ethereum's ecosystem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to differentiate between events transfer and events approval from the json response we are getting from the transaction API.

shaswatsaloni opened this issue · comments

Hi Team,

I need help with the following issue:
For this particular transaction hash: https://explore.vechain.org/transactions/0xd86a13cab75536da29724e7365fb9933713c98b6c41289022193920311fb9c73#clauses

How to differentiate between events approval which is shown in the first image attached and events transfer which is in second image from the API response that we are getting.
1.
image
2.
image

The Given API is: https://vethor-node.vechain.com/transactions/0xd86a13cab75536da29724e7365fb9933713c98b6c41289022193920311fb9c73/receipt

Yaa, thanks the links was useful.
Just got a pattern that topics[0] is same for every event transfer:
"events": [
{
"address": "0x7ae288b7224ad8740b2d4fc2b2c8a2392caea3c6",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000f002d0fb76eb2147af05dd2ae58c66eceb2cf222",
"0x00000000000000000000000099304c9ce9582e1e537e6d1cd6199523e2213a82"
],
"data": "0x0000000000000000000000000000000000000000000001b1ae4d6e2ef5000000"
}

So, we can differentiate based on this?

Yaa, thanks the links was useful. Just got a pattern that topics[0] is same for every event transfer: "events": [ { "address": "0x7ae288b7224ad8740b2d4fc2b2c8a2392caea3c6", "topics": [ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000f002d0fb76eb2147af05dd2ae58c66eceb2cf222", "0x00000000000000000000000099304c9ce9582e1e537e6d1cd6199523e2213a82" ], "data": "0x0000000000000000000000000000000000000000000001b1ae4d6e2ef5000000" }

So, we can differentiate based on this?

Yes