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

Experimental: simulateTransaction - support innerInstructions #2763

Closed
mcintyre94 opened this issue Jun 3, 2024 · 2 comments · Fixed by #2868
Closed

Experimental: simulateTransaction - support innerInstructions #2763

mcintyre94 opened this issue Jun 3, 2024 · 2 comments · Fixed by #2868
Assignees
Labels
enhancement New feature or request released

Comments

@mcintyre94
Copy link
Contributor

See #2756 that adds it to the legacy web3js 1.x code

Motivation

  • innerInstructions is available as an optional param on simulateTransaction RPC calls from 1.18
  • There's an open PR adding support for the 1.x connection.simulateTransaction code
  • We should also add it to the 2.x simulateTransaction RPC type

Details

@mcintyre94 mcintyre94 added the enhancement New feature or request label Jun 3, 2024
@steveluscher steveluscher self-assigned this Jun 27, 2024
steveluscher added a commit that referenced this issue Jun 28, 2024
Closes #2763.

# Test Plan

Notice how `index` and `stackHeight` are `number` instead of `bigint` here.

```js
 const { value } = await rpc
    .simulateTransaction(
        'A8VSjQsioqTM0kyF9hiBLl/D7NlMU69OObLMEALuTzERsr/FJIN4YqOe45SUfkXhH0CI6xClzFEa+/V9/vSiFQoKf75MXBgQPY4gzn6iz86ZzhnydQvNcn5sbJZc6xmS9ey7fj6+v5xkqFshX1b/Mg86WH2DO0xK0kjq7+IWi8YEvD9ZHU0X9fO//akP12jMPJJ67DsoEwgPB630jd5qMFMOMlESOql5YHf9zKBMhJYYx2wZAJMSEQfyVwB3lV0KA4ADAQcNDQ4WRO2tB+MVLamVDMyF3NM9vIycJ5ID5PpIfjp5VnCuCoZk81s1sWU+MG/teETSzT0CK69Xbi9jn/suK3F7CmuzKkWQgpJ5e5NZRWj4wiXXxozEFV8KQyFP9RZQUDVBFHMYdkG3nmJJ/WeMvFrr+E6Ux/obRtql7j1H4ZCkztUBfGU0Be9QIK1utAyLKHqj3w6JeFK9kEohbF/PhFil1VgBR6+Uey25nUP1St50fjufSPx6NYjlxB12FyxZ3PelAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAALcGWx49F8RTidUn9rBMPNWLhscxqg/bVJttG8A/gpRgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABqfVFxh70WY12tQEVf3CwMEkxo8hVnWl27rLXwgAAAAG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqYyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZBUpTWpkpIQZNJOhxYNo4fHw1td28kruB5B+oQEEFRI2BRFO9Mxdx1WGvTJ9EjfepI2IH1WujnvFkbak/EULbEQUGAAkDZAAAAAAAAAAGAAUC1TEDAAcJAwQBAgACCAkKqgEqABEAAABNeSBORlQgQ29sbGVjdGlvbgMAAABBQkNMAAAAaHR0cHM6Ly9pcGZzLmZpbGViYXNlLmlvL2lwZnMvUW1RWThpSkNMYTJWS3FRZEs1N2lZVUV1OUpvYXNMRFN6N3lBZ0RWWGhoMzd5eQAAAQEAAABrsypFkIKSeXuTWUVo+MIl18aMxBVfCkMhT/UWUFA1QQFkAAEAAAABAAAAAAAAAAAAAAABAAcPBQIDBAcBAgcACAkKCwcHCysAAQAAAAAAAAAADAAFMGdiaDUA',
        {encoding: 'base64', innerInstructions: true, replaceRecentBlockhash: true},
    )
    .send();
> value.innerInstructions
[ { index: 2, instructions: [ [Object] ] } ]
> value.innerInstructions[0].instructions
[
  {
    parsed: { info: [Object], type: 'transfer' },
    program: 'system',
    programId: '11111111111111111111111111111111',
    stackHeight: 2
  }
]
```
Copy link
Contributor

🎉 This issue has been resolved in version 1.94.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants