diff --git a/ethers-providers/README.md b/ethers-providers/README.md index 851a52c0..7e0a38fe 100644 --- a/ethers-providers/README.md +++ b/ethers-providers/README.md @@ -10,6 +10,7 @@ For more documentation on the available calls, refer to the # Examples ```no_run +use ethers_core::types::Address; use ethers_providers::{Provider, Http, Middleware}; use std::convert::TryFrom; @@ -21,7 +22,8 @@ let provider = Provider::::try_from( let block = provider.get_block(100u64).await?; println!("Got block: {}", serde_json::to_string(&block)?); -let code = provider.get_code("0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", None).await?; +let addr = "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359".parse::
()?; +let code = provider.get_code(addr, None).await?; println!("Got code: {}", serde_json::to_string(&code)?); # Ok(()) # }