diff --git a/Cargo.lock b/Cargo.lock index 0414bbfb78dead..e0353c1901071c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5815,12 +5815,15 @@ dependencies = [ "serde_bytes", "serde_derive", "solana-account", + "solana-account-info", + "solana-clock", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-instruction", "solana-logger", - "solana-program", "solana-pubkey", + "solana-sdk-ids", + "solana-sysvar", ] [[package]] diff --git a/account-decoder-client-types/Cargo.toml b/account-decoder-client-types/Cargo.toml index 8f53e2afd1a44c..93b8b922b6cd6d 100644 --- a/account-decoder-client-types/Cargo.toml +++ b/account-decoder-client-types/Cargo.toml @@ -11,7 +11,7 @@ edition = { workspace = true } [dependencies] base64 = { workspace = true } -bs58 = { workspace = true } +bs58 = { workspace = true, features = ["std"] } serde = { workspace = true } serde_derive = { workspace = true } serde_json = { workspace = true } diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index 12ebfe25a73ea2..8ae6a679eff1ea 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -4898,8 +4898,12 @@ dependencies = [ "serde", "serde_bytes", "serde_derive", + "solana-account-info", + "solana-clock", "solana-instruction", - "solana-program", + "solana-pubkey", + "solana-sdk-ids", + "solana-sysvar", ] [[package]] diff --git a/sdk/account/Cargo.toml b/sdk/account/Cargo.toml index 62d35391142d64..8f7e5b6f50e76b 100644 --- a/sdk/account/Cargo.toml +++ b/sdk/account/Cargo.toml @@ -15,26 +15,39 @@ qualifier_attr = { workspace = true, optional = true } serde = { workspace = true, optional = true } serde_bytes = { workspace = true, optional = true } serde_derive = { workspace = true, optional = true } +solana-account-info = { workspace = true } +solana-clock = { workspace = true } solana-frozen-abi = { workspace = true, optional = true } solana-frozen-abi-macro = { workspace = true, optional = true } -solana-instruction = { workspace = true, optional = true } +solana-instruction = { workspace = true } solana-logger = { workspace = true, optional = true } -solana-program = { workspace = true } +solana-pubkey = { workspace = true } +solana-sdk-ids = { workspace = true } +solana-sysvar = { workspace = true, features = ["bincode"], optional = true } [dev-dependencies] solana-account = { path = ".", features = ["dev-context-only-utils"] } -solana-pubkey = { workspace = true } [features] -bincode = ["dep:bincode", "dep:solana-instruction", "serde"] +bincode = [ + "dep:bincode", + "dep:solana-sysvar", + "solana-instruction/serde", + "serde", +] dev-context-only-utils = ["bincode", "dep:qualifier_attr"] frozen-abi = [ "dep:solana-frozen-abi", "dep:solana-frozen-abi-macro", "dep:solana-logger", - "solana-program/frozen-abi", + "solana-pubkey/frozen-abi", +] +serde = [ + "dep:serde", + "dep:serde_bytes", + "dep:serde_derive", + "solana-pubkey/serde", ] -serde = ["dep:serde", "dep:serde_bytes", "dep:serde_derive"] [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] diff --git a/sdk/account/src/lib.rs b/sdk/account/src/lib.rs index 0d6df6ac6d8da4..ac25a822b9b5aa 100644 --- a/sdk/account/src/lib.rs +++ b/sdk/account/src/lib.rs @@ -9,17 +9,13 @@ use serde::ser::{Serialize, Serializer}; #[cfg(feature = "frozen-abi")] use solana_frozen_abi_macro::{frozen_abi, AbiExample}; #[cfg(feature = "bincode")] -use solana_program::sysvar::Sysvar; +use solana_sysvar::Sysvar; use { - solana_program::{ - account_info::AccountInfo, - bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable, - clock::{Epoch, INITIAL_RENT_EPOCH}, - debug_account_data::*, - lamports::LamportsError, - loader_v4, - pubkey::Pubkey, - }, + solana_account_info::{debug_account_data::*, AccountInfo}, + solana_clock::{Epoch, INITIAL_RENT_EPOCH}, + solana_instruction::error::LamportsError, + solana_pubkey::Pubkey, + solana_sdk_ids::{bpf_loader, bpf_loader_deprecated, bpf_loader_upgradeable, loader_v4}, std::{ cell::{Ref, RefCell}, fmt, @@ -67,7 +63,8 @@ mod account_serialize { use { crate::ReadableAccount, serde::{ser::Serializer, Serialize}, - solana_program::{clock::Epoch, pubkey::Pubkey}, + solana_clock::Epoch, + solana_pubkey::Pubkey, }; #[repr(C)] #[cfg_attr( @@ -722,7 +719,7 @@ pub fn create_account_with_fields( (lamports, rent_epoch): InheritableAccountFields, ) -> Account { let data_len = S::size_of().max(bincode::serialized_size(sysvar).unwrap() as usize); - let mut account = Account::new(lamports, data_len, &solana_program::sysvar::id()); + let mut account = Account::new(lamports, data_len, &solana_sdk_ids::sysvar::id()); to_account::(sysvar, &mut account).unwrap(); account.rent_epoch = rent_epoch; account @@ -764,7 +761,7 @@ pub fn to_account(sysvar: &S, account: &mut T) -> /// Return the information required to construct an `AccountInfo`. Used by the /// `AccountInfo` conversion implementations. -impl solana_program::account_info::Account for Account { +impl solana_account_info::Account for Account { fn get(&mut self) -> (&mut u64, &mut [u8], &Pubkey, bool, Epoch) { ( &mut self.lamports, diff --git a/sdk/pubkey/Cargo.toml b/sdk/pubkey/Cargo.toml index cdafef8a939f15..08a80bbe243c42 100644 --- a/sdk/pubkey/Cargo.toml +++ b/sdk/pubkey/Cargo.toml @@ -68,7 +68,8 @@ default = ["std"] dev-context-only-utils = ["dep:arbitrary", "rand"] frozen-abi = [ "dep:solana-frozen-abi", - "dep:solana-frozen-abi-macro" + "dep:solana-frozen-abi-macro", + "std", ] rand = ["dep:rand", "std"] serde = ["dep:serde", "dep:serde_derive"] diff --git a/svm/examples/Cargo.lock b/svm/examples/Cargo.lock index 5fcf4a90f3c653..87a747161494fd 100644 --- a/svm/examples/Cargo.lock +++ b/svm/examples/Cargo.lock @@ -4749,8 +4749,12 @@ dependencies = [ "serde", "serde_bytes", "serde_derive", + "solana-account-info", + "solana-clock", "solana-instruction", - "solana-program", + "solana-pubkey", + "solana-sdk-ids", + "solana-sysvar", ] [[package]]