update dflow new action
This commit is contained in:
@@ -72,6 +72,11 @@ const (
|
||||
ActOpenPredictionsOrder
|
||||
ActScorchSwap
|
||||
ActIncludeAccount
|
||||
|
||||
ActDFLOWStabbleWeightedSwap
|
||||
ActVertigoSwap
|
||||
ActSetMinimumLegOutputs
|
||||
ActSetMinimumLegPrices
|
||||
)
|
||||
|
||||
// DynamicRouteV1CandidateAction tags
|
||||
@@ -104,7 +109,7 @@ type dflowSwapParams struct {
|
||||
// bytes to skip for Action variants; only PumpFun* actions are decoded.
|
||||
func skipDflowAction(dec *bin.Decoder, tag uint8) (*pumpFunAction, error) {
|
||||
switch tag {
|
||||
case ActWhirlpoolsSwap, ActClearpoolsSwap, ActWhirlpoolsSwapV2:
|
||||
case ActWhirlpoolsSwap, ActClearpoolsSwap, ActWhirlpoolsSwapV2, ActDFLOWStabbleWeightedSwap, ActVertigoSwap:
|
||||
// amount u64 + bool + orchestrator_flags u8
|
||||
return nil, dec.SkipBytes(8 + 1 + 1)
|
||||
case ActRaydiumAmmSwap, ActLifinityV2Swap, ActObricV2Swap,
|
||||
@@ -181,6 +186,19 @@ func skipDflowAction(dec *bin.Decoder, tag uint8) (*pumpFunAction, error) {
|
||||
return nil, dec.SkipBytes(8 + 16 + 1)
|
||||
case ActIncludeAccount:
|
||||
return nil, nil
|
||||
case ActSetMinimumLegOutputs:
|
||||
ln, err := dec.ReadUint32(binary.LittleEndian)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, dec.SkipBytes(uint(8 * ln))
|
||||
case ActSetMinimumLegPrices:
|
||||
// Vec<(u64, u8)>; read length and skip the pairs
|
||||
ln, err := dec.ReadUint32(binary.LittleEndian)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, dec.SkipBytes(uint(uint64(ln) * (8 + 1)))
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported action tag %d", tag)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user