26 releases (17 stable)

2.0.14 Mar 6, 2024
2.0.11 Nov 16, 2023
2.0.8 Jul 15, 2023
2.0.2 Mar 28, 2023
0.2.1 Nov 29, 2021

#7 in #etherscan

Download history 49273/week @ 2025-07-28 44783/week @ 2025-08-04 41220/week @ 2025-08-11 44519/week @ 2025-08-18 49125/week @ 2025-08-25 49453/week @ 2025-09-01 53534/week @ 2025-09-08 47756/week @ 2025-09-15 42267/week @ 2025-09-22 44243/week @ 2025-09-29 43103/week @ 2025-10-06 43302/week @ 2025-10-13 48631/week @ 2025-10-20 49492/week @ 2025-10-27 50287/week @ 2025-11-03 44222/week @ 2025-11-10

196,824 downloads per month
Used in 5 crates

MIT/Apache

1MB
25K SLoC

ethers-etherscan

Bindings for the etherscan.io web API.

For more information, please refer to the book.

Warning

This crate is deprecated in favor of foundry-block-explorers (foundry-rs/block-explorers). See #2667 for more information.

Examples

# use ethers_core::types::Chain;
# use ethers_etherscan::Client;
# async fn foo() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new(Chain::Mainnet, "<your_api_key>")?;
// Or using environment variables
let client = Client::new_from_env(Chain::Mainnet)?;

let address = "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413".parse()?;
let metadata = client.contract_source_code(address).await?;
assert_eq!(metadata.items[0].contract_name, "DAO");
# Ok(())
# }

Dependencies

~17–37MB
~569K SLoC