agave_transaction_view::resolved_transaction_view

Struct ResolvedTransactionView

Source
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>

Source

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>>§

Source

pub fn num_signatures(&self) -> u8

Return the number of signatures in the transaction.

Source

pub fn version(&self) -> TransactionVersion

Return the version of the transaction.

Source

pub fn num_required_signatures(&self) -> u8

Return the number of required signatures in the transaction.

Source

pub fn num_readonly_signed_static_accounts(&self) -> u8

Return the number of readonly signed static accounts in the transaction.

Source

pub fn num_readonly_unsigned_static_accounts(&self) -> u8

Return the number of readonly unsigned static accounts in the transaction.

Source

pub fn num_static_account_keys(&self) -> u8

Return the number of static account keys in the transaction.

Source

pub fn num_instructions(&self) -> u16

Return the number of instructions in the transaction.

Source

pub fn num_address_table_lookups(&self) -> u8

Return the number of address table lookups in the transaction.

Source

pub fn total_writable_lookup_accounts(&self) -> u16

Return the number of writable lookup accounts in the transaction.

Source

pub fn total_readonly_lookup_accounts(&self) -> u16

Return the number of readonly lookup accounts in the transaction.

Source

pub fn signatures(&self) -> &[Signature]

Return the slice of signatures in the transaction.

Source

pub fn static_account_keys(&self) -> &[Pubkey]

Return the slice of static account keys in the transaction.

Source

pub fn recent_blockhash(&self) -> &Hash

Return the recent blockhash in the transaction.

Source

pub fn instructions_iter(&self) -> InstructionsIterator<'_>

Return an iterator over the instructions in the transaction.

Source

pub fn address_table_lookup_iter(&self) -> AddressTableLookupIterator<'_>

Return an iterator over the address table lookups in the transaction.

Source

pub fn data(&self) -> &[u8]

Return the full serialized transaction data.

Source

pub fn message_data(&self) -> &[u8]

Return the serialized message data. This does not include the signatures.

Source

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>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<D: TransactionData> Deref for ResolvedTransactionView<D>

Source§

type Target = TransactionView<true, D>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<D: TransactionData> SVMMessage for ResolvedTransactionView<D>

Source§

fn num_total_signatures(&self) -> u64

Returns the total number of signatures in the message. This includes required transaction signatures as well as any pre-compile signatures that are attached in instructions.
Source§

fn num_write_locks(&self) -> u64

Returns the number of requested write-locks in this message. This does not consider if write-locks are demoted.
Source§

fn recent_blockhash(&self) -> &Hash

Return the recent blockhash.
Source§

fn num_instructions(&self) -> usize

Return the number of instructions in the message.
Source§

fn instructions_iter(&self) -> impl Iterator<Item = SVMInstruction<'_>>

Return an iterator over the instructions in the message.
Source§

fn program_instructions_iter( &self, ) -> impl Iterator<Item = (&Pubkey, SVMInstruction<'_>)>

Return an iterator over the instructions in the message, paired with the pubkey of the program.
Source§

fn account_keys(&self) -> AccountKeys<'_>

Return the account keys.
Source§

fn fee_payer(&self) -> &Pubkey

Return the fee-payer
Source§

fn is_writable(&self, index: usize) -> bool

Returns true if the account at index is writable.
Source§

fn is_signer(&self, index: usize) -> bool

Returns true if the account at index is signer.
Source§

fn is_invoked(&self, key_index: usize) -> bool

Returns true if the account at the specified index is invoked as a program in top-level instructions of this message.
Source§

fn num_lookup_tables(&self) -> usize

Get the number of lookup tables.
Source§

fn message_address_table_lookups( &self, ) -> impl Iterator<Item = SVMMessageAddressTableLookup<'_>>

Get message address table lookups used in the message
Source§

fn is_instruction_account(&self, key_index: usize) -> bool

Returns true if the account at the specified index is an input to some program instruction in this message.
Source§

fn get_durable_nonce(&self) -> Option<&Pubkey>

If the message uses a durable nonce, return the pubkey of the nonce account
Source§

fn get_ix_signers(&self, index: usize) -> impl Iterator<Item = &Pubkey>

For the instruction at index, return an iterator over input accounts that are signers.

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> 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, 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

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