From b860ff17192d6f8f1355206f8fbcca51aaac7413 Mon Sep 17 00:00:00 2001 From: samlior Date: Mon, 23 Mar 2026 16:14:19 +0800 Subject: [PATCH] fix: test --- pkg/shreder/program_raydiumlaunchlab.go | 2 +- pkg/shreder/txparser_test.go | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pkg/shreder/program_raydiumlaunchlab.go b/pkg/shreder/program_raydiumlaunchlab.go index 8a6a747..1927423 100644 --- a/pkg/shreder/program_raydiumlaunchlab.go +++ b/pkg/shreder/program_raydiumlaunchlab.go @@ -96,7 +96,7 @@ func parseRaydiumLaunchLabCreate(tx VersionedTransaction, instruction Instructio } func parseRaydiumLaunchLabSwap(tx VersionedTransaction, instruction Instructions, isBuy bool, exactIn bool) (*TxSignal, error) { - if len(instruction.Accounts) < 10 { + if len(instruction.Accounts) < 11 { return nil, fmt.Errorf("accounts too short") } if len(instruction.Data) < 24 { diff --git a/pkg/shreder/txparser_test.go b/pkg/shreder/txparser_test.go index 7eebfd4..a45373d 100644 --- a/pkg/shreder/txparser_test.go +++ b/pkg/shreder/txparser_test.go @@ -577,13 +577,14 @@ func TestParseRaydiumLaunchLabSellExactIn(t *testing.T) { } client := rpc.New(rpcUrl) + loader := manuallyLoadAddressTable(t, client, solana.MustPublicKeyFromBase58("4xBW5fcrR1eityayfv6mrxC7zfQNy89YpqoVmqiTbfRh")) ch := make(chan TxSignal) closed := make(chan struct{}) go func() { ParseTransactionForSubscribe( context.Background(), getTransaction(t, client, "37LGuUiTnBpagELdwVWtffkbJaLsucbRimnFueKS23EaFdYsjHC42SS3XjyC5tyRaokj5tdwiKYfBqNFAmMbTUgv"), - nil, + loader, ch, closed, ) @@ -632,13 +633,14 @@ func TestParseRaydiumLaunchLabSellExactOut(t *testing.T) { } client := rpc.New(rpcUrl) + loader := manuallyLoadAddressTable(t, client, solana.MustPublicKeyFromBase58("DSaHkhDp17UexbZsg2VUnWjEuTwKNCJrnG4LW122ANfd")) ch := make(chan TxSignal) closed := make(chan struct{}) go func() { ParseTransactionForSubscribe( context.Background(), getTransaction(t, client, "3z8iC9zDLeQzjcLtUnwDT1j9Z5p5rFWXyCcRUhvUCVDTrPJSoZbbULkMTZk2mUUeAX1qaMBZUsPCd59B4KaGooSk"), - nil, + loader, ch, closed, ) @@ -687,13 +689,14 @@ func TestParseRaydiumLaunchLabCreate(t *testing.T) { } client := rpc.New(rpcUrl) + loader := manuallyLoadAddressTable(t, client, solana.MustPublicKeyFromBase58("J7aYNVkReYKUSEvS79sg2YubtMQMxUetByAFrNw7qZ3G")) ch := make(chan TxSignal) closed := make(chan struct{}) go func() { ParseTransactionForSubscribe( context.Background(), getTransaction(t, client, "2qi4STgj33b1DydMKvtpqeSVwkcTJHww8ViX9ADMu2TaRz2uSGcVjgDyd9AELnn2N1ojSGy2qnM6uiXJc2vEcLmw"), - nil, + loader, ch, closed, ) @@ -736,13 +739,14 @@ func TestParseRaydiumLaunchLabCreate2(t *testing.T) { } client := rpc.New(rpcUrl) + loader := manuallyLoadAddressTable(t, client, solana.MustPublicKeyFromBase58("5Sq6FRoQkRbupnZM1iq9AFeLaSZPbVHgPheVqHD4GzVr")) ch := make(chan TxSignal) closed := make(chan struct{}) go func() { ParseTransactionForSubscribe( context.Background(), getTransaction(t, client, "3ZofgvJ3vrNRnyGfAFwENSrDAHxVuXhqrL4svwctHuxZHnAengj5SHeEwPJiJFPXYaBcnfrUAk2V4368LVVSEP2W"), - nil, + loader, ch, closed, ) @@ -960,13 +964,14 @@ func TestParseFlasBonkSell(t *testing.T) { } client := rpc.New(rpcUrl) + loader := manuallyLoadAddressTable(t, client, solana.MustPublicKeyFromBase58("7RKtfATWCe98ChuwecNq8XCzAzfoK3DtZTprFsPMGtio")) ch := make(chan TxSignal) closed := make(chan struct{}) go func() { ParseTransactionForSubscribe( context.Background(), getTransaction(t, client, "2v3qLsnrJ5KqUDqtzXyc3S9vT6cLvXbaVR6vwfhp4ufC4Sg1vmR5xMdxzrtvErq8kiC8g7d5wLAbEMe8NwXJE5MS"), - nil, + loader, ch, closed, )