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

@ -9,7 +9,7 @@ use solana_sdk::{
fn initialize_account<T: ConfigState>(config_pubkey: &Pubkey) -> Instruction {
let account_metas = vec![AccountMeta::new(*config_pubkey, true)];
let account_data = (ConfigKeys { keys: vec![] }, T::default());
Instruction::new(id(), &account_data, account_metas)
Instruction::new_with_bincode(id(), &account_data, account_metas)
}
/// Create a new, empty configuration account
@ -46,5 +46,5 @@ pub fn store<T: ConfigState>(
}
}
let account_data = (ConfigKeys { keys }, data);
Instruction::new(id(), &account_data, account_metas)
Instruction::new_with_bincode(id(), &account_data, account_metas)
}