agent0.chainsync.dashboard.build_dashboard_dfs

Builds the dataframes used by the dashboard.

Functions

build_pool_dashboard(→ dict[str, pandas.DataFrame])

Builds the dataframes for the main dashboard page that focuses on pools.

build_wallet_dashboard(→ dict[str, pandas.DataFrame])

Builds the dataframes for the main dashboard page that focuses on pools.

Module Contents

agent0.chainsync.dashboard.build_dashboard_dfs.build_pool_dashboard(hyperdrive_address: str, session: sqlalchemy.orm.Session, max_live_blocks: int = 20000, max_ticker_rows: int = 10000) dict[str, pandas.DataFrame]

Builds the dataframes for the main dashboard page that focuses on pools.

Parameters:
  • hyperdrive_address (str) – The hyperdrive address to filter the results on.

  • session (Session) – The initialized sqlalchemy db session object.

  • max_live_blocks (int, optional) – The maximum look-back length in blocks. Defaults to 5000.

  • max_ticker_rows (int, optional) – The maximum number of ticker rows to show. Defaults to 1000.

Returns:

A collection of dataframes ready to be shown in the dashboard.

Return type:

dict[str, DataFrame]

agent0.chainsync.dashboard.build_dashboard_dfs.build_wallet_dashboard(wallet_addresses: list[str], session: sqlalchemy.orm.Session, user_map: pandas.DataFrame | None = None, max_plot_blocks: int = 5000, max_ticker_rows: int = 1000) dict[str, pandas.DataFrame]

Builds the dataframes for the main dashboard page that focuses on pools.

Parameters:
  • wallet_addresses (list[str]) – The list of wallet addresses to filter the results on.

  • session (Session) – The initialized sqlalchemy db session object.

  • user_map (pd.DataFrame | None, optional) – The mapping of wallet addresses to usernames. Will build from db if None.

  • max_plot_blocks (int, optional) – The maximum number of blocks to look in the past for plotting. Defaults to 5000.

  • max_ticker_rows (int, optional) – The maximum number of ticker rows to show. Defaults to 1000.

Returns:

A collection of dataframes ready to be shown in the dashboard.

Return type:

dict[str, DataFrame]