Skip to main content

Questions tagged [web3.js]

Questions regarding the JavaScript SDK @solana/web3.js.

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

Solana blink returns Unable to confirm transaction

I created a P2P SPL swap application using an escrow smart contract and added a blink feature. Basically, whoever creates the escrow will get a blink to complete the escrow token swap. They can then ...
Arjun Mohan's user avatar
0 votes
1 answer
11 views

How to convert a MessageCompiledInstruction to TransactionInstruction in web3.js

I have a VersionedTransaction, which has a message with some instructions of type MessageCompiledInstruction. I'm trying to decode the ComputeBudgetInstruction with the following code: const msg = ...
Quantoor's user avatar
  • 101
1 vote
0 answers
18 views

How to link a smart contract to a dedicated wallet

I have a question about linking a wallet to a smart contract. Specifically, I want to send tokens to a program wallet and then have that wallet send tokens to another recipient in a subsequent ...
GoT's user avatar
  • 55
0 votes
0 answers
15 views

Is there any faster way to getPoolKeys from Solana Raydium?

Currently, I am fetching all liquidity-related data from Raydium API. (https://api.raydium.io/v2/sdk/liquidity/mainnet.json) And then matching with my desired token address to filter the right ...
Shahria Emon's user avatar
0 votes
1 answer
11 views

src.toArrayLike is not a function

I am trying to do a dapp on Solona with Next.js and Ancor. I am getting that error Here is my program setup const connection = new Connection(clusterApiUrl("devnet"), "confirmed");...
Berkay Çırak's user avatar
0 votes
0 answers
14 views

How can I add liquidity for a token I want in a Raydium CPMM pool?

require('./globals'); const { Percent } = require('@raydium-io/raydium-sdk-v2'); const BN = require('bn.js'); const Decimal = require('decimal.js'); const { lpBotServices, raydiumServices } = require('...
Akash Yadav's user avatar
0 votes
0 answers
54 views

Buy pumpfun error

When I use https://docs.pumpapi.fun/trade_transaction_api this docs generate pumpfun transaction And I sign and send the transaction this is my transaction data. const data = { trade_type: 'buy',...
Huaming Li's user avatar
2 votes
1 answer
60 views

How to reliably confirm transaction with web3.js

I'm trying to retrieve transaction information using Solana's APIs, but I consistently receive null when calling getTransaction for my transaction ID (txid). This happens even though the transaction ...
Danilo Congradac's user avatar
1 vote
1 answer
79 views

How to create shard accounts to manage "unlimited" account size

Since there is a limitation inside Solana transactions (1kb), and Solana account (1Mb), I'm not able to create a huge account ^^ Someone suggests me to open a new question: Handle big vector ...
GoT's user avatar
  • 55
0 votes
1 answer
39 views

Convert VersionedTransaction to Transaction

Is there a way to convert a VersionedTransaction to a Transaction? I need to combine two transactions into one but with the type of VersionedTransaction it can't be done. Any help?
Kaveen Laksitha's user avatar
0 votes
1 answer
20 views

What is the benefit of transfers with the TransferWithSeedParams?

Using the web3.js library, when doing a transfer of Sol with the SystemProgram.transfer function, what is the benefit of using the TransferWithSeedParams as opposed to the regular TransferParams? I ...
CryptoCurious's user avatar
0 votes
1 answer
20 views

Issue with Solana onLogs and removeLogsListener when splitting code into separate files

I am working on a project using Solana web3.js with the QuickNode API. I have split my code into two files, track.js and remove.js, to keep it organized. However, I am encountering an issue when ...
Mustapha Abdulrohim's user avatar
0 votes
0 answers
14 views

How to send transaction from wallet with secret key

I am trying to send a transaction from a wallet using secret key. I am trying to execute it using @solana/web3.js. Here's the script that I have created but it is not working for some reason. "...
Anas's user avatar
  • 41
0 votes
0 answers
8 views

How to get how much sol was added to lp

Need to get how much sol and the token was added to lp with a signature when the token was created. Please provide a link to a project that has a solution, I am sure there are plenty. Using js would ...
Matěj Pátek's user avatar
0 votes
0 answers
22 views

Private RPC issue "TransactionExpiredBlockheightExceededError: Signature has expired: block height exceeded" when confirming successful transaction

Error am getting "TransactionExpiredBlockheightExceededError: Signature XXX has expired: block height exceeded" when confirming successful transaction const confirmation = await this....
flewin lopes's user avatar
0 votes
1 answer
30 views

How to handle connection failures with "onLogs"?

I am using onLogs (https://solana-labs.github.io/solana-web3.js/classes/Connection.html#onLogs) to listen to interactions with my program. I am connecting to the blockchain via a paid RPC and ...
OSF's user avatar
  • 1
0 votes
1 answer
21 views

How to search / filter historical SOL transfers / transactions via Web3.js?

I need to find a list of SOL transfers and a list of SPL Token transfers to a given address. So far it seems there is no such API from Solana web3.js, except getSignaturesForAddress(), ...
Russo's user avatar
  • 213
2 votes
0 answers
17 views

How to set freezeAuthority and mintAuthority to null?

I'm trying to mint a token along with metadata. Since Solana has moved to Metaplex for token metadata I've been trying to get it working. Now that I have finally managed t o get it working I am having ...
Arfath Yahiya's user avatar
0 votes
1 answer
57 views

How does BullX or Photon execulate transaction without storing users' private key?

i was wondering how can bullx or photon execute transaction without storing my private key? Don't they need the private key to sign the transaction? Is there a way where i can execute a transaction ...
irregular's user avatar
0 votes
0 answers
12 views

Metamask wallet with solflare snap

I used metamask wallet I created account with Private key I have private key Metamask does not support Solana I used my sol address for airdrop I received $70 worth of borpa Plz tell me procedure how ...
Haider Ali's user avatar
1 vote
1 answer
58 views

I can't fetch full transactions for Solana token from quicknode api. Some signatures are missing

I am trying fetch all the signatures of a solana token with details. I am using monthly subscription. But Its failed to give full transactions. Some signatures are missing.Same happening with heilius. ...
Ruba haider's user avatar
0 votes
0 answers
15 views

fetching and store function working time solution

now, I build a custom program on solana. I have to make a custom program that can retrieve the Market ID of a user specified token and then also use that market ID to retrieve the Market Account, ...
silver toml's user avatar
0 votes
0 answers
17 views

Interact with my program on react app

I am a begineer on Solana blockchain development. I am trying to have my front end application built with react communicate with my program deployed on a localblockchain. What I did: Created a program ...
Louiscaillou's user avatar
0 votes
1 answer
22 views

Sign Program Method Transaction with Secret Key

I have a method in my program that can only be fired by the admin address. Now I am trying to fire this method using Next.js server actions using the secret key of the admin address. But I am having ...
Anas's user avatar
  • 41
0 votes
1 answer
24 views

Why is the createMint call not working

import { getExplorerLink, getKeypairFromEnvironment } from "@solana-developers/helpers"; import { createMint } from "@solana/spl-token"; import { Connection, clusterApiUrl } from &...
Thrishank 3410's user avatar
0 votes
1 answer
44 views

How can we get our dApp to not have the malicious error

My dapp showing malicious warning error everytime am buying the token..how to resolve this blowfish not provide any valid solution...kindly assist me
sundarraj's user avatar
1 vote
1 answer
38 views

Invalid WebSocket frame: invalid status code 1006

I'm experiencing frequent random disconnections when using the Node.js WebSocket client for Solana. However, I do not encounter this issue when using web3.js. Unfortunately, web3.js does not allow me ...
Telelist GW's user avatar
0 votes
0 answers
6 views

Why does impersonation sometimes fail but sending it directly works

Why do I often use RPC to simulate trading but 9 times out of 10 it fails, but if I go directly to the chain, it will succeed directly, I don't understand what the problem is, I'm a newbie, can you ...
赵77's user avatar
  • 1
0 votes
1 answer
25 views

How can I identify the spl-token contained within a token account using the token account address?

I am currently sorting through spl-token transfers using the @solana/web3.js library and I need to know the spl token address that is associated with a certain token account to find out which token is ...
Hex Luther's user avatar
0 votes
0 answers
35 views

'The given account is owned by a different program than expected' trying to make a transaction, shows program error

I have written a contract where user can register as user and organisation and user can deploy sol to the organisation's address I deployed it in Solana Playground and tried out the functions there ...
Poulav's user avatar
  • 1
0 votes
0 answers
26 views

Log Decode Instruction from webSocket

For three days now I have been trying to figure out how to Decode these codes when there is no proper documentation and no proper instructions. log => { signature: '...
Amin Doreh's user avatar
1 vote
1 answer
54 views

how i transfer my spl token by js

Hello i need to write a program that transfer token from my wallet to another wallet i wrote here is code const {clusterApiUrl, Connection, Keypair, LAMPORTS_PER_SOL, PublicKey} = require('@solana/...
Hich's user avatar
  • 51
1 vote
1 answer
26 views

How to add compute instructions to VersionedTransaction

I have a versionedTransaction, all i can get is the compiledInstructions. Is there a way in js by which i can decode these compiledInstructions and append my computeBudget instructions and finally ...
Pranav Desai's user avatar
1 vote
1 answer
27 views

How can you transfer SOL using web3.js?

How can you transfer SOL using the web3.js sdk for Solana? Note: This is a mirror, as this question only has an answer on StackOverflow but not on Solana Stackexchange. Credit to anondevpepe for the ...
Ahri's user avatar
  • 4,727
0 votes
1 answer
41 views

How does one "transfer" SOL to another account, rather than using a "transaction"?

What is the difference between a transaction and a transfer? From my understanding so far, and according to the answer provided in this question, transactions are meant for exchanges using native SOL, ...
CryptoCurious's user avatar
0 votes
1 answer
31 views

Develop programs on the beta playground and test with localhost frontend

Hi guys I was trying to install my environment to get started working on solana programs on my windows machine. Unfortunately I have came across so many errors and it's just an endless circle at this ...
El Pandario's user avatar
0 votes
0 answers
45 views

Error processing Instruction 1: custom program error: 0x1772

I'm using trying to execute swap txn on pump.fun. I've generated the instructions using Solana Swap For some reason, sometimes I am getting this error code. { "bundleId":"...
Arfath Yahiya's user avatar
0 votes
1 answer
18 views

It’s about token

I’m trying to map holders of specific tokens, issue im running into is correct interaction with solana web3.js to get the wallet addresses rather than the token program addresses I want to map the ...
Alan's user avatar
  • 1
0 votes
1 answer
26 views

How to Standardize Solana Addresses for Consistency in JavaScript/TypeScript?

I'm working with Solana addresses in a TypeScript project and need to ensure consistency in their representation, similar to Ethereum's toChecksumAddress (https://docs.web3js.org/api/web3-utils/...
Lui Seconda's user avatar
1 vote
1 answer
67 views

Decoding and Extracting Data from complex string in base58

I want to extract the following information from a base58 encoded string: { "name": { "type": "string", "data": "PuppyPizza" }, "symbol": { &...
pomodoro's user avatar
2 votes
1 answer
42 views

How do I rate limit and explicitly perform a JSON-RPC batch request?

I noticed in the library README for the experimental web3.js SDK that two of the motivations for the API design are: Solana developer ‘epicfaace’ wanted first-class support for automatic time-...
lithdew's user avatar
  • 21
2 votes
1 answer
118 views

Creating a lookup table with web3.js

I'm running into an error with transactions overruning UInt8Array buffer, and I see that I need to save space using versioned transactions and address lookup tables. How can I create one using the @...
C.G.A's user avatar
  • 23
2 votes
1 answer
98 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 ...
Golden's user avatar
  • 51
0 votes
1 answer
80 views

How to build on-chain Solana trading bot

Can you help me figure out how can I build an on-chain trading bot for trading tokens launched on the Solana Blockchain? Just need step by step guidance or resources to start. Thanks for your response....
Abdullah Umar's user avatar
1 vote
1 answer
112 views

Decoding solana transaction data

I am currently trying to figure out how to decode data from a transaction instruction, but whatever i try it doesn't work. Example data base58: ...
DannySorost's user avatar
0 votes
0 answers
31 views

i'm confused how did solana wallet works am I doing this right?

this is SolanaProvider.js import { Provider } from '@modules/core/provider/base/Provider'; import axios from 'axios'; import {Connection, PublicKey, clusterApiUrl, Transaction, SystemProgram, ...
sulthan's user avatar
1 vote
1 answer
88 views

Streaming pending transactions

How can you stream pending transactions for a specific mint adress? I want to monitor pending transactions with datas like adress, amount, confirmations. etc . In python or js . I imported solders for ...
justit's user avatar
  • 11
1 vote
1 answer
19 views

Error Message: A seeds constraint was violated. The ts client does not correspond to the pda of the Solana program

Issue I encountered a strange issue where the PDA found using findProgramAddressSync in the TypeScript client does not match the PDA found in the Solana program instruction account structure, despite ...
jin yang's user avatar
2 votes
1 answer
170 views

solana/web3.js Request Airdrop 429 error

I am trying to request an airdrop on the Solana testnet using the @solana/web3.js library in my Node.js application. However, I am encountering the following error: Wallet balance is 0 Server ...
sonic42hedgehog's user avatar
2 votes
1 answer
33 views

Initiate by signing Solana Transaction through EVM provider

The purpose of this is to send transaction on solana network by signing it from EVM provider. We have user's wallet which has Ethereum Provider, Ethers Provider or Web3 Provider. The code is given ...
Ali Rizvi's user avatar

1
2 3 4 5
19