Skip to content

Commit

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

* update lock file after rebase
  • Loading branch information
kevinheavey authored Nov 25, 2024
1 parent 27a5ba8 commit 1ba36a2
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 23 deletions.
9 changes: 8 additions & 1 deletion Cargo.lock

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

9 changes: 8 additions & 1 deletion programs/sbf/Cargo.lock

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

9 changes: 8 additions & 1 deletion rpc-client-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@ semver = { workspace = true }
serde = { workspace = true }
serde_derive = { workspace = true }
serde_json = { workspace = true }
solana-account = { workspace = true }
solana-account-decoder-client-types = { workspace = true }
solana-clock = { workspace = true }
solana-commitment-config = { workspace = true }
solana-fee-calculator = { workspace = true }
solana-inflation = { workspace = true }
solana-inline-spl = { workspace = true }
solana-sdk = { workspace = true }
solana-pubkey = { workspace = true }
solana-signer = { workspace = true }
solana-transaction-error = { workspace = true }
solana-transaction-status-client-types = { workspace = true }
solana-version = { workspace = true }
thiserror = { workspace = true }
Expand Down
5 changes: 2 additions & 3 deletions rpc-client-api/src/client_error.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
pub use reqwest;
use {
crate::{request, response},
solana_sdk::{
signature::SignerError, transaction::TransactionError, transport::TransportError,
},
solana_signer::SignerError,
solana_transaction_error::{TransactionError, TransportError},
std::io,
thiserror::Error as ThisError,
};
Expand Down
6 changes: 2 additions & 4 deletions rpc-client-api/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use {
crate::filter::RpcFilterType,
solana_account_decoder_client_types::{UiAccountEncoding, UiDataSliceConfig},
solana_sdk::{
clock::{Epoch, Slot},
commitment_config::{CommitmentConfig, CommitmentLevel},
},
solana_clock::{Epoch, Slot},
solana_commitment_config::{CommitmentConfig, CommitmentLevel},
solana_transaction_status_client_types::{TransactionDetails, UiTransactionEncoding},
};

Expand Down
4 changes: 2 additions & 2 deletions rpc-client-api/src/custom_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use {
crate::response::RpcSimulateTransactionResult,
jsonrpc_core::{Error, ErrorCode},
solana_sdk::clock::Slot,
solana_clock::Slot,
solana_transaction_status_client_types::EncodeError,
thiserror::Error,
};
Expand Down Expand Up @@ -46,7 +46,7 @@ pub enum RpcCustomError {
#[error("NodeUnhealthy")]
NodeUnhealthy { num_slots_behind: Option<Slot> },
#[error("TransactionPrecompileVerificationFailure")]
TransactionPrecompileVerificationFailure(solana_sdk::transaction::TransactionError),
TransactionPrecompileVerificationFailure(solana_transaction_error::TransactionError),
#[error("SlotSkipped")]
SlotSkipped { slot: Slot },
#[error("NoSnapshot")]
Expand Down
2 changes: 1 addition & 1 deletion rpc-client-api/src/filter.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use {
base64::{prelude::BASE64_STANDARD, Engine},
serde::Deserialize,
solana_account::{AccountSharedData, ReadableAccount},
solana_inline_spl::{token::GenericTokenAccount, token_2022::Account},
solana_sdk::account::{AccountSharedData, ReadableAccount},
std::borrow::Cow,
thiserror::Error,
};
Expand Down
7 changes: 4 additions & 3 deletions rpc-client-api/src/request.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use {
crate::response::RpcSimulateTransactionResult,
serde_json::{json, Value},
solana_sdk::{clock::Slot, pubkey::Pubkey},
solana_clock::Slot,
solana_pubkey::Pubkey,
std::fmt,
thiserror::Error,
};
Expand Down Expand Up @@ -226,7 +227,7 @@ mod tests {
use {
super::*,
crate::config::RpcTokenAccountsFilter,
solana_sdk::commitment_config::{CommitmentConfig, CommitmentLevel},
solana_commitment_config::{CommitmentConfig, CommitmentLevel},
};

#[test]
Expand Down Expand Up @@ -289,7 +290,7 @@ mod tests {

// Test request with CommitmentConfig and params
let test_request = RpcRequest::GetTokenAccountsByOwner;
let mint = solana_sdk::pubkey::new_rand();
let mint = solana_pubkey::new_rand();
let token_account_filter = RpcTokenAccountsFilter::Mint(mint.to_string());
let request = test_request
.build_request_json(1, json!([addr, token_account_filter, commitment_config]));
Expand Down
10 changes: 4 additions & 6 deletions rpc-client-api/src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ use {
crate::client_error,
serde::{Deserialize, Deserializer, Serialize, Serializer},
solana_account_decoder_client_types::{token::UiTokenAmount, UiAccount},
solana_sdk::{
clock::{Epoch, Slot, UnixTimestamp},
fee_calculator::{FeeCalculator, FeeRateGovernor},
inflation::Inflation,
transaction::{Result, TransactionError},
},
solana_clock::{Epoch, Slot, UnixTimestamp},
solana_fee_calculator::{FeeCalculator, FeeRateGovernor},
solana_inflation::Inflation,
solana_transaction_error::{TransactionError, TransactionResult as Result},
solana_transaction_status_client_types::{
ConfirmedTransactionStatusWithSignature, TransactionConfirmationStatus, UiConfirmedBlock,
UiInnerInstructions, UiTransactionReturnData,
Expand Down
9 changes: 8 additions & 1 deletion svm/examples/Cargo.lock

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

0 comments on commit 1ba36a2

Please sign in to comment.