add shreder sell decode

This commit is contained in:
thloyi
2025-12-30 11:03:11 +08:00
parent 2c0cbd574a
commit 20702a493f
8 changed files with 1743 additions and 1096 deletions

View File

@@ -9,10 +9,7 @@ import (
"os/signal"
"syscall"
"github.com/samlior/libsam/pkg/logger"
"github.com/samlior/libsam/pkg/shreder"
"github.com/samlior/libsam/pkg/types"
"github.com/samlior/libsam/third_party/shreder_protos"
)
func main() {
@@ -21,11 +18,9 @@ func main() {
panic("URL is not set")
}
logger := logger.NewEmptyLogger()
shrederClient, cleanup, err := shreder.NewShrederClient(
logger,
url,
map[string]*shreder_protos.SubscribeRequestFilterTransactions{
map[string]*shreder.SubscribeRequestFilterTransactions{
"pumpfunamm": {
AccountRequired: []string{
"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA",
@@ -53,7 +48,7 @@ func main() {
}()
// async read from shreder
txCh := make(chan types.TxSignalBatch, 1000)
txCh := make(chan shreder.TxSignalBatch, 1000)
go func() {
err := shrederClient.ReadSync(ctx, txCh)
if err != nil {