1
- //! Convention for associating token accounts with a primary account (such as a user wallet)
1
+ //! Convention for associating token accounts with a user wallet
2
2
#![ deny( missing_docs) ]
3
3
#![ forbid( unsafe_code) ]
4
4
5
5
mod entrypoint;
6
6
pub mod processor;
7
7
8
- // Export current sdk types for downstream users building with a different sdk version
8
+ // Export current SDK types for downstream users building with a different SDK version
9
9
pub use solana_program;
10
10
use solana_program:: {
11
11
instruction:: { AccountMeta , Instruction } ,
@@ -31,22 +31,22 @@ pub(crate) fn get_associated_token_address_and_bump_seed(
31
31
)
32
32
}
33
33
34
- /// Derives the associated SPL token address for the given wallet address and SPL Token mint
34
+ /// Derives the associated token account address for the given wallet address and token mint
35
35
pub fn get_associated_token_address (
36
36
wallet_address : & Pubkey ,
37
37
spl_token_mint_address : & Pubkey ,
38
38
) -> Pubkey {
39
39
get_associated_token_address_and_bump_seed ( & wallet_address, & spl_token_mint_address, & id ( ) ) . 0
40
40
}
41
41
42
- /// Create an associated token account for a wallet address
42
+ /// Create an associated token account for the given wallet address and token mint
43
43
///
44
44
/// Accounts expected by this instruction:
45
45
///
46
46
/// 0. `[writeable,signer]` Funding account (must be a system account)
47
- /// 1. `[writeable]` Associated token account address
47
+ /// 1. `[writeable]` Associated token account address to be created
48
48
/// 2. `[]` Wallet address for the new associated token account
49
- /// 3. `[]` The SPL token mint for the associated token account
49
+ /// 3. `[]` The token mint for new associated token account
50
50
/// 4. `[]` System program
51
51
/// 4. `[]` SPL Token program
52
52
/// 5. `[]` Rent sysvar
0 commit comments