loading address tables
This commit is contained in:
@@ -2,13 +2,15 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/gagliardetto/solana-go/rpc"
|
||||
|
||||
"github.com/samlior/libsam/pkg/shreder"
|
||||
)
|
||||
|
||||
@@ -17,13 +19,24 @@ func main() {
|
||||
if url == "" {
|
||||
panic("URL is not set")
|
||||
}
|
||||
|
||||
rpcUrl := os.Getenv("RPC_URL")
|
||||
if rpcUrl == "" {
|
||||
panic("RPC_URL is not set")
|
||||
}
|
||||
rpcClient := rpc.New(rpcUrl)
|
||||
shreder.SetLogLevel(slog.LevelDebug)
|
||||
shrederClient, cleanup, err := shreder.NewShrederClient(
|
||||
url,
|
||||
rpcClient,
|
||||
map[string]*shreder.SubscribeRequestFilterTransactions{
|
||||
"pumpfunamm": {
|
||||
AccountRequired: []string{
|
||||
//AccountRequired: []string{
|
||||
// "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA",
|
||||
//},
|
||||
AccountInclude: []string{
|
||||
"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA",
|
||||
"GS4CU59F31iL7aR2Q8zVS8DRrcRnXX1yjQ66TqNVQnaR", //Event Authority
|
||||
"5PHirr8joyTMp9JMm6nW7hNDVyEYdkzDqazxPD7RaTjx", // Fee Config
|
||||
},
|
||||
},
|
||||
"photon": {
|
||||
@@ -63,8 +76,8 @@ func main() {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
case txBatch := <-txCh:
|
||||
jsonData, _ := json.MarshalIndent(txBatch, "", " ")
|
||||
fmt.Println(string(jsonData))
|
||||
//jsonData, _ := json.MarshalIndent(txBatch, "", " ")
|
||||
fmt.Println(txBatch[0].TxHash)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user