fix okx user

This commit is contained in:
thloyi
2025-12-22 17:56:40 +08:00
parent b44c7372d5
commit 9898554bf8
19 changed files with 635 additions and 5712 deletions

View File

@@ -70,9 +70,9 @@ func FromTx(tx *parser.Tx) []*Tx {
for i, s := range tx.Swaps {
var newTx *Tx
platform, platformFee := tx.CheckPlatform(s)
token0Program := s.BaseTokenProgram
token0Address := s.BaseMint
token0Decimals := s.BaseMintDecimals
//token0Program := s.BaseTokenProgram
//token0Address := s.BaseMint
//token0Decimals := s.BaseMintDecimals
if s.Program == "Pump" {
quoteMint := s.QuoteMint
// 有些数据里 quote 会给 SystemProgram统一转成 WSOL
@@ -130,9 +130,9 @@ func FromTx(tx *parser.Tx) []*Tx {
} else if s.Event == "sell" {
eventName = "buy"
}
token0Program = s.QuoteTokenProgram
token0Address = s.QuoteMint
token0Decimals = s.QuoteMintDecimals
//token0Program = s.QuoteTokenProgram
//token0Address = s.QuoteMint
//token0Decimals = s.QuoteMintDecimals
newTx = &Tx{
Err: nil,
//BondingCurve: s.Pool.String(),
@@ -225,10 +225,11 @@ func FromTx(tx *parser.Tx) []*Tx {
if newTx == nil {
continue
}
if newTx.Maker == "HV1KXxWFaSeriyFvXyx48FqG9BoFbfinB8njCJonqP7K" && newTx.EntryContract == "oKXAggregatorV2" {
newTx.Maker = tx.Signer.String()
newTx.AfterSignerToken0Balance = tx.GetSignerTokenBalanceAfterTx(token0Program, token0Address).Div(decimal.New(1, int32(token0Decimals)))
}
//if (newTx.Maker == "HV1KXxWFaSeriyFvXyx48FqG9BoFbfinB8njCJonqP7K" && newTx.EntryContract == "oKXAggregatorV2") || (newTx.Maker == "ARu4n5mFdZogZAravu7CcizaojWnS6oqka37gdLT5SZn" && newTx.EntryContract == "oKXDExRouterV2") {
// newTx.Maker = tx.Signer.String()
// newTx.AfterSignerToken0Balance = tx.GetSignerTokenBalanceAfterTx(token0Program, token0Address).Div(decimal.New(1, int32(token0Decimals)))
//}
txs = append(txs, newTx)
}