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

Method new

fendermint/eth/api/src/client.rs:47–69  ·  view source on GitHub ↗
(
        http_url: Url,
        ws_url: WebSocketClientUrl,
        retry_delay: Duration,
    )

Source from the content-addressed store, hash-verified

45
46impl HybridClient {
47 pub fn new(
48 http_url: Url,
49 ws_url: WebSocketClientUrl,
50 retry_delay: Duration,
51 ) -> anyhow::Result<(Self, HybridClientDriver)> {
52 let http_client =
53 http_client(http_url, None).context("failed to create Tendermint client")?;
54
55 let (cmd_tx, cmd_rx) = tokio::sync::mpsc::unbounded_channel();
56
57 let client = Self {
58 http_client,
59 cmd_tx,
60 };
61
62 let driver = HybridClientDriver {
63 ws_url,
64 retry_delay,
65 cmd_rx,
66 };
67
68 Ok((client, driver))
69 }
70}
71
72#[async_trait]

Callers

nothing calls this directly

Calls 2

http_clientFunction · 0.85
contextMethod · 0.80

Tested by

no test coverage detected