Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit c63d854

Browse files
committed
Switch to Instruction::new_with_bincode
1 parent 82a385b commit c63d854

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

examples/rust/cross-program-invocation/tests/functional.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ async fn test_cross_program_invocation() {
3333
let (mut banks_client, payer, recent_blockhash) = program_test.start().await;
3434

3535
let mut transaction = Transaction::new_with_payer(
36-
&[Instruction::new(
36+
&[Instruction::new_with_bincode(
3737
program_id,
3838
&[bump_seed],
3939
vec![

examples/rust/custom-heap/tests/functional.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async fn test_custom_heap() {
1515
.start()
1616
.await;
1717
let mut transaction = Transaction::new_with_payer(
18-
&[Instruction::new(
18+
&[Instruction::new_with_bincode(
1919
program_id,
2020
&[10_u8, 11, 12, 13, 14],
2121
vec![],

examples/rust/logging/tests/functional.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async fn test_logging() {
1818
.start()
1919
.await;
2020
let mut transaction = Transaction::new_with_payer(
21-
&[Instruction::new(
21+
&[Instruction::new_with_bincode(
2222
program_id,
2323
&[10_u8, 11, 12, 13, 14],
2424
vec![AccountMeta::new(Pubkey::new_unique(), false)],

examples/rust/sysvar/tests/functional.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async fn test_sysvar() {
2020
.await;
2121

2222
let mut transaction = Transaction::new_with_payer(
23-
&[Instruction::new(
23+
&[Instruction::new_with_bincode(
2424
program_id,
2525
&(),
2626
vec![

examples/rust/transfer-lamports/tests/functional.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async fn test_lamport_transfer() {
3535
let (mut banks_client, payer, recent_blockhash) = program_test.start().await;
3636

3737
let mut transaction = Transaction::new_with_payer(
38-
&[Instruction::new(
38+
&[Instruction::new_with_bincode(
3939
program_id,
4040
&(),
4141
vec![

stake-pool/program/src/stake.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ pub fn split_only(
406406
AccountMeta::new_readonly(*authorized_pubkey, true),
407407
];
408408

409-
Instruction::new(id(), &StakeInstruction::Split(lamports), account_metas)
409+
Instruction::new_with_bincode(id(), &StakeInstruction::Split(lamports), account_metas)
410410
}
411411

412412
/// FIXME copied from the stake program
@@ -422,7 +422,7 @@ pub fn authorize(
422422
AccountMeta::new_readonly(*authorized_pubkey, true),
423423
];
424424

425-
Instruction::new(
425+
Instruction::new_with_bincode(
426426
id(),
427427
&StakeInstruction::Authorize(*new_authorized_pubkey, stake_authorize),
428428
account_metas,
@@ -443,7 +443,7 @@ pub fn merge(
443443
AccountMeta::new_readonly(*authorized_pubkey, true),
444444
];
445445

446-
Instruction::new(id(), &StakeInstruction::Merge, account_metas)
446+
Instruction::new_with_bincode(id(), &StakeInstruction::Merge, account_metas)
447447
}
448448

449449
/// FIXME copied from the stake program
@@ -468,7 +468,7 @@ pub fn create_account(
468468

469469
/// FIXME copied from the stake program
470470
pub fn initialize(stake_pubkey: &Pubkey, authorized: &Authorized, lockup: &Lockup) -> Instruction {
471-
Instruction::new(
471+
Instruction::new_with_bincode(
472472
id(),
473473
&StakeInstruction::Initialize(*authorized, *lockup),
474474
vec![
@@ -492,5 +492,5 @@ pub fn delegate_stake(
492492
AccountMeta::new_readonly(Pubkey::from_str(STAKE_CONFIG).unwrap(), false),
493493
AccountMeta::new_readonly(*authorized_pubkey, true),
494494
];
495-
Instruction::new(id(), &StakeInstruction::DelegateStake, account_metas)
495+
Instruction::new_with_bincode(id(), &StakeInstruction::DelegateStake, account_metas)
496496
}

0 commit comments

Comments
 (0)