pub trait Erc20ProviderExt<N>: Sized + Provider<N>where
N: Network,{
// Provided methods
fn retrieve_token<'life0, 'async_trait>(
&'life0 self,
address: Address,
) -> Pin<Box<dyn Future<Output = Result<Token, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
fn get_token<'a, 'async_trait, Id, S>(
&'a self,
id: Id,
store: &'a mut S,
) -> Pin<Box<dyn Future<Output = Result<&'a Token, Error>> + Send + 'async_trait>>
where 'a: 'async_trait,
S: TokenStore<'a> + Send + 'async_trait,
Id: Into<TokenId> + Send + 'async_trait,
Self: Sync + 'async_trait { ... }
fn balance_of<'life0, 'async_trait>(
&'life0 self,
token: Address,
address: Address,
) -> Pin<Box<dyn Future<Output = Result<BigDecimal, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: Sync + 'async_trait { ... }
}Expand description
Extends Alloy Provider trait with ERC-20 related features.
Provided Methods§
Sourcefn retrieve_token<'life0, 'async_trait>(
&'life0 self,
address: Address,
) -> Pin<Box<dyn Future<Output = Result<Token, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn retrieve_token<'life0, 'async_trait>(
&'life0 self,
address: Address,
) -> Pin<Box<dyn Future<Output = Result<Token, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Retrieves a token by querying its ERC-20 contract.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.