Questions tagged [spl-token-program]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
28 views

How to transfer large number of SPL tokens?

pub fn transfer<'info>(ctx: CpiContext<'_, '_, '_, 'info, Transfer<'info>>, amount: u64) -> Result<()> The above code is the method defenition used in rust to transfer SPL ...
Aravind Makam's user avatar
0 votes
0 answers
17 views

I keep getting error in this typescript code

import { clusterApiUrl, Connection, Keypair, PublicKey, } from "@solana/web3.js"; import { createMint, createAccount, mintTo,getAccount,getMint, getOrCreateAssociatedTokenAccount,...
Encrypted's user avatar
1 vote
1 answer
56 views

Does token-2022 allow selling fees instead of a basic transfer fee?

I understand now that the token-2022 standard allows transfer fees but does this also allow a fee that only enforces itself when the coin is being sold just like on Ethereum.
lolswag's user avatar
  • 11
0 votes
1 answer
36 views

"Program log: Instruction: GetAccountDataSize", "Program log: Error: IncorrectProgramId", "Program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA

Based on reading [https://github.com/solana-labs/solana-program-library/blob/master/token/program/src/instruction.rs#L426][1] It looks like the Token program does in fact have GetAccountDataSize so I ...
dirtyzero's user avatar
1 vote
1 answer
97 views

Confused about Tokens

I am very new to Solana and am going through the Bootcamp on SOLANA YT channel. Can someone explain me what are tokens? Why do we need tokens? What is Mint? How is SPL different from SOL?
rossexotic's user avatar
2 votes
1 answer
73 views

Metaplex Transfer pNFT failing

I am trying to transfer a pNFT via an anchor program, but it is failing at the TokenProgram. Logs below
Jimii's user avatar
  • 990
3 votes
1 answer
53 views

How to get Mint Address of of SPL token using associated token account? without rpc call

I can get an associated token account knowing the mint address and wallet address with spl_associated_token_account::get_associated_token_address function But is it possible to get a mint address, ...
Scott's user avatar
  • 33
0 votes
1 answer
56 views

I have a question about token 2022 program with migration

I wonder what happens to the existing ATA if I migrate from the existing token program to the token 2022 program. If the migration is completed, can't use the existing ATA (before migration) If the ...
jeong's user avatar
  • 13
3 votes
1 answer
25 views

Token Rewards Calculation and Distribution

I'm doing a script to calculate rewards for a handful of addresses (from sensors). The script runs weekly where it takes a bunch of addresses from our DB, cleans the data and calculates the associated ...
gritty's user avatar
  • 61
0 votes
1 answer
43 views

TokenAccountNotFoundError with getOrCreateAssociatedTokenAccount Typescript

I am trying to simulate minting 100 tokens to a wallet address and when I start the program, I get thrown this error: TokenAccountNotFoundError This is the typescript code for creating the token ...
kattyd's user avatar
  • 1
0 votes
0 answers
93 views

Frozen Token Account when sending nfts to an address

I've recently tried to transfer 3 nfts from 3 different collections on 2 different days to a address. Each time when I've tried transfering them I got 0x11 custom program error. From what I've ...
Andrei Rohatin's user avatar
2 votes
1 answer
126 views

JSON RPC get all SPL token holders during specific time

I am trying to get all the holders of a specific SPL token during a specific time. I get the Error: {'code': -32010, 'message': 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA excluded from account ...
4 1's user avatar
  • 121
0 votes
0 answers
35 views

Transferring OCP (Open Creator Protocol) tokens/ finding the policy publickey

I'm trying to create an instruction to transfer an OCP standard token. I'm using Magic Eden's OSS sdk --> https://github.com/magiceden-oss/open_creator_protocol Here is the call being made: const ...
Tyler Davis's user avatar
1 vote
1 answer
543 views

How to set token tax fee?

In certain tokens on others blockchains, people who are selling/buying/transferring the tokens will be hit by a 10% or more penalty tax fee on the transactions set by token creator. Some of the ...
overdeveloping's user avatar
2 votes
1 answer
383 views

SendTransactionError: failed to send transaction: Transaction simulation failed: Attempt to debit an account but found no record of a prior credit

SOL token has been airdropped successfully on the generated payer address. Still I am getting the above error. Here's the code: import * as spl from "@solana/spl-token"; import * as web3 ...
Denim Basumatary's user avatar
0 votes
0 answers
22 views

Is there a Solana program that can facilitate the sale of an NFT to the highest bidder?

There is a use case where an NFT might be available in an auction where multiple bidders compete with SOL to win the NFT when the auction time expires. However, if an application is designed to trust ...
OCDev's user avatar
  • 682
0 votes
1 answer
53 views

Show USDC price of NFT in phantom wallet using Metaplex JS SDK Candy Machine V3

I built a V3 candy machine using metaplex sdk and have my collection payment in USDC instead of Sol. The price of the NFT doesn’t appear in phantom wallet during mint approval. Is there something I ...
Miles's user avatar
  • 1
1 vote
2 answers
178 views

How can I freeze only some tokens in an account?

The SPL token program has support for a freeze/thaw authority where the authority can block any transaction involving a given account. How can I lock only some tokens in an account? E.g. a token ...
lameren's user avatar
  • 101
0 votes
0 answers
25 views

Status Token-2022 Program

Is there any status on the Token-2022 Program? I can see it says "Once audits are complete, the deployment will be marked final and no further upgrades will be possible. This is expected to ...
Kent-I B's user avatar
3 votes
2 answers
149 views

How to get the Collection's public key out of certain NFT in Anchor

How can I find out the Collection's public key of some NFT in Anchor? I know it was easy to do with the Solana SDK, but as far as I know it is not compatible with Anchor. More specifically, how can I ...
Ander's user avatar
  • 863
5 votes
2 answers
297 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,297
2 votes
1 answer
64 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
0 answers
41 views

Is there a way to call smart contract methods without a website? Purely by a link that would work in any wallet (mobile, desktop, web)

I have a telegram bot. In it a client gets given wallet addresses, on different blockchains, to which he can then send coins. I'm thinking of improving the process by introducing a smart contract in ...
Camila326's user avatar
  • 149
0 votes
1 answer
40 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
200 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
161 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
478 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
91 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
107 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
  • 313
3 votes
1 answer
67 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
100 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
218 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
164 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
52 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
134 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
189 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
  • 1,297
1 vote
1 answer
318 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
2 votes
2 answers
666 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
0 votes
0 answers
70 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
40 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
94 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
66 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
  • 318
1 vote
1 answer
64 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
2k 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
59 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
190 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
  • 682
1 vote
1 answer
36 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
67 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
  • 682
0 votes
1 answer
385 views

How to transfer SPL Tokens?

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
42 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,526