diff --git a/crates/peer/src/node_account.rs b/crates/peer/src/node_account.rs index 7375dda..e5581d3 100644 --- a/crates/peer/src/node_account.rs +++ b/crates/peer/src/node_account.rs @@ -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

where P: Provider + Sync + Send + 'static, @@ -21,8 +27,7 @@ where /// The account for the StarkNet network. /// This account is used to interact with the Registry contract. account: SingleOwnerAccount, - /// - /// + /// The signing key for the account. signing_key: SigningKey, } diff --git a/crates/peer/src/registry.rs b/crates/peer/src/registry.rs index 452eaf8..48ba817 100644 --- a/crates/peer/src/registry.rs +++ b/crates/peer/src/registry.rs @@ -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

{ provider: P, registry_address: FieldElement,