Skip to main content

FrameScratch

Struct FrameScratch 

Source
pub struct FrameScratch {
    pub frame: Pubkey,
    pub program_id: Pubkey,
    pub authority: Pubkey,
    pub tape_len: Option<u32>,
    pub index_cap: Option<u16>,
    pub cursor: u32,
    pub next_index: u8,
    /* private fields */
}
Expand description

Off-chain mirror of on-chain Frame session planning.

Fields§

§frame: Pubkey§program_id: Pubkey§authority: Pubkey§tape_len: Option<u32>§index_cap: Option<u16>§cursor: u32§next_index: u8

Implementations§

Source§

impl FrameScratch

Source

pub fn let_spl_token_amount( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token_delegated_amount( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token_account_state( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_mint_supply( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_mint_decimals( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token2022_amount( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token2022_delegated_amount( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token2022_account_state( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token2022_transfer_fee_withheld( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token2022_mint_supply( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token2022_mint_decimals( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token2022_mint_transfer_fee_bps( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token2022_mint_transfer_fee_max( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token2022_mint_withheld_amount( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_spl_token2022_mint_default_account_state( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_account_key( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_stake_authorized_staker( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_stake_authorized_withdrawer( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_stake_lockup_unix_timestamp( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_stake_lockup_epoch( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_stake_delegation_stake( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_const_pubkey( &mut self, bytes: [u8; 32], ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_frame_generation(&mut self) -> Result<ScratchValue, ScratchError>

Source

pub fn let_frame_index_count(&mut self) -> Result<ScratchValue, ScratchError>

Source

pub fn clock_slot(&mut self) -> Result<ScratchValue, ScratchError>

Source

pub fn clock_epoch_start_timestamp( &mut self, ) -> Result<ScratchValue, ScratchError>

Source

pub fn clock_epoch(&mut self) -> Result<ScratchValue, ScratchError>

Source

pub fn clock_leader_schedule_epoch( &mut self, ) -> Result<ScratchValue, ScratchError>

Source

pub fn clock_unix_timestamp(&mut self) -> Result<ScratchValue, ScratchError>

Source

pub fn rent_minimum_balance( &mut self, data_len: u32, ) -> Result<ScratchValue, ScratchError>

Source

pub fn let_account_data_slice( &mut self, account: Pubkey, expected_owner: Pubkey, ty: ValueType, offset: u32, ) -> Result<ScratchValue, ScratchError>

Source§

impl FrameScratch

Source

pub fn new( frame: Pubkey, tape_len: Option<u32>, program_id: Option<Pubkey>, authority: Pubkey, ) -> Self

Source

pub fn plan_new_frame( params: PlanNewFrameParams<'_>, ) -> Result<PlanNewFrameResult, ScratchError>

Source

pub fn plan_public_frame( params: PlanNewFrameParams<'_>, ) -> Result<PlanNewFrameResult, ScratchError>

Source

pub fn for_public_frame( frame: Pubkey, tape_len: Option<u32>, program_id: Option<Pubkey>, ) -> Self

Planner for an existing public Frame (authority == frame PDA).

Source

pub fn ix_opts(&self) -> IxOpts

Source

pub fn let_builder(&mut self) -> LetBuilder<'_>

Source

pub fn ix_reset(&mut self) -> Instruction

Source

pub fn ix_let_single( &self, value: &ScratchValue, ) -> Result<Instruction, ScratchError>

Source

pub fn ix_let_batch( &self, bindings: &[ScratchValue], remaining: &[AccountMeta], ) -> Result<Instruction, ScratchError>

Source

pub fn ix_assert(&self, cond: &Expr) -> Result<Instruction, ScratchError>

Source

pub fn let_eval(&mut self, expr: Expr) -> Result<ScratchValue, ScratchError>

Source

pub fn let_const_u64(&mut self, n: u64) -> Result<ScratchValue, ScratchError>

Source

pub fn let_const_bool(&mut self, v: bool) -> Result<ScratchValue, ScratchError>

Source

pub fn let_lamports( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>

Source

pub fn plan_at_remaining_index( &mut self, binding: LetBinding, remaining_account_index: u8, ) -> Result<ScratchValue, ScratchError>

Source

pub fn ix_assert_multi( &self, conds: &[Expr], ) -> Result<Instruction, ScratchError>

Source

pub fn ix_close(&self, authority: Pubkey) -> Instruction

Source

pub fn ix_cpi( &self, built: &CpiWireBuildResult, ) -> Result<Instruction, ScratchError>

Source

pub fn ix_if_else( &self, args: &IfElseArgs, remaining: &[AccountMeta], ) -> Result<Instruction, ScratchError>

Trait Implementations§

Source§

impl Clone for FrameScratch

Source§

fn clone(&self) -> Self

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 Debug for FrameScratch

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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