agent0.chainsync.exec.acquire_data ================================== .. py:module:: agent0.chainsync.exec.acquire_data .. autoapi-nested-parse:: Script to format on-chain hyperdrive pool, config, and transaction data post-processing. .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: agent0.chainsync.exec.acquire_data.acquire_data Module Contents --------------- .. py:function:: acquire_data(start_block: int = 0, lookback_block_limit: int | None = 3000, interfaces: list[agent0.ethpy.hyperdrive.HyperdriveReadInterface] | None = None, rpc_uri: str | None = None, hyperdrive_addresses: list[eth_typing.ChecksumAddress] | dict[str, eth_typing.ChecksumAddress] | None = None, db_session: sqlalchemy.orm.Session | None = None, postgres_config: agent0.chainsync.PostgresConfig | None = None, backfill=True, backfill_sample_period: int | None = None, backfill_progress_bar: bool = False) Execute the data acquisition pipeline. :param start_block: The starting block to filter the query on :type start_block: int :param lookback_block_limit: The maximum number of blocks to look back when filling in missing data. If None, will ignore lookback block limit. Defaults to 3000. :type lookback_block_limit: int, optional :param interfaces: A collection of Hyperdrive interface objects, each connected to a pool. If not set, will initialize one based on rpc_uri and hyperdrive_address. :type interfaces: list[HyperdriveReadInterface] | None, optional :param rpc_uri: The URI for the web3 provider to initialize the interface with. Not used if an interface is provided. :type rpc_uri: str, optional :param hyperdrive_addresses: A collection of Hyperdrive address, each pointing to an initialized pool. Can also be the output of `get_hyperdrive_addresses_from_registry`, which is a dictionary keyed by a logical name and a value of a hyperdrive address. If it's a dictionary, will add this mapping to the database. Not used if a list of interfaces is provided. :type hyperdrive_addresses: list[ChecksumAddress] | dict[str, ChecksumAddress] | None, optional :param db_session: Session object for connecting to db. If None, will initialize a new session based on postgres_config. :type db_session: Session | None :param postgres_config: PostgresConfig for connecting to db. If none, will set from .env. :type postgres_config: PostgresConfig | None = None, :param backfill: If true, will fill in missing pool info data for every `backfill_sample_period` blocks. Defaults to True. :type backfill: bool, optional :param backfill_sample_period: The sample frequency when backfilling. If None, will backfill every block. :type backfill_sample_period: int | None, optional :param backfill_progress_bar: If true, will show a progress bar when backfilling. Defaults to False. :type backfill_progress_bar: bool, optional .. !! processed by numpydoc !!