Skip to main content

Questions tagged [spl-associated-token-account]

Filter by
Sorted by
Tagged with
1 vote
2 answers
57 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 ...
Michael's user avatar
  • 13
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: ...
ten5peed's user avatar
  • 103
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, ...
michaelsulistio's user avatar
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 ...
Iaroslav's user avatar
  • 199
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 ...
LaughingElephant's user avatar
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, ...
Hiderr Kamado's user avatar
0 votes
2 answers
60 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 ...
Zambaize's user avatar
0 votes
1 answer
219 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.
Alpha Algorithm's user avatar
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 ...
RNG_Gaming_Solana's user avatar
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 ...
Deepu Harry's user avatar
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: ...
Vlad Vasik's user avatar
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 ...
hammad ali's user avatar
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 ...
hammad ali's user avatar
1 vote
1 answer
41 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 ...
Destel's user avatar
  • 11
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?
klok's user avatar
  • 11
3 votes
2 answers
171 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 ...
NoodleX's user avatar
  • 73
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 ...
CryptoCurious's user avatar
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 ...
Hich's user avatar
  • 51
1 vote
1 answer
280 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: ...
blackhorse's user avatar
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 { ...
tushar mahajan's user avatar
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 ...
eth_developer's user avatar
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!("...
mstelz's user avatar
  • 55
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('...
Eduardo Chongkan's user avatar
2 votes
1 answer
145 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 { ...
Ariel's user avatar
  • 21
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 ...
Joe's user avatar
  • 133
1 vote
1 answer
98 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 ...
Rishabh Jamwal's user avatar
1 vote
1 answer
588 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 ...
David's user avatar
  • 339
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 ...
tomiella's user avatar
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 ...
Syntax Surge's user avatar
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 ...
degen dan's user avatar
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 ...
Abdullah Aftab's user avatar
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 ...
newbreedofgeek's user avatar
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 ...
muthu kumar's user avatar
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, ...
Abdullah Aftab's user avatar
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 { ...
Kob3Bryant's user avatar
1 vote
1 answer
284 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++ **...
Crypto Centric's user avatar
2 votes
2 answers
458 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 "...
Berkeley Cinar's user avatar
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 ...
Abdullah Aftab's user avatar
0 votes
0 answers
400 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 ...
user8043's user avatar
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::*, ...
Isaac Frank's user avatar
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 ...
theb's user avatar
  • 3
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()?) += ...
Trevor's user avatar
  • 185
1 vote
2 answers
421 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 ...
blackhorse's user avatar
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 ...
user7659's user avatar
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 ...
ReDNeQ's user avatar
  • 1
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 ...
Abdullah Aftab's user avatar
2 votes
2 answers
730 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!
Tony's user avatar
  • 21
1 vote
1 answer
221 views

Ways to fetch ATA account in typescript?

I have the following code that works fine with PDAs. const escrow_pda = PublicKey.findProgramAddressSync([Buffer.from("escrow"), fundraiser.publicKey.toBytes()], program.programId)[0]; const ...
WowBow's user avatar
  • 213
3 votes
1 answer
363 views

How to Access SPL-Token ATA Account Inside a Program for Burning

I'm creating a Token-2022 token with a transfer hook that burns some of the token on transfer. However, the token I want to use I want to create in the CLI. However, in order the burn a token, I need ...
Brian M.'s user avatar
  • 141
0 votes
3 answers
948 views

Is it possible to have reflection tokens like safemoon on solona?

A reminder on how reflection tokens like safemoon work is every ones balance is simply an equation instead of a fixed number. That way everyone's balance can be instantly updated with no gas needed ...
OPP's user avatar
  • 11