Events
Move events serve the same product purpose as Solidity events: signal important on-chain state changes to off-chain readers.
Solidity event
Section titled “Solidity event”event MessageAdded(address sender, string message, uint256 addedAt);Move event
Section titled “Move event”#[event]struct MessageAdded has drop, store { sender: address, message: String, added_at: u64,}Emitting the event
Section titled “Emitting the event”emit MessageAdded(sender, message, block.timestamp);event::emit(MessageAdded { sender, message, added_at: timestamp::now_seconds(),});Move events are first-class structs. That gives you a cleaner typed model, and they can be queried later through the Indexer or transaction APIs depending on the use case.