25 releases (16 stable)

2.0.13 Jan 30, 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

#1351 in Magic Beans

Download history 27755/week @ 2023-11-02 26368/week @ 2023-11-09 35174/week @ 2023-11-16 34350/week @ 2023-11-23 43828/week @ 2023-11-30 41495/week @ 2023-12-07 39307/week @ 2023-12-14 27227/week @ 2023-12-21 23835/week @ 2023-12-28 39773/week @ 2024-01-04 58019/week @ 2024-01-11 54924/week @ 2024-01-18 56523/week @ 2024-01-25 75307/week @ 2024-02-01 54854/week @ 2024-02-08 41665/week @ 2024-02-15

237,513 downloads per month
Used in 65 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

~14–31MB
~499K SLoC