Documentation
    Preparing search index...

    Function repayFlashLoanPTB

    • Repay a flash loan transaction in the PTB

      This function repays the flash loan using the receipt from the original flash loan and the coin object containing the repayment amount.

      Parameters

      • tx: Transaction

        The transaction block to add the repayment operation to

      • identifier: AssetIdentifier

        Asset identifier being repaid

      • receipt: string | TransactionResult

        Receipt from the original flash loan transaction

      • coinObject: CoinObject

        Coin object containing the repayment amount

      • Optionaloptions: Partial<EnvOption>

        Optional environment configuration

      Returns Promise<{ $kind: "NestedResult"; NestedResult: [number, number] }[]>

      Tuple containing [balance] after repayment

      Error if the pool does not support flash loans