Skip to main content

fetch_contract_source

Function fetch_contract_source 

Source
pub async fn fetch_contract_source(
    address: &str,
    chain: &str,
    http_client: &Client,
) -> Result<ContractSource>
Expand description

Fetch full contract source code and metadata from Etherscan.

Uses the getsourcecode endpoint which is available on the free tier. Returns Err if the contract is not verified or the API call fails.