1use super::{Address, Identifier, ObjectId, StructTag, TypeTag};
6
7#[derive(Eq, PartialEq, Clone, Debug)]
17#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
18#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
19#[cfg_attr(feature = "proptest", derive(test_strategy::Arbitrary))]
20pub struct TransactionEvents(pub Vec<Event>);
21
22#[derive(PartialEq, Eq, Debug, Clone)]
32#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
33#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
34#[cfg_attr(feature = "proptest", derive(test_strategy::Arbitrary))]
35pub struct Event {
36 pub package_id: ObjectId,
39 pub module: Identifier,
42 pub sender: Address,
45 #[cfg_attr(feature = "serde", serde(rename = "type"))]
47 pub type_: StructTag,
48 #[cfg_attr(
50 feature = "serde",
51 serde(with = "crate::_serde::ReadableBase64Encoded")
52 )]
53 #[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::Base64"))]
54 pub contents: Vec<u8>,
55}
56
57#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
58#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
59#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
60#[cfg_attr(feature = "proptest", derive(test_strategy::Arbitrary))]
61pub struct BalanceChange {
62 pub address: Address,
64 pub coin_type: TypeTag,
66 #[cfg_attr(feature = "serde", serde(with = "crate::_serde::ReadableDisplay"))]
71 #[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::I128"))]
72 pub amount: i128,
73}