[Bug] alloy-transport readme incorrectly describes instantiating the RpcClient #775
Labels
bug
Something isn't working
documentation
Improvements or additions to documentation
good first issue
Good for newcomers
Component
transports
What version of Alloy are you on?
0.1.0
Operating System
macOS (Apple Silicon)
Describe the bug
The readme for the alloy-transport crate incorrectly describes the how to instantiate the RpcClient.
let client: RpcClient<reqwest::Http> = "https://mainnet.infura.io/v3/...".parse().unwrap();
The reqwest module does contain an Http struct nor does the RpcClient<_> struct implement the
FromStr
trait that would enable the url string parsing.I was able to instantiate the RpcClient using
let rpc_client: RpcClient<Http<Client>> = ClientBuilder::default().http("http:://localhost:8545".parse().unwrap());
It would also make sense to include the updated readme documentation for the alloy-rpc-client crate instread of the alloy-transport given the transport is at a lower level.
The text was updated successfully, but these errors were encountered: