# How to Retrieve Transaction ID Before Sending Transaction Without await on a Deployed Fuel Contract?

**URL:** <https://forum.fuel.network/t/how-to-retrieve-transaction-id-before-sending-transaction-without-await-on-a-deployed-fuel-contract/7373>\
**Category:** TypeScript SDK\
**Tags:** testnet, fuelup, feedback\
**Created:** [December 17, 2024, 6:29am UTC](https://forum.fuel.network/t/how-to-retrieve-transaction-id-before-sending-transaction-without-await-on-a-deployed-fuel-contract/7373 "2024-12-17T06:29:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jitendra-lync](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/jitendra-lync/32/3854_2.png) [@jitendra-lync](https://forum.fuel.network/u/jitendra-lync)\
**Post date:** [December 17, 2024, 6:29am UTC](https://forum.fuel.network/t/how-to-retrieve-transaction-id-before-sending-transaction-without-await-on-a-deployed-fuel-contract/7373/1 "2024-12-17T06:29:10Z")

</div>

I am working on a Fuel blockchain project where I need to send transactions to an **already deployed contract**. My goal is to retrieve the **Transaction ID** before the transaction is sent, without using `await`. This is to check the transaction status (success or failure) asynchronously.

I am following the [Fuel documentation](https://docs.fuel.network/docs/nightly/fuels-ts/transactions/transaction-request/), but the provided examples focus on deploying new contracts, whereas I am interacting with an **existing contract**.

```auto
for (let i = 0; i < transactionsPerAccount * accounts.length; i++) {
  const accountIndex = i % accounts.length;
  const account = accounts[accountIndex];
  const userWallet = Wallet.fromPrivateKey(account.privateKey, provider);

  try {
    await delay(20); // Simulate delay between transactions
    const contract = new LyncIgnite(contractAddress, userWallet);
   contract.functions.hit("1").call();

    console.log(
      `Transaction ${i + 1} processed successfully by account ${
        userWallet.address
      }. Transaction ID: ${txn.transactionId}`
    );
  } catch (txError) {
    console.error(
      `Error processing transaction for account ${userWallet.address}:`,
      txError
    );

    console.log("Added failed transaction to retry queue.");
  }
}

```

- **How can I retrieve the Transaction ID immediately before sending the transaction without using `await`?**
- Is there any method or API available in the Fuel SDK to interact with a deployed contract and get a transaction’s ID synchronously?
- How can I later verify the success or failure of the transaction once the ID is retrieved?

---

<div class="post-metadata">

**Author:** ![danielbate](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/danielbate/32/1617_2.png) [@danielbate](https://forum.fuel.network/u/danielbate)\
**Post date:** [December 17, 2024, 9:03am UTC](https://forum.fuel.network/t/how-to-retrieve-transaction-id-before-sending-transaction-without-await-on-a-deployed-fuel-contract/7373/2 "2024-12-17T09:03:30Z")

</div>

Hi @jitendra-lync, thanks for checking out the SDK!

Firstly, I’d recommend checking out the [custom transactions from contract calls](https://docs.fuel.network/docs/nightly/fuels-ts/cookbook/custom-transactions-from-contract-calls/) documentation, it has a good example of working with an existing contract.

To retrieve a transaction ID, you can use the [getTransactionID](https://docs.fuel.network/docs/nightly/fuels-ts/transactions/transaction-request/#getting-the-transaction-id-for-a-transaction-request) function available to a transaction request. For a contract call, you’ll need to convert it to a [transaction request](https://docs.fuel.network/docs/nightly/fuels-ts/transactions/transaction-request/) first. I’d expect this to look like:

```ts
const txId = contract.functions
  .hit("1")
  .getTransactionRequest()
  .then((request) => txRequest.getTransactionId(1));

```

To verify the success or failure of a tx, check out the [transaction response](https://docs.fuel.network/docs/nightly/fuels-ts/transactions/transaction-response/#transaction-response). Here you can see all the information for a submitted tx, including it’s status, reciepts, gas etc.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/fuel/original/2X/5/57d5a345cc15a64b636e0d56e042857f8a0e80b1.png) [@system](https://forum.fuel.network/u/system)\
**Post date:** [April 8, 2025, 10:22am UTC](https://forum.fuel.network/t/how-to-retrieve-transaction-id-before-sending-transaction-without-await-on-a-deployed-fuel-contract/7373/3 "2025-04-08T10:22:42Z")

</div>

Closed on April 8, 2025, 10:22am UTC

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
