MCPcopy Create free account
hub / github.com/ddimaria/rust-blockchain-tutorial / get_client

Method get_client

web3/src/lib.rs:34–38  ·  view source on GitHub ↗

Create a new HTTP JSON-RPC client with given url.

(url: &str)

Source from the content-addressed store, hash-verified

32
33 /// Create a new HTTP JSON-RPC client with given url.
34 fn get_client(url: &str) -> Result<HttpClient> {
35 HttpClientBuilder::default()
36 .build(url)
37 .map_err(|e| Web3Error::ClientError(e.to_string()))
38 }
39
40 /// Send a RPC call with the given method and parameters.
41 ///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected