use std::future::Future;
use std::pin::Pin;
use crate::token::TokenMeta;
pub trait DataProvider: Send + Sync {
fn resolve_token(
&self,
chain_id: u64,
address: &str,
) -> Pin<Box<dyn Future<Output = Option<TokenMeta>> + Send + '_>> {
let _ = (chain_id, address);
Box::pin(async { None })
}
fn resolve_ens_name(
&self,
address: &str,
chain_id: u64,
types: Option<&[String]>,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + '_>> {
let _ = (address, chain_id, types);
Box::pin(async { None })
}
fn resolve_local_name(
&self,
address: &str,
chain_id: u64,
types: Option<&[String]>,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + '_>> {
let _ = (address, chain_id, types);
Box::pin(async { None })
}
fn resolve_nft_collection_name(
&self,
collection_address: &str,
chain_id: u64,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + '_>> {
let _ = (collection_address, chain_id);
Box::pin(async { None })
}
fn resolve_block_timestamp(
&self,
chain_id: u64,
block_number: u64,
) -> Pin<Box<dyn Future<Output = Option<u64>> + Send + '_>> {
let _ = (chain_id, block_number);
Box::pin(async { None })
}
}
pub struct EmptyDataProvider;
impl DataProvider for EmptyDataProvider {}