fetch_metadata_snapshots
Documentation for eth_defi.vault.rpc_batch.fetch_metadata_snapshots function.
- fetch_metadata_snapshots(detections, web3factory, block_identifier, max_workers, *, batch_size=40)
Read ordinary metadata inputs in shared batches at one source block.
Only generic ERC-4626, Morpho v1 and IPOR are enabled initially. Adapter consumers additionally verify method identity and the source block. HyperEVM and custom share-token paths keep their specialised reads.
Called by lead discovery and pending-metadata recovery after scheduling has selected candidates. These are raw inputs, not final metadata records: adapters remain responsible for token decoding and protocol economics. Pinning the inputs to one block lets those adapters reject a snapshot from a different observation rather than silently mixing old and new values.
- Parameters
detections (list[eth_defi.erc_4626.core.ERC4262VaultDetection]) – Metadata candidates already selected as due.
web3factory (eth_defi.provider.multi_provider.MultiProviderWeb3Factory) – Factory with phase accounting and verified chain ID.
block_identifier (int) – Common numeric block for this bounded batch.
max_workers (int) – Maximum threaded read concurrency.
batch_size (int) – Positive maximum encoded subcalls per chunk, default 40. Each vault contributes four subcalls, so this counts calls rather than vaults. Discovery and pending-metadata recovery use the default; direct callers can pass a smaller limit for a constrained provider. Existing Multicall chain limits and failure handling may further split a chunk.
- Returns
Lower-case address to successful raw inputs and source block.
- Raises
ValueError – If batch_size is not positive.
- Return type