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§tape_len: Option<u32>§index_cap: Option<u16>§cursor: u32§next_index: u8Implementations§
Source§impl FrameScratch
impl FrameScratch
pub fn let_spl_token_amount( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token_delegated_amount( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token_account_state( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_mint_supply( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_mint_decimals( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token2022_amount( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token2022_delegated_amount( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token2022_account_state( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token2022_transfer_fee_withheld( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token2022_mint_supply( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token2022_mint_decimals( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token2022_mint_transfer_fee_bps( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token2022_mint_transfer_fee_max( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token2022_mint_withheld_amount( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_spl_token2022_mint_default_account_state( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_account_key( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_stake_lockup_unix_timestamp( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_stake_lockup_epoch( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_stake_delegation_stake( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn let_const_pubkey( &mut self, bytes: [u8; 32], ) -> Result<ScratchValue, ScratchError>
pub fn let_frame_generation(&mut self) -> Result<ScratchValue, ScratchError>
pub fn let_frame_index_count(&mut self) -> Result<ScratchValue, ScratchError>
pub fn clock_slot(&mut self) -> Result<ScratchValue, ScratchError>
pub fn clock_epoch_start_timestamp( &mut self, ) -> Result<ScratchValue, ScratchError>
pub fn clock_epoch(&mut self) -> Result<ScratchValue, ScratchError>
pub fn clock_leader_schedule_epoch( &mut self, ) -> Result<ScratchValue, ScratchError>
pub fn clock_unix_timestamp(&mut self) -> Result<ScratchValue, ScratchError>
pub fn rent_minimum_balance( &mut self, data_len: u32, ) -> Result<ScratchValue, ScratchError>
pub fn let_account_data_slice( &mut self, account: Pubkey, expected_owner: Pubkey, ty: ValueType, offset: u32, ) -> Result<ScratchValue, ScratchError>
Source§impl FrameScratch
impl FrameScratch
pub fn new( frame: Pubkey, tape_len: Option<u32>, program_id: Option<Pubkey>, authority: Pubkey, ) -> Self
pub fn plan_new_frame( params: PlanNewFrameParams<'_>, ) -> Result<PlanNewFrameResult, ScratchError>
pub fn plan_public_frame( params: PlanNewFrameParams<'_>, ) -> Result<PlanNewFrameResult, ScratchError>
Sourcepub fn for_public_frame(
frame: Pubkey,
tape_len: Option<u32>,
program_id: Option<Pubkey>,
) -> Self
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).
pub fn ix_opts(&self) -> IxOpts
pub fn let_builder(&mut self) -> LetBuilder<'_>
pub fn ix_reset(&mut self) -> Instruction
pub fn ix_let_single( &self, value: &ScratchValue, ) -> Result<Instruction, ScratchError>
pub fn ix_let_batch( &self, bindings: &[ScratchValue], remaining: &[AccountMeta], ) -> Result<Instruction, ScratchError>
pub fn ix_assert(&self, cond: &Expr) -> Result<Instruction, ScratchError>
pub fn let_eval(&mut self, expr: Expr) -> Result<ScratchValue, ScratchError>
pub fn let_const_u64(&mut self, n: u64) -> Result<ScratchValue, ScratchError>
pub fn let_const_bool(&mut self, v: bool) -> Result<ScratchValue, ScratchError>
pub fn let_lamports( &mut self, account: Pubkey, ) -> Result<ScratchValue, ScratchError>
pub fn plan_at_remaining_index( &mut self, binding: LetBinding, remaining_account_index: u8, ) -> Result<ScratchValue, ScratchError>
pub fn ix_assert_multi( &self, conds: &[Expr], ) -> Result<Instruction, ScratchError>
pub fn ix_close(&self, authority: Pubkey) -> Instruction
pub fn ix_cpi( &self, built: &CpiWireBuildResult, ) -> Result<Instruction, ScratchError>
pub fn ix_if_else( &self, args: &IfElseArgs, remaining: &[AccountMeta], ) -> Result<Instruction, ScratchError>
Trait Implementations§
Source§impl Clone for FrameScratch
impl Clone for FrameScratch
Auto Trait Implementations§
impl Freeze for FrameScratch
impl RefUnwindSafe for FrameScratch
impl Send for FrameScratch
impl Sync for FrameScratch
impl Unpin for FrameScratch
impl UnsafeUnpin for FrameScratch
impl UnwindSafe for FrameScratch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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