pub struct TransactionInfo {Show 14 fields
pub version: String,
pub hash: String,
pub state_change_hash: String,
pub event_root_hash: String,
pub state_checkpoint_hash: Option<String>,
pub gas_used: String,
pub success: bool,
pub vm_status: String,
pub accumulator_root_hash: String,
pub changes: Vec<WriteSetChange>,
pub events: Vec<Event>,
pub timestamp: Option<String>,
pub max_gas_amount: Option<String>,
pub transaction_type: TransactionType,
}Expand description
Represents a transaction on the Aptos blockchain Contains all relevant information about a transaction including metadata, payload, and execution results
Fields§
§version: String§hash: String§state_change_hash: String§event_root_hash: String§state_checkpoint_hash: Option<String>§gas_used: String§success: bool§vm_status: String§accumulator_root_hash: String§changes: Vec<WriteSetChange>§events: Vec<Event>§timestamp: Option<String>§max_gas_amount: Option<String>§transaction_type: TransactionTypeImplementations§
Source§impl TransactionInfo
impl TransactionInfo
Sourcepub fn is_successful(&self) -> bool
pub fn is_successful(&self) -> bool
Check if the transaction was successful
Sourcepub fn get_timestamp(&self) -> Option<u64>
pub fn get_timestamp(&self) -> Option<u64>
Get transaction timestamp
Sourcepub fn get_gas_used(&self) -> Option<u64>
pub fn get_gas_used(&self) -> Option<u64>
Get the amount of gas used
Sourcepub fn is_user_transaction(&self) -> bool
pub fn is_user_transaction(&self) -> bool
Check whether it is a user transaction
Sourcepub fn get_sender(&self) -> Option<&str>
pub fn get_sender(&self) -> Option<&str>
Get the sender address in this transaction.
pub fn get_spent_token(&self) -> Option<(String, u64)>
pub fn get_received_token(&self) -> Option<(String, u64)>
pub fn get_spent_token_eth(&self) -> Option<(String, f64)>
pub fn get_received_token_eth(&self) -> Option<(String, f64)>
pub fn getDirection(&self) -> String
pub fn calculate_all_token_balances(&self)
pub fn get_liquidity_pool_addresses(&self) -> Vec<String>
pub fn get_dex_names(&self) -> Vec<String>
Trait Implementations§
Source§impl Clone for TransactionInfo
impl Clone for TransactionInfo
Source§fn clone(&self) -> TransactionInfo
fn clone(&self) -> TransactionInfo
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransactionInfo
impl Debug for TransactionInfo
Source§impl<'de> Deserialize<'de> for TransactionInfo
impl<'de> Deserialize<'de> for TransactionInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TransactionInfo
impl RefUnwindSafe for TransactionInfo
impl Send for TransactionInfo
impl Sync for TransactionInfo
impl Unpin for TransactionInfo
impl UnwindSafe for TransactionInfo
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)