1 Commits

Author SHA1 Message Date
thloyi
c20e019b43 update jup enum 2026-03-03 14:25:46 +08:00

View File

@@ -160,6 +160,8 @@ const (
Scorch
VaultLiquidUnstake
XOrca
Quantum
WhaleStreetV2
)
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:
return out, skipU64()
// -------- 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()
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 --------
case MeteoraDlmmSwapV2:
return out, skipRemaining()