Skip to content

Commit

Permalink
fix inline-spl deps (#2186)
Browse files Browse the repository at this point in the history
* replace solana-sdk with solana-program in inline-spl

* remove unused build dep

* update lock file

* add default-features = false

* allow disabling default-features in solana-program when it is a workspace dep
  • Loading branch information
kevinheavey authored Jul 18, 2024
1 parent 5f4a08c commit a2eaf6d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 16 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ solana-package-metadata-macro = { path = "sdk/package-metadata-macro", version =
solana-perf = { path = "perf", version = "=2.1.0" }
solana-poh = { path = "poh", version = "=2.1.0" }
solana-poseidon = { path = "poseidon", version = "=2.1.0" }
solana-program = { path = "sdk/program", version = "=2.1.0" }
solana-program = { path = "sdk/program", version = "=2.1.0", default-features = false }
solana-program-runtime = { path = "program-runtime", version = "=2.1.0" }
solana-program-test = { path = "program-test", version = "=2.1.0" }
solana-pubsub-client = { path = "pubsub-client", version = "=2.1.0" }
Expand Down
5 changes: 1 addition & 4 deletions inline-spl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition = { workspace = true }

[dependencies]
bytemuck = { workspace = true }
solana-sdk = { workspace = true }
solana-program = { workspace = true, default-features = false }

[lib]
crate-type = ["lib"]
Expand All @@ -21,6 +21,3 @@ name = "solana_inline_spl"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[build-dependencies]
rustc_version = { workspace = true }
4 changes: 2 additions & 2 deletions inline-spl/src/associated_token_account.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Partial SPL Associated Token Account declarations inlined to avoid an external dependency on the spl-associated-token-account crate
solana_sdk::declare_id!("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
solana_program::declare_id!("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");

pub mod program_v1_1_0 {
solana_sdk::declare_id!("NatA1Zyo48dJ7yuwR7cGURwhskKA8ywUyxb9GvG7mTC");
solana_program::declare_id!("NatA1Zyo48dJ7yuwR7cGURwhskKA8ywUyxb9GvG7mTC");
}
8 changes: 4 additions & 4 deletions inline-spl/src/token.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/// Partial SPL Token declarations inlined to avoid an external dependency on the spl-token crate
use solana_sdk::pubkey::{Pubkey, PUBKEY_BYTES};
use solana_program::pubkey::{Pubkey, PUBKEY_BYTES};

solana_sdk::declare_id!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
solana_program::declare_id!("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");

pub mod program_v3_4_0 {
solana_sdk::declare_id!("NToK4t5AQzxPNpUA84DkxgfXaVDbDQQjpHKCqsbY46B");
solana_program::declare_id!("NToK4t5AQzxPNpUA84DkxgfXaVDbDQQjpHKCqsbY46B");
}

/*
Expand Down Expand Up @@ -72,7 +72,7 @@ impl GenericTokenAccount for Account {
}

pub mod native_mint {
solana_sdk::declare_id!("So11111111111111111111111111111111111111112");
solana_program::declare_id!("So11111111111111111111111111111111111111112");

/*
Mint {
Expand Down
2 changes: 1 addition & 1 deletion inline-spl/src/token_2022.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// Partial SPL Token declarations inlined to avoid an external dependency on the spl-token-2022 crate
use crate::token::{self, GenericTokenAccount};

solana_sdk::declare_id!("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
solana_program::declare_id!("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");

// `spl_token_program_2022::extension::AccountType::Account` ordinal value
pub const ACCOUNTTYPE_ACCOUNT: u8 = 2;
Expand Down
3 changes: 1 addition & 2 deletions programs/sbf/Cargo.lock

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

0 comments on commit a2eaf6d

Please sign in to comment.