Questions tagged [solana-web3js]

322 questions
4
votes
2 answers

How to decode base58 solana transaction info?

I am using solana API and as response from getTransaction function I get some data. Generally speaking, I am interested in data filed. Documentation says: data: - The program input data encoded in a base-58 string. And here is the problem, I…
dokichan
  • 857
  • 2
  • 11
  • 44
4
votes
1 answer

Debugging "Transaction simulation failed" when sending program instruction (Solana Solidity)

When attempting to make a call to a program compiled with @solana/solidity, I'm getting the following error: Transaction simulation failed: Error processing Instruction 0: Program failed to complete Program…
Robert May
  • 799
  • 6
  • 13
4
votes
1 answer

Uncaught (in promise) Error: Transaction fee payer required

I get this error when I try to execute this using phantom wallet and react app const transferTransaction = new Transaction() .add(SystemProgram.transfer({ fromPubkey: alice.publicKey, toPubkey: feePayer.publicKey, lamports:…
Amir Alam
  • 155
  • 1
  • 12
4
votes
4 answers

Blockhash not found when sending transaction

When sending a transaction using Solana web3, it sometimes shows this error: Error: failed to send transaction: Transaction simulation failed: Blockhash not found What is the proper way of dealing with this error other than retrying for x amount of…
4
votes
2 answers

Solana: Get Candy Machine info from a NFT token using Js

I am trying to find out what is the candy machine id or address for a specific nft. So far I have tried looping through wallet accounts using @solana/web3.js const tokenAccounts = await connection .getParsedTokenAccountsByOwner(publicKey, { …
Eduardo
  • 1,781
  • 3
  • 26
  • 61
3
votes
2 answers

Estimate gas cost for transaction to custom Solana Program written with Anchor

How can I get a gasFee estimate for a transaction of my custom contract? For a normal transaction execution from the SPL library I can do so like this: import { Transaction } from '@solana/web3.js'; const transaction = new Transaction({ …
Milkncookiez
  • 6,817
  • 10
  • 57
  • 96
3
votes
2 answers

What is an epoch in solana?

I am new to the solana and exploring the web3js part for solana. I came across the term "epoch". I know what the epoch is which we normally use for timestamp. But in solana, the definition of epoch is quite different. I read the official…
3
votes
1 answer

How to get a user's keypair from their public key only (Solana)?

I'm making a dApp and I want to add a button where a user (the one with their wallet connected) can send exactly 0.01 SOL to another user. I already wrote the function in my Rust program and after testing it with anchor test it seems to be working…
3
votes
1 answer

How can I confirm if a transaction has happened on Solana using the transaction hash (signature)

The confirmTransaction method is being deprecated. Instead there's a sendandconfirmtransaction method but that is not available on the connection object, so I can't use for transactions that are to be signed using phantom. I have a transaction…
3
votes
2 answers

Uncaught (in promise) ReferenceError: Buffer is not defined. Using Phantom Wallet, Solana and React to make a transaction

I created a simple CRA app to figure out how to use the Phantom wallet to make Solana transactions(I still don't know If that is even possible). I referenced two Stackoverflow questions source and source and came up with a somewhat working code as…
3
votes
3 answers

Weird Typescript Bug: Imports dependency not top level module

Trying to transfer a custom token from one account to the other using this guide. For some reason I'm getting four errors on all the imports from the @solana/spl-token package. I've tried deleting the node-modules folder and rerunning npm install…
JoeVictor
  • 1,806
  • 1
  • 17
  • 38
3
votes
1 answer

Metaplex and Solana Web3.js dependency conflict (React)

I am developing a React app, and I have code from two different applications I wrote: Application A uses Metaplex to find all the NFTs owned by a user (wallet address): import { Connection as MetaConnection } from "@metaplex/js/"; import { Metadata,…
vikingsteve
  • 38,481
  • 23
  • 112
  • 156
3
votes
1 answer

Error: 403 Forbidden: Call type exceeds Solana 1.9.13 version limit for max account size

I am trying to get minted editions of a collection, by using the accepted answer of this post below: How to find all NFTs minted from a v2 candy machine However when I try to query, I am getting the error as per the title: Error: 403 Forbidden: Call…
3
votes
1 answer

solana web3 API: how to obtain data created with splToken.createTransferInstruction()

Would appreciate guidance on how to obtain the data back in the variables, which was entered into splToken.createTransferInstruction(), step-by-step, from the buffer variable in the code snippet below: var transaction = new web3.Transaction(); …
3
votes
1 answer

solana getParsedProgramAccounts 410 gone?

i have a code that was working very well, and suddenly, this rpc call is not working anymore. I'm on the mainnet api, it looks like they have disabled this rpc call, because i have now a result with error "410 gone" BTW : i tried serum api also but…
1
2
3
21 22