How to define Fungible asset transfer Event? #545
-
Discord user IDNo response Describe your question in detail.I wonder how can i extract transfer in fungible asset event such as in this version, there are 3 deposit event and 1 withdraw event it means there are 1 transfer event and 2 mint event if What error, if any, are you getting?No response What have you tried or looked at? Or how can we reproduce the error?No response Which operating system are you using?N/A Which SDK or tool are you using? (if any)N/A Describe your environment or tooling in detailNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For FA use the Events are emitted by the FA/Coin store and done in a double entry accounting kind of way (have one event for withdraw and one event for deposit), index 0 and 1 are coin movements. If a coin isn't moved into an store then there will be no event. My understanding of what events represent.
Details from graphql (querying pre-parsed tables) https://cloud.hasura.io/public/graphiql?endpoint=https%3A%2F%2Findexer.mainnet.aptoslabs.com%2Fv1%2Fgraphql&query=query+MyQuery+%7B%0A++fungible_asset_activities%28%0A++++where%3A+%7Btransaction_version%3A+%7B_eq%3A+%221657038910%22%7D%7D%0A++++order_by%3A+%7Bevent_index%3A+asc%7D%0A++%29+%7B%0A++++event_index%0A++++asset_type%0A++++is_frozen%0A++++owner_address%0A++++storage_id%0A++++token_standard%0A++++type%0A++%7D%0A%7D%0A |
Beta Was this translation helpful? Give feedback.
For FA use the
store
to determine if it's a (complete) transfer or not.Events are emitted by the FA/Coin store and done in a double entry accounting kind of way (have one event for withdraw and one event for deposit), index 0 and 1 are coin movements. If a coin isn't moved into an store then there will be no event.
My understanding of what events represent.
0x4e1854f6d332c9525e258fb6e66f84b6af8aba687bbcb832a24768c4e175feec::abtc::ABTC
coin from0x93a63588720871f6e1c20218ce84f8689c0db0d20bb8910b6cf4c48b16797903
storage owned by0x3535c9b6b97d6c9c5528592ca9db3dc124b11cc1e82023e8b02bc382d03d6e65
0x4e1854f6d332c9525e258fb6e66f84b6af8aba687bbcb832a24768c4e175feec::abtc::ABTC
…