Skip to content

Commit

Permalink
avoid solana-program in inline-spl (#3178)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey authored Oct 15, 2024
1 parent 75450a6 commit c32d0df
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

4 changes: 3 additions & 1 deletion inline-spl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ edition = { workspace = true }

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

[lib]
crate-type = ["lib"]
Expand Down
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_program::declare_id!("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
solana_pubkey::declare_id!("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");

pub mod program_v1_1_0 {
solana_program::declare_id!("NatA1Zyo48dJ7yuwR7cGURwhskKA8ywUyxb9GvG7mTC");
solana_pubkey::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_program::pubkey::{Pubkey, PUBKEY_BYTES};
use solana_pubkey::{Pubkey, PUBKEY_BYTES};

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

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

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

pub mod native_mint {
solana_program::declare_id!("So11111111111111111111111111111111111111112");
solana_pubkey::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_program::declare_id!("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
solana_pubkey::declare_id!("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");

// `spl_token_program_2022::extension::AccountType::Account` ordinal value
pub const ACCOUNTTYPE_ACCOUNT: u8 = 2;
Expand Down
2 changes: 1 addition & 1 deletion 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 c32d0df

Please sign in to comment.