From f5de81e783b6c20aeec1a9aefeff058284edbdc4 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Mon, 2 May 2022 22:47:42 +0300 Subject: [PATCH] chore: fix typo in provider readme supersedes https://github.com/gakonst/ethers-rs/pull/1203 --- ethers-providers/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(()) # }