Function unwrapResultOrDefault

Unwraps a Weights V2 result type or returns the given default if there is no 'ok' value.

  • Type Parameters

    • T = any

    Parameters

    • outcome: Pick<ContractCallOutcome, "result" | "output">
    • defaultValue: T

    Returns T