From bd2dbe3c9102afb7dca4f2ed10e0e00d5152fd59 Mon Sep 17 00:00:00 2001 From: bijianing97 <826015751@qq.com> Date: Thu, 12 Feb 2026 17:37:29 +0800 Subject: [PATCH] Add lbPairAddress for TxSignal --- pkg/shreder/program_dlmm.go | 5 +++++ pkg/shreder/tx.go | 2 ++ 2 files changed, 7 insertions(+) diff --git a/pkg/shreder/program_dlmm.go b/pkg/shreder/program_dlmm.go index 7b1238b..e54d5eb 100644 --- a/pkg/shreder/program_dlmm.go +++ b/pkg/shreder/program_dlmm.go @@ -122,6 +122,10 @@ func parseDlmmInstruction(tx VersionedTransaction, instructionIndex int) (TxSign if err != nil { return nil, err } + lbPair, err := tx.GetAccount(int(instruction.Accounts[0])) + if err != nil { + return nil, err + } userTokenOut, err := tx.GetAccount(int(instruction.Accounts[5])) if err != nil { return nil, err @@ -220,6 +224,7 @@ func parseDlmmInstruction(tx VersionedTransaction, instructionIndex int) (TxSign ExactSOL: exactSol, ActiveBin: args.ActiveBin, MaxPriceImpactBps: args.MaxPriceImpactBps, + LbPairAddress: lbPair.String(), Block: tx.Block, Token0AmountUint64: token0AmountUint64, Token1AmountUint64: token1AmountUint64, diff --git a/pkg/shreder/tx.go b/pkg/shreder/tx.go index 8ead1e6..a8a16f7 100644 --- a/pkg/shreder/tx.go +++ b/pkg/shreder/tx.go @@ -55,6 +55,8 @@ type TxSignal struct { ActiveBin int32 `json:"active_bin"` // MaxPriceImpactBps is the price impact guard for swap_with_price_impact(2). MaxPriceImpactBps uint16 `json:"max_price_impact_bps"` + // + LbPairAddress string `json:"lb_pair_address"` // parsed values Token0AmountUint64 uint64 `json:"-"`