diff --git a/consts.go b/consts.go index 93bf895..9748248 100644 --- a/consts.go +++ b/consts.go @@ -239,6 +239,7 @@ var entryContractAddresses = map[solana.PublicKey]string{ solana.MustPublicKeyFromBase58("BBRouter1cVunVXvkcqeKkZQcBK7ruan37PPm3xzWaXD"): EntryContractBonkBot, solana.MustPublicKeyFromBase58("B3111yJCeHBcA1bizdJjUFPALfhAfSRnAbJzGUtnt56A"): EntryContractBinanceWallet, solana.MustPublicKeyFromBase58("FLASHX8DrLbgeR8FcfNV1F5krxYcYMUdBkrP1EPBtxB9"): EntryContractAxiom, + solana.MustPublicKeyFromBase58("F5tfvbLog9VdGUPqBDTT8rgXvTTcq7e5UiGnupL1zvBq"): EntryContractAxiom, solana.MustPublicKeyFromBase58("B3jytJa6Tzpn4Ly7GNnDm3dMGqUin5aMRm5aPsJGU5G7"): EntryContractTradewiz, } diff --git a/internal/test/test.go b/internal/test/test.go index 0594dcc..ab019b6 100644 --- a/internal/test/test.go +++ b/internal/test/test.go @@ -404,7 +404,7 @@ func (spg SwapGetter) GetLiquidityTx(tx *solana_parser.Tx, index uint64) (*Tx, e } mevName, mevFee := tx.CheckMevAgent() - platformName, platformFee := tx.CheckPlatformOnSig(spg.Swap) + platformName, platformFee := tx.CheckPlatform(spg.Swap) pairString := "" if spg.Program == solana_parser.SolProgramPump { @@ -501,7 +501,7 @@ func (spg SwapGetter) GetTx(tx *solana_parser.Tx, index uint64, price decimal.De } mevName, mevFee := tx.CheckMevAgent() - platformName, platformFee := tx.CheckPlatformOnSig(spg.Swap) + platformName, platformFee := tx.CheckPlatform(spg.Swap) if mevName == "" { mevName = "none" diff --git a/internal/test2/test.go b/internal/test2/test.go index 4d9c72f..81043c4 100644 --- a/internal/test2/test.go +++ b/internal/test2/test.go @@ -23,9 +23,9 @@ var () func main() { - var slot uint64 = 399015152 + var slot uint64 = 399060766 var data = NewBlockData(decimal.NewFromFloat(100.0)) - client := rpc.New("https://staked.helius-rpc.com?api-key=") + client := rpc.New("https://staked.helius-rpc.com?api-key=5adcf1f9-5719-43d1-bf3f-c2d4e1e5f94d") var rewards = false var version uint64 = 0 blocks, err := client.GetBlockWithOpts(context.Background(), slot, &rpc.GetBlockOpts{ @@ -91,7 +91,7 @@ func main() { fmt.Println("parse action error:", "tx", result.GetTxHash(), "i", i, "err", err) } } - if result.GetTxHash() == "4h3yrAfMfHYHgf2DBnaecRjuSw4UTirySej65PSapPPPASvBADo143NhptQyVQdiCKypoSs2tzh3EhYxcgxVNLHD" { + if result.GetTxHash() == "3vMp5Lqm7PxS9MXfXgmptKA9xLkyfKfJpuFs2mUfhRuqTWjGj7DcvSb65NsHQH5RF9JXVLbxrpUHV4LXrgmjXmft" { fmt.Println("xxx") } } @@ -463,7 +463,7 @@ func (spg SwapGetter) GetTx(tx *solana_parser.Tx, index uint64, price decimal.De } mevName, mevFee := tx.CheckMevAgent() - platformName, platformFee := tx.CheckPlatformOnSig(spg.Swap) + platformName, platformFee := tx.CheckPlatform(spg.Swap) if mevName == "" { mevName = "none" diff --git a/metaoradlmm.go b/metaoradlmm.go index 1b829ac..1b0315c 100644 --- a/metaoradlmm.go +++ b/metaoradlmm.go @@ -274,6 +274,7 @@ func metaoradlmmSwapParser(tx *Tx, instruction Instruction, innerInstructions In for _, innerInstr := range innerInstructions.Instructions { if innerInstr.StackHeight != nil && *innerInstr.StackHeight == *instruction.StackHeight-1 { entryContract = result.accountList[innerInstr.ProgramIDIndex] + break } } } @@ -475,6 +476,7 @@ func metaoradlmmAddLiquidityParser(tx *Tx, instruction Instruction, innerInstruc for _, innerInstr := range innerInstructions.Instructions { if innerInstr.StackHeight != nil && *innerInstr.StackHeight == *instruction.StackHeight-1 { entryContract = result.accountList[innerInstr.ProgramIDIndex] + break } } } @@ -664,6 +666,7 @@ func metaoradlmmRemoveLiquidityParser(tx *Tx, instruction Instruction, innerInst for _, innerInstr := range innerInstructions.Instructions { if innerInstr.StackHeight != nil && *innerInstr.StackHeight == *instruction.StackHeight-1 { entryContract = result.accountList[innerInstr.ProgramIDIndex] + break } } } diff --git a/pump.go b/pump.go index 5d79d36..bea2583 100644 --- a/pump.go +++ b/pump.go @@ -221,6 +221,7 @@ func BuyOrSellParser(tx *Tx, instruction Instruction, innerInstructions InnerIns for _, innerInstr := range innerInstructions.Instructions { if innerInstr.StackHeight != nil && *innerInstr.StackHeight == *instruction.StackHeight-1 { entryContract = result.accountList[innerInstr.ProgramIDIndex] + break } } } diff --git a/pumpamm.go b/pumpamm.go index 18356fe..dbd1e85 100644 --- a/pumpamm.go +++ b/pumpamm.go @@ -249,6 +249,7 @@ func ammBuyParser(tx *Tx, instruction Instruction, innerInstructions InnerInstru for _, innerInstr := range innerInstructions.Instructions { if innerInstr.StackHeight != nil && *innerInstr.StackHeight == *instruction.StackHeight-1 { entryContract = result.accountList[innerInstr.ProgramIDIndex] + break } } } @@ -367,6 +368,7 @@ func ammSellParser(tx *Tx, instruction Instruction, innerInstructions InnerInstr for _, innerInstr := range innerInstructions.Instructions { if innerInstr.StackHeight != nil && *innerInstr.StackHeight == *instruction.StackHeight-1 { entryContract = result.accountList[innerInstr.ProgramIDIndex] + break } } }