Constructs a new PumpAmmTask.
Optional
properties: 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
Static
createCreates a new PumpAmmTask instance using the specified properties.
Optional
properties: IPumpAmmTaskProperties to set
PumpAmmTask instance
Static
decodeDecodes a PumpAmmTask message from the specified reader or buffer.
Reader or buffer to decode from
Optional
length: numberMessage length if known beforehand
PumpAmmTask
Static
decodeDecodes a PumpAmmTask message from the specified reader or buffer, length delimited.
Reader or buffer to decode from
PumpAmmTask
Static
encodeEncodes the specified PumpAmmTask message. Does not implicitly {@apilink oracle_job.OracleJob.PumpAmmTask.verify|verify} messages.
PumpAmmTask message or plain object to encode
Optional
writer: WriterWriter to encode to
Writer
Static
encodeEncodes the specified PumpAmmTask message, length delimited. Does not implicitly {@apilink oracle_job.OracleJob.PumpAmmTask.verify|verify} messages.
PumpAmmTask message or plain object to encode
Optional
writer: WriterWriter to encode to
Writer
Static
fromCreates a PumpAmmTask message from a plain object. Also converts values to their respective internal types.
Plain object
PumpAmmTask
Static
getGets the default type url for PumpAmmTask
Optional
typeUrlPrefix: stringyour custom typeUrlPrefix(default "type.googleapis.com")
The default type url
Static
toCreates a plain object from a PumpAmmTask message. Also converts values to other types if specified.
PumpAmmTask
Optional
options: IConversionOptionsConversion options
Plain object
Static
verifyVerifies 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%