All Questions
1,119 questions
0
votes
0
answers
6
views
How to Properly Execute Serialized Solana Transaction From Backend Using web3.js and Wallet Adapter?
Problem Description
I'm trying to execute a serialized Solana transaction on the frontend using Solana web3.js and Solana React Wallet Adapter. The transaction is provided by the backend as a hex ...
0
votes
1
answer
22
views
How should I be sending transactions from my UI?
I want my website to be as performant as possible and for as many of my users' transactions to land as possible. What's a good way to do this?
0
votes
0
answers
8
views
What is the most exciting thing about Solana
Maybe I want to organize into daily tasks and work seriously But I am afraid that my work will go in vain
0
votes
1
answer
9
views
Trouble with nft_info Account in Solana Anchor Test Code
I’m new to Solana development, and I’m having trouble writing test code for my program. Specifically, I can’t seem to properly initialize and use the nft_info account.
Here’s part of my Rust code:
#[...
0
votes
2
answers
30
views
How to get the token account in Solana?
I am trying to get token account for this.
#[account(mut)]
pub nft_info: Account<'info, TokenAccount>,
I used getAssociatedTokenAddressSync(), but there is an error.
Error: AnchorError ...
0
votes
0
answers
23
views
Solana web3.js getParsedTransaction returning null
I am writing a script that listens to Solana logs on a certain account and want to send transaction details whenever certain Program conditions are met, as seen below.
connection.onLogs(
...
0
votes
1
answer
37
views
How can I add priority fees to a CLMM close position script?
how can I add priority fees to the following script? From what I understand, I need to create the priority fee instructions and add them to the transaction, but I can't get it to work. The following ...
1
vote
1
answer
38
views
WalletSendTransactionError: Unexpected error when sending transaction
I am creating a staking transaction in my backend, and I want to consume it in the frontend. I have previously created others (withdraw, claim, unstake), and they work correctly.
However, I am unable ...
1
vote
0
answers
19
views
Getting "Site May be Malicious" For a Phantom Wallet Transaction method I'm trying to create
I'm trying to create a method where users must send a specific spl-token in exchange for a service. I created the code, but I get a warning from blowfish saying the site may be malicious. I emailed ...
0
votes
1
answer
16
views
Anchor test error "InstructionDidNotDeserialize"
I wrote an instruction to remove mint authority,and meet "InstructionDidNotDeserialize" error when I tried to run anchor test.
Here is the instruction:
pub fn remove_mint_authority(ctx: ...
1
vote
1
answer
21
views
Wsol balance shows zero
I'm trying to swap wsol against usdc and then in second transaction wsol against the usdc it's sort of arbitrage script.
Now that I don't have wsol balance but the Jupiter aggregator uses sol from my ...
1
vote
1
answer
19
views
Package `Solana-program vX.X.X` cannot be built because it requires rustc X.X.X or newer
When I run anchor build I get the error:
error: package solana-program v1.18.26 cannot be built because it requires rustc 1.75.0 or newer, while the currently active rustc version is 1.72.0-dev
Either ...
0
votes
0
answers
21
views
Unable to withdraw undelegated stake on Solana devnet
I am using @solana/web3.js to test SOL staking on Solana devnet.
I was able to create a staking account, send SOL to it, delegate the stake to a validator and deactivate the stake. This was all done ...
0
votes
0
answers
14
views
WalletConnect and useWallet but its returning null value
I created a simple wallet connect application. I'm trying to show a form after geting the wallet address but its always showing the publicKey value as null. Wallet is successfully connected and I'm ...
0
votes
0
answers
54
views
How to retreive all liquidity pool id for a given raydium program
i am trying to get all pool addresses for a given raydium program. I use solana/web3.js and raydium-io/raydium-sdk-v2. So i start with this:
import { Connection} from '@solana/web3.js';
import ...
0
votes
0
answers
18
views
Getting Error- Buffer is not defined - For Wallet Integration
I am trying to build a simple web application that uses Solana Web3.js to facilitate token purchase on devnet through my phantom wallet.
However, when I attempt to execute the buyTokens function, I ...
0
votes
1
answer
11
views
solana program gives: Reached maximum depth for account resolution error
Specs:
Macbook M1 pro(apple chip 16GB)
➜ anchor git:(main) ✗ anchor --version
anchor-cli 0.30.1
➜ anchor git:(main) ✗ solana --version
solana-cli 2.0.17 (src:93e6e33e; feat:607245837, client:Agave)
...
4
votes
1
answer
37
views
Transactions Missing While Monitoring Multiple Wallets with onLogs
I am currently using Solana's onLogs method to monitor transactions for multiple wallets in real-time. The implementation involves subscribing to multiple wallet addresses and handling transaction ...
3
votes
1
answer
231
views
web3.js version 2: requestAirdrop() with 'finalized' confirmation works, but balance afterwards is zero
In web3.js version 2, I am requesting an airdrop with finalized confirmation (the transaction works fine), and then checking the balance (also with finalized) but the balance remains 0:
import {
...
0
votes
1
answer
53
views
To get IDL of Raydium-CP-Swap (CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C)
I want to get IDL of Raydium-cp-swap(CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C).
I know that is built with Anchor. So I tried
anchor idl fetch CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C
But it ...
0
votes
0
answers
16
views
i dont know how to delete a question
i dont know how to delete a question
0
votes
0
answers
25
views
Solana Defi Opportunity
I'm hiring for a Solana Smart Contract Eng with Strong Rust skills for a brilliant DeFi project.
Reach out if interested: andrew at axiom recruit dot com
0
votes
0
answers
16
views
cargo build -j 2 command gives error
I am trying to build a solana project
Specifications
rustc --version
rustc 1.83.0 (90b35a623 2024-11-26)
solana --version
solana-cli 2.0.18 (src:f77014dc; feat:607245837, client:Agave)
anchor --...
1
vote
2
answers
47
views
Running anchor build gives error in solana program
Upon running
anchor build
[2024-12-03T12:07:16.596224000Z ERROR cargo_build_sbf] Failed to install platform-tools: HTTP status client error (404 Not Found) for url (https://github.com/anza-xyz/...
2
votes
1
answer
24
views
`MaxListenersExceededWarning` when making subscriptions with `@solana/web3.js` version >=2
When using the subscriptions API in @solana/web3.js version >=2, I encounter this warning.
> (node:647037) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 foo ...
2
votes
1
answer
39
views
Failing to deserialize a tx from rpc, Error deserializing transaction: Reached end of buffer unexpectedly
Hey guys I'm just trying to deserialize a tx from an rpc.
const subscriptionMessage = JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "blockSubscribe",
...
0
votes
2
answers
118
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
1
answer
19
views
Transaction not found in getSignaturesForAddress() returned array
getSignaturesForAddress misses one particular transaction of slot 304499001, for address Fch1oixTPri8zxBnmdCEADoJW2toyFHxqDZacQkwdvSP, transaction signature is ...
0
votes
1
answer
48
views
How to get the balance for tokens in web3js v2?
In web3js@1 we could use connection.getTokenAccountsByOwner() to get the balance details for tokens in a wallet.
In web3js@2 we have getTokenAccountsByOwner function in the rpc object, but I'm failing ...
0
votes
0
answers
13
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 ...
0
votes
1
answer
40
views
trying to fetch all tokens which are created by walletAddress
hello i have been trying to fetch all tokens created by walletAddress or user.
i am trying helius as someone already suggested me to use helius with the getAssetsByCreator function.
i need only token ...
0
votes
1
answer
42
views
how to get list of tokens(not NFTs) that are created by solana user
i want to fetch the tokens which are being created by the user.
i came across the method .getParsedTokenAccountsByOwner() which is being used to fetch the tokens that is being owned by owner.
and what ...
0
votes
1
answer
19
views
i tried to make a transction on sol chain between two wallet
hello i try to make a app that use solana wallet for connection when i want to make a transaction between two wallet i got this error
index-DKfn-846.js:104 Error sending message: Error: failed to get ...
0
votes
0
answers
11
views
Solana currency not being sent
I have $2 in my Phantom wallet and Tether is in Solana. I wanted to transfer it to another wallet, but it gives a warning. What's the problem?
0
votes
1
answer
57
views
How to solve " Failed app interaction "
The image showing in my phantom wallet
Another image show That the transfer is completely but I can't see my token
0
votes
0
answers
16
views
How to get specific token info under postBalances and preBalances for getTransaction method
I want to get specific token info transfers for preBalances and postBalances section of SDK's getTransaction method response. As a basis it gives info only in lamports, but can it be used to get ...
3
votes
1
answer
108
views
How do I create a Solana RPC connection using TypeScript/JavaScript?
The Solana RPC offers several methods you can call to read and write from the network. How would I use @solana/web3.js in TypeScript/JavaScript to create a connection against which I can call these ...
4
votes
1
answer
117
views
Basic examples how to use solana web3.js version 2.x and above
a beginner typescript developer here. I tried to get started with the web3.js library on version 2. But all the documentation I can find is for version 1.95.5 or older. And literally nothing works as ...
0
votes
0
answers
52
views
Find from which trading bot a wallet is
Does anyone has a clue how to find from which trading bot(bullx, photon, trojan,...) a wallet is?
like:
https://dune.com/dev2020/solana-alphas
or
0
votes
0
answers
20
views
Timeout Errors in Jupiter API
In my code made it with Node js
const executeSwap = async (quote, telegramId) => {
try {
logger.info('Starting executeSwap function');
const wallet = await getWallet(telegramId);
const ...
0
votes
1
answer
40
views
lost funds when trading and then closing and withdrawing to my account
I am new to this having only been trading meme coins for about 2 weeks but i cant help but notice none of my money is coming back to my Wallet. Am i doing something wrong? i have a Phantom wallet and ...
0
votes
1
answer
24
views
Seeking confirmation or advice on best way to retrieve all transactions associated with a specific account for a given block
I need to retrieve all signatures on a given block for a given account. I'm using the RC branch right now, and think it will be likely that v2 will be the release branch by the time I'm ready to ...
0
votes
0
answers
16
views
who knows any api can monitor the burn event, and get the history burning history? I need to know the signature instead of only how much it burned
Like what I said in the title. I don't want to monitor the SPL token program, caz it's so noisy, and wasting time. I'm doing a product recently, I need the api be fast.
0
votes
0
answers
27
views
" Error processing Instruction 3: invalid account data for instruction" when trying to buy Solana token using Javascript
I'm building a bot using JavaScript to auto trade Solana token for me. It's coming along fine but when it's time for bot to buy, it's always logging this error for me:
Fetch Error: Simulation failed.
...
2
votes
1
answer
58
views
How to deserialize transactions in @solana/web3.js v2?
I'm working with Raydium and Jupiter swap APIs, which return serialized transactions that need to be deserialized before sending. In the older version of @solana/web3.js, this was done using ...
1
vote
0
answers
40
views
How to filter Solana log subscriptions
I am trying to only listen to transactions regarding ONE specific program and only one specific instruction.
For example I only want to see logs of transactions that executed the "create" ...
1
vote
1
answer
47
views
Using solana program with traditional frontend-backend
I am building a system that requires the client to pay for the transaction. Once the user has successfully paid for the transaction, my backend will give the user some Web2 benefits.
The main problem ...
3
votes
1
answer
62
views
How to generate, save, importing a keypair into phantom with solana/web3.js v2?
Steven and John answered on how to generate and save a keypair using web3.js v2.
-> see also: How to generate and save a keypair with solana/web3.js v2?
I formatted the private key into base58 (...
4
votes
1
answer
45
views
Proper way to interact with BPF_LOADER_PROGRAM in Web3JS
What is the expected way to interact with the BPFUpgradeLoader using the Solana Web3 JS SDK? It appears the web3.BPF_LOADER_PROGRAM_ID is marked as deprecated, but it offers no clear alternative.
What ...
1
vote
2
answers
66
views
How to infer or find basic types for return values in @solana/web3.js v2 library?
I’m working on a project using the Solana web3.js v2 library, and I’ve run into a challenge with types. Specifically, I’m trying to infer or find the correct type for the return value of a function ...