Query/Subscribe for messages(events)
How to work with contract event
Last updated
Was this helpful?
How to work with contract event
Last updated
Was this helpful?
How to work with contract events
Account messages are of 3 types:
External inbound (msg_type
=1 or ExtIn
). It is for example, deploy message or run message.
Internal message(msg_type
=0). It is when one contract calls another contract it sends an internal message. These messages are constructed with target contract ABI. Can be of 2 subtypes:
Internal inbound (IntIn
)
Internal outbound (IntOut
)
External outbound messages(msg_type
=2 or ExtOut
). These can be of 2 subtypes:
Events - these are also specified in contract ABI. .
Return - these are generated by contract function's return.
You can fetch events of you contract like this:
Or subscribe to them:
To subscribe to all this. Don't forget to specify your own callback.
See the full sample here
Read about used API here -> .
See the full sample here
See the full sample here
Check out for this use case.