MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / main

Function main

fendermint/eth/api/examples/ethers.rs:114–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112/// See the module docs for how to run.
113#[tokio::main]
114async fn main() -> Result<(), Box<dyn std::error::Error>> {
115 let opts: Options = Options::parse();
116
117 tracing_subscriber::fmt()
118 .with_max_level(opts.log_level())
119 .init();
120
121 let provider = Provider::<Http>::try_from(opts.http_endpoint())?;
122 run_http(provider, &opts).await?;
123
124 let provider = Provider::<Ws>::connect(opts.ws_endpoint()).await?;
125 run_ws(provider, &opts).await?;
126
127 Ok(())
128}
129
130// The following methods are called by the [`Provider`].
131// This is not an exhaustive list of JSON-RPC methods that the API implements, just what the client library calls.

Callers

nothing calls this directly

Calls 7

parseFunction · 0.85
run_wsFunction · 0.85
ws_endpointMethod · 0.80
run_httpFunction · 0.70
initMethod · 0.45
log_levelMethod · 0.45
http_endpointMethod · 0.45

Tested by

no test coverage detected