pub struct TxAnalyzer { /* private fields */ }Expand description
Transaction analyzer
Implementations§
Source§impl TxAnalyzer
impl TxAnalyzer
Sourcepub fn with_fetcher(
pool: RpcPool,
chain: Chain,
abi_fetcher: Arc<AbiFetcher>,
) -> Self
pub fn with_fetcher( pool: RpcPool, chain: Chain, abi_fetcher: Arc<AbiFetcher>, ) -> Self
Create a new analyzer with a shared AbiFetcher (PERF-002 fix)
Use this when analyzing multiple transactions to avoid recreating HTTP clients for each transaction.
Sourcepub fn abi_fetcher(&self) -> Arc<AbiFetcher>
pub fn abi_fetcher(&self) -> Arc<AbiFetcher>
Get a reference to the ABI fetcher for sharing with other analyzers
Sourcepub async fn analyze(&self, hash: &str) -> Result<TransactionAnalysis>
pub async fn analyze(&self, hash: &str) -> Result<TransactionAnalysis>
Analyze a transaction by hash (basic analysis)
Sourcepub async fn analyze_enriched(&self, hash: &str) -> Result<TransactionAnalysis>
pub async fn analyze_enriched(&self, hash: &str) -> Result<TransactionAnalysis>
Analyze a transaction with enrichment from Etherscan (slower but more detailed)
Sourcepub async fn analyze_with_block(
&self,
hash: &str,
block_number: Option<u64>,
) -> Result<TransactionAnalysis>
pub async fn analyze_with_block( &self, hash: &str, block_number: Option<u64>, ) -> Result<TransactionAnalysis>
Analyze a transaction by hash with optional block number for partial hash resolution
Sourcepub async fn analyze_enriched_with_block(
&self,
hash: &str,
block_number: Option<u64>,
) -> Result<TransactionAnalysis>
pub async fn analyze_enriched_with_block( &self, hash: &str, block_number: Option<u64>, ) -> Result<TransactionAnalysis>
Analyze a transaction with enrichment and optional block number for partial hash resolution
Sourcepub async fn resolve_partial_hash(
&self,
partial_hash: &str,
block_number: u64,
) -> Result<B256>
pub async fn resolve_partial_hash( &self, partial_hash: &str, block_number: u64, ) -> Result<B256>
Resolve a partial transaction hash using a block number
If the hash is less than 66 characters (full hash length with 0x prefix), and a block number is provided, fetch the block and find the transaction that matches the prefix.
Auto Trait Implementations§
impl Freeze for TxAnalyzer
impl !RefUnwindSafe for TxAnalyzer
impl Send for TxAnalyzer
impl Sync for TxAnalyzer
impl Unpin for TxAnalyzer
impl !UnwindSafe for TxAnalyzer
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
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>
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>
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