Add lbPairAddress for TxSignal
This commit is contained in:
@@ -122,6 +122,10 @@ func parseDlmmInstruction(tx VersionedTransaction, instructionIndex int) (TxSign
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
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]))
|
userTokenOut, err := tx.GetAccount(int(instruction.Accounts[5]))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -220,6 +224,7 @@ func parseDlmmInstruction(tx VersionedTransaction, instructionIndex int) (TxSign
|
|||||||
ExactSOL: exactSol,
|
ExactSOL: exactSol,
|
||||||
ActiveBin: args.ActiveBin,
|
ActiveBin: args.ActiveBin,
|
||||||
MaxPriceImpactBps: args.MaxPriceImpactBps,
|
MaxPriceImpactBps: args.MaxPriceImpactBps,
|
||||||
|
LbPairAddress: lbPair.String(),
|
||||||
Block: tx.Block,
|
Block: tx.Block,
|
||||||
Token0AmountUint64: token0AmountUint64,
|
Token0AmountUint64: token0AmountUint64,
|
||||||
Token1AmountUint64: token1AmountUint64,
|
Token1AmountUint64: token1AmountUint64,
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ type TxSignal struct {
|
|||||||
ActiveBin int32 `json:"active_bin"`
|
ActiveBin int32 `json:"active_bin"`
|
||||||
// MaxPriceImpactBps is the price impact guard for swap_with_price_impact(2).
|
// MaxPriceImpactBps is the price impact guard for swap_with_price_impact(2).
|
||||||
MaxPriceImpactBps uint16 `json:"max_price_impact_bps"`
|
MaxPriceImpactBps uint16 `json:"max_price_impact_bps"`
|
||||||
|
//
|
||||||
|
LbPairAddress string `json:"lb_pair_address"`
|
||||||
|
|
||||||
// parsed values
|
// parsed values
|
||||||
Token0AmountUint64 uint64 `json:"-"`
|
Token0AmountUint64 uint64 `json:"-"`
|
||||||
|
|||||||
Reference in New Issue
Block a user