pub struct BlockchainDataClient { /* private fields */ }Expand description
Client for fetching blockchain data
Implementations§
Source§impl BlockchainDataClient
impl BlockchainDataClient
Sourcepub fn new(sources: DataSources) -> Self
pub fn new(sources: DataSources) -> Self
Create new client with data sources
Sourcepub fn with_base_url(sources: DataSources, base_url: &str) -> Self
pub fn with_base_url(sources: DataSources, base_url: &str) -> Self
Create new client with a custom base URL (for testing)
Sourcepub async fn get_transactions(
&self,
address: &str,
chain: &str,
) -> Result<Vec<EtherscanTransaction>>
pub async fn get_transactions( &self, address: &str, chain: &str, ) -> Result<Vec<EtherscanTransaction>>
Fetch transaction history for an address
Sourcepub async fn get_internal_transactions(
&self,
address: &str,
) -> Result<Vec<EtherscanTransaction>>
pub async fn get_internal_transactions( &self, address: &str, ) -> Result<Vec<EtherscanTransaction>>
Get internal transactions (contract calls)
Sourcepub async fn get_token_transfers(
&self,
address: &str,
) -> Result<Vec<EtherscanTransaction>>
pub async fn get_token_transfers( &self, address: &str, ) -> Result<Vec<EtherscanTransaction>>
Get ERC-20 token transfers
Sourcepub async fn trace_transaction(
&self,
tx_hash: &str,
_depth: u32,
) -> Result<TransactionTrace>
pub async fn trace_transaction( &self, tx_hash: &str, _depth: u32, ) -> Result<TransactionTrace>
Trace transaction by following outputs
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlockchainDataClient
impl !RefUnwindSafe for BlockchainDataClient
impl Send for BlockchainDataClient
impl Sync for BlockchainDataClient
impl Unpin for BlockchainDataClient
impl !UnwindSafe for BlockchainDataClient
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
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