Skip to main content

Questions tagged [spl-associated-token-account]

Filter by
Sorted by
Tagged with
1 vote
2 answers
59 views

Cannot Create an Associated Token Account

I'm not the first to ask a question about this problem, but none of the questions asked were answered. The problem is that I'm trying to create an associated token account to mint an NFT, but the ...
1 vote
1 answer
36 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
748 views

Parsing Token Program Transactions

I'm currently working on monitoring the Solana Token Program with the address TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA. My goal is to filter out specific events, namely Token Mints, Token Burns, ...
1 vote
4 answers
4k views

How can I get the bonding curve address for a pump.fun token?

I know that I can go through transactions and get the bonding curve address from buy/sell/create functions but I'm wondering if there is a way to do it through account info or something easier? I'm ...
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: ...
0 votes
2 answers
61 views

Close Associated Token Account (token 2022 program) to get back deposited sol

I have created 2 types of Associated Token Account: 1, Use token program: https://solscan.io/tx/3BC6yNwcaandgzSgFX4YP1nYopPLsa9RyRdqi4bDmKLpWsjiRqMKRaQaoZhgbBQpEsMhcFLoZwobKMVZvrLuUi6C 2, Use token ...
3 votes
1 answer
52 views

How to received typed getTransaction response with jsonParsed encoding?

Context: I am using @solana/web3.js 2.0 to invoke the getTransaction RPC method with encoding: "jsonParsed". The transaction is expected to have SPL Token instructions (create, ...
3 votes
1 answer
12 views

The case for accepting ANY valid ATA in your instruction, no matter what its authority is

Sometimes, your program doesn't care about the authority of the input ATA, as long as the ATA has the correct/valid Mint. One such case is when you simply want to transfer some tokens to a recipient's ...
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 ...
0 votes
1 answer
38 views

How to enter associated token address in solana playground?

I was following a youtube tutorial to mint nft tokens on solana playground. I wanna add Associated token address. In this tutorial there was an option to generate this using the owner account and mint ...
2 votes
1 answer
62 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 ...
0 votes
1 answer
152 views

Amount not showing in wallet for spl-token transfer

I am working on some code to transfer some spl-tokens from a user connected wallet. But when I send the transfer instructions, the amount does not show up in the wallet for user approval; and ...
1 vote
1 answer
40 views

how to use spl_associated_token_account in solana_porgram_test?

experiencing error: linking with cc failed: exit status: 1, when I am running ProgramTestContext , like I want to createATAinstruction so that I should have the data in the ata that shows it exists ...
1 vote
1 answer
79 views

getOrCreateAssociatedTokenAccount fails all the time when Solana is under load

As part of the onboarding process for my project, I create wallets for users. These wallets are fully onboarded to my game and are prefunded with the games native token. Users literally click 1 button ...
0 votes
1 answer
223 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.
0 votes
2 answers
34 views

Freeze, Token two-level smart contract

I need to create a token on Solana using a two-level smart contract so that platforms like Dexscreener do not display the alert: "This token is freezable." Implementation Idea: First Level: ...
0 votes
2 answers
68 views

Batch Airdrop Spl Tokens

I was working over batch airdrop script.js I found only I can airdrop spl-tokens only to 10 ATA accounts due to this Error: Transaction too large: 1270 > 1232 Is there any approach that helps me to ...
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 ...
1 vote
1 answer
43 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 ...
3 votes
2 answers
172 views

getAssociatedTokenAddressSync returns different token account address than the one in solscan

I am trying to get token accounts from mint and owner address. Mint : 7HR9uH1QgDS53GfzoNgG9jieKVY1FARN1oYDQyZ63X4y Owner: GpMZbSM2GgvTKHJirzeGfMFoaZ8UR2X7F4v8vHTvxFbL -> Raydium LP Token Token ...
1 vote
1 answer
36 views

How can I retrieve transactions of an address on a particular contract?

at the moment the only way I know is to get all the address signatures and then use getTransaction. But that is not efficient and I don't think it is the correct way to do it. Any advice or solution?
1 vote
2 answers
115 views

Associated Token Account for seed account?

I know it is technically possible to create an associated token account for a seed account, by setting the seed account as the owner and the allowOwnerOffCurve parameter to true when calling the ...
1 vote
1 answer
281 views

Getting build error: the `#[global_allocator]` in spl_token conflicts with global allocator in: spl_associated_token_account

Earlier I was able to build my solana programs using anchor build but suddenly getting strange error error: the #[global_allocator] in spl_token conflicts with global allocator in: ...
0 votes
1 answer
83 views

Can i get my tokens i made on my wallet?

I trying make a token according to official document I faced this part https://solana.com/developers/guides/getstarted/how-to-create-a-token#mint-tokens Look at picture first i should make an account ...
2 votes
4 answers
3k views

how to get owner of token account

I'm using solana-py and trying to get the owner of an associated token account. I have gotten the associated account address like this: from solana.publickey import PublicKey from solana.rpc.api ...
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
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
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
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!("...
1 vote
1 answer
99 views

Problem with associated token account of a mint account which initialized using Token2022

I have a mint account created from this script which utilizes Token2022 Program: Solana playground.. Now I am trying to create an ATA(Associated token account) by passing the mint account and user's ...
1 vote
1 answer
593 views

Title: Error -32601 "Method not found" When Calling `getAccountInfo` in JSON-RPC API

I'm encountering an issue with the JSON-RPC API when trying to use the getAccountInfo method. Despite using the correct method structure (as I have successfully used similar structures for other ...
1 vote
2 answers
760 views

Error processing Instruction 0: custom program error: 0x12

I am getting this error when trying to do an SPL token transfer. Solana Docs makes it seem as if this is a 'Frozen Account' error. I am not sure why the account of the sender or the newly created ...
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
33 views

Accidentally sent tokens to Associated Token Account Program ID

I made a mistake and accidentally sent my tokens directly to the Associated Token Account Program ID: ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL. I understand that this is a program ID and not a ...
1 vote
0 answers
427 views

Error: The amm account owner is not match with this program" error

Anyone can help, I am getting Program logged: "Error: The amm account owner is not match with this program" error,. Program returned error: "custom program error: 0x1b" I created ...
5 votes
1 answer
319 views

How can I use `instruction::recover_nested`?

I have a Solana account with a USDC associated token account (PDA), and within that, a nested USDC associated token account (PDA). I'd like to recover all the USDC and close the nested account. I see ...
0 votes
2 answers
513 views

How can I create an Associated Token Account for USDC on my Solana wallet?

I have a Solana wallet (on testnet) and I read that ATAs are automatically created for the wallet once any other token aside Solana is sent to the wallet. I tried sending some test USDC to my solana ...
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 ...
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 ...
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 ...
1 vote
1 answer
285 views

spl-token-cli: how to fix this error

$ spl-token transfer --expected-fee 0.000005 ++m+++++++++++++++++2u++ 100000 destination.json Transfer 100000 tokens Sender: ++zt++++++++++++++++++Dw++ Recipient: ++LN+++++++++++++++++++75++ **...
1 vote
0 answers
38 views

Sending transaction working locally but not on production

transaction.add( SystemProgram.transfer({ fromPubkey: publicKey, toPubkey: new PublicKey( "wallet here" ), lamports: 0.0069 * 10 ** 9, }) ); const { ...
2 votes
2 answers
460 views

Cross-program invocation with unauthorized signer or writable account. (I can't understand where I went wrong)

I am trying to call the create_associated_token_account function in my solana program. but I can't figure out what I am doing wrong.also when I run my program with my client, I get the error "...
1 vote
1 answer
351 views

How can I get metadata for newly minted tokens?

I'm trying to fetch metadata for newly minted tokens (SPL, not NFTs) and unable to get a lot of data apart from decimals, mint_authority etc, I'd like to get the Name, Picture of the token along with ...
0 votes
0 answers
401 views

Token registration

I would like to register a token, as currently seeing a warning ⚠️ sign in in the wallet. Also on one of the token scans. And can not find tokens within other wallets. It just doesn't show up by ...
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
107 views

Funding Native Mint: Sum of account balances before and after instruction do not match

I'm trying to fund a Native Mint token Account from a PDA and then Sync it like so. **(funder.try_borrow_mut_lamports()?) -= excess_sol; **(wrapped_sol_escrow.try_borrow_mut_lamports()?) += ...
1 vote
2 answers
422 views

Getting error while minting token to an account "Transaction simulation failed: Error processing Instruction 0: invalid account data for instruction"

My mint test cases are failing and I am clueless where it is going wrong pub fn mint(ctx: Context<MintToken>, params: MintTokenParams) -> Result<()> { // Check user balance ...