pub struct EvmClient<T: Send + Sync + Clone> { /* private fields */ }
Expand description
Client implementation for Ethereum Virtual Machine (EVM) compatible blockchains
Provides high-level access to EVM blockchain data and operations through HTTP transport.
Implementations§
Source§impl<T: Send + Sync + Clone> EvmClient<T>
impl<T: Send + Sync + Clone> EvmClient<T>
Sourcepub fn new_with_transport(http_client: T) -> Self
pub fn new_with_transport(http_client: T) -> Self
Creates a new EVM client instance with a specific transport client
Trait Implementations§
Source§impl<T: Send + Sync + Clone + BlockchainTransport> BlockChainClient for EvmClient<T>
impl<T: Send + Sync + Clone + BlockchainTransport> BlockChainClient for EvmClient<T>
Source§fn get_latest_block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_block_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the latest block number with retry functionality
Source§fn get_blocks<'life0, 'async_trait>(
&'life0 self,
start_block: u64,
end_block: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockType>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_blocks<'life0, 'async_trait>(
&'life0 self,
start_block: u64,
end_block: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockType>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves blocks within the specified range with retry functionality
§Note
If end_block is None, only the start_block will be retrieved
Source§fn get_contract_spec<'life0, 'life1, 'async_trait>(
&'life0 self,
_contract_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ContractSpec, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_contract_spec<'life0, 'life1, 'async_trait>(
&'life0 self,
_contract_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ContractSpec, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieves the contract spec for a given contract ID Read more
Source§impl<T: Send + Sync + Clone + BlockchainTransport> BlockFilterFactory<EvmClient<T>> for EvmClient<T>
impl<T: Send + Sync + Clone + BlockchainTransport> BlockFilterFactory<EvmClient<T>> for EvmClient<T>
Source§impl<T: Send + Sync + Clone + BlockchainTransport> EvmClientTrait for EvmClient<T>
impl<T: Send + Sync + Clone + BlockchainTransport> EvmClientTrait for EvmClient<T>
Source§fn get_transaction_receipt<'life0, 'async_trait>(
&'life0 self,
transaction_hash: String,
) -> Pin<Box<dyn Future<Output = Result<EVMTransactionReceipt, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_receipt<'life0, 'async_trait>(
&'life0 self,
transaction_hash: String,
) -> Pin<Box<dyn Future<Output = Result<EVMTransactionReceipt, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves a transaction receipt by hash with proper error handling
Auto Trait Implementations§
impl<T> Freeze for EvmClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for EvmClient<T>where
T: RefUnwindSafe,
impl<T> Send for EvmClient<T>
impl<T> Sync for EvmClient<T>
impl<T> Unpin for EvmClient<T>where
T: Unpin,
impl<T> UnwindSafe for EvmClient<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more