All Questions
Tagged with spl-associated-token-account associated-token-program
5 questions
0
votes
1
answer
29
views
Buy using TokenAccount with init errors on second call with "Provided owner is not allowed"
I have a buy instruction for a token which initializes the user's token in the context and it runs absolutely fine the first time I run / call it. But on subsequent calls I get the following error:
...
2
votes
1
answer
146
views
Creating a new Associated Token Account is 10 times more expensive than expected
I have two questions.
import { createAssociatedTokenAccount } from "@solana/spl-token"
import { Connection, Keypair, PublicKey, clusterApiUrl } from "@solana/web3.js"
import { ...
2
votes
2
answers
458
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::*,
...
1
vote
3
answers
631
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 ...
3
votes
2
answers
4k
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:...