Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add instruction to a transaction #2749

Closed
0AX0A opened this issue May 29, 2024 · 2 comments
Closed

Unable to add instruction to a transaction #2749

0AX0A opened this issue May 29, 2024 · 2 comments
Labels
bug Something isn't working question Add this to close an issue with instructions on how to repost as a question on Stack Exchange

Comments

@0AX0A
Copy link

0AX0A commented May 29, 2024

Hi,

We are attempting to add 8 instructions to a transaction and send it, but we are encountering an error indicating that it is too long to be processed.
We are trying to perform a swap operation that involves two transactions. We would like to combine these into a single transaction. How can we achieve this?

Thank you for your assistance.

const legacyTransaction = new Transaction({
          blockhash: recentBlockhashForSwap.blockhash,
          lastValidBlockHeight: recentBlockhashForSwap.lastValidBlockHeight,
          feePayer: publicKey,
        });
legacyTransaction.add(...txs[0]);
legacyTransaction.instructions.push(...txs[1]);

We also tried with VersionedTransaction but we got unsuccessful in this one as well.

@0AX0A 0AX0A added the bug Something isn't working label May 29, 2024
@buffalojoec buffalojoec added the question Add this to close an issue with instructions on how to repost as a question on Stack Exchange label May 30, 2024
Copy link
Contributor

Hi @0AX0A,

Thanks for your question!

We want to make sure to keep signal strong in the GitHub issue tracker – to make sure that it remains the best place to track issues that affect the development of the Solana JavaScript SDK itself.

Questions like yours deserve a purpose-built Q&A forum. Unless there exists evidence that this is a bug with the Solana JavaScript SDK itself, please post your question to the Solana Stack Exchange using this link: https://solana.stackexchange.com/questions/ask


This automated message is a result of having added the ‘question’ tag.

Copy link
Contributor

github-actions bot commented Jun 7, 2024

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working question Add this to close an issue with instructions on how to repost as a question on Stack Exchange
Projects
None yet
Development

No branches or pull requests

2 participants