get_swap_min_res
This on-chain view returns a minimum result (output) of a swap.
Call parameters
swap_slice_t
Field | Type | Description |
---|---|---|
direction | swap_direction_t | Swap direction: A->B or B->A |
pair_id | token_id_t (nat) | ID of a pair in which swap will be executed |
get_swap_min_res_t
Field | Type | Description |
---|---|---|
swaps | list(swap_slice_t) | A route of a swap |
amount_in | nat | Amount of tokens to swap from |
Return type
Usage
Errors
108
- pair (pool) with the specifiedtoken_id
not listed.109
- pair doesn't have a liquidity.113
- a Bucket contract not found (not TOK/TEZ LP pair).117
- empty route of swaps.118
- zero amount in was passed as the parameter.119
- wrong route of a swap.
Last updated