All Questions
Tagged with spl-token-program solana-program
48 questions
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
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
0
answers
29
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
2
answers
398
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 ...
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 ...
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 ...
0
votes
1
answer
220
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
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
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 ...
2
votes
0
answers
136
views
Error processing Instruction 0: custom program error: 0x26
----> TX ├─ Signatures[len=1] │ └─ 4UJPHEtrmksnNrX2DemwZHkyPDsYwtNgLvezzymzULjbuRB6QSEnFwig46rTD3j3kBUw1jFnaRRVi9FTUBG1UWiP ├─ Message │ ├─ Version: legacy │ ├─ RecentBlockhash: ...
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
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
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....
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
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 ...
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 ...
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
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....
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
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 ...
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("...
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 ...
1
vote
1
answer
553
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?
2
votes
4
answers
6k
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 ...
2
votes
1
answer
4k
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 ...
1
vote
0
answers
269
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 ...
2
votes
1
answer
624
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.
1
vote
1
answer
600
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?
3
votes
1
answer
482
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, ...
3
votes
1
answer
188
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 ...
2
votes
1
answer
6k
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 ...
0
votes
0
answers
106
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 ...
0
votes
1
answer
92
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!
2
votes
1
answer
549
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/...
0
votes
1
answer
176
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....
1
vote
0
answers
119
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
1
vote
2
answers
675
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":...
0
votes
1
answer
53
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.
0
votes
1
answer
68
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&...
19
votes
2
answers
3k
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 ...