Skip to main content

trySendTransaction

Callable


  • An internal function to send a transaction or throws if sending did not finish during the timeout during the blocks-timeout.


    Parameters

    • web3Context: Web3Context<EthExecutionAPI, any>

      the context to read the configurations from

    • sendTransactionFunc: AsyncFunction<string, unknown>

      the function that will send the transaction (could be sendTransaction or sendRawTransaction)

    • optionaltransactionHash: Bytes

      to be used inside the exception message if there will be any exceptions.

    Returns Promise<string>

    the Promise

    <string>
    returned by the sendTransactionFunc.