ExplorerClient

Trait ExplorerClient 

Source
pub(crate) trait ExplorerClient {
    // Required methods
    async fn contract_source_code(
        &self,
        address: Address,
    ) -> Result<ContractMetadata, EtherscanError>;
    async fn contract_creation_data(
        &self,
        address: Address,
    ) -> Result<ContractCreationData, EtherscanError>;
}
Expand description

ExplorerClient is a trait that defines the methods to interact with block explorers. It is defined as a wrapper of the foundry_block_explorers::Client to allow mocking.

Required Methods§

Source

async fn contract_source_code( &self, address: Address, ) -> Result<ContractMetadata, EtherscanError>

Source

async fn contract_creation_data( &self, address: Address, ) -> Result<ContractCreationData, EtherscanError>

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.

Implementations on Foreign Types§

Source§

impl ExplorerClient for Client

Source§

async fn contract_source_code( &self, address: Address, ) -> Result<ContractMetadata, EtherscanError>

Source§

async fn contract_creation_data( &self, address: Address, ) -> Result<ContractCreationData, EtherscanError>

Implementors§