Is there a way to chain transaction execution dependency

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 ?

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 :wink: