pub(crate) trait EtherscanClient {
// 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
EtherscanClient is a trait that defines the methods to interact with Etherscan.
It is defined as a wrapper of the foundry_block_explorers::Client
to allow mocking.
Required Methods§
async fn contract_source_code( &self, address: Address, ) -> Result<ContractMetadata, EtherscanError>
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.