From cd1d6816219213644c3dc74997e5e30966a87f83 Mon Sep 17 00:00:00 2001 From: thloyi Date: Mon, 2 Mar 2026 15:47:11 +0800 Subject: [PATCH] record ProgramFailedToComplete failed tx --- pump.go | 2 +- pumpamm.go | 4 ++-- rawtx.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pump.go b/pump.go index 353faf7..ccef571 100644 --- a/pump.go +++ b/pump.go @@ -225,7 +225,7 @@ func failedTxBuyOrSellParser(tx *Tx, instruction Instruction, innerInstructions if tx.Err.Variant != InstructionError { return nil, increaseOffset(offset), fmt.Errorf("failed tx pump failed but error variant is not instruction error, offset, %d, %d", offset[0], offset[1]) } - if tx.Err.Enum != Custom && tx.Err.Enum != ComputationalBudgetExceeded { + if tx.Err.Enum != Custom && tx.Err.Enum != ComputationalBudgetExceeded && tx.Err.Enum != ProgramFailedToComplete { return nil, increaseOffset(offset), fmt.Errorf("failed tx pump failed but error is not custom or computational budget exceeded, offset, %d, %d", offset[0], offset[1]) } if tx.Err.Enum == Custom { diff --git a/pumpamm.go b/pumpamm.go index ed28214..7d3c61b 100644 --- a/pumpamm.go +++ b/pumpamm.go @@ -268,7 +268,7 @@ func failedTxAmmBuyParser(tx *Tx, instruction Instruction, innerInstructions Inn if tx.Err.Variant != InstructionError { return nil, increaseOffset(offset), fmt.Errorf("failed tx pump amm sell failed but error variant is not instruction error, offset, %d, %d", offset[0], offset[1]) } - if tx.Err.Enum != Custom && tx.Err.Enum != ComputationalBudgetExceeded { + if tx.Err.Enum != Custom && tx.Err.Enum != ComputationalBudgetExceeded && tx.Err.Enum != ProgramFailedToComplete { return nil, increaseOffset(offset), fmt.Errorf("failed tx pump amm sell failed but error is not custom or computational budget exceeded, offset, %d, %d", offset[0], offset[1]) } if tx.Err.Enum == Custom { @@ -392,7 +392,7 @@ func failedTxAmmSellParser(tx *Tx, instruction Instruction, innerInstructions In if tx.Err.Variant != InstructionError { return nil, increaseOffset(offset), fmt.Errorf("failed tx pump amm sell failed but error variant is not instruction error, offset, %d, %d", offset[0], offset[1]) } - if tx.Err.Enum != Custom && tx.Err.Enum != ComputationalBudgetExceeded { + if tx.Err.Enum != Custom && tx.Err.Enum != ComputationalBudgetExceeded && tx.Err.Enum != ProgramFailedToComplete { return nil, increaseOffset(offset), fmt.Errorf("failed tx pump amm sell failed but error is not custom or computational budget exceeded, offset, %d, %d", offset[0], offset[1]) } if tx.Err.Enum == Custom { diff --git a/rawtx.go b/rawtx.go index 00bf158..c4dc716 100644 --- a/rawtx.go +++ b/rawtx.go @@ -354,7 +354,7 @@ func FromRpcTransactionWithMeta(tx rpc.TransactionWithMeta, blockTime *uint64, s } errDetail, ok := oErr[1].(string) if ok { - if errDetail == "ComputationalBudgetExceeded" { + if errDetail == "ComputationalBudgetExceeded" || errDetail == "ProgramFailedToComplete" { sTx.Meta.Err.Enum = ComputationalBudgetExceeded } else { sTx.Meta.Err.UnKnown = errDetail