Identify token transfer in transaction #119
-
Asked by
|
Beta Was this translation helpful? Give feedback.
Answered by
gregnazario
Apr 5, 2024
Replies: 1 comment 2 replies
-
I assume you are talking about transferring coin (ERC-20 on Aptos), you can find these info in the event of the tx. Here's an example where I transfer APT to another account. It had one |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
0x1::coin::DepositEvent
will tell you when someone deposits tokens to their account.0x1::coin::WithdrawEvent
will tell you when someone removes tokens from their account.In the case of buys or transfers, you will always have a deposit on the user who receives the token, and a withdrawal from the other user. It is possible if the coins don't go through the
CoinStore
that no withdraw event is emittedHere's a more detailed doc on how to track coin events https://aptos.dev/guides/system-integrators-guide/#tracking-coin-balance-changes