Questions tagged [ata]
The ata tag has no usage guidance.
18
questions
1
vote
1
answer
10
views
How to deserialize ata of spl token 2022?
I found the length of spl token 2022 ata is not 165, so I can't unpack the account.
The data length of EeF6oBy6AQiBJoRx5xiRNxa6cmpQE3ayVagj28QFZuyg is 183. So, how to deserialize it?
2
votes
1
answer
22
views
ATA account can be re-created after closed?
Please check out this account:
Ao48iFWgBDb2JeRzbS3274n67j7sZSiYSRy12Fs6v6if, in each transactions, this account (wsol ATA) is created at beginning and closed at end of each tx, I am a little confused. ...
1
vote
2
answers
32
views
RECOVER SOL FROM ATA
I created an ATA for a mint token and initilize the amount of SOL of this ATA with get_min_balance_rent_for_exempt_for_account() function ( amount of SOL ^= 0.002039).
Now I m tring to recover this 0....
0
votes
1
answer
59
views
How can a user create an ATA in phantom wallet before owning the actual token?
So, I have a list of 20k+ whitelisted people for a project, and am trying to find a way to airdrop it without significant cost. As i understand, the biggest cost of the actual airdrop is opening ATA ...
0
votes
1
answer
112
views
What is this wallet.GetAccount(index) stuff?
With Solana, there is the possibility to get accounts which obviously depend on the wallet. This can be done using the wallets GetAccount(index) function,
e.g. with
Account fromAccount = wallet....
0
votes
1
answer
421
views
I sent my token (from Trust Wallet) to my ATA (Solflare), the balance still 0? Can I recover from this? [duplicate]
So basically what I did was, sending my Solana token from my Trust Wallet to my ATA of the token on my Solflare. The balance still says 0, how do I recover from this? Is it possible or not?
And for my ...
1
vote
1
answer
84
views
Error: Signature verification failed while initialising PDA
I've been working on Solana program that should hold two different tokens for me in a Vault in an ATA. The first token should be deposited during Vault initialisation, the second will be deposited by ...
1
vote
1
answer
180
views
The data structure of an associated token account's data field
I used 'solana account --output json 'address'' to obtain the data field of a Token account, which is encoded in base64. I would like to know how it is structured.
2
votes
2
answers
65
views
Validate if optional account was passed in
Let's say I have an account passed in the instruction
#[account(mut), constraint = optional_ata.mint = treasury_ata.mint]
pub optional_ata: Option<Account<'info, TokenAccount>>
Is this ...
0
votes
0
answers
128
views
Getting bumps for an account that may be an ATA or not
Let's say I have a token account and I want to check if the owner is the signer OR the account is an ATA and the signer is one of the seeds.
pub some_account: Box<Account<'info, TokenAccount&...
2
votes
1
answer
688
views
How do I transfer SPL-token programmatically when the recipient is the transaction signer?
I want to transfer my custom SPL-token programmatically from my vault (source token account) to George (user destination token account), where the transaction caller-payer is George. Hence, I must use ...
3
votes
3
answers
200
views
Can we think of Associated Token Account as a good example of a Program Derived Address?
I am trying to get a deeper understanding of PDAs and am thinking of examples. Is ATA a good one?
3
votes
2
answers
1k
views
How to create ATA (Associated Token Account ) for a PDA (Program Derived Addresses) on devnet?
I am creating a token-sale program, to sale tokens, I want to transfer spl-tokens to a PDA-address, so I can transfer them from PDA-token-account to recipient(transaction-signer)-token-account by ...
2
votes
1
answer
224
views
sendAndConfirm transaction signers
I'm taking my initial steps in Solana / Anchor / Smart Contracts / etc etc.
My doubt is regarding the creation of the ATA. After creating all the needed steps, when trying to send and confirm the ...
4
votes
1
answer
1k
views
Can a PDA be the owner of an associated token account?
SPL.createAssociatedTokenAccount(connection, wallet, mint, project, {skipPreflight: true}, undefined, SPL.ASSOCIATED_TOKEN_PROGRAM_ID).then((projectTokenAccount) => {
const mintIx = SPL....
2
votes
2
answers
138
views
I transferred my tokens to an ATA derived from an ATA. Can I get them back?
I transferred token to an associated token account derived from an associated token account, can I get my tokens back?
5
votes
1
answer
73
views
what's the difference of these two ways to create a token account?
#[account(init,
payer = funder,
token::mint = token_mint_a,
token::authority = authority)]
pub token_vault_a: Box<Account<'info, TokenAccount>>,
#[account(init,
...
7
votes
4
answers
1k
views
What is an Associated Token Account?
The term "Associated Token Account" is often used when talking about tokens on Solana.
What is it?