Questions tagged [solana-transaction-instruction]

66 questions
6
votes
1 answer

How to transfer (using Program instructions) custom SPL token from my own account to another user's wallet?

This is my situation: I have created a wallet solana-keygen new I have created my own custom SPL Token spl-token create-token Then I created an Account for this SPL Token spl-token create-account The SPL token is now in my wallet A In the…
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
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

Error while sending Serum DEX make new order instruction (makeNewOrderV3Instruction) on Solana

I'm trying to make an order request on Serum DEX V3: tx.add(market.makeNewOrderV3Instruction( { owner, payer, side: 'buy', price, size, orderType: 'ioc', selfTradeBehavior: 'decrementTake' })); and then later: await…
2
votes
2 answers

How to get Solana transaction data from transaction object

I'm doing a simple transaction with a single transfer instruction for 0,1 SOL from one account to another. Then I want to get the transaction data and use it to verify the data it carries - in this case that a transfer has been made for 0,1 SOL. I…
Milkncookiez
  • 6,817
  • 10
  • 57
  • 96
2
votes
0 answers

Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: invalid account data for instruction

i was trying to transfer sol from programmatically created wallet to user wallet(withdraw operation).i read documents saying that pda accounts should be create .i created one with my limited knowledge but encountered this error my rust code for pda…
2
votes
1 answer

Solana CPI Invocation Error. Error: Error processing Instruction 0: Cross-program invocation with unauthorised signer or writable account

I have basically converted a Crowd Funding Campaign written in Native Rust (Solana CLI) into an Anchor Version. So my tests are running fine except the donation test. Please if some Solana super shadowy dev can help me figure this out, I shall be…
2
votes
0 answers

Transfer NFT using Token.createTransferInstruction

We have a transaction that transfers SOL & an NFT from the wallet's owner to our wallet. The transaction contains simple instructions: Token.createAssociatedTokenAccountInstruction Conditionnal, depending on the destination (our…
1
vote
0 answers

How to close and transfer all SOL balance programatically without reserving the rent?

I have a Solana account A which is a fee payer, and another Solana account B with some SOL balance, I want to close and transfer all account B's SOL balance to another account C. How do I do that? I saw the following error: SendTransactionError:…
1
vote
1 answer

Error when try to run the command "npm run start-solana-main" to run on solana CLI

I have deployed my contract on the Solana mainnet and when I run npm run start-solana-main The server started running successfully but when I post a file to the service, it shows me error that The declared program id does not matched the actual…
1
vote
1 answer

Transaction with "SystemProgram.createAccount" results in "Error: Signature verification failed at Transaction.serialize"

What I'm tryding to achieve is a webpage on which the user connects its phantom wallet and then by a simple press of a button creates a token. In order to achieve that, I created a simple transaction for now which creates an account for the future…
1
vote
1 answer

`Err` value: TransactionError(InstructionError(0, ProgramFailedToComplete))'

I am trying to transfer some spl tokens from one account to another. The account's authority is a PDA of the program: if source_account.amount > 0 { invoke_signed( &spl_token::instruction::transfer( …
LUK3ARK
  • 11
  • 1
1
vote
1 answer

TransactionExpiredBlockheightExceededError - how should we handle this on the front-end

I am getting an error message when creating a signature Error: TransactionExpiredBlockheightExceededError: Signature 2XqzFuyv5YWpDPTT87CVu48QJPemGSu5rbCazrNBgY6D3mS8rugKugtzXDGpN6XZF8FPyWwXQvzfm4ZyMx6gTf6j has expired: block height…
1
vote
2 answers

Can I transfer SOL from a PDA Account to another normal account in solana?

I have tried sending sol token from my pda account to another account **pdaaccount.to_account_info().try_borrow_mut_lamports()? -= 12000; **receiver.to_account_info().try_borrow_mut_lamports()? += 12000; This only works if the account…
1
vote
1 answer

Sign the payer of the transaction through an API

What I would like to achieve is to make the user use the solana program for "free" and make the company pay for the transaction, what I have in mind is: Extrapolate the transaction in the frontend Send it to my backend server through an api Use the…
1
2 3 4 5