Skip to main content

Questions tagged [associated-token-program]

Filter by
Sorted by
Tagged with
2 votes
2 answers
181 views

InterfaceAccount<'_, TokenAccount> fails to create Associated Token Account

I have basic instruction, all it does is create an ATA for a user (mint is already initialized), this is what my context looks like // lib.rs use { crate::constants::*, crate::states::*, ...
Isaac Frank's user avatar
1 vote
1 answer
276 views

"Program log: Instruction: GetAccountDataSize", "Program log: Error: IncorrectProgramId", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA

Based on reading [https://github.com/solana-labs/solana-program-library/blob/master/token/program/src/instruction.rs#L426][1] It looks like the Token program does in fact have GetAccountDataSize so I ...
dirtyzero's user avatar
1 vote
3 answers
271 views

Do I have to explicitly create a USDC account to be able to receive USDC coins?

I have a Solana (#1) and USDT (#2) adddresses on the same account. I have some USDT coins in it. There's no USDC, though. I've already sent some USDC to the #1 in testnet, from a faucet, but none of ...
Camila326's user avatar
  • 159
2 votes
1 answer
2k views

How do I unfreeze an Account?

I minted a bunch of NFTs and frooze the token accounts. Now I cant transfer and close them. What is the function to unfreeze them?
Jonas H.'s user avatar
  • 5,467
3 votes
2 answers
3k views

Creating an Associated Token Account via Solana Program

I am struggling with creating a program that creates an Associated Token Account (ATA) for a mint I created. I am using the anchor_spl::associated_token for the task. Here is my code: use anchor_lang:...
Sebastian Dine's user avatar
1 vote
2 answers
131 views

Conditional CreateAccount Instruction - Associated Token Program

Is there a way to build a transaction that creates an account iff only it doesn't exist. I sometimes run into a race condition between checking that the account exist, broadcasting the transaction and ...
floorsweeper's user avatar
1 vote
2 answers
68 views

How can I invoke the SPL Token program from my program?

I'd like to make custom token program which just proxies all transaction to TOKEN_PROGRAM. I've made custom TOKEN_PROGRAM and ASSOCIATIED_TOKEN_PROGRAM, and what I'm trying to achieve is to make that ...
yacho's user avatar
  • 107