Questions tagged [spl-token-program]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

Does Solana's functionality and programmability permit this Token NFT design?

I want to create a solana NFT collection, where each NFT and each NFT is different will be paired with its token supply. Is it possible to design this on Solana, if yes how? The new projects like ...
Dezmoni's user avatar
0 votes
0 answers
9 views

Why are the validator functions in `solana_clap_v3_utils` deprecated? What is the intended flow for solana clap tools?

I am trying to build a clap cli tool using the latest utils from solana_clap_v3_utils 1.18.2 and there are currently no good examples in the solana-program-library that use v3 in the builder context ...
tonton's user avatar
  • 55
0 votes
1 answer
19 views

How to charge transaction fee in my token insteed of SOL if any one tranfer my XYZ token they pay in XYZ instead SOL, Ithey don't need to hold SOL

I'm seeking for help any body can help regarding spl, token, I'm working on app it has in app wallet, if some did dum task I'll provide my token as mining reward, so what I need that, when they ...
Crypto Centric's user avatar
1 vote
1 answer
78 views

Error in getTokenAccountBalance (failed to get token account balance), when quickly buying/selling

I am attempting to sell tokens immediately after purchasing them (in few seconds), but I am encountering an error when trying to retrieve the balance/token account for the swap. I have used both ...
Mika Sens's user avatar
0 votes
0 answers
25 views

How to send multi signed versioned transaction in one signature?

Gm guys. Recently, I've tried to call multi signed versioned transaction(v0) in one signature but got failed. got this issue. ...cannot sign with non signer key on solana... How could I handle it? ...
CryptoLegend92's user avatar
1 vote
1 answer
54 views

Creating SPL token Non-Transferable Extension with metadata on React

I'm trying to create SPL token with Non-Transferable Extension with metadata. Right now I can create token with each features only follow these guides, and fails to combine them. below is how I tried ...
cablespecific's user avatar
0 votes
0 answers
185 views

How to listen to liquidity burns on the solana chain

Using the solana websocket url I'm listening to the solana blockchain logs and then filter those logs based on a certain criteria. async function main(connection, programAddress) { console.log("...
ccurves's user avatar
  • 101
0 votes
0 answers
22 views

How to test spl-2022 token on devnet

How to test spl-2022 token on devnet, Is there any dex which provides creating and managing lp pool on devnet for 2022 standard?
ashish0411's user avatar
0 votes
0 answers
43 views

How to programatically swap spl tokens to sol

How to programatically swap spl tokens to sol, assuming there is liquidity pool (token/sol) created on flux beam. is there any standard interface to do it.
ashish0411's user avatar
0 votes
1 answer
80 views

Trying to deploy A solana SPL token With A Max Wallet

I have been searching for hours and hours and days but i cannot find a way to deploy a spl token with a max wallet for each user such as , a wallet can buy only 2% of the supply , not more , is there ...
Daily1 Motivation's user avatar
0 votes
0 answers
87 views

How to get the price of an spl token relative to solana?

The thing is that I need to calculate the price of a tokan in sol or in usd. I would use one of the publicly available APIs, such as birdeye or jupiter, but they do not display the price of tokens ...
Skull's user avatar
  • 1
1 vote
0 answers
57 views

How to Bridge ERC-20 Tokens to a Similar Contract on Solana Using Wormhole or Equivalent Platform?

I am currently working on a blockchain project where I’ve encountered a challenge that I hope to get some insights on. Background: I have an existing ERC-20 token contract on Ethereum, which includes ...
RookLifting's user avatar
1 vote
1 answer
33 views

Get signatures for address including SPL transfers

I would like to check who has transferred a certain SPL token to a given wallet. But when i try to filter all transactions the SPL token transfers are not included. recent_transactions = await client....
Devils Crypto's user avatar
1 vote
1 answer
43 views

What SPL Token Program should I use, Token or Token2022?

I would like to create my own SPL token. However, I'm not sure which program is the best one to use since Token2022 is very new. Can you help me choose the best or right one?
Caroline's user avatar
2 votes
1 answer
167 views

Using @solana/spl-token-swap package on devnet

I'm following along with this site https://www.soldev.app/course/token-swap. However, there seems to be a version difference in the use of TokenSwap.withdrawAllTokenTypesInstruction: I'm using the ...
MONO's user avatar
  • 51
0 votes
1 answer
59 views

what the numbers in the array indicate?

I work with decoding data. I use the @solana/spl-token package for that. sometimes I get the TokenInvalidInstructionKeysError error I have this code ts. as keys I provide an array of keys that I have ...
slntrx's user avatar
  • 97
1 vote
1 answer
104 views

where to get information about isSigner and isWritable from the transaction data?

in the package @solana/web3.js there is such type AccountMeta /** * Account metadata used to define instructions */ type AccountMeta = { /** An account's public key */ pubkey: PublicKey; ...
slntrx's user avatar
  • 97
0 votes
0 answers
33 views

How to use "spl-token set-transfer-fee" CLI function in JS?

I noticed there is CLI function in SPL-token library for setting transfer fee but this function is missing from javascript SDK. CLI: https://github.com/solana-labs/solana-program-library/blob/master/...
LubWn's user avatar
  • 13
1 vote
0 answers
135 views

how to work sniper bots [closed]

please explain me how sniper bots work in solana. i am interested in their logic of operation. how does it work? the bot finds a coin, but the trading pair may not appear immediately. What does the ...
john mlan's user avatar
1 vote
1 answer
303 views

how to decode data instructions with javascript

upd: https://docs.solana.com/developing/programming-model/transactions#instruction-data here, my task is to decode this data using js I tried to solve the issue with this post How to get Solana ...
slntrx's user avatar
  • 97
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
1 vote
1 answer
365 views

How do I get real-time information about new created tokens on Solana?

So guys, I followed this question How do I get real-time information about newly created tokens on Solana?. I configured a helius hook that monitors the token program at the address ...
slntrx's user avatar
  • 97
3 votes
1 answer
108 views

How to take a snapshot of Token2022 holders?

How to take a snapshot of all holders of a Token2022? I get an output of 0 require('dotenv').config(); const fs = require('fs'); const path = require('path'); const {PublicKey, Connection} = require('@...
David Dacruz's user avatar
1 vote
1 answer
259 views

How to swap SPL token using Raydium Liquidity Pool V4

Please let me know how to swap SPL token using Raydium Liquidity Pool V4. I need sample code. Please help me.
anders nielsen's user avatar
1 vote
0 answers
90 views

How to update Token2022 transfer fee? [duplicate]

Hello I would like to know if it's possible to update the transfer fee for a Token2022 using @solana/web3 or any other way I've been looking all I i can find is the ...
David Dacruz's user avatar
3 votes
1 answer
119 views

Parse transactions in human readable format

How can I convert the data to the same form as it is done on the solana explorer for better readability?
slntrx's user avatar
  • 97
0 votes
2 answers
198 views

how to find a new token in the block

I searched for a similar question but couldn't find one. So, I get the last block, then inside this, block I parsing all transactions. My task is to find information that a new token has been created. ...
slntrx's user avatar
  • 97
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
99 views

Transfer Hook: Not backwards compatible with common wallets

As far as I understand from documentation all the Token-2022 extensions should be backwards compatible with normal transfers from spl-token standard. However when testing Transfer Hooks I was only ...
LubWn's user avatar
  • 13
0 votes
1 answer
49 views

Getting Transaction simulation failed: Error processing Instruction 0: custom program error: 0x6, while creating permanent delegate

My instruction for creating permanent-delegate is invoke( &initialize_permanent_delegate( &ctx.accounts.token_program.key(), &ctx.accounts.mint_account.key()...
blackhorse's user avatar
1 vote
1 answer
29 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
1 vote
2 answers
137 views

Mint Token as a PDA via SPL

I'm converting my custom SPL token anchor program from using mint token as a newly generated anchor keypair, to using a PDA instead. It seems that SPL can take either a keypair or PDA for the mint ...
AceGravity'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
1 vote
2 answers
510 views

How to calculate token prices from LP pairs using `getTokenAccountBalance`?

I want to reference this post: https://solana.stackexchange.com/a/518/7486. I am trying to achieve the same as OP of that post. I want to fetch the price of a token. One response (the one I referenced)...
Eric Goerens's user avatar
1 vote
1 answer
92 views

Is this a standard SPL token?

I'm looking to deploy a new SPL token, hopefully with more custom features. This was some code I scraped together for a standard SPL fungible token. Do you see any issues with it? I'm doubting myself ...
AceGravity's user avatar
0 votes
1 answer
51 views

TokenAccountNotFoundError

I am a new developer trying to learn and dive into the Solana ecosystem. I'm currently trying to complete this lab: https://www.soldev.app/course/token-program. I'm on step 2 of the lab, where you ...
kapforty's user avatar
2 votes
2 answers
204 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
1 vote
0 answers
153 views

5 questions from a newbie about token2022 [closed]

I created a token2022 with Spl token cli (windows) can i add a logo to this How should I technically proceed to add it to any exchange? Transaction History "Executable: No " " Current ...
Ali's user avatar
  • 11
1 vote
1 answer
38 views

Can a solona token contract handle two tokens instead of one?

I wanna create a solona token that awards people with a 2nd token to their account if they buy during a certain condition. is it possible to create such a token in solona?
OPP's user avatar
  • 11
1 vote
1 answer
110 views

Block tokens on someone else's address

I'm looking for a way to block tokens created on the Solana blockchain. Ideally I would like to do this using Python. Please provide code samples. Situation: I need to block an account that has my ...
Atr118's user avatar
  • 21
0 votes
2 answers
80 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
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
1 vote
1 answer
298 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
121 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
266 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
84 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
  • 1,438
3 votes
1 answer
89 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
136 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
  • 23
3 votes
1 answer
69 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