Skip to content

Commit d2ecf10

Browse files
feat: add address printing for price and TWAP updates
Co-Authored-By: Tejas Badadare <[email protected]>
1 parent a36eb8d commit d2ecf10

File tree

1 file changed

+6
-0
lines changed
  • target_chains/solana/cli/src

1 file changed

+6
-0
lines changed

target_chains/solana/cli/src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ pub fn process_write_encoded_vaa_and_post_price_update(
431431
update_instructions,
432432
&vec![payer, &price_update_keypair],
433433
)?;
434+
println!("Successfully posted price update at address: {}", price_update_keypair.pubkey());
434435

435436
Ok(price_update_keypair.pubkey())
436437
}
@@ -468,6 +469,7 @@ pub fn process_write_encoded_vaa_and_post_twap_update(
468469
start_init_instructions,
469470
&vec![payer, &start_encoded_vaa_keypair],
470471
)?;
472+
println!("Successfully created and initialized start VAA at address: {}", start_encoded_vaa_keypair.pubkey());
471473

472474
// Transaction 2: Create and initialize end VAA
473475
let end_init_instructions = init_encoded_vaa_and_write_initial_data_ixs(
@@ -481,6 +483,7 @@ pub fn process_write_encoded_vaa_and_post_twap_update(
481483
end_init_instructions,
482484
&vec![payer, &end_encoded_vaa_keypair],
483485
)?;
486+
println!("Successfully created and initialized end VAA at address: {}", end_encoded_vaa_keypair.pubkey());
484487

485488
// Transaction 3: Write remaining VAA data and verify both VAAs
486489
let mut verify_instructions = vec![ComputeBudgetInstruction::set_compute_unit_limit(1_200_000)];
@@ -518,6 +521,9 @@ pub fn process_write_encoded_vaa_and_post_twap_update(
518521
post_instructions,
519522
&vec![payer, &twap_update_keypair],
520523
)?;
524+
println!("Successfully posted TWAP update with start VAA at {} and end VAA at {}",
525+
start_encoded_vaa_keypair.pubkey(),
526+
end_encoded_vaa_keypair.pubkey());
521527

522528
Ok(twap_update_keypair.pubkey())
523529
}

0 commit comments

Comments
 (0)