Constructs a new PumpAmmTask.
Optionalproperties: IPumpAmmTaskProperties to set
Optional. The input token amount for the swap.
1 (Swap 1 full token).Optional. Indicates the swap direction:
true: Swapping token X for token Y.false: Swapping token Y for token X.true.Optional. The maximum allowed slippage for the swap, expressed as a percentage.
0.5 represents 0.5% slippage tolerance.3 (3% slippage tolerance).Required. The address of the liquidity pool in the Pump AMM.
Converts this PumpAmmTask to JSON.
JSON object
StaticcreateCreates a new PumpAmmTask instance using the specified properties.
Optionalproperties: IPumpAmmTaskProperties to set
PumpAmmTask instance
StaticdecodeDecodes a PumpAmmTask message from the specified reader or buffer.
Reader or buffer to decode from
Optionallength: numberMessage length if known beforehand
PumpAmmTask
StaticdecodeDecodes a PumpAmmTask message from the specified reader or buffer, length delimited.
Reader or buffer to decode from
PumpAmmTask
StaticencodeEncodes the specified PumpAmmTask message. Does not implicitly {@apilink oracle_job.OracleJob.PumpAmmTask.verify|verify} messages.
PumpAmmTask message or plain object to encode
Optionalwriter: WriterWriter to encode to
Writer
StaticencodeEncodes the specified PumpAmmTask message, length delimited. Does not implicitly {@apilink oracle_job.OracleJob.PumpAmmTask.verify|verify} messages.
PumpAmmTask message or plain object to encode
Optionalwriter: WriterWriter to encode to
Writer
StaticfromCreates a PumpAmmTask message from a plain object. Also converts values to their respective internal types.
Plain object
PumpAmmTask
StaticgetGets the default type url for PumpAmmTask
OptionaltypeUrlPrefix: stringyour custom typeUrlPrefix(default "type.googleapis.com")
The default type url
StatictoCreates a plain object from a PumpAmmTask message. Also converts values to other types if specified.
PumpAmmTask
Optionaloptions: IConversionOptionsConversion options
Plain object
StaticverifyVerifies a PumpAmmTask message.
Plain object to verify
null if valid, otherwise the reason why it is not
Execute a swap task in the Pump AMM based on the given parameters.
Input: Pool address, input token amount, max allowed slippage, and swap direction.
Returns: Executes the swap operation in the Pump AMM with the given parameters.
Example: Swap 10 tokens from X to Y with a maximum slippage of 0.5%