This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ edition = "2021"
9
9
10
10
[dependencies ]
11
11
solana-program = " 2.0.0"
12
+ spl-program-ids = { path = " ../program-ids" , version = " 1.0.0" }
12
13
13
14
[package .metadata .docs .rs ]
14
15
targets = [" x86_64-unknown-linux-gnu" ]
Original file line number Diff line number Diff line change @@ -22,10 +22,6 @@ pub fn get_associated_token_address_and_bump_seed(
22
22
)
23
23
}
24
24
25
- const TOKEN_PROGRAM_ID : Pubkey = solana_program:: pubkey!( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" ) ;
26
- /// Program ID for the Associated Token Program
27
- pub const ASSOCIATED_TOKEN_PROGRAM_ID : Pubkey = solana_program:: pubkey!( "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" ) ;
28
-
29
25
/// Derives the associated token account address for the given wallet address
30
26
/// and token mint
31
27
pub fn get_associated_token_address (
@@ -35,7 +31,7 @@ pub fn get_associated_token_address(
35
31
get_associated_token_address_with_program_id (
36
32
wallet_address,
37
33
token_mint_address,
38
- & TOKEN_PROGRAM_ID ,
34
+ & spl_program_ids :: spl_token :: ID ,
39
35
)
40
36
}
41
37
@@ -49,7 +45,7 @@ pub fn get_associated_token_address_with_program_id(
49
45
get_associated_token_address_and_bump_seed (
50
46
wallet_address,
51
47
token_mint_address,
52
- & ASSOCIATED_TOKEN_PROGRAM_ID ,
48
+ & spl_program_ids :: spl_associated_token_account :: ID ,
53
49
token_program_id,
54
50
)
55
51
. 0
You can’t perform that action at this time.
0 commit comments