Questions tagged [solana-transaction-instruction]

66 questions
0
votes
0 answers

Can't invoke method with phantom provider

I'm trying to create a transaction then use phantom provider to let the user sign and send the transaction. this is how my transaction is constructed: if (method === 'sol'){ const amount = sol_dict[req.body.rank]; const lamports…
0
votes
1 answer

How can we Wrap and Unwrap SOL using the Solana Web3 TS/JS library?

Using Solana Web3 TS library how can we wrap and unwrap SOL? Here on this link it is possible to see what the SPL Token CLI program does for wrapping and unwrapping SOL, but the conversion of those methods to TypesScript is not straightforward. How…
0
votes
1 answer

SendTransactionError: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0x3f

I'm trying to update metadata (logo, name) of solana token I have created. It is just for learning, nothing commercial. Here is try catch that throws error: try { const txid = await web3.sendAndConfirmTransaction(connection, tx,…
0
votes
0 answers

Nextjs. Solana. Phantom - RPC Error: Something went wrong. code: -32603

Can someone help me? I did create Next js project with Solana transactions by Phantom I use @solana/wallet-adapter-react for connection and functional in client side. Transactions are created in server side and are absolutely valid. The essence…
0
votes
0 answers

Transfer Solana on smart contract

I have a question In the smart contract that I am developing, I am having difficulty developing the payment functions. I would like to make it so that a user A can for example send 1 solana to user B through the smart contract. USER A <===> SMART…
0
votes
0 answers

Error code 3012 when trying to transfer WSOL to SPL token like ETH with Phantom

The error message says "The program expected this account to be already initialized." This error occurs on Jupiter Exchange when trying to transfer WSOL to a token like ETH, but the error does not occur when transferring SOL to the same token (when…
0
votes
1 answer

Solana web3 , Solana Transaction instruction

How to decode the transaction instruction of Solana. Is there any method to decode the instruction? I want to know which function is called and what value has been passed to the function of the confirm transaction. { accounts: [ PublicKey { …
0
votes
1 answer

Solana can't mint to a different token account

Folks, I'm starting with Solana and it's been rough to learn. Despite the poor error messages and the learning curve of Rust, I'm making my way through it. I'm trying to develop a new token that will be a fungible asset (0 decimals, supply greater…
0
votes
0 answers

How to send transaction on solana?

So I literally copied from (https://docs.solana.com/developing/clients/javascript-api) I need to send a transaction from one wallet to another, easy right? But this doest work here error Specifically, the transfer method cannot create an…
0
votes
0 answers

Solana: Error processing Instruction 0: Cross-program invocation with unauthorized signer or writable account, Transfer sol to wallet without pri key

I am trying to implement Program Flow of a bet game in solana with following features: A Player transfers some amount to house wallet (deposit_wallet) and plays a game System records the win loss net balance in a player specific PDA account…
0
votes
1 answer

how can i allocate more space into Solana program in order to upgrade?

When i try to upgrade a solana program on mainnet using buffer, it has limits because when you deploy a program on Solana, the amount of space allocated for that program is 2x the original program size. so in each upgrade we need more space in the…
0
votes
1 answer

Validate the integrity of the solana program request content

Suppose I have a simple web UI to connect wallet and click a button to invoke a solana program transaction. Since the call is happening actually on user’s host machine/the browser, it's possible somehow the sol smart contract request metadata can be…
0
votes
2 answers

Is it possible to continue a computation in a Solana smart-contract beyond the compute budget?

I've been trying to figure out if it's at all possible to create a smart contract in Solana that will run a long-ish calculation (e.g. many sha256 iterations, or a KDF), maybe in parts, even though the calculation as a whole is obviously longer than…
0
votes
0 answers

How to create solana transaction from data array in js?

Using an API I get the tx data needed to send a transaction to buy a NFT, and I have to turn that transaction data array into a Transaction, I tried using new solanaWeb3.Transaction().from() but I get a "Function not defined" error, any help? I use…
0
votes
1 answer

Closing and reopening an ATA that has delegated authority

Tldr; If I close an ATA with delegated authority, and reopen it, will it still have delegated authority? Further details: I’m trying to help someone who has been the victim of an NFT scam. As a result of the scam, all of his ATAs now have as…