exact_out.gno

ExactOutSwapRoute

func ExactOutSwapRoute(
	inputToken string,
	outputToken string,
	amountOut string,
	routeArr string,
	quoteArr string,
	amountInMax string,
	deadline int64,
) (string, string)

Runs a exact-in direction swap through the route that offers the most favorable exchange rate.

Parameters

Name
Type
Description

inputToken

string

The path of the input token.

outputToken

string

The path of the output token.

amountOut

string

The amount of the output token

routeArr

string

The route of the swap.

quoteArr

string

The share of each split of the route.

amountInMax

string

Limits the number of tokens while routing the swap. The maxmim amount of tokens to pay

deadline

int64

The timestamp for transaction to be expired.

Return Values

Name
Type
Description

tokenIn

string

The amount sent to the pool from the user (the input of the swap).

tokenOut

string

The amount sent to the user from the pool (the output of the swap).

Last updated

Was this helpful?