jediswap_v2_swap_router
Router for stateless execution of swaps against JediSwap V2
Functions
exact_input_single
Swaps amount_in
of one token for as much as possible of another token
Parameters:
Name | Type | Description |
---|---|---|
params | ExactInputSingleParams | The parameters necessary for the swap |
Return Values:
Type | Description |
---|---|
u256 | The amount of the received token |
exact_input
Swaps amount_in
of one token for as much as possible of another along the specified path
Parameters:
Name | Type | Description |
---|---|---|
params | ExactInputParams | The parameters necessary for the multi-hop swap |
Return Values:
Type | Description |
---|---|
u256 | The amount of the received token |
exact_output_single
Swaps as little as possible of one token for amount_out
of another token
Parameters:
Name | Type | Description |
---|---|---|
params | ExactOutputSingleParams | The parameters necessary for the swap |
Return Values:
Type | Description |
---|---|
u256 | The amount of the input token |
exact_output
Swaps as little as possible of one token for amount_out
of another along the specified path (reversed)
path array will be in format [token_out, token_in, fee] if used for single hop (recommend using exact_output_single)
for multihop going from token_in to token_out via token_mid, path will be [token_out, token_mid, fee_out_mid, token_mid, token_in, fee_mid_in]
Parameters:
Name | Type | Description |
---|---|---|
params | ExactOutputParams | The parameters necessary for the multi-hop swap |
Return Values:
Type | Description |
---|---|
u256 | The amount of the input token |
jediswap_v2_swap_callback
Parameters:
Name | Type | Description |
---|---|---|
amount0_delta | i256 | |
amount1_delta | i256 | |
callback_data_span | Span<felt252> |
ABI
Last updated