stack height parse of enterEntract

This commit is contained in:
thloyi
2025-12-31 16:53:39 +08:00
parent 78d323efd5
commit dbfaa39432
8 changed files with 84 additions and 34 deletions

View File

@@ -246,7 +246,7 @@ func ammBuyParser(tx *Tx, instruction Instruction, innerInstructions InnerInstru
return nil, increaseOffset(offset), fmt.Errorf("pumpamm create get inner instructions error: %v, offset: %d, %d", err, offset[0], prefixLen)
}
if instruction.StackHeight != nil && *instruction.StackHeight > 2 {
for _, innerInstr := range inners {
for _, innerInstr := range innerInstructions.Instructions {
if innerInstr.StackHeight != nil && *innerInstr.StackHeight == *instruction.StackHeight-1 {
entryContract = result.accountList[innerInstr.ProgramIDIndex]
}
@@ -364,7 +364,7 @@ func ammSellParser(tx *Tx, instruction Instruction, innerInstructions InnerInstr
}
if instruction.StackHeight != nil && *instruction.StackHeight > 2 {
for _, innerInstr := range inners {
for _, innerInstr := range innerInstructions.Instructions {
if innerInstr.StackHeight != nil && *innerInstr.StackHeight == *instruction.StackHeight-1 {
entryContract = result.accountList[innerInstr.ProgramIDIndex]
}