()
| 112 | /// See the module docs for how to run. |
| 113 | #[tokio::main] |
| 114 | async 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. |
nothing calls this directly
no test coverage detected