-
Notifications
You must be signed in to change notification settings - Fork 869
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
You can now request
innerInstructions
with simulation (#2868)
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 } ] ```
- Loading branch information
1 parent
be36bab
commit 91fb1f3
Showing
3 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@solana/rpc-api': patch | ||
--- | ||
|
||
The `simulateTransaction` RPC method now accepts an `innerInstructions` param. When `true`, the simulation result will include an array of inner instructions, if any. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters