pub struct TransactionReader<'a> { /* private fields */ }Expand description
Reader for transaction data from Arrow batches.
Provides efficient access to transaction fields without copying data from the underlying Arrow columnar format. Each reader is bound to a specific row in the batch.
Implementations§
Source§impl<'a> TransactionReader<'a>
impl<'a> TransactionReader<'a>
Sourcepub fn new(batch: &'a RecordBatch, row_idx: usize) -> Result<Self>
pub fn new(batch: &'a RecordBatch, row_idx: usize) -> Result<Self>
Safely create a new reader for the given batch at row index and check that row_idx is within the bounds of the batch.
Sourcepub fn iter(batch: &'a RecordBatch) -> TransactionIterator<'a>
pub fn iter(batch: &'a RecordBatch) -> TransactionIterator<'a>
Create an iterator over all rows in the batch.
Sourcepub fn block_hash(&self) -> Result<Hash, ReadError>
pub fn block_hash(&self) -> Result<Hash, ReadError>
The hash of the block in which this transaction was included.
Sourcepub fn block_number(&self) -> Result<BlockNumber, ReadError>
pub fn block_number(&self) -> Result<BlockNumber, ReadError>
The number of the block in which this transaction was included.
Sourcepub fn gas_price(&self) -> Result<Option<Quantity>, ReadError>
pub fn gas_price(&self) -> Result<Option<Quantity>, ReadError>
The gas price willing to be paid by the sender.
Sourcepub fn nonce(&self) -> Result<Quantity, ReadError>
pub fn nonce(&self) -> Result<Quantity, ReadError>
The number of transactions made by the sender prior to this one.
Sourcepub fn transaction_index(&self) -> Result<TransactionIndex, ReadError>
pub fn transaction_index(&self) -> Result<TransactionIndex, ReadError>
The index of the transaction in the block.
Sourcepub fn max_priority_fee_per_gas(&self) -> Result<Option<Quantity>, ReadError>
pub fn max_priority_fee_per_gas(&self) -> Result<Option<Quantity>, ReadError>
Maximum fee per gas the sender is willing to pay for priority.
Sourcepub fn max_fee_per_gas(&self) -> Result<Option<Quantity>, ReadError>
pub fn max_fee_per_gas(&self) -> Result<Option<Quantity>, ReadError>
Maximum total fee per gas the sender is willing to pay.
Sourcepub fn cumulative_gas_used(&self) -> Result<Quantity, ReadError>
pub fn cumulative_gas_used(&self) -> Result<Quantity, ReadError>
The total amount of gas used when this transaction was executed in the block.
Sourcepub fn effective_gas_price(&self) -> Result<Quantity, ReadError>
pub fn effective_gas_price(&self) -> Result<Quantity, ReadError>
The sum of the base fee and tip paid per unit of gas.
Sourcepub fn gas_used(&self) -> Result<Quantity, ReadError>
pub fn gas_used(&self) -> Result<Quantity, ReadError>
The amount of gas used by this transaction.
Sourcepub fn contract_address(&self) -> Result<Option<Address>, ReadError>
pub fn contract_address(&self) -> Result<Option<Address>, ReadError>
The contract address created, if the transaction was a contract creation.
Sourcepub fn logs_bloom(&self) -> Result<Data, ReadError>
pub fn logs_bloom(&self) -> Result<Data, ReadError>
The Bloom filter for the logs of the transaction.
Sourcepub fn status(&self) -> Result<Option<TransactionStatus>, ReadError>
pub fn status(&self) -> Result<Option<TransactionStatus>, ReadError>
Either 1 (success) or 0 (failure).
Sourcepub fn sighash(&self) -> Result<Option<Data>, ReadError>
pub fn sighash(&self) -> Result<Option<Data>, ReadError>
The first 4 bytes of the transaction input data.
Sourcepub fn access_list(&self) -> Result<Option<Vec<AccessList>>, ReadError>
pub fn access_list(&self) -> Result<Option<Vec<AccessList>>, ReadError>
The access list.
The authorization list.
Sourcepub fn max_fee_per_blob_gas(&self) -> Result<Option<Quantity>, ReadError>
pub fn max_fee_per_blob_gas(&self) -> Result<Option<Quantity>, ReadError>
The maximum fee per blob gas.
Sourcepub fn blob_versioned_hashes(&self) -> Result<Option<Vec<Hash>>, ReadError>
pub fn blob_versioned_hashes(&self) -> Result<Option<Vec<Hash>>, ReadError>
The blob versioned hashes.
Sourcepub fn l1_gas_price(&self) -> Result<Option<Quantity>, ReadError>
pub fn l1_gas_price(&self) -> Result<Option<Quantity>, ReadError>
The L1 gas price for L2 transactions.
Sourcepub fn l1_gas_used(&self) -> Result<Option<Quantity>, ReadError>
pub fn l1_gas_used(&self) -> Result<Option<Quantity>, ReadError>
The L1 gas used for L2 transactions.
Sourcepub fn l1_fee_scalar(&self) -> Result<Option<f64>, ReadError>
pub fn l1_fee_scalar(&self) -> Result<Option<f64>, ReadError>
The L1 fee scalar for L2 transactions.
Sourcepub fn gas_used_for_l1(&self) -> Result<Option<Quantity>, ReadError>
pub fn gas_used_for_l1(&self) -> Result<Option<Quantity>, ReadError>
The gas used for L1 for L2 transactions.
Sourcepub fn deposit_nonce(&self) -> Result<Option<Quantity>, ReadError>
pub fn deposit_nonce(&self) -> Result<Option<Quantity>, ReadError>
The deposit nonce for deposit transactions.
Sourcepub fn deposit_receipt_version(&self) -> Result<Option<Quantity>, ReadError>
pub fn deposit_receipt_version(&self) -> Result<Option<Quantity>, ReadError>
The deposit receipt version for deposit transactions.
Sourcepub fn l1_base_fee_scalar(&self) -> Result<Option<Quantity>, ReadError>
pub fn l1_base_fee_scalar(&self) -> Result<Option<Quantity>, ReadError>
The L1 base fee scalar for L2 transactions.
Sourcepub fn l1_blob_base_fee(&self) -> Result<Option<Quantity>, ReadError>
pub fn l1_blob_base_fee(&self) -> Result<Option<Quantity>, ReadError>
The L1 blob base fee for L2 transactions.
Sourcepub fn l1_blob_base_fee_scalar(&self) -> Result<Option<Quantity>, ReadError>
pub fn l1_blob_base_fee_scalar(&self) -> Result<Option<Quantity>, ReadError>
The L1 blob base fee scalar for L2 transactions.
Sourcepub fn l1_block_number(&self) -> Result<Option<Quantity>, ReadError>
pub fn l1_block_number(&self) -> Result<Option<Quantity>, ReadError>
The L1 block number for L2 transactions.
Trait Implementations§
Source§impl<'a> From<ArrowRowReader<'a>> for TransactionReader<'a>
impl<'a> From<ArrowRowReader<'a>> for TransactionReader<'a>
Source§fn from(inner: ArrowRowReader<'a>) -> Self
fn from(inner: ArrowRowReader<'a>) -> Self
Source§impl TryFrom<TransactionReader<'_>> for Transaction
impl TryFrom<TransactionReader<'_>> for Transaction
Auto Trait Implementations§
impl<'a> Freeze for TransactionReader<'a>
impl<'a> !RefUnwindSafe for TransactionReader<'a>
impl<'a> Send for TransactionReader<'a>
impl<'a> Sync for TransactionReader<'a>
impl<'a> Unpin for TransactionReader<'a>
impl<'a> !UnwindSafe for TransactionReader<'a>
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more