fetch_and_store_flying_tulip_source_history

Documentation for eth_defi.erc_4626.vault_protocol.flying_tulip.historical_context.fetch_and_store_flying_tulip_source_history function.

fetch_and_store_flying_tulip_source_history(*, web3, hypersync_client, start_block, end_block, context_path=None, source_chunk_size=10000000)

Collect every Flying Tulip source event in a half-open block range.

This function is restartable: completed source rows are inserted idempotently and a conflicting duplicate stops the run. It has no JSON-RPC log reads and does not construct synthetic prices.

Parameters
  • web3 (web3.main.Web3) – RPC connection for the same chain as Hypersync.

  • hypersync_client (eth_defi.hypersync.session.ThrottledHypersyncClient) – Configured throttle-aware Hypersync client.

  • start_block (int) – Inclusive source boundary, normally the sftUSD proxy deployment block.

  • end_block (int) – Exclusive safe source head.

  • context_path (Optional[pathlib.Path]) – Optional shared contextual-cache path.

  • source_chunk_size (int) – Maximum source blocks per observable Hypersync request.

Returns

Counts for the complete requested source range.

Return type

eth_defi.erc_4626.vault_protocol.flying_tulip.historical_context.FlyingTulipContextPrefillResult