Deprecate Instruction::new (#15695)

This commit is contained in:
Jack May
2021-03-03 21:46:48 -08:00
committed by GitHub
parent d6ea2f392b
commit b53cb8eb2d
32 changed files with 272 additions and 207 deletions

View File

@ -95,7 +95,7 @@ pub fn transfer(from_account: Pubkey, to_account: Pubkey, lamports: u64) -> Inst
AccountMeta::new(from_pubkey, true),
AccountMeta::new(to_pubkey, false),
];
Instruction::new(
Instruction::new_with_bincode(
test_program::id(),
&SystemInstruction::Transfer { lamports },
account_metas,
@ -114,7 +114,7 @@ pub fn multisig(data_account: Pubkey, signers: &[Pubkey]) -> Instruction {
account_metas.push(AccountMeta::new_readonly(pubkey, true));
}
Instruction::new(
Instruction::new_with_bincode(
test_program::id(),
&TestInstruction::Multisig,
account_metas,
@ -138,7 +138,7 @@ pub fn advance_nonce_account(
if let Some(pubkey) = authorized_pubkey {
account_metas.push(AccountMeta::new_readonly*nonce_authority, true));
}
Instruction::new(
Instruction::new_with_bincode(
test_program::id(),
&TestInstruction::AdvanceNonceAccount,
account_metas,