pub fn remove_validator_from_pool(
    program_id: &Pubkey,
    stake_pool: &Pubkey,
    staker: &Pubkey,
    stake_pool_withdraw: &Pubkey,
    new_stake_authority: &Pubkey,
    validator_list: &Pubkey,
    stake_account: &Pubkey,
    burn_from: &Pubkey,
    pool_mint: &Pubkey,
    token_program_id: &Pubkey,
) -> Result<Instruction, ProgramError> {
    let accounts = vec![
        AccountMeta::new(*stake_pool, false),
        AccountMeta::new_readonly(*staker, true),
        AccountMeta::new_readonly(*stake_pool_withdraw, false),
        AccountMeta::new_readonly(*new_stake_authority, false),
        AccountMeta::new(*validator_list, false),
        AccountMeta::new(*stake_account, false),
        AccountMeta::new(*burn_from, false),
        AccountMeta::new(*pool_mint, false),
        AccountMeta::new_readonly(sysvar::clock::id(), false),
        AccountMeta::new_readonly(*token_program_id, false),
        AccountMeta::new_readonly(stake_program::id(), false),
    ];
    Ok(Instruction {
        program_id: *program_id,
        accounts,
        data: StakePoolInstruction::RemoveValidatorFromPool.try_to_vec()?,
    })
}
/// Creates `RemoveValidatorFromPool` instruction (remove validator stake account from the pool)
Creates `RemoveValidatorFromPool` instruction (remove validator stake account from the pool)
Creates ` RemoveValidatorFromPool ` instruction ( remove validator stake account from the pool )
pub fn remove_validator_from_pool(
    program_id: &Pubkey,
    stake_pool: &Pubkey,
    staker: &Pubkey,
    stake_pool_withdraw: &Pubkey,
    new_stake_authority: &Pubkey,
    validator_list: &Pubkey,
    stake_account: &Pubkey,
    burn_from: &Pubkey,
    pool_mint: &Pubkey,
    token_program_id: &Pubkey,
) -> Result<Instruction, ProgramError> {
    let accounts = vec![
        AccountMeta::new(*stake_pool, false),
        AccountMeta::new_readonly(*staker, true),
        AccountMeta::new_readonly(*stake_pool_withdraw, false),
        AccountMeta::new_readonly(*new_stake_authority, false),
        AccountMeta::new(*validator_list, false),
        AccountMeta::new(*stake_account, false),
        AccountMeta::new(*burn_from, false),
        AccountMeta::new(*pool_mint, false),
        AccountMeta::new_readonly(sysvar::clock::id(), false),
        AccountMeta::new_readonly(*token_program_id, false),
        AccountMeta::new_readonly(stake_program::id(), false),
    ];
    Ok(Instruction {
        program_id: *program_id,
        accounts,
        data: StakePoolInstruction::RemoveValidatorFromPool.try_to_vec()?,
    })
}
pub fn remove_validator_from_pool ( program_id : & Pubkey , stake_pool : & Pubkey , staker : & Pubkey , stake_pool_withdraw : & Pubkey , new_stake_authority : & Pubkey , validator_list : & Pubkey , stake_account : & Pubkey , burn_from : & Pubkey , pool_mint : & Pubkey , token_program_id : & Pubkey , ) -> Result < Instruction , ProgramError > { let accounts = vec ! [ AccountMeta new ( stake_pool false ) AccountMeta new_readonly ( staker true ) AccountMeta new_readonly ( stake_pool_withdraw false ) AccountMeta new_readonly ( new_stake_authority false ) AccountMeta new ( validator_list false ) AccountMeta new ( stake_account false ) AccountMeta new ( burn_from false ) AccountMeta new ( pool_mint false ) AccountMeta new_readonly ( sysvar clock id ( ) false ) AccountMeta new_readonly ( token_program_id false ) AccountMeta new_readonly ( stake_program id ( ) false ) ] ; Ok ( Instruction { program_id : * program_id , accounts , data : StakePoolInstruction :: RemoveValidatorFromPool . try_to_vec ( ) ? , } ) }
Creates `RemoveValidatorFromPool` instruction (remove validator stake account from the pool)
Creates ` RemoveValidatorFromPool ` instruction ( remove validator stake account from the pool )
program_id
&Pubkey
stake_pool
&Pubkey
staker
&Pubkey
stake_pool_withdraw
&Pubkey
new_stake_authority
&Pubkey
validator_list
&Pubkey
stake_account
&Pubkey
burn_from
&Pubkey
pool_mint
&Pubkey
token_program_id
&Pubkey