pub struct ResolvedTransactionView<D: TransactionData> { /* private fields */ }
Expand description
A parsed and sanitized transaction view that has had all address lookups resolved.
Implementations§
Source§impl<D: TransactionData> ResolvedTransactionView<D>
impl<D: TransactionData> ResolvedTransactionView<D>
Sourcepub fn try_new(
view: TransactionView<true, D>,
resolved_addresses: Option<LoadedAddresses>,
reserved_account_keys: &HashSet<Pubkey>,
) -> Result<Self>
pub fn try_new( view: TransactionView<true, D>, resolved_addresses: Option<LoadedAddresses>, reserved_account_keys: &HashSet<Pubkey>, ) -> Result<Self>
Given a parsed and sanitized transaction view, and a set of resolved addresses, create a resolved transaction view.
Methods from Deref<Target = TransactionView<true, D>>§
Sourcepub fn num_signatures(&self) -> u8
pub fn num_signatures(&self) -> u8
Return the number of signatures in the transaction.
Sourcepub fn num_required_signatures(&self) -> u8
pub fn num_required_signatures(&self) -> u8
Return the number of required signatures in the transaction.
Sourcepub fn num_readonly_signed_static_accounts(&self) -> u8
pub fn num_readonly_signed_static_accounts(&self) -> u8
Return the number of readonly signed static accounts in the transaction.
Sourcepub fn num_readonly_unsigned_static_accounts(&self) -> u8
pub fn num_readonly_unsigned_static_accounts(&self) -> u8
Return the number of readonly unsigned static accounts in the transaction.
Sourcepub fn num_static_account_keys(&self) -> u8
pub fn num_static_account_keys(&self) -> u8
Return the number of static account keys in the transaction.
Sourcepub fn num_instructions(&self) -> u16
pub fn num_instructions(&self) -> u16
Return the number of instructions in the transaction.
Sourcepub fn num_address_table_lookups(&self) -> u8
pub fn num_address_table_lookups(&self) -> u8
Return the number of address table lookups in the transaction.
Sourcepub fn total_writable_lookup_accounts(&self) -> u16
pub fn total_writable_lookup_accounts(&self) -> u16
Return the number of writable lookup accounts in the transaction.
Sourcepub fn total_readonly_lookup_accounts(&self) -> u16
pub fn total_readonly_lookup_accounts(&self) -> u16
Return the number of readonly lookup accounts in the transaction.
Sourcepub fn signatures(&self) -> &[Signature]
pub fn signatures(&self) -> &[Signature]
Return the slice of signatures in the transaction.
Sourcepub fn static_account_keys(&self) -> &[Pubkey]
pub fn static_account_keys(&self) -> &[Pubkey]
Return the slice of static account keys in the transaction.
Sourcepub fn recent_blockhash(&self) -> &Hash
pub fn recent_blockhash(&self) -> &Hash
Return the recent blockhash in the transaction.
Sourcepub fn instructions_iter(&self) -> InstructionsIterator<'_>
pub fn instructions_iter(&self) -> InstructionsIterator<'_>
Return an iterator over the instructions in the transaction.
Sourcepub fn address_table_lookup_iter(&self) -> AddressTableLookupIterator<'_>
pub fn address_table_lookup_iter(&self) -> AddressTableLookupIterator<'_>
Return an iterator over the address table lookups in the transaction.
Sourcepub fn message_data(&self) -> &[u8] ⓘ
pub fn message_data(&self) -> &[u8] ⓘ
Return the serialized message data. This does not include the signatures.
Sourcepub fn program_instructions_iter(
&self,
) -> impl Iterator<Item = (&Pubkey, SVMInstruction<'_>)>
pub fn program_instructions_iter( &self, ) -> impl Iterator<Item = (&Pubkey, SVMInstruction<'_>)>
Return an iterator over the instructions paired with their program ids.
Trait Implementations§
Source§impl<D: TransactionData> Debug for ResolvedTransactionView<D>
impl<D: TransactionData> Debug for ResolvedTransactionView<D>
Source§impl<D: TransactionData> Deref for ResolvedTransactionView<D>
impl<D: TransactionData> Deref for ResolvedTransactionView<D>
Source§impl<D: TransactionData> SVMMessage for ResolvedTransactionView<D>
impl<D: TransactionData> SVMMessage for ResolvedTransactionView<D>
Source§fn num_total_signatures(&self) -> u64
fn num_total_signatures(&self) -> u64
Source§fn num_write_locks(&self) -> u64
fn num_write_locks(&self) -> u64
Source§fn recent_blockhash(&self) -> &Hash
fn recent_blockhash(&self) -> &Hash
Source§fn num_instructions(&self) -> usize
fn num_instructions(&self) -> usize
Source§fn instructions_iter(&self) -> impl Iterator<Item = SVMInstruction<'_>>
fn instructions_iter(&self) -> impl Iterator<Item = SVMInstruction<'_>>
Source§fn program_instructions_iter(
&self,
) -> impl Iterator<Item = (&Pubkey, SVMInstruction<'_>)>
fn program_instructions_iter( &self, ) -> impl Iterator<Item = (&Pubkey, SVMInstruction<'_>)>
Source§fn account_keys(&self) -> AccountKeys<'_>
fn account_keys(&self) -> AccountKeys<'_>
Source§fn is_writable(&self, index: usize) -> bool
fn is_writable(&self, index: usize) -> bool
true
if the account at index
is writable.Source§fn is_invoked(&self, key_index: usize) -> bool
fn is_invoked(&self, key_index: usize) -> bool
Source§fn num_lookup_tables(&self) -> usize
fn num_lookup_tables(&self) -> usize
Source§fn message_address_table_lookups(
&self,
) -> impl Iterator<Item = SVMMessageAddressTableLookup<'_>>
fn message_address_table_lookups( &self, ) -> impl Iterator<Item = SVMMessageAddressTableLookup<'_>>
Source§fn is_instruction_account(&self, key_index: usize) -> bool
fn is_instruction_account(&self, key_index: usize) -> bool
Source§fn get_durable_nonce(&self) -> Option<&Pubkey>
fn get_durable_nonce(&self) -> Option<&Pubkey>
Auto Trait Implementations§
impl<D> Freeze for ResolvedTransactionView<D>where
D: Freeze,
impl<D> RefUnwindSafe for ResolvedTransactionView<D>where
D: RefUnwindSafe,
impl<D> Send for ResolvedTransactionView<D>where
D: Send,
impl<D> Sync for ResolvedTransactionView<D>where
D: Sync,
impl<D> Unpin for ResolvedTransactionView<D>where
D: Unpin,
impl<D> UnwindSafe for ResolvedTransactionView<D>where
D: UnwindSafe,
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> 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