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

#2 in #etherscan

Download history 42145/week @ 2024-12-15 18706/week @ 2024-12-22 21667/week @ 2024-12-29 36128/week @ 2025-01-05 42289/week @ 2025-01-12 38999/week @ 2025-01-19 36828/week @ 2025-01-26 39589/week @ 2025-02-02 42981/week @ 2025-02-09 39538/week @ 2025-02-16 39974/week @ 2025-02-23 38850/week @ 2025-03-02 42083/week @ 2025-03-09 44397/week @ 2025-03-16 43861/week @ 2025-03-23 43466/week @ 2025-03-30

176,208 downloads per month
Used in 67 crates (5 directly)

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

~15–32MB
~518K SLoC