3 Commits

Author SHA1 Message Date
f6242f0193 Merge branch 'master' of https://go.onsig.ai/onsig/libsam 2026-02-21 18:52:17 +08:00
b06a1fa377 chore: upgrade axiom pumpfun buy/sell 2026-02-21 18:42:18 +08:00
bijianing97
bd2dbe3c91 Add lbPairAddress for TxSignal 2026-02-12 17:37:29 +08:00
3 changed files with 9 additions and 2 deletions

View File

@@ -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,

View File

@@ -10,8 +10,8 @@ import (
var flasProgramID = solana.MustPublicKeyFromBase58("FLASHX8DrLbgeR8FcfNV1F5krxYcYMUdBkrP1EPBtxB9")
var (
flasBuyTokensIX = []byte{0x00, 0x1, 0x4}
flasSellTokensIX = []byte{0x01, 0x1, 0x3}
flasBuyTokensIX = []byte{0x00, 0x1, 0x1b}
flasSellTokensIX = []byte{0x01, 0x1, 0x1a}
flasAmmBuyTokensIX = []byte{0x00, 0x2, 0x2}
flasAmmSellTokensIX = []byte{0x01, 0x2, 0x2}
)

View File

@@ -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:"-"`