Implement auto-consolidation flow
Author: arboleyaCreated Mar 24, 2025Updated Jul 4, 2025
Labelsfeat
Follow-up after:
The PR must also be based on:
Tasks:
- Implement auto-detection to decide when UTXO consolidation is necessary. This must evaluate errors from
assembleTx, but to distinguish betweeninsufficient balancesandtoo many coinswe may have to fetch userbalancesfor base asset ID, and if this is non-negotiable, we may just as well fetch balances for base asset within the same HTTP/GQL call that we submit theassembleTxoperation. - When the above is true, consolidation transactions must be sent with the original transaction via the JSON RPC interface under a
consolidationTxsproperty or similar.
Edit: Follows a diagram of the proposed flow
Source: FuelLabs/fuels-ts