add shreder sell decode
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user