Estimate Swap Key

Estimate the key amount you'll receive for a swap transaction.

Contract function

amountOutForSwapTokens

Contract address

0x9b727dcaC7b331f95786D3b01fA79191Ab527DA3

Parameters

tokenIn: key input address
tokenIn: key output address
amountIn: amount input

Sample code

const amountOutMin = await amountOutForSwapTokens({tokenIn: baseToken.address, 
tokenOut: quoteToken.address, amountIn: parseEther(baseAmount).toString()});

Last updated