2 Commits

Author SHA1 Message Date
thloyi
c20e019b43 update jup enum 2026-03-03 14:25:46 +08:00
cachalots
c7be7cf4fd culimit 2026-02-27 16:45:57 +08:00
3 changed files with 19 additions and 2 deletions

View File

@@ -160,6 +160,8 @@ const (
Scorch Scorch
VaultLiquidUnstake VaultLiquidUnstake
XOrca XOrca
Quantum
WhaleStreetV2
) )
var swapKindNames = [122]string{"Saber", "SaberAddDecimalsDeposit", "SaberAddDecimalsWithdraw", "TokenSwap", "Sencha", "Step", "Cropper", var swapKindNames = [122]string{"Saber", "SaberAddDecimalsDeposit", "SaberAddDecimalsWithdraw", "TokenSwap", "Sencha", "Step", "Cropper",
@@ -333,8 +335,20 @@ func decodeSwap(dec *bin.Decoder) (Swap, error) {
case RaydiumLaunchlabBuy, RaydiumLaunchlabSell: case RaydiumLaunchlabBuy, RaydiumLaunchlabSell:
return out, skipU64() return out, skipU64()
// -------- Side(u8) payload -------- // -------- Side(u8) payload --------
case Serum, Aldrin, AldrinV2, Dradex, Openbook, Phoenix, OpenBookV2, TokenMill, Plasma, TesseraV, Futarchy, WhaleStreet, Manifest: case Serum, Aldrin, AldrinV2, Dradex, Openbook, Phoenix, OpenBookV2, TokenMill, Plasma, TesseraV, Futarchy,
WhaleStreet, Manifest, Quantum:
return out, skipU8() return out, skipU8()
case WhaleStreetV2:
if err := skipU8(); err != nil {
return Swap{}, err
}
if err := skipU64(); err != nil {
return Swap{}, err
}
if err := skipU64(); err != nil {
return Swap{}, err
}
return out, nil
// -------- MeteoraDlmmSwapV2: RemainingAccountsInfo -------- // -------- MeteoraDlmmSwapV2: RemainingAccountsInfo --------
case MeteoraDlmmSwapV2: case MeteoraDlmmSwapV2:
return out, skipRemaining() return out, skipRemaining()

View File

@@ -48,6 +48,7 @@ type TxSignal struct {
CULimit uint32 `json:"cu_limit"` CULimit uint32 `json:"cu_limit"`
SWQoSAgent string `json:"swqos_agent"` SWQoSAgent string `json:"swqos_agent"`
SWQoSTips decimal.Decimal `json:"swqos_tips"` SWQoSTips decimal.Decimal `json:"swqos_tips"`
TableCnt int `json:"table_cnt"`
ExactSOL bool `json:"exact_in"` ExactSOL bool `json:"exact_in"`

View File

@@ -182,7 +182,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 ParseTransactionWithHandler(ctx context.Context, versioned VersionedTransaction, loader *AddressTables, parsed chan<- TxSignal, handlers map[solana.PublicKey]Handler) {
if loader != nil && len(versioned.AddressTableLookups) > 0 { tableCnt := len(versioned.AddressTableLookups)
if loader != nil && tableCnt > 0 {
lookupTableOk := true lookupTableOk := true
for _, lookups := range versioned.AddressTableLookups { for _, lookups := range versioned.AddressTableLookups {
lookupTableOk = loader.FillToTx(&versioned, lookups.AccountKey, lookups.WritableIndexes) lookupTableOk = loader.FillToTx(&versioned, lookups.AccountKey, lookups.WritableIndexes)
@@ -266,6 +267,7 @@ func ParseTransactionWithHandler(ctx context.Context, versioned VersionedTransac
one.CULimit = cuLimit one.CULimit = cuLimit
one.SWQoSAgent = swqosAgent one.SWQoSAgent = swqosAgent
one.SWQoSTips = swqosTips one.SWQoSTips = swqosTips
one.TableCnt = tableCnt
select { select {
case <-ctx.Done(): case <-ctx.Done():
return return