bolt-cw-sdk 1.0.0

SDK for the BOLT protocol, providing utilities for interacting with the BOLT contracts.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use tendermint_rpc::{MockClient, MockRequestMatcher};

use super::error::CosmosClientError;
use super::CosmosClient;

impl<C: MockRequestMatcher + Send + 'static> CosmosClient<MockClient<C>> {
    pub fn new(request_matcher: C) -> Self {
        let (client, driver) = MockClient::new(request_matcher);
        let driver_handle = Some(tokio::spawn(async move {
            driver.run().await.map_err(CosmosClientError::from)
        }));
        CosmosClient {
            client,
            driver_handle,
            gas_info: None,
        }
    }
}