All Questions
Tagged with spl-token-program spl-associated-token-account
27 questions
2
votes
1
answer
60
views
Spl Tokens deployed with Token 2022 program giving error during ATA creation with Solana/Web3.js
When i try to use methods like createAssociatedTokenAccount, getAssociatedTokenAddress i get error as "incorrect program id for instruction". The token address used her was my spl tokens ...
1
vote
1
answer
35
views
error while executing create token account instruction
const sleeperAccountInstruction = await program.methods
.createNewSleeper("test")
.accountsPartial({
payer: account,
mint: mintPDA,
sleeperAccount: sleeperPDA,
...
0
votes
1
answer
221
views
Is their any API to fetch tranding meme tokens of solana?
I want to fetch all the meme tokens listed on solana network sorted according to the top tranding token first.
1
vote
1
answer
42
views
When I try to add metadata to my spl token on my Mainnet coin
For some reason when I try adding metadata to my spl token it never works, I’m using the program id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb and when I try to add metadata using my mint address it ...
5
votes
1
answer
71
views
({"err":{"InstructionError":[2,"PrivilegeEscalation"]}})
use anchor_lang::prelude::*;
use anchor_spl::token::{Mint, Token, TokenAccount, Transfer};
declare_id!("5L3ky71YgB1rRMbJMxw9iH2vw9A59wZ2krWW7vdwfn61");
#[program]
pub mod hodl_token_lock {
...
2
votes
1
answer
154
views
Transfer specific token to and from a known account
Given that I have the following program
use anchor_lang::prelude::*;
use anchor_spl::token::{self, Mint, Token, TokenAccount, Transfer as SplTransfer};
declare_id!("...
2
votes
1
answer
36
views
SNS - Retrieve all Domains+Subdomains of an User
The following code is used to retrieve all Sub-Domains of a Public-Key.
const getAllSNSProgramAccounts = async () => {
const accounts = await connection.getProgramAccounts(new PublicKey('...
2
votes
2
answers
538
views
Why do we close WSOL Token Program accounts?
Background:
If I understand correctly: During transactions where we transfer SOL to/from wallets, we need to wrap the SOL in a temporarily created WSOL Token Program account. Then use that to transfer ...
1
vote
0
answers
26
views
Fund associated token account
I am trying to swap SOL to USDC on the devnet. I get this error "Input token account empty". I know that this means that the associated token accounts A and B have to have some funds. I am ...
0
votes
0
answers
111
views
Fetch trending solana tokens without 3rd party API
GM Buildooors!
What's the optimal approach to fetching on-chain data about trending SPL tokens like we have on platforms like Dextools, Birdeye, Step Finance etc.?
Preferably without the help of 3rd ...
1
vote
1
answer
97
views
Minting a Fungible SPL token to same ATA (more than 1 time) always fails
I'm pretty new solana ecosystem and have been following multiple tutorials on minting Fungible SPL tokens. On all the tutorials, you create a Mint and ATA and the then the first time the mint ...
0
votes
0
answers
54
views
How to fetch all information about spl token with token address in anchor or in javascript
i want to fetch token information of spl token directly from the solana blockchain . Give some solution to fetch metadata , tokenomics data and security data of spl token .
i want to fetch directly ...
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::*,
...
0
votes
1
answer
116
views
Multiple ATAs for the same mint
I've created a Python script that creates a wallet and monitors all SPL transactions of this wallet.
Using an example to illustrate the problem:
The generated public key belongs to account A with ...
1
vote
1
answer
90
views
Can you retrieve funds of an ATA owned by another ATA?
I created a USDC ATA and was accepting funds there.
I closed the ATA and recouped the SOL. This means the ATA's owner became the System Program instead of the Token Program.
Finally, someone sent ...
0
votes
0
answers
49
views
Best advice for fixing spl-token in production
After creating and minting an spl-token, I moved all assets to a new wallet and authorized mint for metadata changes, i assumed wrong. Then ran the close command on the original minting wallet.
My ...
0
votes
0
answers
332
views
How can I fetch all the newly minted SPL tokens in real-time?
Can someone confirm whether all recently created SPL tokens originate from the same source protocol/contract, such as TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA?
If not, could you please provide ...
2
votes
2
answers
731
views
Making existing token immutable
How can I change an existing token I created from mutable to immutable? I want to change this on an SPL token would appreciate any help!
5
votes
2
answers
1k
views
Is it possible to make an ATA in one instruction, then use that created ATA in the next instruction, in a single transaction?
This is similar to Can I Create an Account and Transfer Tokens in the same Transaction? but the 'answer' to that question doesn't actually show how to use the token account created in the first ...
2
votes
1
answer
334
views
Sending USDC dev token not working until recepient wallet has >0 value of said token
I am trying to send usdc dev token using code to a wallet address but it kept on showing "Unable to simulate. Make sure you trust this website since approving can lead to loss of funds."
And ...
2
votes
1
answer
178
views
Does one have to generate a special token address for USDT, USDC... when one generates a new address?
In my application I need to generate new addresses from time to time. I need them for SOL as well as for the stable coins on Solana. A new address will be assigned to a new user.
Since Solana has ...
2
votes
1
answer
275
views
SPL TOKEN recognized as NFT instead of a regular token
I created a spl-token using strata protocol and it is being recognized as NFT on my wallet, even on solscan it is not showing similar to any other token.
I found that maybe i would need to pull a ...
2
votes
1
answer
549
views
Explanation for two token accounts for one owner?
These two token accounts have the same mint and owner.
https://explorer.solana.com/address/2xPnqU4bWhUSjZ74CibY63NrtkHHw5eKntsxf8dzwiid
https://explorer.solana.com/address/...
0
votes
1
answer
219
views
Error: Signature verification failed with PDA when transferring SPL token
I have been figuring this one out for a few days. Appreciate the help.
I want to be able to send the tokens from the PDA ATA to the user who is removing his vault.\
This is the error I am getting: ...
4
votes
4
answers
3k
views
TokenAccountNotFoundError when sending SPL tokens in React
When I try to send my SPL tokens I get this error:
OrderRow.js:72 TokenAccountNotFoundError
at unpackAccount (account.ts:170:1)
at getAccount (account.ts:103:1)
at async ...
2
votes
1
answer
182
views
Why is AssociatedToken Program not needed when using associated_token constraint in anchor?
I wrote a piece of code that uses associated_token::mint and associated_token::authority and I passed the Token Program but did not pass the Associated Token Program. Considering All Accounts must be ...
2
votes
1
answer
91
views
Trying to send specific SPL Token but creates new token instead
I'm trying to send a SPL Token but when I execute the code below it creates an unknown token and sends it, It does not recognize the token address / programID. Where should I pass the token address?
...