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(pub Vec<Event>);
23
24#[derive(PartialEq, Eq, Debug, Clone)]
34#[cfg_attr(
35 feature = "serde",
36 derive(serde_derive::Serialize, serde_derive::Deserialize)
37)]
38#[cfg_attr(feature = "proptest", derive(test_strategy::Arbitrary))]
39pub struct Event {
40 pub package_id: ObjectId,
43
44 pub module: Identifier,
47
48 pub sender: Address,
50
51 #[cfg_attr(feature = "serde", serde(rename = "type"))]
53 pub type_: StructTag,
54
55 #[cfg_attr(
57 feature = "serde",
58 serde(with = "crate::_serde::ReadableBase64Encoded")
59 )]
60 pub contents: Vec<u8>,
61}
62
63#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
64#[cfg_attr(
65 feature = "serde",
66 derive(serde_derive::Serialize, serde_derive::Deserialize)
67)]
68#[cfg_attr(feature = "proptest", derive(test_strategy::Arbitrary))]
69pub struct BalanceChange {
70 pub address: Address,
72
73 pub coin_type: TypeTag,
75
76 #[cfg_attr(feature = "serde", serde(with = "crate::_serde::ReadableDisplay"))]
80 pub amount: i128,
81}