roshi_client/instruction/
program.rs1use roshi_interface::instructions::InitializeProgramArgs;
2use solana_instruction::{AccountMeta, Instruction};
3use solana_pubkey::Pubkey;
4use solana_system_interface::program as system_program;
5
6use super::{new, Result};
7
8pub fn initialize_program(
9 payer: Pubkey,
10 program_config: Pubkey,
11 authority: Pubkey,
12) -> Result<Instruction> {
13 new(
14 vec![
15 AccountMeta::new(payer, true),
16 AccountMeta::new(program_config, false),
17 AccountMeta::new_readonly(system_program::ID, false),
18 ],
19 &InitializeProgramArgs {
20 authority: authority.to_bytes(),
21 },
22 )
23}