Questions tagged [spl-token-program]
The spl-token-program tag has no usage guidance.
194 questions
2
votes
0
answers
125
views
How to identify liquidity pool burns in Sol Incinerator and determine authority in Solana?
When a liquidity pool is burned in Sol Incinerator on Solana, will the associated token always have Raydium as the authority? Additionally, how can I filter transactions to specifically identify when ...
0
votes
1
answer
119
views
'Octal escape sequences are not allowed in strict mode' error when generating keypair
I started Solana and web 3 dev recently
Have been having this issue for like 3 days, tried checking online for solutions and nothing.
Please help anyone
CODE
import { Keypair } from "@solana/web3....
0
votes
0
answers
39
views
Is there anyway I can make my spl token transfer consistent despite the congestion just like phantom wallet?
I am trying to send spl tokens and make it consistent despite this congestion. I've been getting 2 successful transactions in 50 tries even though I am using a function from Jupiter that forcefully ...
1
vote
3
answers
1k
views
Getting dapp could be malicious warning during phantom wallet transaction
Hi I have deployed my spl-token program to mainnet-beta recently, so its publicly available but from last two days I am getting warning "This dapp could be malicios" warning on phantom ...
2
votes
1
answer
154
views
Transfer specific token to and from a known account
Given that I have the following program
use anchor_lang::prelude::*;
use anchor_spl::token::{self, Mint, Token, TokenAccount, Transfer as SplTransfer};
declare_id!("...
2
votes
1
answer
36
views
SNS - Retrieve all Domains+Subdomains of an User
The following code is used to retrieve all Sub-Domains of a Public-Key.
const getAllSNSProgramAccounts = async () => {
const accounts = await connection.getProgramAccounts(new PublicKey('...
0
votes
0
answers
63
views
Token 2022 Program: FreezeAccount (Program Error: "Invalid account state for operation")
I bought YUKI tokens and got this message when I tried to sell them,
"Token 2022 Program: FreezeAccount
(Program Error: "Invalid account state for operation")"
what do I do to get ...
2
votes
2
answers
538
views
Why do we close WSOL Token Program accounts?
Background:
If I understand correctly: During transactions where we transfer SOL to/from wallets, we need to wrap the SOL in a temporarily created WSOL Token Program account. Then use that to transfer ...
3
votes
1
answer
150
views
Confidential Transfer Solana Setup script failing
I am trying to understand Solana Confidential Transfers, so I ran this script from the official Solana repository for a simple demonstration
https://github.com/solana-labs/solana-program-library/blob/...
1
vote
1
answer
170
views
How to create associated token account for a new mint?
I created a new token with metadata with this guide. Now I want to create the corresponding token account by using
const tokenAccount = await getOrCreateAssociatedTokenAccount(
...
2
votes
0
answers
45
views
What function should I use to purchase a token transfer with program_id?
I am trying to repeat this transaction (4Ku7oqwPAwRLPm7jNp2oTigYv8XpcTPLJwF49dLVS6ypi35vH9orwRAPcfMj37jj8FwmpMFuP5j8cS1hwdoXJp67) programmatically on solana or solana cli (I will be grateful for any ...
1
vote
0
answers
26
views
Fund associated token account
I am trying to swap SOL to USDC on the devnet. I get this error "Input token account empty". I know that this means that the associated token accounts A and B have to have some funds. I am ...
1
vote
0
answers
104
views
The provided token program does not match the token program expected by the swap
import { logger } from "../helpers";
import * as web3 from "@solana/web3.js";
import * as token from "@solana/spl-token";
import {
TokenSwap,
TOKEN_SWAP_PROGRAM_ID,
...
1
vote
1
answer
808
views
expected a sequence of length 32 (got 43) error when using solana in Python
Solana community!
I'm working on a Python script to filter transactions executed through the SPL Token Program. I aim to specifically identify and list new token creation transactions. However, I'm ...
1
vote
1
answer
209
views
How can I resolve this "Error processing Instruction 1: custom program error: 0x1004"
I'm running into the following error trying to work through the transfer hook docs. https://solana.com/developers/guides/token-extensions/transfer-hook
I am using Ubuntu on Windows WSL:
I am running ...
0
votes
1
answer
41
views
Are funds sent into an address with IsOnCurve: false Retreivable?
I sent USDC to an address with IsOnCurve False, it was an exchange address. From what I have read, the funds are lost because nobody really has access to that address.
Then, I read here that there is ...
2
votes
1
answer
199
views
how to transfer spl token with transfer-hook extension
I used the Solana Playground wallet to deploy a program and obtained the program ID. The ID is 6baxXgMr7HypeTBhN64rbrt31UwbSeRtsQQxGw1KBi5b. Then, I used the following script to create an SPL token.
//...
1
vote
1
answer
232
views
SPL Token Metadata Initialization Error - Transaction Simulation Failed
I am trying the SPL Token Program to configure the metadata for the token deployed on DevNet. I have validated the token mint address. It is displaying the following error. Could you please help to ...
0
votes
1
answer
228
views
Issue in Adding Token Metadata using SPL Token CLI
I have created a new SPLToken on DevNet and added the following account - 2ePFwPK3coTPqzirUaM9fugKnQL1V6zQp5TbPmopipiH
I am trying to add the metadata to the newly created SPL Token using the ...
1
vote
1
answer
197
views
How to specify the amount to be minted and total supply in "createAndMint(...)"?
Fungible tokens
The createAndMint(...) function accepts the parameter amount. This is an amount of tokens to be minted immediately, right? Then how to specify the total supply?
1
vote
1
answer
190
views
InvalidAccountData error on token transfer function ( using metaplex-toolbox )
I've created a dApp on React which uses the Solana blockchain to create, mint, and send utility tokens. I'm using @metaplex-foundation/umi and @mpl-toolbox to create the token, mint it to the creator'...
0
votes
1
answer
225
views
Token Creation Issue on DevNet
I am trying to create a token after setting my wallet using the following command.
solana-keygen grind --starts-with ott:1
The wallet creation is successful. I have also configured the connection to ...
2
votes
2
answers
2k
views
Error: unable to confirm transaction. This can happen in situations such as transaction expiration and insufficient fee-payer funds
1. Description of my context on api.mainnet-beta.solana.com
Token machine made with Windows 11 remote PC
Connected to Sol network by api.mainnet-beta.solana.com
1.1 Detailed description coming from ...
0
votes
0
answers
53
views
Filtering all transaction of a particular mint address
Filtering all transaction of a particular mint address, getSignaturesForAddress functions returns transactions, but still some of the transaction are missing in the returned list.
Like actual number ...
4
votes
2
answers
530
views
Check mint to create either Token or Token2022 on demand
Solana's Token 22 tutorial tells you how to upgrade to 2022, but most deployed programs need to support existing accounts that were made with the Token program.
Let's say we have an ix that makes a ...
0
votes
0
answers
42
views
Is it possible to send SPL token from a wallet to another wallet using laravel?
I want to try writing code to send SPL tokens from one wallet to another. I've tried it before using a JS framework, but now I want to try using Laravel. I managed to create a wallet connection, but ...
0
votes
2
answers
38
views
How to filter most recently created pdas of a program
How to filter most recently created pdas of a program, How should date be store in pda data so that we can directly filter based on the data stored in pda. For ex. filtering all pda of a program ...
0
votes
0
answers
76
views
Transfer SPL Token only using Plain HTML and JS
I want to ask, is it actually possible to make transactions using only HTML and JS without using a framework? I am currently trying to transfer an SPL token, but I am always getting stuck using only ...
0
votes
2
answers
173
views
Verified token creators?
we are looking into launching a token on the Solana chain but with our little experience we doubt our own process a little and due to the 'set in stone' principe of blockchain we went looking on the ...
2
votes
1
answer
96
views
Transfer Hook vulnerabilities
I can't tell how safe it is to arbitrarily support transfers on "transfer hook" enabled tokens via CPI from my program.
At the moment i am setting is_signer and is_writable to false on all ...
0
votes
0
answers
96
views
solana pnft staking program
I'm trying to escrow the user NFT in the stake instructions bu using transferbuilder and using sign invoked with master edition nft as i assume it has the freeze authority on pnfts
and getting this ...
1
vote
1
answer
188
views
How to use the key pair of the user connecting on my website to mint SPL token
I want to create a website for users to connect their wallets (phantom etc) to my website, then they can generate tokens into their wallets themselves.
I looked at the example on https://spl.solana....
0
votes
0
answers
1k
views
Solana SPL token holder count
I'm trying to find an efficient way to get the total token holders of an SPL token. For ETH ERC-20 tokens I use Etherscan API, this returns me an integer of the total holders of the token address used ...
1
vote
1
answer
77
views
what should be value of tokenswapStateAccount when trying to swap
I am using node js @solana/web3 and @solana/spl-token and spl-token-swap libraries to perform a swap of token. I am confused with what should be the value of tokenSwapStateAccount and where would I ...
0
votes
0
answers
111
views
Fetch trending solana tokens without 3rd party API
GM Buildooors!
What's the optimal approach to fetching on-chain data about trending SPL tokens like we have on platforms like Dextools, Birdeye, Step Finance etc.?
Preferably without the help of 3rd ...
1
vote
1
answer
97
views
Minting a Fungible SPL token to same ATA (more than 1 time) always fails
I'm pretty new solana ecosystem and have been following multiple tutorials on minting Fungible SPL tokens. On all the tutorials, you create a Mint and ATA and the then the first time the mint ...
0
votes
0
answers
54
views
How to fetch all information about spl token with token address in anchor or in javascript
i want to fetch token information of spl token directly from the solana blockchain . Give some solution to fetch metadata , tokenomics data and security data of spl token .
i want to fetch directly ...
1
vote
1
answer
263
views
SPL Token 2022 Transfer Fee
Is there a way to retrieve the token extension fee for SolToken2022?
When we pass the Mint address, it returns the transfer fee.
Edit:
const fee = await getTransferFeeConfig(mint
);
console.log(&...
1
vote
1
answer
98
views
Transfer_hook in spl-2022: Only deduct tax from swap transaction
Is there a way to modify the transfer_hook in order to deduct tax fee in $SOL from swap transaction only?
I know there is transfer-hook supported that, but dont know how I check program address of ...
0
votes
2
answers
76
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 ...
1
vote
1
answer
495
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 ...
1
vote
1
answer
1k
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 ...
1
vote
1
answer
306
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 ...
0
votes
0
answers
1k
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("...
1
vote
0
answers
100
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?
0
votes
0
answers
206
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.
0
votes
1
answer
368
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 ...
1
vote
2
answers
1k
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 ...
3
votes
0
answers
302
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 ...
1
vote
1
answer
119
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....