Skip to main content

Questions tagged [instructions]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
38 views

Adding Instruction to Compiled instruction in Python

I'm working with python and have a versioned transaction where the instructions are compiled. To that versioned transaction I need to add a NON compiled instruction somehow. If the transaction is ...
Milan's user avatar
  • 1
0 votes
0 answers
12 views

how to write spl-associated-token-account this kinda instruction by solana/web3js?

https://solscan.io/tx/4s48QaCiKj6PwdCH1QjgAEfpoWFNEjv84puH8KMYxvHGqyxiCTMzmzVHafhqx8KW9ATXBhki5vXjGukrY5Z1kMPB this tx assign a new generate account to a program and create a token account under this ...
noel yous's user avatar
0 votes
1 answer
35 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
0 votes
1 answer
29 views

Solana Token Extensions to Modify Transaction

Regarding token extensions: https://cdn.builder.io/o/assets%2Fce0c7323a97a4d91bd0baa7490ec9139%2F83c26b9268f64400b8eb67442579a31a?alt=media&token=525415b0-d3ea-48d7-83d6-0fb0d9e522c6 "...
Drew R's user avatar
  • 21
0 votes
1 answer
39 views

Certain instructions seem to be untraceable

I have a anchor contract with a couple instructions inside. The first instruction is from the user to a PDA account let transfer_instruction: Instruction = system_instruction::transfer(user.key, ...
ZeroNine's user avatar
  • 473
0 votes
1 answer
45 views

Will inner instructions always contain them all?

I'm basically trying to work out if there's any limit to inner instructions that would limit how much I can rely on them for understanding a transaction. I understand from the docs that a list of them ...
Callum M's user avatar
  • 2,920
0 votes
1 answer
143 views

Parsing instructions in Rust

I'm exploring a service called Streaming Fast that parses instruction data by program ID. I'm currently listening to the Stake11111111111111111111111111111111111111 program id and I see: { "...
AceGravity's user avatar
0 votes
1 answer
95 views

what the numbers in the array indicate?

I work with decoding data. I use the @solana/spl-token package for that. sometimes I get the TokenInvalidInstructionKeysError error I have this code ts. as keys I provide an array of keys that I have ...
slntrx's user avatar
  • 107
1 vote
1 answer
49 views

Token Transfer instruction in transaction not returning SPL token

When parsing some transactions for the token transfers instructions, I noticed some token transfer instruction does not include the actual token mint, but has an amount, what are the possible reasons ...
user3966's user avatar
0 votes
2 answers
396 views

Issue with .env file

I'm just beginning to learn and I'm using the SolDev bootcamp however, I've found an issue where I get this error message, PS C:\Users\Student\Documents\Solana_Web3\generate-keypair> npx esrun ...
johnny's user avatar
  • 69
1 vote
0 answers
56 views

How does stack_height work on inner instructions for older transactions?

Should stack_height be included in old transactions, if possible? Or is this feature only available for transactions after it went live? This transaction, for example, has them marked as null https://...
Bosris's user avatar
  • 11
1 vote
1 answer
52 views

How to Handle Shared Accounts for Deposits

So I'm designing a dapp that'll utilize a single account that I want to serve as a pot that all players can deposit SOL into and the winner can claim the entire pot. However, I know there will be ...
Brian M.'s user avatar
  • 111
4 votes
1 answer
591 views

The most time-efficient way to set slippage before swapping

I have the following python code to perform a swap on RAYDIUM: def make_swap_instruction( self, amount_in: int, token_account_in: PublicKey, token_account_out: ...
modalxx's user avatar
  • 43
0 votes
1 answer
42 views

Just starting on Solana and would greatly appreciate any tips!(:

I am just starting with Solana and if anyone could give me any pointers or some sort or direction that would be greatly appreciated!
Poseidon's user avatar
0 votes
1 answer
619 views

How to parse the inner instructions of the transaction's instruction?

Its parsing only transaction instructions, but not inner. import { PublicKey, Connection, LAMPORTS_PER_SOL } from "@solana/web3.js"; import { SolanaParser } from "@debridge-finance/...
omm's user avatar
  • 27
1 vote
1 answer
535 views

How to decode base64 response?

Req: { "method": "getMultipleAccounts", "jsonrpc": "2.0", "params": [ [ "...
omm's user avatar
  • 27
0 votes
0 answers
23 views

Call Instructions Anchor IDL error address not inicialized

I am trying to replicate some calls to an Anchor IDL of a contract. And all the instructions work for me, but the most important one doesn't. And I have a couple of doubts, comparing my calls with the ...
Victor Maldonado's user avatar
0 votes
1 answer
77 views

Getting different Buffers in Solana transactions. The front-end and back-end transactions are different

I have a Solana dApp that requests tokens from a wallet that I own. When the user try to claim the Tokens, one transaction is created on the frontend and signed by the user; the signature is coded and ...
ZuckOFB's user avatar
0 votes
3 answers
711 views

How to create a metadata account with python?

Original Question I would like to write a python script that can create tokens. Since the Metaplex Python API seems outdated and only targeted to NFTs, I decided to do it myself. With the help of the (...
KingKevin23's user avatar
1 vote
1 answer
135 views

How to create, sign and send transaction to Magiceden program

I have Magiceden API bearer token and using the buyNow endpoint Which return Buffer data as in the picture. I tried to create the Transaction like this: const transactionME = Transaction.from(Buffer....
CryptoTioSam's user avatar
2 votes
2 answers
23 views

Does there exist a practical application of calling a program with neither instruction data nor a list of accounts?

Each instruction in a transaction can include: The address of a program to invoke A list of accounts the program can access during its execution A byte buffer of instruction data Can you give an ...
steveluscher's user avatar
  • 2,405
0 votes
0 answers
152 views

Transaction simulation failed: Error processing Instruction 1: custom program error: 0xbbf

I get the following error when trying to execute an instruction: Transaction simulation failed: Error processing Instruction 1: custom program error: 0xbbf This is the account: #[derive(Accounts)] pub ...
Adrian Covaci's user avatar
0 votes
1 answer
85 views

How can a system transfer instruction not result in a corresponding balance change?

I found a mainnet transaction with an inner system transfer instruction which does not seem to create a corresponding SOL balance change. The inner system transafer is transfering 0.001 SOL from ...
Alon's user avatar
  • 103
2 votes
2 answers
529 views

How to obtain transaction innerInstructions as Explorer shows?

I'm a bit confused about additional info in transaction. I need to parse it and handle information from the instruction, but i can't. And what confusing me more - explorer. Explorer knows everything. ...
LizardDog's user avatar
1 vote
1 answer
142 views

Anchor: How to know instruction number without having to run "cargo expand"?

I have a Tic Tac Toe game contract which looks like this: #[program] pub mod tic_tac_toe { use super::*; pub fn start_game(ctx: Context<StartGame>) -> Result<()> { ...
Sasha Shpota's user avatar
1 vote
2 answers
57 views

Find collection in a Sharky offer loan transaction

I'm trying to analyze a transaction for the NFT Lending protocol Sharky.fi. This txn for example : Cm4pCJFCKQzmtuZ254itotMokhK8X6zs7YfeWKYE6i8kpaowZ3XzUPWJbhvvcoZ6KxULP79PEBy8A3P4nmPpkgg We have an ...
Oppty's user avatar
  • 21
5 votes
2 answers
419 views

Instruction order in a transaction

I'm currently exploring priority fee in Solana transaction, so I'm wondering should I add the setComputeUnitPrice as the first instruction or the order doesn't matter? Extending the concept, the order ...
vanderlinde's user avatar
5 votes
2 answers
2k views

What is the main function of setComputeUnitLimit? Can the instruction 1232 limit be expanded?

The transaction instruction length limit is 1232, can it be modified through setComputeUnitLimit? In what scenario is setComputeUnitLimit used?
ghost chen's user avatar
2 votes
1 answer
113 views

How do your retrieve nested CPI/Inner Instructions from web3.js?

From solana web3.js, it looks like it only shows 1 level deep of CPI. How would I get inner ix 2 in this example: tx: ix1: inner ix1: inner ix2: ix2: ... type ...
Mocha's user avatar
  • 83
1 vote
1 answer
609 views

Transaction simulation failed: Error processing Instruction 0: insufficient account keys for instruction

I cloned this repo: solana-movie-program and deployed it on Solana Playground. I also cloned solana-movie-client and tried it but I get the error: "Transaction simulation failed: Error processing ...
Lê Văn Thành's user avatar
5 votes
1 answer
109 views

Most impactful optimisations to improve transaction finality on solana?

I would like my application to have the transaction finality similar to "break" solana game. "break" does several optimisations to achieve the speeds it does as stated here - https:...
Shravan S's user avatar
2 votes
1 answer
550 views

Can I send the same transaction twice in the same block?

I am building a game and want to send multiple move transactions in quick succession. But when I do that I get two transactions with the same hash when the recent block hash didn't change yet and I ...
Jonas H.'s user avatar
  • 5,032
2 votes
1 answer
92 views

What is the size of Option<u64> in instruction data for an anchor program ix?

Assuming u64 is 8 bytes what is Option<u64>. How many bytes extra does Option add to the instruction data for an anchor program ix?
jac0xb.sol's user avatar
2 votes
1 answer
427 views

InvalidProgramId when passing the correct program id

I have a anchor program locally that runs perfectly with anchor typescript client, but while trying to access with rust's solana_client it throws this error: AnchorError caused by account: ...
Pedro's user avatar
  • 73
2 votes
1 answer
122 views

can i send identical transaction without api ME

Do I need to get instructions via the Magiceden api to send such a transaction solscanlink - link
plugarea's user avatar
5 votes
1 answer
68 views

Getting an IDLError when I try to create a vector of a defined Struct

I currently have defined a Ship struct in my backend code, as well as a Port struct which contains an attribute ships_berthed that is of type Vec. However, on my frontend (Svelte), when I try to call ...
Aengus's user avatar
  • 147
2 votes
1 answer
326 views

solana token program 0xc Invalid Instruction

I have recently begun getting the below error when running the createMint instruction from @solana/spl-token. To my knowledge, I have not changed any code or dependencies that would affect this. ...
austinmilt's user avatar
2 votes
2 answers
317 views

Can a mint's supply or decimals ever change?

I am building a data ingestion pipeline for solana blockchain data, and trying to determine whether it is safe for my processing pipeline to classify a given mint as an NFT based on whether the supply ...
Stephen Hawkins's user avatar
2 votes
1 answer
66 views

Implementation of AssignWithSeed?

I cant seem to understand how to change the ownership of a system owned account. How do I pass in new owner to the instruction?
Noe Trejo's user avatar
2 votes
2 answers
104 views

Multiple account creation in one transaction

When we create a Solana PDA we construct the instruction, sign it and then send the transaction to Solana cluster. So I would like to know the transaction fees is charged based on nr. of instructions/...
Souvagya's user avatar
  • 131
3 votes
1 answer
250 views

How can I parse Jupiter Aggregator instructions?

I'm trying to decode/parse these instructions and visualise some data to the user Tried with decodeInstruction from @solana/spl-token but so unsucuessfull any idea how to parse it?
Andon Mitev's user avatar
3 votes
1 answer
726 views

How to create an associated Token Account in anchor, I'm getting the following error: "insufficient account keys for instruction"

I need to create a SPL-Token before each test I'm running So I created the 2 following functions : createMint and createUserAndAssociatedWallet I'm able to create a mint but I can't create the ...
devMonster's user avatar
0 votes
1 answer
622 views

Serialize custom struct type defined in Solana anchor program from JS

I have the following struct defined in the Solana anchor program #[account] pub struct Parent { pub field1: String, pub data_arr: Vec<Data>, } #[derive(Debug, Clone, AnchorSerialize, ...
Vivek's user avatar
  • 121
4 votes
2 answers
1k views

Multiple instructions in one transactions using Anchor TS client (@project-serum/anchor)

I would like to add multiple instructions into a single transaction, using Anchor TS (@project-serum/anchor). Here is an example how this works with Solana Web3.js (@solana/web3.js): What is the best ...
Nelis.sol's user avatar
  • 115
4 votes
1 answer
278 views

Correlate the instructions of the innerInstructions

I get the parsed transaction from Solana (getParsedTransaction) and I would like to specifically parse the instructions and their corresponding innerInstructions. How can I know that my ...
Swifty's user avatar
  • 428
2 votes
1 answer
32 views

Is there a transaction instruction verification system in place to avoid verifying user-fed transaction id's in a server?

Is there an efficient way to solve the verification of a particular transaction in the server? For example, I want the user to transfer 100 XYZ tokens. But while confirming the transaction in the ...
zandtifing's user avatar
1 vote
0 answers
42 views

Call program instruction using solana/web3 [duplicate]

Is it possible to call a program instruction using Web3? I need to create the TransactionInstruction and sign the transaction manually and send the raw transaction to the blockchain. The program ...
Vivek's user avatar
  • 121
1 vote
1 answer
460 views

What is the significance of inner Instructions in a transaction and how do they relate to the instructions?

I have some confusion over the inner instructions in a transaction. Does every transaction have inner instructions? Whats the difference between instructions and the inner instructions? Thank you.
Tosh Velaga's user avatar
1 vote
0 answers
123 views

How to encode transaction instruction data from an Anchor program?

I'm trying to encode the transaction instruction data from Anchor using the documentation (https://docs.solana.com/developing/clients/javascript-api#interacting-with-custom-programs) but this is not ...
JulienRioux's user avatar
9 votes
2 answers
2k views

IllegalOwner error: Provided owner is not allowed

I am having this error when processing instructions for a transaction. Detail error log: Transaction simulation failed: Error processing Instruction 1: Provided owner is not allowed Program ...
agentp's user avatar
  • 235