Files
pump-parser/orcawhirpool_test.go

24 lines
752 B
Go
Raw Normal View History

2026-04-22 11:16:26 +08:00
package pump_parser
import "testing"
func TestOrcaWhirlpoolRemoveLiquidityPreservesLargeUint64TransferAmounts(t *testing.T) {
EnableAllParsers()
tx := mustParseRPCFixtureTx(t, "4sj82GCLtgTDExq7B8YrBsrrqPcE4FqT5Y1gKWmE4cHMDxs7wkCV1hik73dSZ99gZm3K4wyBZQ6U8Nmf48rM9Jri")
if len(tx.Swaps) == 0 {
t.Fatal("expected parsed swaps")
}
swap := tx.Swaps[0]
if swap.Program != SolProgramOrcaWhirPool {
t.Fatalf("program = %s, want %s", swap.Program, SolProgramOrcaWhirPool)
}
if swap.Event != TxEventRemoveLiquidity {
t.Fatalf("event = %s, want %s", swap.Event, TxEventRemoveLiquidity)
}
assertDecimalString(t, "base_amount", swap.BaseAmount, "101086439062")
assertDecimalString(t, "quote_amount", swap.QuoteAmount, "9863327902766042414")
}