From 67d5858e9a7827b42edd9bb0986b3d461e8c39db Mon Sep 17 00:00:00 2001 From: Yihau Chen Date: Fri, 10 Jan 2025 20:25:58 +0800 Subject: [PATCH] Revert "remove solana-program from clap-utils (#4363)" (#4388) This reverts commit 927c6d30ed5e1baea30c06ebf2aa0c9bae0e1dd1. --- Cargo.lock | 3 +-- clap-utils/Cargo.toml | 3 +-- clap-utils/src/keypair.rs | 10 +++++++--- programs/sbf/Cargo.lock | 2 +- svm/examples/Cargo.lock | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e9f8c1451c46fe..c18516c73bfd68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6456,15 +6456,14 @@ dependencies = [ "solana-derivation-path", "solana-hash", "solana-keypair", - "solana-message", "solana-native-token", "solana-presigner", + "solana-program", "solana-pubkey", "solana-remote-wallet", "solana-seed-phrase", "solana-signature", "solana-signer", - "solana-system-interface", "tempfile", "thiserror 2.0.9", "tiny-bip39", diff --git a/clap-utils/Cargo.toml b/clap-utils/Cargo.toml index da9298ca776777..78c06a187179bd 100644 --- a/clap-utils/Cargo.toml +++ b/clap-utils/Cargo.toml @@ -19,9 +19,9 @@ solana-commitment-config = { workspace = true } solana-derivation-path = { workspace = true } solana-hash = { workspace = true } solana-keypair = { workspace = true, features = ["seed-derivable"] } -solana-message = { workspace = true } solana-native-token = { workspace = true } solana-presigner = { workspace = true } +solana-program = { workspace = true } solana-pubkey = { workspace = true } solana-remote-wallet = { workspace = true, features = ["default"] } solana-seed-phrase = { workspace = true } @@ -35,7 +35,6 @@ url = { workspace = true } [dev-dependencies] assert_matches = { workspace = true } solana-pubkey = { workspace = true, features = ["rand"] } -solana-system-interface = { workspace = true, features = ["bincode"] } tempfile = { workspace = true } [lib] diff --git a/clap-utils/src/keypair.rs b/clap-utils/src/keypair.rs index f863b75d833291..969abe117e5624 100644 --- a/clap-utils/src/keypair.rs +++ b/clap-utils/src/keypair.rs @@ -24,8 +24,8 @@ use { keypair_from_seed, keypair_from_seed_phrase_and_passphrase, read_keypair, read_keypair_file, seed_derivable::keypair_from_seed_and_derivation_path, Keypair, }, - solana_message::Message, solana_presigner::Presigner, + solana_program::message::Message, solana_pubkey::Pubkey, solana_remote_wallet::{ locator::{Locator as RemoteWalletLocator, LocatorError as RemoteWalletLocatorError}, @@ -1125,8 +1125,8 @@ mod tests { assert_matches::assert_matches, clap::{value_t_or_exit, App, Arg}, solana_keypair::write_keypair_file, + solana_program::system_instruction, solana_remote_wallet::{locator::Manufacturer, remote_wallet::initialize_wallet_manager}, - solana_system_interface::instruction::transfer, tempfile::{NamedTempFile, TempDir}, }; @@ -1147,7 +1147,11 @@ mod tests { let nonsigner2 = Keypair::new(); let recipient = Pubkey::new_unique(); let message = Message::new( - &[transfer(&source.pubkey(), &recipient, 42)], + &[system_instruction::transfer( + &source.pubkey(), + &recipient, + 42, + )], Some(&fee_payer.pubkey()), ); let signers = vec![ diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 17df7fefbcf71e..4bc43647e7e6fa 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -5261,9 +5261,9 @@ dependencies = [ "solana-derivation-path", "solana-hash", "solana-keypair", - "solana-message", "solana-native-token", "solana-presigner", + "solana-program", "solana-pubkey", "solana-remote-wallet", "solana-seed-phrase", diff --git a/svm/examples/Cargo.lock b/svm/examples/Cargo.lock index a559a40aae617b..a22877d3519108 100644 --- a/svm/examples/Cargo.lock +++ b/svm/examples/Cargo.lock @@ -5112,9 +5112,9 @@ dependencies = [ "solana-derivation-path", "solana-hash", "solana-keypair", - "solana-message", "solana-native-token", "solana-presigner", + "solana-program", "solana-pubkey", "solana-remote-wallet", "solana-seed-phrase",