Function wrapWithFlashLoan

  • Wraps given transactions with flash loan.

    Returns

    Transaction[] group transaction wrapped with flash loan

    Parameters

    • txns: Transaction[]

      txns to wrap flash loan around

    • pool: Pool

      pool to borrow from

    • userAddr: string

      account address for the user

    • receiverAddr: string

      account address to receive the loan

    • reserveAddr: string

      account address to receive the protocol revenue from the flash loan fee

    • borrowAmount: number | bigint

      the amount of the asset to borrow

    • params: SuggestedParams

      suggested params for the transactions with the fees overwritten

    • flashLoanFee: bigint = ...

      fee for flash loan as 16 d.p integer (default 0.1%)

    Returns Transaction[]

Generated using TypeDoc