Struct hedera::TransactionRecord

source ·
pub struct TransactionRecord {
Show 21 fields pub receipt: TransactionReceipt, pub transaction_hash: Vec<u8>, pub consensus_timestamp: OffsetDateTime, pub contract_function_result: Option<ContractFunctionResult>, pub transfers: Vec<Transfer>, pub token_transfers: HashMap<TokenId, HashMap<AccountId, i64>>, pub token_nft_transfers: HashMap<TokenId, Vec<TokenNftTransfer>>, pub transaction_id: TransactionId, pub transaction_memo: String, pub transaction_fee: Hbar, pub schedule_ref: Option<ScheduleId>, pub assessed_custom_fees: Vec<AssessedCustomFee>, pub automatic_token_associations: Vec<TokenAssociation>, pub parent_consensus_timestamp: Option<OffsetDateTime>, pub alias_key: Option<PublicKey>, pub children: Vec<Self>, pub duplicates: Vec<Self>, pub ethereum_hash: Vec<u8>, pub prng_bytes: Option<Vec<u8>>, pub prng_number: Option<u32>, pub evm_address: Option<EvmAddress>,
}
Expand description

The complete record for a transaction on Hedera that has reached consensus. Response from TransactionRecordQuery.

Fields§

§receipt: TransactionReceipt

The status (reach consensus, or failed, or is unknown) and the ID of any new account/file/instance created.

§transaction_hash: Vec<u8>

The hash of the Transaction that executed (not the hash of any Transaction that failed for having a duplicate TransactionID).

§consensus_timestamp: OffsetDateTime

The consensus timestamp.

§contract_function_result: Option<ContractFunctionResult>

Record of the value returned by the smart contract function or constructor.

§transfers: Vec<Transfer>

All hbar transfers as a result of this transaction, such as fees, or transfers performed by the transaction, or by a smart contract it calls, or by the creation of threshold records that it triggers.

§token_transfers: HashMap<TokenId, HashMap<AccountId, i64>>

All fungible token transfers as a result of this transaction.

§token_nft_transfers: HashMap<TokenId, Vec<TokenNftTransfer>>

All NFT Token transfers as a result of this transaction.

§transaction_id: TransactionId

The ID of the transaction this record represents.

§transaction_memo: String

The memo that was submitted as part of the transaction.

§transaction_fee: Hbar

The actual transaction fee charged.

§schedule_ref: Option<ScheduleId>

Reference to the scheduled transaction ID that this transaction record represents.

§assessed_custom_fees: Vec<AssessedCustomFee>

All custom fees that were assessed during a TransferTransaction, and must be paid if the transaction status resolved to SUCCESS.

§automatic_token_associations: Vec<TokenAssociation>

All token associations implicitly created while handling this transaction

§parent_consensus_timestamp: Option<OffsetDateTime>

In the record of an internal transaction, the consensus timestamp of the user transaction that spawned it.

§alias_key: Option<PublicKey>

In the record of an internal CryptoCreate transaction triggered by a user transaction with a (previously unused) alias, the new account’s alias.

§children: Vec<Self>

The records of processing all child transaction spawned by the transaction with the given top-level id, in consensus order. Always empty if the top-level status is UNKNOWN.

§duplicates: Vec<Self>

The records of processing all consensus transaction with the same id as the distinguished record above, in chronological order.

§ethereum_hash: Vec<u8>

The keccak256 hash of the ethereumData. This field will only be populated for EthereumTransaction.

§prng_bytes: Option<Vec<u8>>

In the record of a PRNG transaction with no output range, a pseudorandom 384-bit string.

§prng_number: Option<u32>

In the record of a PRNG transaction with an output range, the output of a PRNG whose input was a 384-bit string.

§evm_address: Option<EvmAddress>

The last 20 bytes of the keccak-256 hash of a ECDSA_SECP256K1 primitive key.

Implementations§

source§

impl TransactionRecord

source

pub fn from_bytes(bytes: &[u8]) -> Result<Self>

Create a new TransactionRecord from protobuf-encoded bytes.

§Errors
source

pub fn to_bytes(&self) -> Vec<u8>

Convert self to a protobuf-encoded Vec<u8>.

Trait Implementations§

source§

impl Clone for TransactionRecord

source§

fn clone(&self) -> TransactionRecord

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TransactionRecord

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromRef<T> for T
where T: Clone,

source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more