hoodchain - v0.1.0
    Preparing search index...

    Function ensureApproval

    • Ensure the router is approved to spend amountIn of the input token, sending an approve transaction only when the current allowance is short. Returns the approval tx hash, or null when no approval was needed.

      Parameters

      • client: HoodClient
      • token: `0x${string}`
      • amount: bigint

      Returns Promise<`0x${string}` | null>