Cleanup SystemTransaction

This commit is contained in:
Greg Fitzgerald
2019-03-21 10:03:50 -06:00
committed by Grimes
parent 98979c7d53
commit a8095e204f
2 changed files with 35 additions and 53 deletions

View File

@ -54,6 +54,17 @@ impl SystemInstruction {
)
}
pub fn new_assign(from_id: &Pubkey, program_id: &Pubkey) -> Instruction {
let account_metas = vec![AccountMeta::new(*from_id, true)];
Instruction::new(
system_program::id(),
&SystemInstruction::Assign {
program_id: *program_id,
},
account_metas,
)
}
pub fn new_move(from_id: &Pubkey, to_id: &Pubkey, lamports: u64) -> Instruction {
let account_metas = vec![
AccountMeta::new(*from_id, true),