pub async fn get_affected_pools_from_logs( market: SharedState<Market>, logs: &[Log], ) -> Result<BTreeMap<PoolWrapper, Vec<SwapDirection>>>