all parser

This commit is contained in:
thloyi
2026-02-09 14:46:19 +08:00
parent 5da088ce13
commit 9ece4aebb9
22 changed files with 6720 additions and 174 deletions

View File

@@ -180,7 +180,7 @@ func ammCreatePoolParser(tx *Tx, instruction Instruction, innerInstructions Inne
if offset[1] == 0 {
offset[0] += 1
} else {
offset[1] += uint(innerIndex) + 1 + prefixLen
offset[1] = uint(innerIndex) + 1 + prefixLen
}
if err != nil {
return nil, offset, fmt.Errorf("pump amm create pool event decode error: %v, offset: %d, %d", err, offset[0], prefixLen)
@@ -262,7 +262,7 @@ func ammBuyParser(tx *Tx, instruction Instruction, innerInstructions InnerInstru
if offset[1] == 0 {
offset[0] += 1
} else {
offset[1] += uint(innerIndex) + 1 + prefixLen
offset[1] = uint(innerIndex) + 1 + prefixLen
}
if err != nil {
return nil, offset, fmt.Errorf("pump amm buy pool event decode error: %v, offset: %d, %d", err, offset[0], prefixLen)
@@ -380,7 +380,7 @@ func ammSellParser(tx *Tx, instruction Instruction, innerInstructions InnerInstr
if offset[1] == 0 {
offset[0] += 1
} else {
offset[1] += uint(innerIndex) + 1 + prefixLen
offset[1] = uint(innerIndex) + 1 + prefixLen
}
if err != nil {
return nil, offset, fmt.Errorf("pump amm sell pool event decode error: %v, offset: %d, %d", err, offset[0], prefixLen)
@@ -491,7 +491,7 @@ func depositParse(tx *Tx, instruction Instruction, innerInstructions InnerInstru
if offset[1] == 0 {
offset[0] += 1
} else {
offset[1] += uint(innerIndex) + 1 + prefixLen
offset[1] = uint(innerIndex) + 1 + prefixLen
}
if err != nil {
return nil, offset, fmt.Errorf("pump amm deposit pool event decode error: %v, offset: %d, %d", err, offset[0], prefixLen)
@@ -589,7 +589,7 @@ func withdrawParse(tx *Tx, instruction Instruction, innerInstructions InnerInstr
if offset[1] == 0 {
offset[0] += 1
} else {
offset[1] += uint(innerIndex) + 1 + prefixLen
offset[1] = uint(innerIndex) + 1 + prefixLen
}
if err != nil {
return nil, offset, fmt.Errorf("pump amm withdraw pool event decode error: %v, offset: %d, %d", err, offset[0], prefixLen)