Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 50b7023

Browse files
committed
Add program module for program id
1 parent 3d275ce commit 50b7023

File tree

7 files changed

+10
-7
lines changed

7 files changed

+10
-7
lines changed

associated-token-account/client/src/address.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub fn get_associated_token_address_with_program_id(
4545
get_associated_token_address_and_bump_seed(
4646
wallet_address,
4747
token_mint_address,
48-
&crate::id(),
48+
&crate::program::id(),
4949
token_program_id,
5050
)
5151
.0

associated-token-account/client/src/instruction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Instruction creators for the program
22
use {
3-
crate::{address::get_associated_token_address_with_program_id, id},
3+
crate::{address::get_associated_token_address_with_program_id, program::id},
44
solana_program::{
55
instruction::{AccountMeta, Instruction},
66
pubkey::Pubkey,

associated-token-account/client/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@
55
pub mod address;
66
pub mod instruction;
77

8-
solana_program::declare_id!("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
8+
/// Module defining the program id
9+
pub mod program {
10+
solana_program::declare_id!("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
11+
}

associated-token-account/program/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub use spl_associated_token_account_client::address::{
2525
};
2626
// Export current SDK types for downstream users building with a different SDK
2727
// version
28-
pub use spl_associated_token_account_client::{check_id, id, ID};
28+
pub use spl_associated_token_account_client::program::{check_id, id, ID};
2929

3030
/// Create an associated token account for the given wallet address and token
3131
/// mint

managed-token/program/src/accounts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl<'a, 'info> InitializeAccount<'a, 'info> {
116116
"Invalid key supplied for System Program",
117117
)?;
118118
assert_with_msg(
119-
ctx.associated_token_program.key == &spl_associated_token_account_client::id(),
119+
ctx.associated_token_program.key == &spl_associated_token_account_client::program::id(),
120120
ProgramError::InvalidInstructionData,
121121
"Invalid key supplied for Associataed Token Program",
122122
)?;

managed-token/program/src/instruction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub fn create_initialize_account_instruction(
127127
AccountMeta::new_readonly(freeze_authority, false),
128128
AccountMeta::new_readonly(*mint, false),
129129
AccountMeta::new_readonly(system_program::id(), false),
130-
AccountMeta::new_readonly(spl_associated_token_account_client::id(), false),
130+
AccountMeta::new_readonly(spl_associated_token_account_client::program::id(), false),
131131
AccountMeta::new_readonly(spl_token::id(), false),
132132
],
133133
data: borsh::to_vec(&ManagedTokenInstruction::InitializeAccount)?,

token/cli/tests/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ async fn new_validator_for_test() -> (TestValidator, Keypair) {
167167
upgrade_authority: Pubkey::new_unique(),
168168
},
169169
UpgradeableProgramInfo {
170-
program_id: spl_associated_token_account_client::id(),
170+
program_id: spl_associated_token_account_client::program::id(),
171171
loader: bpf_loader_upgradeable::id(),
172172
program_path: PathBuf::from("../../target/deploy/spl_associated_token_account.so"),
173173
upgrade_authority: Pubkey::new_unique(),

0 commit comments

Comments
 (0)