pub trait ProviderEnsExt<T: Transport + Clone, N: Network, P: Provider<T, N>> {
// Required method
fn get_resolver<'life0, 'life1, 'async_trait>(
&'life0 self,
node: B256,
error_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<EnsResolverInstance<T, &P, N>, EnsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn resolve_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Address, EnsError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn lookup_address<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Address,
) -> Pin<Box<dyn Future<Output = Result<String, EnsError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Expand description
Extension trait for ENS contract calls.
Required Methods§
Sourcefn get_resolver<'life0, 'life1, 'async_trait>(
&'life0 self,
node: B256,
error_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<EnsResolverInstance<T, &P, N>, EnsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_resolver<'life0, 'life1, 'async_trait>(
&'life0 self,
node: B256,
error_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<EnsResolverInstance<T, &P, N>, EnsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the resolver for the specified node. The &str
is only used for error messages.
Provided Methods§
Sourcefn resolve_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Address, EnsError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn resolve_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Address, EnsError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Performs a forward lookup of an ENS name to an address.
Sourcefn lookup_address<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Address,
) -> Pin<Box<dyn Future<Output = Result<String, EnsError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn lookup_address<'life0, 'life1, 'async_trait>(
&'life0 self,
address: &'life1 Address,
) -> Pin<Box<dyn Future<Output = Result<String, EnsError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Performs a reverse lookup of an address to an ENS name.