Description
We have support for updating token prices in batches. This functionality is built-in to the TokenRatesController
, and was separately implemented as the fetchTokenContractExchangeRates
utility function (see #3657).
We should migrate this functionality to the token price service itself. It makes sense for this to be in-scope for the responsibilities of that service, because the whole reason for updating token prices in batches is to optimize our usage of this service and workaround its limitations. For example, the original batch size of 100 was chosen due to the maximum supported query string length for this service, and the later update to use a batch size of 30 was done to optimize costs for running this service. This functionality is intrinsically tied to this specific service, it should be managed in the same place.
Migrating this logic into the service would also reduce duplication between the TokenRatesController
and the fetchTokenContractExchangeRates
utility function.