use super::Address;
use super::Identifier;
use super::ObjectId;
use super::StructTag;
use super::TypeTag;
#[derive(Eq, PartialEq, Clone, Debug)]
#[cfg_attr(
feature = "serde",
derive(serde_derive::Serialize, serde_derive::Deserialize)
)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[cfg_attr(test, derive(test_strategy::Arbitrary))]
pub struct TransactionEvents(pub Vec<Event>);
#[derive(PartialEq, Eq, Debug, Clone)]
#[cfg_attr(
feature = "serde",
derive(serde_derive::Serialize, serde_derive::Deserialize)
)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[cfg_attr(test, derive(test_strategy::Arbitrary))]
pub struct Event {
pub package_id: ObjectId,
pub module: Identifier,
pub sender: Address,
#[cfg_attr(feature = "serde", serde(rename = "type"))]
pub type_: StructTag,
#[cfg_attr(
feature = "serde",
serde(with = "crate::_serde::ReadableBase64Encoded")
)]
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::Base64"))]
pub contents: Vec<u8>,
}
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
#[cfg_attr(
feature = "serde",
derive(serde_derive::Serialize, serde_derive::Deserialize)
)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[cfg_attr(test, derive(test_strategy::Arbitrary))]
pub struct BalanceChange {
pub address: Address,
pub coin_type: TypeTag,
#[cfg_attr(feature = "serde", serde(with = "crate::_serde::ReadableDisplay"))]
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::I128"))]
pub amount: i128,
}