pub struct TransactionContext { /* private fields */ }
Expand description

Loaded transaction shared between runtime and programs.

This context is valid for the entire duration of a transaction being processed.

Implementations

Constructs a new TransactionContext

Used by the bank in the runtime to write back the processed accounts and recorded instructions

Used in mock_process_instruction

Returns the total number of accounts loaded in this Transaction

Searches for an account by its key

Returns the keys for the accounts loaded in this Transaction

Searches for an account by its key

Searches for an account by its key

Searches for a program account by its key

Gets an InstructionContext by its nesting level in the stack

Gets the max height of the InstructionContext stack

Gets instruction stack height, top-level instructions are height solana_sdk::instruction::TRANSACTION_LEVEL_STACK_HEIGHT

Returns the current InstructionContext

Pushes a new InstructionContext

Pops the current InstructionContext

Gets the return data of the current InstructionContext or any above

Set the return data of the current InstructionContext

Used by the runtime when a new CPI instruction begins

Deprecated, automatically done in push() once record_instruction_in_transaction_context_push is activated.

Returns instruction trace

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.