1use super::Address;
2use super::Identifier;
3use super::ObjectId;
4use super::StructTag;
5use super::TypeTag;
6
7#[derive(Eq, PartialEq, Clone, Debug)]
17#[cfg_attr(
18 feature = "serde",
19 derive(serde_derive::Serialize, serde_derive::Deserialize)
20)]
21#[cfg_attr(feature = "proptest", derive(test_strategy::Arbitrary))]
22pub struct TransactionEvents(
23 #[cfg_attr(feature = "proptest", any(proptest::collection::size_range(0..=1).lift()))]
24 pub Vec<Event>,
25);
26
27#[derive(PartialEq, Eq, Debug, Clone)]
37#[cfg_attr(
38 feature = "serde",
39 derive(serde_derive::Serialize, serde_derive::Deserialize)
40)]
41#[cfg_attr(feature = "proptest", derive(test_strategy::Arbitrary))]
42pub struct Event {
43 pub package_id: ObjectId,
46
47 pub module: Identifier,
50
51 pub sender: Address,
53
54 #[cfg_attr(feature = "serde", serde(rename = "type"))]
56 pub type_: StructTag,
57
58 #[cfg_attr(
60 feature = "serde",
61 serde(with = "crate::_serde::ReadableBase64Encoded")
62 )]
63 pub contents: Vec<u8>,
64}
65
66#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
67#[cfg_attr(
68 feature = "serde",
69 derive(serde_derive::Serialize, serde_derive::Deserialize)
70)]
71#[cfg_attr(feature = "proptest", derive(test_strategy::Arbitrary))]
72pub struct BalanceChange {
73 pub address: Address,
75
76 pub coin_type: TypeTag,
78
79 pub amount: i128,
83}