chore: add bloom router selector
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package shreder
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
|
||||
@@ -10,6 +11,8 @@ import (
|
||||
var bloomRouterProgramID = solana.MustPublicKeyFromBase58("b1oomGGqPKGD6errbyfbVMBuzSC8WtAAYo8MwNafWW1")
|
||||
var pumpFunAccount = solana.MustPublicKeyFromBase58("4wTV1YmiEkRvAtNtsSGPtUrqRYQMe5SKy2uB4Jjaxnjf")
|
||||
|
||||
var bloomRouterSwapDiscriminator = []byte{0xf1, 0x57, 0x27, 0x38, 0x01, 0x4d, 0x0e, 0x63}
|
||||
|
||||
type bloomRouterArgs struct {
|
||||
Side uint16
|
||||
SolAmount uint64
|
||||
@@ -26,6 +29,10 @@ func parseBloomRouterInstruction(tx VersionedTransaction, instructionIndex int)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
if !bytes.Equal(instruction.Data[:8], bloomRouterSwapDiscriminator) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
findPumpFun := func() (solana.PublicKey, solana.PublicKey, error) {
|
||||
var mint solana.PublicKey
|
||||
foundPumpFun := false
|
||||
|
||||
Reference in New Issue
Block a user