Skip to content

Commit

Permalink
chore: fix typo in provider readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jsLover1117 committed May 2, 2022
1 parent f10ccfe commit 6c24a30
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ethers-providers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -21,7 +22,8 @@ let provider = Provider::<Http>::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::<Address>()?;
let code = provider.get_code(addr, None).await?;
println!("Got code: {}", serde_json::to_string(&code)?);
# Ok(())
# }
Expand Down

0 comments on commit 6c24a30

Please sign in to comment.