Build Router Function

Function input params

  • senderAddress: the address of sender

  • routerPaths: the result of find best path function.

  • slippage: the max slippage, 0.01 means 1%.

Example

const res = await tucanaRouterClient.findBestPaths(token0, token1, true, 100000000)
const sendMsg = await tucanaRouterClient.buildRouterFunction(wallet.key.accAddress, res, 0.01)

Last updated