oasis_contract_sdk_types/event.rs
1//! Events.
2
3/// An event emitted from the contract.
4#[derive(Clone, Debug, cbor::Encode, cbor::Decode)]
5#[cbor(no_default)]
6pub struct Event {
7 /// Optional module name.
8 #[cbor(optional)]
9 pub module: String,
10
11 /// Unique code representing the event for the given module.
12 pub code: u32,
13
14 /// Arbitrary data associated with the event.
15 #[cbor(optional)]
16 pub data: Vec<u8>,
17}