Questions tagged [spl-token-program]
The spl-token-program tag has no usage guidance.
194 questions
0
votes
1
answer
50
views
How to get token CA when subscribing to websockets for newly minted coins
is it possible to get the token mint address when a new token is called from the websocket API?
context: { slot: 305696650 },
value: {
signature: '...
1
vote
1
answer
47
views
getting error when try to send the two transactions combined for swap to jupiter sdk
i'm trying to send a two seperate swap transaction as one through the help of versioned transactions to solana network and in return i'm getting the error below
SendTransactionError: Transaction ...
0
votes
2
answers
114
views
How to get all wallets (token accounts) holding a specific token (by mint address)
As the title states I would like to get all wallets that hold a particular token by providing the token's address. I believe in more accurate terms I would like to get all token accounts with a non-...
0
votes
0
answers
12
views
token swaps on amm supported dexs on solana
i am a new to solana development just started exploring it yesterday before that i am doing development on etherum and other evm compatible chains from last 2 years.
i have a question for people who ...
2
votes
1
answer
27
views
How to resolve error code":-32010,"message":"2UR.... excluded from account secondary indexes; this RPC method unavailable for key
I have set up a Solana full node with a configuration of 1TB memory for eypc 64 core.
At the same time, I also opened the account index program id spl token mint spl token owner
But when using ...
2
votes
1
answer
27
views
What does it mean for a Solana program to not be associated with a ProgramData Address?
From the Solana docs on Program Accounts, when a new program is deployed, a Program Account and an associated Program Executable Data Account is created and the Program Account stores the address of ...
1
vote
1
answer
40
views
Can I burn SPL Tokens that are sent from a user to a Solana Program?
I am trying to write a simple anchor program that will burn the SPL tokens that the user sends to my anchor program. I followed the guide below on QuickNode to build a new program that allows minting.
...
0
votes
1
answer
16
views
Non transferable spl token mint without extensions
Is it possible to create non transferable spl token using old token standard? I guess that would be without usage of token extensions. (TOKEN_PROGRAM_ID)
0
votes
0
answers
28
views
Swap transection is successful and fee deducted but no swap happend
I am trying to build a node js app that take my Tatum.io solana wallet address which have SOL and USD-Coins and make swap. I want to convert USDC from my wallet to SOL or convert SOL to USD-Coins. the ...
1
vote
1
answer
31
views
How to handle both SPLs and native SOL token in my contract?
Hi I was working on making a contract that should support both SOL and SPL tokens.
Is there a recommended way to manage SOL and SPL token altogether? It looks like we need to wrap SOL to make it work. ...
2
votes
1
answer
23
views
Can I simulateTransaction with arbitrary token balance amounts?
Is it prossible to pretent having infinite arbitrary token balances during simulateTransaction so that I could go through tests for swaps?
1
vote
2
answers
396
views
How would you go about cloning Pump.fun smart contracts?
I want to make a pump.fun clone, how would I go about rewriting the smart contracts that pump.fun uses, ie the token minting, bonding curve, adding and removing liquidity etc. How would I go about ...
1
vote
1
answer
36
views
Ideal way to listen to SPL token transfer?
The solana cookbook subscribe to events snippet gives only sol balance at best,https://solana.com/developers/cookbook/development/subscribing-events.
So, i have used a signature using public key, and ...
2
votes
1
answer
59
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 ...
0
votes
1
answer
16
views
Solana program failing "An account required by the instruction is missing"
I wanted user to transfer some spl token to contract then i want do distribute it later, i have wrote one contract with help of GPT when I try to interact with that contract it throws error im not ...
0
votes
1
answer
42
views
SPL token deploy from scratch
SPL token repo
I want to deploy a SPL token from original repo, are there any deployment guide for this? Thanks.
2
votes
1
answer
51
views
Understanding uses of on-curve token accounts
I'm trying to understand the specific differences between token account creation methods, and the differing implementation details between apps. Specifically, why a token account in a transaction ...
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,
...
1
vote
1
answer
136
views
Really slow solana rpc?
So I'm working with the "wormhole-ts-sdk", Wormhole's portal SDK, to bridge tokens between Solana and EVM chains, and my app needs this to work well. However, lately, I've been trying ...
1
vote
0
answers
32
views
error: could not compile `spl-type-length-value` (lib) due to 10 previous errors
I'm having some problems when building. I hope you can help.
Thank you so much
Dependencies
[package]
name = "test"
version = "0.1.0"
description = "Created with Anchor"
...
0
votes
1
answer
77
views
facing a "Create Account: account Address already in use" when running TokenSwap.createTokenSwap method
Hi I am facing a "Create Account: account Address { address: xxx, base: None } already in use" when running TokenSwap.createTokenSwap method which is associated to package @solana/spl-token-...
1
vote
1
answer
18
views
Can we add a total cap to a spl token created with solana CLI?
I am creating a spl token using solana CLI as per the following documentation, https://solana.com/developers/guides/getstarted/how-to-create-a-token.
this already include the burn functionality by ...
1
vote
1
answer
24
views
How to mint token after close mint in Token extension program
I'm a beginner, and I'm learning the close mint part of the token extension program. I want to understand how to mint an amount of tokens then close mint (not allowed to mint any more tokens)
Thank ...
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.
0
votes
1
answer
29
views
SPL22 to SPL token migration
Good day everyone,
We created a token on SPL22.
Is there a way to migrate it to normal SPL ?
0
votes
1
answer
52
views
Why can solana explorer find my token, but solscan can't?
Here you can see it:
https://explorer.solana.com/address/mGeyYGeUEbLVR3d5pAoexBZTJ13PGSSrjYqmsyLn3QZ?cluster=devnet
And here you can't:
https://solscan.io/account/...
1
vote
1
answer
90
views
facing WalletSendTransactionError: Unexpected error
**this is the error i am facing while creating the token **
WalletSendTransactionError: Unexpected error
at StandardWalletAdapter.sendTransaction (adapter.js:224:23)
at async Object.eval [as ...
1
vote
2
answers
48
views
Anchor: How to validate Token Program in Account structs?
In my account struct:
#[derive(Accounts)]
pub struct WithdrawToken<'info> {
#[account(mut, token::mint = mint, token::authority = signer,
token::token_program = token_program)]
pub ...
2
votes
1
answer
45
views
Why is token_program needed when initiating an associated token account?
In the code below if I don't have token_program defined, I get compile time error. However, I am only initializing the ATA but not minting, transferring, approving, or burning the token mint which is ...
1
vote
1
answer
24
views
Can you derive the program owner of a SPL token?
Is there any way to derive the program owner of a token locally without having to use the GetAccountInfo call for example. Such that if I input a token address, it will return whether it is apart of ...
0
votes
1
answer
281
views
How to get program account of a token without knowing its program id?
I want to fetch a token's program account but I don't know the program id. I only have the token mint address. Is it possible to get it? Thanks in advance.
Here is an example. It fetches the program ...
0
votes
1
answer
51
views
How to update the Metadata for Tokenkeg, the original Solana token standard
Is it possible to update the token metadata for the Tokenkeg program?
How to do it using Javascript?
1
vote
1
answer
96
views
How do I to update the name and logo of my SPL token?
I am new to solana programming and I just minted some tokens. I would like to update the name and logo.
Can someone help with the next steps? Where do we store the metadata?
Thanks in advance.
1
vote
2
answers
817
views
Is there any API in Raydium to get the price to token pair?
How can I use the Raydium API to get on chain prices of tokens?
1
vote
1
answer
27
views
Following the Token Extension Program, How do I add a burn function to my token
I followed the youtube torutrial from the solana yt channel(https://www.youtube.com/watch?v=1U1ae2D2jk4), but they don't include how to add the burn function and when I go to the website they don't ...
1
vote
0
answers
51
views
What is the best way to get the latest transactions for an SPL token, and how can I calculate the price impact of those transactions?
I am working on monitoring the transactions over many SPL tokens. Currently I've setup a webhook from Helius and getting SWAP transactions of the token but I'm unable to figure out how can I calculate ...
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 ...
2
votes
0
answers
136
views
Error processing Instruction 0: custom program error: 0x26
----> TX ├─ Signatures[len=1] │ └─ 4UJPHEtrmksnNrX2DemwZHkyPDsYwtNgLvezzymzULjbuRB6QSEnFwig46rTD3j3kBUw1jFnaRRVi9FTUBG1UWiP ├─ Message │ ├─ Version: legacy │ ├─ RecentBlockhash: ...
1
vote
1
answer
25
views
TokenMetadata not an export? ...just following the code in docs
I am following the Solana docs: "Example: Create a mint with metadata"
using Javascript.
Why does an error say that "TokenMetadata" is not an export"?
It also said that this ...
0
votes
0
answers
27
views
Token logo missed on phantom wallet
our cto token logo disappeared on phantom wallet could you help with this problem?
CA : 4h8LjZWUfUQVgbEZ29UzTuGXNW6rwrJis78ZU66ekkPV
3
votes
1
answer
491
views
What is the best way to get all token holders and their balances by mint address?
There is a way to get token accounts by mint address using
https://spl.solana.com/token#finding-all-token-accounts-for-a-specific-mint
But unfortunately it only returns token accounts without balances,...
0
votes
1
answer
144
views
Adding Set Authority Feature To SPL Token Creator
Recently our team completed a token launcher platform for EVM tokens, now we want to create a another platform for creating SPL tokens.
I'm not very familiar with Solana, but I've found some starting ...
0
votes
1
answer
13
views
Blocking specific token program's TXs
As a validator, how do you block a specific token program's txs?
0
votes
0
answers
26
views
when i am creating 'create-extra-metas' using cli i am getting 'invalid program argument' Error
../../target/debug/spl-transfer-hook create-extra-metas HooGStFZgkeZ5wCSg9vHtuEYBSotB26tVEvXra4PEKYJ MoxLrhGXAjVnEiVAjG5ycQbp9MVd4sjfj1yLPFVXhkh
error: send transaction: error: send transaction: RPC ...
0
votes
0
answers
25
views
How do I create customized Solana SPL or SPL 2022 contracts with these specific security functions
How do I create customized Solana SPL or SPL 2022 contracts with these specific security functions?
''The function I wanted in this contract is that only the developer's wallet can apply the token's ...
0
votes
0
answers
73
views
GetTransaction API Data
GM,
I'm currently building a python script to pull back fees being paid by bots prespamming token launches. As additional functionality to this bot, I want to know how much Sol they are planning to ...
2
votes
1
answer
34
views
Why we cannot enable transferfee config or enable metadata after minting on token 2022?
We were trying to enable transfer fee config after minting a token22 token using realloc instruction, but it was not working!
We then tried to enable the transferfee config on minting and later tried ...
2
votes
1
answer
638
views
Decoding an instruction for a token on the spl token program
Hello you may have seen my last post, Error : TypeError: Cannot read properties of undefined (reading 'equals')
This is a follow up to that post.
I decided to experiment more with ...
3
votes
1
answer
128
views
Observing a contract's behavior and withdrawing tokens from it
I recently encountered an error while trying to withdraw stSOL from the Tulip Protocol's "Lending" section:
Program Error: "Instruction #3 Failed - null"
At first, I thought it ...
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 {
...