Skip to content

Commit 982ea96

Browse files
committed
ref: remove doc
1 parent 8a080e4 commit 982ea96

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/safe_provider.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,6 @@ use tracing::{error, info};
1515
///
1616
/// This wrapper around Alloy providers automatically handles retries,
1717
/// timeouts, and error logging for RPC calls.
18-
///
19-
/// # Example
20-
///
21-
/// ```rust,no_run
22-
/// # use alloy::{
23-
/// # network::Ethereum,
24-
/// # providers::{RootProvider, WsConnect},
25-
/// # rpc::client::ClientBuilder,
26-
/// # };
27-
/// # use event_scanner::safe_provider::SafeProvider;
28-
/// # use std::time::Duration;
29-
///
30-
/// async fn create_safe_provider() -> Result<(), Box<dyn std::error::Error>> {
31-
/// let provider = RootProvider::<Ethereum>::new(
32-
/// ClientBuilder::default().ws(WsConnect::new("wss://localhost:8000")).await?,
33-
/// );
34-
/// let safe_provider =
35-
/// SafeProvider::new(provider).max_timeout(Duration::from_secs(30)).max_retries(5);
36-
///
37-
/// let block = safe_provider.get_block_by_number(12345.into()).await?;
38-
/// Ok(())
39-
/// }
40-
/// ```
4118
#[derive(Clone)]
4219
pub struct SafeProvider<N: Network> {
4320
provider: RootProvider<N>,

0 commit comments

Comments
 (0)