Skip to main content

Questions tagged [spl-token-program]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
159 views

How to i derive the owner account of an ATA (given the ATA)

One example will be the SyncNative instruction in Token Program - it gives the ATA but I want to retrieve the owner.
Sewy's user avatar
  • 85
0 votes
1 answer
74 views

Learning Programs Security in Solana

I'm looking at learning programs' security in solana. Was wondering if there was something equivalent to Ethernaut or Damn Vulnerable DeFi for Solana programs? Appreciate any help, cheers!
gritty's user avatar
  • 61
1 vote
1 answer
1k views

Verifying SPL Token Code

I am looking for help wrapping my head around how upgrades to the SPL Token Program affect SPL Tokens that have already been deployed, and what the implications are for auditing. For context, I am ...
Alex Otsu's user avatar
  • 113
2 votes
1 answer
275 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
0 votes
1 answer
2k views

How can I register new spl-token to spl-token list(Naming and Logo)?

I'm going to register my spl-token to Solana spl-token list. I used to use https://github.com/solana-labs/token-list before. But today, I saw the message "This repository has been archived by the ...
genuine-developer's user avatar
2 votes
1 answer
135 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
  • 159
1 vote
1 answer
112 views

How to choose a specific nft to transfer

I'm minting a lot of spl-tokens which is 1 decimal. Let's assume that each nft have different metadata. So how can I choose a specific nft to transfer?
marethyu's user avatar
  • 353
3 votes
1 answer
83 views

spl-token 2.2.0 at solana 1.13.5 getting multisig error: Client(PresignerError(VerificationFailure))

I've been using spl-token multisig for quite a while, but recently it stopped working and I'm getting this error: Client(PresignerError(VerificationFailure)) We checked everything 10 times, rotated ...
rinegade.sol's user avatar
2 votes
1 answer
229 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
1 vote
0 answers
1k views

How to add metadata to my SPL token

I'm trying to add metadata to my token on the Devnet and every solution listed on the documentation doesn't seem to work. I tried to: update it from here: https://token-creator-lac.vercel.app/update ...
Anthony's user avatar
  • 21
2 votes
1 answer
407 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
0 votes
1 answer
137 views

mint_to instruction is failing ,`Program logged: "Error: InvalidAccountData"`with this error

I'm using this code to mint let cpi_accounts = MintTo { mint: ctx.accounts.mint.to_account_info(), to: ctx.accounts.ata.to_account_info(), authority: ctx.accounts....
Abhishek Faliya's user avatar
0 votes
1 answer
192 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
4 votes
1 answer
618 views

Why is one of the transactions for my token account missing from my wallet in Solana Explorer?

I have a wallet 5FHwkrdxntdK24hgQU8qgBjn35Y1zwhz1GZwCkP2UJnM that has a token account Tig6ugKWyQqyRgs8CeDCuC3AaenQzRJ5eVpmT5bboDc. I can see the transaction ...
mikemaccana's user avatar
  • 2,031
1 vote
1 answer
1k views

Calling getOrCreateAssociatedTokenAccount throws a TokenAccountNotFoundError

I'm working on a React app and want to send SPL tokens. I use the @solana/spl-token. When I call getOrCreateAssociatedTokenAccount it throws a TokenAccountNotFoundError unless a token account already ...
Anthony's user avatar
  • 21
4 votes
3 answers
2k 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
  • 41
1 vote
0 answers
234 views

token program onProgramAccountChange returns non-changed token accounts

A subscription to onProgramAccountChange with the tokenProgram returns token accounts for which the data did not change. For example ey66efq9ZyxhwLjCbnX9D7Nj5hre9DNrNRyxigUwgJw last transaction is a ...
Tomvkgames's user avatar
0 votes
2 answers
76 views

is there a way to mass-burn all SPL tokens in existence (of which may be in various ATAs) in one function call, using anchor?

Let's say you created a spl token using anchor_spl::token::*; Then you minted a bunch and its now made its way to a bunch of people's associated token accounts. Is there a way to write an anchor ...
otter's user avatar
  • 31
0 votes
0 answers
117 views

transfer spl token from program to user ata

I'm trying to transfer spl token from pda to user but constantly this error occured Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: Cross-program ...
Dean97K's user avatar
1 vote
1 answer
248 views

how to change authority of mint account?

i'm trying to change the authority of token mint to a pda so only the program can mint pub fn into_set_authority_context(&self) -> CpiContext<'_, '_, '_, 'info, SetAuthority<'info>>...
iMEF's user avatar
  • 336
1 vote
1 answer
137 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
5 votes
2 answers
6k views

"Invalid account data for instruction" when trying to transfer USDC tokens

I want to transfer tokens from one account to another using Solana-py library. Here's what I have now: sender_address = '7FdZ8Rv5QZ8zLzGhDpyGYB95uXEK5BaxpKKCjqmBZJnL' sender_secret_key = '...' ...
Mortasen's user avatar
2 votes
1 answer
88 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? ...
korimusk's user avatar
0 votes
1 answer
1k views

Is the process of creating an Associated Token Account idempotent?

I was unable to determine from the documentation if the process of creating Associated Token Accounts is idempotent: https://spl.solana.com/associated-token-account#creating-an-associated-token-...
OCDev's user avatar
  • 752
1 vote
1 answer
76 views

How does the Token Program CLI tool find token accounts

Since addresses of token accounts do not necessarily need to be PDAs following a seed pattern that makes it easy to find them again by deriving the PDA using the pattern information, I wonder how ...
Sebastian Dine's user avatar
2 votes
1 answer
176 views

What are the potential pitfalls of making the mint authority and freeze authority the same as the mint address?

For the TOKEN_2022_PROGRAM_ID spl-token program, it seems like it would be a best practice to make the mint authority and freeze authority different from the mint address, perhaps best to make them ...
OCDev's user avatar
  • 752
0 votes
1 answer
2k views

How to transfer SPL Tokens? [duplicate]

I'm running a Solana node and I'd like to send a transfer request to my running node. I can transfer SOL but I don't know what I need to do for transferring SPL Tokens like GMT or SRM. I was looking ...
korimusk's user avatar
1 vote
0 answers
86 views

How to fetch all Tokens that are present in a user's wallet with all the details like mint, amount and metadata of the mint?

I would like to get all the Token's that are present in the wallet address of a user with its balance, mint address, and the metadata of the Token. What's the Ideal way of doing it
Pratik.js's user avatar
  • 1,632
1 vote
1 answer
78 views

Is a SPL Token mint a PDA or a program

I wonder if an SPL token mint is technically a Solana program that was created through the Token Program or if it is a PDA of the Token Program?
Sebastian Dine's user avatar
3 votes
1 answer
295 views

signer privilege escalated when trying to transfer tokens out of a PDA owned escrow wallet

Here is the list of accounts I passed in (the ... is extra constraints and stuff I removed for readability) #[derive(Accounts)] pub struct SendTokens<'info> { #[account(mut, seeds = ...
coco's user avatar
  • 73
0 votes
1 answer
40 views

Get sol out from NFT token account

I have an NFT seen here https://solscan.io/token/8MDodzxDuenjCWkH9twDfjawQzzjKAHERK7RSsX6LEDd where SOL was sent to the actual token account rather than to my wallet, the owner of the NFT. I'm looking ...
Tigger's user avatar
  • 51
1 vote
1 answer
616 views

How to find out which collection a token mint belongs to

I have Update Authority Address and Verified Creator Address of Collection X. I have mint address and metadata address of a token, now I want to check out if this token belongs to the collection X. (...
IsthereAnyoneee's user avatar
1 vote
2 answers
423 views

Converting IDL to TS

I have an IDL here and I am trying to convert a function, but it is giving me errors. I am trying to use it on the browser. Can you please help as this is urgent? Thanks. IDL: { "name":...
incog's user avatar
  • 567
0 votes
1 answer
28 views

Getting an error after adding solana to my project

I have been getting the following error after adding solana to my project. I have tried adding the @solana/spl-token package ($ yarn add @solana/spl-token) but that didn't work. Please help.
Muskaan Sharma's user avatar
1 vote
2 answers
70 views

How can I invoke the SPL Token program from my program?

I'd like to make custom token program which just proxies all transaction to TOKEN_PROGRAM. I've made custom TOKEN_PROGRAM and ASSOCIATIED_TOKEN_PROGRAM, and what I'm trying to achieve is to make that ...
yacho's user avatar
  • 107
2 votes
1 answer
67 views

Where to specify SPL token name or address when transferring

Somebody from Discord was nice enough to point me to look at https://solana-labs.github.io/solana-program-library/token/js/modules.html#transfer but where do I specify what SPL token I want to ...
ratib90486's user avatar
0 votes
1 answer
237 views

Transfer USDC from one wallet address to another address

I'm new to SOL. I've been reading this and this but there's no vanilla JS code. And this actually mixes a lot of conditions - from knowing the wallet private key to transferring from a wallet ...
ratib90486's user avatar
0 votes
1 answer
58 views

Which is correct token program address

I'm from ETH coming to SOL. But I noticed in this article, the smart contract address (token program address) is this way - https://nimb.ws/sIxWM7 But here the address starts with the word "Token&...
ratib90486's user avatar
3 votes
1 answer
118 views

Is executing `SystemProgram.createAccount` and `Token. InitializeAccount` in different transactions considered safe?

Solana Docs for the Token program state that: It's important to note that the InitializeAccount instruction does not require the Solana account being initialized also be a signer. The ...
eRunner's user avatar
  • 246
2 votes
1 answer
231 views

Can I Create an Account and Transfer Tokens in the same Transaction?

Is it possible to create associated token account and transfer token to that token account at the same time in one transaction?
Muhit Raihan's user avatar
0 votes
3 answers
230 views

Is there a way to burn a specific SPL Token quantity within a wallet while simultaneously minting a different SPL Token quantity within that wallet?

I read through the documentation in the SPL Token program and I am not clearly seeing if there is a way to have a single transaction perform a simultaneous burn and mint operation for various tokens ...
OCDev's user avatar
  • 752
1 vote
2 answers
84 views

Is there any way to use custom token program over token program?

I understand that making SPL-tokens is based on token program, and wallets/solscan only recognize token which is made by token program. What I want to achieve is to make spl-token with custom token ...
yacho's user avatar
  • 107
1 vote
1 answer
169 views

Get Solana SPL Address from base 58 string

Hi I have a base58 string for an SPL token address (called a mint in the Solana docs); This is how I generated this string: const mint = await createMint( connection, payer, ...
colinwink's user avatar
2 votes
1 answer
127 views

How does one read a confirmed spl-transfer transaction's instructions?

Creating an spl-transfer transaction: const transaction = new Transaction().add( createTransferInstruction( // Pretend this is filled in ) ) const signature = await ...
Emma Zhu's user avatar
1 vote
1 answer
121 views

Is there a standard value for burn account?

From the solana docs it seems that there is no specific burn account (see link). Is there a conventional value that people use to signify a burn? The context here is marking a token transfer as a burn ...
liamvovk's user avatar
  • 168
1 vote
2 answers
316 views

How to create a PDA and enable data storage?

I'm using PDA to hold the funds and the smart contract will sign it to transfer funds from the PDA to anyone. What's the best way to create a PDA to store multiple NFTs/tokens and also custom data ...
NaveeN .G's user avatar
1 vote
2 answers
571 views

How to fetch the price of a token(off-chain) based on token name/symbol/address

I'm building a client that acts as a wallet portfolio application. I'm wondering if there's a way for me to fetch the price of a token, based on its name/symbol/address?
Mohd Rilwan's user avatar
0 votes
1 answer
374 views

The trait `Id` is not implemented for `Token`

I am trying to write a program to transfer a SPL Token but I'm having trouble when I pass the token_program account to my instruction: #[derive(Accounts)] pub struct InitializeAuction<'info> { ...
Daniel Pavel's user avatar
19 votes
2 answers
2k views

What is the difference between Transfer and TransferChecked instruction from the SPL Token Program?

I'm curious what the practical difference is between the Transfer and TransferChecked instructions, and when should we use one over the other. In this question, I'm using Transfer/TransferChecked as ...
beeman's user avatar
  • 950

1 2
3