Function wrapWithFlashLoan
- wrapWithFlashLoan(
txns: Transaction[],
pool: Pool,
userAddr: string,
receiverAddr: string,
reserveAddr: string,
borrowAmount: number | bigint,
params: SuggestedParams,
flashLoanFee?: bigint,
): Transaction[] 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[]
Transaction[] group transaction wrapped with flash loan
- txns: Transaction[]
Wraps given transactions with flash loan.