Salt on transactions

on fuelsts is possible add an salt on transaction

how recover this on smart contract?

Hi @guimroque ,

Can you clarify your question a bit more?

Are you asking if a non-create contract transaction can have a salt?

1 Like

Let me try to share an idea:
At bakosafe we ​​do not send the tx to the chain as soon as it is created, rather we wait for all the necessary signatures for the predicates to be made.
This causes a problem if the user wants to create several tx before waiting for other people to sign, because at the time of creation the tx assembled by the predicate takes the UTXO reference for its inputs.
For example, if you create 2 transactions in sequence, when sending them only the first one can be processed, because when sending the 1st of 2 you have already changed the flow for that predicate, and the initial input of its creation (in which the hash that users signed was assembled no longer exists).
To solve my idea is to create a custom hash, which removes the inputs or at least the utxo part.
But this can cause equal dynamic hashes (within the same predicate), to avoid this a random element, such as salt, would be necessary.
If this is possible (recovering the salt within a sway contract), I would need to add this to the script type tx, so that my custom hashes would never be equivalent.