Function: _processExternalTrades(BasketManagerStorage self, ExternalTrade[] externalTrades)
This function handles the processing of external trades.
Inputs
selfControl: Controlled by the calling function.
Constraints: None.
Impact: The storage reference.
externalTradesControl: Controlled by the calling function.
Constraints: None. Assumed to be validated by upper-level functions.
Impact: The external trades to be processed.
Branches and code coverage
Intended branches
Assume that the trades are most efficiently ordered. This is not enforced in code, and responsibility for this comes from the proposer.
Finalize the
tokenSwapvia CoW Swap. (Handled in the_completeTokenSwapcall.)Update the basket balance of every basket with the results of the trades if applicable.
Negative behavior
Should not be directly callable by external users.