Compare commits
1 Commits
v2.0.5
...
dab77c0b61
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dab77c0b61 |
2
Makefile
2
Makefile
@@ -19,4 +19,4 @@ shreder:
|
|||||||
.PHONY: build
|
.PHONY: build
|
||||||
# build
|
# build
|
||||||
build:
|
build:
|
||||||
mkdir -p bin/ && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ./bin/ ./...
|
mkdir -p bin/ && CGO_ENABLED=0 go build -o ./bin/ ./...
|
||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
"github.com/gagliardetto/solana-go"
|
"github.com/gagliardetto/solana-go"
|
||||||
"github.com/gagliardetto/solana-go/programs/system"
|
"github.com/gagliardetto/solana-go/programs/system"
|
||||||
"github.com/gagliardetto/solana-go/rpc"
|
"github.com/gagliardetto/solana-go/rpc"
|
||||||
"github.com/samlior/libsam/v2/pkg/consts"
|
"github.com/samlior/libsam/pkg/consts"
|
||||||
"github.com/samlior/libsam/v2/pkg/enum"
|
"github.com/samlior/libsam/pkg/enum"
|
||||||
"github.com/samlior/libsam/v2/pkg/swqos"
|
"github.com/samlior/libsam/pkg/swqos"
|
||||||
"github.com/shopspring/decimal"
|
"github.com/shopspring/decimal"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gagliardetto/solana-go/rpc"
|
"github.com/gagliardetto/solana-go/rpc"
|
||||||
|
|
||||||
"github.com/samlior/libsam/v2/pkg/shreder"
|
"github.com/samlior/libsam/pkg/shreder"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -25,7 +25,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
rpcClient := rpc.New(rpcUrl)
|
rpcClient := rpc.New(rpcUrl)
|
||||||
shreder.SetLogLevel(slog.LevelDebug)
|
shreder.SetLogLevel(slog.LevelDebug)
|
||||||
//handlers := shreder.GetRegisteredHandlers()
|
|
||||||
shrederClient, cleanup, err := shreder.NewShrederClient(
|
shrederClient, cleanup, err := shreder.NewShrederClient(
|
||||||
url,
|
url,
|
||||||
rpcClient,
|
rpcClient,
|
||||||
@@ -56,14 +55,13 @@ func main() {
|
|||||||
"proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u",
|
"proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"dflow": {
|
||||||
|
AccountRequired: []string{
|
||||||
|
"DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH",
|
||||||
|
},
|
||||||
|
},
|
||||||
// TODO: axiom, gmgn, etc.
|
// TODO: axiom, gmgn, etc.
|
||||||
},
|
}, shreder.BlocksStats(false), shreder.LogParsedStats(true), shreder.ShowTableLoaded(false))
|
||||||
//shreder.WithCustomParsers(map[solana.PublicKey]shreder.Handler{
|
|
||||||
// solana.MustPublicKeyFromBase58("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"): handlers[solana.MustPublicKeyFromBase58("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4")],
|
|
||||||
// solana.MustPublicKeyFromBase58("proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u"): handlers[solana.MustPublicKeyFromBase58("proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u")],
|
|
||||||
//}),
|
|
||||||
shreder.BlocksStats(false), shreder.LogParsedStats(true), shreder.ShowTableLoaded(false))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@@ -80,7 +78,7 @@ func main() {
|
|||||||
// async read from shreder
|
// async read from shreder
|
||||||
txCh := make(chan shreder.TxSignal, 1000)
|
txCh := make(chan shreder.TxSignal, 1000)
|
||||||
go func() {
|
go func() {
|
||||||
err := shrederClient.ReadEntriesSync(ctx, txCh)
|
err := shrederClient.ReadSync(ctx, txCh)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !errors.Is(err, context.Canceled) {
|
if !errors.Is(err, context.Canceled) {
|
||||||
panic(err)
|
panic(err)
|
||||||
@@ -93,8 +91,8 @@ func main() {
|
|||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return
|
return
|
||||||
case tx := <-txCh:
|
case tx := <-txCh:
|
||||||
if tx.Label == "dbot" || tx.Label == "okxdexroutev2" {
|
if tx.Label == "okxdexroutev2" || tx.Label == "jupiterv6" || tx.Label == "dflow" {
|
||||||
fmt.Println("===============", tx.TxHash, tx.Label,tx.Program ,tx.Event, tx.Token0Address, tx.Token1Address,"token0amount:", tx.Token0Amount, "token1amount:",tx.Token1Amount ,"parse time:", tx.ParseEnd.Sub(tx.ParseStart))
|
fmt.Println("===============", tx.TxHash, tx.Label, tx.Event, tx.Token0Address, "token:", tx.Token0Amount, "parse time:", tx.ParseEnd.Sub(tx.ParseStart))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,13 +10,14 @@ import (
|
|||||||
"github.com/gagliardetto/solana-go/programs/address-lookup-table"
|
"github.com/gagliardetto/solana-go/programs/address-lookup-table"
|
||||||
"github.com/gagliardetto/solana-go/rpc"
|
"github.com/gagliardetto/solana-go/rpc"
|
||||||
|
|
||||||
"github.com/samlior/libsam/v2/pkg/shreder"
|
"github.com/samlior/libsam/pkg/shreder"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
rpcURL = "https://staked.helius-rpc.com?api-key=5adcf1f9-5719-43d1-bf3f-c2d4e1e5f94d"
|
rpcURL = "https://staked.helius-rpc.com?api-key=5adcf1f9-5719-43d1-bf3f-c2d4e1e5f94d"
|
||||||
txSignature = "4tcpUCVUZtUFDKGwZVBexkQpYiPhFgW4wfnrTEQgPrkQxpfsDEVMWN2UBfYxpy1EsDzuatuP1wgsUowTqeh2fnie"
|
txSignature = "4YUQzsQcHxt5jA6qKPVBWCgw8VRuE6bZqAoXeiwptbdLwta3QnDbWHzjwP3mY8hJPPerSf1yGbpdL2SdyWZTJ9e1"
|
||||||
labelFilter = ""
|
labelFilter = ""
|
||||||
|
enableStats = true
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -74,7 +75,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
update := toSubscribeUpdate(tx.Slot, rawTx)
|
update := toSubscribeUpdate(tx.Slot, rawTx)
|
||||||
signals := parseSignals(context.Background(), update)
|
signals := shreder.ParseTransaction(update, nil, enableStats)
|
||||||
if len(signals) == 0 {
|
if len(signals) == 0 {
|
||||||
fmt.Println("no signals parsed")
|
fmt.Println("no signals parsed")
|
||||||
return
|
return
|
||||||
@@ -82,6 +83,9 @@ func main() {
|
|||||||
|
|
||||||
printed := false
|
printed := false
|
||||||
for _, signal := range signals {
|
for _, signal := range signals {
|
||||||
|
if signal == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if labelFilter != "" && signal.Label != labelFilter {
|
if labelFilter != "" && signal.Label != labelFilter {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -103,6 +107,9 @@ func main() {
|
|||||||
fmt.Println("no matching signal parsed, dump all signals:")
|
fmt.Println("no matching signal parsed, dump all signals:")
|
||||||
}
|
}
|
||||||
for _, signal := range signals {
|
for _, signal := range signals {
|
||||||
|
if signal == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
output, err := json.MarshalIndent(signal, "", " ")
|
output, err := json.MarshalIndent(signal, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("marshal signal failed: %v", err)
|
log.Fatalf("marshal signal failed: %v", err)
|
||||||
@@ -111,24 +118,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseSignals(ctx context.Context, update *shreder.SubscribeUpdateTransaction) []shreder.TxSignal {
|
|
||||||
signalsCh := make(chan shreder.TxSignal, 64)
|
|
||||||
done := make(chan struct{})
|
|
||||||
go func() {
|
|
||||||
shreder.ParseTransactionForSubscribe(ctx, update, nil, signalsCh, done)
|
|
||||||
}()
|
|
||||||
go func() {
|
|
||||||
<-done
|
|
||||||
close(signalsCh)
|
|
||||||
}()
|
|
||||||
|
|
||||||
signals := make([]shreder.TxSignal, 0)
|
|
||||||
for signal := range signalsCh {
|
|
||||||
signals = append(signals, signal)
|
|
||||||
}
|
|
||||||
return signals
|
|
||||||
}
|
|
||||||
|
|
||||||
func toSubscribeUpdate(slot uint64, tx *solana.Transaction) *shreder.SubscribeUpdateTransaction {
|
func toSubscribeUpdate(slot uint64, tx *solana.Transaction) *shreder.SubscribeUpdateTransaction {
|
||||||
signatures := make([][]byte, len(tx.Signatures))
|
signatures := make([][]byte, len(tx.Signatures))
|
||||||
for i, sig := range tx.Signatures {
|
for i, sig := range tx.Signatures {
|
||||||
|
|||||||
46
go.mod
46
go.mod
@@ -1,50 +1,50 @@
|
|||||||
module github.com/samlior/libsam/v2
|
module github.com/samlior/libsam
|
||||||
|
|
||||||
go 1.25.1
|
go 1.25.1
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/BlockRazorinc/solana-trader-client-go v0.0.0-20250908052524-06493dcc1bb4
|
github.com/BlockRazorinc/solana-trader-client-go v0.0.0-20250722092120-44561cb37455
|
||||||
github.com/gagliardetto/binary v0.8.0
|
github.com/gagliardetto/binary v0.8.0
|
||||||
github.com/gagliardetto/solana-go v1.14.0
|
github.com/gagliardetto/solana-go v1.12.0
|
||||||
github.com/hashicorp/golang-lru/v2 v2.0.7
|
github.com/hashicorp/golang-lru/v2 v2.0.7
|
||||||
github.com/mr-tron/base58 v1.2.0
|
github.com/mr-tron/base58 v1.2.0
|
||||||
github.com/near/borsh-go v0.3.2-0.20220516180422-1ff87d108454
|
github.com/near/borsh-go v0.3.2-0.20220516180422-1ff87d108454
|
||||||
github.com/panjf2000/ants/v2 v2.11.4
|
github.com/panjf2000/ants/v2 v2.11.4
|
||||||
github.com/quic-go/quic-go v0.59.0
|
github.com/quic-go/quic-go v0.58.0
|
||||||
github.com/shopspring/decimal v1.4.0
|
github.com/shopspring/decimal v1.4.0
|
||||||
google.golang.org/grpc v1.78.0
|
google.golang.org/grpc v1.75.0
|
||||||
google.golang.org/protobuf v1.36.11
|
google.golang.org/protobuf v1.36.10
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
filippo.io/edwards25519 v1.1.0 // indirect
|
filippo.io/edwards25519 v1.0.0-rc.1 // indirect
|
||||||
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
|
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
|
||||||
github.com/blendle/zapdriver v1.3.1 // indirect
|
github.com/blendle/zapdriver v1.3.1 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/fatih/color v1.18.0 // indirect
|
github.com/fatih/color v1.9.0 // indirect
|
||||||
github.com/gagliardetto/treeout v0.1.4 // indirect
|
github.com/gagliardetto/treeout v0.1.4 // indirect
|
||||||
github.com/google/uuid v1.6.0 // indirect
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
github.com/json-iterator/go v1.1.12 // indirect
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/klauspost/compress v1.18.3 // indirect
|
github.com/klauspost/compress v1.13.6 // indirect
|
||||||
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
|
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
|
||||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
github.com/mattn/go-colorable v0.1.4 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.11 // indirect
|
||||||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 // indirect
|
github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 // indirect
|
||||||
github.com/streamingfast/logging v0.0.0-20260108192805-38f96de0a641 // indirect
|
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 // indirect
|
||||||
go.mongodb.org/mongo-driver v1.17.7 // indirect
|
go.mongodb.org/mongo-driver v1.12.2 // indirect
|
||||||
go.uber.org/atomic v1.11.0 // indirect
|
go.uber.org/atomic v1.7.0 // indirect
|
||||||
go.uber.org/multierr v1.11.0 // indirect
|
go.uber.org/multierr v1.6.0 // indirect
|
||||||
go.uber.org/ratelimit v0.2.0 // indirect
|
go.uber.org/ratelimit v0.2.0 // indirect
|
||||||
go.uber.org/zap v1.27.1 // indirect
|
go.uber.org/zap v1.21.0 // indirect
|
||||||
golang.org/x/crypto v0.47.0 // indirect
|
golang.org/x/crypto v0.44.0 // indirect
|
||||||
golang.org/x/net v0.49.0 // indirect
|
golang.org/x/net v0.47.0 // indirect
|
||||||
golang.org/x/sync v0.19.0 // indirect
|
golang.org/x/sync v0.18.0 // indirect
|
||||||
golang.org/x/sys v0.40.0 // indirect
|
golang.org/x/sys v0.38.0 // indirect
|
||||||
golang.org/x/term v0.39.0 // indirect
|
golang.org/x/term v0.37.0 // indirect
|
||||||
golang.org/x/text v0.33.0 // indirect
|
golang.org/x/text v0.31.0 // indirect
|
||||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
|
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 // indirect
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
140
go.sum
140
go.sum
@@ -1,25 +1,26 @@
|
|||||||
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU=
|
||||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
|
||||||
github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI=
|
github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI=
|
||||||
github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE=
|
github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE=
|
||||||
github.com/BlockRazorinc/solana-trader-client-go v0.0.0-20250908052524-06493dcc1bb4 h1:yvrhmN9vQIrquQP1fYul30khwfoE8oEL0VmwFZ37Mq8=
|
github.com/BlockRazorinc/solana-trader-client-go v0.0.0-20250722092120-44561cb37455 h1:MMc4/hemlMtG76VkDZt6zNL0u+OwNYBCNp2KX5jqolQ=
|
||||||
github.com/BlockRazorinc/solana-trader-client-go v0.0.0-20250908052524-06493dcc1bb4/go.mod h1:vKj1SKlrekR9fuZgWQNNAWt/PUZIfzpGjDpIcbf1kT0=
|
github.com/BlockRazorinc/solana-trader-client-go v0.0.0-20250722092120-44561cb37455/go.mod h1:vKj1SKlrekR9fuZgWQNNAWt/PUZIfzpGjDpIcbf1kT0=
|
||||||
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI=
|
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI=
|
||||||
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg=
|
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg=
|
||||||
|
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
|
||||||
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||||
github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE=
|
github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE=
|
||||||
github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc=
|
github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
|
github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s=
|
||||||
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
|
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||||
github.com/gagliardetto/binary v0.8.0 h1:U9ahc45v9HW0d15LoN++vIXSJyqR/pWw8DDlhd7zvxg=
|
github.com/gagliardetto/binary v0.8.0 h1:U9ahc45v9HW0d15LoN++vIXSJyqR/pWw8DDlhd7zvxg=
|
||||||
github.com/gagliardetto/binary v0.8.0/go.mod h1:2tfj51g5o9dnvsc+fL3Jxr22MuWzYXwx9wEoN0XQ7/c=
|
github.com/gagliardetto/binary v0.8.0/go.mod h1:2tfj51g5o9dnvsc+fL3Jxr22MuWzYXwx9wEoN0XQ7/c=
|
||||||
github.com/gagliardetto/gofuzz v1.2.2 h1:XL/8qDMzcgvR4+CyRQW9UGdwPRPMHVJfqQ/uMvSUuQw=
|
github.com/gagliardetto/gofuzz v1.2.2 h1:XL/8qDMzcgvR4+CyRQW9UGdwPRPMHVJfqQ/uMvSUuQw=
|
||||||
github.com/gagliardetto/gofuzz v1.2.2/go.mod h1:bkH/3hYLZrMLbfYWA0pWzXmi5TTRZnu4pMGZBkqMKvY=
|
github.com/gagliardetto/gofuzz v1.2.2/go.mod h1:bkH/3hYLZrMLbfYWA0pWzXmi5TTRZnu4pMGZBkqMKvY=
|
||||||
github.com/gagliardetto/solana-go v1.14.0 h1:3WfAi70jOOjAJ0deFMjdhFYlLXATF4tOQXsDNWJtOLw=
|
github.com/gagliardetto/solana-go v1.12.0 h1:rzsbilDPj6p+/DOPXBMLhwMZeBgeRuXjm5zQFCoXgsg=
|
||||||
github.com/gagliardetto/solana-go v1.14.0/go.mod h1:l/qqqIN6qJJPtxW/G1PF4JtcE3Zg2vD2EliZrr9Gn5k=
|
github.com/gagliardetto/solana-go v1.12.0/go.mod h1:l/qqqIN6qJJPtxW/G1PF4JtcE3Zg2vD2EliZrr9Gn5k=
|
||||||
github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw=
|
github.com/gagliardetto/treeout v0.1.4 h1:ozeYerrLCmCubo1TcIjFiOWTTGteOOHND1twdFpgwaw=
|
||||||
github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok=
|
github.com/gagliardetto/treeout v0.1.4/go.mod h1:loUefvXTrlRG5rYmJmExNryyBRh8f89VZhmMOyCyqok=
|
||||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||||
@@ -28,6 +29,8 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
|||||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||||
|
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||||
|
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
@@ -38,18 +41,19 @@ github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyf
|
|||||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||||
github.com/klauspost/compress v1.18.3 h1:9PJRvfbmTabkOX8moIpXPbMMbYN60bWImDDU7L+/6zw=
|
github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc=
|
||||||
github.com/klauspost/compress v1.18.3/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
|
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
|
||||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||||
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
|
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
|
||||||
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
|
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
|
||||||
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
|
github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
|
||||||
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
|
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||||
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.11 h1:FxPOTFNqGkuDUGi3H/qkUbQO4ZiBa2brKq5r0l8TGeM=
|
||||||
|
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
|
||||||
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
|
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
|
||||||
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
|
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
@@ -57,6 +61,7 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w
|
|||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||||
|
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
|
||||||
github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 h1:mPMvm6X6tf4w8y7j9YIt6V9jfWhL6QlbEc7CCmeQlWk=
|
github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 h1:mPMvm6X6tf4w8y7j9YIt6V9jfWhL6QlbEc7CCmeQlWk=
|
||||||
github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1/go.mod h1:ye2e/VUEtE2BHE+G/QcKkcLQVAEJoYRFj5VUOQatCRE=
|
github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1/go.mod h1:ye2e/VUEtE2BHE+G/QcKkcLQVAEJoYRFj5VUOQatCRE=
|
||||||
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
|
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
|
||||||
@@ -68,16 +73,17 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y
|
|||||||
github.com/panjf2000/ants/v2 v2.11.4 h1:UJQbtN1jIcI5CYNocTj0fuAUYvsLjPoYi0YuhqV/Y48=
|
github.com/panjf2000/ants/v2 v2.11.4 h1:UJQbtN1jIcI5CYNocTj0fuAUYvsLjPoYi0YuhqV/Y48=
|
||||||
github.com/panjf2000/ants/v2 v2.11.4/go.mod h1:8u92CYMUc6gyvTIw8Ru7Mt7+/ESnJahz5EVtqfrilek=
|
github.com/panjf2000/ants/v2 v2.11.4/go.mod h1:8u92CYMUc6gyvTIw8Ru7Mt7+/ESnJahz5EVtqfrilek=
|
||||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
|
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||||
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/quic-go/quic-go v0.59.0 h1:OLJkp1Mlm/aS7dpKgTc6cnpynnD2Xg7C1pwL6vy/SAw=
|
github.com/quic-go/quic-go v0.58.0 h1:ggY2pvZaVdB9EyojxL1p+5mptkuHyX5MOSv4dgWF4Ug=
|
||||||
github.com/quic-go/quic-go v0.59.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU=
|
github.com/quic-go/quic-go v0.58.0/go.mod h1:upnsH4Ju1YkqpLXC305eW3yDZ4NfnNbmQRCMWS58IKU=
|
||||||
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||||
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
|
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
|
||||||
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
|
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
|
||||||
|
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 h1:RN5mrigyirb8anBEtdjtHFIufXdacyTi6i4KBfeNXeo=
|
||||||
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091/go.mod h1:VlduQ80JcGJSargkRU4Sg9Xo63wZD/l8A5NC/Uo1/uU=
|
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091/go.mod h1:VlduQ80JcGJSargkRU4Sg9Xo63wZD/l8A5NC/Uo1/uU=
|
||||||
github.com/streamingfast/logging v0.0.0-20260108192805-38f96de0a641 h1:dI+b2TyFS0rJw1xVGzxBBvn/RrSgBpqM/RjwDInxEfo=
|
|
||||||
github.com/streamingfast/logging v0.0.0-20260108192805-38f96de0a641/go.mod h1:fJ5nP7ZSMB4MQQ6RM7cF+LiSQ43b5cVletcSUNL8z2M=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
@@ -86,94 +92,110 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu
|
|||||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||||
github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE=
|
github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE=
|
||||||
github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU=
|
github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU=
|
||||||
|
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
|
||||||
|
github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4=
|
||||||
|
github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=
|
||||||
|
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
|
||||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||||
go.mongodb.org/mongo-driver v1.17.7 h1:a9w+U3Vt67eYzcfq3k/OAv284/uUUkL0uP75VE5rCOU=
|
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||||
go.mongodb.org/mongo-driver v1.17.7/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ=
|
go.mongodb.org/mongo-driver v1.12.2 h1:gbWY1bJkkmUB9jjZzcdhOL8O85N9H+Vvsf2yFN0RDws=
|
||||||
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
|
go.mongodb.org/mongo-driver v1.12.2/go.mod h1:/rGBTebI3XYboVmgz+Wv3Bcbl3aD0QF9zl6kDDw18rQ=
|
||||||
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
|
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||||
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
|
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||||
go.opentelemetry.io/otel v1.38.0/go.mod h1:zcmtmQ1+YmQM9wrNsTGV/q/uyusom3P8RxwExxkZhjM=
|
go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
|
||||||
go.opentelemetry.io/otel/metric v1.38.0 h1:Kl6lzIYGAh5M159u9NgiRkmoMKjvbsKtYRwgfrA6WpA=
|
go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I=
|
||||||
go.opentelemetry.io/otel/metric v1.38.0/go.mod h1:kB5n/QoRM8YwmUahxvI3bO34eVtQf2i4utNVLr9gEmI=
|
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||||
go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5b+E=
|
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||||
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
|
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||||
go.opentelemetry.io/otel/sdk/metric v1.38.0 h1:aSH66iL0aZqo//xXzQLYozmWrXxyFkBJ6qT5wthqPoM=
|
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||||
go.opentelemetry.io/otel/sdk/metric v1.38.0/go.mod h1:dg9PBnW9XdQ1Hd6ZnRz689CbtrUp0wMMs9iPcgT9EZA=
|
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||||
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
|
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||||
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
|
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||||
|
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||||
|
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
|
||||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||||
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
|
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
|
||||||
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
|
|
||||||
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
||||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
|
||||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
|
||||||
go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko=
|
go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko=
|
||||||
go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o=
|
go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o=
|
||||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
||||||
|
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
|
||||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||||
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
|
|
||||||
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
|
|
||||||
go.uber.org/ratelimit v0.2.0 h1:UQE2Bgi7p2B85uP5dC2bbRtig0C+OeNRnNEafLjsLPA=
|
go.uber.org/ratelimit v0.2.0 h1:UQE2Bgi7p2B85uP5dC2bbRtig0C+OeNRnNEafLjsLPA=
|
||||||
go.uber.org/ratelimit v0.2.0/go.mod h1:YYBV4e4naJvhpitQrWJu1vCpgB7CboMe0qhltKt6mUg=
|
go.uber.org/ratelimit v0.2.0/go.mod h1:YYBV4e4naJvhpitQrWJu1vCpgB7CboMe0qhltKt6mUg=
|
||||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||||
|
go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
|
||||||
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
|
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
|
||||||
go.uber.org/zap v1.27.1 h1:08RqriUEv8+ArZRYSTXy1LeBScaMpVSTBhCeaZYfMYc=
|
|
||||||
go.uber.org/zap v1.27.1/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
|
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||||
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8=
|
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||||
golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A=
|
golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU=
|
||||||
|
golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc=
|
||||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
||||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||||
|
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||||
|
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||||
golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o=
|
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||||
golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8=
|
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||||
|
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
|
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
|
||||||
|
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
|
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
|
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
|
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||||
|
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||||
golang.org/x/term v0.39.0 h1:RclSuaJf32jOqZz74CkPA9qFuVTX7vhLlpfj/IGWlqY=
|
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||||
golang.org/x/term v0.39.0/go.mod h1:yxzUCTP/U+FzoxfdKmLaA0RV1WgE0VY7hXBwKtY/4ww=
|
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
|
||||||
|
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
|
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||||
golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
|
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||||
|
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||||
|
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||||
|
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
|
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs=
|
||||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||||
|
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
||||||
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
|
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 h1:H86B94AW+VfJWDqFeEbBPhEtHzJwJfTbgE2lZa54ZAQ=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda h1:i/Q+bfisr7gq6feoJnS/DlpdwEL4ihp41fvRiM3Ork0=
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ=
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20251029180050-ab9386a59fda/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
|
||||||
google.golang.org/grpc v1.78.0 h1:K1XZG/yGDJnzMdd/uZHAkVqJE+xIDOcmdSFZkBUicNc=
|
google.golang.org/grpc v1.75.0 h1:+TW+dqTd2Biwe6KKfhE5JpiYIBWq865PhKGSXiivqt4=
|
||||||
google.golang.org/grpc v1.78.0/go.mod h1:I47qjTo4OKbMkjA/aOOwxDIiPSBofUtQUI5EfpWvW7U=
|
google.golang.org/grpc v1.75.0/go.mod h1:JtPAzKiq4v1xcAB2hydNlWI2RnF85XXcV0mhKXr2ecQ=
|
||||||
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
|
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
|
||||||
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package consts
|
package consts
|
||||||
|
|
||||||
import "github.com/samlior/libsam/v2/pkg/enum"
|
import "github.com/samlior/libsam/pkg/enum"
|
||||||
|
|
||||||
var SWQoSFeeAddresses = map[string]string{
|
var SWQoSFeeAddresses = map[string]string{
|
||||||
"96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5": enum.SWQoSAgentJito,
|
"96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5": enum.SWQoSAgentJito,
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gagliardetto/solana-go"
|
|
||||||
"github.com/gagliardetto/solana-go/rpc"
|
"github.com/gagliardetto/solana-go/rpc"
|
||||||
"github.com/panjf2000/ants/v2"
|
"github.com/panjf2000/ants/v2"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
@@ -24,10 +23,6 @@ type Client struct {
|
|||||||
tableLoader *AddressTables
|
tableLoader *AddressTables
|
||||||
subscription map[string]*SubscribeRequestFilterTransactions
|
subscription map[string]*SubscribeRequestFilterTransactions
|
||||||
|
|
||||||
entriesFilter map[string]FilterParams
|
|
||||||
|
|
||||||
parser map[solana.PublicKey]Handler
|
|
||||||
|
|
||||||
pool *ants.Pool
|
pool *ants.Pool
|
||||||
|
|
||||||
lastSlot uint64
|
lastSlot uint64
|
||||||
@@ -38,8 +33,6 @@ type ClientOpts struct {
|
|||||||
blockStats bool
|
blockStats bool
|
||||||
showTableLoaded bool
|
showTableLoaded bool
|
||||||
logParseStats bool
|
logParseStats bool
|
||||||
|
|
||||||
parser map[solana.PublicKey]Handler
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type ClientOption func(*ClientOpts)
|
type ClientOption func(*ClientOpts)
|
||||||
@@ -50,12 +43,6 @@ func ShowTableLoaded(enable bool) ClientOption {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func WithCustomParsers(parsers map[solana.PublicKey]Handler) ClientOption {
|
|
||||||
return func(opts *ClientOpts) {
|
|
||||||
opts.parser = parsers
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func BlocksStats(enable bool) ClientOption {
|
func BlocksStats(enable bool) ClientOption {
|
||||||
return func(opts *ClientOpts) {
|
return func(opts *ClientOpts) {
|
||||||
opts.blockStats = enable
|
opts.blockStats = enable
|
||||||
@@ -95,33 +82,16 @@ func NewShrederClient(
|
|||||||
blockStats: false,
|
blockStats: false,
|
||||||
showTableLoaded: true,
|
showTableLoaded: true,
|
||||||
logParseStats: false,
|
logParseStats: false,
|
||||||
parser: registered,
|
|
||||||
}
|
}
|
||||||
for _, option := range options {
|
for _, option := range options {
|
||||||
option(o)
|
option(o)
|
||||||
}
|
}
|
||||||
filterParams := make(map[string]FilterParams)
|
|
||||||
for name, params := range subscription {
|
|
||||||
filterParams[name] = FilterParams{
|
|
||||||
Exclude: parseAccountArray(params.AccountExclude),
|
|
||||||
Require: parseAccountArray(params.AccountRequired),
|
|
||||||
Include: parseAccountArray(params.AccountInclude),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if len(filterParams) == 0 {
|
|
||||||
filterParams["default"] = FilterParams{
|
|
||||||
Include: defaultFilterAccount,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
s := &Client{
|
s := &Client{
|
||||||
conn: conn,
|
conn: conn,
|
||||||
client: NewShrederServiceClient(conn),
|
client: NewShrederServiceClient(conn),
|
||||||
subscription: subscription,
|
subscription: subscription,
|
||||||
entriesFilter: filterParams,
|
tableLoader: NewAddressTables(rpcClient, o.showTableLoaded),
|
||||||
parser: o.parser,
|
pool: pool,
|
||||||
tableLoader: NewAddressTables(rpcClient, o.showTableLoaded),
|
|
||||||
pool: pool,
|
|
||||||
|
|
||||||
enableBlockStats: o.blockStats,
|
enableBlockStats: o.blockStats,
|
||||||
enableParseStats: o.logParseStats,
|
enableParseStats: o.logParseStats,
|
||||||
@@ -171,17 +141,10 @@ func (c *Client) ReadEntriesSync(ctx context.Context, txCh chan<- TxSignal) erro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
entries := response.Entries
|
||||||
|
|
||||||
err = c.pool.Submit(func() {
|
err = c.pool.Submit(func() {
|
||||||
err := entriesToVersionedTransaction(slot, bytes.NewReader(response.Entries), func(versioned VersionedTransaction) {
|
ParseTransactionForEntries(ctx, slot, bytes.NewReader(entries), c.tableLoader, txCh)
|
||||||
// filter out vote transactions
|
|
||||||
if FilterTransactionForEntriesWithFilter(versioned, c.entriesFilter) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
go ParseTransactionWithHandler(ctx, versioned, c.tableLoader, txCh, c.parser)
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
logger.Debug("txparser: failed to parse entries", "error", err)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
if err != nil && errors.Is(err, ants.ErrPoolOverload) {
|
if err != nil && errors.Is(err, ants.ErrPoolOverload) {
|
||||||
logger.Warn("task pool is full")
|
logger.Warn("task pool is full")
|
||||||
@@ -226,15 +189,10 @@ func (c *Client) ReadSync(ctx context.Context, txCh chan<- TxSignal) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// txData := response.Transaction
|
txData := response.Transaction
|
||||||
|
|
||||||
err := c.pool.Submit(func() {
|
err := c.pool.Submit(func() {
|
||||||
versioned, err := toVersionedTransaction(response.Transaction)
|
ParseTransactionForSubscribe(ctx, txData, c.tableLoader, txCh)
|
||||||
if err != nil {
|
|
||||||
logger.Debug("txparser: failed to convert to versioned transaction", "error", err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ParseTransactionWithHandler(ctx, versioned, c.tableLoader, txCh, c.parser)
|
|
||||||
})
|
})
|
||||||
if err != nil && errors.Is(err, ants.ErrPoolOverload) {
|
if err != nil && errors.Is(err, ants.ErrPoolOverload) {
|
||||||
logger.Warn("task pool is full")
|
logger.Warn("task pool is full")
|
||||||
@@ -246,11 +204,3 @@ func (c *Client) ReadSync(ctx context.Context, txCh chan<- TxSignal) error {
|
|||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseAccountArray(accountArray []string) []solana.PublicKey {
|
|
||||||
var result []solana.PublicKey
|
|
||||||
for _, acc := range accountArray {
|
|
||||||
result = append(result, solana.MustPublicKeyFromBase58(acc))
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -29,8 +29,9 @@ func (wr *wrapperReader) Skip(n int) error {
|
|||||||
func (wr *wrapperReader) ReadCompactU16() (uint16, error) {
|
func (wr *wrapperReader) ReadCompactU16() (uint16, error) {
|
||||||
ln := 0
|
ln := 0
|
||||||
size := 0
|
size := 0
|
||||||
var buf [1]byte
|
|
||||||
for i := 0; i < 3; i++ {
|
for i := 0; i < 3; i++ {
|
||||||
|
var buf [1]byte
|
||||||
_, err := io.ReadFull(wr, buf[:])
|
_, err := io.ReadFull(wr, buf[:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, fmt.Errorf("unable to decode compact u16 at %d: %w", i, err)
|
return 0, fmt.Errorf("unable to decode compact u16 at %d: %w", i, err)
|
||||||
@@ -60,11 +61,11 @@ func (wr *wrapperReader) ReadByte() (uint8, error) {
|
|||||||
return buf[0], nil
|
return buf[0], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ResizeSlice[T any](slice []T, newSize int) []T {
|
func ResizeSlice[T any](slice []T, newSize int) {
|
||||||
if cap(slice) < newSize {
|
if cap(slice) < newSize {
|
||||||
slice = append(slice, make([]T, newSize-len(slice))...)
|
slice = append(slice, make([]T, newSize-len(slice))...)
|
||||||
}
|
}
|
||||||
return slice[:newSize]
|
slice = slice[:newSize]
|
||||||
}
|
}
|
||||||
|
|
||||||
// entriesToVersionedTransaction converts raw entry bytes to versioned transactions.
|
// entriesToVersionedTransaction converts raw entry bytes to versioned transactions.
|
||||||
@@ -83,7 +84,7 @@ func entriesToVersionedTransaction(slot uint64, data io.Reader, callback func(tx
|
|||||||
// return nil, nil
|
// return nil, nil
|
||||||
//}
|
//}
|
||||||
if entriesNum > 2048 {
|
if entriesNum > 2048 {
|
||||||
return fmt.Errorf("entries num is too large: %d > %d", entriesNum, 2048)
|
return fmt.Errorf("entries num is too large: %d > %d", entriesNum, 1024)
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := uint64(0); i < entriesNum; i++ {
|
for i := uint64(0); i < entriesNum; i++ {
|
||||||
@@ -112,7 +113,7 @@ func entriesToVersionedTransaction(slot uint64, data io.Reader, callback func(tx
|
|||||||
versioned := VersionedTransaction{}
|
versioned := VersionedTransaction{}
|
||||||
versioned.Block = slot
|
versioned.Block = slot
|
||||||
versioned.Time = time.Now()
|
versioned.Time = time.Now()
|
||||||
versioned.Signatures = ResizeSlice(versioned.Signatures, int(numSignatures))
|
ResizeSlice(versioned.Signatures, int(numSignatures))
|
||||||
for k := 0; k < int(numSignatures); k++ {
|
for k := 0; k < int(numSignatures); k++ {
|
||||||
_, err = io.ReadFull(b, versioned.Signatures[k][:])
|
_, err = io.ReadFull(b, versioned.Signatures[k][:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -150,7 +151,7 @@ func entriesToVersionedTransaction(slot uint64, data io.Reader, callback func(tx
|
|||||||
return fmt.Errorf("numAccountKeys %d exceeds maximum in entry %d, txn %d", numAccountKeys, i, j)
|
return fmt.Errorf("numAccountKeys %d exceeds maximum in entry %d, txn %d", numAccountKeys, i, j)
|
||||||
}
|
}
|
||||||
|
|
||||||
versioned.StaticAccountKeys = ResizeSlice(versioned.StaticAccountKeys, int(numAccountKeys))
|
ResizeSlice(versioned.StaticAccountKeys, int(numAccountKeys))
|
||||||
|
|
||||||
for k := 0; k < int(numAccountKeys); k++ {
|
for k := 0; k < int(numAccountKeys); k++ {
|
||||||
_, err = io.ReadFull(b, versioned.StaticAccountKeys[k][:])
|
_, err = io.ReadFull(b, versioned.StaticAccountKeys[k][:])
|
||||||
@@ -175,7 +176,7 @@ func entriesToVersionedTransaction(slot uint64, data io.Reader, callback func(tx
|
|||||||
if numInstructions >= 256 {
|
if numInstructions >= 256 {
|
||||||
return fmt.Errorf("numInstructions %d exceeds maximum in entry %d, txn %d, txHash: %s", numInstructions, i, j, versioned.GetSignature())
|
return fmt.Errorf("numInstructions %d exceeds maximum in entry %d, txn %d, txHash: %s", numInstructions, i, j, versioned.GetSignature())
|
||||||
}
|
}
|
||||||
versioned.Instructions = ResizeSlice(versioned.Instructions, int(numInstructions))
|
ResizeSlice(versioned.Instructions, int(numInstructions))
|
||||||
for k := 0; k < int(numInstructions); k++ {
|
for k := 0; k < int(numInstructions); k++ {
|
||||||
versioned.Instructions[k].ProgramIDIndex, err = b.ReadByte()
|
versioned.Instructions[k].ProgramIDIndex, err = b.ReadByte()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -190,7 +191,7 @@ func entriesToVersionedTransaction(slot uint64, data io.Reader, callback func(tx
|
|||||||
if numAccounts >= 256 {
|
if numAccounts >= 256 {
|
||||||
return fmt.Errorf("numAccounts %d exceeds maximum for ix[%d] in entry %d, txn %d", numAccounts, k, i, j)
|
return fmt.Errorf("numAccounts %d exceeds maximum for ix[%d] in entry %d, txn %d", numAccounts, k, i, j)
|
||||||
}
|
}
|
||||||
versioned.Instructions[k].Accounts = ResizeSlice(versioned.Instructions[k].Accounts, int(numAccounts))
|
ResizeSlice(versioned.Instructions[k].Accounts, int(numAccounts))
|
||||||
|
|
||||||
//.AccountsLen = int(numAccounts)
|
//.AccountsLen = int(numAccounts)
|
||||||
if numAccounts != 0 {
|
if numAccounts != 0 {
|
||||||
@@ -207,7 +208,7 @@ func entriesToVersionedTransaction(slot uint64, data io.Reader, callback func(tx
|
|||||||
if dataLen > 2048 {
|
if dataLen > 2048 {
|
||||||
return fmt.Errorf("mx.Instructions[%d].Data length %d exceeds maximum in entry %d, txn %d, txHash: %s", k, dataLen, i, j, versioned.GetSignature())
|
return fmt.Errorf("mx.Instructions[%d].Data length %d exceeds maximum in entry %d, txn %d, txHash: %s", k, dataLen, i, j, versioned.GetSignature())
|
||||||
}
|
}
|
||||||
versioned.Instructions[k].Data = ResizeSlice(versioned.Instructions[k].Data, int(dataLen))
|
ResizeSlice(versioned.Instructions[k].Accounts, int(numAccounts))
|
||||||
if dataLen > 0 {
|
if dataLen > 0 {
|
||||||
_, err = io.ReadFull(b, versioned.Instructions[k].Data)
|
_, err = io.ReadFull(b, versioned.Instructions[k].Data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -225,7 +226,7 @@ func entriesToVersionedTransaction(slot uint64, data io.Reader, callback func(tx
|
|||||||
if numLookups >= 32 {
|
if numLookups >= 32 {
|
||||||
return fmt.Errorf("numLookups %d exceeds maximum in entry %d, txn %d", numLookups, i, j)
|
return fmt.Errorf("numLookups %d exceeds maximum in entry %d, txn %d", numLookups, i, j)
|
||||||
}
|
}
|
||||||
versioned.AddressTableLookups = ResizeSlice(versioned.AddressTableLookups, int(numLookups))
|
ResizeSlice(versioned.AddressTableLookups, int(numLookups))
|
||||||
for k := uint8(0); k < numLookups; k++ {
|
for k := uint8(0); k < numLookups; k++ {
|
||||||
_, err = io.ReadFull(b, versioned.AddressTableLookups[k].AccountKey[:])
|
_, err = io.ReadFull(b, versioned.AddressTableLookups[k].AccountKey[:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -239,7 +240,7 @@ func entriesToVersionedTransaction(slot uint64, data io.Reader, callback func(tx
|
|||||||
if numWritable >= 256 {
|
if numWritable >= 256 {
|
||||||
return fmt.Errorf("numWritableIndexes %d exceeds maximum for lookup[%d] in entry %d, txn %d", numWritable, k, i, j)
|
return fmt.Errorf("numWritableIndexes %d exceeds maximum for lookup[%d] in entry %d, txn %d", numWritable, k, i, j)
|
||||||
}
|
}
|
||||||
versioned.AddressTableLookups[k].WritableIndexes = ResizeSlice(versioned.AddressTableLookups[k].WritableIndexes, int(numWritable))
|
ResizeSlice(versioned.AddressTableLookups[k].WritableIndexes, int(numWritable))
|
||||||
if numWritable > 0 {
|
if numWritable > 0 {
|
||||||
_, err = io.ReadFull(b, versioned.AddressTableLookups[k].WritableIndexes)
|
_, err = io.ReadFull(b, versioned.AddressTableLookups[k].WritableIndexes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -255,7 +256,7 @@ func entriesToVersionedTransaction(slot uint64, data io.Reader, callback func(tx
|
|||||||
if numReadonly > 256 {
|
if numReadonly > 256 {
|
||||||
return fmt.Errorf("numReadonlyIndexes %d exceeds maximum for lookup[%d] in entry %d, txn %d", numReadonly, k, i, j)
|
return fmt.Errorf("numReadonlyIndexes %d exceeds maximum for lookup[%d] in entry %d, txn %d", numReadonly, k, i, j)
|
||||||
}
|
}
|
||||||
versioned.AddressTableLookups[k].ReadonlyIndexes = ResizeSlice(versioned.AddressTableLookups[k].ReadonlyIndexes, int(numReadonly))
|
ResizeSlice(versioned.AddressTableLookups[k].ReadonlyIndexes, int(numReadonly))
|
||||||
if numReadonly > 0 {
|
if numReadonly > 0 {
|
||||||
_, err = io.ReadFull(b, versioned.AddressTableLookups[k].ReadonlyIndexes)
|
_, err = io.ReadFull(b, versioned.AddressTableLookups[k].ReadonlyIndexes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,118 +0,0 @@
|
|||||||
package shreder
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"encoding/binary"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/gagliardetto/solana-go"
|
|
||||||
)
|
|
||||||
|
|
||||||
var binanceWalletProgramID = solana.MustPublicKeyFromBase58("B3111yJCeHBcA1bizdJjUFPALfhAfSRnAbJzGUtnt56A")
|
|
||||||
|
|
||||||
const (
|
|
||||||
binanceWalletMinDataLen = 72
|
|
||||||
binanceWalletSolOffset = 23
|
|
||||||
binanceWalletTokenOff = 39
|
|
||||||
binanceWalletSolRepeat = 51
|
|
||||||
binanceWalletSideOff = 71
|
|
||||||
|
|
||||||
binanceWalletPumpBuy = 0x05
|
|
||||||
binanceWalletPumpSell = 0x06
|
|
||||||
)
|
|
||||||
|
|
||||||
var binanceWalletMarker = []byte{0x13, 0x2c, 0x82, 0x94, 0x48, 0x38, 0x2c, 0xee}
|
|
||||||
|
|
||||||
func parseBinanceWalletInstruction(tx VersionedTransaction, instructionIndex int) (TxSignalBatch, error) {
|
|
||||||
if instructionIndex >= len(tx.Instructions) {
|
|
||||||
return nil, fmt.Errorf("instruction index out of bounds")
|
|
||||||
}
|
|
||||||
|
|
||||||
instruction := tx.Instructions[instructionIndex]
|
|
||||||
if len(instruction.Data) < len(binanceWalletMarker) || !bytes.Contains(instruction.Data, binanceWalletMarker) {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
if len(instruction.Data) < binanceWalletMinDataLen {
|
|
||||||
return nil, fmt.Errorf("data too short for binance wallet, len=%d", len(instruction.Data))
|
|
||||||
}
|
|
||||||
|
|
||||||
side := instruction.Data[binanceWalletSideOff]
|
|
||||||
if side != binanceWalletPumpBuy && side != binanceWalletPumpSell {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(instruction.Accounts) <= 8 {
|
|
||||||
return nil, fmt.Errorf("accounts too short")
|
|
||||||
}
|
|
||||||
|
|
||||||
wsolIdx := 7
|
|
||||||
tokenIdx := 8
|
|
||||||
if side == binanceWalletPumpSell {
|
|
||||||
wsolIdx = 8
|
|
||||||
tokenIdx = 7
|
|
||||||
}
|
|
||||||
|
|
||||||
wsolKey, err := tx.GetAccount(int(instruction.Accounts[wsolIdx]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !wsolKey.Equals(solana.WrappedSol) {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
mint, err := tx.GetAccount(int(instruction.Accounts[tokenIdx]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
amountA := binary.LittleEndian.Uint64(instruction.Data[binanceWalletSolOffset : binanceWalletSolOffset+8])
|
|
||||||
if amountA == 0 && len(instruction.Data) >= binanceWalletSolRepeat+8 {
|
|
||||||
repeat := binary.LittleEndian.Uint64(instruction.Data[binanceWalletSolRepeat : binanceWalletSolRepeat+8])
|
|
||||||
if repeat > 0 {
|
|
||||||
amountA = repeat
|
|
||||||
}
|
|
||||||
}
|
|
||||||
amountB := binary.LittleEndian.Uint64(instruction.Data[binanceWalletTokenOff : binanceWalletTokenOff+8])
|
|
||||||
|
|
||||||
solAmount := amountA
|
|
||||||
tokenAmount := amountB
|
|
||||||
if side == binanceWalletPumpSell {
|
|
||||||
solAmount = amountB
|
|
||||||
tokenAmount = amountA
|
|
||||||
}
|
|
||||||
|
|
||||||
maker := ""
|
|
||||||
if len(tx.StaticAccountKeys) > 0 {
|
|
||||||
maker = tx.StaticAccountKeys[0].String()
|
|
||||||
} else if len(instruction.Accounts) > 0 {
|
|
||||||
key, err := tx.GetAccount(int(instruction.Accounts[0]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
maker = key.String()
|
|
||||||
}
|
|
||||||
|
|
||||||
event := "buy"
|
|
||||||
exactIn := true
|
|
||||||
if side == binanceWalletPumpSell {
|
|
||||||
event = "sell"
|
|
||||||
exactIn = false
|
|
||||||
}
|
|
||||||
|
|
||||||
return TxSignalBatch{&TxSignal{
|
|
||||||
TxHash: tx.Signatures[0].String(),
|
|
||||||
Label: "binancewallet",
|
|
||||||
Maker: maker,
|
|
||||||
Token0Address: mint.String(),
|
|
||||||
Token1Address: wsolMint,
|
|
||||||
Token0Amount: formatTokenAmount(tokenAmount),
|
|
||||||
Token1Amount: formatSolAmount(solAmount),
|
|
||||||
Program: "Pump",
|
|
||||||
Event: event,
|
|
||||||
IsToken2022: false,
|
|
||||||
IsMayhemMode: false,
|
|
||||||
ExactSOL: exactIn,
|
|
||||||
Block: tx.Block,
|
|
||||||
Token0AmountUint64: tokenAmount,
|
|
||||||
Token1AmountUint64: solAmount,
|
|
||||||
}}, nil
|
|
||||||
}
|
|
||||||
@@ -1,134 +0,0 @@
|
|||||||
package shreder
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"encoding/binary"
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/gagliardetto/solana-go"
|
|
||||||
"github.com/shopspring/decimal"
|
|
||||||
)
|
|
||||||
|
|
||||||
var dbotProgramID = solana.MustPublicKeyFromBase58("DBotWvSso9oD1ZB3aHx2LiD2ZoFpF8PbKjaT4uHKLLVs")
|
|
||||||
|
|
||||||
var (
|
|
||||||
dbotPumpFunBuyIX = []byte{0x4e, 0x13, 0x6d, 0x72, 0x3d, 0x72, 0xbe, 0x9d}
|
|
||||||
dbotPumpAmmBuyIX = []byte{0x99, 0x76, 0xb6, 0x1e, 0xe4, 0x03, 0xdc, 0xf4}
|
|
||||||
)
|
|
||||||
|
|
||||||
func parseDbotInstruction(tx VersionedTransaction, instructionIndex int) (TxSignalBatch, error) {
|
|
||||||
if instructionIndex >= len(tx.Instructions) {
|
|
||||||
return nil, fmt.Errorf("instruction index out of bounds")
|
|
||||||
}
|
|
||||||
ix := tx.Instructions[instructionIndex]
|
|
||||||
if len(ix.Data) < 8 {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
isPumpFun := false
|
|
||||||
isPumpAmm := false
|
|
||||||
|
|
||||||
if len(ix.Accounts) > 11 {
|
|
||||||
key, err := tx.GetAccount(int(ix.Accounts[11]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if key.Equals(pumpProgramID) {
|
|
||||||
isPumpFun = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(ix.Accounts) > 16 {
|
|
||||||
key, err := tx.GetAccount(int(ix.Accounts[16]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if key.Equals(pumpAmmProgramID) {
|
|
||||||
isPumpAmm = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
disc := ix.Data[:8]
|
|
||||||
|
|
||||||
if isPumpFun {
|
|
||||||
if !bytes.Equal(disc, dbotPumpFunBuyIX) {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
if len(ix.Data) < 16 {
|
|
||||||
return nil, fmt.Errorf("data too short for dbot pumpfun buy args, len=%d", len(ix.Data))
|
|
||||||
}
|
|
||||||
if len(ix.Accounts) < 3 {
|
|
||||||
return nil, fmt.Errorf("accounts too short")
|
|
||||||
}
|
|
||||||
|
|
||||||
mint, err := tx.GetAccount(int(ix.Accounts[2]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
solAmount := binary.LittleEndian.Uint64(ix.Data[8:16])
|
|
||||||
|
|
||||||
return TxSignalBatch{&TxSignal{
|
|
||||||
TxHash: tx.Signatures[0].String(),
|
|
||||||
Label: "dbot",
|
|
||||||
Maker: tx.StaticAccountKeys[0].String(),
|
|
||||||
Token0Address: mint.String(),
|
|
||||||
Token1Address: wsolMint,
|
|
||||||
Token0Amount: decimal.Zero,
|
|
||||||
Token1Amount: formatSolAmount(solAmount),
|
|
||||||
Program: "Pump",
|
|
||||||
Event: "buy",
|
|
||||||
ExactSOL: true,
|
|
||||||
IsToken2022: false,
|
|
||||||
IsMayhemMode: false,
|
|
||||||
Block: tx.Block,
|
|
||||||
Token0AmountUint64: 0,
|
|
||||||
Token1AmountUint64: solAmount,
|
|
||||||
}}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if isPumpAmm {
|
|
||||||
if !bytes.Equal(disc, dbotPumpAmmBuyIX) {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
if len(ix.Data) < 16 {
|
|
||||||
return nil, fmt.Errorf("data too short for dbot pumpamm buy args, len=%d", len(ix.Data))
|
|
||||||
}
|
|
||||||
if len(ix.Accounts) < 5 {
|
|
||||||
return nil, fmt.Errorf("accounts too short")
|
|
||||||
}
|
|
||||||
|
|
||||||
base, err := tx.GetAccount(int(ix.Accounts[3]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
quote, err := tx.GetAccount(int(ix.Accounts[4]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if !quote.Equals(solana.WrappedSol) {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
solAmount := binary.LittleEndian.Uint64(ix.Data[8:16])
|
|
||||||
|
|
||||||
return TxSignalBatch{&TxSignal{
|
|
||||||
TxHash: tx.Signatures[0].String(),
|
|
||||||
Label: "dbot",
|
|
||||||
Maker: tx.StaticAccountKeys[0].String(),
|
|
||||||
Token0Address: base.String(),
|
|
||||||
Token1Address: wsolMint,
|
|
||||||
Token0Amount: decimal.Zero,
|
|
||||||
Token1Amount: formatSolAmount(solAmount),
|
|
||||||
Program: "PumpAMM",
|
|
||||||
Event: "buy",
|
|
||||||
ExactSOL: true,
|
|
||||||
IsToken2022: false,
|
|
||||||
IsMayhemMode: false,
|
|
||||||
Block: tx.Block,
|
|
||||||
Token0AmountUint64: 0,
|
|
||||||
Token1AmountUint64: solAmount,
|
|
||||||
}}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
@@ -104,7 +104,7 @@ func parseDlmmInstruction(tx VersionedTransaction, instructionIndex int) (TxSign
|
|||||||
return nil, fmt.Errorf("data is empty")
|
return nil, fmt.Errorf("data is empty")
|
||||||
}
|
}
|
||||||
if len(instruction.Accounts) < 13 {
|
if len(instruction.Accounts) < 13 {
|
||||||
return nil, nil // fmt.Errorf("accounts too short")
|
return nil, fmt.Errorf("accounts too short")
|
||||||
}
|
}
|
||||||
|
|
||||||
disc := instruction.Data[:8]
|
disc := instruction.Data[:8]
|
||||||
|
|||||||
@@ -291,205 +291,77 @@ func parseOkxDexRouteV2Instruction(tx VersionedTransaction, instructionIndex int
|
|||||||
return nil, fmt.Errorf("invalid account count: %d", len(ix.Accounts))
|
return nil, fmt.Errorf("invalid account count: %d", len(ix.Accounts))
|
||||||
}
|
}
|
||||||
var (
|
var (
|
||||||
pumpAmmSellAmount uint64
|
inputAmount uint64
|
||||||
pumpAmmBuyAmount uint64
|
routeCount int
|
||||||
pumpFunSellAmount uint64
|
|
||||||
pumpFunBuyAmount uint64
|
|
||||||
pumpAmmSellCount int
|
|
||||||
pumpAmmBuyCount int
|
|
||||||
pumpFunSellCount int
|
|
||||||
pumpFunBuyCount int
|
|
||||||
)
|
)
|
||||||
for _, route := range args.Routes {
|
for _, route := range args.Routes {
|
||||||
if route.Index != 1 {
|
if route.Index == 1 && (route.Dex == OKCV2_PumpfunammSell ||
|
||||||
continue
|
route.Dex == OKCV2_PumpfunSell2) {
|
||||||
}
|
routeCount++
|
||||||
switch route.Dex {
|
inputAmount = args.AmountIn * uint64(route.Weight) / 10000
|
||||||
case OKCV2_PumpfunammSell:
|
|
||||||
pumpAmmSellCount++
|
|
||||||
pumpAmmSellAmount = args.AmountIn * uint64(route.Weight) / 10000
|
|
||||||
case OKCV2_PumpfunammBuy:
|
|
||||||
pumpAmmBuyCount++
|
|
||||||
pumpAmmBuyAmount = args.AmountIn * uint64(route.Weight) / 10000
|
|
||||||
case OKCV2_PumpfunSell2:
|
|
||||||
pumpFunSellCount++
|
|
||||||
pumpFunSellAmount = args.AmountIn * uint64(route.Weight) / 10000
|
|
||||||
case OKCV2_PumpfunBuy2:
|
|
||||||
pumpFunBuyCount++
|
|
||||||
pumpFunBuyAmount = args.AmountIn * uint64(route.Weight) / 10000
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if pumpAmmSellCount > 1 {
|
if routeCount > 1 {
|
||||||
logger.Warn("pumpAmmSwapSell at inputIdx=0: multiple instances found", "tx", tx.Signatures[0].String(), "routeCount", pumpAmmSellCount)
|
logger.Warn("pumpSwapSell at inputIdx=0: multiple instances found", "tx", tx.Signatures[0].String(), "routeCount", routeCount)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
if pumpAmmBuyCount > 1 {
|
if inputAmount == 0 {
|
||||||
logger.Warn("pumpAmmSwapBuy at inputIdx=0: multiple instances found", "tx", tx.Signatures[0].String(), "routeCount", pumpAmmBuyCount)
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
if pumpFunSellCount > 1 {
|
|
||||||
logger.Warn("pumpFunSwapSell at inputIdx=0: multiple instances found", "tx", tx.Signatures[0].String(), "routeCount", pumpFunSellCount)
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
if pumpFunBuyCount > 1 {
|
|
||||||
logger.Warn("pumpFunSwapBuy at inputIdx=0: multiple instances found", "tx", tx.Signatures[0].String(), "routeCount", pumpFunBuyCount)
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
if pumpAmmSellAmount == 0 && pumpAmmBuyAmount == 0 && pumpFunSellAmount == 0 && pumpFunBuyAmount == 0 {
|
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
out := make(TxSignalBatch, 0, 2)
|
srcMint, err := tx.GetAccount(int(ix.Accounts[3]))
|
||||||
|
|
||||||
if pumpFunBuyAmount > 0 || pumpFunSellAmount > 0 {
|
var (
|
||||||
if pumpFunBuyAmount > 0 {
|
srcIdx uint8
|
||||||
if len(ix.Accounts) < 5 {
|
)
|
||||||
return nil, fmt.Errorf("invalid account count: %d", len(ix.Accounts))
|
if len(ix.Accounts) <= 15 {
|
||||||
}
|
return nil, nil
|
||||||
baseMint, err := tx.GetAccount(int(ix.Accounts[4]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
out = append(out, &TxSignal{
|
|
||||||
TxHash: tx.Signatures[0].String(),
|
|
||||||
Maker: tx.StaticAccountKeys[0].String(),
|
|
||||||
Token0Address: baseMint.String(),
|
|
||||||
Token1Address: wsolMint,
|
|
||||||
Token0Amount: decimal.Zero,
|
|
||||||
Token1Amount: formatSolAmount(pumpFunBuyAmount),
|
|
||||||
Event: "buy",
|
|
||||||
Program: "Pump",
|
|
||||||
IsProcessed: false,
|
|
||||||
IsToken2022: false,
|
|
||||||
IsMayhemMode: false,
|
|
||||||
ExactSOL: true,
|
|
||||||
Token0AmountUint64: 0,
|
|
||||||
Token1AmountUint64: pumpFunBuyAmount,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if pumpFunSellAmount > 0 {
|
|
||||||
if len(ix.Accounts) < 4 {
|
|
||||||
return nil, fmt.Errorf("invalid account count: %d", len(ix.Accounts))
|
|
||||||
}
|
|
||||||
baseMint, err := tx.GetAccount(int(ix.Accounts[3]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
out = append(out, &TxSignal{
|
|
||||||
TxHash: tx.Signatures[0].String(),
|
|
||||||
Maker: tx.StaticAccountKeys[0].String(),
|
|
||||||
Token0Address: baseMint.String(),
|
|
||||||
Token1Address: wsolMint,
|
|
||||||
Token0Amount: formatTokenAmount(pumpFunSellAmount),
|
|
||||||
Token1Amount: decimal.Zero,
|
|
||||||
Event: "sell",
|
|
||||||
Program: "Pump",
|
|
||||||
IsProcessed: false,
|
|
||||||
IsToken2022: false,
|
|
||||||
IsMayhemMode: false,
|
|
||||||
ExactSOL: false,
|
|
||||||
Token0AmountUint64: pumpFunSellAmount,
|
|
||||||
Token1AmountUint64: 0,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
accounts := ix.Accounts[14:]
|
||||||
if pumpAmmBuyAmount > 0 || pumpAmmSellAmount > 0 {
|
for i, acctIdx := range accounts {
|
||||||
if len(ix.Accounts) <= 15 {
|
key, err := tx.GetAccount(int(acctIdx))
|
||||||
if len(out) == 0 {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
accounts := ix.Accounts[14:]
|
|
||||||
var pumpAmmIdx uint8
|
|
||||||
for i, acctIdx := range accounts {
|
|
||||||
key, err := tx.GetAccount(int(acctIdx))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if key.Equals(pumpAmmProgramID) {
|
|
||||||
pumpAmmIdx = uint8(i + 6)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if pumpAmmIdx == 0 || int(pumpAmmIdx+1) >= len(accounts) {
|
|
||||||
if len(out) == 0 {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
baseMint, err := tx.GetAccount(int(accounts[pumpAmmIdx]))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
quoteMint, err := tx.GetAccount(int(accounts[pumpAmmIdx+1]))
|
if key.Equals(pumpAmmProgramID) {
|
||||||
if err != nil {
|
srcIdx = uint8(i + 6)
|
||||||
return nil, err
|
break
|
||||||
}
|
|
||||||
if !quoteMint.Equals(solana.WrappedSol) {
|
|
||||||
if len(out) == 0 {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return out, nil
|
|
||||||
}
|
|
||||||
if pumpAmmBuyAmount > 0 {
|
|
||||||
if len(ix.Accounts) < 5 {
|
|
||||||
return nil, fmt.Errorf("invalid account count: %d", len(ix.Accounts))
|
|
||||||
}
|
|
||||||
srcMint, err := tx.GetAccount(int(ix.Accounts[4]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if baseMint.Equals(srcMint) {
|
|
||||||
out = append(out, &TxSignal{
|
|
||||||
TxHash: tx.Signatures[0].String(),
|
|
||||||
Maker: tx.StaticAccountKeys[0].String(),
|
|
||||||
Token0Address: baseMint.String(),
|
|
||||||
Token1Address: wsolMint,
|
|
||||||
Token0Amount: decimal.Zero,
|
|
||||||
Token1Amount: formatSolAmount(pumpAmmBuyAmount),
|
|
||||||
Event: "buy",
|
|
||||||
Program: "PumpAMM",
|
|
||||||
IsProcessed: false,
|
|
||||||
IsToken2022: false,
|
|
||||||
IsMayhemMode: false,
|
|
||||||
ExactSOL: true,
|
|
||||||
Token0AmountUint64: 0,
|
|
||||||
Token1AmountUint64: pumpAmmBuyAmount,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else if pumpAmmSellAmount > 0 {
|
|
||||||
if len(ix.Accounts) < 4 {
|
|
||||||
return nil, fmt.Errorf("invalid account count: %d", len(ix.Accounts))
|
|
||||||
}
|
|
||||||
srcMint, err := tx.GetAccount(int(ix.Accounts[3]))
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if baseMint.Equals(srcMint) {
|
|
||||||
out = append(out, &TxSignal{
|
|
||||||
TxHash: tx.Signatures[0].String(),
|
|
||||||
Maker: tx.StaticAccountKeys[0].String(),
|
|
||||||
Token0Address: baseMint.String(),
|
|
||||||
Token1Address: wsolMint,
|
|
||||||
Token0Amount: formatTokenAmount(pumpAmmSellAmount),
|
|
||||||
Token1Amount: decimal.Zero,
|
|
||||||
Event: "sell",
|
|
||||||
Program: "PumpAMM",
|
|
||||||
IsProcessed: false,
|
|
||||||
IsToken2022: false,
|
|
||||||
IsMayhemMode: false,
|
|
||||||
ExactSOL: false,
|
|
||||||
Token0AmountUint64: pumpAmmSellAmount,
|
|
||||||
Token1AmountUint64: 0,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if srcIdx == 0 || int(srcIdx+1) >= len(accounts) {
|
||||||
if len(out) == 0 {
|
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
return out, nil
|
|
||||||
|
baseMint, err := tx.GetAccount(int(accounts[srcIdx]))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !baseMint.Equals(srcMint) {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
quoteMint, err := tx.GetAccount(int(accounts[srcIdx+1]))
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if !quoteMint.Equals(solana.WrappedSol) {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return TxSignalBatch{&TxSignal{
|
||||||
|
TxHash: tx.Signatures[0].String(),
|
||||||
|
Maker: tx.StaticAccountKeys[0].String(),
|
||||||
|
Token0Address: baseMint.String(),
|
||||||
|
Token1Address: wsolMint,
|
||||||
|
Token0Amount: formatTokenAmount(inputAmount),
|
||||||
|
Token1Amount: decimal.Zero,
|
||||||
|
Event: "sell",
|
||||||
|
Program: "PumpAMM",
|
||||||
|
IsProcessed: false,
|
||||||
|
IsToken2022: false,
|
||||||
|
IsMayhemMode: false,
|
||||||
|
ExactSOL: false,
|
||||||
|
Token0AmountUint64: inputAmount,
|
||||||
|
Token1AmountUint64: 0,
|
||||||
|
}}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,39 +28,32 @@ type FillAccount interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
for account := range registered {
|
for account := range parsedMap {
|
||||||
defaultFilterAccount = append(defaultFilterAccount, account)
|
parseProgram = append(parseProgram, account)
|
||||||
}
|
}
|
||||||
//"GS4CU59F31iL7aR2Q8zVS8DRrcRnXX1yjQ66TqNVQnaR", //Event Authority
|
//"GS4CU59F31iL7aR2Q8zVS8DRrcRnXX1yjQ66TqNVQnaR", //Event Authority
|
||||||
//"5PHirr8joyTMp9JMm6nW7hNDVyEYdkzDqazxPD7RaTjx", // Fee Config
|
//"5PHirr8joyTMp9JMm6nW7hNDVyEYdkzDqazxPD7RaTjx", // Fee Config
|
||||||
//"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ", // pump fee program
|
//"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ", // pump fee program
|
||||||
defaultFilterAccount = append(defaultFilterAccount,
|
parseProgram = append(parseProgram,
|
||||||
solana.MustPublicKeyFromBase58("GS4CU59F31iL7aR2Q8zVS8DRrcRnXX1yjQ66TqNVQnaR"),
|
solana.MustPublicKeyFromBase58("GS4CU59F31iL7aR2Q8zVS8DRrcRnXX1yjQ66TqNVQnaR"),
|
||||||
solana.MustPublicKeyFromBase58("5PHirr8joyTMp9JMm6nW7hNDVyEYdkzDqazxPD7RaTjx"),
|
solana.MustPublicKeyFromBase58("5PHirr8joyTMp9JMm6nW7hNDVyEYdkzDqazxPD7RaTjx"),
|
||||||
solana.MustPublicKeyFromBase58("pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"),
|
solana.MustPublicKeyFromBase58("pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"),
|
||||||
)
|
)
|
||||||
slices.SortFunc(defaultFilterAccount, func(a, b solana.PublicKey) int {
|
slices.SortFunc(parseProgram, func(a, b solana.PublicKey) int {
|
||||||
return bytes.Compare(a[:], b[:])
|
return bytes.Compare(a[:], b[:])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
type FilterParams struct {
|
|
||||||
Require []solana.PublicKey
|
|
||||||
Include []solana.PublicKey
|
|
||||||
Exclude []solana.PublicKey
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
defaultFilterAccount []solana.PublicKey
|
parseProgram []solana.PublicKey
|
||||||
|
|
||||||
registered = map[solana.PublicKey]Handler{
|
parsedMap = map[solana.PublicKey]Handler{
|
||||||
pumpProgramID: {parsePumpInstruction, "pump"},
|
pumpProgramID: {parsePumpInstruction, "pump"},
|
||||||
azczProgramID: {parseAzczInstruction, "azcz"},
|
azczProgramID: {parseAzczInstruction, "azcz"},
|
||||||
f5tfProgramID: {parseF5tfInstruction, "f5tf"},
|
f5tfProgramID: {parseF5tfInstruction, "f5tf"},
|
||||||
flasProgramID: {parseFlasInstruction, "flas"},
|
flasProgramID: {parseFlasInstruction, "flas"},
|
||||||
photonProgramID: {parsePhotonInstruction, "photon"},
|
photonProgramID: {parsePhotonInstruction, "photon"},
|
||||||
pumpAmmProgramID: {parsePumpAmmInstruction, "pumpamm"},
|
pumpAmmProgramID: {parsePumpAmmInstruction, "pumpamm"},
|
||||||
binanceWalletProgramID: {parseBinanceWalletInstruction, "binancewallet"},
|
|
||||||
boboProgramID: {parseBoboInstruction, "bobo"},
|
boboProgramID: {parseBoboInstruction, "bobo"},
|
||||||
qtkvProgramID: {parseQtkvInstruction, "qtkv"},
|
qtkvProgramID: {parseQtkvInstruction, "qtkv"},
|
||||||
fjszProgramID: {parseFjszInstruction, "fjsz"},
|
fjszProgramID: {parseFjszInstruction, "fjsz"},
|
||||||
@@ -72,23 +65,16 @@ var (
|
|||||||
bonkProgramID: {parseBonkInstruction, "bonk"},
|
bonkProgramID: {parseBonkInstruction, "bonk"},
|
||||||
bloomRouterProgramID: {parseBloomRouterInstruction, "bloomrouter"},
|
bloomRouterProgramID: {parseBloomRouterInstruction, "bloomrouter"},
|
||||||
dlmmProgramID: {parseDlmmInstruction, "dlmm"},
|
dlmmProgramID: {parseDlmmInstruction, "dlmm"},
|
||||||
dbotProgramID: {parseDbotInstruction, "dbot"},
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func ParseTransactionForSubscribe(ctx context.Context, update *SubscribeUpdateTransaction, loader *AddressTables, parsed chan<- TxSignal, done chan<- struct{}) {
|
func ParseTransactionForSubscribe(ctx context.Context, update *SubscribeUpdateTransaction, loader *AddressTables, parsed chan<- TxSignal) {
|
||||||
versioned, err := toVersionedTransaction(update)
|
versioned, err := toVersionedTransaction(update)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Debug("txparser: failed to convert to versioned transaction", "error", err)
|
logger.Debug("txparser: failed to convert to versioned transaction", "error", err)
|
||||||
if done != nil {
|
|
||||||
close(done)
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ParseTransaction(ctx, versioned, loader, parsed)
|
go ParseTransaction(ctx, versioned, loader, parsed)
|
||||||
if done != nil {
|
|
||||||
close(done)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var VoteProgram = solana.MustPublicKeyFromBase58("Vote111111111111111111111111111111111111111")
|
var VoteProgram = solana.MustPublicKeyFromBase58("Vote111111111111111111111111111111111111111")
|
||||||
@@ -104,7 +90,7 @@ func FilterTransactionForEntries(versioned VersionedTransaction) bool {
|
|||||||
// accounts filter?
|
// accounts filter?
|
||||||
include := false
|
include := false
|
||||||
for _, key := range versioned.StaticAccountKeys {
|
for _, key := range versioned.StaticAccountKeys {
|
||||||
_, include = slices.BinarySearchFunc(defaultFilterAccount, key, func(key solana.PublicKey, key2 solana.PublicKey) int {
|
_, include = slices.BinarySearchFunc(parseProgram, key, func(key solana.PublicKey, key2 solana.PublicKey) int {
|
||||||
return bytes.Compare(key[:], key2[:])
|
return bytes.Compare(key[:], key2[:])
|
||||||
})
|
})
|
||||||
if include {
|
if include {
|
||||||
@@ -114,53 +100,6 @@ func FilterTransactionForEntries(versioned VersionedTransaction) bool {
|
|||||||
return !include
|
return !include
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetRegisteredHandlers() map[solana.PublicKey]Handler {
|
|
||||||
return registered
|
|
||||||
}
|
|
||||||
|
|
||||||
func FilterTransactionForEntriesWithFilter(versioned VersionedTransaction, filter map[string]FilterParams) bool {
|
|
||||||
if len(versioned.Instructions) >= 1 {
|
|
||||||
programKey, _ := versioned.GetAccount(int(versioned.Instructions[0].ProgramIDIndex))
|
|
||||||
if programKey.Equals(VoteProgram) && len(versioned.AddressTableLookups) == 0 {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, params := range filter {
|
|
||||||
excludePass := true
|
|
||||||
// exclude first
|
|
||||||
for _, key := range params.Exclude {
|
|
||||||
if slices.Contains(versioned.StaticAccountKeys, key) {
|
|
||||||
excludePass = false
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
requirePass := true
|
|
||||||
if excludePass {
|
|
||||||
for _, key := range params.Require {
|
|
||||||
if !slices.Contains(versioned.StaticAccountKeys, key) {
|
|
||||||
requirePass = false
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
include := len(params.Include) == 0
|
|
||||||
if excludePass && requirePass {
|
|
||||||
for _, key := range params.Include {
|
|
||||||
if slices.Contains(versioned.StaticAccountKeys, key) {
|
|
||||||
include = true
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if excludePass && requirePass && include {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func ParseTransactionForEntries(ctx context.Context, slot uint64, entriesReader io.Reader, loader *AddressTables, parsed chan<- TxSignal) {
|
func ParseTransactionForEntries(ctx context.Context, slot uint64, entriesReader io.Reader, loader *AddressTables, parsed chan<- TxSignal) {
|
||||||
err := entriesToVersionedTransaction(slot, entriesReader, func(versioned VersionedTransaction) {
|
err := entriesToVersionedTransaction(slot, entriesReader, func(versioned VersionedTransaction) {
|
||||||
// filter out vote transactions
|
// filter out vote transactions
|
||||||
@@ -175,7 +114,8 @@ func ParseTransactionForEntries(ctx context.Context, slot uint64, entriesReader
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func ParseTransactionWithHandler(ctx context.Context, versioned VersionedTransaction, loader *AddressTables, parsed chan<- TxSignal, handlers map[solana.PublicKey]Handler) {
|
func ParseTransaction(ctx context.Context, versioned VersionedTransaction, loader *AddressTables, parsed chan<- TxSignal) {
|
||||||
|
// staticKeys := versioned.Message.StaticAccountKeys
|
||||||
if loader != nil && len(versioned.AddressTableLookups) > 0 {
|
if loader != nil && len(versioned.AddressTableLookups) > 0 {
|
||||||
lookupTableOk := true
|
lookupTableOk := true
|
||||||
for _, lookups := range versioned.AddressTableLookups {
|
for _, lookups := range versioned.AddressTableLookups {
|
||||||
@@ -200,14 +140,14 @@ func ParseTransactionWithHandler(ctx context.Context, versioned VersionedTransac
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
handler, ok := handlers[program]
|
handler, ok := parsedMap[program]
|
||||||
if !ok {
|
if !ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
txRes, err := handler.Func(versioned, i)
|
txRes, err := handler.Func(versioned, i)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !strings.HasPrefix(err.Error(), "account index") {
|
if !strings.HasPrefix(err.Error(), "account index") {
|
||||||
logger.Debug("txparser: failed to parse", "label", handler.Label, "err", err, "tx_hash", versioned.Signatures[0].String())
|
logger.Debug("txparser: failed to parse", "label", handler.Label, "instruction", err, "tx_hash", versioned.Signatures[0].String())
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -231,11 +171,6 @@ func ParseTransactionWithHandler(ctx context.Context, versioned VersionedTransac
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func ParseTransaction(ctx context.Context, versioned VersionedTransaction, loader *AddressTables, parsed chan<- TxSignal) {
|
|
||||||
// staticKeys := versioned.Message.StaticAccountKeys
|
|
||||||
ParseTransactionWithHandler(ctx, versioned, loader, parsed, registered)
|
|
||||||
}
|
|
||||||
|
|
||||||
func toVersionedTransaction(update *SubscribeUpdateTransaction) (VersionedTransaction, error) {
|
func toVersionedTransaction(update *SubscribeUpdateTransaction) (VersionedTransaction, error) {
|
||||||
if update == nil || update.Transaction == nil || update.Transaction.Message == nil {
|
if update == nil || update.Transaction == nil || update.Transaction.Message == nil {
|
||||||
return VersionedTransaction{}, fmt.Errorf("transaction is nil")
|
return VersionedTransaction{}, fmt.Errorf("transaction is nil")
|
||||||
|
|||||||
@@ -149,21 +149,11 @@ func TestParseTermBuy(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client := rpc.New(rpcUrl)
|
client := rpc.New(rpcUrl)
|
||||||
ch := make(chan TxSignal)
|
signals := ParseTransaction(
|
||||||
closed := make(chan struct{})
|
getTransaction(t, client, "5Gz1fa4Qhb35bkg9QCMXpxCX5uuNr7WcjcmrwajGZA7kXsvNS9pDnYe12ggWeSqf1nwZbVPob6DkX6fcwbE9ofBR"),
|
||||||
go func() {
|
nil,
|
||||||
ParseTransactionForSubscribe(
|
false,
|
||||||
context.Background(),
|
)
|
||||||
getTransaction(t, client, "5Gz1fa4Qhb35bkg9QCMXpxCX5uuNr7WcjcmrwajGZA7kXsvNS9pDnYe12ggWeSqf1nwZbVPob6DkX6fcwbE9ofBR"),
|
|
||||||
nil,
|
|
||||||
ch,
|
|
||||||
closed,
|
|
||||||
)
|
|
||||||
}()
|
|
||||||
signals := make([]TxSignal, 0)
|
|
||||||
for signal := range ch {
|
|
||||||
signals = append(signals, signal)
|
|
||||||
}
|
|
||||||
if len(signals) != 1 {
|
if len(signals) != 1 {
|
||||||
t.Fatalf("expected 1 signal, got %d", len(signals))
|
t.Fatalf("expected 1 signal, got %d", len(signals))
|
||||||
}
|
}
|
||||||
@@ -196,23 +186,11 @@ func TestParseBonkBuy(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client := rpc.New(rpcUrl)
|
client := rpc.New(rpcUrl)
|
||||||
|
signals := ParseTransaction(
|
||||||
ch := make(chan TxSignal)
|
getTransaction(t, client, "3gHF3TA2aA8rpjdmoEs2vA89vrq9J9NnTTUSXHfE6uXcaYP9cJgLtEUjCmsK9EWAyHEg7cEiepehQf4GFv1272jW"),
|
||||||
closed := make(chan struct{})
|
nil,
|
||||||
go func() {
|
false,
|
||||||
ParseTransactionForSubscribe(
|
)
|
||||||
context.Background(),
|
|
||||||
getTransaction(t, client, "3gHF3TA2aA8rpjdmoEs2vA89vrq9J9NnTTUSXHfE6uXcaYP9cJgLtEUjCmsK9EWAyHEg7cEiepehQf4GFv1272jW"),
|
|
||||||
nil,
|
|
||||||
ch,
|
|
||||||
closed,
|
|
||||||
)
|
|
||||||
}()
|
|
||||||
signals := make([]TxSignal, 0)
|
|
||||||
for signal := range ch {
|
|
||||||
signals = append(signals, signal)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(signals) != 1 {
|
if len(signals) != 1 {
|
||||||
t.Fatalf("expected 1 signal, got %d", len(signals))
|
t.Fatalf("expected 1 signal, got %d", len(signals))
|
||||||
}
|
}
|
||||||
@@ -245,22 +223,11 @@ func TestParseBonkSell(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client := rpc.New(rpcUrl)
|
client := rpc.New(rpcUrl)
|
||||||
ch := make(chan TxSignal)
|
signals := ParseTransaction(
|
||||||
closed := make(chan struct{})
|
getTransaction(t, client, "3XNi6b3j69SSStqLLRQVH5BNGVfEoFxGCzmpdd5FvrY4kmC8T644WGdEhCH9fAdrxWuR2Mtzgywq8K7qetu5MGyb"),
|
||||||
go func() {
|
nil,
|
||||||
ParseTransactionForSubscribe(
|
false,
|
||||||
context.Background(),
|
)
|
||||||
getTransaction(t, client, "3XNi6b3j69SSStqLLRQVH5BNGVfEoFxGCzmpdd5FvrY4kmC8T644WGdEhCH9fAdrxWuR2Mtzgywq8K7qetu5MGyb"),
|
|
||||||
nil,
|
|
||||||
ch,
|
|
||||||
closed,
|
|
||||||
)
|
|
||||||
}()
|
|
||||||
signals := make([]TxSignal, 0)
|
|
||||||
for signal := range ch {
|
|
||||||
signals = append(signals, signal)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(signals) != 1 {
|
if len(signals) != 1 {
|
||||||
t.Fatalf("expected 1 signal, got %d", len(signals))
|
t.Fatalf("expected 1 signal, got %d", len(signals))
|
||||||
}
|
}
|
||||||
@@ -293,23 +260,11 @@ func TestParsePhotonBuy(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client := rpc.New(rpcUrl)
|
client := rpc.New(rpcUrl)
|
||||||
|
signals := ParseTransaction(
|
||||||
ch := make(chan TxSignal)
|
getTransaction(t, client, "4DCEcXAWBxagXoUNGhWsJ7qfxq5SuE5BG2cBDBqAY7sCHkBopaMJu33ZnXnFHqzPMmWxVxq6666KRF4hMHVB33Ux"),
|
||||||
closed := make(chan struct{})
|
nil,
|
||||||
go func() {
|
false,
|
||||||
ParseTransactionForSubscribe(
|
)
|
||||||
context.Background(),
|
|
||||||
getTransaction(t, client, "4DCEcXAWBxagXoUNGhWsJ7qfxq5SuE5BG2cBDBqAY7sCHkBopaMJu33ZnXnFHqzPMmWxVxq6666KRF4hMHVB33Ux"),
|
|
||||||
nil,
|
|
||||||
ch,
|
|
||||||
closed,
|
|
||||||
)
|
|
||||||
}()
|
|
||||||
signals := make([]TxSignal, 0)
|
|
||||||
for signal := range ch {
|
|
||||||
signals = append(signals, signal)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(signals) != 1 {
|
if len(signals) != 1 {
|
||||||
t.Fatalf("expected 1 signal, got %d", len(signals))
|
t.Fatalf("expected 1 signal, got %d", len(signals))
|
||||||
}
|
}
|
||||||
@@ -342,22 +297,11 @@ func TestParseJupiterV6PumpFunBuy(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client := rpc.New(rpcUrl)
|
client := rpc.New(rpcUrl)
|
||||||
ch := make(chan TxSignal)
|
signals := ParseTransaction(
|
||||||
closed := make(chan struct{})
|
getTransaction(t, client, "4QF5whXwjx234fMXeH3HrJCy5knFJmKPtgbXys8xKGz1pZypqPvXBr4BoAqXfYn8jLL4HXPY1pcvxCCW1XREFNxd"),
|
||||||
go func() {
|
nil,
|
||||||
ParseTransactionForSubscribe(
|
false,
|
||||||
context.Background(),
|
)
|
||||||
getTransaction(t, client, "4QF5whXwjx234fMXeH3HrJCy5knFJmKPtgbXys8xKGz1pZypqPvXBr4BoAqXfYn8jLL4HXPY1pcvxCCW1XREFNxd"),
|
|
||||||
nil,
|
|
||||||
ch,
|
|
||||||
closed,
|
|
||||||
)
|
|
||||||
}()
|
|
||||||
signals := make([]TxSignal, 0)
|
|
||||||
for signal := range ch {
|
|
||||||
signals = append(signals, signal)
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(signals) != 1 {
|
if len(signals) != 1 {
|
||||||
t.Fatalf("expected 1 signal, got %d", len(signals))
|
t.Fatalf("expected 1 signal, got %d", len(signals))
|
||||||
}
|
}
|
||||||
@@ -393,21 +337,11 @@ func TestParseJupiterV6PumpFunSell(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client := rpc.New(rpcUrl)
|
client := rpc.New(rpcUrl)
|
||||||
ch := make(chan TxSignal)
|
signals := ParseTransaction(
|
||||||
closed := make(chan struct{})
|
getTransaction(t, client, "yCnE7ZA8dqB5iAZtwpSN2ar5HXh3gBjgaG2xtnwXDPFyHAm5XFU8642uTZTH5A2iPQ6G9hrj5eEPAJiWrfe38gM"),
|
||||||
go func() {
|
nil,
|
||||||
ParseTransactionForSubscribe(
|
false,
|
||||||
context.Background(),
|
)
|
||||||
getTransaction(t, client, "yCnE7ZA8dqB5iAZtwpSN2ar5HXh3gBjgaG2xtnwXDPFyHAm5XFU8642uTZTH5A2iPQ6G9hrj5eEPAJiWrfe38gM"),
|
|
||||||
nil,
|
|
||||||
ch,
|
|
||||||
closed,
|
|
||||||
)
|
|
||||||
}()
|
|
||||||
signals := make([]TxSignal, 0)
|
|
||||||
for signal := range ch {
|
|
||||||
signals = append(signals, signal)
|
|
||||||
}
|
|
||||||
if len(signals) != 1 {
|
if len(signals) != 1 {
|
||||||
t.Fatalf("expected 1 signal, got %d", len(signals))
|
t.Fatalf("expected 1 signal, got %d", len(signals))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/samlior/libsam/v2/pkg/enum"
|
"github.com/samlior/libsam/pkg/enum"
|
||||||
"github.com/samlior/libsam/v2/pkg/swqos/clients"
|
"github.com/samlior/libsam/pkg/swqos/clients"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewSWQoSClient(ctx context.Context, config *SWQoSClientConfig) (SWQoSClient, error) {
|
func NewSWQoSClient(ctx context.Context, config *SWQoSClientConfig) (SWQoSClient, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user