is it possible to listen the return asset quantity of specified account in contract?
e.g i use contract(A) to send asset of the specified account(B) to a DEX, can i listen the return asset quantity on contract A or somewhere else?
-
Hm I'm not sure I understand what you're trying to do. You could use the notify listener for the transfer action then you can wait for actions of that code:action that notify your contract.– NatOct 23, 2021 at 21:49
1 Answer
If understand your question correctly, you are looking for a notification-handler.
Take a look at this on_notify-example.
For multiple token-contracts to listen to, you will need multiple notification-handlers.
-
notification-handler can only listen the notification to self, not other account, what i need is contract A to send asset to swap DEX from account B, then listen the asset returned to account B Oct 30, 2021 at 1:31
-