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 @@ -20,10 +20,6 @@ pub fn get_associated_token_address_and_bump_seed(
20
20
)
21
21
}
22
22
23
- const TOKEN_PROGRAM_ID : Pubkey = solana_program:: pubkey!( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" ) ;
24
- /// Program ID for the Associated Token Program
25
- pub const ASSOCIATED_TOKEN_PROGRAM_ID : Pubkey = solana_program:: pubkey!( "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" ) ;
26
-
27
23
/// Derives the associated token account address for the given wallet address
28
24
/// and token mint
29
25
pub fn get_associated_token_address (
@@ -33,7 +29,7 @@ pub fn get_associated_token_address(
33
29
get_associated_token_address_with_program_id (
34
30
wallet_address,
35
31
token_mint_address,
36
- & TOKEN_PROGRAM_ID ,
32
+ & spl_program_ids :: spl_token :: ID ,
37
33
)
38
34
}
39
35
@@ -47,7 +43,7 @@ pub fn get_associated_token_address_with_program_id(
47
43
get_associated_token_address_and_bump_seed (
48
44
wallet_address,
49
45
token_mint_address,
50
- & ASSOCIATED_TOKEN_PROGRAM_ID ,
46
+ & spl_program_ids :: spl_associated_token_account :: ID ,
51
47
token_program_id,
52
48
)
53
49
. 0
You can’t perform that action at this time.
0 commit comments