Skip to content

Commit

Permalink
replace solana-sdk with solana-program in account-decoder (#4333)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey authored Jan 8, 2025
1 parent df5c9ad commit 5fb000f
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 14 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

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

1 change: 0 additions & 1 deletion account-decoder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ solana-program = { workspace = true }
solana-program-pack = { workspace = true }
solana-pubkey = { workspace = true }
solana-rent = { workspace = true }
solana-sdk = { workspace = true }
solana-sdk-ids = { workspace = true }
solana-slot-hashes = { workspace = true }
solana-slot-history = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion account-decoder/src/parse_account_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ mod test {
state::{Data, State},
versions::Versions,
},
solana_sdk::vote::{
solana_program::vote::{
program::id as vote_program_id,
state::{VoteState, VoteStateVersions},
},
Expand Down
2 changes: 1 addition & 1 deletion account-decoder/src/parse_bpf_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use {
},
base64::{prelude::BASE64_STANDARD, Engine},
bincode::{deserialize, serialized_size},
solana_program::bpf_loader_upgradeable::UpgradeableLoaderState,
solana_pubkey::Pubkey,
solana_sdk::bpf_loader_upgradeable::UpgradeableLoaderState,
};

pub fn parse_bpf_upgradeable_loader(
Expand Down
6 changes: 3 additions & 3 deletions account-decoder/src/parse_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ use {
bincode::deserialize,
serde_json::Value,
solana_config_program::{get_config_data, ConfigKeys},
solana_pubkey::Pubkey,
solana_sdk::stake::config::{
solana_program::stake::config::{
Config as StakeConfig, {self as stake_config},
},
solana_pubkey::Pubkey,
};

pub fn parse_config(data: &[u8], pubkey: &Pubkey) -> Result<ConfigAccountType, ParseAccountError> {
Expand Down Expand Up @@ -68,7 +68,7 @@ pub struct UiConfigKey {

#[deprecated(
since = "1.16.7",
note = "Please use `solana_sdk::stake::state::warmup_cooldown_rate()` instead"
note = "Please use `solana_program::stake::state::warmup_cooldown_rate()` instead"
)]
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "camelCase")]
Expand Down
6 changes: 3 additions & 3 deletions account-decoder/src/parse_stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use {
},
bincode::deserialize,
solana_clock::{Epoch, UnixTimestamp},
solana_sdk::stake::state::{Authorized, Delegation, Lockup, Meta, Stake, StakeStateV2},
solana_program::stake::state::{Authorized, Delegation, Lockup, Meta, Stake, StakeStateV2},
};

pub fn parse_stake(data: &[u8]) -> Result<StakeAccountType, ParseAccountError> {
Expand Down Expand Up @@ -119,7 +119,7 @@ pub struct UiDelegation {
pub deactivation_epoch: StringAmount,
#[deprecated(
since = "1.16.7",
note = "Please use `solana_sdk::stake::stake::warmup_cooldown_rate()` instead"
note = "Please use `solana_program::stake::stake::warmup_cooldown_rate()` instead"
)]
pub warmup_cooldown_rate: f64,
}
Expand All @@ -139,7 +139,7 @@ impl From<Delegation> for UiDelegation {

#[cfg(test)]
mod test {
use {super::*, bincode::serialize, solana_sdk::stake::stake_flags::StakeFlags};
use {super::*, bincode::serialize, solana_program::stake::stake_flags::StakeFlags};

#[test]
#[allow(deprecated)]
Expand Down
4 changes: 2 additions & 2 deletions account-decoder/src/parse_vote.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use {
crate::{parse_account_data::ParseAccountError, StringAmount},
solana_clock::{Epoch, Slot},
solana_program::vote::state::{BlockTimestamp, Lockout, VoteState},
solana_pubkey::Pubkey,
solana_sdk::vote::state::{BlockTimestamp, Lockout, VoteState},
};

pub fn parse_vote(data: &[u8]) -> Result<VoteAccountType, ParseAccountError> {
Expand Down Expand Up @@ -121,7 +121,7 @@ struct UiEpochCredits {

#[cfg(test)]
mod test {
use {super::*, solana_sdk::vote::state::VoteStateVersions};
use {super::*, solana_program::vote::state::VoteStateVersions};

#[test]
fn test_parse_vote() {
Expand Down
1 change: 0 additions & 1 deletion programs/sbf/Cargo.lock

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

1 change: 0 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 5fb000f

Please sign in to comment.