Questions tagged [token-account]

An account whose data is in the byte format store tokens, for a program like SPL Token or SPL Token 22 (or some other token program).

Filter by
Sorted by
Tagged with
0 votes
1 answer
55 views

Raydium swap without creating Token Account

My typescripts program swaps tokens but creates an account token each time. I saw on Solscan that it is possible not to create an account. how can I do it, any advice or code? sample transaction: ...
user9036's user avatar
1 vote
1 answer
50 views

WSOL Account Keypairs

I created a WSOL token account so I don't have to be creating temporary token accounts every time I want to make a transaction. Thing is, I created that account using Python and the function that does ...
lsrth's user avatar
  • 21
1 vote
3 answers
127 views

USDT tokens accidentally sent to off-curve SPL token account

I sent some USDT-SPL from Huobi (HTX) directly to my main Solana address. DXu4QfQa3LdVp6ZTw1u7odR1rV95rUiR8XWtUw2yCWv8 This seems to have invoked a program to create a USDT-SPL token account, which is ...
borislvboris's user avatar
3 votes
2 answers
825 views

What is the difference between a Token Account and an Associated Token Account?

The docs mention both 'Token Account' and an 'Associated Token Account'. Are 'Token Account' and 'Associated Token Account' the same thing, or different? What is the relationship between these two?
mikemaccana's user avatar
  • 1,650
2 votes
0 answers
111 views

How to mint an spl token in a Rust script?

I've been learning Rust and piecing together some code that will mint 1 spl-token. My script compiles, creates an account, initializes a mint, creates the associated token account, and mints 1 token ...
Brian's user avatar
  • 21
0 votes
0 answers
36 views

getParsedTokenAccountsByOwner does not return value

I'm using getParsedTokenAccountsByOwner to get token account of wallets. But the function does not return value for some wallets (despite the fact that the wallet contains that token). This is the ...
agentp's user avatar
  • 235
0 votes
2 answers
184 views

Updated SPL Token Metadata Causes Token To Display Inconsistenly

I created an SPL token earlier this year and later needed to change the name of the token to reflect the new name of the project. I first tried updating the token via a pull request on GitHub back in ...
Polaris's user avatar
1 vote
1 answer
67 views

I want to get the amount of tokens held by a token_account in anchor

I am trying to fetch amount of tokens owned by a token Account in Anchor to verify the number of tokens owned in my Context Struct. I am using anchor_spl::token crate. Can someone tell the structure ...
Kunal Chhabra's user avatar
2 votes
0 answers
425 views

Token accounts and "setAuthority"

I've been trying to understand the intended use cases of setAuthority function in the context of Token accounts. For Mint accounts, it is clear that setAuthority can be used to set the mint and freeze ...
mcshell's user avatar
  • 205
2 votes
0 answers
65 views

Do the different mint lengths in the Token-2022 Program affect the dataSize of token accounts?

The Token Program produces token accounts that are 165 bytes in length. This makes it easy to consistently filter for them when using getParsedProgramAccounts. But if we are creating token mints with ...
OCDev's user avatar
  • 712
1 vote
2 answers
46 views

Does each "account" in case of hierarchical deterministic wallet need a unique Solana Token Account to hold SOLs?

In such case, each "account" would require a rent-exempt fees for each Solana Token Account (to pay for 165 bytes storage), is it correct ?
comte's user avatar
  • 123