File tree Expand file tree Collapse file tree 5 files changed +30
-0
lines changed
solana-stream/src/archive Expand file tree Collapse file tree 5 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "changes" : [
3+ {
4+ "packageName" : " @subsquid/solana-normalization" ,
5+ "comment" : " add innerInstructionIndex to instruction" ,
6+ "type" : " minor"
7+ }
8+ ],
9+ "packageName" : " @subsquid/solana-normalization"
10+ }
Original file line number Diff line number Diff line change 1+ {
2+ "changes" : [
3+ {
4+ "packageName" : " @subsquid/solana-stream" ,
5+ "comment" : " support instruction.innerInstructionIndex field" ,
6+ "type" : " minor"
7+ }
8+ ],
9+ "packageName" : " @subsquid/solana-stream"
10+ }
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ export interface AddressTableLookup {
4646
4747export interface Instruction {
4848 transactionIndex : number
49+ innerInstructionIndex : number
4950 instructionAddress : number [ ]
5051 programId : Base58Bytes
5152 accounts : Base58Bytes [ ]
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ const PROGRAMS_MISSING_INVOKE_LOG = new Set([
138138
139139class InstructionParser {
140140 private pos = 0
141+ private innerPos = - 1
141142 private messages : Message [ ]
142143 private messagePos = 0
143144 private messagesTruncated = false
@@ -396,7 +397,14 @@ class InstructionParser {
396397 address [ stackHeight - 1 ] = 0
397398 }
398399
400+ if ( stackHeight === 1 ) {
401+ this . innerPos = - 1
402+ } else {
403+ this . innerPos ++
404+ }
405+
399406 let i : Instruction = {
407+ innerInstructionIndex : this . innerPos ,
400408 transactionIndex : this . tx . transactionIndex ,
401409 instructionAddress : address ,
402410 programId : this . getAccount ( src . programIdIndex ) ,
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ export const getDataSchema = weakMemo((fields: FieldSelection) => {
6060 transactionIndex : NAT ,
6161 instructionAddress : array ( NAT ) ,
6262 ...project ( fields . instruction , {
63+ instructionIndex : NAT ,
6364 programId : B58 ,
6465 accounts : array ( B58 ) ,
6566 data : B58 ,
You can’t perform that action at this time.
0 commit comments