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