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
impl TransactionRecord
sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self>
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Create a new TransactionRecord
from protobuf-encoded bytes
.
§Errors
Error::FromProtobuf
if decoding the bytes fails to produce a valid protobuf.Error::FromProtobuf
if decoding the protobuf fails.
Trait Implementations§
source§impl Clone for TransactionRecord
impl Clone for TransactionRecord
source§fn clone(&self) -> TransactionRecord
fn clone(&self) -> TransactionRecord
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for TransactionRecord
impl RefUnwindSafe for TransactionRecord
impl Send for TransactionRecord
impl Sync for TransactionRecord
impl Unpin for TransactionRecord
impl UnwindSafe for TransactionRecord
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request