Questions tagged [solana-transaction-instruction]

66 questions
1
vote
1 answer

Is it possible to transfer tokens to account declared in remaining accounts?

Try to transfer tokens to one of the account declared in remaining_accounts list. Here's the way I create CpiContext: let cpi_context = CpiContext::new(ctx.accounts.token_program.to_account_info(), Transfer { from:…
1
vote
1 answer

How to use zero_copy with anchor in Solana PDAs

I'm building on Solana and need some PDAs to store my program state. The default with anchor is constantly serialize/deserialize the accounts, even when just passing the address into instructions, which crushes BPM's 4k stack limit REALLY soon for…
1
vote
1 answer

Solana transaction using python

I am trying to make a transaction using python in the Solana network, I am using solana.py python library and anchor.py, but I am unable to identify how to open the wallet for signing the transaction
1
vote
1 answer

Where is the documentation for transaction specification in Solana for JSON RPC API?

I need to submit transactions from a server program to Solana blockchain for processing. My programs is not JavaScript, therefore, I cannot use web3js. I use the JSON RPC API…
1
vote
0 answers

SOLANA Rent and Rent Exemption | Which accounts they are taking rent from

Hi I'm new to SOLANA Blockchain , While gazing through the charges inside Solana, I found there is a fee associated with transaction like , minting tokens , transferring them , creating token accounts etc.. But there is another charge called Rent…
1
vote
0 answers

How to get the last NFT minted on candy machine

After a user mints an nft, I want to get the token address or metadata and display it. I'm using the Candy machine's ui from Metaplex They're using the mintOneToken function and it only returns a confirmation code, and that's not helpful. const…
1
vote
2 answers

Solana: Computational budget exceeded

I am using the Saber deposit instruction on devnet. Yesterday, my code was working perfectly fine. Today, I reran some of the instructions, and I am getting the error Computational budget exceeded all of a sudden. Did something on devnet change? I…
1
vote
1 answer

Solana. Not matched transfer amount and target account balance change

I sent transaction transferring 3000 lamports, but target account balance was increased for 2954 lamports. Link to transaction:…
1
vote
1 answer

Solana: Can't make createAccount work, createAccountWithSeed works

I am currently trying to learn on writing programs for Solana and interacting with those. I am using the example-helloworld code. In order to interact with the helloworld program, the nodejs code creates an account with seed: const transaction = new…
1
vote
1 answer

Calling solana (anchor) program . No Errors, But lamports not transferring between accounts as requested

My code runs fine when using bump + seeds. All tests are passing. But Please see below the code of a Crowdfunding campaign, created using Anchor. The problem is that I have to use 'invoke' inside my donate function in order to transfer funds from…
1
vote
0 answers

Signature verification failed When transferring spl-token to user connected phantom wallet

bs58.decode( "2YQDdnfxiHPKu9GypLX1yXaQTQojvDSPgFkDxrU********************************************" ) const mintPubkey = "A8SJfwzKJAaMrY6Lb*************************"; const getProvider = async () => { // opens…
1
vote
1 answer

How do you decode a Solana instruction in Python like solscan.io does?

Looking at this transaction for example: https://solscan.io/tx/4oQceeLgtDyHcrhStHsSKXGbC3QAF7CHrtUpeJTuthxuX1uTz3M3NYLsv3RiJ5caJ3yfneAYQ5VqAdQ3ebc8wH1A Solscan is able to decode the instructions, e.g. #11 "Side". In an EVM chain this isn't as…
FinDev
  • 4,437
  • 6
  • 29
  • 29
0
votes
0 answers

Solana "Signature Verification Failed"

Need a bit of help I've been trying to complete a "cancel sell" operation using the instructions gotten from the magicEden Api But the problem I keep facing is after signing the transaction At the point of serializing It returns "signature…
0
votes
0 answers

Instruction to transfer whole token balance

As token accounts can only be closed when the non-SOL token balance is 0 I'd like to add a prior instruction to transfer all remaining tokens to a certain account. The problem I am facing is that a prior instruction transfers x tokens to the…
0
votes
0 answers

Got error "Cross-program invocation with unauthorized signer or writable account"

I'm new in Solana and tries to reassign account's owner. I do next: Deploy program Create account with owner = program deployed id Call program, which change owner But on step 3 I got error: SendTransactionError: failed to send transaction:…