Questions tagged [spl-associated-token-account]

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 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
11 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
17 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
50 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
82 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
71 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
100 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
46 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
36 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
  • 83
1 vote
2 answers
127 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
28 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
31 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
96 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
198 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
28 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
57 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
87 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
  • 111
0 votes
3 answers
430 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
46 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
98 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
  • 362
0 votes
1 answer
56 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 ...
Maidi's user avatar
  • 384
0 votes
0 answers
80 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
125 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
201 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
26 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
61 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
38 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
  • 149
1 vote
3 answers
134 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
  • 149
3 votes
2 answers
57 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
67 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
187 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
118 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
  • 149
0 votes
1 answer
291 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
414 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
  • 1,650
4 votes
1 answer
128 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 ...
No_name's user avatar
  • 143
2 votes
1 answer
217 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 ...
Nooblantis District's user avatar
2 votes
1 answer
108 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 ...
Camila326's user avatar
  • 149
1 vote
1 answer
320 views

How do I transfer the SOL on my token account?

I have a token account (example: https://solscan.io/account/3HJdseEK7G8cDEcDQPNmt5z1TuVb5AjCPxvqJCpkskbQ?cluster=devnet) and accidentally sent some SOL to it. I want to transfer this out to my SOL ...
Dav's user avatar
  • 11
2 votes
1 answer
378 views

Are addresses in Solana unique accross all the tokens?

I'm working on a system wherein there're multiple blockchains involved, and withing each one, native assets and tokens too are used together, as well as wallet addresses of them. In Ethereum and TRON, ...
Kum's user avatar
  • 107
2 votes
1 answer
160 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 ...
loa's user avatar
  • 21
2 votes
1 answer
259 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/...
euler's user avatar
  • 31
3 votes
1 answer
453 views

TypeError: Cannot read properties of undefined (reading 'createInitMintInstruction')

I am getting this error. TypeError: Cannot read properties of undefined (reading 'createInitMintInstruction') I dont know where and how it went wrong. Appreciate the help. await program.rpc.mintNft({ ...
Syahmi Shaarani's user avatar
0 votes
1 answer
159 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: ...
Syahmi Shaarani's user avatar
2 votes
2 answers
1k 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 ...
Héctor's user avatar
  • 21
2 votes
2 answers
221 views

How can I recover SPL tokens from an account that is nested inside another ATA account?

We have a Kin account that is nested under a USDC account. We have 2 USDC accounts, and the Kin is nested under a USDC account [1] that wasn’t created by the Associated Token Account program [2], ...
rory's user avatar
  • 21
0 votes
1 answer
154 views

I sent Solana to an SPL token account on accident not realizing it can’t pay the fee to transfer it back - how to u retrieve? I have private key

How do i do this? Do i need to write a program? Is there an existing repo than can be cloned and run? I have tried using CLI in a terminal but haven’t had any luck.
Bryan's user avatar
  • 1
0 votes
2 answers
412 views

Can you send Custom tokens and NFTs to a PDA account?

I have used PDA account to send and receive sol, now I want to send spl token to PDA Account. What is the implementation for that?
frawd's user avatar
  • 371
1 vote
1 answer
217 views

How to create Associated token Account onchain

Please help i'm trying to create an Associated token account for a PDA onchain using let create_accounts = Create { payer: ctx.accounts.signer.to_account_info().clone(), ...
iMEF's user avatar
  • 326
1 vote
1 answer
84 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 ...
chinepun.sol's user avatar
2 votes
2 answers
240 views

getOrCreateAssociatedTokenAccount() throws TokenAccountNotFoundError

I am trying to figure out why createAssociatedAccount does not work. This is the code: const SendTransaction = ({ children }) => { const { connection } = useConnection(); const { publicKey, ...
Michael's user avatar
  • 308