Skip to content

chore: add ctoken id to interface #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[build]
# Exclude test files with conditional compilation from general cargo check/build
# This prevents rust-analyzer from trying to analyze test-specific features
# across the main workspace
rustflags = []

[target.'cfg(all())']
# Configure specific behavior for SBF tests
# This tells cargo to not require all features to be available in all workspace members
7 changes: 6 additions & 1 deletion spl/src/token_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ pub use crate::token_2022::*;
#[cfg(feature = "token_2022_extensions")]
pub use crate::token_2022_extensions::*;

static IDS: [Pubkey; 2] = [spl_token::ID, spl_token_2022::ID];
pub const COMPRESSED_TOKEN_ID: Pubkey = Pubkey::new_from_array([
9, 21, 163, 87, 35, 121, 78, 143, 182, 93, 7, 91, 107, 114, 105, 156, 56, 221, 2, 229, 148,
139, 117, 176, 229, 160, 65, 142, 128, 151, 91, 68,
]);

static IDS: [Pubkey; 3] = [spl_token::ID, spl_token_2022::ID, COMPRESSED_TOKEN_ID];

#[derive(Clone, Debug, Default, PartialEq, Copy)]
pub struct TokenAccount(spl_token_2022::state::Account);
Expand Down