Skip to content

Commit

Permalink
added explanatory documentation for the topics function in the functi…
Browse files Browse the repository at this point in the history
…on builder (#731)
  • Loading branch information
mohamed-said authored Sep 11, 2024
1 parent 82201a6 commit 135a5b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/types/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ impl FilterBuilder {
}

/// Topics
/// An event topic is a part of the event logging mechanism used by smart contracts
/// to record information on the blockchain.
/// These logs are stored in transaction receipts and can be efficiently filtered and searched.
/// Each log entry has -up to- four "topics," which are 32-byte values used to index the log.
/// Topic 0: The hash of the event signature.
/// Topic 1: The from address (indexed).
/// Topic 2: The to address (indexed).
/// Data: The value (not indexed).
pub fn topics(
mut self,
topic1: Option<Vec<H256>>,
Expand Down

0 comments on commit 135a5b3

Please sign in to comment.