pub fn create_buffer(
    payer_address: &Pubkey,
    buffer_address: &Pubkey,
    authority_address: &Pubkey,
    lamports: u64,
    program_len: usize,
) -> Result<Vec<Instruction>, InstructionError> {
    Ok(vec![
        system_instruction::create_account(
            payer_address,
            buffer_address,
            lamports,
            UpgradeableLoaderState::buffer_len(program_len)? as u64,
            &id(),
        ),
        Instruction::new_with_bincode(
            id(),
            &UpgradeableLoaderInstruction::InitializeBuffer,
            vec![
                AccountMeta::new(*buffer_address, false),
                AccountMeta::new_readonly(*authority_address, false),
            ],
        ),
    ])
}
/// Returns the instructions required to initialize a Buffer account.
Returns the instructions required to initialize a Buffer account.
Returns the instructions required to initialize a Buffer account .
pub fn create_buffer(
    payer_address: &Pubkey,
    buffer_address: &Pubkey,
    authority_address: &Pubkey,
    lamports: u64,
    program_len: usize,
) -> Result<Vec<Instruction>, InstructionError> {
    Ok(vec![
        system_instruction::create_account(
            payer_address,
            buffer_address,
            lamports,
            UpgradeableLoaderState::buffer_len(program_len)? as u64,
            &id(),
        ),
        Instruction::new_with_bincode(
            id(),
            &UpgradeableLoaderInstruction::InitializeBuffer,
            vec![
                AccountMeta::new(*buffer_address, false),
                AccountMeta::new_readonly(*authority_address, false),
            ],
        ),
    ])
}
pub fn create_buffer ( payer_address : & Pubkey , buffer_address : & Pubkey , authority_address : & Pubkey , lamports : u64 , program_len : usize , ) -> Result < Vec < Instruction > , InstructionError > { Ok ( vec ! [ system_instruction create_account ( payer_address buffer_address lamports UpgradeableLoaderState buffer_len ( program_len ) as u64 id ( ) ) Instruction new_with_bincode ( id ( ) UpgradeableLoaderInstruction InitializeBuffer vec [ AccountMeta new ( buffer_address false ) AccountMeta new_readonly ( authority_address false ) ] ) ] ) }
Returns the instructions required to initialize a Buffer account.
Returns the instructions required to initialize a Buffer account .
payer_address
&Pubkey
buffer_address
&Pubkey
authority_address
&Pubkey
lamports
u64
program_len
usize