• Used to make on chain calls to the contract and wrap raised errors if any

    Type Parameters

    • T

    Parameters

    • func: () => Promise<T>

      function that interacts with the contract

    • Optionalcallback: (err: Error) => string

      callback that may be used to extract error code

    Returns Promise<T>