configure_hypersync_from_env

Documentation for eth_defi.hypersync.utils.configure_hypersync_from_env function.

configure_hypersync_from_env(web3, hypersync_api_key=None)

Helper for scan-vaults and scan-prices scripts to configure Hypersync client from environment variables.

  • Some chains support HyperSync, others don’t - autodetect support

Parameters
  • hypersync_api_key (str | None) – Use given API key, instead of reading from env.

  • web3 (web3.main.Web3) –

Returns

A valid Hypersync config if the chain supports HyperSync

Return type

eth_defi.hypersync.utils.HypersyncBackendConfig