agent0.chainsync.db.hyperdrive.chain_to_db ========================================== .. py:module:: agent0.chainsync.db.hyperdrive.chain_to_db .. autoapi-nested-parse:: Functions for gathering data from the chain and adding it to the db .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: agent0.chainsync.db.hyperdrive.chain_to_db.init_data_chain_to_db agent0.chainsync.db.hyperdrive.chain_to_db.pool_info_to_db agent0.chainsync.db.hyperdrive.chain_to_db.checkpoint_events_to_db agent0.chainsync.db.hyperdrive.chain_to_db.trade_events_to_db Module Contents --------------- .. py:function:: init_data_chain_to_db(interfaces: list[agent0.ethpy.hyperdrive.HyperdriveReadInterface], session: sqlalchemy.orm.Session) -> None Function to query and insert pool config to dashboard. :param interfaces: A collection of Hyperdrive interface objects, each connected to a pool. :type interfaces: list[HyperdriveReadInterface] :param session: The database session :type session: Session .. !! processed by numpydoc !! .. py:function:: pool_info_to_db(interfaces: list[agent0.ethpy.hyperdrive.HyperdriveReadInterface], block_number: int, session: sqlalchemy.orm.Session) -> None Function to query and insert data to dashboard. :param interfaces: A collection of Hyperdrive interface objects, each connected to a pool. :type interfaces: list[HyperdriveReadInterface] :param block_number: The block number to query the chain on. :type block_number: int :param session: The database session. :type session: Session .. !! processed by numpydoc !! .. py:function:: checkpoint_events_to_db(interfaces: list[agent0.ethpy.hyperdrive.HyperdriveReadInterface], db_session: sqlalchemy.orm.Session) -> None Function to query checkpoint events from all pools and add them to the db. :param interfaces: A collection of Hyperdrive interface objects, each connected to a pool. :type interfaces: list[HyperdriveReadInterface] :param db_session: The database session. :type db_session: Session .. !! processed by numpydoc !! .. py:function:: trade_events_to_db(interfaces: list[agent0.ethpy.hyperdrive.HyperdriveReadInterface], wallet_addr: str | None, db_session: sqlalchemy.orm.Session) -> None Function to query trade events from all pools and add them to the db. :param interfaces: A collection of Hyperdrive interface objects, each connected to a pool. :type interfaces: list[HyperdriveReadInterface] :param wallet_addr: The wallet address to query. If None, will not filter events by wallet addr. :type wallet_addr: str | None :param db_session: The database session. :type db_session: Session .. !! processed by numpydoc !!