Struct smart_wallet::Transaction
source · [−]pub struct Transaction {
pub smart_wallet: Pubkey,
pub index: u64,
pub bump: u8,
pub proposer: Pubkey,
pub instructions: Vec<TXInstruction>,
pub signers: Vec<bool>,
pub owner_set_seqno: u32,
pub eta: i64,
pub executor: Pubkey,
pub executed_at: i64,
}Expand description
A Transaction is a series of instructions that may be executed by a SmartWallet.
Fields
smart_wallet: PubkeyThe SmartWallet account this transaction belongs to.
index: u64The auto-incremented integer index of the transaction. All transactions on the SmartWallet can be looked up via this index, allowing for easier browsing of a wallet’s historical transactions.
bump: u8Bump seed.
proposer: PubkeyThe proposer of the Transaction.
instructions: Vec<TXInstruction>The instruction.
signers: Vec<bool>signers[index] is true iff [SmartWallet]::owners[index] signed the transaction.
owner_set_seqno: u32Owner set sequence number.
eta: i64Estimated time the Transaction will be executed.
- If set to crate::NO_ETA, the transaction may be executed at any time.
- Otherwise, the Transaction may be executed at any point after the ETA has elapsed.
executor: PubkeyThe account that executed the Transaction.
executed_at: i64When the transaction was executed. -1 if not executed.
Implementations
sourceimpl Transaction
impl Transaction
sourcepub fn space(instructions: Vec<TXInstruction>) -> usize
pub fn space(instructions: Vec<TXInstruction>) -> usize
Computes the space a Transaction uses.
sourcepub fn num_signers(&self) -> usize
pub fn num_signers(&self) -> usize
Number of signers.
Trait Implementations
sourceimpl AccountDeserialize for Transaction
impl AccountDeserialize for Transaction
sourcefn try_deserialize(buf: &mut &[u8]) -> Result<Self, ProgramError>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self, ProgramError>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a Mint account into a token
Account. Read more
sourceimpl AccountSerialize for Transaction
impl AccountSerialize for Transaction
sourceimpl BorshDeserialize for Transaction where
Pubkey: BorshDeserialize,
u64: BorshDeserialize,
u8: BorshDeserialize,
Pubkey: BorshDeserialize,
Vec<TXInstruction>: BorshDeserialize,
Vec<bool>: BorshDeserialize,
u32: BorshDeserialize,
i64: BorshDeserialize,
Pubkey: BorshDeserialize,
i64: BorshDeserialize,
impl BorshDeserialize for Transaction where
Pubkey: BorshDeserialize,
u64: BorshDeserialize,
u8: BorshDeserialize,
Pubkey: BorshDeserialize,
Vec<TXInstruction>: BorshDeserialize,
Vec<bool>: BorshDeserialize,
u32: BorshDeserialize,
i64: BorshDeserialize,
Pubkey: BorshDeserialize,
i64: BorshDeserialize,
sourceimpl BorshSerialize for Transaction where
Pubkey: BorshSerialize,
u64: BorshSerialize,
u8: BorshSerialize,
Pubkey: BorshSerialize,
Vec<TXInstruction>: BorshSerialize,
Vec<bool>: BorshSerialize,
u32: BorshSerialize,
i64: BorshSerialize,
Pubkey: BorshSerialize,
i64: BorshSerialize,
impl BorshSerialize for Transaction where
Pubkey: BorshSerialize,
u64: BorshSerialize,
u8: BorshSerialize,
Pubkey: BorshSerialize,
Vec<TXInstruction>: BorshSerialize,
Vec<bool>: BorshSerialize,
u32: BorshSerialize,
i64: BorshSerialize,
Pubkey: BorshSerialize,
i64: BorshSerialize,
sourceimpl Clone for Transaction
impl Clone for Transaction
sourcefn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for Transaction
impl Debug for Transaction
sourceimpl Default for Transaction
impl Default for Transaction
sourcefn default() -> Transaction
fn default() -> Transaction
Returns the “default value” for a type. Read more
sourceimpl Discriminator for Transaction
impl Discriminator for Transaction
fn discriminator() -> [u8; 8]
sourceimpl Owner for Transaction
impl Owner for Transaction
sourceimpl PartialEq<Transaction> for Transaction
impl PartialEq<Transaction> for Transaction
sourcefn eq(&self, other: &Transaction) -> bool
fn eq(&self, other: &Transaction) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &Transaction) -> bool
fn ne(&self, other: &Transaction) -> bool
This method tests for !=.
impl StructuralPartialEq for Transaction
Auto Trait Implementations
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
pub default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more