juptierv6
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"strings"
|
||||
|
||||
"github.com/gagliardetto/solana-go"
|
||||
"github.com/mr-tron/base58"
|
||||
@@ -238,6 +239,7 @@ func ParseTransaction(update *SubscribeUpdateTransaction, loader *AddressTables)
|
||||
staticKeys = append(staticKeys, accounts...)
|
||||
}
|
||||
}
|
||||
versioned.Message.StaticAccountKeys = staticKeys
|
||||
}
|
||||
|
||||
var parsed []*TxSignal
|
||||
@@ -280,9 +282,9 @@ func ParseTransaction(update *SubscribeUpdateTransaction, loader *AddressTables)
|
||||
case terminalProgramID:
|
||||
txRes, err := parseTermInstruction(versioned, i)
|
||||
parsed = appendParsed(parsed, txRes, err, txHash, "terminal")
|
||||
//case jupiterV6ProgramID:
|
||||
// txRes, err := parseJupiterV6Instruction(versioned, i)
|
||||
// parsed = appendParsed(parsed, txRes, err, txHash, "jupiterv6")
|
||||
case jupiterV6ProgramID:
|
||||
txRes, err := parseJupiterV6Instruction(versioned, i)
|
||||
parsed = appendParsed(parsed, txRes, err, txHash, "jupiterv6")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,10 +293,9 @@ func ParseTransaction(update *SubscribeUpdateTransaction, loader *AddressTables)
|
||||
|
||||
func appendParsed(list []*TxSignal, parsed *TxSignal, err error, txHash [64]byte, label string) []*TxSignal {
|
||||
if err != nil {
|
||||
//if errors.Is(err, &AccountNotFoundError{}) {
|
||||
//
|
||||
//}
|
||||
logger.Debug("txparser: failed to parse", "label", label, "instruction", err, "tx_hash", base58.Encode(txHash[:]))
|
||||
if !strings.HasPrefix(err.Error(), "account index") {
|
||||
logger.Debug("txparser: failed to parse", "label", label, "instruction", err, "tx_hash", base58.Encode(txHash[:]))
|
||||
}
|
||||
return list
|
||||
}
|
||||
if parsed != nil {
|
||||
|
||||
Reference in New Issue
Block a user