loom_defi_market

Function fetch_and_add_pool_by_address

Source
pub async fn fetch_and_add_pool_by_address<P, T, N, DB>(
    client: P,
    market: SharedState<Market>,
    market_state: SharedState<MarketState<DB>>,
    pool_address: Address,
    pool_class: PoolClass,
) -> Result<()>
where N: Network, T: Transport + Clone, P: Provider<T, N> + DebugProviderExt<T, N> + Send + Sync + Clone + 'static, DB: DatabaseRef + Database + DatabaseCommit + Send + Sync + Clone + 'static,
Expand description

Fetch pool data, add it to the market and fetch the required state