fetch_batched_tvl_probes
Documentation for eth_defi.vault.rpc_batch.fetch_batched_tvl_probes function.
- fetch_batched_tvl_probes(vaults, web3factory, block_identifier, max_workers, *, batch_size=40)
Batch canonical total assets and preserve specialised NAV conversions.
Method-identity checks keep adapters with overridden NAV/assets paths on individual reads. Failed subcalls produce explicit unavailable outcomes. Returned values carry no synthetic source timestamp.
The all-chain price selector uses these observations to admit low-activity candidates. Admission is provisional: it does not advance historical reader progress or replace previously verified qualification. Unavailable reads therefore produce deferred candidates while existing readers keep scanning.
- Parameters
vaults (list[eth_defi.vault.base.VaultBase]) – Due, already instantiated admission candidates.
web3factory (eth_defi.provider.multi_provider.MultiProviderWeb3Factory) – Verified-chain factory with physical request accounting.
block_identifier (int) – Numeric source block for ordinary batched reads.
max_workers (int) – Maximum threaded read concurrency.
batch_size (int) – Positive maximum encoded subcalls per chunk, default 40. Each ordinary vault contributes one totalAssets subcall. The all-chain admission selector uses 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. Specialised reads are unaffected.
- Returns
Iterator of
(vault, tvl_usd, unsupported_conversion)tuples.tvl_usdis a Decimal estimate or None when unavailable.unsupported_conversionis True only when the denomination rate is unknown or unavailable; a failed RPC read yields(vault, None, False).- Raises
ValueError – If batch_size is not positive, when iteration begins.
- Return type
Iterator[tuple[eth_defi.vault.base.VaultBase, decimal.Decimal | None, bool]]