Struct access_protocol::instruction::stake::Accounts
source · pub struct Accounts<'a, T> {
pub central_state: &'a T,
pub stake_account: &'a T,
pub stake_pool: &'a T,
pub token_owner: &'a T,
pub source_token: &'a T,
pub spl_token_program: &'a T,
pub vault: &'a T,
pub central_state_vault: &'a T,
}
Expand description
The required accounts for the stake
instruction
Fields§
§central_state: &'a T
The central state account
stake_account: &'a T
The destination stake account - can be owned by anyone
stake_pool: &'a T
The stake pool account
token_owner: &'a T
The owner of the token account - staker
source_token: &'a T
The source account of the stake tokens
spl_token_program: &'a T
The SPL token program account
vault: &'a T
The stake pool vault account
central_state_vault: &'a T
The central state ATA
Implementations§
source§impl<'a, 'b: 'a> Accounts<'a, AccountInfo<'b>>
impl<'a, 'b: 'a> Accounts<'a, AccountInfo<'b>>
pub fn parse( accounts: &'a [AccountInfo<'b>], program_id: &Pubkey ) -> Result<Self, ProgramError>
Trait Implementations§
source§impl<'a> InstructionsAccount for Accounts<'a, Pubkey>
impl<'a> InstructionsAccount for Accounts<'a, Pubkey>
fn get_accounts_vec(&self) -> Vec<AccountMeta>
fn get_instruction<P>( &self, program_id: Pubkey, instruction_id: u8, params: P ) -> Instruction
fn get_instruction_cast<P>(
&self,
program_id: Pubkey,
instruction_id: u8,
params: P
) -> Instructionwhere
P: NoUninit,
fn get_instruction_wrapped_pod<'a, P>(
&self,
program_id: Pubkey,
instruction_id: u8,
params: P
) -> Instructionwhere
P: WrappedPod<'a>,
Auto Trait Implementations§
impl<'a, T> Freeze for Accounts<'a, T>
impl<'a, T> RefUnwindSafe for Accounts<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Accounts<'a, T>where
T: Sync,
impl<'a, T> Sync for Accounts<'a, T>where
T: Sync,
impl<'a, T> Unpin for Accounts<'a, T>
impl<'a, T> UnwindSafe for Accounts<'a, T>where
T: RefUnwindSafe,
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