Skip to main content

Questions tagged [spl-associated-token-account]

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 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 ...
fake kakian's user avatar
0 votes
0 answers
13 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
40 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
0 votes
0 answers
341 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
71 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
  • 45
2 votes
1 answer
19 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
82 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
1 vote
1 answer
76 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
  • 123
1 vote
1 answer
29 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
0 votes
1 answer
58 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 ...
Nerevaine's user avatar
  • 159
1 vote
0 answers
17 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
23 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
266 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
73 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
55 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
39 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
304 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
30 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
151 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
170 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
277 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
273 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
218 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
76 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
63 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
  • 145
1 vote
2 answers
299 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
60 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
41 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
257 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
641 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
0 votes
0 answers
30 views

How can I use RPC to locate the leg accounts for LP token?

I am working on a project that involves interacting with LP tokens, and I'm trying to locate the leg accounts associated with a specific LP token using RPC. Here is a static data what I need to get ...
x_ror's user avatar
  • 101
1 vote
1 answer
132 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
  • 135
2 votes
1 answer
239 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
  • 121
0 votes
3 answers
757 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
0 votes
0 answers
63 views

I keep getting error in this typescript code

I have the following code: import { clusterApiUrl, Connection, Keypair, PublicKey, } from "@solana/web3.js"; import { createMint, createAccount, mintTo,getAccount,getMint, ...
Encrypted's user avatar
2 votes
2 answers
276 views

What does the get_associated_token_address()] function return if the associated token addresshas not yet been create?

What does the get_associated_token_address() function return if the associated token addresshas not yet been created (function create_associated_token_account() has not yet been executed) ? use ...
Leo Loki's user avatar
  • 392
0 votes
1 answer
111 views

How to set the token amount into the script

How can I incorporate tokens into the script? For instance, I need to send tokens like USDT, and the token value might be something like 12.067. When I send this value, it sometimes doesn't transfer ...
Bobz's user avatar
  • 516
0 votes
0 answers
112 views

Embedded wallets, USDC and account rental

I'm evaluating Solana as an option to support Generate an embedded, user owned, wallet per sign-up (BYO as secondary option). Only deal with USDC in and between these wallets, i.e. no customer ...
uxcxdx's user avatar
  • 101
0 votes
2 answers
344 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 ...
Ugwu Hilary's user avatar
1 vote
1 answer
446 views

freeze_authority being null

This isn't a very technical question but more of a theoretical. I've heard in different places where the in Solana freeze authority violates the idea of immutability or decentralization if an SPL ...
WowBow's user avatar
  • 135
0 votes
1 answer
43 views

How to test balance change of my staking program

I am following a tutorial to make a staking app and I want to test the functionality of my instruction. I have tried "getTokenAccountBalance", but it remain unchanged before and after the ...
Tropical Dog's user avatar
1 vote
1 answer
109 views

The data structure of an associated token account's data field

I used 'solana account --output json 'address'' to obtain the data field of a Token account, which is encoded in base64. I would like to know how it is structured.
Solextra's user avatar
0 votes
2 answers
43 views

Can assosiated addresses be generated on an account with no SOL on it?

Let's say, I've generated 1000 accounts manually, via code. I also want to generate USDT and USDC addresses for each of them. Then I'll give them to the users of my service for them to send USDT and ...
Camila326's user avatar
  • 159
1 vote
3 answers
336 views

Do I have to explicitly create a USDC account to be able to receive USDC coins?

I have a Solana (#1) and USDT (#2) adddresses on the same account. I have some USDT coins in it. There's no USDC, though. I've already sent some USDC to the #1 in testnet, from a faucet, but none of ...
Camila326's user avatar
  • 159
3 votes
2 answers
64 views

Passing two ATA's into a single function

So I'm trying to define a function that carries out transfers of two different SPL tokens for a user. To do so, I need to pass the user's associated token accounts of both tokens into a function - ...
rumika howdie's user avatar
0 votes
1 answer
83 views

How to create the seeds for invoking spl cpi instruction?

I need a program owned token account to hold WSOL. I am creating it like thus #[derive(Accounts)] pub struct InitializeProgramTokenAccount<'...
guccimane's user avatar
2 votes
3 answers
335 views

Add spl-token balance to wallet balance context provider

I'm trying to add a balance of USDC in a connected wallet that updates on a nextjs typescript website. I want to add it to my SOL balance context provider or do I need to make a completely separate ...
Miles Donald's user avatar
1 vote
1 answer
357 views

Is gas or fees required for creating an assosiate token account?

Is gas or fees required for creating an assosiate token account? Or can it be created without any gas?
Camila326's user avatar
  • 159
0 votes
1 answer
637 views

Token-2022 extension enforcing immutable owner

I have a use case to assign a new owner to an associated token address (ATA) after it has been created. Having tried this against a local node I was met with an error saying that I could not change ...
Matthew James's user avatar
5 votes
2 answers
832 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 ...
mikemaccana's user avatar
  • 2,091