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

#639 in Magic Beans

Download history 57205/week @ 2024-03-14 51522/week @ 2024-03-21 46728/week @ 2024-03-28 41871/week @ 2024-04-04 44685/week @ 2024-04-11 43804/week @ 2024-04-18 38779/week @ 2024-04-25 36972/week @ 2024-05-02 41008/week @ 2024-05-09 41418/week @ 2024-05-16 36860/week @ 2024-05-23 39663/week @ 2024-05-30 44807/week @ 2024-06-06 44483/week @ 2024-06-13 44986/week @ 2024-06-20 34043/week @ 2024-06-27

175,586 downloads per month
Used in 69 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

~13–31MB
~476K SLoC