Tucana Developer Docs
  • MoveVM
    • MoveVM Overview
    • Deploying Move Modules
    • Creating Move Coin
    • Sending Move Coin
    • Creating Move NFT
    • Staking Related Modules
    • Interacting with Oracle on MoveVM
    • Move IBC hooks
  • Spot DEX
    • Spot Dex SDK
      • Getting Started
      • Features
        • Query Pool Data
        • Create Pool
        • Query Positions Data
        • Collect Position Reward
        • Collect Position Fee
        • Open position and add liquidity
        • Add Liquidity With Fixed Coin
        • Remove liquidity
    • Router SDK
      • Getting Started
      • Features
        • Find Best Paths
        • Build Router Function
    • Spot Contract
      • Data Structure
      • Feature Available
        • Create Pool
        • Swap and Calculate Swap Result
        • Open Position
        • Add Liquidity
        • Remove Liquidity
        • Collect Fee
        • Collect Reward
        • Close Position
        • Get Position Info
        • Get Tick Info
  • Tucana Block Explorer
  • Testnet Faucet
Powered by GitBook
On this page
  1. Spot DEX
  2. Router SDK
  3. Features

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)
PreviousFind Best PathsNextSpot Contract

Last updated 1 year ago