|
|
|
|
@@ -157,6 +157,9 @@ const (
|
|
|
|
|
PerenaStar
|
|
|
|
|
JupiterRfqV2
|
|
|
|
|
GoonFiV2
|
|
|
|
|
Scorch
|
|
|
|
|
VaultLiquidUnstake
|
|
|
|
|
XOrca
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var swapKindNames = [122]string{"Saber", "SaberAddDecimalsDeposit", "SaberAddDecimalsWithdraw", "TokenSwap", "Sencha", "Step", "Cropper",
|
|
|
|
|
@@ -316,7 +319,7 @@ func decodeSwap(dec *bin.Decoder) (Swap, error) {
|
|
|
|
|
BoopdotfunWrappedBuy, BoopdotfunWrappedSell, MeteoraDynamicBondingCurveSwapWithRemainingAccounts,
|
|
|
|
|
PumpWrappedBuyV2, PumpWrappedSellV2, PumpSwapBuyV2, PumpSwapSellV2, Aquifer, PumpWrappedBuyV3, PumpWrappedSellV3,
|
|
|
|
|
PumpSwapBuyV3, PumpSwapSellV3, JupiterLendDeposit, JupiterLendRedeem, RaydiumV2,
|
|
|
|
|
MeteoraDammV2WithRemainingAccounts, Obsidian, PumpWrappedBuyV4, PumpWrappedSellV4, CarrotIssue, CarrotRedeem:
|
|
|
|
|
MeteoraDammV2WithRemainingAccounts, Obsidian, PumpWrappedBuyV4, PumpWrappedSellV4, CarrotIssue, CarrotRedeem, XOrca:
|
|
|
|
|
return out, nil
|
|
|
|
|
|
|
|
|
|
// -------- bool payload --------
|
|
|
|
|
@@ -406,9 +409,23 @@ func decodeSwap(dec *bin.Decoder) (Swap, error) {
|
|
|
|
|
return Swap{}, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
case Scorch:
|
|
|
|
|
// side
|
|
|
|
|
if err := skipTwoU64(); err != nil {
|
|
|
|
|
return Swap{}, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
case VaultLiquidUnstake:
|
|
|
|
|
// [{"name":"lst_amounts","type":{"array":["u64",5]}},{"name":"seed","type":"u64"}]
|
|
|
|
|
for i := 0; i <= 5; i++ {
|
|
|
|
|
if err := skipU64(); err != nil {
|
|
|
|
|
return Swap{}, err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
default:
|
|
|
|
|
// Unknown/new variant: assume no payload (keeps decoder aligned for RoutePlanStepV2 if it really is no-payload).
|
|
|
|
|
return out, nil
|
|
|
|
|
return out, fmt.Errorf("unknown Swap variant: %d", tag)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|