0

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?

1
  • 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.
    – Nat
    Oct 23 at 21:49
0

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.

2
  • 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
    – James Cai
    Oct 30 at 1:31
  • Ah. No, that's not possible then.
    – cmadh
    Oct 30 at 4:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.