Skip to main content

ChainAnalyzer

Trait ChainAnalyzer 

Source
pub trait ChainAnalyzer: Send + Sync {
    // Required methods
    fn chain_id(&self) -> ChainId;
    fn info(&self) -> ChainInfo;

    // Provided methods
    fn analyze_deployment(
        &self,
        _contract_address: &str,
    ) -> Result<Vec<String>, ForgeGuardError> { ... }
    fn estimate_gas(&self, _gas_used: u64) -> Result<f64, ForgeGuardError> { ... }
}
Expand description

A chain-specific analyzer for EVM and non-EVM chains.

Required Methods§

Source

fn chain_id(&self) -> ChainId

The chain this analyzer supports.

Source

fn info(&self) -> ChainInfo

Get chain information.

Provided Methods§

Source

fn analyze_deployment( &self, _contract_address: &str, ) -> Result<Vec<String>, ForgeGuardError>

Analyze deployment for this chain’s specifics.

Source

fn estimate_gas(&self, _gas_used: u64) -> Result<f64, ForgeGuardError>

Estimate gas for this chain.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§