# Is there a way to chain transaction execution dependency

**URL:** https://forum.fuel.network/t/is-there-a-way-to-chain-transaction-execution-dependency/3956
**Category:** Rust SDK
**Created:** [January 7, 2024, 1:26am UTC](https://forum.fuel.network/t/is-there-a-way-to-chain-transaction-execution-dependency/3956 "2024-01-07T01:26:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Antony](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/antony/32/108_2.png) [@Antony](https://forum.fuel.network/u/Antony)
#### Post date: [January 7, 2024, 1:26am UTC](https://forum.fuel.network/t/is-there-a-way-to-chain-transaction-execution-dependency/3956/1 "2024-01-07T01:26:23Z")

</div>

Hey all,

Is there a way in the Rust-sdk, within the VM or within Sway to chain transaction execution together. We all know the fuel-VM prides itself on parallel tx execution, but what about the case when you want a transaction to execute or revert depending on the state of another transaction. For example:

Say i have a transaction (tx1) that has an output (say a token) coming from the successful evaluation of a predicate. This output serves as an input to another transaction (tx2). That is, the tokens out from tx1 are input to tx2. For tx2 this transaction is a contract interaction that takes the inputs (tokens) and spends it somewhere in the contract method interaction.

The question is: If tx2 reverts, I would like that tx1 also reverts. i.e., the utxos in the predicate don’t get spend.

Is there a way to chain a transaction to another one programmatically in the VM ?

---

<div class="post-metadata">

### Author: ![sandusky](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.fuel.network/sandusky/32/1313_2.png) [@sandusky](https://forum.fuel.network/u/sandusky)
#### Post date: [January 10, 2024, 3:51pm UTC](https://forum.fuel.network/t/is-there-a-way-to-chain-transaction-execution-dependency/3956/2 "2024-01-10T15:51:20Z")

</div>

HI there, @Antony  
Currently, there’s no way to chain transaction execution.  
There’s some work being done on the SDK side, but currently there’s no implementation on the VM side.

For sure is a great feature, it’s on the to-do list 😉

---

<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: [May 29, 2024, 7:41pm UTC](https://forum.fuel.network/t/is-there-a-way-to-chain-transaction-execution-dependency/3956/3 "2024-05-29T19:41:00Z")

</div>

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