Skip to main content

RuntimeTransaction

Struct RuntimeTransaction 

Source
pub struct RuntimeTransaction<T> { /* private fields */ }

Implementations§

Source§

impl RuntimeTransaction<SanitizedVersionedTransaction>

Source

pub fn try_from( sanitized_versioned_tx: SanitizedVersionedTransaction, message_hash: MessageHash, is_simple_vote_tx: Option<bool>, ) -> Result<Self>

Source§

impl RuntimeTransaction<SanitizedTransaction>

Source

pub fn try_create( tx: VersionedTransaction, message_hash: MessageHash, is_simple_vote_tx: Option<bool>, address_loader: impl AddressLoader, reserved_account_keys: &HashSet<Pubkey>, ) -> Result<Self>

Create a new RuntimeTransaction<SanitizedTransaction> from an unsanitized VersionedTransaction.

Source

pub fn try_from( statically_loaded_runtime_tx: RuntimeTransaction<SanitizedVersionedTransaction>, address_loader: impl AddressLoader, reserved_account_keys: &HashSet<Pubkey>, ) -> Result<Self>

Create a new RuntimeTransaction<SanitizedTransaction> from a RuntimeTransaction<SanitizedVersionedTransaction> that already has static metadata loaded.

Source§

impl RuntimeTransaction<SanitizedTransaction>

Source

pub fn from_transaction_for_tests(transaction: Transaction) -> Self

Source§

impl<D: TransactionData> RuntimeTransaction<SanitizedTransactionView<D>>

Source

pub fn try_new( transaction: SanitizedTransactionView<D>, message_hash: MessageHash, is_simple_vote_tx: Option<bool>, ) -> Result<Self>

Source§

impl<'a, D: TransactionData> RuntimeTransaction<&'a SanitizedTransactionView<D>>

Source

pub fn try_new( transaction: &'a SanitizedTransactionView<D>, message_hash: MessageHash, is_simple_vote_tx: Option<bool>, ) -> Result<Self>

Source§

impl<D: TransactionData> RuntimeTransaction<ResolvedTransactionView<D>>

Source

pub fn try_new( statically_loaded_runtime_tx: RuntimeTransaction<SanitizedTransactionView<D>>, loaded_addresses: Option<LoadedAddresses>, reserved_account_keys: &HashSet<Pubkey>, ) -> Result<Self>

Create a new RuntimeTransaction<ResolvedTransactionView> from a RuntimeTransaction<SanitizedTransactionView> that already has static metadata loaded.

Source§

impl<T> RuntimeTransaction<T>

Trait Implementations§

Source§

impl<T: Clone> Clone for RuntimeTransaction<T>

Source§

fn clone(&self) -> RuntimeTransaction<T>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<T: Debug> Debug for RuntimeTransaction<T>

Source§

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

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

impl<T> Deref for RuntimeTransaction<T>

Source§

type Target = T

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl<T: SVMMessage> SVMMessage for RuntimeTransaction<T>

Source§

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

Return the account keys.
Source§

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

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

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

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

impl<T: SVMStaticMessage> SVMStaticMessage for RuntimeTransaction<T>

Source§

fn version(&self) -> TransactionVersion

Get the transaction version.
Source§

fn num_transaction_signatures(&self) -> u64

Return the number of transaction-level signatures in the message.
Source§

fn num_ed25519_signatures(&self) -> u64

Return the number of ed25519 precompile signatures in the message.
Source§

fn num_secp256k1_signatures(&self) -> u64

Return the number of secp256k1 precompile signatures in the message.
Source§

fn num_secp256r1_signatures(&self) -> u64

Return the number of secp256r1 precompile signatures in the message.
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 num_readonly_signed_static_accounts(&self) -> u8

Return the number of readonly signed static account keys.
Source§

fn num_readonly_unsigned_static_accounts(&self) -> u8

Return the number of readonly unsigned static account keys.
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<'_>)> + Clone

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

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

Return the list of static account keys.
Source§

fn fee_payer(&self) -> &Pubkey

Return the fee-payer
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_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 is_requested_writable(&self, index: usize) -> bool

Returns true if the account at index was requested writable. This does not consider if write-locks are demoted.
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_ix_signers(&self, index: usize) -> impl Iterator<Item = &Address>

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

impl<T: SVMStaticTransaction> SVMStaticTransaction for RuntimeTransaction<T>

Source§

fn signature(&self) -> &Signature

Get the first signature of the message.
Source§

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

Get all the signatures of the message.
Source§

impl StaticTransactionWithMeta for RuntimeTransaction<SanitizedTransaction>

Source§

fn to_versioned_transaction(&self) -> VersionedTransaction

Required to interact with several legacy interfaces that require VersionedTransaction. This should not be used unless necessary, as it performs numerous allocations that negatively impact performance.
Source§

fn serialized_size(&self) -> usize

Returns the serialized transaction size in bytes. Runtime metadata is not included.
Source§

impl<D: TransactionData> StaticTransactionWithMeta for RuntimeTransaction<SanitizedTransactionView<D>>

Source§

fn to_versioned_transaction(&self) -> VersionedTransaction

Required to interact with several legacy interfaces that require VersionedTransaction. This should not be used unless necessary, as it performs numerous allocations that negatively impact performance.
Source§

fn serialized_size(&self) -> usize

Returns the serialized transaction size in bytes. Runtime metadata is not included.
Source§

impl<D: TransactionData> StaticTransactionWithMeta for RuntimeTransaction<ResolvedTransactionView<D>>

Source§

fn to_versioned_transaction(&self) -> VersionedTransaction

Required to interact with several legacy interfaces that require VersionedTransaction. This should not be used unless necessary, as it performs numerous allocations that negatively impact performance.
Source§

fn serialized_size(&self) -> usize

Returns the serialized transaction size in bytes. Runtime metadata is not included.
Source§

impl<T> TransactionMeta for RuntimeTransaction<T>

Source§

impl TransactionWithMeta for RuntimeTransaction<SanitizedTransaction>

Source§

fn as_sanitized_transaction(&self) -> Cow<'_, SanitizedTransaction>

Required to interact with geyser plugins. This function should not be used except for interacting with geyser. It may do numerous allocations that negatively impact performance.
Source§

impl<D: TransactionData> TransactionWithMeta for RuntimeTransaction<ResolvedTransactionView<D>>

Source§

fn as_sanitized_transaction(&self) -> Cow<'_, SanitizedTransaction>

Required to interact with geyser plugins. This function should not be used except for interacting with geyser. It may do numerous allocations that negatively impact performance.

Auto Trait Implementations§

§

impl<T> Freeze for RuntimeTransaction<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for RuntimeTransaction<T>
where T: RefUnwindSafe,

§

impl<T> Send for RuntimeTransaction<T>
where T: Send,

§

impl<T> Sync for RuntimeTransaction<T>
where T: Sync,

§

impl<T> Unpin for RuntimeTransaction<T>
where T: Unpin,

§

impl<T> UnsafeUnpin for RuntimeTransaction<T>
where T: UnsafeUnpin,

§

impl<T> UnwindSafe for RuntimeTransaction<T>
where T: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<T> ReadableAccount for T
where T: Deref, <T as Deref>::Target: ReadableAccount,

Source§

fn lamports(&self) -> u64

Source§

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

Source§

fn owner(&self) -> &Address

Source§

fn executable(&self) -> bool

Source§

fn rent_epoch(&self) -> u64

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> SVMTransaction for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<Container> Signer for Container
where Container: Deref<Target = impl Signer + ?Sized>,

Source§

fn pubkey(&self) -> Address

Infallibly gets the implementor’s public key. Returns the all-zeros Pubkey if the implementor has none.
Source§

fn try_pubkey(&self) -> Result<Address, SignerError>

Fallibly gets the implementor’s public key
Source§

fn sign_message(&self, message: &[u8]) -> Signature

Infallibly produces an Ed25519 signature over the provided message bytes. Returns the all-zeros Signature if signing is not possible.
Source§

fn try_sign_message(&self, message: &[u8]) -> Result<Signature, SignerError>

Fallibly produces an Ed25519 signature over the provided message bytes.
Source§

fn is_interactive(&self) -> bool

Whether the implementation requires user interaction to sign
Source§

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

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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