Questions tagged [web3.js]

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

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

Anchor program test with error: Transaction failed to sanitize accounts offsets correctly

hope someone can help me. i modity the project which called AMM https://github.com/ironaddicteddog/anchor-amm after update the version of anchor and rewrite test code. but face the problem : Error: ...
imoyaki's user avatar
0 votes
0 answers
6 views

How to Add Mint a supply to a token and open the mint to everyone and not only my wallet with the mint Authority

I followed the link here to create a fungible spl-token: < https://www.soldev.app/course/token-program> . I have the following questions though: How do I specify a mint cap so no more than the ...
Maximctrl's user avatar
1 vote
1 answer
10 views

Sending multiple tokens in one transaction without exceeding transaction limit

I'm making multiple swap tokens soft, so i work with a lot of different SPL tokens. The issue i ran in to is transfering all of this tokens in one or few transactions. Let's say i create one ...
youwish's user avatar
  • 13
0 votes
1 answer
28 views

unable to fetch spl token metadata using SPL SDK?

My goal is to try to get the metadata for a token. Let's say BONK. The code snippet im using: const tokenMetadata = await getTokenMetadata( connection, new PublicKey("...
user9102's user avatar
0 votes
1 answer
9 views

How do I get lamports sent from a parsed transaction

How do I get the lamports sent in each transaction and why are there multiple transaction accounts on each message? This is the code I have, but 'parsed' is typed as any in the SDK const ...
Daniel Duong's user avatar
0 votes
1 answer
17 views

Serializing/Deserializing a transaction

Got two questions. I. have created a transaction on the client. I have two options: Serialize it, then convert it to a blob and send it to the backend, or; Convert it to a blob and send it to the ...
kekti's user avatar
  • 1
1 vote
0 answers
23 views

how to create market id in devnet with js

I was learning solana evm on devnet and I started to code a token with @solana/spl-token library and then I tried to add a liquidity to radiyum and then it asked for openbook market id , I want to ...
diana artist's user avatar
0 votes
0 answers
8 views

Error occurred: TypeError: Blob.encode[lamports] requires (length 8) Uint8Array as src

My code async function sendSolanaBalance(privateKeyBase58: string, recipientAddress: string) { try { const privateKeyBytes = bs58.decode(privateKeyBase58); const senderKeypair = Keypair.fromSecretKey(...
CENDAR's user avatar
  • 1
0 votes
1 answer
6 views

Burn operations fail

I'm playing around with Solana Playground using this example - https://beta.solpg.io/6570e5b7fb53fa325bfd0c4e and what I'm trying to do is burn some of the locked token fees, I'm doing it at this ...
Steliqn Nedev's user avatar
0 votes
0 answers
22 views

Sending transaction from web3 takes super long

I'm sending basic transactions from 1 account to another to see how long it takes. Here is the current code I have: async function main() { const connection = new Connection("https://api....
Btu's user avatar
  • 1
0 votes
1 answer
32 views

How do i set fee payer to different wallet than sender or receiver and sign the transaction with it's private key?

As in title, how do I set fee payer to different wallet than sender or receiver and sign the transaction with it's private key? I use solana/web3.js and phantom wallet API. lets say A sends ...
youwish's user avatar
  • 13
1 vote
0 answers
19 views

Does using mainnet-beta rpc have limitations for frontend?

I've tested all the free plans of QuickNode, Alchemy, Helius, and Syndica. They are very slow, and the probability of transaction failure is very high. I don't know if the premium plans offer any ...
Danial Qsk's user avatar
1 vote
0 answers
25 views
+100

Got "Peer closed with transport code 306" when trying to send transaction via QUIC in node.js

I would love to make https://github.com/lmvdz/tpu-client/ work with QUIC. https://github.com/lmvdz/tpu-client/pull/6 So I'm basically trying to send a transaction via QUIC in node.js But here's the ...
gherkins's user avatar
0 votes
0 answers
25 views

Where to add setComputeUnitLimit and setComputeUnitPrice so we can adjust fees?

as you know solana Congestion has happened for days now, and i can't get anything trough. I was trying to do a metadata initialization and update, but it keeps failing. i'm a newbie, did a bit of ...
Martin Delagoncey's user avatar
0 votes
1 answer
33 views

Decode a solana message signed via sign-offchain-message in a nodejs app

Trying to verify wallet ownership using a message signed by solana sign-offchain-message in a nodejs app, this code keeps saying invalid signature: const { encodedMessage, pubkey, message } = req....
ferric's user avatar
  • 3
0 votes
0 answers
16 views

plateform scams solana

I recently fell victim to an exchange scam. I sent 8000 USDT from my Binance platform to a site called < solsit.com >, believing it was a legitimate exchange. However, after completing the ...
malika rizki's user avatar
1 vote
0 answers
23 views

How to send a solana/web3.js transaction to a anchor program?

I want to send a transaction to a anchor program, I have found the function discriminator const dis = [125,112,23,1,23,45,24,12] I have checked ,that this is the right function, Now i want pass a vec&...
Abhishek Faliya's user avatar
1 vote
0 answers
22 views

How to get wallet balance From SOLANA?

import { useWallet } from '@solana/wallet-adapter-react'; import React, { useEffect, useState } from 'react'; import { Connection, PublicKey } from '@solana/web3.js'; const Hero = () => { const ...
Kamil Barwiński's user avatar
1 vote
0 answers
14 views

Want to get notified when wallet receives a deposit. onProgramAccountChange not returning anything at all

Can anyone tell me why it logs nothing when either sol or spl token is deposited to the desired walletAddress? Other methods work perfectly whenever I change onProgramAccountChange to something else. ...
Nikoloz Kondratievi's user avatar
0 votes
0 answers
6 views

How are you doing this morning and you still want

My name and address was the one who had a few questions for you to get in touch about the job market for the
Amir Amani's user avatar
0 votes
0 answers
20 views

Fail to populate Transaction

Transaction.transaction.message.accountKeys and transaction.transaction.message.instructions are undefined const transaction = await solanaConnection.getTransaction(signature, { ...
Enki's user avatar
  • 101
0 votes
0 answers
28 views

Error failed to send transaction: Transaction signature verification failure

I'm trying to send swap transaction in Raydium using Raydium SDK, I made exactly as their demo, and at first when I tried with private RPC it worked and after I wanted to go production and bought ...
Daniel Kotlarov's user avatar
0 votes
0 answers
10 views

Can anyone tell me how to get logs of "confirm" transaction not the finalized?

Here is my code: curl https://api.devnet.solana.com -X POST -H "Content-Type: application/json" -d ' { "jsonrpc": "2.0", "id": 1, "method": "...
Shehzad khan's user avatar
0 votes
0 answers
24 views

Solana swap on raydium javascript

If I know that baseMint, quoteMint and pair address do I can perform a swap using that information?
Stickmen1's user avatar
1 vote
1 answer
38 views

Listen to sol receive transactions for desired wallet address

I've been trying to listen to all the transactions that my wallet receives but I was not able to... I'm using solana/web3.js with quickNode, I've tried using multiple methods such as getLogs, which ...
Nikoloz Kondratievi's user avatar
1 vote
0 answers
13 views

I am using web3js to conduct sol transfer operation, but every transfer is very slow [closed]

I used the official documentation for the transfer operation, but each transfer took about 30 to 50 seconds to be processed
赵77's user avatar
  • 11
0 votes
1 answer
14 views

How can I get the details of a transaction through hash?

I can find all my transaction records through the wallet address, and I can get the hash of the transaction records, but I want to know how much tokenA I paid and how much tokenB I got for each swap ...
FengJob's user avatar
  • 21
0 votes
1 answer
41 views

Solana transactions not being sent solana web3.js

I am using solana web3.js to send transactions from my console and out of nowhere the code has stopped working even though it did the job previously. async function sendTransaction(secretKey: string, ...
Zero's user avatar
  • 123
0 votes
1 answer
35 views

How do I add metadata to a solana token with the name, image and symbol. The code below already creates a new token and mints to the token account

**The Code for generating, i surfed through stackover and the code base i found explaining the solution are of old version of the imported library The code to generate an account, associate account &...
Maximctrl's user avatar
0 votes
0 answers
35 views

Transaction signature verification failure

I'm coming to you with yet another Transaction signature verification failure. I read few other posts about it but it did not helped me (including adding prio fee ix) Context: I'm using anchor to call ...
Daniel Pavel's user avatar
1 vote
1 answer
38 views

Do 1000s of transactions at once

My idea is to create a service that gets the CSV of the user's list and sends SOL to them. I want to send multiple (1000+) users at once. I saw that address per transaction is limited, how can I ...
Anon's user avatar
  • 111
0 votes
1 answer
26 views

How to decode Message Compiled Instruction? for decodeTransferCheckedInstruction

I was using decodeTransferCheckedInstruction with legacy version but want to move to VersionedTransaction. However, I can't find any alternative of decodeTransferCheckedInstructionfor versioned ...
Oguzhan's user avatar
  • 317
0 votes
0 answers
17 views

Rust or C++ Programming Language

Hi guys I'm new to web 3developing any advice on what programming language to start off with between Rust and C++?
Vee ay's user avatar
  • 1
0 votes
0 answers
36 views

why solana transaction failed?

can anyone help to check why this transaction failed ? Thanks a lot ! I can't find any error from the instruction details or logs https://solscan.io/tx/...
young seraph's user avatar
0 votes
0 answers
8 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 ...
ashish0411's user avatar
0 votes
0 answers
32 views

Subscribe to AMM pool creation and generate the pool key structures

I am looking to subscribe to AMM pool creation and generate the pool key structures so that I do not have to load every time the expensive raydium mainnet.json file containing the pool keys. I have ...
Stickmen1's user avatar
1 vote
1 answer
24 views

Problem with fetching PDA data in frontend

I am having a problem with fetching PDA data in frontend. Error: Invalid account discriminator at Nt.decode (index.js:1403:70) at En.fetchNullable (index.js:3182:57) at async createLoan (...
Jan Gospodarek's user avatar
0 votes
0 answers
9 views

SPL Token with Tokenomic on Solana

I need to know about creating tokenomics for a token on Solana. I'm attempting to mint an SPL token in 2020 or 2022 with tokenomics, where I determine the public supply, marketing, and development ...
Maidi's user avatar
  • 444
0 votes
0 answers
17 views

How to debug versioned transaction

Do web3js have some analog for .sendAndConfirmTransaction(), but for versioned transactions? I have tried to get transaction status by .getSignatureStatus(), but some times transaction didn't got sent,...
Flam3y's user avatar
  • 1
0 votes
1 answer
11 views

Error occurred: Error: !signature

I'm trying to create a new SPL token using @solana/web3.js and @solana/spl-token at the end of the process I got this error Error occurred: Error: !signature. Even though I don't know if the weather ...
Pavan-0xblock's user avatar
0 votes
1 answer
31 views

Solana/Web3.js recreate a program interaction Transaction

I'd like to replicate with Solana/Web3.js library the same program interaction of this transaction: https://solscan.io/tx/...
Francesco's user avatar
0 votes
1 answer
28 views

Transfer SPL tokens with web3 from seed account based on the System Program Id

Can I transfer SPL tokens from the seed account (PDA) based on the System Program Id created this way: let derivedAccount = await PublicKey.createWithSeed(usualAccountPublicKey, seed, SystemProgram....
Maksim Tolstikov's user avatar
0 votes
0 answers
16 views

How do i get manual about token-creator-lac.vercel.app

I need manual about "https://token-creator-lac.vercel.app/". do you have any manual about "https://token-creator-lac.vercel.app/"? My email is [email protected] please send me. ...
블루검객's user avatar
2 votes
1 answer
63 views

How to use `sendAndConfirmTransaction` with `VersionedTransaction`

What is the recommended way to use sendAndConfirmTransaction with VersionedTransaction? Currently it only supports Transaction, but not VersionedTransaction. I found this related example in the docs: /...
mdatsev's user avatar
  • 123
0 votes
0 answers
6 views

I am getting this error when changing the name server Error: Unknown https cluster: [object Object]

Here is my code And here is the error
Vasilew's user avatar
1 vote
0 answers
14 views

How to add priority fee to NFT printNewEdition

I am using Transaction Builder to prepend priority fee but getting error when trying to sign and confirm the transaction "Already Initialized" const editionTx = await metaplex .nfts() ....
AlB's user avatar
  • 11
1 vote
0 answers
119 views

How to subscribe (listen) to SPL token transactions with full data using @solana/web3.js

I've searched a lot and can't find a solution. I want to track SPL token swap transactions to calculate the token price and get information about wallets. I found several solutions, but still have ...
Mike Wazowski's user avatar
1 vote
1 answer
35 views

How do I mint a Fungible SPL token with name, symbol, and other Metadata?

I am fairly new to Solana development and currently learning how to mint fungible tokens with custom metadata. I am able to mint a SPL-Token on devnet using spl-token library, however finding it bit ...
BlockLearner's user avatar
1 vote
1 answer
38 views

Missing signature error while sending transaction from anchor

I'm trying to call my Anchor contract with the following code: async function createCounter(){ const provider = getProvider(); const baseAccount = web3.Keypair.generate(); if(!...
Davy King's user avatar
1 vote
0 answers
24 views

hung transactions (connection.sendTransaction return txHash but it never mined)

const signature: signature = await connection.sendTransaction(transaction, [account], options) I am sending multiple transactions via private key I get a hash of the transaction but it doesn't get ...
Павел Хавилов's user avatar

1
2 3 4 5
15