wait_for_transaction method

Future<ResultOfProcessMessage> wait_for_transaction(
  1. ParamsOfWaitForTransaction params
)

send_events enables intermediate events, such as WillFetchNextBlock, FetchNextBlockFailed that may be useful for logging of new shard blocks creation during message processing.

Note, that presence of the abi parameter is critical for ABI compliant contracts. Message processing uses drastically different strategy for processing message for contracts which ABI includes "expire" header.

When the ABI header expire is present, the processing uses message expiration strategy:

  • The maximum block gen time is set to message_expiration_timeout + transaction_wait_timeout.
  • When maximum block gen time is reached, the processing will be finished with MessageExpired error.

When the ABI header expire isn't present or abi parameter isn't specified, the processing uses transaction waiting strategy:

  • The maximum block gen time is set to now() + transaction_wait_timeout.

  • If maximum block gen time is reached and no result transaction is found, the processing will exit with an error.

Implementation

Future<ResultOfProcessMessage> wait_for_transaction(
    ParamsOfWaitForTransaction params) async {
  final res = await _tonCore.request(
      'processing.wait_for_transaction', params.toString());
  return ResultOfProcessMessage.fromMap(res);
}