Handling Events and Logs
OP_NET smart contracts emit events to notify external systems of important state changes. These events are recorded in the blockchain as logs, which can be accessed and processed by external applications.
Coming Soon
The WebSocket feature for listening to events directly from the OP_NET network is not yet available.
Alternative
If you need to capture and handle events immediately, you will need to build your own indexer. This involves:
- Scanning the blockchain for relevant transactions.
- Decoding event data using the event decoders provided by your contracts.
Stay tuned for updates as WebSocket support is introduced, simplifying event listening and real-time interactions.