The logic for multichain bot block number fetching in serverless hub still deviates from single chain bots that result in not caching of fetched block numbers for multichain bots and starting from genesis block first time when multichain bot is added for new chain.
Summary
Fixes the issue by using the same logic in multichain block number fetching as is used for single chain bots.
Details
Batches single chain and multichain block number fetching in a single promises array that is then processed using the same logic.
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
[ ] Ran end-to-end test, running the code as in production
[ ] New unit tests created
[x] Existing tests adequate, no new tests required
Motivation
The logic for multichain bot block number fetching in serverless hub still deviates from single chain bots that result in not caching of fetched block numbers for multichain bots and starting from genesis block first time when multichain bot is added for new chain.
Summary
Fixes the issue by using the same logic in multichain block number fetching as is used for single chain bots.
Details
Batches single chain and multichain block number fetching in a single promises array that is then processed using the same logic.
Testing
Check a box to describe how you tested these changes and list the steps for reviewers to test.
Issue(s)
Fixes: https://linear.app/uma/issue/UMA-2413/improve-block-number-fetching-for-multichain-blocks-in-hub