Skip to content

Commit

Permalink
doc(starknet_client): fix doc and crate description. (#926)
Browse files Browse the repository at this point in the history
docs(starknet_client): fix doc and crate description
  • Loading branch information
ShahakShama authored Jul 27, 2023
1 parent 1d5549b commit 15f7e7a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions crates/starknet_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true
description = "A client implementation that can communicate with Starknet."

[features]
testing = [
Expand Down
5 changes: 2 additions & 3 deletions crates/starknet_client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Client implementation for the [`Starknet`] feeder gateway.
//! This crate contains clients that can communicate with [`Starknet`] through the various
//! endpoints [`Starknet`] has.
//!
//! This client can read data from [`Starknet`] about the current state
//! (e.g accepted blocks, contracts, classes).
//!
//! [`Starknet`]: https://starknet.io/

Expand Down
10 changes: 9 additions & 1 deletion crates/starknet_client/src/reader/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! This module contains clients that can read data from [`Starknet`].
//!
//! [`Starknet`]: https://starknet.io/
// TODO(shahak) Make private once ClientError is refactored and doesn't depend on the reader
// module.
pub(crate) mod objects;
Expand Down Expand Up @@ -30,7 +33,9 @@ use crate::{
StarknetErrorCode,
};

/// Methods for querying starknet.
/// A trait describing an object that can communicate with [`Starknet`] and read data from it.
///
/// [`Starknet`]: https://starknet.io/
#[cfg_attr(any(test, feature = "testing"), automock)]
#[async_trait]
pub trait StarknetReader {
Expand All @@ -54,6 +59,9 @@ pub trait StarknetReader {
async fn state_update(&self, block_number: BlockNumber) -> ClientResult<Option<StateUpdate>>;
}

/// A client for the [`Starknet`] feeder gateway.
///
/// [`Starknet`]: https://starknet.io/
pub struct StarknetFeederGatewayClient {
urls: StarknetUrls,
client: StarknetClient,
Expand Down

0 comments on commit 15f7e7a

Please sign in to comment.