Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
0
votes
getAssociatedTokenAddressSync returns different token account address than the one in solscan
The reason this doesn't work is because this is not an ATA. Instead, it's a Raydium vault PDA. You can see the seeds used to derive it here:
// The provided mint
const mint = new PublicKey('7HR9uH1QgD …
4
votes
Accepted
What is the best way to get all token holders and their balances by mint address?
Here you go, this will return all non-zero balances:
const conn = new Connection('<INSERT RPC HERE>');
const MINT = new PublicKey('<INSERT MINT HERE>');
const TOKEN_PROGRAM_ID = new PublicKey('Tokenke …
1
vote
How can I retrieve transactions of an address on a particular contract?
It is the correct way to do it generally speaking. Some kinds of programs support special indexers, such as the ones provided by Helius or Shyft. You can also consider writing your own custom indexer …
3
votes
How can we prevent wallet to not hold more than 1% token if market cap is under 1B
You can use transfer hooks for this. The below transfer hook in anchor ensures that no address ever has more than 1000 tokens for example. The key parts to this are the MAX_AMOUNT constant and the tra …
1
vote
How does one "transfer" SOL to another account, rather than using a "transaction"?
As tymur999 said: A transfer is a special type of transaction that only changes the SOL balance of two accounts or the balance of two token accounts (one sender and recipient).
From Solana's point of …
1
vote
Why are most mint accounts initialized as on-curve addresses
I'm guessing the reason most mints are on-curve in practice is because this makes minting tokens easy, as you just need to create a normal mint_to instruction on the client side and sign it with your …
0
votes
1
answer
66
views
How can I initialize an SPL token mint using anchor_client?
If I want to create an spl token without anchor in rust, I can do this like described here. How do I do it using the anchor_client crate?
1
vote
TransactionExpiredBlockheightExceededError Cant Send SPL Tokens
The reason is the network is currently quite congested, so it's not rare that transactions fail, especially if you're not adding priority fees like in your case. Check out this question to learn more …
1
vote
How to transfer frozen NFT's
Your token account is frozen, so you need to unfreeze it first before being able to transfer anything. For this you need to own the Keypair in charge of the FreezeAuthority and then use it to execute …
-1
votes
SPL Token Image not displaying in Phantom or Solscan
Checking out your link, solscan still doesn't show the picture correctly, so I think it's unlikely that the problem is it taking that long to populate. Moreso, it seems Solscan is parsing it incorrect …
1
vote
Accepted
how to find a new token in the block
Inside your block, you've got a list of transactions. These transactions in turn have a list of instructions (inside the message of each transaction). What you want to check for is instructions that c …
8
votes
Accepted
Parse transactions in human readable format
Generally speaking, on-chain transactions are just a bunch of serialized bytes, so to parse it you need to have some more context on what programs it's interacting with. For starters, if it's interact …
1
vote
Accepted
Multiple ATAs for the same mint
Since you mentioned it's the same mint for both ATAs, you're dealing with a nested ATA. This question gives some more info on these and how to recover funds from them. To avoid this happening in the f …
2
votes
2
answers
1k
views
Check if an account is a Token Account
We are given some public key that may be a token account (could be ATA or not) and want to find out if it is. Currently I am doing this by calling getAccount from @solana/spl-token and seeing if it th …
4
votes
2
answers
1k
views
Determine if a key is an associated token account
If I am given an arbitrary Solana public key without any transactions associated to it, is there a way I can determine if this is a normal account or an ATA?
My initial approach would be to see if it …