chore: support IsCashbackEnabled

This commit is contained in:
2026-02-27 01:43:07 +08:00
parent 0633707142
commit bcd442195c
2 changed files with 3 additions and 0 deletions

View File

@@ -79,6 +79,7 @@ type PumpCreateEvent struct {
TokenTotalSupply uint64 TokenTotalSupply uint64
TokenProgram solana.PublicKey TokenProgram solana.PublicKey
IsMayhemMode bool IsMayhemMode bool
IsCashbackEnabled bool
} }
func CreateParser(tx *Tx, instr Instruction, innerInstructions InnerInstructions, offset [2]uint) ([]Swap, [2]uint, error) { func CreateParser(tx *Tx, instr Instruction, innerInstructions InnerInstructions, offset [2]uint) ([]Swap, [2]uint, error) {
@@ -148,6 +149,7 @@ func CreateParser(tx *Tx, instr Instruction, innerInstructions InnerInstructions
BaseReserve: decimal.NewFromUint64(createEvent.RealTokenReserves), BaseReserve: decimal.NewFromUint64(createEvent.RealTokenReserves),
QuoteReserve: decimal.Zero, QuoteReserve: decimal.Zero,
Mayhem: createEvent.IsMayhemMode, Mayhem: createEvent.IsMayhemMode,
Cashback: createEvent.IsCashbackEnabled,
UserBaseBalance: userBase, UserBaseBalance: userBase,
UserQuoteBalance: decimal.NewFromUint64(userQuote), UserQuoteBalance: decimal.NewFromUint64(userQuote),
EntryContract: entryContract, EntryContract: entryContract,

1
tx.go
View File

@@ -31,6 +31,7 @@ type Swap struct {
BaseReserve decimal.Decimal BaseReserve decimal.Decimal
QuoteReserve decimal.Decimal QuoteReserve decimal.Decimal
Mayhem bool Mayhem bool
Cashback bool
UserBaseBalance decimal.Decimal UserBaseBalance decimal.Decimal
UserQuoteBalance decimal.Decimal UserQuoteBalance decimal.Decimal