Skip to content

Commit

Permalink
remove solana-sdk from thin-client (#3841)
Browse files Browse the repository at this point in the history
* remove solana-sdk from thin-client

* remove solana-program
  • Loading branch information
kevinheavey authored Dec 5, 2024
1 parent 62daa16 commit a8484fb
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 24 deletions.
16 changes: 15 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion svm/examples/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion thin-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,24 @@ edition = { workspace = true }
bincode = { workspace = true }
log = { workspace = true }
rayon = { workspace = true }
solana-account = { workspace = true }
solana-client-traits = { workspace = true }
solana-clock = { workspace = true }
solana-commitment-config = { workspace = true }
solana-connection-cache = { workspace = true }
solana-epoch-info = { workspace = true }
solana-hash = { workspace = true }
solana-instruction = { workspace = true }
solana-keypair = { workspace = true }
solana-message = { workspace = true }
solana-pubkey = { workspace = true }
solana-rpc-client = { workspace = true }
solana-rpc-client-api = { workspace = true }
solana-sdk = { workspace = true }
solana-signature = { workspace = true }
solana-signer = { workspace = true }
solana-system-interface = { workspace = true, features = ["bincode"] }
solana-transaction = { workspace = true }
solana-transaction-error = { workspace = true }

[dev-dependencies]
solana-logger = { workspace = true }
Expand Down
38 changes: 18 additions & 20 deletions thin-client/src/thin_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,29 @@
use {
log::*,
rayon::iter::{IntoParallelIterator, ParallelIterator},
solana_account::Account,
solana_client_traits::{AsyncClient, Client, SyncClient},
solana_clock::MAX_PROCESSING_AGE,
solana_commitment_config::CommitmentConfig,
solana_connection_cache::{
client_connection::ClientConnection,
connection_cache::{
ConnectionCache, ConnectionManager, ConnectionPool, NewConnectionConfig,
},
},
solana_epoch_info::EpochInfo,
solana_hash::Hash,
solana_instruction::Instruction,
solana_keypair::Keypair,
solana_message::Message,
solana_pubkey::Pubkey,
solana_rpc_client::rpc_client::RpcClient,
solana_rpc_client_api::config::RpcProgramAccountsConfig,
solana_sdk::{
account::Account,
client::{AsyncClient, Client, SyncClient},
clock::MAX_PROCESSING_AGE,
commitment_config::CommitmentConfig,
epoch_info::EpochInfo,
hash::Hash,
instruction::Instruction,
message::Message,
pubkey::Pubkey,
signature::{Keypair, Signature, Signer},
signers::Signers,
system_instruction,
transaction::{self, Transaction, VersionedTransaction},
transport::Result as TransportResult,
},
solana_signature::Signature,
solana_signer::{signers::Signers, Signer},
solana_system_interface::instruction::transfer,
solana_transaction::{versioned::VersionedTransaction, Transaction},
solana_transaction_error::{TransactionResult, TransportResult},
std::{
io,
net::SocketAddr,
Expand Down Expand Up @@ -368,8 +367,7 @@ where
keypair: &Keypair,
pubkey: &Pubkey,
) -> TransportResult<Signature> {
let transfer_instruction =
system_instruction::transfer(&keypair.pubkey(), pubkey, lamports);
let transfer_instruction = transfer(&keypair.pubkey(), pubkey, lamports);
self.send_and_confirm_instruction(keypair, transfer_instruction)
}

Expand Down Expand Up @@ -420,7 +418,7 @@ where
fn get_signature_status(
&self,
signature: &Signature,
) -> TransportResult<Option<transaction::Result<()>>> {
) -> TransportResult<Option<TransactionResult<()>>> {
let status = self
.rpc_client()
.get_signature_status(signature)
Expand All @@ -437,7 +435,7 @@ where
&self,
signature: &Signature,
commitment_config: CommitmentConfig,
) -> TransportResult<Option<transaction::Result<()>>> {
) -> TransportResult<Option<TransactionResult<()>>> {
let status = self
.rpc_client()
.get_signature_status_with_commitment(signature, commitment_config)
Expand Down

0 comments on commit a8484fb

Please sign in to comment.