exact_in.gno
ExactInSingleSwapRoute
func ExactInSingleSwapRoute(
cur realm,
inputToken string,
outputToken string,
amountIn string,
routeArr string,
amountOutMin string,
sqrtPriceLimitX96 string,
deadline int64,
referrer string
) (string, string)ExactInSingleSwapRoute executes a single-hop swap for an exact input amount.
Halt check: reverts while the Router halt scope is active.
Parameters
cur
realm
current realm context; callers use cross(cur) when crossing into this realm
inputToken
string
input token path
outputToken
string
output token path
amountIn
string
exact input amount
routeArr
string
encoded route
amountOutMin
string
minimum output amount
sqrtPriceLimitX96
string
Q64.96 price limit
deadline
int64
transaction deadline
referrer
string
referral address
Return Values
amountIn
string
input amount consumed (a nonzero price limit may stop early)
amountOut
string
net output amount delivered after the router fee
ExactInSwapRoute
ExactInSwapRoute executes a multi-hop swap for an exact input amount.
Halt check: reverts while the Router halt scope is active.
Parameters
cur
realm
current realm context; callers use cross(cur) when crossing into this realm
inputToken
string
input token path
outputToken
string
output token path
amountIn
string
exact input amount
routeArr
string
encoded route
quoteArr
string
encoded quotes
amountOutMin
string
minimum output amount
deadline
int64
transaction deadline
referrer
string
referral address
Return Values
amountIn
string
input amount consumed
amountOut
string
net output amount delivered after the router fee
Last updated