Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rkdud007 committed May 6, 2024
1 parent f7b9d0c commit 76402cd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 7 additions & 2 deletions crates/peer/src/node_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ use starknet::{
};
use tracing::trace;

/*
Node Account
This object represents the account of a node in the network.
It holds the key pair for the p2p network, the account for the StarkNet network, and the signing key.
The account is used to interact with the Registry contract.
*/
pub struct NodeAccount<P>
where
P: Provider + Sync + Send + 'static,
Expand All @@ -21,8 +27,7 @@ where
/// The account for the StarkNet network.
/// This account is used to interact with the Registry contract.
account: SingleOwnerAccount<P, LocalWallet>,
///
///
/// The signing key for the account.
signing_key: SigningKey,
}

Expand Down
6 changes: 6 additions & 0 deletions crates/peer/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ use tracing::trace;
const EVENT_SCRAPE_INTERVAL: u64 = 2;
const REGISTRY_CONTRACT: &str = "0xcdd51fbc4e008f4ef807eaf26f5043521ef5931bbb1e04032a25bd845d286b";

/*
Registry Handler
This object is responsible for handle continuous scraping of events from the Registry contract.
It scrapes the events from the Registry contract and provides a stream of events.
*/

pub struct RegistryHandler<P> {
provider: P,
registry_address: FieldElement,
Expand Down

0 comments on commit 76402cd

Please sign in to comment.