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

innerInstructions Missing From simulateTransaction #2755

Closed
0xIchigo opened this issue May 31, 2024 · 1 comment
Closed

innerInstructions Missing From simulateTransaction #2755

0xIchigo opened this issue May 31, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@0xIchigo
Copy link
Contributor

Motivation

The simulateTransaction RPC method currently lacks support for the innerInstructions parameter. Adding this feature will allow users to include inner instructions in their simulations. This would be useful for developers who would like to simulate and debug complex transactions that involve multiple program invocations

Example use case

If a developer is working on a program with nested calls without the innerInstructions parameter, they cannot debug issues related to inner program invocations. By enabling innerInstructions, the developer can get a detailed log of all nested instructions, making it easier to identify and fix problems.

Moreover, developers looking to optimize their compute usage by first simulating their transactions with inner instructions are currently unable to do so via web3.js and would have to make the HTTP call directly.

Details

Behavior:

  • The simulateTransaction method should accept an optional innerInstructions parameter of type boolean
  • When the innerInstructions is set to true, the simulation response should include a detailed list of inner instructions executed during the transaction
  • The response structure should match the structure defined in the Solana documentation for the inner instructions specifically, and the RPC documentation for the response as a whole

Implementation:

  • Modify the SimulateTransactionConfig type to include the innerInstructions parameter
  • Update the RPC call within the simulateTransaction method to pass in this parameter if provided

A PR implementing these changes will follow shortly! :)

@0xIchigo 0xIchigo added the enhancement New feature or request label May 31, 2024
@0xIchigo 0xIchigo changed the title feat(simulated_transaction): Add Inner Instructions innerInstructions Missing From simulateTransaction May 31, 2024
Copy link
Contributor

github-actions bot commented Jul 9, 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 Jul 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants